Article TREES_2, MML version 4.99.1005

:: TREES_2:th 1
theorem
for b1, b2, b3 being Relation-like Function-like FinSequence-like set
      st b1 c= b3 & b2 c= b3
   holds b1,b2 are_c=-comparable;

:: TREES_2:th 2
theorem
for b1, b2, b3 being Relation-like Function-like FinSequence-like set
      st b1 c< b3 & b2 c= b3
   holds b1,b2 are_c=-comparable;

:: TREES_2:th 4
theorem
for b1 being Element of NAT
for b2 being Relation-like Function-like FinSequence-like set
      st len b2 = b1 + 1
   holds ex b3 being Relation-like Function-like FinSequence-like set st
      ex b4 being set st
         b2 = b3 ^ <*b4*> & len b3 = b1;

:: TREES_2:th 6
theorem
for b1 being set
for b2 being Relation-like Function-like FinSequence-like set holds
   ProperPrefixes (b2 ^ <*b1*>) = (ProperPrefixes b2) \/ {b2};

:: TREES_2:sch 1
scheme TREES_2:sch 1
{F1 -> non empty Tree-like set}:
for b1 being Element of F1() holds
   P1[b1]
provided
   P1[{}]
and
   for b1 being Element of F1()
   for b2 being Element of NAT
         st P1[b1] & b1 ^ <*b2*> in F1()
      holds P1[b1 ^ <*b2*>];


:: TREES_2:th 7
theorem
for b1, b2 being non empty Tree-like set
      st for b3 being FinSequence of NAT holds
              b3 in b1
           iff
              b3 in b2
   holds b1 = b2;

:: TREES_2:prednot 1 => HIDDEN:pred 1
definition
  let a1, a2 be set;
  pred A1 = A2 means
    for b1 being FinSequence of NAT holds
          b1 in a1
       iff
          b1 in a2;
  symmetry;
::  for a1, a2 being set
::        st a1 = a2
::     holds a2 = a1;
  reflexivity;
::  for a1 being set holds
::     a1 = a1;
end;

:: TREES_2:dfs 1
definiens
  let a1, a2 be non empty Tree-like set;
To prove
     a1 = a2
it is sufficient to prove
  thus for b1 being FinSequence of NAT holds
          b1 in a1
       iff
          b1 in a2;

:: TREES_2:def 1
theorem
for b1, b2 being non empty Tree-like set holds
   b1 = b2
iff
   for b3 being FinSequence of NAT holds
         b3 in b1
      iff
         b3 in b2;

:: TREES_2:th 8
theorem
for b1 being non empty Tree-like set
for b2 being FinSequence of NAT
      st b2 in b1
   holds b1 = b1 with-replacement(b2,b1 | b2);

:: TREES_2:th 9
theorem
for b1, b2 being non empty Tree-like set
for b3, b4 being FinSequence of NAT
      st b3 in b1 & b4 in b1 & not b3 c= b4
   holds b4 in b1 with-replacement(b3,b2);

:: TREES_2:th 10
theorem
for b1, b2, b3 being non empty Tree-like set
for b4, b5 being FinSequence of NAT
      st b4 in b1 & b5 in b1 & not b4,b5 are_c=-comparable
   holds (b1 with-replacement(b4,b2)) with-replacement(b5,b3) = (b1 with-replacement(b5,b3)) with-replacement(b4,b2);

:: TREES_2:attrnot 1 => TREES_2:attr 1
definition
  let a1 be non empty Tree-like set;
  attr a1 is finite-order means
    ex b1 being Element of NAT st
       for b2 being Element of a1 holds
          not b2 ^ <*b1*> in a1;
end;

:: TREES_2:dfs 2
definiens
  let a1 be non empty Tree-like set;
To prove
     a1 is finite-order
it is sufficient to prove
  thus ex b1 being Element of NAT st
       for b2 being Element of a1 holds
          not b2 ^ <*b1*> in a1;

:: TREES_2:def 2
theorem
for b1 being non empty Tree-like set holds
      b1 is finite-order
   iff
      ex b2 being Element of NAT st
         for b3 being Element of b1 holds
            not b3 ^ <*b2*> in b1;

:: TREES_2:exreg 1
registration
  cluster non empty Tree-like finite-order set;
end;

:: TREES_2:modenot 1 => TREES_2:mode 1
definition
  let a1 be non empty Tree-like set;
  mode Chain of A1 -> Element of bool a1 means
    for b1, b2 being FinSequence of NAT
          st b1 in it & b2 in it
       holds b1,b2 are_c=-comparable;
end;

:: TREES_2:dfs 3
definiens
  let a1 be non empty Tree-like set;
  let a2 be Element of bool a1;
To prove
     a2 is Chain of a1
it is sufficient to prove
  thus for b1, b2 being FinSequence of NAT
          st b1 in a2 & b2 in a2
       holds b1,b2 are_c=-comparable;

:: TREES_2:def 3
theorem
for b1 being non empty Tree-like set
for b2 being Element of bool b1 holds
      b2 is Chain of b1
   iff
      for b3, b4 being FinSequence of NAT
            st b3 in b2 & b4 in b2
         holds b3,b4 are_c=-comparable;

:: TREES_2:modenot 2 => TREES_2:mode 2
definition
  let a1 be non empty Tree-like set;
  mode Level of A1 -> Element of bool a1 means
    ex b1 being Element of NAT st
       it = {b2 where b2 is Element of a1: len b2 = b1};
end;

:: TREES_2:dfs 4
definiens
  let a1 be non empty Tree-like set;
  let a2 be Element of bool a1;
To prove
     a2 is Level of a1
it is sufficient to prove
  thus ex b1 being Element of NAT st
       a2 = {b2 where b2 is Element of a1: len b2 = b1};

:: TREES_2:def 4
theorem
for b1 being non empty Tree-like set
for b2 being Element of bool b1 holds
      b2 is Level of b1
   iff
      ex b3 being Element of NAT st
         b2 = {b4 where b4 is Element of b1: len b4 = b3};

:: TREES_2:funcnot 1 => TREES_2:func 1
definition
  let a1 be non empty Tree-like set;
  let a2 be Element of a1;
  func succ A2 -> Element of bool a1 equals
    {a2 ^ <*b1*> where b1 is Element of NAT: a2 ^ <*b1*> in a1};
end;

:: TREES_2:def 5
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1 holds
   succ b2 = {b2 ^ <*b3*> where b3 is Element of NAT: b2 ^ <*b3*> in b1};

:: TREES_2:th 11
theorem
for b1 being non empty Tree-like set
for b2 being Level of b1 holds
   b2 is AntiChain_of_Prefixes of b1;

:: TREES_2:th 12
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1 holds
   succ b2 is AntiChain_of_Prefixes of b1;

:: TREES_2:th 13
theorem
for b1 being non empty Tree-like set
for b2 being AntiChain_of_Prefixes of b1
for b3 being Chain of b1 holds
   ex b4 being Element of b1 st
      b2 /\ b3 c= {b4};

:: TREES_2:funcnot 2 => TREES_2:func 2
definition
  let a1 be non empty Tree-like set;
  let a2 be Element of NAT;
  func A1 -level A2 -> Level of a1 equals
    {b1 where b1 is Element of a1: len b1 = a2};
end;

:: TREES_2:def 6
theorem
for b1 being non empty Tree-like set
for b2 being Element of NAT holds
   b1 -level b2 = {b3 where b3 is Element of b1: len b3 = b2};

:: TREES_2:th 14
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1
for b3 being Element of NAT holds
      b2 ^ <*b3*> in succ b2
   iff
      b2 ^ <*b3*> in b1;

:: TREES_2:th 15
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1
      st b2 = {}
   holds b1 -level 1 = succ b2;

:: TREES_2:th 16
theorem
for b1 being non empty Tree-like set holds
   b1 = union {b1 -level b2 where b2 is Element of NAT: TRUE};

:: TREES_2:th 17
theorem
for b1 being non empty finite Tree-like set holds
   b1 = union {b1 -level b2 where b2 is Element of NAT: b2 <= height b1};

:: TREES_2:th 18
theorem
for b1 being non empty Tree-like set
for b2 being Level of b1 holds
   ex b3 being Element of NAT st
      b2 = b1 -level b3;

:: TREES_2:sch 2
scheme TREES_2:sch 2
{F1 -> non empty set,
  F2 -> set,
  F3 -> set}:
Card {F3(b1) where b1 is Element of F1(): b1 in F2()} c= Card F2()


:: TREES_2:sch 3
scheme TREES_2:sch 3
{F1 -> non empty set,
  F2 -> finite set,
  F3 -> finite set,
  F4 -> set}:
card F3() <= card F2()
provided
   F3() = {F4(b1) where b1 is Element of F1(): b1 in F2()};


:: TREES_2:th 19
theorem
for b1 being non empty Tree-like set
      st b1 is finite-order
   holds ex b2 being Element of NAT st
      for b3 being Element of b1 holds
         ex b4 being finite set st
            b4 = succ b3 & card b4 <= b2;

:: TREES_2:th 20
theorem
for b1 being non empty Tree-like set
for b2 being Element of b1
      st b1 is finite-order
   holds succ b2 is finite;

:: TREES_2:funcreg 1
registration
  let a1 be non empty Tree-like finite-order set;
  let a2 be Element of a1;
  cluster succ a2 -> finite;
end;

:: TREES_2:th 21
theorem
for b1 being non empty Tree-like set holds
   {} is Chain of b1;

:: TREES_2:th 22
theorem
for b1 being non empty Tree-like set holds
   {{}} is Chain of b1;

:: TREES_2:exreg 2
registration
  let a1 be non empty Tree-like set;
  cluster non empty Chain of a1;
end;

:: TREES_2:attrnot 2 => TREES_2:attr 2
definition
  let a1 be non empty Tree-like set;
  let a2 be Chain of a1;
  attr a2 is Branch-like means
    (for b1 being FinSequence of NAT
           st b1 in a2
        holds ProperPrefixes b1 c= a2) &
     (for b1 being FinSequence of NAT
           st b1 in a1
        holds ex b2 being FinSequence of NAT st
           b2 in a2 & not b2 c< b1);
end;

:: TREES_2:dfs 7
definiens
  let a1 be non empty Tree-like set;
  let a2 be Chain of a1;
To prove
     a2 is Branch-like
it is sufficient to prove
  thus (for b1 being FinSequence of NAT
           st b1 in a2
        holds ProperPrefixes b1 c= a2) &
     (for b1 being FinSequence of NAT
           st b1 in a1
        holds ex b2 being FinSequence of NAT st
           b2 in a2 & not b2 c< b1);

:: TREES_2:def 7
theorem
for b1 being non empty Tree-like set
for b2 being Chain of b1 holds
      b2 is Branch-like(b1)
   iff
      (for b3 being FinSequence of NAT
             st b3 in b2
          holds ProperPrefixes b3 c= b2) &
       (for b3 being FinSequence of NAT
             st b3 in b1
          holds ex b4 being FinSequence of NAT st
             b4 in b2 & not b4 c< b3);

:: TREES_2:exreg 3
registration
  let a1 be non empty Tree-like set;
  cluster Branch-like Chain of a1;
end;

:: TREES_2:modenot 3
definition
  let a1 be non empty Tree-like set;
  mode Branch of a1 is Branch-like Chain of a1;
end;

:: TREES_2:condreg 1
registration
  let a1 be non empty Tree-like set;
  cluster Branch-like -> non empty (Chain of a1);
end;

:: TREES_2:th 23
theorem
for b1 being non empty Tree-like set
for b2, b3 being Relation-like Function-like FinSequence-like set
for b4 being Chain of b1
      st b2 in b4 & b3 in b4 & not b2 in ProperPrefixes b3
   holds b3 c= b2;

:: TREES_2:th 24
theorem
for b1 being non empty Tree-like set
for b2, b3, b4 being Relation-like Function-like FinSequence-like set
for b5 being Chain of b1
      st b2 in b5 & b3 in b5 & b4 c= b3 & not b2 in ProperPrefixes b4
   holds b4 c= b2;

:: TREES_2:exreg 4
registration
  let a1 be non empty Tree-like set;
  cluster finite Chain of a1;
end;

:: TREES_2:th 25
theorem
for b1 being non empty Tree-like set
for b2 being Element of NAT
for b3 being finite Chain of b1
      st b2 < card b3
   holds ex b4 being FinSequence of NAT st
      b4 in b3 & b2 <= len b4;

:: TREES_2:th 26
theorem
for b1 being non empty Tree-like set
for b2 being Chain of b1 holds
   {b3 where b3 is Element of b1: ex b4 being FinSequence of NAT st
      b4 in b2 & b3 c= b4} is Chain of b1;

:: TREES_2:th 27
theorem
for b1 being non empty Tree-like set
for b2, b3 being FinSequence of NAT
for b4 being Branch-like Chain of b1
      st b2 c= b3 & b3 in b4
   holds b2 in b4;

:: TREES_2:th 28
theorem
for b1 being non empty Tree-like set
for b2 being Branch-like Chain of b1 holds
   {} in b2;

:: TREES_2:th 29
theorem
for b1 being non empty Tree-like set
for b2, b3 being FinSequence of NAT
for b4 being Chain of b1
      st b2 in b4 & b3 in b4 & len b2 <= len b3
   holds b2 c= b3;

:: TREES_2:th 30
theorem
for b1 being non empty Tree-like set
for b2 being Chain of b1 holds
   ex b3 being Branch-like Chain of b1 st
      b2 c= b3;

:: TREES_2:sch 4
scheme TREES_2:sch 4
{F1 -> set}:
ex b1 being Relation-like Function-like set st
   proj1 b1 = F1() &
    (for b2 being set
          st b2 in F1()
       holds ex b3 being Element of NAT st
          b1 . b2 = b3 &
           P1[b2, b3] &
           (for b4 being Element of NAT
                 st P1[b2, b4]
              holds b3 <= b4))
provided
   for b1 being set
         st b1 in F1()
      holds ex b2 being Element of NAT st
         P1[b1, b2];


:: TREES_2:sch 5
scheme TREES_2:sch 5
{F1 -> set,
  F2 -> set}:
ex b1 being Relation-like Function-like set st
   proj1 b1 = NAT &
    proj2 b1 c= F1() &
    b1 . 0 = F2() &
    (for b2 being Element of NAT holds
       P2[b1 . b2, b1 . (b2 + 1)] & P1[b1 . b2])
provided
   F2() in F1() & P1[F2()]
and
   for b1 being set
         st b1 in F1() & P1[b1]
      holds ex b2 being set st
         b2 in F1() & P2[b1, b2] & P1[b2];


:: TREES_2:th 31
theorem
for b1 being non empty Tree-like set
      st (for b2 being Element of NAT holds
            ex b3 being finite Chain of b1 st
               card b3 = b2) &
         (for b2 being Element of b1 holds
            succ b2 is finite)
   holds ex b2 being Chain of b1 st
      b2 is infinite;

:: TREES_2:th 32
theorem
for b1 being non empty Tree-like finite-order set
      st for b2 being Element of NAT holds
           ex b3 being finite Chain of b1 st
              card b3 = b2
   holds ex b2 being Chain of b1 st
      b2 is infinite;

:: TREES_2:attrnot 3 => TREES_2:attr 3
definition
  let a1 be Relation-like set;
  attr a1 is DecoratedTree-like means
    proj1 a1 is non empty Tree-like set;
end;

:: TREES_2:dfs 8
definiens
  let a1 be Relation-like set;
To prove
     a1 is DecoratedTree-like
it is sufficient to prove
  thus proj1 a1 is non empty Tree-like set;

:: TREES_2:def 8
theorem
for b1 being Relation-like set holds
      b1 is DecoratedTree-like
   iff
      proj1 b1 is non empty Tree-like set;

:: TREES_2:exreg 5
registration
  cluster Relation-like Function-like DecoratedTree-like set;
end;

:: TREES_2:modenot 4
definition
  mode DecoratedTree is Relation-like Function-like DecoratedTree-like set;
end;

:: TREES_2:funcreg 2
registration
  let a1 be Relation-like Function-like DecoratedTree-like set;
  cluster proj1 a1 -> non empty Tree-like;
end;

:: TREES_2:modenot 5 => TREES_2:mode 3
definition
  let a1 be set;
  mode ParametrizedSubset of A1 -> Relation-like set means
    proj2 it c= a1;
end;

:: TREES_2:dfs 9
definiens
  let a1 be set;
  let a2 be Relation-like set;
To prove
     a2 is ParametrizedSubset of a1
it is sufficient to prove
  thus proj2 a2 c= a1;

:: TREES_2:def 9
theorem
for b1 being set
for b2 being Relation-like set holds
      b2 is ParametrizedSubset of b1
   iff
      proj2 b2 c= b1;

:: TREES_2:exreg 6
registration
  let a1 be non empty set;
  cluster Relation-like Function-like DecoratedTree-like ParametrizedSubset of a1;
end;

:: TREES_2:modenot 6
definition
  let a1 be non empty set;
  mode DecoratedTree of a1 is Function-like DecoratedTree-like ParametrizedSubset of a1;
end;

:: TREES_2:funcnot 3 => TREES_2:func 3
definition
  let a1 be non empty set;
  let a2 be Function-like DecoratedTree-like ParametrizedSubset of a1;
  let a3 be Element of proj1 a2;
  redefine func a2 . a3 -> Element of a1;
end;

:: TREES_2:th 33
theorem
for b1, b2 being Relation-like Function-like DecoratedTree-like set
      st proj1 b1 = proj1 b2 &
         (for b3 being FinSequence of NAT
               st b3 in proj1 b1
            holds b1 . b3 = b2 . b3)
   holds b1 = b2;

:: TREES_2:sch 6
scheme TREES_2:sch 6
{F1 -> non empty Tree-like set}:
ex b1 being Relation-like Function-like DecoratedTree-like set st
   proj1 b1 = F1() &
    (for b2 being FinSequence of NAT
          st b2 in F1()
       holds P1[b2, b1 . b2])
provided
   for b1 being FinSequence of NAT
         st b1 in F1()
      holds ex b2 being set st
         P1[b1, b2];


:: TREES_2:sch 7
scheme TREES_2:sch 7
{F1 -> non empty Tree-like set,
  F2 -> set}:
ex b1 being Relation-like Function-like DecoratedTree-like set st
   proj1 b1 = F1() &
    (for b2 being FinSequence of NAT
          st b2 in F1()
       holds b1 . b2 = F2(b2))


:: TREES_2:funcnot 4 => TREES_2:func 4
definition
  let a1 be Relation-like Function-like DecoratedTree-like set;
  func Leaves A1 -> set equals
    a1 .: Leaves proj1 a1;
end;

:: TREES_2:def 10
theorem
for b1 being Relation-like Function-like DecoratedTree-like set holds
   Leaves b1 = b1 .: Leaves proj1 b1;

:: TREES_2:funcnot 5 => TREES_2:func 5
definition
  let a1 be Relation-like Function-like DecoratedTree-like set;
  let a2 be FinSequence of NAT;
  func A1 | A2 -> Relation-like Function-like DecoratedTree-like set means
    proj1 it = (proj1 a1) | a2 &
     (for b1 being FinSequence of NAT
           st b1 in (proj1 a1) | a2
        holds it . b1 = a1 . (a2 ^ b1));
end;

:: TREES_2:def 11
theorem
for b1 being Relation-like Function-like DecoratedTree-like set
for b2 being FinSequence of NAT
for b3 being Relation-like Function-like DecoratedTree-like set holds
      b3 = b1 | b2
   iff
      proj1 b3 = (proj1 b1) | b2 &
       (for b4 being FinSequence of NAT
             st b4 in (proj1 b1) | b2
          holds b3 . b4 = b1 . (b2 ^ b4));

:: TREES_2:th 34
theorem
for b1 being FinSequence of NAT
for b2 being Relation-like Function-like DecoratedTree-like set
      st b1 in proj1 b2
   holds proj2 (b2 | b1) c= proj2 b2;

:: TREES_2:funcnot 6 => TREES_2:func 6
definition
  let a1 be non empty set;
  let a2 be Function-like DecoratedTree-like ParametrizedSubset of a1;
  redefine func Leaves a2 -> Element of bool a1;
end;

:: TREES_2:funcnot 7 => TREES_2:func 7
definition
  let a1 be non empty set;
  let a2 be Function-like DecoratedTree-like ParametrizedSubset of a1;
  let a3 be Element of proj1 a2;
  redefine func a2 | a3 -> Function-like DecoratedTree-like ParametrizedSubset of a1;
end;

:: TREES_2:funcnot 8 => TREES_2:func 8
definition
  let a1 be Relation-like Function-like DecoratedTree-like set;
  let a2 be FinSequence of NAT;
  let a3 be Relation-like Function-like DecoratedTree-like set;
  assume a2 in proj1 a1;
  func A1 with-replacement(A2,A3) -> Relation-like Function-like DecoratedTree-like set means
    proj1 it = (proj1 a1) with-replacement(a2,proj1 a3) &
     (for b1 being FinSequence of NAT
           st b1 in (proj1 a1) with-replacement(a2,proj1 a3) &
              (not a2 c= b1 implies it . b1 <> a1 . b1)
        holds ex b2 being FinSequence of NAT st
           b2 in proj1 a3 & b1 = a2 ^ b2 & it . b1 = a3 . b2);
end;

:: TREES_2:def 12
theorem
for b1 being Relation-like Function-like DecoratedTree-like set
for b2 being FinSequence of NAT
for b3 being Relation-like Function-like DecoratedTree-like set
   st b2 in proj1 b1
for b4 being Relation-like Function-like DecoratedTree-like set holds
      b4 = b1 with-replacement(b2,b3)
   iff
      proj1 b4 = (proj1 b1) with-replacement(b2,proj1 b3) &
       (for b5 being FinSequence of NAT
             st b5 in (proj1 b1) with-replacement(b2,proj1 b3) &
                (not b2 c= b5 implies b4 . b5 <> b1 . b5)
          holds ex b6 being FinSequence of NAT st
             b6 in proj1 b3 & b5 = b2 ^ b6 & b4 . b5 = b3 . b6);

:: TREES_2:funcreg 3
registration
  let a1 be non empty Tree-like set;
  let a2 be set;
  cluster a1 --> a2 -> DecoratedTree-like;
end;

:: TREES_2:funcnot 9 => TREES_2:func 9
definition
  let a1 be non empty set;
  let a2 be non empty Tree-like set;
  let a3 be Element of a1;
  redefine func a2 --> a3 -> Function-like DecoratedTree-like ParametrizedSubset of a1;
end;

:: TREES_2:th 35
theorem
for b1 being non empty set
      st for b2 being set
              st b2 in b1
           holds b2 is non empty Tree-like set
   holds union b1 is non empty Tree-like set;

:: TREES_2:th 36
theorem
for b1 being set
      st (for b2 being set
               st b2 in b1
            holds b2 is Relation-like Function-like set) &
         b1 is c=-linear
   holds union b1 is Relation-like & union b1 is Function-like;

:: TREES_2:th 37
theorem
for b1 being non empty set
      st (for b2 being set
               st b2 in b1
            holds b2 is Relation-like Function-like DecoratedTree-like set) &
         b1 is c=-linear
   holds union b1 is Relation-like Function-like DecoratedTree-like set;

:: TREES_2:th 38
theorem
for b1, b2 being non empty set
      st (for b3 being set
               st b3 in b1
            holds b3 is Function-like DecoratedTree-like ParametrizedSubset of b2) &
         b1 is c=-linear
   holds union b1 is Function-like DecoratedTree-like ParametrizedSubset of b2;

:: TREES_2:sch 8
scheme TREES_2:sch 8
{F1 -> non empty set,
  F2 -> Element of F1(),
  F3 -> set,
  F4 -> Function-like quasi_total Relation of [:F1(),NAT:],F1()}:
ex b1 being Function-like DecoratedTree-like ParametrizedSubset of F1() st
   b1 . {} = F2() &
    (for b2 being Element of proj1 b1 holds
       succ b2 = {b2 ^ <*b3*> where b3 is Element of NAT: b3 in F3(b1 . b2)} &
        (for b3 being Element of NAT
              st b3 in F3(b1 . b2)
           holds b1 . (b2 ^ <*b3*>) = F4() .(b1 . b2,b3)))
provided
   for b1 being Element of F1()
   for b2, b3 being Element of NAT
         st b2 <= b3 & b3 in F3(b1)
      holds b2 in F3(b1);


:: TREES_2:sch 9
scheme TREES_2:sch 9
{F1 -> non empty set,
  F2 -> Element of F1(),
  F3 -> Element of NAT,
  F4 -> Function-like quasi_total Relation of [:F1(),NAT:],F1()}:
ex b1 being Function-like DecoratedTree-like ParametrizedSubset of F1() st
   b1 . {} = F2() &
    (for b2 being Element of proj1 b1 holds
       succ b2 = {b2 ^ <*b3*> where b3 is Element of NAT: b3 < F3(b1 . b2)} &
        (for b3 being Element of NAT
              st b3 < F3(b1 . b2)
           holds b1 . (b2 ^ <*b3*>) = F4() .(b1 . b2,b3)))


:: TREES_2:funcreg 4
registration
  let a1 be non empty finite Tree-like set;
  let a2 be Element of a1;
  cluster succ a2 -> finite;
end;

:: TREES_2:funcnot 10 => TREES_2:func 10
definition
  let a1 be non empty finite Tree-like set;
  let a2 be Element of a1;
  func branchdeg A2 -> set equals
    card succ a2;
end;

:: TREES_2:def 13
theorem
for b1 being non empty finite Tree-like set
for b2 being Element of b1 holds
   branchdeg b2 = card succ b2;

:: TREES_2:exreg 7
registration
  cluster Relation-like Function-like finite DecoratedTree-like set;
end;

:: TREES_2:exreg 8
registration
  let a1 be non empty set;
  cluster Relation-like Function-like finite DecoratedTree-like ParametrizedSubset of a1;
end;

:: TREES_2:exreg 9
registration
  let a1, a2 be non empty set;
  cluster Relation-like non empty Relation of a1,a2;
end;

:: TREES_2:th 39
theorem
for b1, b2 being non empty Tree-like set
for b3 being FinSequence of NAT
   st b3 in b1
for b4 being Element of b1 with-replacement(b3,b2)
for b5 being Element of b2
      st b4 = b3 ^ b5
   holds succ b4,succ b5 are_equipotent;

:: TREES_2:sch 10
scheme TREES_2:sch 10
{F1 -> non empty set,
  F2 -> Element of F1(),
  F3 -> Function-like quasi_total Relation of [:F1(),NAT:],F1()}:
ex b1 being Function-like DecoratedTree-like ParametrizedSubset of F1() st
   b1 . {} = F2() &
    (for b2 being Element of proj1 b1 holds
       succ b2 = {b2 ^ <*b3*> where b3 is Element of NAT: P1[b3, b1 . b2]} &
        (for b3 being Element of NAT
              st P1[b3, b1 . b2]
           holds b1 . (b2 ^ <*b3*>) = F3() .(b1 . b2,b3)))
provided
   for b1 being Element of F1()
   for b2, b3 being Element of NAT
         st b2 <= b3 & P1[b3, b1]
      holds P1[b2, b1];