reserve Al for QC-alphabet;
reserve a,b,c,d for object,
  i,j,k,m,n for Nat,
  p,q,r for Element of CQC-WFF(Al),
  x,y,y0 for bound_QC-variable of Al,
  X for Subset of CQC-WFF(Al),
  A for non empty set,
  J for interpretation of Al,A,
  v,w for Element of Valuations_in(Al,A),
  Sub for CQC_Substitution of Al,
  f,f1,g,h,h1 for FinSequence of CQC-WFF(Al);
reserve fin,fin1 for FinSequence;
reserve PR,PR1 for FinSequence of [:set_of_CQC-WFF-seq(Al),Proof_Step_Kinds:];
reserve a for Element of A;

theorem Th49:
  |- f^<*p*>^<*'not' q*> implies |- f^<*q*>^<*'not' p*>
proof
  set f1 = f^<*p*>^<*'not' q*>;
  set f2 = Ant(Ant(f1))^<*q*>^<*p*>^<*'not' q*>;
  assume
A1: |- f1;
A2: Ant(f2) = Ant(Ant(f1))^<*q*>^<*p*> by Th5;
  Suc(f1) = 'not' q by Th5;
  then
A3: Suc(f1) = Suc(f2) by Th5;
A4: Ant(f1) = f^<*p*> by Th5;
  then
A5: Ant(Ant(f1)) = f by Th5;
  Suc(Ant(f1)) = p & 0+1 <= len Ant(f1) by A4,Th5,Th10;
  then
A6: |- f2 by A1,A2,A3,Th13,Th36;
  set f4 = Ant(Ant(f1))^<*q*>^<*'not' p*>^<*'not' p*>;
  set f3 = Ant(Ant(f1))^<*q*>^<*p*>^<*q*>;
A7: 1 < len f4 by Th9;
A8: Ant(f3) = Ant(Ant(f1))^<*q*>^<*p*> by Th5;
  then
A9: 1 < len (Ant(f3)^<*'not' p*>) by Th9;
  Ant(f3) = Ant(Ant(f1))^(<*q*>^<*p*>) by A8,FINSEQ_1:32;
  then
A10: Ant(f3) = Ant(Ant(f1))^<*q,p*> by FINSEQ_1:def 9;
  then (Ant(f3)).(len f+1) = q by A5,Th14;
  then
A11: (Ant(f3)).(len f+1) = Suc(f3) by Th5;
  1 in dom <*q,p*> by Th14;
  then len f+1 in dom (Ant(f3)) by A5,A10,FINSEQ_1:28;
  then
A12: |- f3 by A11,Lm2,Th33;
A13: Suc(Ant(f3)^<*'not' p*>) = 'not' p by Th5;
  then
A14: Suc(Ant(f3)^<*'not' p*>) = Suc(f4) by Th5;
  Ant(f2) = Ant(Ant(f1))^<*q*>^<*p*> by Th5;
  then
A15: Ant(f2) = Ant(f3) by Th5;
  Suc(f2) = 'not' q by Th5;
  then
A16: Suc(f2) = 'not' Suc(f3) by Th5;
A17: Ant(f4) = Ant(Ant(f1))^<*q*>^<*'not' p*> by Th5;
  then Ant(f4) = Ant(Ant(f1))^(<*q*>^<*'not' p*>) by FINSEQ_1:32;
  then
A18: Ant(f4) = Ant(Ant(f1))^<*q,'not' p*> by FINSEQ_1:def 9;
  then (Ant(f4)).(len f+2) = 'not' p by A5,Th14;
  then
A19: (Ant(f4)).(len f+2) = Suc(f4) by Th5;
  2 in dom <*q,'not' p*> by Th14;
  then len f+2 in dom (Ant(f4)) by A5,A18,FINSEQ_1:28;
  then
A20: |- f4 by A19,Lm2,Th33;
A21: Ant(Ant(f3)^<*'not' p*>) = Ant(Ant(f1))^<*q*>^<*p*> by A8,Th5;
  then Suc(Ant(Ant(f3)^<*'not' p*>)) = p by Th5;
  then
A22: 'not' Suc(Ant(Ant(f3)^<*'not' p*>)) = Suc(Ant(f4)) by A17,Th5;
  0+1 <= len f2 by Th10;
  then |- Ant(f3)^<*'not' Suc(f3)*> by A6,A16,A15,Th3;
  then
A23: |- Ant(f3)^<*'not' p*> by A12,Th44;
A24: Ant(Ant(Ant(f3)^<*'not' p*>)) = Ant(Ant(f1))^<*q*> by A21,Th5;
  then Ant(Ant(f4)) = Ant(Ant(Ant(f3)^<*'not' p*>)) by A17,Th5;
  hence thesis by A5,A23,A20,A9,A7,A24,A22,A13,A14,Th37;
end;
