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);
reserve t for Element of dom tree_of_subformulae(F),
  s for FinSequence;
reserve C for Chain of dom tree_of_subformulae(F);
reserve G for Subformula of F;
reserve t, t9 for Entry_Point_in_Subformula_Tree of G;
reserve G1, G2 for Subformula of F,
  t1 for Entry_Point_in_Subformula_Tree of G1,
  s for Element of dom tree_of_subformulae(G1);
reserve s for FinSequence;

theorem Th39:
  for F,G1,G2 holds { t^s where t is
Entry_Point_in_Subformula_Tree of G1, s is Element of dom tree_of_subformulae(
  G1) : s in G1-entry_points_in_subformula_tree_of G2 } = { t^s where t is
Element of dom tree_of_subformulae(F), s is Element of dom tree_of_subformulae(
  G1) : t in F-entry_points_in_subformula_tree_of G1 & s in G1
  -entry_points_in_subformula_tree_of G2 }
proof
  let F,G1,G2;
  thus { t^s where t is Entry_Point_in_Subformula_Tree of G1, s is Element of
  dom tree_of_subformulae(G1) : s in G1-entry_points_in_subformula_tree_of G2 }
c= { t^s where t is Element of dom tree_of_subformulae(F), s is Element of dom
  tree_of_subformulae(G1) : t in F-entry_points_in_subformula_tree_of G1 & s in
  G1-entry_points_in_subformula_tree_of G2 }
  proof
    let x be object;
    assume x in { t^s where t is Entry_Point_in_Subformula_Tree of G1, s is
    Element of dom tree_of_subformulae(G1) : s in G1
    -entry_points_in_subformula_tree_of G2 };
    then consider
    t1 being Entry_Point_in_Subformula_Tree of G1, s1 being Element
    of dom tree_of_subformulae(G1) such that
A1: x = t1^s1 & s1 in G1-entry_points_in_subformula_tree_of G2;
    (tree_of_subformulae(F)).t1 = G1 by Def5;
    then t1 in F-entry_points_in_subformula_tree_of G1 by Def3;
    hence thesis by A1;
  end;
  thus { t^s where t is Element of dom tree_of_subformulae(F), s is Element of
dom tree_of_subformulae(G1) : t in F-entry_points_in_subformula_tree_of G1 & s
  in G1-entry_points_in_subformula_tree_of G2 } c= { t^s where t is
Entry_Point_in_Subformula_Tree of G1, s is Element of dom tree_of_subformulae(
  G1) : s in G1-entry_points_in_subformula_tree_of G2 }
  proof
    let x be object;
    assume x in { t^s where t is Element of dom tree_of_subformulae(F), s is
    Element of dom tree_of_subformulae(G1) : t in F
    -entry_points_in_subformula_tree_of G1 & s in G1
    -entry_points_in_subformula_tree_of G2 };
    then consider
    t1 being Element of dom tree_of_subformulae(F), s1 being Element
    of dom tree_of_subformulae(G1) such that
A2: x = t1^s1 and
A3: t1 in F-entry_points_in_subformula_tree_of G1 and
A4: s1 in G1-entry_points_in_subformula_tree_of G2;
    (tree_of_subformulae(F)).t1 = G1 by A3,Def3;
    then reconsider t1 as Entry_Point_in_Subformula_Tree of G1 by Def5;
    x = t1^s1 by A2;
    hence thesis by A4;
  end;
end;
