reserve A for QC-alphabet;
reserve n,k,m for Nat;
reserve F,G,G9,H,H9 for Element of QC-WFF(A);
reserve t, t9, t99 for Element of dom tree_of_subformulae(F);
reserve x for set;
reserve x,y for set;
reserve t for Element of dom tree_of_subformulae(F),
  s for Element of dom tree_of_subformulae(G);

theorem Th27:
  t in F-entry_points_in_subformula_tree_of G & s in G
  -entry_points_in_subformula_tree_of H implies t^s in F
  -entry_points_in_subformula_tree_of H
proof
  defpred P[Nat] means for F,G,H,t,s holds G = (tree_of_subformulae
  (F)).t & H = (tree_of_subformulae(G)).s & len s = $1 implies t^s in F
  -entry_points_in_subformula_tree_of H;
A1: for k st P[k] holds P[k + 1]
  proof
    let k such that
A2: P[k];
    thus P[k + 1]
    proof
A3:   1 in {1} by TARSKI:def 1;
      let F,G,H,t,s;
      assume that
A4:   G = (tree_of_subformulae(F)).t and
A5:   H = (tree_of_subformulae(G)).s and
A6:   len s = k+1;
      consider v being FinSequence, x being set such that
A7:   s = v^<*x*> and
A8:   len v = k by A6,TREES_2:3;
      reconsider u = <*x*> as FinSequence of NAT by A7,FINSEQ_1:36;
A9:   rng u c= NAT by FINSEQ_1:def 4;
      dom u = Seg 1 & u.1 = x by FINSEQ_1:def 8;
      then x in rng u by A3,FINSEQ_1:2,FUNCT_1:def 3;
      then reconsider m = x as Element of NAT by A9;
      reconsider v as FinSequence of NAT by A7,FINSEQ_1:36;
      reconsider s9 = v as Element of dom tree_of_subformulae(G) by A7,
TREES_1:21;
      consider H9 such that
A10:  H9 = (tree_of_subformulae(G)).s9;
A11:  t^s9 in F-entry_points_in_subformula_tree_of H9 by A2,A4,A8,A10;
      F-entry_points_in_subformula_tree_of H9 c= dom tree_of_subformulae(
      F) by TREES_1:def 11;
      then consider t9 being Element of dom tree_of_subformulae(F) such that
A12:  t9 = t^s9 by A11;
A13:  H9 = (tree_of_subformulae(F)).t9 by A11,A12,Def3;
A14:  s = s9^<*m*> by A7;
      then
A15:  H is_immediate_constituent_of H9 by A5,A10,Th7;
A16:  H = (tree_of_subformulae(F)).(t9^<*m*>) & t9^<*m*> in dom
      tree_of_subformulae(F)
      proof
A17:    H9 <> VERUM(A) by A15,QC_LANG2:41;
        now
          per cases by A15,A17,QC_LANG1:9,QC_LANG2:47;
          suppose
A18:        H9 is negative;
            then H = the_argument_of H9 & m = 0 by A5,A14,A10,Th21;
            hence thesis by A13,A18,Th24;
          end;
          suppose
A19:        H9 is conjunctive;
            then H = the_left_argument_of H9 & m = 0 or H =
            the_right_argument_of H9 & m = 1 by A5,A14,A10,Th22;
            hence thesis by A13,A19,Th25;
          end;
          suppose
A20:        H9 is universal;
            then H = the_scope_of H9 & m = 0 by A5,A14,A10,Th23;
            hence thesis by A13,A20,Th26;
          end;
        end;
        hence thesis;
      end;
      t^s = t9^<*m*> by A7,A12,FINSEQ_1:32;
      hence thesis by A16,Def3;
    end;
  end;
A21: P[0]
  proof
    let F,G,H,t,s;
    assume that
A22: G = (tree_of_subformulae(F)).t and
A23: H = (tree_of_subformulae(G)).s and
A24: len s = 0;
A25: s = {} by A24;
    then
A26: t^s = t by FINSEQ_1:34;
    H = G by A23,A25,Def2;
    hence thesis by A22,A26,Def3;
  end;
  for k holds P[k] from NAT_1:sch 2(A21,A1);
  then
A27: G = (tree_of_subformulae(F)).t & H = (tree_of_subformulae(G)).s & len s
  = len s implies t^s in F-entry_points_in_subformula_tree_of H;
  assume t in F-entry_points_in_subformula_tree_of G & s in G
  -entry_points_in_subformula_tree_of H;
  hence thesis by A27,Def3;
end;
