let A be QC-alphabet ; :: thesis: for F, G being Element of QC-WFF A holds
( G in rng (tree_of_subformulae F) iff G is_subformula_of F )

let F, G be Element of QC-WFF A; :: thesis: ( G in rng (tree_of_subformulae F) iff G is_subformula_of F )
now :: thesis: ( G in rng (tree_of_subformulae F) implies G is_subformula_of F )
set T = dom (tree_of_subformulae F);
defpred S1[ set ] means ex H being Element of QC-WFF A st
( (tree_of_subformulae F) . $1 = H & H is_subformula_of F );
assume G in rng (tree_of_subformulae F) ; :: thesis: G is_subformula_of F
then consider t being object such that
A1: t in dom (tree_of_subformulae F) and
A2: (tree_of_subformulae F) . t = G by FUNCT_1:def 3;
reconsider t = t as Element of dom (tree_of_subformulae F) by A1;
A3: for t being Element of dom (tree_of_subformulae F)
for n being Nat st S1[t] & t ^ <*n*> in dom (tree_of_subformulae F) holds
S1[t ^ <*n*>]
proof
let t be Element of dom (tree_of_subformulae F); :: thesis: for n being Nat st S1[t] & t ^ <*n*> in dom (tree_of_subformulae F) holds
S1[t ^ <*n*>]

let n be Nat; :: thesis: ( S1[t] & t ^ <*n*> in dom (tree_of_subformulae F) implies S1[t ^ <*n*>] )
assume that
A4: S1[t] and
A5: t ^ <*n*> in dom (tree_of_subformulae F) ; :: thesis: S1[t ^ <*n*>]
(tree_of_subformulae F) . (t ^ <*n*>) is Element of QC-WFF A by A5, FUNCT_1:102;
then consider H9 being Element of QC-WFF A such that
A6: (tree_of_subformulae F) . (t ^ <*n*>) = H9 ;
consider H being Element of QC-WFF A such that
A7: (tree_of_subformulae F) . t = H and
A8: H is_subformula_of F by A4;
ex G9 being Element of QC-WFF A st
( G9 = (tree_of_subformulae F) . (t ^ <*n*>) & G9 is_immediate_constituent_of (tree_of_subformulae F) . t ) by A5, Th6;
then H9 is_subformula_of H by A7, A6, QC_LANG2:52;
hence S1[t ^ <*n*>] by A8, A6, QC_LANG2:57; :: thesis: verum
end;
A9: S1[ {} ] by Def2;
for t being Element of dom (tree_of_subformulae F) holds S1[t] from TREES_2:sch 1(A9, A3);
then ex H being Element of QC-WFF A st
( (tree_of_subformulae F) . t = H & H is_subformula_of F ) ;
hence G is_subformula_of F by A2; :: thesis: verum
end;
hence ( G in rng (tree_of_subformulae F) implies G is_subformula_of F ) ; :: thesis: ( G is_subformula_of F implies G in rng (tree_of_subformulae F) )
assume G is_subformula_of F ; :: thesis: G in rng (tree_of_subformulae F)
hence G in rng (tree_of_subformulae F) by Th5, Th9; :: thesis: verum