reserve k,m,n for Element of NAT,
  a,X,Y for set,
  D,D1,D2 for non empty set;
reserve p,q for FinSequence of NAT;
reserve x,y,z,t for Variable;
reserve F,F1,G,G1,H,H1 for ZF-formula;
reserve sq,sq9 for FinSequence;
reserve L,L9 for FinSequence;
reserve j,j1 for Element of NAT;

theorem Th71:
  F is_proper_subformula_of All(x,H) implies F is_subformula_of H
proof
  assume that
A1: F is_subformula_of All(x,H) and
A2: F <> All(x,H);
  consider n,L such that
A3: 1 <= n and
A4: len L = n and
A5: L.1 = F and
A6: L.n = All(x,H) and
A7: for k st 1 <= k & k < n ex H1,F1 st L.k = H1 & L.(k + 1) = F1 & H1
  is_immediate_constituent_of F1 by A1;
  1 < n by A2,A3,A5,A6,XXREAL_0:1;
  then 1 + 1 <= n by NAT_1:13;
  then consider k be Nat such that
A8: n = 2 + k by NAT_1:10;
  reconsider k as Element of NAT by ORDINAL1:def 12;
  reconsider L1 = L|(Seg(1 + k)) as FinSequence by FINSEQ_1:15;
  take m = 1 + k, L1;
  thus
A9: 1 <= m by NAT_1:11;
  1 + k <= 1 + k + 1 by NAT_1:11;
  hence len L1 = m by A4,A8,FINSEQ_1:17;
A10: now
    let j be Nat;
    assume 1 <= j & j <= m;
    then j in { j1 where j1 is Nat : 1 <= j1 & j1 <= 1 + k };
    then j in Seg(1 + k) by FINSEQ_1:def 1;
    hence L1.j = L.j by FUNCT_1:49;
  end;
  hence L1.1 = F by A5,A9;
  m < m + 1 by NAT_1:13;
  then consider F1,G1 such that
A11: L.m = F1 and
A12: L.(m + 1) = G1 & F1 is_immediate_constituent_of G1 by A7,A8,NAT_1:11;
  F1 = H by A6,A8,A12,Th54;
  hence L1.m = H by A9,A10,A11;
  let j;
  assume that
A13: 1 <= j and
A14: j < m;
  m <= m + 1 by NAT_1:11;
  then j < n by A8,A14,XXREAL_0:2;
  then consider F1,G1 such that
A15: L.j = F1 & L.(j + 1) = G1 & F1 is_immediate_constituent_of G1 by A7,A13;
  take F1,G1;
  1 <= 1 + j & j + 1 <= m by A13,A14,NAT_1:13;
  hence thesis by A10,A13,A14,A15;
end;
