reserve Al for QC-alphabet;
reserve a,b,b1 for object,
  i,j,k,n for Nat,
  p,q,r,s for Element of CQC-WFF(Al),
  x,y,y1 for bound_QC-variable of Al,
  P for QC-pred_symbol of k,Al,
  l,ll for CQC-variable_list of k,Al,
  Sub,Sub1 for CQC_Substitution of Al,
  S,S1,S2 for Element of CQC-Sub-WFF(Al),
  P1,P2 for Element of QC-pred_symbols(Al);
reserve F1,F2,F3 for QC-formula of Al,
  L for FinSequence;

theorem
  for n,p st (for q st q is_subformula_of p holds QuantNbr(q) = n) holds n = 0
proof
  let n,p such that
A1: for q st q is_subformula_of p holds QuantNbr(q) = n;
  defpred P[Element of CQC-WFF(Al)] means
   $1 is_subformula_of p implies QuantNbr($1) = 0;
A2: for x, r st P[r] holds P[All(x, r)]
  proof
    let x,r such that
    P[r];
    now
      assume
A3:   All(x, r) is_subformula_of p;
      r is_immediate_constituent_of All(x,r) by QC_LANG2:46;
      then r is_proper_subformula_of p by A3,QC_LANG2:63;
      then r is_subformula_of p by QC_LANG2:def 21;
      then
A4:   QuantNbr(r) = n by A1;
      QuantNbr(All(x,r)) = n by A1,A3;
      then n+(-n) = 1+n+(-n) by A4,CQC_SIM1:18;
      hence contradiction;
    end;
    hence thesis;
  end;
A5: for r,s st P[r] & P[s] holds P[r '&' s]
  proof
    let r,s such that
A6: ( P[r])& P[s];
    assume
A7: r '&' s is_subformula_of p;
    s is_immediate_constituent_of r '&' s by QC_LANG2:45;
    then
A8: s is_proper_subformula_of p by A7,QC_LANG2:63;
    r is_immediate_constituent_of r '&' s by QC_LANG2:45;
    then r is_proper_subformula_of p by A7,QC_LANG2:63;
    then QuantNbr(r '&' s) = 0+0 by A6,A8,CQC_SIM1:17,QC_LANG2:def 21;
    hence thesis;
  end;
  for r st P[r] holds P['not' r]
  proof
    let r such that
A9: P[r];
A10: r is_immediate_constituent_of 'not' r by QC_LANG2:43;
    assume 'not' r is_subformula_of p;
    then r is_proper_subformula_of p by A10,QC_LANG2:63;
    hence thesis by A9,CQC_SIM1:16,QC_LANG2:def 21;
  end;
  then
A11: for r,s,x,k for l being CQC-variable_list of k,Al for P being
QC-pred_symbol of k,Al holds P[VERUM(Al)] & P[P!l] &
(P[r] implies P['not' r]) & (P[r] & P[s] implies P[r '&' s]) &
(P[r] implies P[All(x, r)]) by A5,A2,CQC_SIM1:14,15;
A12: for r holds P[r] from CQC_LANG:sch 1(A11);
  QuantNbr(p) = n by A1;
  hence thesis by A12;
end;
