reconsider p9 = p as Element of T by A1;
A2: not p is_a_proper_prefix_of p9 ;
A3: p in { t where t is Element of T : not p is_a_proper_prefix_of t } by A2;
reconsider X = { t where t is Element of T : not p is_a_proper_prefix_of t } \/ { (p ^ s) where s is Element of T1 : s = s } as non empty set by A3;
A4: for x being set st x in { t where t is Element of T : not p is_a_proper_prefix_of t } holds
( x is FinSequence of NAT & x in NAT * & x in T )
proof
let x be set ; :: thesis: ( x in { t where t is Element of T : not p is_a_proper_prefix_of t } implies ( x is FinSequence of NAT & x in NAT * & x in T ) )
assume A5: x in { t where t is Element of T : not p is_a_proper_prefix_of t } ; :: thesis: ( x is FinSequence of NAT & x in NAT * & x in T )
A6: ex t being Element of T st
( x = t & not p is_a_proper_prefix_of t ) by A5;
thus x is FinSequence of NAT by A6; :: thesis: ( x in NAT * & x in T )
thus ( x in NAT * & x in T ) by A6, FINSEQ_1:def 11; :: thesis: verum
end;
A7: X is Tree-like
proof
thus X c= NAT * :: according to TREES_1:def 5 :: thesis: ( ( for p being FinSequence of NAT st p in X holds
ProperPrefixes p c= X ) & ( for p being FinSequence of NAT
for k, n being Element of NAT st p ^ <*k*> in X & n <= k holds
p ^ <*n*> in X ) )
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in X or x in NAT * )
assume A8: x in X ; :: thesis: x in NAT *
A9: ( x in { t where t is Element of T : not p is_a_proper_prefix_of t } or x in { (p ^ s) where s is Element of T1 : s = s } ) by A8, XBOOLE_0:def 3;
A10: now
assume A11: x in { (p ^ s) where s is Element of T1 : s = s } ; :: thesis: x is FinSequence of NAT
A12: ex s being Element of T1 st
( x = p ^ s & s = s ) by A11;
thus x is FinSequence of NAT by A12; :: thesis: verum
end;
thus x in NAT * by A4, A9, A10, FINSEQ_1:def 11; :: thesis: verum
end;
thus for q being FinSequence of NAT st q in X holds
ProperPrefixes q c= X :: thesis: for p being FinSequence of NAT
for k, n being Element of NAT st p ^ <*k*> in X & n <= k holds
p ^ <*n*> in X
proof
let q be FinSequence of NAT ; :: thesis: ( q in X implies ProperPrefixes q c= X )
assume A13: q in X ; :: thesis: ProperPrefixes q c= X
A14: now
assume A15: q in { t where t is Element of T : not p is_a_proper_prefix_of t } ; :: thesis: ProperPrefixes q c= X
A16: ex t being Element of T st
( q = t & not p is_a_proper_prefix_of t ) by A15;
A17: ProperPrefixes q c= T by A16, Def5;
thus ProperPrefixes q c= X :: thesis: verum
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in ProperPrefixes q or x in X )
assume A18: x in ProperPrefixes q ; :: thesis: x in X
consider p1 being FinSequence such that
A19: x = p1 and
A20: p1 is_a_proper_prefix_of q by A18, Def4;
reconsider p1 = p1 as Element of T by A17, A18, A19;
A21: not p is_a_proper_prefix_of p1 by A16, A20, XBOOLE_1:56;
A22: x in { s1 where s1 is Element of T : not p is_a_proper_prefix_of s1 } by A19, A21;
thus x in X by A22, XBOOLE_0:def 3; :: thesis: verum
end;
end;
A23: now
assume A24: q in { (p ^ s) where s is Element of T1 : s = s } ; :: thesis: ProperPrefixes q c= X
consider s being Element of T1 such that
A25: q = p ^ s and
s = s by A24;
thus ProperPrefixes q c= X :: thesis: verum
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in ProperPrefixes q or x in X )
assume A26: x in ProperPrefixes q ; :: thesis: x in X
reconsider r = x as FinSequence by A26, Th35;
A27: r is_a_proper_prefix_of p ^ s by A25, A26, Th36;
A28: r is_a_prefix_of p ^ s by A27, XBOOLE_0:def 8;
consider r1 being FinSequence such that
A29: p ^ s = r ^ r1 by A28, Th8;
A30: now
assume A31: len p <= len r ; :: thesis: r in X
consider r2 being FinSequence such that
A32: p ^ r2 = r by A29, A31, FINSEQ_1:64;
A33: p ^ s = p ^ (r2 ^ r1) by A29, A32, FINSEQ_1:45;
A34: s = r2 ^ r1 by A33, FINSEQ_1:46;
A35: ( dom r2 = Seg (len r2) & s | (dom r2) = r2 ) by A34, FINSEQ_1:33, FINSEQ_1:def 3;
reconsider r2 = r2 as FinSequence of NAT by A35, FINSEQ_1:23;
A36: r2 is_a_prefix_of s by A35, Def1;
reconsider r2 = r2 as Element of T1 by A36, Th45;
A37: r = p ^ r2 by A32;
A38: r in { (p ^ v) where v is Element of T1 : v = v } by A37;
thus r in X by A38, XBOOLE_0:def 3; :: thesis: verum
end;
A39: now end;
thus x in X by A30, A39; :: thesis: verum
end;
end;
thus ProperPrefixes q c= X by A13, A14, A23, XBOOLE_0:def 3; :: thesis: verum
end;
let q be FinSequence of NAT ; :: thesis: for k, n being Element of NAT st q ^ <*k*> in X & n <= k holds
q ^ <*n*> in X

let k, n be Element of NAT ; :: thesis: ( q ^ <*k*> in X & n <= k implies q ^ <*n*> in X )
assume that
A47: q ^ <*k*> in X and
A48: n <= k ; :: thesis: q ^ <*n*> in X
A49: now
assume A50: q ^ <*k*> in { t where t is Element of T : not p is_a_proper_prefix_of t } ; :: thesis: q ^ <*n*> in X
A51: ex s being Element of T st
( q ^ <*k*> = s & not p is_a_proper_prefix_of s ) by A50;
reconsider u = q ^ <*n*> as Element of T by A48, A51, Def5;
A55: q ^ <*n*> in { t where t is Element of T : not p is_a_proper_prefix_of t } by A52;
thus q ^ <*n*> in X by A55, XBOOLE_0:def 3; :: thesis: verum
end;
A56: now
assume A57: q ^ <*k*> in { (p ^ s) where s is Element of T1 : s = s } ; :: thesis: q ^ <*n*> in X
consider s being Element of T1 such that
A58: q ^ <*k*> = p ^ s and
s = s by A57;
A59: now
assume A60: len q <= len p ; :: thesis: q ^ <*n*> in X
consider r being FinSequence such that
A61: q ^ r = p by A58, A60, FINSEQ_1:64;
A62: q ^ <*k*> = q ^ (r ^ s) by A58, A61, FINSEQ_1:45;
A63: <*k*> = r ^ s by A62, FINSEQ_1:46;
A64: now
assume A65: r = <*k*> ; :: thesis: q ^ <*n*> in { t where t is Element of T : not p is_a_proper_prefix_of t }
reconsider s = q ^ <*n*> as Element of T by A1, A48, A61, A65, Def5;
thus q ^ <*n*> in { t where t is Element of T : not p is_a_proper_prefix_of t } by A66; :: thesis: verum
end;
A70: now
assume that
A71: s = <*k*> and
A72: r = {} ; :: thesis: q ^ <*n*> in { (p ^ v) where v is Element of T1 : v = v }
A73: ( s = {} ^ s & {} = <*> NAT ) by FINSEQ_1:47;
A74: {} ^ <*n*> in T1 by A48, A71, A73, Def5;
reconsider t = <*n*> as Element of T1 by A74, FINSEQ_1:47;
A75: q ^ <*n*> = p ^ t by A61, A72, FINSEQ_1:47;
thus q ^ <*n*> in { (p ^ v) where v is Element of T1 : v = v } by A75; :: thesis: verum
end;
thus q ^ <*n*> in X by A63, A64, A70, FINSEQ_1:109, XBOOLE_0:def 3; :: thesis: verum
end;
A76: now
assume A77: len p <= len q ; :: thesis: q ^ <*n*> in X
consider r being FinSequence such that
A78: p ^ r = q by A58, A77, FINSEQ_1:64;
A79: p ^ (r ^ <*k*>) = p ^ s by A58, A78, FINSEQ_1:45;
A80: r ^ <*k*> = s by A79, FINSEQ_1:46;
A81: ( dom r = Seg (len r) & s | (dom r) = r ) by A80, FINSEQ_1:33, FINSEQ_1:def 3;
reconsider r = r as FinSequence of NAT by A81, FINSEQ_1:23;
reconsider t = r ^ <*n*> as Element of T1 by A48, A80, Def5;
A82: q ^ <*n*> = p ^ t by A78, FINSEQ_1:45;
A83: q ^ <*n*> in { (p ^ v) where v is Element of T1 : v = v } by A82;
thus q ^ <*n*> in X by A83, XBOOLE_0:def 3; :: thesis: verum
end;
thus q ^ <*n*> in X by A59, A76; :: thesis: verum
end;
thus q ^ <*n*> in X by A47, A49, A56, XBOOLE_0:def 3; :: thesis: verum
end;
reconsider X = X as Tree by A7;
take X ; :: thesis: for q being FinSequence of NAT holds
( q in X iff ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) ) )

let q be FinSequence of NAT ; :: thesis: ( q in X iff ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) ) )

thus ( not q in X or ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) ) :: thesis: ( ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) ) implies q in X )
proof
assume A84: q in X ; :: thesis: ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) )

A85: now
assume A86: q in { t where t is Element of T : not p is_a_proper_prefix_of t } ; :: thesis: ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) )

A87: ex s being Element of T st
( q = s & not p is_a_proper_prefix_of s ) by A86;
thus ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) ) by A87; :: thesis: verum
end;
A88: now
assume A89: q in { (p ^ s) where s is Element of T1 : s = s } ; :: thesis: ex r being FinSequence of NAT st
( r in T1 & q = p ^ r )

A90: ex s being Element of T1 st
( q = p ^ s & s = s ) by A89;
thus ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) by A90; :: thesis: verum
end;
thus ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) ) by A84, A85, A88, XBOOLE_0:def 3; :: thesis: verum
end;
assume A91: ( ( q in T & not p is_a_proper_prefix_of q ) or ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) ) ; :: thesis: q in X
A92: ( q in T & not p is_a_proper_prefix_of q implies q in { t where t is Element of T : not p is_a_proper_prefix_of t } ) ;
A93: ( ex r being FinSequence of NAT st
( r in T1 & q = p ^ r ) implies q in { (p ^ v) where v is Element of T1 : v = v } ) ;
thus q in X by A91, A92, A93, XBOOLE_0:def 3; :: thesis: verum