reserve X,Y for set, x,y,z for object, i,j,n for natural number;

theorem Th21:
  for n being non empty natural number, X being set
  for J being non empty Signature
  ex Q being non empty non void n PC-correct QC-correct
  QCLangSignature over X st
  the carrier of Q misses the carrier of J &
  the carrier' of Q misses the carrier' of J
  proof
    let n be non empty natural number, X be set;
    let J be non empty Signature;
    set Q = the non empty non void n PC-correct QC-correct
    QCLangSignature over X;
    reconsider A = [:the carrier of Q, {the carrier of J}:] as non empty set;
    reconsider B = [:the carrier' of Q, {the carrier' of J}:] as non empty set;
    reconsider f = pr1(the carrier of Q, {the carrier of J}) as
    Function of A, the carrier of Q;
    reconsider g = pr1(the carrier' of Q, {the carrier' of J}) as
    Function of B, the carrier' of Q;
    f is one-to-one & rng f = the carrier of Q by FUNCT_3:44;
    then reconsider f1 = f" as Function of the carrier of Q, A by FUNCT_2:25;
A1: g is one-to-one & rng g = the carrier' of Q by FUNCT_3:44;
    then reconsider g1 = g" as Function of the carrier' of Q, B by FUNCT_2:25;
    deffunc F(object) = f1*In($1,(the carrier of Q)*);
    consider ff being Function such that
A2: dom ff = (the carrier of Q)* &
    for p being object st p in (the carrier of Q)* holds ff.p = F(p)
    from FUNCT_1:sch 3;
    rng ff c= A*
    proof
      let a be object; assume a in rng ff;
      then consider b being object such that
A3:   b in dom ff & a = ff.b by FUNCT_1:def 3;
A4:   a = F(b) by A2,A3;
      F(b) is FinSequence & rng F(b) c= A;
      then F(b) is FinSequence of A by FINSEQ_1:def 4;
      hence thesis by A4,FINSEQ_1:def 11;
    end;
    then reconsider ff as Function of (the carrier of Q)*,A* by A2,FUNCT_2:2;
    reconsider Ar = (ff*(the Arity of Q))*g as Function of B,A*;
    reconsider re = f1*(the ResultSort of Q)*g as Function of B,A;
A5: the formula-sort of Q in the carrier of Q = dom f1 by FUNCT_2:def 1;
    then reconsider fs = (f1.the formula-sort of Q) as (Element of A)
    by FUNCT_1:102;
    rng(g1*the connectives of Q) c= B;
    then reconsider co = (g1*the connectives of Q) as (FinSequence of B)
    by FINSEQ_1:def 4;
    reconsider qu = (g1*the quantifiers of Q) as Function of
    [:the quant-sort of Q, X:], B;
    set QQ = QCLangSignature(#
    A qua non empty set, B qua non empty set, Ar, re, fs, co,
    (the quant-sort of Q) qua set, qu#);
A6: QQ is n PC-correct
    proof
      rng the connectives of Q c= the carrier' of Q = dom g1
      by FUNCT_2:def 1;
      then
A7:   dom the connectives of QQ = dom the connectives of Q
      = Seg len the connectives of Q by RELAT_1:27,FINSEQ_1:def 3;
      then len the connectives of QQ = len the connectives of Q
      by FINSEQ_1:def 3;
      hence len the connectives of QQ >= n+5 by Def4;
      (the connectives of QQ)|{n,n+1,n+2,n+3,n+4,n+5} =
      g1*((the connectives of Q)|{n,n+1,n+2,n+3,n+4,n+5}) &
      g1 is one-to-one & (the connectives of Q)|{n,n+1,n+2,n+3,n+4,n+5}
      is one-to-one by Def4,RELAT_1:83;
      hence (the connectives of QQ)|{n,n+1,n+2,n+3,n+4,n+5} is one-to-one;
      0 < n <= n+5 <= len the connectives of Q by Def4,NAT_1:12;
      then 0+1 <= n <= len the connectives of Q by NAT_1:13,XXREAL_0:2;
      then
A8:   g1.((the connectives of Q).n) = (the connectives of QQ).n in B = dom g &
      (the connectives of Q).n in the carrier' of Q
      by A7,FUNCT_1:13,102,FUNCT_2:def 1,FINSEQ_3:25;
      1 <= n+4+1 = n+5 <= len the connectives of Q by Def4,NAT_1:12;
      then
A9:   g1.((the connectives of Q).(n+5)) = (the connectives of QQ).(n+5) in B
      = dom g & (the connectives of Q).(n+5) in the carrier' of Q
      by A7,FUNCT_1:13,102,FUNCT_2:def 1,FINSEQ_3:25;
A10:  <*the formula-sort of Q*> in (the carrier of Q)* by FINSEQ_1:def 11;
A11:  <*>the carrier of Q in (the carrier of Q)* by FINSEQ_1:def 11;
A12:  (the connectives of Q).n is_of_type
      <*the formula-sort of Q*>, the formula-sort of Q by Def4;
A13:  (the connectives of Q).(n+5) is_of_type
      {}, the formula-sort of Q by Def4;
      thus (the Arity of QQ).((the connectives of QQ).n)
      = (ff*(the Arity of Q)).(g.((the connectives of QQ).n))
      by A8,FUNCT_1:13
      .= ff.((the Arity of Q).(g.((the connectives of QQ).n)))
      by A8,FUNCT_1:102,FUNCT_2:15
      .= ff.<*the formula-sort of Q*> by A12,A1,A8,FUNCT_1:35
      .= f1*In(<*the formula-sort of Q*>,(the carrier of Q)*) by A2,A10
      .= f1*<*the formula-sort of Q*> by A10,SUBSET_1:def 8
      .= <*the formula-sort of QQ*> by A5,FINSEQ_2:34;
      thus (the ResultSort of QQ).((the connectives of QQ).n)
      = (f1*(the ResultSort of Q)).(g.((the connectives of QQ).n))
      by A8,FUNCT_1:13
      .= f1.((the ResultSort of Q).(g.((the connectives of QQ).n)))
      by A8,FUNCT_1:102,FUNCT_2:15
      .= the formula-sort of QQ by A12,A1,A8,FUNCT_1:35;
      thus (the Arity of QQ).((the connectives of QQ).(n+5))
      = (ff*(the Arity of Q)).(g.((the connectives of QQ).(n+5)))
      by A9,FUNCT_1:13
      .= ff.((the Arity of Q).(g.((the connectives of QQ).(n+5))))
      by A9,FUNCT_1:102,FUNCT_2:15
      .= ff.{} by A13,A1,A9,FUNCT_1:35
      .= f1*In({},(the carrier of Q)*) by A2,A11
      .= f1*{} by A11,SUBSET_1:def 8
      .= {};
      thus (the ResultSort of QQ).((the connectives of QQ).(n+5))
      = (f1*(the ResultSort of Q)).(g.((the connectives of QQ).(n+5)))
      by A9,FUNCT_1:13
      .= f1.((the ResultSort of Q).(g.((the connectives of QQ).(n+5))))
      by A9,FUNCT_1:102,FUNCT_2:15
      .= the formula-sort of QQ by A13,A1,A9,FUNCT_1:35;
      ((the connectives of Q).(n+1) is_of_type
      <*the formula-sort of Q, the formula-sort of Q*>,
      the formula-sort of Q
      & ... &
      (the connectives of Q).(n+4) is_of_type
      <*the formula-sort of Q, the formula-sort of Q*>,
      the formula-sort of Q) by Def4;
      then
A14:  ((the Arity of Q).((the connectives of Q).(n+1)) =
      <*the formula-sort of Q, the formula-sort of Q*> &
      (the ResultSort of Q).((the connectives of Q).(n+1)) =
      the formula-sort of Q)
      & ... &
      ((the Arity of Q).((the connectives of Q).(n+4)) =
      <*the formula-sort of Q, the formula-sort of Q*> &
      (the ResultSort of Q).((the connectives of Q).(n+4)) =
      the formula-sort of Q) by AOFA_A00:def 9;
      let i; assume
A15:  1 <= i <= 4;
      then i <= n+i <= n+4 <= n+4+1 = n+5 <= len the connectives of Q
      by Def4,XREAL_1:6,NAT_1:12;
      then 1 <= n+i <= n+5 <= len the connectives of Q by A15,XXREAL_0:2;
      then 1 <= n+i <= len the connectives of Q by XXREAL_0:2;
      then
A16:  g1.((the connectives of Q).(n+i)) = (the connectives of QQ).(n+i) in B
      = dom g & (the connectives of Q).(n+i) in the carrier' of Q
      by A7,FUNCT_1:13,102,FUNCT_2:def 1,FINSEQ_3:25;
A17:   <*the formula-sort of Q,the formula-sort of Q*> in (the carrier of Q)*
      by FINSEQ_1:def 11;
      thus (the Arity of QQ).((the connectives of QQ).(n+i))
      = (ff*(the Arity of Q)).(g.((the connectives of QQ).(n+i)))
      by A16,FUNCT_1:13
      .= ff.((the Arity of Q).(g.((the connectives of QQ).(n+i))))
      by A16,FUNCT_1:102,FUNCT_2:15
      .= ff.((the Arity of Q).((the connectives of Q).(n+i)))
      by A1,A16,FUNCT_1:35
      .= ff.<*the formula-sort of Q,the formula-sort of Q*> by A15,A14
      .= f1*In(<*the formula-sort of Q,the formula-sort of Q*>,
      (the carrier of Q)*) by A2,A17
      .= f1*<*the formula-sort of Q,the formula-sort of Q*>
      by A17,SUBSET_1:def 8
      .= <*the formula-sort of QQ, the formula-sort of QQ*> by FINSEQ_2:36;
      thus (the ResultSort of QQ).((the connectives of QQ).(n+i))
      = (f1*(the ResultSort of Q)).(g.((the connectives of QQ).(n+i)))
      by A16,FUNCT_1:13
      .= f1.((the ResultSort of Q).(g.((the connectives of QQ).(n+i))))
      by A16,FUNCT_1:102,FUNCT_2:15
      .= f1.((the ResultSort of Q).((the connectives of Q).(n+i)))
      by A1,A16,FUNCT_1:35
      .= the formula-sort of QQ by A15,A14;
    end;
    QQ is QC-correct
    proof
      thus the quant-sort of QQ = {1,2} by Def5;
      the quantifiers of Q is one-to-one by Def5;
      hence the quantifiers of QQ is one-to-one;
      rng co = g1.:rng the connectives of Q & dom g1 = the carrier' of Q &
      rng qu = g1.:rng the quantifiers of Q &
      rng the quantifiers of Q misses rng the connectives of Q
      by Def5,RELSET_2:52,FUNCT_2:def 1;
      hence rng the quantifiers of QQ misses rng the connectives of QQ by Lem6;
      let q,x be object; assume
A18:  q in the quant-sort of QQ & x in X;
      then [q,x] in [:the quant-sort of QQ, X:] by ZFMISC_1:87;
      then
A19:  (the quantifiers of Q).(q,x) in the carrier' of Q = dom g1 &
      (the quantifiers of QQ).(q,x) in B = dom g by FUNCT_2:def 1,5;
A20:  <*the formula-sort of Q*> in (the carrier of Q)* by FINSEQ_1:def 11;
A21:  (the quantifiers of Q).(q,x) is_of_type <*the formula-sort of Q*>,
      the formula-sort of Q by A18,Def5;
      thus (the Arity of QQ).((the quantifiers of QQ).(q,x))
      = (ff*(the Arity of Q)).(g.((the quantifiers of QQ).(q,x)))
      by A19,FUNCT_1:13
      .= ff.((the Arity of Q).(g.((the quantifiers of QQ).(q,x))))
      by A19,FUNCT_1:102,FUNCT_2:15
      .= ff.((the Arity of Q).(g.(g1.((the quantifiers of Q).[q,x]))))
      by A18,ZFMISC_1:87,FUNCT_2:15
      .= ff.<*the formula-sort of Q*> by A21,A1,A19,FUNCT_1:35
      .= f1*In(<*the formula-sort of Q*>,
      (the carrier of Q)*) by A2,A20
      .= f1*<*the formula-sort of Q*>
      by A20,SUBSET_1:def 8
      .= <*the formula-sort of QQ*> by FINSEQ_2:35;
      thus (the ResultSort of QQ).((the quantifiers of QQ).(q,x))
      = (f1*(the ResultSort of Q)).(g.((the quantifiers of QQ).(q,x)))
      by A19,FUNCT_1:13
      .= f1.((the ResultSort of Q).(g.((the quantifiers of QQ).(q,x))))
      by A19,FUNCT_1:102,FUNCT_2:15
      .= f1.((the ResultSort of Q).(g.(g1.((the quantifiers of Q).[q,x]))))
      by A18,ZFMISC_1:87,FUNCT_2:15
      .= the formula-sort of QQ by A21,A1,A19,FUNCT_1:35;
    end;
    then reconsider QQ as non empty non void n PC-correct QC-correct
    QCLangSignature over X by A6;
    take QQ;
    thus the carrier of QQ misses the carrier of J
    proof
      assume the carrier of QQ meets the carrier of J;
      then consider a being object such that
A22:   a in the carrier of QQ & a in the carrier of J by XBOOLE_0:3;
      consider b,c being object such that
A23:   b in the carrier of Q & c in {the carrier of J} & a = [b,c]
      by A22,ZFMISC_1:def 2;
      reconsider c as set by TARSKI:1;
      c in {b,c} in {{b,c},{b}} in c by A22,A23,TARSKI:def 1,def 2;
      hence contradiction by XREGULAR:7;
    end;
    thus the carrier' of QQ misses the carrier' of J
    proof
      assume the carrier' of QQ meets the carrier' of J;
      then consider a being object such that
A24:   a in the carrier' of QQ & a in the carrier' of J by XBOOLE_0:3;
      consider b,c being object such that
A25:   b in the carrier' of Q & c in {the carrier' of J} & a = [b,c]
      by A24,ZFMISC_1:def 2;
      reconsider c as set by TARSKI:1;
      c in {b,c} in {{b,c},{b}} in c by A24,A25,TARSKI:def 1,def 2;
      hence contradiction by XREGULAR:7;
    end;
  end;
