reserve Al for QC-alphabet,
     PHI for Consistent Subset of CQC-WFF(Al),
     PSI for Subset of CQC-WFF(Al),
     p,q,r,s for Element of CQC-WFF(Al),
     A for non empty set,
     J for interpretation of Al,A,
     v for Element of Valuations_in(Al,A),
     m,n,i,j,k for Element of NAT,
     l for CQC-variable_list of k,Al,
     P for QC-pred_symbol of k,Al,
     x,y for bound_QC-variable of Al,
     z for QC-symbol of Al,
     Al2 for Al-expanding QC-alphabet;
reserve J2 for interpretation of Al2,A,
        Jp for interpretation of Al,A,
        v2 for Element of Valuations_in(Al2,A),
        vp for Element of Valuations_in(Al,A);

theorem Th12:
  for PSI being Consistent Subset of CQC-WFF(Al)
  ex THETA being Consistent Subset of CQC-WFF(Al)
  st THETA is negation_faithful & PSI c= THETA
proof
  let PSI be Consistent Subset of CQC-WFF(Al);
  set U = { PHI : PSI c= PHI };
A1: PSI in U;
  ( for Z being set st Z c= U & Z is c=-linear holds ex Y being set st
   ( Y in U & ( for X being set st X in Z holds X c= Y ) ) )
  proof
    let Z be set such that
A2: Z c= U & Z is c=-linear;
    per cases;
    suppose
A3:   Z is empty;
      PSI in U & for X being set st X in Z holds X c= PSI by A3;
      hence thesis;
    end;
    suppose
A4:   Z is non empty;
      set Y = union Z;
A5:   PSI c= Y
      proof
        let z be object such that
A6:     z in PSI;
        consider X being object such that
A7:     X in Z by A4, XBOOLE_0:7;
        X in U by A2,A7;
        then ex R being Consistent Subset of CQC-WFF(Al) st X = R & PSI c= R;
        hence z in Y by A6,A7,TARSKI:def 4;
      end;
A8:   Y is Consistent Subset of CQC-WFF(Al)
      proof
        for X being set st X in Z holds X c= CQC-WFF(Al)
        proof
          let X be set such that
A9:       X in Z;
          X in U by A2,A9;
          then ex R being Consistent Subset of CQC-WFF(Al) st X = R & PSI c= R;
          hence X c= CQC-WFF(Al);
        end;
        then reconsider Y as Subset of CQC-WFF(Al) by ZFMISC_1:76;
        Y is Consistent
        proof
          assume Y is Inconsistent;
          then consider X being Subset of CQC-WFF(Al) such that
A10:       X c= Y & X is finite & X is Inconsistent by HENMODEL:7;
          ex Rs being finite Subset of Z st for x being set st x in X holds
          ex R being set st R in Rs & x in R
          proof
            defpred R[set] means ex Rs being finite Subset of Z
              st for x being set st x in $1 holds
              ex R being set st R in Rs & x in R;
A11:        R[ {} ]
            proof
              consider Rs being object such that
A12:          Rs in Z by A4, XBOOLE_0:7;
              set Rss = {Rs};
              reconsider Rss as finite Subset of Z by A12,ZFMISC_1:31;
              for x being set st x in {} ex R being set st R in Rss & x in R;
              hence thesis;
            end;
A13:         for x,B being set st x in X & B c= X & R[B] holds R[B \/ {x}]
            proof
              let x,B being set such that
A14:            x in X & B c= X & R[B];
              consider Rs being finite Subset of Z such that
A15:          for b being set st b in B holds ex R being set st
               R in Rs & b in R by A14;
              consider S being set such that
A16:           (x in S & S in Z) by A10,A14,TARSKI:def 4;
              set Rss = Rs \/ {S};
              Rs c= Z & {S} c= Z by A16, ZFMISC_1:31;
              then
A17:          Rss c= Z by XBOOLE_1:8;
              for y being set st y in B \/ {x} holds ex R being set
              st R in Rss & y in R
              proof
                let y be set such that
A18:              y in B \/ {x};
                per cases by A18,XBOOLE_0:def 3;
                suppose y in {x};
                  then
A19:              y = x by TARSKI:def 1;
                  S in {S} by TARSKI:def 1;
                  then S in Rss by XBOOLE_0:def 3;
                  hence thesis by A16,A19;
                end;
                suppose y in B;
                  then consider R being set such that
A20:               R in Rs & y in R by A15;
                  R in Rss by A20, XBOOLE_0:def 3;
                  hence thesis by A20;
                end;
              end;
              hence thesis by A17;
            end;
A21:         X is finite by A10;
            R[X] from FINSET_1:sch 2(A21,A11,A13);
            hence thesis;
          end;
          then consider Rs being finite Subset of Z such that
A22:       for x being set st x in X holds ex R being set st R in Rs & x in R;
          defpred F[set] means $1 is non empty implies union $1 in $1;
A23:       Rs is finite;
A24:       F[{}];
A25:       for x,B being set st x in Rs & B c= Rs & F[B] holds F[B \/ {x}]
          proof
            let x,B be set such that
A26:        x in Rs & B c= Rs & F[B];
            per cases;
            suppose
A27:          B is empty;
A28:          union (B \/ {x}) = x by A27,ZFMISC_1:25;
              thus thesis by A27,A28,TARSKI:def 1;
            end;
            suppose
A29:          B is non empty;
              per cases by A2,A26,A29,ORDINAL1:def 8,XBOOLE_0:def 9;
              suppose
A30:            x c= union B;
                union (B \/ {x}) = union B \/ union {x} by ZFMISC_1:78
                     .= union B \/ x by ZFMISC_1:25
                     .= union B by A30,XBOOLE_1:12;
                hence thesis by A26,A29,XBOOLE_0:def 3;
              end;
              suppose
A31:            union B c= x;
A32:            x in {x} by TARSKI:def 1;
                union (B \/ {x}) = union B \/ union {x} by ZFMISC_1:78
                     .= union B \/ x by ZFMISC_1:25
                     .= x by A31, XBOOLE_1:12;
                hence thesis by A32,XBOOLE_0:def 3;
              end;
            end;
          end;
A33:      F[Rs] from FINSET_1:sch 2(A23,A24,A25);
          X is non empty
          proof
            assume
A34:        X is empty;
            X |- 'not' VERUM(Al) by A10,HENMODEL:6;
            then X \/ {VERUM(Al)} is Inconsistent  &
            X \/ {VERUM(Al)} = {VERUM(Al)} by A34,HENMODEL:10;
            hence contradiction by HENMODEL:13;
          end;
          then consider x being object such that
A35:        x in X by XBOOLE_0:def 1;
          ex R being set st R in Rs & x in R by A22,A35;
          then union Rs in Z by A33;
          then union Rs in U by A2;
          then consider uRs being Consistent Subset of CQC-WFF(Al) such that
A36:       union Rs = uRs & PSI c= uRs;
          for x being object st x in X holds x in uRs
          proof
            let x be object such that
A37:         x in X;
           ex R being set st R in Rs & x in R by A22,A37;
           hence thesis by A36,TARSKI:def 4;
          end;
          then
A38:      X c= uRs;
          consider f being FinSequence of CQC-WFF(Al) such that
A39:       rng f c= X & |- f^<*'not' VERUM(Al)*>
           by A10,HENMODEL:def 1, GOEDELCP:24;
          rng f c= uRs by A38,A39;
          hence contradiction by A39,HENMODEL:def 1,GOEDELCP:24;
        end;
        hence thesis;
      end;
      Y in U & for X being set st X in Z holds X c= Y by A5,A8,ZFMISC_1:74;
      hence thesis;
    end;
  end;
  then consider THETA being set such that
A40: (THETA in U & (for Z being set st Z in U & Z <> THETA holds
     not THETA c= Z )) by A1,ORDERS_1:65; ::Zorns Lemma
A41: ex PHI st PHI = THETA & PSI c= PHI by A40;
  then reconsider THETA as Consistent Subset of CQC-WFF(Al);
A42: for p holds (p in THETA or 'not' p in THETA)
  proof
    let p;
    per cases by Th11;
    suppose
A43:   THETA \/ {p} is Consistent;
      assume
A44:   not p in THETA;
      p in {p} by TARSKI:def 1;
      then
A45:  p in THETA \/ {p} & not p in THETA by XBOOLE_0:def 3, A44;
      PSI c= THETA \/ {p} by A41,XBOOLE_1:10;
      then THETA \/ {p} in U by A43;
      hence thesis by A40,A45,XBOOLE_1:10;
    end;
    suppose
A46:   THETA \/ {'not' p} is Consistent;
      'not' p in THETA
      proof
        assume
A47:    not ('not' p in THETA);
        'not' p in {'not' p} by TARSKI:def 1;
        then
A48:    'not' p in THETA \/ {'not' p} & not 'not' p in THETA
         by XBOOLE_0:def 3, A47;
        PSI c= THETA \/ {'not' p} by A41,XBOOLE_1:10;
        then THETA \/ {'not' p} in U by A46;
        hence thesis by A40,A48,XBOOLE_1:10;
      end;
      hence thesis;
    end;
  end;
  for p holds THETA |- p or THETA |- 'not' p
  proof
    let p;
    p in THETA or 'not' p in THETA by A42;
    hence thesis by GOEDELCP:21;
  end;
  then THETA is negation_faithful by GOEDELCP:def 1;
  hence thesis by A41;
end;
