reserve SOURCE for non empty finite set,
 p for Probability of Trivial-SigmaField SOURCE,
 Tseq for FinSequence of BoolBinFinTrees IndexedREAL,
 q for FinSequence of NAT;

theorem Th5:
  card (Initial-Trees(p)) = card SOURCE
proof
set L = {T where T is Element of FinTrees IndexedREAL :
 T is finite binary DecoratedTree of IndexedREAL &
 ex x be Element of SOURCE st
 T = root-tree [ (canFS SOURCE)".x, p.{x} ] };
reconsider fcs = (canFS SOURCE)" as Function of SOURCE, Seg (card SOURCE)
 by FINSEQ_1:95;
len canFS SOURCE = card SOURCE by FINSEQ_1:93; then
dom (canFS SOURCE) = Seg (card SOURCE)
 & rng (canFS SOURCE) = SOURCE by FINSEQ_1:def 3,FUNCT_2:def 3; then
reconsider g = canFS SOURCE
 as Function of Seg (card SOURCE),SOURCE by FUNCT_2:1;
defpred P[object,object] means $2= root-tree [ fcs.$1, p.{$1} ];
A1: for x being object st x in SOURCE
 ex y being object st y in Initial-Trees(p) & P[x,y]
proof
 let x be object;
 assume
 A2: x in SOURCE;
 then reconsider x0=x as Element of SOURCE;
A3: fcs.x in Seg card SOURCE by A2,FUNCT_2:5;
 p.{x0} in REAL; then
A4: [ fcs.x, p.{x} ] in [:NAT,REAL:] by A3,ZFMISC_1:87;
 take T = root-tree [ fcs.x, p.{x} ];
 dom T = elementary_tree 0;
 then T is Element of FinTrees IndexedREAL by A4,TREES_3:def 8;
 hence thesis by A4,A2;
end;
consider f being Function of SOURCE,Initial-Trees(p) such that
A5: for x being object st x in SOURCE holds P[x,f.x]
from FUNCT_2:sch 1(A1);
now let x1,x2 be object;
 assume A6: x1 in dom f & x2 in dom f & f.x1=f.x2; then
 A7: x1 in SOURCE & x2 in SOURCE;
 A8: f.x1= root-tree [ fcs.x1, p.{x1} ] by A5,A6;
 A9: f.x2= root-tree [ fcs.x2, p.{x2} ] by A5,A6;
 A10:f.x1 in Initial-Trees(p) by A6,FUNCT_2:5;
 then reconsider T1=f.x1 as DecoratedTree of IndexedREAL;
 A11: dom T1 is finite & T1 is binary by A10,Def2;
 reconsider T1 as finite binary DecoratedTree of IndexedREAL
 by A11,FINSET_1:10;
A12: f.x2 in Initial-Trees(p) by A6,FUNCT_2:5; then
 reconsider T2=f.x2 as DecoratedTree of IndexedREAL;
 A13: dom T2 is finite & T2 is binary by A12,Def2;
 reconsider T2 as finite binary
 DecoratedTree of IndexedREAL by A13,FINSET_1:10;
 A14: {} in elementary_tree 0 by TARSKI:def 1,TREES_1:29; then
A15: T1.{} = [ fcs.x1, p.{x1} ] by A8,FUNCOP_1:7;
 A16:fcs.x1 = ([ fcs.x1, p.{x1} ])`1
 .= ([ fcs.x2, p.{x2} ])`1 by A15,A6,A9,A14,FUNCOP_1:7
 .= fcs.x2;
 x1 in dom fcs & x2 in dom fcs by A7,FUNCT_2:def 1;
 hence x1=x2 by A16,FUNCT_1:def 4;
end; then
A17: f is one-to-one by FUNCT_1:def 4;
now let z be object;
 assume z in Initial-Trees(p); then
 consider T be Element of FinTrees IndexedREAL such that
 A18:z= T & T is finite binary DecoratedTree of IndexedREAL &
 ex x be Element of SOURCE st T = root-tree [ (canFS SOURCE)".x, p.{x} ];
 consider x be Element of SOURCE such that
 A19: T = root-tree [ (canFS SOURCE)".x, p.{x} ] by A18;
 z = f.x by A19,A18,A5;
 hence z in rng f by FUNCT_2:112;
 end;
 then Initial-Trees(p) c= rng f by TARSKI:def 3; then
 A20: Initial-Trees(p) = rng f by XBOOLE_0:def 10;
dom f = SOURCE by FUNCT_2:def 1;
hence thesis by CARD_1:5,A17,WELLORD2:def 4,A20;
end;
