
theorem Th9:
  {0,1}* is Tree
proof
  set X = {0,1}*;
A1: now
    let p be FinSequence of NAT;
    assume
A2: p in X;
    thus ProperPrefixes p c= X
    proof
      let y be object;
      assume y in ProperPrefixes p;
      then consider q be FinSequence such that
A3:   y = q and
A4:   q is_a_proper_prefix_of p by TREES_1:def 2;
      q is_a_prefix_of p by A4;
      then ex n be Nat st q = p|Seg n by TREES_1:def 1;
      hence thesis by A2,A3,Th1;
    end;
  end;
A5: now
    let p be FinSequence of NAT, k,n be Nat;
    assume that
A6: p^<*k*> in X and
A7: n <= k;
A8: p^<*k*> is FinSequence of {0,1} by A6,FINSEQ_1:def 11;
    then reconsider kk = <*k*> as FinSequence of {0,1} by FINSEQ_1:36;
    1 in Seg 1 by FINSEQ_1:3;
    then 1 in dom <*k*> by FINSEQ_1:38;
    then kk.1 in {0,1} by FINSEQ_2:11;
    then
A9: k in {0,1};
    now
      per cases by A9,TARSKI:def 2;
      suppose
        k = 0;
        hence n = 0 or n = 1 by A7;
      end;
      suppose
A10:    k = 1;
        n = 1 or n = 0
        proof
          assume n <> 1;
          then n < 0 + 1 by A7,A10,XXREAL_0:1;
          hence thesis by NAT_1:13;
        end;
        hence n = 0 or n = 1;
      end;
    end;
    then n in {0,1} by TARSKI:def 2;
    then
A11: <*n*> is FinSequence of {0,1} by Lm2;
    p is FinSequence of {0,1} by A8,FINSEQ_1:36;
    then p^<*n*> is FinSequence of {0,1} by A11,Lm1;
    hence p^<*n*> in X by FINSEQ_1:def 11;
  end;
  X c= NAT* by FINSEQ_1:62;
  hence thesis by A1,A5,TREES_1:def 3;
end;
