reserve Al for QC-alphabet;
reserve b,c,d for set,
  X,Y for Subset of CQC-WFF(Al),
  i,j,k,m,n for Nat,
  p,p1,q,r,s,s1 for Element of CQC-WFF(Al),
  x,x1,x2,y,y1 for bound_QC-variable of Al,
  A for non empty set,
  J for interpretation of Al, A,
  v for Element of Valuations_in(Al,A),
  f1,f2 for FinSequence of CQC-WFF(Al),
  CX,CY,CZ for Consistent Subset of CQC-WFF(Al),
  JH for Henkin_interpretation of CX,
  a for Element of A,
  t,u for QC-symbol of Al;
reserve L for PATH of q,p,
  F1,F3 for QC-formula of Al,
  a for set;

theorem Th16:
  for n st for p st QuantNbr(p) <= n holds
  (CX is negation_faithful & CX is with_examples
  implies (JH,valH(Al) |= p iff CX |- p)) holds
  for p st QuantNbr(p) <= n+1 holds
  (CX is negation_faithful & CX is with_examples
  implies (JH,valH(Al) |= p iff CX |- p))
proof
  let n such that
A1: for p st QuantNbr(p) <= n holds
  CX is negation_faithful & CX is with_examples
  implies (JH,valH(Al) |= p iff CX |- p);
  let p such that
A2: QuantNbr(p) <= n+1 and
A3: CX is negation_faithful and
A4: CX is with_examples;
A5: QuantNbr(p) <= n implies thesis by A1,A3,A4;
  now
    assume
A6: QuantNbr(p) = n+1;
    then consider q such that
A7: q is_subformula_of p and
A8: QuantNbr(q) = 1 by NAT_1:11,SUBSTUT2:34;
    set L =the  PATH of q,p;
A9: 1 <= len L by A7,SUBSTUT2:def 5;
    defpred P[Nat] means 1 <= $1 & $1 <= len L implies
    ex p1 st p1 = L.$1 & QuantNbr(q) <= QuantNbr(p1) &
    (CX |- p1 iff JH,valH(Al) |= p1);
A10: P[0];
A11: for k st P[k] holds P[k + 1]
    proof
      let k such that
A12:  P[k];
      assume that
A13:  1 <= k+1 and
A14:  k+1 <= len L;
      set j = k+1;
A15:  now
        assume k = 0;
        then
A16:    L.j = q by A7,SUBSTUT2:def 5;
        take q;
        JH,valH(Al) |= q iff CX |- q by A3,A4,A8,Th15;
        hence thesis by A16;
      end;
      now
        assume k <> 0;
        then 0 < k by NAT_1:3;
        then
A17:    0+1 <= k by NAT_1:13;
        k < len L by A14,NAT_1:13;
        then consider G1,H1 being Element of QC-WFF(Al) such that
A18:    L.k = G1 and
A19:    L.j = H1 and
A20:    G1 is_immediate_constituent_of H1 by A7,A17,SUBSTUT2:def 5;
        consider p1 such that
A21:    QuantNbr(q) <= QuantNbr(p1) and
A22:    p1 = L.k and
A23:    CX |- p1 iff JH,valH(Al) |= p1 by A12,A14,A17,NAT_1:13;
A24:    ex F3 st ( F3 = L.j)&( F3 is_subformula_of p) by A7,A13,A14,SUBSTUT2:27
        ;
        reconsider s = H1 as Element of CQC-WFF(Al)
        by A7,A13,A14,A19,SUBSTUT2:28;
        take s;
A25:    now
          assume
A26:      s = 'not' p1;
          then
A27:      QuantNbr(q) <= QuantNbr(s) by A21,CQC_SIM1:16;
CX |- s iff JH,valH(Al) |= s by A3,A23,A26,HENMODEL:def 2,VALUAT_1:17;
          hence thesis by A19,A27;
        end;
A28:    QuantNbr(s) <= n+1 by A6,A19,A24,SUBSTUT2:30;
A29:    now
          given F1 such that
A30:      s = p1 '&' F1;
          reconsider F1 as Element of CQC-WFF(Al) by A30,CQC_LANG:9;
A31:      QuantNbr(s) = QuantNbr(p1) + QuantNbr(F1) by A30,CQC_SIM1:17;
          then 1+QuantNbr(F1) <= QuantNbr(s) by A8,A21,XREAL_1:6;
          then 1+QuantNbr(F1) <= n+1 by A28,XXREAL_0:2;
          then QuantNbr(F1)+1+(-1) <= n+1+(-1) by XREAL_1:6;
          then CX |- F1 iff JH,valH(Al) |= F1 by A1,A3,A4;
          then
A32:      CX |- s iff JH,valH(Al) |= s by A23,A30,Th6,VALUAT_1:18;
          QuantNbr(p1) <= QuantNbr(s) by A31,NAT_1:11;
          then QuantNbr(q) <= QuantNbr(s) by A21,XXREAL_0:2;
          hence thesis by A19,A32;
        end;
A33:    now
          given F1 such that
A34:      s = F1 '&' p1;
          reconsider F1 as Element of CQC-WFF(Al) by A34,CQC_LANG:9;
A35:      QuantNbr(s) = QuantNbr(p1) + QuantNbr(F1) by A34,CQC_SIM1:17;
          then 1+QuantNbr(F1) <= QuantNbr(s) by A8,A21,XREAL_1:6;
          then 1+QuantNbr(F1) <= n+1 by A28,XXREAL_0:2;
          then QuantNbr(F1)+1+(-1) <= n+1+(-1) by XREAL_1:6;
          then CX |- F1 iff JH,valH(Al) |= F1 by A1,A3,A4;
          then
A36:      CX |- s iff JH,valH(Al) |= s by A23,A34,Th6,VALUAT_1:18;
          QuantNbr(p1) <= QuantNbr(s) by A35,NAT_1:11;
          then QuantNbr(q) <= QuantNbr(s) by A21,XXREAL_0:2;
          hence thesis by A19,A36;
        end;
        now
          given x such that
A37:      s = All(x,p1);
A38:      QuantNbr(s) = QuantNbr(p1) + 1 by A37,CQC_SIM1:18;
          then QuantNbr(p1) < n+1 by A28,NAT_1:13;
          then QuantNbr(p1) <= n by NAT_1:13;
          then
A39:      QuantNbr('not' p1) <= n by CQC_SIM1:16;
A40:      QuantNbr(q) <= QuantNbr(s) by A21,A38,NAT_1:13;
A41:      now
            assume JH,valH(Al) |= Ex(x,'not' p1);
            then consider y such that
A42:        JH,valH(Al) |= ('not' p1).(x,y) by Th10;
            QuantNbr(('not' p1).(x,y)) <= n by A39,Th14;
            then CX |- ('not' p1).(x,y) by A1,A3,A4,A42;
            hence CX |- Ex(x,'not' p1) by A4,Th3;
          end;
          now
            assume CX |- Ex(x,'not' p1);
            then consider y such that
A43:        CX |- ('not' p1).(x,y) by A4,Th3;
            QuantNbr(('not' p1).(x,y)) <= n by A39,Th14;
            then JH,valH(Al) |= ('not' p1).(x,y) by A1,A3,A4,A43;
            hence JH,valH(Al) |= Ex(x,'not' p1) by Th10;
          end;
          then JH,valH(Al) |= 'not' Ex(x,'not' p1) iff
          CX |- 'not' Ex(x,'not' p1 )
          by A3,A41,HENMODEL:def 2,VALUAT_1:17;
          then JH,valH(Al) |= s iff CX |- s by A37,Th11,Th12;
          hence thesis by A19,A40;
        end;
        hence thesis by A18,A20,A22,A25,A29,A33,QC_LANG2:def 19;
      end;
      hence thesis by A15;
    end;
    for k holds P[k] from NAT_1:sch 2(A10,A11);
    then ex p1 st ( p1 = L.(len L))&( QuantNbr(q) <= QuantNbr(p1))&(
    CX |- p1 iff JH,valH(Al) |= p1) by A9;
    hence thesis by A7,SUBSTUT2:def 5;
  end;
  hence thesis by A2,A5,NAT_1:8;
end;
