let p be FinSequence of NAT ; for T, T1 being Tree st p in T holds
T with-replacement (p,T1) = { t1 where t1 is Element of T : not p is_a_proper_prefix_of t1 } \/ { (p ^ s) where s is Element of T1 : verum }
let T, T1 be Tree; ( p in T implies T with-replacement (p,T1) = { t1 where t1 is Element of T : not p is_a_proper_prefix_of t1 } \/ { (p ^ s) where s is Element of T1 : verum } )
assume A1:
p in T
; T with-replacement (p,T1) = { t1 where t1 is Element of T : not p is_a_proper_prefix_of t1 } \/ { (p ^ s) where s is Element of T1 : verum }
thus
T with-replacement (p,T1) c= { t where t is Element of T : not p is_a_proper_prefix_of t } \/ { (p ^ s) where s is Element of T1 : verum }
XBOOLE_0:def 10 { t1 where t1 is Element of T : not p is_a_proper_prefix_of t1 } \/ { (p ^ s) where s is Element of T1 : verum } is_a_prefix_of T with-replacement (p,T1)
let x be object ; TARSKI:def 3 ( not x in { t1 where t1 is Element of T : not p is_a_proper_prefix_of t1 } \/ { (p ^ s) where s is Element of T1 : verum } or x in T with-replacement (p,T1) )
assume A4:
x in { t where t is Element of T : not p is_a_proper_prefix_of t } \/ { (p ^ s) where s is Element of T1 : verum }
; x in T with-replacement (p,T1)
hence
x in T with-replacement (p,T1)
by A4, A5, XBOOLE_0:def 3; verum