Article TREES_3, MML version 4.99.1005

:: TREES_3:funcnot 1 => TREES_3:func 1
definition
  func Trees -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 is non empty Tree-like set;
end;

:: TREES_3:def 1
theorem
for b1 being set holds
      b1 = Trees
   iff
      for b2 being set holds
            b2 in b1
         iff
            b2 is non empty Tree-like set;

:: TREES_3:funcreg 1
registration
  cluster Trees -> non empty;
end;

:: TREES_3:funcnot 2 => TREES_3:func 2
definition
  func FinTrees -> Element of bool Trees means
    for b1 being set holds
          b1 in it
       iff
          b1 is non empty finite Tree-like set;
end;

:: TREES_3:def 2
theorem
for b1 being Element of bool Trees holds
      b1 = FinTrees
   iff
      for b2 being set holds
            b2 in b1
         iff
            b2 is non empty finite Tree-like set;

:: TREES_3:funcreg 2
registration
  cluster FinTrees -> non empty;
end;

:: TREES_3:attrnot 1 => TREES_3:attr 1
definition
  let a1 be set;
  attr a1 is constituted-Trees means
    for b1 being set
          st b1 in a1
       holds b1 is non empty Tree-like set;
end;

:: TREES_3:dfs 3
definiens
  let a1 be set;
To prove
     a1 is constituted-Trees
it is sufficient to prove
  thus for b1 being set
          st b1 in a1
       holds b1 is non empty Tree-like set;

:: TREES_3:def 3
theorem
for b1 being set holds
      b1 is constituted-Trees
   iff
      for b2 being set
            st b2 in b1
         holds b2 is non empty Tree-like set;

:: TREES_3:attrnot 2 => TREES_3:attr 2
definition
  let a1 be set;
  attr a1 is constituted-FinTrees means
    for b1 being set
          st b1 in a1
       holds b1 is non empty finite Tree-like set;
end;

:: TREES_3:dfs 4
definiens
  let a1 be set;
To prove
     a1 is constituted-FinTrees
it is sufficient to prove
  thus for b1 being set
          st b1 in a1
       holds b1 is non empty finite Tree-like set;

:: TREES_3:def 4
theorem
for b1 being set holds
      b1 is constituted-FinTrees
   iff
      for b2 being set
            st b2 in b1
         holds b2 is non empty finite Tree-like set;

:: TREES_3:attrnot 3 => TREES_3:attr 3
definition
  let a1 be set;
  attr a1 is constituted-DTrees means
    for b1 being set
          st b1 in a1
       holds b1 is Relation-like Function-like DecoratedTree-like set;
end;

:: TREES_3:dfs 5
definiens
  let a1 be set;
To prove
     a1 is constituted-DTrees
it is sufficient to prove
  thus for b1 being set
          st b1 in a1
       holds b1 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:def 5
theorem
for b1 being set holds
      b1 is constituted-DTrees
   iff
      for b2 being set
            st b2 in b1
         holds b2 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:th 1
theorem
for b1 being set holds
      b1 is constituted-Trees
   iff
      b1 c= Trees;

:: TREES_3:th 2
theorem
for b1 being set holds
      b1 is constituted-FinTrees
   iff
      b1 c= FinTrees;

:: TREES_3:th 3
theorem
for b1, b2 being set holds
   b1 is constituted-Trees & b2 is constituted-Trees
iff
   b1 \/ b2 is constituted-Trees;

:: TREES_3:th 4
theorem
for b1, b2 being set
      st b1 is constituted-Trees & b2 is constituted-Trees
   holds b1 \+\ b2 is constituted-Trees;

:: TREES_3:th 5
theorem
for b1, b2 being set
      st b1 is constituted-Trees
   holds b1 /\ b2 is constituted-Trees & b2 /\ b1 is constituted-Trees & b1 \ b2 is constituted-Trees;

:: TREES_3:th 6
theorem
for b1, b2 being set holds
   b1 is constituted-FinTrees & b2 is constituted-FinTrees
iff
   b1 \/ b2 is constituted-FinTrees;

:: TREES_3:th 7
theorem
for b1, b2 being set
      st b1 is constituted-FinTrees & b2 is constituted-FinTrees
   holds b1 \+\ b2 is constituted-FinTrees;

:: TREES_3:th 8
theorem
for b1, b2 being set
      st b1 is constituted-FinTrees
   holds b1 /\ b2 is constituted-FinTrees & b2 /\ b1 is constituted-FinTrees & b1 \ b2 is constituted-FinTrees;

:: TREES_3:th 9
theorem
for b1, b2 being set holds
   b1 is constituted-DTrees & b2 is constituted-DTrees
iff
   b1 \/ b2 is constituted-DTrees;

:: TREES_3:th 10
theorem
for b1, b2 being set
      st b1 is constituted-DTrees & b2 is constituted-DTrees
   holds b1 \+\ b2 is constituted-DTrees;

:: TREES_3:th 11
theorem
for b1, b2 being set
      st b1 is constituted-DTrees
   holds b1 /\ b2 is constituted-DTrees & b2 /\ b1 is constituted-DTrees & b1 \ b2 is constituted-DTrees;

:: TREES_3:th 12
theorem
{} is constituted-Trees & {} is constituted-FinTrees & {} is constituted-DTrees;

:: TREES_3:th 13
theorem
for b1 being set holds
      {b1} is constituted-Trees
   iff
      b1 is non empty Tree-like set;

:: TREES_3:th 14
theorem
for b1 being set holds
      {b1} is constituted-FinTrees
   iff
      b1 is non empty finite Tree-like set;

:: TREES_3:th 15
theorem
for b1 being set holds
      {b1} is constituted-DTrees
   iff
      b1 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:th 16
theorem
for b1, b2 being set holds
   {b1,b2} is constituted-Trees
iff
   b1 is non empty Tree-like set & b2 is non empty Tree-like set;

:: TREES_3:th 17
theorem
for b1, b2 being set holds
   {b1,b2} is constituted-FinTrees
iff
   b1 is non empty finite Tree-like set & b2 is non empty finite Tree-like set;

:: TREES_3:th 18
theorem
for b1, b2 being set holds
   {b1,b2} is constituted-DTrees
iff
   b1 is Relation-like Function-like DecoratedTree-like set & b2 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:th 19
theorem
for b1, b2 being set
      st b1 is constituted-Trees & b2 c= b1
   holds b2 is constituted-Trees;

:: TREES_3:th 20
theorem
for b1, b2 being set
      st b1 is constituted-FinTrees & b2 c= b1
   holds b2 is constituted-FinTrees;

:: TREES_3:th 21
theorem
for b1, b2 being set
      st b1 is constituted-DTrees & b2 c= b1
   holds b2 is constituted-DTrees;

:: TREES_3:exreg 1
registration
  cluster non empty finite constituted-Trees constituted-FinTrees set;
end;

:: TREES_3:exreg 2
registration
  cluster non empty finite constituted-DTrees set;
end;

:: TREES_3:condreg 1
registration
  cluster constituted-FinTrees -> constituted-Trees (set);
end;

:: TREES_3:condreg 2
registration
  let a1 be constituted-Trees set;
  cluster -> constituted-Trees (Element of bool a1);
end;

:: TREES_3:condreg 3
registration
  let a1 be constituted-FinTrees set;
  cluster -> constituted-FinTrees (Element of bool a1);
end;

:: TREES_3:condreg 4
registration
  let a1 be constituted-DTrees set;
  cluster -> constituted-DTrees (Element of bool a1);
end;

:: TREES_3:modenot 1 => TREES_3:mode 1
definition
  let a1 be non empty constituted-Trees set;
  redefine mode Element of a1 -> non empty Tree-like set;
end;

:: TREES_3:modenot 2 => TREES_3:mode 2
definition
  let a1 be non empty constituted-FinTrees set;
  redefine mode Element of a1 -> non empty finite Tree-like set;
end;

:: TREES_3:modenot 3 => TREES_3:mode 3
definition
  let a1 be non empty constituted-DTrees set;
  redefine mode Element of a1 -> Relation-like Function-like DecoratedTree-like set;
end;

:: TREES_3:funcreg 3
registration
  cluster Trees -> constituted-Trees;
end;

:: TREES_3:exreg 3
registration
  cluster non empty constituted-Trees constituted-FinTrees Element of bool Trees;
end;

:: TREES_3:funcreg 4
registration
  cluster FinTrees -> constituted-FinTrees;
end;

:: TREES_3:modenot 4 => TREES_3:mode 4
definition
  let a1 be non empty set;
  mode DTree-set of A1 means
    for b1 being set
          st b1 in it
       holds b1 is Function-like DecoratedTree-like ParametrizedSubset of a1;
end;

:: TREES_3:dfs 6
definiens
  let a1 be non empty set;
  let a2 be set;
To prove
     a2 is DTree-set of a1
it is sufficient to prove
  thus for b1 being set
          st b1 in a2
       holds b1 is Function-like DecoratedTree-like ParametrizedSubset of a1;

:: TREES_3:def 6
theorem
for b1 being non empty set
for b2 being set holds
      b2 is DTree-set of b1
   iff
      for b3 being set
            st b3 in b2
         holds b3 is Function-like DecoratedTree-like ParametrizedSubset of b1;

:: TREES_3:condreg 5
registration
  let a1 be non empty set;
  cluster -> constituted-DTrees (DTree-set of a1);
end;

:: TREES_3:exreg 4
registration
  let a1 be non empty set;
  cluster non empty finite constituted-DTrees DTree-set of a1;
end;

:: TREES_3:modenot 5 => TREES_3:mode 5
definition
  let a1 be non empty set;
  let a2 be non empty DTree-set of a1;
  redefine mode Element of a2 -> Function-like DecoratedTree-like ParametrizedSubset of a1;
end;

:: TREES_3:funcnot 3 => TREES_3:func 3
definition
  let a1 be non empty Tree-like set;
  let a2 be non empty set;
  redefine func Funcs(a1,a2) -> non empty DTree-set of a2;
end;

:: TREES_3:modenot 6 => TREES_3:mode 6
definition
  let a1 be non empty Tree-like set;
  let a2 be non empty set;
  redefine mode Relation of a1,a2 -> ParametrizedSubset of a2;
end;

:: TREES_3:condreg 6
registration
  let a1 be non empty Tree-like set;
  let a2 be non empty set;
  cluster Function-like quasi_total -> DecoratedTree-like (Relation of a1,a2);
end;

:: TREES_3:funcnot 4 => TREES_3:func 4
definition
  let a1 be non empty set;
  func Trees A1 -> DTree-set of a1 means
    for b1 being Function-like DecoratedTree-like ParametrizedSubset of a1 holds
       b1 in it;
end;

:: TREES_3:def 7
theorem
for b1 being non empty set
for b2 being DTree-set of b1 holds
      b2 = Trees b1
   iff
      for b3 being Function-like DecoratedTree-like ParametrizedSubset of b1 holds
         b3 in b2;

:: TREES_3:funcreg 5
registration
  let a1 be non empty set;
  cluster Trees a1 -> non empty;
end;

:: TREES_3:funcnot 5 => TREES_3:func 5
definition
  let a1 be non empty set;
  func FinTrees A1 -> DTree-set of a1 means
    for b1 being Function-like DecoratedTree-like ParametrizedSubset of a1 holds
          proj1 b1 is finite
       iff
          b1 in it;
end;

:: TREES_3:def 8
theorem
for b1 being non empty set
for b2 being DTree-set of b1 holds
      b2 = FinTrees b1
   iff
      for b3 being Function-like DecoratedTree-like ParametrizedSubset of b1 holds
            proj1 b3 is finite
         iff
            b3 in b2;

:: TREES_3:funcreg 6
registration
  let a1 be non empty set;
  cluster FinTrees a1 -> non empty;
end;

:: TREES_3:th 22
theorem
for b1 being non empty set holds
   FinTrees b1 c= Trees b1;

:: TREES_3:attrnot 4 => TREES_3:attr 4
definition
  let a1 be Relation-like Function-like set;
  attr a1 is Tree-yielding means
    proj2 a1 is constituted-Trees;
end;

:: TREES_3:dfs 9
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is Tree-yielding
it is sufficient to prove
  thus proj2 a1 is constituted-Trees;

:: TREES_3:def 9
theorem
for b1 being Relation-like Function-like set holds
      b1 is Tree-yielding
   iff
      proj2 b1 is constituted-Trees;

:: TREES_3:attrnot 5 => TREES_3:attr 5
definition
  let a1 be Relation-like Function-like set;
  attr a1 is FinTree-yielding means
    proj2 a1 is constituted-FinTrees;
end;

:: TREES_3:dfs 10
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is FinTree-yielding
it is sufficient to prove
  thus proj2 a1 is constituted-FinTrees;

:: TREES_3:def 10
theorem
for b1 being Relation-like Function-like set holds
      b1 is FinTree-yielding
   iff
      proj2 b1 is constituted-FinTrees;

:: TREES_3:attrnot 6 => TREES_3:attr 6
definition
  let a1 be Relation-like Function-like set;
  attr a1 is DTree-yielding means
    proj2 a1 is constituted-DTrees;
end;

:: TREES_3:dfs 11
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is DTree-yielding
it is sufficient to prove
  thus proj2 a1 is constituted-DTrees;

:: TREES_3:def 11
theorem
for b1 being Relation-like Function-like set holds
      b1 is DTree-yielding
   iff
      proj2 b1 is constituted-DTrees;

:: TREES_3:th 23
theorem
{} is Tree-yielding & {} is FinTree-yielding & {} is DTree-yielding;

:: TREES_3:th 24
theorem
for b1 being Relation-like Function-like set holds
      b1 is Tree-yielding
   iff
      for b2 being set
            st b2 in proj1 b1
         holds b1 . b2 is non empty Tree-like set;

:: TREES_3:th 25
theorem
for b1 being Relation-like Function-like set holds
      b1 is FinTree-yielding
   iff
      for b2 being set
            st b2 in proj1 b1
         holds b1 . b2 is non empty finite Tree-like set;

:: TREES_3:th 26
theorem
for b1 being Relation-like Function-like set holds
      b1 is DTree-yielding
   iff
      for b2 being set
            st b2 in proj1 b1
         holds b1 . b2 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:th 27
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set holds
   b1 is Tree-yielding & b2 is Tree-yielding
iff
   b1 ^ b2 is Tree-yielding;

:: TREES_3:th 28
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set holds
   b1 is FinTree-yielding & b2 is FinTree-yielding
iff
   b1 ^ b2 is FinTree-yielding;

:: TREES_3:th 29
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set holds
   b1 is DTree-yielding & b2 is DTree-yielding
iff
   b1 ^ b2 is DTree-yielding;

:: TREES_3:th 30
theorem
for b1 being set holds
      <*b1*> is Tree-yielding
   iff
      b1 is non empty Tree-like set;

:: TREES_3:th 31
theorem
for b1 being set holds
      <*b1*> is FinTree-yielding
   iff
      b1 is non empty finite Tree-like set;

:: TREES_3:th 32
theorem
for b1 being set holds
      <*b1*> is DTree-yielding
   iff
      b1 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:th 33
theorem
for b1, b2 being set holds
   <*b1,b2*> is Tree-yielding
iff
   b1 is non empty Tree-like set & b2 is non empty Tree-like set;

:: TREES_3:th 34
theorem
for b1, b2 being set holds
   <*b1,b2*> is FinTree-yielding
iff
   b1 is non empty finite Tree-like set & b2 is non empty finite Tree-like set;

:: TREES_3:th 35
theorem
for b1, b2 being set holds
   <*b1,b2*> is DTree-yielding
iff
   b1 is Relation-like Function-like DecoratedTree-like set & b2 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:th 36
theorem
for b1 being set
for b2 being Element of NAT
      st b2 <> 0
   holds    b2 |-> b1 is Tree-yielding
   iff
      b1 is non empty Tree-like set;

:: TREES_3:th 37
theorem
for b1 being set
for b2 being Element of NAT
      st b2 <> 0
   holds    b2 |-> b1 is FinTree-yielding
   iff
      b1 is non empty finite Tree-like set;

:: TREES_3:th 38
theorem
for b1 being set
for b2 being Element of NAT
      st b2 <> 0
   holds    b2 |-> b1 is DTree-yielding
   iff
      b1 is Relation-like Function-like DecoratedTree-like set;

:: TREES_3:exreg 5
registration
  cluster Relation-like Function-like non empty finite FinSequence-like Tree-yielding FinTree-yielding set;
end;

:: TREES_3:exreg 6
registration
  cluster Relation-like Function-like non empty finite FinSequence-like DTree-yielding set;
end;

:: TREES_3:exreg 7
registration
  cluster Relation-like Function-like non empty Tree-yielding FinTree-yielding set;
end;

:: TREES_3:exreg 8
registration
  cluster Relation-like Function-like non empty DTree-yielding set;
end;

:: TREES_3:condreg 7
registration
  cluster Relation-like Function-like FinTree-yielding -> Tree-yielding (set);
end;

:: TREES_3:condreg 8
registration
  let a1 be non empty constituted-Trees set;
  cluster -> Tree-yielding (FinSequence of a1);
end;

:: TREES_3:funcreg 7
registration
  let a1, a2 be Relation-like Function-like FinSequence-like Tree-yielding set;
  cluster a1 ^ a2 -> Relation-like Function-like FinSequence-like Tree-yielding;
end;

:: TREES_3:condreg 9
registration
  let a1 be non empty constituted-FinTrees set;
  cluster -> FinTree-yielding (FinSequence of a1);
end;

:: TREES_3:funcreg 8
registration
  let a1, a2 be Relation-like Function-like FinSequence-like FinTree-yielding set;
  cluster a1 ^ a2 -> Relation-like Function-like FinSequence-like FinTree-yielding;
end;

:: TREES_3:condreg 10
registration
  let a1 be non empty constituted-DTrees set;
  cluster -> DTree-yielding (FinSequence of a1);
end;

:: TREES_3:funcreg 9
registration
  let a1, a2 be Relation-like Function-like FinSequence-like DTree-yielding set;
  cluster a1 ^ a2 -> Relation-like Function-like FinSequence-like DTree-yielding;
end;

:: TREES_3:funcreg 10
registration
  let a1 be non empty Tree-like set;
  cluster <*a1*> -> non empty Tree-yielding;
end;

:: TREES_3:funcreg 11
registration
  let a1, a2 be non empty Tree-like set;
  cluster <*a1,a2*> -> non empty Tree-yielding;
end;

:: TREES_3:funcreg 12
registration
  let a1 be Element of NAT;
  let a2 be non empty Tree-like set;
  cluster a1 |-> a2 -> Relation-like Function-like FinSequence-like Tree-yielding;
end;

:: TREES_3:funcreg 13
registration
  let a1 be non empty finite Tree-like set;
  cluster <*a1*> -> FinTree-yielding;
end;

:: TREES_3:funcreg 14
registration
  let a1, a2 be non empty finite Tree-like set;
  cluster <*a1,a2*> -> FinTree-yielding;
end;

:: TREES_3:funcreg 15
registration
  let a1 be Element of NAT;
  let a2 be non empty finite Tree-like set;
  cluster a1 |-> a2 -> Relation-like Function-like FinSequence-like FinTree-yielding;
end;

:: TREES_3:funcreg 16
registration
  let a1 be Relation-like Function-like DecoratedTree-like set;
  cluster <*a1*> -> non empty DTree-yielding;
end;

:: TREES_3:funcreg 17
registration
  let a1, a2 be Relation-like Function-like DecoratedTree-like set;
  cluster <*a1,a2*> -> non empty DTree-yielding;
end;

:: TREES_3:funcreg 18
registration
  let a1 be Element of NAT;
  let a2 be Relation-like Function-like DecoratedTree-like set;
  cluster a1 |-> a2 -> Relation-like Function-like FinSequence-like DTree-yielding;
end;

:: TREES_3:th 39
theorem
for b1 being Relation-like Function-like DTree-yielding set holds
   proj1 doms b1 = proj1 b1 & doms b1 is Tree-yielding;

:: TREES_3:funcreg 19
registration
  let a1 be Relation-like Function-like FinSequence-like DTree-yielding set;
  cluster doms a1 -> Relation-like Function-like FinSequence-like Tree-yielding;
end;

:: TREES_3:th 40
theorem
for b1 being Relation-like Function-like FinSequence-like DTree-yielding set holds
   len doms b1 = len b1;

:: TREES_3:modenot 7
definition
  let a1, a2 be non empty set;
  mode DecoratedTree of a1,a2 is Function-like DecoratedTree-like ParametrizedSubset of [:a1,a2:];
end;

:: TREES_3:modenot 8
definition
  let a1, a2 be non empty set;
  mode DTree-set of a1,a2 is DTree-set of [:a1,a2:];
end;

:: TREES_3:funcreg 20
registration
  let a1, a2 be Relation-like Function-like DecoratedTree-like set;
  cluster <:a1,a2:> -> Relation-like Function-like DecoratedTree-like;
end;

:: TREES_3:funcnot 6 => TREES_3:func 6
definition
  let a1, a2 be non empty set;
  let a3 be Function-like DecoratedTree-like ParametrizedSubset of a1;
  let a4 be Function-like DecoratedTree-like ParametrizedSubset of a2;
  redefine func <:a3, a4:> -> Function-like DecoratedTree-like ParametrizedSubset of [:a1,a2:];
end;

:: TREES_3:funcnot 7 => TREES_3:func 7
definition
  let a1, a2 be non empty set;
  let a3 be Function-like DecoratedTree-like ParametrizedSubset of a1;
  let a4 be Function-like quasi_total Relation of a1,a2;
  redefine func a4 * a3 -> Function-like DecoratedTree-like ParametrizedSubset of a2;
end;

:: TREES_3:funcnot 8 => TREES_3:func 8
definition
  let a1, a2 be non empty set;
  redefine func pr1(a1,a2) -> Function-like quasi_total Relation of [:a1,a2:],a1;
end;

:: TREES_3:funcnot 9 => TREES_3:func 9
definition
  let a1, a2 be non empty set;
  redefine func pr2(a1,a2) -> Function-like quasi_total Relation of [:a1,a2:],a2;
end;

:: TREES_3:funcnot 10 => TREES_3:func 10
definition
  let a1, a2 be non empty set;
  let a3 be Function-like DecoratedTree-like ParametrizedSubset of [:a1,a2:];
  func A3 `1 -> Function-like DecoratedTree-like ParametrizedSubset of a1 equals
    (pr1(a1,a2)) * a3;
end;

:: TREES_3:def 12
theorem
for b1, b2 being non empty set
for b3 being Function-like DecoratedTree-like ParametrizedSubset of [:b1,b2:] holds
   b3 `1 = (pr1(b1,b2)) * b3;

:: TREES_3:funcnot 11 => TREES_3:func 11
definition
  let a1, a2 be non empty set;
  let a3 be Function-like DecoratedTree-like ParametrizedSubset of [:a1,a2:];
  func A3 `2 -> Function-like DecoratedTree-like ParametrizedSubset of a2 equals
    (pr2(a1,a2)) * a3;
end;

:: TREES_3:def 13
theorem
for b1, b2 being non empty set
for b3 being Function-like DecoratedTree-like ParametrizedSubset of [:b1,b2:] holds
   b3 `2 = (pr2(b1,b2)) * b3;

:: TREES_3:th 41
theorem
for b1, b2 being non empty set
for b3 being Function-like DecoratedTree-like ParametrizedSubset of [:b1,b2:]
for b4 being Element of proj1 b3 holds
   (b3 . b4) `1 = b3 `1 . b4 & b3 `2 . b4 = (b3 . b4) `2;

:: TREES_3:th 42
theorem
for b1, b2 being non empty set
for b3 being Function-like DecoratedTree-like ParametrizedSubset of [:b1,b2:] holds
   <:b3 `1,b3 `2:> = b3;

:: TREES_3:funcreg 21
registration
  let a1 be non empty finite Tree-like set;
  cluster Leaves a1 -> non empty finite;
end;

:: TREES_3:modenot 9 => TREES_3:mode 7
definition
  let a1 be non empty Tree-like set;
  let a2 be non empty Element of bool a1;
  redefine mode Element of a2 -> Element of a1;
end;

:: TREES_3:modenot 10 => TREES_3:mode 8
definition
  let a1 be non empty finite Tree-like set;
  redefine mode Leaf of a1 -> Element of Leaves a1;
end;

:: TREES_3:modenot 11 => TREES_3:mode 9
definition
  let a1 be non empty finite Tree-like set;
  mode T-Substitution of A1 -> non empty Tree-like set means
    for b1 being Element of it
          st not b1 in a1
       holds ex b2 being Leaf of a1 st
          b2 c< b1;
end;

:: TREES_3:dfs 14
definiens
  let a1 be non empty finite Tree-like set;
  let a2 be non empty Tree-like set;
To prove
     a2 is T-Substitution of a1
it is sufficient to prove
  thus for b1 being Element of a2
          st not b1 in a1
       holds ex b2 being Leaf of a1 st
          b2 c< b1;

:: TREES_3:def 14
theorem
for b1 being non empty finite Tree-like set
for b2 being non empty Tree-like set holds
      b2 is T-Substitution of b1
   iff
      for b3 being Element of b2
            st not b3 in b1
         holds ex b4 being Leaf of b1 st
            b4 c< b3;

:: TREES_3:funcnot 12 => TREES_3:func 12
definition
  let a1 be non empty finite Tree-like set;
  let a2 be Leaf of a1;
  let a3 be non empty Tree-like set;
  redefine func a1 with-replacement(a2,a3) -> T-Substitution of a1;
end;

:: TREES_3:exreg 9
registration
  let a1 be non empty finite Tree-like set;
  cluster non empty finite Tree-like T-Substitution of a1;
end;

:: TREES_3:modenot 12
definition
  let a1 be Element of NAT;
  mode T-Substitution of a1 is T-Substitution of elementary_tree a1;
end;

:: TREES_3:th 43
theorem
for b1 being non empty Tree-like set holds
   b1 is T-Substitution of elementary_tree 0;

:: TREES_3:th 44
theorem
for b1, b2 being non empty Tree-like set
      st b1 -level 1 c= b2 -level 1 &
         (for b3 being Element of NAT
               st <*b3*> in b1
            holds b1 | <*b3*> = b2 | <*b3*>)
   holds b1 c= b2;

:: TREES_3:th 46
theorem
for b1, b2 being non empty Tree-like set
for b3 being FinSequence of NAT
      st b3 in Leaves b1
   holds b1 c= b1 with-replacement(b3,b2);

:: TREES_3:th 47
theorem
for b1, b2 being Relation-like Function-like DecoratedTree-like set
for b3 being Element of proj1 b1 holds
   (b1 with-replacement(b3,b2)) . b3 = b2 . {};

:: TREES_3:th 48
theorem
for b1, b2 being Relation-like Function-like DecoratedTree-like set
for b3, b4 being Element of proj1 b1
      st not b3 c= b4
   holds (b1 with-replacement(b3,b2)) . b4 = b1 . b4;

:: TREES_3:th 49
theorem
for b1, b2 being Relation-like Function-like DecoratedTree-like set
for b3 being Element of proj1 b1
for b4 being Element of proj1 b2 holds
   (b1 with-replacement(b3,b2)) . (b3 ^ b4) = b2 . b4;

:: TREES_3:funcreg 22
registration
  let a1, a2 be non empty Tree-like set;
  cluster a1 \/ a2 -> non empty Tree-like;
end;

:: TREES_3:th 50
theorem
for b1, b2 being non empty Tree-like set
for b3 being Element of b1 \/ b2 holds
   (b3 in b1 & b3 in b2 implies (b1 \/ b2) | b3 = (b1 | b3) \/ (b2 | b3)) &
    (b3 in b1 or (b1 \/ b2) | b3 = b2 | b3) &
    (b3 in b2 or (b1 \/ b2) | b3 = b1 | b3);

:: TREES_3:funcnot 13 => TREES_3:func 13
definition
  let a1 be Relation-like Function-like FinSequence-like set;
  assume a1 is Tree-yielding;
  func tree A1 -> non empty Tree-like set means
    for b1 being set holds
          b1 in it
       iff
          (b1 <> {} implies ex b2 being Element of NAT st
             ex b3 being Relation-like Function-like FinSequence-like set st
                b2 < len a1 & b3 in a1 . (b2 + 1) & b1 = <*b2*> ^ b3);
end;

:: TREES_3:def 15
theorem
for b1 being Relation-like Function-like FinSequence-like set
   st b1 is Tree-yielding
for b2 being non empty Tree-like set holds
      b2 = tree b1
   iff
      for b3 being set holds
            b3 in b2
         iff
            (b3 <> {} implies ex b4 being Element of NAT st
               ex b5 being Relation-like Function-like FinSequence-like set st
                  b4 < len b1 & b5 in b1 . (b4 + 1) & b3 = <*b4*> ^ b5);

:: TREES_3:funcnot 14 => TREES_3:func 14
definition
  let a1 be non empty Tree-like set;
  func ^ A1 -> non empty Tree-like set equals
    tree <*a1*>;
end;

:: TREES_3:def 16
theorem
for b1 being non empty Tree-like set holds
   ^ b1 = tree <*b1*>;

:: TREES_3:funcnot 15 => TREES_3:func 15
definition
  let a1, a2 be non empty Tree-like set;
  func tree(A1,A2) -> non empty Tree-like set equals
    tree <*a1,a2*>;
end;

:: TREES_3:def 17
theorem
for b1, b2 being non empty Tree-like set holds
tree(b1,b2) = tree <*b1,b2*>;

:: TREES_3:th 51
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like FinSequence-like set
      st b2 is Tree-yielding
   holds    <*b1*> ^ b3 in tree b2
   iff
      b1 < len b2 & b3 in b2 . (b1 + 1);

:: TREES_3:th 52
theorem
for b1 being Relation-like Function-like FinSequence-like set
      st b1 is Tree-yielding
   holds (tree b1) -level 1 = {<*b2*> where b2 is Element of NAT: b2 < len b1} &
    (for b2 being Element of NAT
          st b2 < len b1
       holds (tree b1) | <*b2*> = b1 . (b2 + 1));

:: TREES_3:th 53
theorem
for b1, b2 being Relation-like Function-like FinSequence-like Tree-yielding set
      st tree b1 = tree b2
   holds b1 = b2;

:: TREES_3:th 54
theorem
for b1 being Relation-like Function-like FinSequence-like set
for b2, b3 being Relation-like Function-like FinSequence-like Tree-yielding set
for b4 being non empty Tree-like set holds
      b1 in b4
   iff
      <*len b2*> ^ b1 in tree ((b2 ^ <*b4*>) ^ b3);

:: TREES_3:th 55
theorem
tree {} = elementary_tree 0;

:: TREES_3:th 56
theorem
for b1 being Relation-like Function-like FinSequence-like set
      st b1 is Tree-yielding
   holds elementary_tree len b1 c= tree b1;

:: TREES_3:th 57
theorem
for b1 being Element of NAT holds
   elementary_tree b1 = tree (b1 |-> elementary_tree 0);

:: TREES_3:th 58
theorem
for b1 being non empty Tree-like set
for b2 being Relation-like Function-like FinSequence-like Tree-yielding set holds
   tree (b2 ^ <*b1*>) = ((tree b2) \/ elementary_tree ((len b2) + 1)) with-replacement(<*len b2*>,b1);

:: TREES_3:th 59
theorem
for b1 being Relation-like Function-like FinSequence-like Tree-yielding set holds
   tree (b1 ^ <*elementary_tree 0*>) = (tree b1) \/ elementary_tree ((len b1) + 1);

:: TREES_3:th 60
theorem
for b1, b2 being Relation-like Function-like FinSequence-like Tree-yielding set
for b3, b4 being non empty Tree-like set holds
tree ((b1 ^ <*b3*>) ^ b2) = (tree ((b1 ^ <*b4*>) ^ b2)) with-replacement(<*len b1*>,b3);

:: TREES_3:th 61
theorem
for b1 being non empty Tree-like set holds
   ^ b1 = (elementary_tree 1) with-replacement(<*0*>,b1);

:: TREES_3:th 62
theorem
for b1, b2 being non empty Tree-like set holds
tree(b1,b2) = ((elementary_tree 2) with-replacement(<*0*>,b1)) with-replacement(<*1*>,b2);

:: TREES_3:funcreg 23
registration
  let a1 be Relation-like Function-like FinSequence-like FinTree-yielding set;
  cluster tree a1 -> non empty finite Tree-like;
end;

:: TREES_3:funcreg 24
registration
  let a1 be non empty finite Tree-like set;
  cluster ^ a1 -> non empty finite Tree-like;
end;

:: TREES_3:funcreg 25
registration
  let a1, a2 be non empty finite Tree-like set;
  cluster tree(a1,a2) -> non empty finite Tree-like;
end;

:: TREES_3:th 63
theorem
for b1 being non empty Tree-like set
for b2 being set holds
      b2 in ^ b1
   iff
      (b2 <> {} implies ex b3 being Relation-like Function-like FinSequence-like set st
         b3 in b1 & b2 = <*0*> ^ b3);

:: TREES_3:th 64
theorem
for b1 being non empty Tree-like set
for b2 being Relation-like Function-like FinSequence-like set holds
      b2 in b1
   iff
      <*0*> ^ b2 in ^ b1;

:: TREES_3:th 65
theorem
for b1 being non empty Tree-like set holds
   elementary_tree 1 c= ^ b1;

:: TREES_3:th 66
theorem
for b1, b2 being non empty Tree-like set
      st b1 c= b2
   holds ^ b1 c= ^ b2;

:: TREES_3:th 67
theorem
for b1, b2 being non empty Tree-like set
      st ^ b1 = ^ b2
   holds b1 = b2;

:: TREES_3:th 68
theorem
for b1 being non empty Tree-like set holds
   (^ b1) | <*0*> = b1;

:: TREES_3:th 69
theorem
for b1, b2 being non empty Tree-like set holds
(^ b1) with-replacement(<*0*>,b2) = ^ b2;

:: TREES_3:th 70
theorem
^ elementary_tree 0 = elementary_tree 1;

:: TREES_3:th 71
theorem
for b1, b2 being non empty Tree-like set
for b3 being set holds
      b3 in tree(b1,b2)
   iff
      (b3 <> {} implies ex b4 being Relation-like Function-like FinSequence-like set st
         (b4 in b1 & b3 = <*0*> ^ b4 or b4 in b2 & b3 = <*1*> ^ b4));

:: TREES_3:th 72
theorem
for b1, b2 being non empty Tree-like set
for b3 being Relation-like Function-like FinSequence-like set holds
      b3 in b1
   iff
      <*0*> ^ b3 in tree(b1,b2);

:: TREES_3:th 73
theorem
for b1, b2 being non empty Tree-like set
for b3 being Relation-like Function-like FinSequence-like set holds
      b3 in b2
   iff
      <*1*> ^ b3 in tree(b1,b2);

:: TREES_3:th 74
theorem
for b1, b2 being non empty Tree-like set holds
elementary_tree 2 c= tree(b1,b2);

:: TREES_3:th 75
theorem
for b1, b2, b3, b4 being non empty Tree-like set
      st b1 c= b3 & b2 c= b4
   holds tree(b1,b2) c= tree(b3,b4);

:: TREES_3:th 76
theorem
for b1, b2, b3, b4 being non empty Tree-like set
      st tree(b1,b2) = tree(b3,b4)
   holds b1 = b3 & b2 = b4;

:: TREES_3:th 77
theorem
for b1, b2 being non empty Tree-like set holds
(tree(b1,b2)) | <*0*> = b1 &
 (tree(b1,b2)) | <*1*> = b2;

:: TREES_3:th 78
theorem
for b1, b2, b3 being non empty Tree-like set holds
(tree(b2,b3)) with-replacement(<*0*>,b1) = tree(b1,b3) &
 (tree(b2,b3)) with-replacement(<*1*>,b1) = tree(b2,b1);

:: TREES_3:th 79
theorem
tree(elementary_tree 0,elementary_tree 0) = elementary_tree 2;

:: TREES_3:th 80
theorem
for b1 being Element of NAT
for b2 being Relation-like Function-like FinSequence-like FinTree-yielding set
      st for b3 being non empty finite Tree-like set
              st b3 in proj2 b2
           holds height b3 <= b1
   holds height tree b2 <= b1 + 1;

:: TREES_3:th 81
theorem
for b1 being Relation-like Function-like FinSequence-like FinTree-yielding set
for b2 being non empty finite Tree-like set
      st b2 in proj2 b1
   holds height b2 < height tree b1;

:: TREES_3:th 82
theorem
for b1 being Relation-like Function-like FinSequence-like FinTree-yielding set
for b2 being non empty finite Tree-like set
      st b2 in proj2 b1 &
         (for b3 being non empty finite Tree-like set
               st b3 in proj2 b1
            holds height b3 <= height b2)
   holds height tree b1 = (height b2) + 1;

:: TREES_3:th 83
theorem
for b1 being non empty finite Tree-like set holds
   height ^ b1 = (height b1) + 1;

:: TREES_3:th 84
theorem
for b1, b2 being non empty finite Tree-like set holds
height tree(b1,b2) = (max(height b1,height b2)) + 1;

:: TREES_3:funcreg 26
registration
  let a1 be non empty set;
  let a2 be Element of FinTrees a1;
  cluster proj1 a2 -> finite;
end;

:: TREES_3:funcnot 16 => TREES_3:func 16
definition
  let a1 be Relation-like Function-like FinSequence-like set;
  assume a1 is DTree-yielding;
  func roots A1 -> Relation-like Function-like FinSequence-like set means
    dom it = dom a1 &
     (for b1 being Element of NAT
           st b1 in dom a1
        holds ex b2 being Relation-like Function-like DecoratedTree-like set st
           b2 = a1 . b1 & it . b1 = b2 . {});
end;

:: TREES_3:def 18
theorem
for b1 being Relation-like Function-like FinSequence-like set
   st b1 is DTree-yielding
for b2 being Relation-like Function-like FinSequence-like set holds
      b2 = roots b1
   iff
      dom b2 = dom b1 &
       (for b3 being Element of NAT
             st b3 in dom b1
          holds ex b4 being Relation-like Function-like DecoratedTree-like set st
             b4 = b1 . b3 & b2 . b3 = b4 . {});