reserve A for QC-alphabet;
reserve i,j,k,l,m,n for Nat;
reserve a,b,e for set;
reserve t,u,v,w,z for QC-symbol of A;
reserve p,q,r,s for Element of CQC-WFF(A);
reserve x for Element of bound_QC-variables(A);
reserve ll for CQC-variable_list of k,A;
reserve P for QC-pred_symbol of k,A;
reserve f,h for Element of Funcs(bound_QC-variables(A),bound_QC-variables(A)),
  K,L for Element of Fin bound_QC-variables(A);

theorem Th34:
  [q,t,K,f] in SepQuadruples p implies [q,t,K,f] = [p,index p,{}.
bound_QC-variables(A),id bound_QC-variables(A)] or ['not' q,t,K,f]
in SepQuadruples p or (ex r st [q '&' r, t, K,f] in SepQuadruples p) or
  (ex r,u st t = u+QuantNbr r & [r '&' q,u,K,f] in SepQuadruples p) or
  ex x,u,h st u++ = t & h +*({x} --> x.u) = f & ([All(x,q),u,K,h]
  in SepQuadruples p or [All(x,q),u,K\{x},h] in SepQuadruples p)
proof
  assume that
A1: [q,t,K,f] in SepQuadruples p and
A2: [q,t,K,f] <> [p,index p,{}.bound_QC-variables(A),id bound_QC-variables(A)]
 and
A3: not ['not' q,t,K,f] in SepQuadruples p and
A4: not ex r st [q '&' r, t, K,f] in SepQuadruples p and
A5: not ex r,u st t = u+QuantNbr r & [r '&' q,u,K,f] in SepQuadruples p and
A6: not ex x,u,h st u++ = t & h +*({x} --> x.u) = f & ([All(x,q),u,K,h]
  in SepQuadruples p or [All(x,q),u,K\{x},h] in SepQuadruples p);
  reconsider Y = SepQuadruples p \ {[q,t,K,f]} as Subset of [:CQC-WFF(A),
  QC-symbols(A), Fin bound_QC-variables(A), Funcs(bound_QC-variables(A),
  bound_QC-variables(A)):];
A7: SepQuadruples(p) is_Sep-closed_on p by Def13;
A8: for q,t,K,f holds ['not' q,t,K,f] in Y implies [q,t,K,f] in Y
  proof
    let s,u,L,h;
    assume
A9: ['not' s,u,L,h] in Y;
    then s <> q or u <> t or L <> K or f <> h by A3,XBOOLE_0:def 5;
    then
A10: [s,u,L,h] <> [q,t,K,f] by XTUPLE_0:5;
    ['not' s,u,L,h] in SepQuadruples p by A9,XBOOLE_0:def 5;
    then [s,u,L,h] in SepQuadruples p by A7;
    hence thesis by A10,ZFMISC_1:56;
  end;
A11: for q,r,t,K,f holds [q '&' r,t,K,f] in Y implies [q,t,K,f] in Y & [r,t+
  QuantNbr(q),K,f] in Y
  proof
    let s,r,u,L,h;
    assume [s '&' r,u,L,h] in Y;
    then
A12: [s '&' r,u,L,h] in SepQuadruples p by XBOOLE_0:def 5;
    then s <> q or u <> t or L <> K or f <> h by A4;
    then
A13: [s,u,L,h] <> [q,t,K,f] by XTUPLE_0:5;
    [s,u,L,h] in SepQuadruples p by A7,A12;
    hence [s,u,L,h] in Y by A13,ZFMISC_1:56;
    r <> q or L <> K or f <> h or u+QuantNbr(s) <> t by A5,A12;
    then
A14: [r,u+QuantNbr(s),L,h] <> [q,t,K,f] by XTUPLE_0:5;
    [r,u+QuantNbr(s),L,h] in SepQuadruples p by A7,A12;
    hence thesis by A14,ZFMISC_1:56;
  end;
A15: Y c= SepQuadruples p by XBOOLE_1:36;
A16: for q,x,t,K,f st [All(x,q),t,K,f] in Y holds [q,t++,K \/ {x}, f+*(x
  .--> x.t)] in Y
  proof
    let s,x,u,L,h;
    assume
A17: [All(x,s),u,L,h] in Y;
    now
      assume that
A18:  not [All(x,q),u,K,h] in SepQuadruples p and
A19:  not [All(x,q),u,K\{x},h] in SepQuadruples p;
A20:  s <> q or L <> K & L <> K \ {x} by A17,A18,A19,XBOOLE_0:def 5;
      assume
A21:  s = q;
      assume
A22:  L \/ {x} = K;
      then K \ {x} = L \ {x} by XBOOLE_1:40;
      hence contradiction by A20,A21,A22,ZFMISC_1:40,57;
    end;
    then s<>q or u++<>t or L \/ {x} <> K or f <> h+*({x} --> x.u) by A6;
    then
A23: [s,u++,L \/ {x}, h+*(x .--> x.u)] <> [q,t,K,f] by XTUPLE_0:5;
    [All(x,s),u,L,h] in SepQuadruples p by A17,XBOOLE_0:def 5;
    then [s,u++,L \/ {x}, h+*(x .--> x.u)] in SepQuadruples p by A7;
    hence thesis by A23,ZFMISC_1:56;
  end;
  [p,index p, {}.bound_QC-variables(A),id(bound_QC-variables(A))] in
  SepQuadruples p by A7;
  then [p,index p, {}.bound_QC-variables(A),id(bound_QC-variables(A))] in Y
   by A2,ZFMISC_1:56;
  then Y is_Sep-closed_on p by A8,A11,A16;
  then SepQuadruples p c= Y by Def13;
  then Y = SepQuadruples p by A15;
  hence contradiction by A1,ZFMISC_1:57;
end;
