Article TREES_1, MML version 4.99.1005
:: TREES_1:th 1
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like FinSequence-like set
st b3 = b2 | Seg b1
holds len b3 <= b1;
:: TREES_1:th 2
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like FinSequence-like set
st b3 = b2 | Seg b1
holds len b3 <= len b2;
:: TREES_1:th 3
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like FinSequence-like set
st b3 = b2 | Seg b1
holds ex b4 being Relation-like Function-like FinSequence-like set st
b2 = b3 ^ b4;
:: TREES_1:th 4
theorem
for b1 being set holds
{} <> <*b1*>;
:: TREES_1:th 5
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set
st (b1 = b1 ^ b2 or b1 = b2 ^ b1)
holds b2 = {};
:: TREES_1:th 6
theorem
for b1 being set
for b2, b3 being Relation-like Function-like FinSequence-like set
st b2 ^ b3 = <*b1*> &
(b2 = <*b1*> implies b3 <> {})
holds b2 = {} & b3 = <*b1*>;
:: TREES_1:prednot 1 => TARSKI:pred 1
notation
let a1, a2 be Relation-like Function-like FinSequence-like set;
synonym a1 is_a_prefix_of a2 for a1 c= a2;
end;
:: TREES_1:prednot 2 => TARSKI:pred 1
definition
let a1, a2 be set;
pred A1 is_a_prefix_of A2 means
ex b1 being Element of NAT st
a1 = a2 | Seg b1;
reflexivity;
:: for a1 being set holds
:: a1 c= a1;
end;
:: TREES_1:dfs 1
definiens
let a1, a2 be Relation-like Function-like FinSequence-like set;
To prove
a1 c= a2
it is sufficient to prove
thus ex b1 being Element of NAT st
a1 = a2 | Seg b1;
:: TREES_1:def 1
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set holds
b1 c= b2
iff
ex b3 being Element of NAT st
b1 = b2 | Seg b3;
:: TREES_1:th 8
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set holds
b1 c= b2
iff
ex b3 being Relation-like Function-like FinSequence-like set st
b2 = b1 ^ b3;
:: TREES_1:th 15
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set
st b1 c= b2 & len b1 = len b2
holds b1 = b2;
:: TREES_1:th 16
theorem
for b1, b2 being set holds
<*b1*> c= <*b2*>
iff
b1 = b2;
:: TREES_1:prednot 3 => XBOOLE_0:pred 2
notation
let a1, a2 be Relation-like Function-like FinSequence-like set;
synonym a1 is_a_proper_prefix_of a2 for a1 c< a2;
end;
:: TREES_1:th 19
theorem
for b1, b2 being finite set
st b1,b2 are_c=-comparable & card b1 = card b2
holds b1 = b2;
:: TREES_1:th 23
theorem
for b1, b2 being set holds
<*b1*>,<*b2*> are_c=-comparable
iff
b1 = b2;
:: TREES_1:th 24
theorem
for b1, b2 being finite set
st b1 c< b2
holds card b1 < card b2;
:: TREES_1:th 30
theorem
for b1 being set
for b2, b3 being Relation-like Function-like FinSequence-like set
st b2 ^ <*b1*> c= b3
holds b2 c< b3;
:: TREES_1:th 31
theorem
for b1 being set
for b2, b3 being Relation-like Function-like FinSequence-like set
st b2 c= b3
holds b2 c< b3 ^ <*b1*>;
:: TREES_1:th 32
theorem
for b1 being set
for b2, b3 being Relation-like Function-like FinSequence-like set
st b2 c< b3 ^ <*b1*>
holds b2 c= b3;
:: TREES_1:th 33
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set
st (not {} c< b1 implies {} <> b1)
holds b2 c< b2 ^ b1;
:: TREES_1:funcnot 1 => TREES_1:func 1
definition
let a1 be Relation-like Function-like FinSequence-like set;
func ProperPrefixes A1 -> set means
for b1 being set holds
b1 in it
iff
ex b2 being Relation-like Function-like FinSequence-like set st
b1 = b2 & b2 c< a1;
end;
:: TREES_1:def 4
theorem
for b1 being Relation-like Function-like FinSequence-like set
for b2 being set holds
b2 = ProperPrefixes b1
iff
for b3 being set holds
b3 in b2
iff
ex b4 being Relation-like Function-like FinSequence-like set st
b3 = b4 & b4 c< b1;
:: TREES_1:th 35
theorem
for b1 being set
for b2 being Relation-like Function-like FinSequence-like set
st b1 in ProperPrefixes b2
holds b1 is Relation-like Function-like FinSequence-like set;
:: TREES_1:th 36
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set holds
b1 in ProperPrefixes b2
iff
b1 c< b2;
:: TREES_1:th 37
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set
st b1 in ProperPrefixes b2
holds len b1 < len b2;
:: TREES_1:th 38
theorem
for b1, b2, b3 being Relation-like Function-like FinSequence-like set
st b2 ^ b3 in ProperPrefixes b1
holds b2 in ProperPrefixes b1;
:: TREES_1:th 39
theorem
ProperPrefixes {} = {};
:: TREES_1:th 40
theorem
for b1 being set holds
ProperPrefixes <*b1*> = {{}};
:: TREES_1:th 41
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set
st b1 c= b2
holds ProperPrefixes b1 c= ProperPrefixes b2;
:: TREES_1:th 42
theorem
for b1, b2, b3 being Relation-like Function-like FinSequence-like set
st b2 in ProperPrefixes b1 & b3 in ProperPrefixes b1
holds b2,b3 are_c=-comparable;
:: TREES_1:attrnot 1 => TREES_1:attr 1
definition
let a1 be set;
attr a1 is Tree-like means
a1 c= NAT * &
(for b1 being FinSequence of NAT
st b1 in a1
holds ProperPrefixes b1 c= a1) &
(for b1 being FinSequence of NAT
for b2, b3 being Element of NAT
st b1 ^ <*b2*> in a1 & b3 <= b2
holds b1 ^ <*b3*> in a1);
end;
:: TREES_1:dfs 3
definiens
let a1 be set;
To prove
a1 is Tree-like
it is sufficient to prove
thus a1 c= NAT * &
(for b1 being FinSequence of NAT
st b1 in a1
holds ProperPrefixes b1 c= a1) &
(for b1 being FinSequence of NAT
for b2, b3 being Element of NAT
st b1 ^ <*b2*> in a1 & b3 <= b2
holds b1 ^ <*b3*> in a1);
:: TREES_1:def 5
theorem
for b1 being set holds
b1 is Tree-like
iff
b1 c= NAT * &
(for b2 being FinSequence of NAT
st b2 in b1
holds ProperPrefixes b2 c= b1) &
(for b2 being FinSequence of NAT
for b3, b4 being Element of NAT
st b2 ^ <*b3*> in b1 & b4 <= b3
holds b2 ^ <*b4*> in b1);
:: TREES_1:exreg 1
registration
cluster non empty Tree-like set;
end;
:: TREES_1:modenot 1
definition
mode Tree is non empty Tree-like set;
end;
:: TREES_1:th 44
theorem
for b1 being set
for b2 being non empty Tree-like set
st b1 in b2
holds b1 is FinSequence of NAT;
:: TREES_1:modenot 2 => TREES_1:mode 1
definition
let a1 be non empty Tree-like set;
redefine mode Element of a1 -> FinSequence of NAT;
end;
:: TREES_1:th 45
theorem
for b1 being non empty Tree-like set
for b2, b3 being Relation-like Function-like FinSequence-like set
st b2 in b1 & b3 c= b2
holds b3 in b1;
:: TREES_1:th 46
theorem
for b1 being FinSequence of NAT
for b2 being non empty Tree-like set
for b3 being Relation-like Function-like FinSequence-like set
st b1 ^ b3 in b2
holds b1 in b2;
:: TREES_1:th 47
theorem
for b1 being non empty Tree-like set holds
{} in b1 & <*> NAT in b1;
:: TREES_1:th 48
theorem
{{}} is non empty Tree-like set;
:: TREES_1:th 49
theorem
for b1, b2 being non empty Tree-like set holds
b1 \/ b2 is non empty Tree-like set;
:: TREES_1:th 50
theorem
for b1, b2 being non empty Tree-like set holds
b1 /\ b2 is non empty Tree-like set;
:: TREES_1:exreg 2
registration
cluster non empty finite Tree-like set;
end;
:: TREES_1:th 52
theorem
for b1, b2 being non empty finite Tree-like set holds
b1 \/ b2 is non empty finite Tree-like set;
:: TREES_1:th 53
theorem
for b1 being non empty Tree-like set
for b2 being non empty finite Tree-like set holds
b2 /\ b1 is non empty finite Tree-like set & b1 /\ b2 is non empty finite Tree-like set;
:: TREES_1:funcnot 2 => TREES_1:func 2
definition
let a1 be Element of NAT;
func elementary_tree A1 -> non empty finite Tree-like set equals
{<*b1*> where b1 is Element of NAT: b1 < a1} \/ {{}};
end;
:: TREES_1:def 7
theorem
for b1 being Element of NAT holds
elementary_tree b1 = {<*b2*> where b2 is Element of NAT: b2 < b1} \/ {{}};
:: TREES_1:th 55
theorem
for b1, b2 being Element of NAT
st b1 < b2
holds <*b1*> in elementary_tree b2;
:: TREES_1:th 56
theorem
elementary_tree 0 = {{}};
:: TREES_1:th 57
theorem
for b1 being Element of NAT
for b2 being FinSequence of NAT
st b2 in elementary_tree b1 & b2 <> {}
holds ex b3 being Element of NAT st
b3 < b1 & b2 = <*b3*>;
:: TREES_1:funcnot 3 => TREES_1:func 3
definition
let a1 be non empty Tree-like set;
func Leaves A1 -> Element of bool a1 means
for b1 being FinSequence of NAT holds
b1 in it
iff
b1 in a1 &
(for b2 being FinSequence of NAT
st b2 in a1
holds not b1 c< b2);
end;
:: TREES_1:def 8
theorem
for b1 being non empty Tree-like set
for b2 being Element of bool b1 holds
b2 = Leaves b1
iff
for b3 being FinSequence of NAT holds
b3 in b2
iff
b3 in b1 &
(for b4 being FinSequence of NAT
st b4 in b1
holds not b3 c< b4);
:: TREES_1:funcnot 4 => TREES_1:func 4
definition
let a1 be non empty Tree-like set;
let a2 be FinSequence of NAT;
assume a2 in a1;
func A1 | A2 -> non empty Tree-like set means
for b1 being FinSequence of NAT holds
b1 in it
iff
a2 ^ b1 in a1;
end;
:: TREES_1:def 9
theorem
for b1 being non empty Tree-like set
for b2 being FinSequence of NAT
st b2 in b1
for b3 being non empty Tree-like set holds
b3 = b1 | b2
iff
for b4 being FinSequence of NAT holds
b4 in b3
iff
b2 ^ b4 in b1;
:: TREES_1:th 60
theorem
for b1 being non empty Tree-like set holds
b1 | <*> NAT = b1;
:: TREES_1:funcreg 1
registration
let a1 be non empty finite Tree-like set;
let a2 be Element of a1;
cluster a1 | a2 -> non empty finite Tree-like;
end;
:: TREES_1:modenot 3 => TREES_1:mode 2
definition
let a1 be non empty Tree-like set;
assume Leaves a1 <> {};
mode Leaf of A1 -> Element of a1 means
it in Leaves a1;
end;
:: TREES_1:dfs 7
definiens
let a1 be non empty Tree-like set;
let a2 be Element of a1;
To prove
a2 is Leaf of a1
it is sufficient to prove
thus Leaves a1 <> {};
thus a2 in Leaves a1;
:: TREES_1:def 10
theorem
for b1 being non empty Tree-like set
st Leaves b1 <> {}
for b2 being Element of b1 holds
b2 is Leaf of b1
iff
b2 in Leaves b1;
:: TREES_1:modenot 4 => TREES_1:mode 3
definition
let a1 be non empty Tree-like set;
mode Subtree of A1 -> non empty Tree-like set means
ex b1 being Element of a1 st
it = a1 | b1;
end;
:: TREES_1:dfs 8
definiens
let a1, a2 be non empty Tree-like set;
To prove
a2 is Subtree of a1
it is sufficient to prove
thus ex b1 being Element of a1 st
a2 = a1 | b1;
:: TREES_1:def 11
theorem
for b1, b2 being non empty Tree-like set holds
b2 is Subtree of b1
iff
ex b3 being Element of b1 st
b2 = b1 | b3;
:: TREES_1:funcnot 5 => TREES_1:func 5
definition
let a1 be non empty Tree-like set;
let a2 be FinSequence of NAT;
let a3 be non empty Tree-like set;
assume a2 in a1;
func A1 with-replacement(A2,A3) -> non empty Tree-like set means
for b1 being FinSequence of NAT holds
b1 in it
iff
((b1 in a1 implies a2 c< b1) implies ex b2 being FinSequence of NAT st
b2 in a3 & b1 = a2 ^ b2);
end;
:: TREES_1:def 12
theorem
for b1 being non empty Tree-like set
for b2 being FinSequence of NAT
for b3 being non empty Tree-like set
st b2 in b1
for b4 being non empty Tree-like set holds
b4 = b1 with-replacement(b2,b3)
iff
for b5 being FinSequence of NAT holds
b5 in b4
iff
((b5 in b1 implies b2 c< b5) implies ex b6 being FinSequence of NAT st
b6 in b3 & b5 = b2 ^ b6);
:: TREES_1:th 64
theorem
for b1 being FinSequence of NAT
for b2, b3 being non empty Tree-like set
st b1 in b2
holds b2 with-replacement(b1,b3) = {b4 where b4 is Element of b2: not b1 c< b4} \/ {b1 ^ b4 where b4 is Element of b3: b4 = b4};
:: TREES_1:th 66
theorem
for b1 being FinSequence of NAT
for b2, b3 being non empty Tree-like set
st b1 in b2
holds b3 = (b2 with-replacement(b1,b3)) | b1;
:: TREES_1:funcreg 2
registration
let a1 be non empty finite Tree-like set;
let a2 be Element of a1;
let a3 be non empty finite Tree-like set;
cluster a1 with-replacement(a2,a3) -> non empty finite Tree-like;
end;
:: TREES_1:th 67
theorem
for b1 being Relation-like Function-like FinSequence-like set holds
ProperPrefixes b1,dom b1 are_equipotent;
:: TREES_1:funcreg 3
registration
let a1 be Relation-like Function-like FinSequence-like set;
cluster ProperPrefixes a1 -> finite;
end;
:: TREES_1:th 68
theorem
for b1 being Relation-like Function-like FinSequence-like set holds
card ProperPrefixes b1 = len b1;
:: TREES_1:attrnot 2 => TREES_1:attr 2
definition
let a1 be set;
attr a1 is AntiChain_of_Prefixes-like means
(for b1 being set
st b1 in a1
holds b1 is Relation-like Function-like FinSequence-like set) &
(for b1, b2 being Relation-like Function-like FinSequence-like set
st b1 in a1 & b2 in a1 & b1 <> b2
holds not b1,b2 are_c=-comparable);
end;
:: TREES_1:dfs 10
definiens
let a1 be set;
To prove
a1 is AntiChain_of_Prefixes-like
it is sufficient to prove
thus (for b1 being set
st b1 in a1
holds b1 is Relation-like Function-like FinSequence-like set) &
(for b1, b2 being Relation-like Function-like FinSequence-like set
st b1 in a1 & b2 in a1 & b1 <> b2
holds not b1,b2 are_c=-comparable);
:: TREES_1:def 13
theorem
for b1 being set holds
b1 is AntiChain_of_Prefixes-like
iff
(for b2 being set
st b2 in b1
holds b2 is Relation-like Function-like FinSequence-like set) &
(for b2, b3 being Relation-like Function-like FinSequence-like set
st b2 in b1 & b3 in b1 & b2 <> b3
holds not b2,b3 are_c=-comparable);
:: TREES_1:exreg 3
registration
cluster AntiChain_of_Prefixes-like set;
end;
:: TREES_1:modenot 5
definition
mode AntiChain_of_Prefixes is AntiChain_of_Prefixes-like set;
end;
:: TREES_1:th 70
theorem
for b1 being Relation-like Function-like FinSequence-like set holds
{b1} is AntiChain_of_Prefixes-like;
:: TREES_1:th 71
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set
st not b1,b2 are_c=-comparable
holds {b1,b2} is AntiChain_of_Prefixes-like;
:: TREES_1:modenot 6 => TREES_1:mode 4
definition
let a1 be non empty Tree-like set;
mode AntiChain_of_Prefixes of A1 -> AntiChain_of_Prefixes-like set means
it c= a1;
end;
:: TREES_1:dfs 11
definiens
let a1 be non empty Tree-like set;
let a2 be AntiChain_of_Prefixes-like set;
To prove
a2 is AntiChain_of_Prefixes of a1
it is sufficient to prove
thus a2 c= a1;
:: TREES_1:def 14
theorem
for b1 being non empty Tree-like set
for b2 being AntiChain_of_Prefixes-like set holds
b2 is AntiChain_of_Prefixes of b1
iff
b2 c= b1;
:: TREES_1:th 73
theorem
for b1 being non empty Tree-like set holds
{} is AntiChain_of_Prefixes of b1 & {{}} is AntiChain_of_Prefixes of b1;
:: TREES_1:th 74
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1 holds
{b2} is AntiChain_of_Prefixes of b1;
:: TREES_1:th 75
theorem
for b1 being non empty Tree-like set
for b2, b3 being Element of b1
st not b2,b3 are_c=-comparable
holds {b2,b3} is AntiChain_of_Prefixes of b1;
:: TREES_1:condreg 1
registration
let a1 be non empty finite Tree-like set;
cluster -> finite (AntiChain_of_Prefixes of a1);
end;
:: TREES_1:funcnot 6 => TREES_1:func 6
definition
let a1 be non empty finite Tree-like set;
func height A1 -> Element of NAT means
(ex b1 being FinSequence of NAT st
b1 in a1 & len b1 = it) &
(for b1 being FinSequence of NAT
st b1 in a1
holds len b1 <= it);
end;
:: TREES_1:def 15
theorem
for b1 being non empty finite Tree-like set
for b2 being Element of NAT holds
b2 = height b1
iff
(ex b3 being FinSequence of NAT st
b3 in b1 & len b3 = b2) &
(for b3 being FinSequence of NAT
st b3 in b1
holds len b3 <= b2);
:: TREES_1:funcnot 7 => TREES_1:func 7
definition
let a1 be non empty finite Tree-like set;
func width A1 -> Element of NAT means
ex b1 being AntiChain_of_Prefixes of a1 st
it = card b1 &
(for b2 being AntiChain_of_Prefixes of a1 holds
card b2 <= card b1);
end;
:: TREES_1:def 16
theorem
for b1 being non empty finite Tree-like set
for b2 being Element of NAT holds
b2 = width b1
iff
ex b3 being AntiChain_of_Prefixes of b1 st
b2 = card b3 &
(for b4 being AntiChain_of_Prefixes of b1 holds
card b4 <= card b3);
:: TREES_1:th 78
theorem
for b1 being non empty finite Tree-like set holds
1 <= width b1;
:: TREES_1:th 79
theorem
height elementary_tree 0 = 0;
:: TREES_1:th 80
theorem
for b1 being non empty finite Tree-like set
st height b1 = 0
holds b1 = elementary_tree 0;
:: TREES_1:th 81
theorem
for b1 being Element of NAT holds
height elementary_tree (b1 + 1) = 1;
:: TREES_1:th 82
theorem
width elementary_tree 0 = 1;
:: TREES_1:th 83
theorem
for b1 being Element of NAT holds
width elementary_tree (b1 + 1) = b1 + 1;
:: TREES_1:th 84
theorem
for b1 being non empty finite Tree-like set
for b2 being Element of b1 holds
height (b1 | b2) <= height b1;
:: TREES_1:th 85
theorem
for b1 being non empty finite Tree-like set
for b2 being Element of b1
st b2 <> {}
holds height (b1 | b2) < height b1;
:: TREES_1:sch 1
scheme TREES_1:sch 1
for b1 being non empty finite Tree-like set holds
P1[b1]
provided
for b1 being non empty finite Tree-like set
st for b2 being Element of NAT
st <*b2*> in b1
holds P1[b1 | <*b2*>]
holds P1[b1];
:: TREES_1:th 86
theorem
for b1, b2, b3 being Relation-like Function-like FinSequence-like set
st b1 ^ b2 c< b1 ^ b3
holds b2 c< b3;
:: TREES_1:th 87
theorem
for b1, b2 being Element of NAT
for b3 being Relation-like Function-like FinSequence-like set
st b1 <> b2
holds not <*b1*> c= <*b2*> ^ b3;
:: TREES_1:th 88
theorem
elementary_tree 1 = {{},<*0*>};
:: TREES_1:th 89
theorem
for b1, b2 being Element of NAT holds
not <*b1*> c< <*b2*>;
:: TREES_1:th 90
theorem
elementary_tree 2 = {{},<*0*>,<*1*>};
:: TREES_1:th 91
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1 holds
b2 in Leaves b1
iff
not b2 ^ <*0*> in b1;
:: TREES_1:th 92
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1 holds
b2 in Leaves b1
iff
for b3 being Element of NAT holds
not b2 ^ <*b3*> in b1;