reserve Al for QC-alphabet;
reserve a,b,c,d for object,
  i,k,n for Nat,
  p,q for Element of CQC-WFF(Al),
  x,y,y1 for bound_QC-variable of Al,
  A for non empty set,
  J for interpretation of Al,A,
  v,w for Element of Valuations_in(Al,A),
  f,g for Function,
  P,P9 for QC-pred_symbol of k,Al,
  ll,ll9 for CQC-variable_list of k,Al,
  l1 for FinSequence of QC-variables(Al),
  Sub,Sub9,Sub1 for CQC_Substitution of Al,
  S,S9,S1,S2 for Element of CQC-Sub-WFF(Al),
  s for QC-symbol of Al;
reserve vS,vS1,vS2 for Val_Sub of A,Al;
reserve B for Element of [:QC-Sub-WFF(Al),bound_QC-variables(Al):],
  SQ for second_Q_comp of B;
reserve B for CQC-WFF-like Element of [:QC-Sub-WFF(Al),
  bound_QC-variables(Al):],
  xSQ for second_Q_comp of [S,x],
  SQ for second_Q_comp of B;
reserve B1 for Element of [:QC-Sub-WFF(Al),bound_QC-variables(Al):];
reserve SQ1 for second_Q_comp of B1;

theorem Th39:
  [S,x] is quantifiable & not x in rng RestrictSub(x,All(x,S`1),
xSQ) implies not S_Bound(@CQCSub_All([S,x],xSQ)) in rng RestrictSub(x,All(x,S`1
  ),xSQ)
proof
  set S1 = CQCSub_All([S,x],xSQ);
  assume that
A1: [S,x] is quantifiable and
A2: not x in rng RestrictSub(x,All(x,S`1),xSQ);
A3: S1 = Sub_All([S,x],xSQ) by A1,Def5;
  then
A4: S1`1 = All([S,x]`2,([S,x]`1)`1) by A1,Th26;
  then
A5: S1`1 = All(x,([S,x]`1)`1);
  set finSub = RestrictSub(bound_in S1`1,S1`1,S1`2);
A6: S1 = @S1 by SUBSTUT1:def 35;
  S1`1 = All(x,([S,x]`1)`1) by A4;
  then
A7: bound_in(S1`1) = x by QC_LANG2:7;
  S1`2 = xSQ by A1,A3,Th26;
  then not bound_in(S1`1) in rng finSub by A2,A7,A5;
  hence thesis by A2,A7,A6,SUBSTUT1:def 36;
end;
