reserve A for QC-alphabet;
reserve p, q, r, s, p1, q1 for Element of CQC-WFF(A),
  X, Y, Z, X1, X2 for Subset of CQC-WFF(A),
  h for QC-formula of A,
  x, y for bound_QC-variable of A,
  n for Element of NAT;

theorem
  p is closed & X \/ {'not' p} |- 'not' q implies X \/ {q} |- p
proof
  assume that
A1: p is closed and
A2: X \/ {'not' p} |- 'not' q;
  'not' p is closed by A1,QC_LANG3:21;
  then X |- 'not' p => 'not' q by A2,CQC_THE2:92;
  then X |- q => p by LUKASI_1:69;
  hence thesis by Th40;
end;
