let T, T1 be finite Tree; :: thesis: for p being Element of T holds (card (T with-replacement p,T1)) + (card (T | p)) = (card T) + (card T1)
let p be Element of T; :: thesis: (card (T with-replacement p,T1)) + (card (T | p)) = (card T) + (card T1)
defpred S1[ Element of T] means not p is_a_prefix_of $1;
defpred S2[ Element of T] means p is_a_prefix_of $1;
set A = { t where t is Element of T : S1[t] } ;
set B = { t where t is Element of T : S2[t] } ;
set C = { (p ^ t1) where t1 is Element of T1 : verum } ;
A1:
{ t where t is Element of T : S1[t] } is Subset of T
from DOMAIN_1:sch 7();
A2:
{ t where t is Element of T : S2[t] } is Subset of T
from DOMAIN_1:sch 7();
then reconsider A = { t where t is Element of T : S1[t] } , B = { t where t is Element of T : S2[t] } as finite set by A1;
A3:
T with-replacement p,T1 = A \/ { (p ^ t1) where t1 is Element of T1 : verum }
by Th14;
A4:
A misses { (p ^ t1) where t1 is Element of T1 : verum }
then A7:
T = A \/ B
by XBOOLE_0:def 3;
A8:
A misses B
A10:
T1,{ (p ^ t1) where t1 is Element of T1 : verum } are_equipotent
then reconsider C = { (p ^ t1) where t1 is Element of T1 : verum } as finite set by CARD_1:68;
A19:
card T1 = card C
by A10, CARD_1:21;
T | p,B are_equipotent
by Th13;
then
card (T | p) = card B
by CARD_1:21;
hence (card (T with-replacement p,T1)) + (card (T | p)) =
((card A) + (card C)) + (card B)
by A3, A4, CARD_2:53
.=
((card A) + (card B)) + (card C)
.=
(card T) + (card T1)
by A7, A8, A19, CARD_2:53
;
:: thesis: verum