reserve Al for QC-alphabet;
reserve PHI for Consistent 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 Nat,
        l for CQC-variable_list of k,Al,
        P for QC-pred_symbol of k,Al,
        x,y,z for bound_QC-variable of Al,
        b for QC-symbol of Al,
        PR for FinSequence of [:set_of_CQC-WFF-seq(Al),Proof_Step_Kinds:];
reserve Al2 for Al-expanding QC-alphabet,
        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 p holds still_not-bound_in p = still_not-bound_in (Al2-Cast(p))
proof
  defpred A[Element of CQC-WFF(Al)] means still_not-bound_in $1 =
   still_not-bound_in (Al2-Cast($1));
A1: A[VERUM(Al)]
  proof
    thus still_not-bound_in VERUM(Al) = {} by QC_LANG3:3
        .= still_not-bound_in VERUM(Al2) by QC_LANG3:3
        .= still_not-bound_in (Al2-Cast(VERUM(Al)));
  end;
A2: for k,P,l holds A[P!l]
  proof
   let k,P,l;
A3: still_not-bound_in l = still_not-bound_in Al2-Cast(l)
   proof
     for x being object st x in still_not-bound_in l holds
      x in still_not-bound_in Al2-Cast(l)
     proof
       let x be object such that
A4:     x in still_not-bound_in l;
       consider n such that
A5:     x = l.n & 1 <= n & n <= len l & l.n in bound_QC-variables(Al) by A4;
       set y = l.n;
       reconsider y as bound_QC-variable of Al by A5;
       y = Al2-Cast(y);
       hence thesis by A5;
     end;
     hence still_not-bound_in l c= still_not-bound_in Al2-Cast(l);
     for x being object st x in still_not-bound_in Al2-Cast(l) holds
      x in still_not-bound_in l
     proof
       let x be object such that
A6:     x in still_not-bound_in Al2-Cast(l);
       consider n such that
A7:     x = Al2-Cast(l).n & 1 <= n & n <= len (Al2-Cast(l)) &
        Al2-Cast(l).n in bound_QC-variables(Al2) by A6;
       set y = Al2-Cast(l).n;
       rng l c= bound_QC-variables(Al) & dom l = Seg (len l) by FINSEQ_1:def 3;
       then y = l.n & n in dom l & l is FinSequence of bound_QC-variables(Al)
        by A7,FINSEQ_1:1,def 4;
       then y in bound_QC-variables(Al) by FINSEQ_2:11;
       hence thesis by A7;
     end;
     hence still_not-bound_in Al2-Cast(l) c= still_not-bound_in l;
   end;
   thus still_not-bound_in (P!l) = still_not-bound_in l by QC_LANG3:5
     .= still_not-bound_in (Al2-Cast(P)!Al2-Cast(l)) by A3,QC_LANG3:5
     .= still_not-bound_in Al2-Cast(P!l) by Th8;
  end;
A8: for p holds A[p] implies A['not' p]
    proof
       let p such that
A9:     A[p];
       thus still_not-bound_in 'not' p
         = still_not-bound_in p by QC_LANG3:7
        .= still_not-bound_in 'not' Al2-Cast(p) by A9,QC_LANG3:7
        .= still_not-bound_in Al2-Cast('not' p);
    end;
A10: for p,q holds A[p] & A[q] implies A[p '&' q]
    proof
       let p,q such that
A11:     A[p] & A[q];
       set p2 = Al2-Cast(p);
       set q2 = Al2-Cast(q);
       reconsider p2,q2 as Element of CQC-WFF(Al2);
       p '&' q is conjunctive & p2 '&' q2 is conjunctive;
       then
A12:   p = the_left_argument_of p '&' q & q = the_right_argument_of p '&' q &
        p2 = the_left_argument_of p2 '&' q2 &
        q2 = the_right_argument_of p2 '&' q2 by QC_LANG1:def 25,def 26;
       hence still_not-bound_in p '&' q
         = still_not-bound_in p \/ still_not-bound_in q
         by QC_LANG1:def 20,QC_LANG3:9
        .= still_not-bound_in Al2-Cast(p '&' q)
         by A11,A12,QC_LANG1:def 20,QC_LANG3:9;
    end;
  for x,p holds A[p] implies A[All(x,p)]
  proof
    let x,p such that
A13: A[p];
    set x2 = Al2-Cast(x);
    set p2 = Al2-Cast(p);
    reconsider p2 as Element of CQC-WFF(Al2);
    reconsider x2 as bound_QC-variable of Al2;
    All(x,p) is universal & All(x2,p2) is universal;
    then
A14: p = the_scope_of All(x,p) & x = bound_in All(x,p) & p2 = the_scope_of
      All(x2,p2) & x2 = bound_in All(x2,p2) by QC_LANG1:def 27, def 28;
    then still_not-bound_in All(x,p)
      = still_not-bound_in p \ {x} by QC_LANG3:11, QC_LANG1:def 21
     .= still_not-bound_in Al2-Cast(All(x,p))
      by A13,A14,QC_LANG1:def 21,QC_LANG3:11;
     hence thesis;
  end;
  then
A15: for p, q, x, k, l, P holds A[VERUM(Al)] & A[P!l] &
     (A[p] implies A['not' p]) & (A[p] & A[q] implies A[p '&' q]) &
     (A[p] implies A[All(x, p)]) by A1,A2,A8,A10;
  for p holds A[p] from CQC_LANG:sch 1(A15);
  hence thesis;
end;
