Article CALCUL_1, MML version 4.99.1005

:: CALCUL_1:funcreg 1
registration
  let a1 be Relation-like Function-like FinSequence-like set;
  let a2 be set;
  cluster a1 | a2 -> Relation-like FinSubsequence-like;
end;

:: CALCUL_1:funcnot 1 => CALCUL_1:func 1
definition
  let a1 be non empty set;
  let a2 be FinSequence of a1;
  func Ant A2 -> FinSequence of a1 means
    for b1 being Element of NAT
          st len a2 = b1 + 1
       holds it = a2 | Seg b1
    if 0 < len a2
    otherwise it = {};
end;

:: CALCUL_1:def 1
theorem
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds
(len b2 <= 0 or    (b3 = Ant b2
 iff
    for b4 being Element of NAT
          st len b2 = b4 + 1
       holds b3 = b2 | Seg b4)) &
 (len b2 <= 0 implies    (b3 = Ant b2
 iff
    b3 = {}));

:: CALCUL_1:funcnot 2 => CALCUL_1:func 2
definition
  let a1 be non empty set;
  let a2 be FinSequence of a1;
  assume 0 < len a2;
  func Suc A2 -> Element of a1 equals
    a2 . len a2;
end;

:: CALCUL_1:def 2
theorem
for b1 being non empty set
for b2 being FinSequence of b1
      st 0 < len b2
   holds Suc b2 = b2 . len b2;

:: CALCUL_1:prednot 1 => CALCUL_1:pred 1
definition
  let a1 be non empty set;
  let a2 be Element of a1;
  let a3 be FinSequence of a1;
  pred A2 is_tail_of A3 means
    ex b1 being Element of NAT st
       b1 in dom a3 & a3 . b1 = a2;
end;

:: CALCUL_1:dfs 3
definiens
  let a1 be non empty set;
  let a2 be Element of a1;
  let a3 be FinSequence of a1;
To prove
     a2 is_tail_of a3
it is sufficient to prove
  thus ex b1 being Element of NAT st
       b1 in dom a3 & a3 . b1 = a2;

:: CALCUL_1:def 3
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of b1 holds
      b2 is_tail_of b3
   iff
      ex b4 being Element of NAT st
         b4 in dom b3 & b3 . b4 = b2;

:: CALCUL_1:prednot 2 => CALCUL_1:pred 2
definition
  let a1, a2 be FinSequence of CQC-WFF;
  pred A1 is_Subsequence_of A2 means
    ex b1 being Element of bool NAT st
       a1 c= Seq (a2 | b1);
end;

:: CALCUL_1:dfs 4
definiens
  let a1, a2 be FinSequence of CQC-WFF;
To prove
     a1 is_Subsequence_of a2
it is sufficient to prove
  thus ex b1 being Element of bool NAT st
       a1 c= Seq (a2 | b1);

:: CALCUL_1:def 4
theorem
for b1, b2 being FinSequence of CQC-WFF holds
   b1 is_Subsequence_of b2
iff
   ex b3 being Element of bool NAT st
      b1 c= Seq (b2 | b3);

:: CALCUL_1:th 1
theorem
for b1, b2 being FinSequence of CQC-WFF
      st b1 is_Subsequence_of b2
   holds rng b1 c= rng b2 &
    (ex b3 being Element of bool NAT st
       rng b1 c= rng (b2 | b3));

:: CALCUL_1:th 2
theorem
for b1 being FinSequence of CQC-WFF
      st 0 < len b1
   holds (len Ant b1) + 1 = len b1 & len Ant b1 < len b1;

:: CALCUL_1:th 3
theorem
for b1 being FinSequence of CQC-WFF
      st 0 < len b1
   holds b1 = (Ant b1) ^ <*Suc b1*> &
    rng b1 = (rng Ant b1) \/ {Suc b1};

:: CALCUL_1:th 4
theorem
for b1 being FinSequence of CQC-WFF
      st 1 < len b1
   holds 0 < len Ant b1;

:: CALCUL_1:th 5
theorem
for b1 being Element of CQC-WFF
for b2 being FinSequence of CQC-WFF holds
   Suc (b2 ^ <*b1*>) = b1 & Ant (b2 ^ <*b1*>) = b2;

:: CALCUL_1:th 6
theorem
for b1, b2 being Relation-like Function-like FinSequence-like set holds
len b1 <= len (b1 ^ b2) &
 len b2 <= len (b1 ^ b2) &
 (b1 = {} or 1 <= len b1 & len b2 < len (b2 ^ b1));

:: CALCUL_1:th 7
theorem
for b1, b2 being FinSequence of CQC-WFF holds
Seq ((b1 ^ b2) | dom b1) = (b1 ^ b2) | dom b1;

:: CALCUL_1:th 8
theorem
for b1, b2 being FinSequence of CQC-WFF holds
b1 is_Subsequence_of b1 ^ b2;

:: CALCUL_1:th 9
theorem
for b1, b2 being set
for b3 being Relation-like Function-like FinSequence-like set holds
   1 < len ((b3 ^ <*b1*>) ^ <*b2*>);

:: CALCUL_1:th 10
theorem
for b1 being set
for b2 being Relation-like Function-like FinSequence-like set holds
   1 <= len (b2 ^ <*b1*>) &
    len (b2 ^ <*b1*>) in proj1 (b2 ^ <*b1*>);

:: CALCUL_1:th 11
theorem
for b1, b2 being Element of NAT
      st 0 < b1
   holds len Sgm ((Seg b2) \/ {b2 + b1}) = b2 + 1;

:: CALCUL_1:th 12
theorem
for b1, b2 being Element of NAT
      st 0 < b1
   holds dom Sgm ((Seg b2) \/ {b2 + b1}) = Seg (b2 + 1);

:: CALCUL_1:th 13
theorem
for b1, b2 being FinSequence of CQC-WFF
      st 0 < len b1
   holds b1 is_Subsequence_of ((Ant b1) ^ b2) ^ <*Suc b1*>;

:: CALCUL_1:th 14
theorem
for b1, b2 being set
for b3 being FinSequence of CQC-WFF holds
   1 in proj1 <*b1,b2*> &
    2 in proj1 <*b1,b2*> &
    (b3 ^ <*b1,b2*>) . ((len b3) + 1) = b1 &
    (b3 ^ <*b1,b2*>) . ((len b3) + 2) = b2;

:: CALCUL_1:funcnot 3 => CALCUL_1:func 3
definition
  let a1 be FinSequence of CQC-WFF;
  func still_not-bound_in A1 -> Element of bool bound_QC-variables means
    for b1 being set holds
          b1 in it
       iff
          ex b2 being Element of NAT st
             ex b3 being Element of CQC-WFF st
                b2 in dom a1 & b3 = a1 . b2 & b1 in still_not-bound_in b3;
end;

:: CALCUL_1:def 5
theorem
for b1 being FinSequence of CQC-WFF
for b2 being Element of bool bound_QC-variables holds
      b2 = still_not-bound_in b1
   iff
      for b3 being set holds
            b3 in b2
         iff
            ex b4 being Element of NAT st
               ex b5 being Element of CQC-WFF st
                  b4 in dom b1 & b5 = b1 . b4 & b3 in still_not-bound_in b5;

:: CALCUL_1:funcnot 4 => CALCUL_1:func 4
definition
  func set_of_CQC-WFF-seq -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 is FinSequence of CQC-WFF;
end;

:: CALCUL_1:def 6
theorem
for b1 being set holds
      b1 = set_of_CQC-WFF-seq
   iff
      for b2 being set holds
            b2 in b1
         iff
            b2 is FinSequence of CQC-WFF;

:: CALCUL_1:prednot 3 => CALCUL_1:pred 3
definition
  let a1 be FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:];
  let a2 be natural set;
  pred A1,A2 is_a_correct_step means
    ex b1 being FinSequence of CQC-WFF st
       Suc b1 is_tail_of Ant b1 & (a1 . a2) `1 = b1
    if (a1 . a2) `2 = 0,
ex b1 being FinSequence of CQC-WFF st
       (a1 . a2) `1 = b1 ^ <*VERUM*>
    if (a1 . a2) `2 = 1,
ex b1 being Element of NAT st
       ex b2, b3 being FinSequence of CQC-WFF st
          1 <= b1 & b1 < a2 & Ant b2 is_Subsequence_of Ant b3 & Suc b2 = Suc b3 & (a1 . b1) `1 = b2 & (a1 . a2) `1 = b3
    if (a1 . a2) `2 = 2,
ex b1, b2 being Element of NAT st
       ex b3, b4 being FinSequence of CQC-WFF st
          1 <= b1 &
           b1 < a2 &
           1 <= b2 &
           b2 < b1 &
           1 < len b3 &
           1 < len b4 &
           Ant Ant b3 = Ant Ant b4 &
           'not' Suc Ant b3 = Suc Ant b4 &
           Suc b3 = Suc b4 &
           b3 = (a1 . b2) `1 &
           b4 = (a1 . b1) `1 &
           (Ant Ant b3) ^ <*Suc b3*> = (a1 . a2) `1
    if (a1 . a2) `2 = 3,
ex b1, b2 being Element of NAT st
       ex b3, b4 being FinSequence of CQC-WFF st
          ex b5 being Element of CQC-WFF st
             1 <= b1 &
              b1 < a2 &
              1 <= b2 &
              b2 < b1 &
              1 < len b3 &
              Ant b3 = Ant b4 &
              Suc Ant b3 = 'not' b5 &
              'not' Suc b3 = Suc b4 &
              b3 = (a1 . b2) `1 &
              b4 = (a1 . b1) `1 &
              (Ant Ant b3) ^ <*b5*> = (a1 . a2) `1
    if (a1 . a2) `2 = 4,
ex b1, b2 being Element of NAT st
       ex b3, b4 being FinSequence of CQC-WFF st
          1 <= b1 &
           b1 < a2 &
           1 <= b2 &
           b2 < b1 &
           Ant b3 = Ant b4 &
           b3 = (a1 . b2) `1 &
           b4 = (a1 . b1) `1 &
           (Ant b3) ^ <*(Suc b3) '&' Suc b4*> = (a1 . a2) `1
    if (a1 . a2) `2 = 5,
ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3, b4 being Element of CQC-WFF st
             1 <= b1 &
              b1 < a2 &
              b3 '&' b4 = Suc b2 &
              b2 = (a1 . b1) `1 &
              (Ant b2) ^ <*b3*> = (a1 . a2) `1
    if (a1 . a2) `2 = 6,
ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3, b4 being Element of CQC-WFF st
             1 <= b1 &
              b1 < a2 &
              b3 '&' b4 = Suc b2 &
              b2 = (a1 . b1) `1 &
              (Ant b2) ^ <*b4*> = (a1 . a2) `1
    if (a1 . a2) `2 = 7,
ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3 being Element of CQC-WFF st
             ex b4, b5 being Element of bound_QC-variables st
                1 <= b1 &
                 b1 < a2 &
                 Suc b2 = All(b4,b3) &
                 b2 = (a1 . b1) `1 &
                 (Ant b2) ^ <*b3 .(b4,b5)*> = (a1 . a2) `1
    if (a1 . a2) `2 = 8
    otherwise   case (a1 . a2) `2 = 9;
    thus ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3 being Element of CQC-WFF st
             ex b4, b5 being Element of bound_QC-variables st
                1 <= b1 &
                 b1 < a2 &
                 Suc b2 = b3 .(b4,b5) &
                 not b5 in still_not-bound_in Ant b2 &
                 not b5 in still_not-bound_in All(b4,b3) &
                 b2 = (a1 . b1) `1 &
                 (Ant b2) ^ <*All(b4,b3)*> = (a1 . a2) `1;
  end;
;
end;

:: CALCUL_1:dfs 7
definiens
  let a1 be FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:];
  let a2 be natural set;
To prove
     a1,a2 is_a_correct_step
it is sufficient to prove
  per cases;
  case (a1 . a2) `2 = 0;
    thus ex b1 being FinSequence of CQC-WFF st
       Suc b1 is_tail_of Ant b1 & (a1 . a2) `1 = b1;
  end;
  case (a1 . a2) `2 = 1;
    thus ex b1 being FinSequence of CQC-WFF st
       (a1 . a2) `1 = b1 ^ <*VERUM*>;
  end;
  case (a1 . a2) `2 = 2;
    thus ex b1 being Element of NAT st
       ex b2, b3 being FinSequence of CQC-WFF st
          1 <= b1 & b1 < a2 & Ant b2 is_Subsequence_of Ant b3 & Suc b2 = Suc b3 & (a1 . b1) `1 = b2 & (a1 . a2) `1 = b3;
  end;
  case (a1 . a2) `2 = 3;
    thus ex b1, b2 being Element of NAT st
       ex b3, b4 being FinSequence of CQC-WFF st
          1 <= b1 &
           b1 < a2 &
           1 <= b2 &
           b2 < b1 &
           1 < len b3 &
           1 < len b4 &
           Ant Ant b3 = Ant Ant b4 &
           'not' Suc Ant b3 = Suc Ant b4 &
           Suc b3 = Suc b4 &
           b3 = (a1 . b2) `1 &
           b4 = (a1 . b1) `1 &
           (Ant Ant b3) ^ <*Suc b3*> = (a1 . a2) `1;
  end;
  case (a1 . a2) `2 = 4;
    thus ex b1, b2 being Element of NAT st
       ex b3, b4 being FinSequence of CQC-WFF st
          ex b5 being Element of CQC-WFF st
             1 <= b1 &
              b1 < a2 &
              1 <= b2 &
              b2 < b1 &
              1 < len b3 &
              Ant b3 = Ant b4 &
              Suc Ant b3 = 'not' b5 &
              'not' Suc b3 = Suc b4 &
              b3 = (a1 . b2) `1 &
              b4 = (a1 . b1) `1 &
              (Ant Ant b3) ^ <*b5*> = (a1 . a2) `1;
  end;
  case (a1 . a2) `2 = 5;
    thus ex b1, b2 being Element of NAT st
       ex b3, b4 being FinSequence of CQC-WFF st
          1 <= b1 &
           b1 < a2 &
           1 <= b2 &
           b2 < b1 &
           Ant b3 = Ant b4 &
           b3 = (a1 . b2) `1 &
           b4 = (a1 . b1) `1 &
           (Ant b3) ^ <*(Suc b3) '&' Suc b4*> = (a1 . a2) `1;
  end;
  case (a1 . a2) `2 = 6;
    thus ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3, b4 being Element of CQC-WFF st
             1 <= b1 &
              b1 < a2 &
              b3 '&' b4 = Suc b2 &
              b2 = (a1 . b1) `1 &
              (Ant b2) ^ <*b3*> = (a1 . a2) `1;
  end;
  case (a1 . a2) `2 = 7;
    thus ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3, b4 being Element of CQC-WFF st
             1 <= b1 &
              b1 < a2 &
              b3 '&' b4 = Suc b2 &
              b2 = (a1 . b1) `1 &
              (Ant b2) ^ <*b4*> = (a1 . a2) `1;
  end;
  case (a1 . a2) `2 = 8;
    thus ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3 being Element of CQC-WFF st
             ex b4, b5 being Element of bound_QC-variables st
                1 <= b1 &
                 b1 < a2 &
                 Suc b2 = All(b4,b3) &
                 b2 = (a1 . b1) `1 &
                 (Ant b2) ^ <*b3 .(b4,b5)*> = (a1 . a2) `1;
  end;
  case (a1 . a2) `2 <> 0 & (a1 . a2) `2 <> 1 & (a1 . a2) `2 <> 2 & (a1 . a2) `2 <> 3 & (a1 . a2) `2 <> 4 & (a1 . a2) `2 <> 5 & (a1 . a2) `2 <> 6 & (a1 . a2) `2 <> 7 & (a1 . a2) `2 <> 8;
    thus   case (a1 . a2) `2 = 9;
    thus ex b1 being Element of NAT st
       ex b2 being FinSequence of CQC-WFF st
          ex b3 being Element of CQC-WFF st
             ex b4, b5 being Element of bound_QC-variables st
                1 <= b1 &
                 b1 < a2 &
                 Suc b2 = b3 .(b4,b5) &
                 not b5 in still_not-bound_in Ant b2 &
                 not b5 in still_not-bound_in All(b4,b3) &
                 b2 = (a1 . b1) `1 &
                 (Ant b2) ^ <*All(b4,b3)*> = (a1 . a2) `1;
  end;
;
  end;

:: CALCUL_1:def 7
theorem
for b1 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:]
for b2 being natural set holds
   ((b1 . b2) `2 = 0 implies    (b1,b2 is_a_correct_step
    iff
       ex b3 being FinSequence of CQC-WFF st
          Suc b3 is_tail_of Ant b3 & (b1 . b2) `1 = b3)) &
    ((b1 . b2) `2 = 1 implies    (b1,b2 is_a_correct_step
    iff
       ex b3 being FinSequence of CQC-WFF st
          (b1 . b2) `1 = b3 ^ <*VERUM*>)) &
    ((b1 . b2) `2 = 2 implies    (b1,b2 is_a_correct_step
    iff
       ex b3 being Element of NAT st
          ex b4, b5 being FinSequence of CQC-WFF st
             1 <= b3 & b3 < b2 & Ant b4 is_Subsequence_of Ant b5 & Suc b4 = Suc b5 & (b1 . b3) `1 = b4 & (b1 . b2) `1 = b5)) &
    ((b1 . b2) `2 = 3 implies    (b1,b2 is_a_correct_step
    iff
       ex b3, b4 being Element of NAT st
          ex b5, b6 being FinSequence of CQC-WFF st
             1 <= b3 &
              b3 < b2 &
              1 <= b4 &
              b4 < b3 &
              1 < len b5 &
              1 < len b6 &
              Ant Ant b5 = Ant Ant b6 &
              'not' Suc Ant b5 = Suc Ant b6 &
              Suc b5 = Suc b6 &
              b5 = (b1 . b4) `1 &
              b6 = (b1 . b3) `1 &
              (Ant Ant b5) ^ <*Suc b5*> = (b1 . b2) `1)) &
    ((b1 . b2) `2 = 4 implies    (b1,b2 is_a_correct_step
    iff
       ex b3, b4 being Element of NAT st
          ex b5, b6 being FinSequence of CQC-WFF st
             ex b7 being Element of CQC-WFF st
                1 <= b3 &
                 b3 < b2 &
                 1 <= b4 &
                 b4 < b3 &
                 1 < len b5 &
                 Ant b5 = Ant b6 &
                 Suc Ant b5 = 'not' b7 &
                 'not' Suc b5 = Suc b6 &
                 b5 = (b1 . b4) `1 &
                 b6 = (b1 . b3) `1 &
                 (Ant Ant b5) ^ <*b7*> = (b1 . b2) `1)) &
    ((b1 . b2) `2 = 5 implies    (b1,b2 is_a_correct_step
    iff
       ex b3, b4 being Element of NAT st
          ex b5, b6 being FinSequence of CQC-WFF st
             1 <= b3 &
              b3 < b2 &
              1 <= b4 &
              b4 < b3 &
              Ant b5 = Ant b6 &
              b5 = (b1 . b4) `1 &
              b6 = (b1 . b3) `1 &
              (Ant b5) ^ <*(Suc b5) '&' Suc b6*> = (b1 . b2) `1)) &
    ((b1 . b2) `2 = 6 implies    (b1,b2 is_a_correct_step
    iff
       ex b3 being Element of NAT st
          ex b4 being FinSequence of CQC-WFF st
             ex b5, b6 being Element of CQC-WFF st
                1 <= b3 &
                 b3 < b2 &
                 b5 '&' b6 = Suc b4 &
                 b4 = (b1 . b3) `1 &
                 (Ant b4) ^ <*b5*> = (b1 . b2) `1)) &
    ((b1 . b2) `2 = 7 implies    (b1,b2 is_a_correct_step
    iff
       ex b3 being Element of NAT st
          ex b4 being FinSequence of CQC-WFF st
             ex b5, b6 being Element of CQC-WFF st
                1 <= b3 &
                 b3 < b2 &
                 b5 '&' b6 = Suc b4 &
                 b4 = (b1 . b3) `1 &
                 (Ant b4) ^ <*b6*> = (b1 . b2) `1)) &
    ((b1 . b2) `2 = 8 implies    (b1,b2 is_a_correct_step
    iff
       ex b3 being Element of NAT st
          ex b4 being FinSequence of CQC-WFF st
             ex b5 being Element of CQC-WFF st
                ex b6, b7 being Element of bound_QC-variables st
                   1 <= b3 &
                    b3 < b2 &
                    Suc b4 = All(b6,b5) &
                    b4 = (b1 . b3) `1 &
                    (Ant b4) ^ <*b5 .(b6,b7)*> = (b1 . b2) `1)) &
    ((b1 . b2) `2 = 9 implies    (b1,b2 is_a_correct_step
    iff
       ex b3 being Element of NAT st
          ex b4 being FinSequence of CQC-WFF st
             ex b5 being Element of CQC-WFF st
                ex b6, b7 being Element of bound_QC-variables st
                   1 <= b3 &
                    b3 < b2 &
                    Suc b4 = b5 .(b6,b7) &
                    not b7 in still_not-bound_in Ant b4 &
                    not b7 in still_not-bound_in All(b6,b5) &
                    b4 = (b1 . b3) `1 &
                    (Ant b4) ^ <*All(b6,b5)*> = (b1 . b2) `1));

:: CALCUL_1:attrnot 1 => CALCUL_1:attr 1
definition
  let a1 be FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:];
  attr a1 is a_proof means
    a1 <> {} &
     (for b1 being natural set
           st 1 <= b1 & b1 <= len a1
        holds a1,b1 is_a_correct_step);
end;

:: CALCUL_1:dfs 8
definiens
  let a1 be FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:];
To prove
     a1 is a_proof
it is sufficient to prove
  thus a1 <> {} &
     (for b1 being natural set
           st 1 <= b1 & b1 <= len a1
        holds a1,b1 is_a_correct_step);

:: CALCUL_1:def 8
theorem
for b1 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:] holds
      b1 is a_proof
   iff
      b1 <> {} &
       (for b2 being natural set
             st 1 <= b2 & b2 <= len b1
          holds b1,b2 is_a_correct_step);

:: CALCUL_1:prednot 4 => CALCUL_1:pred 4
definition
  let a1 be FinSequence of CQC-WFF;
  pred |- A1 means
    ex b1 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:] st
       b1 is a_proof & a1 = (b1 . len b1) `1;
end;

:: CALCUL_1:dfs 9
definiens
  let a1 be FinSequence of CQC-WFF;
To prove
     |- a1
it is sufficient to prove
  thus ex b1 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:] st
       b1 is a_proof & a1 = (b1 . len b1) `1;

:: CALCUL_1:def 9
theorem
for b1 being FinSequence of CQC-WFF holds
      |- b1
   iff
      ex b2 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:] st
         b2 is a_proof & b1 = (b2 . len b2) `1;

:: CALCUL_1:prednot 5 => CALCUL_1:pred 5
definition
  let a1 be Element of CQC-WFF;
  let a2 be Element of bool CQC-WFF;
  pred A1 is_formal_provable_from A2 means
    ex b1 being FinSequence of CQC-WFF st
       rng Ant b1 c= a2 & Suc b1 = a1 & |- b1;
end;

:: CALCUL_1:dfs 10
definiens
  let a1 be Element of CQC-WFF;
  let a2 be Element of bool CQC-WFF;
To prove
     a1 is_formal_provable_from a2
it is sufficient to prove
  thus ex b1 being FinSequence of CQC-WFF st
       rng Ant b1 c= a2 & Suc b1 = a1 & |- b1;

:: CALCUL_1:def 10
theorem
for b1 being Element of CQC-WFF
for b2 being Element of bool CQC-WFF holds
      b1 is_formal_provable_from b2
   iff
      ex b3 being FinSequence of CQC-WFF st
         rng Ant b3 c= b2 & Suc b3 = b1 & |- b3;

:: CALCUL_1:prednot 6 => CALCUL_1:pred 6
definition
  let a1 be Element of bool CQC-WFF;
  let a2 be non empty set;
  let a3 be interpretation of a2;
  let a4 be Element of Valuations_in a2;
  pred A3,A4 |= A1 means
    for b1 being Element of CQC-WFF
          st b1 in a1
       holds a3,a4 |= b1;
end;

:: CALCUL_1:dfs 11
definiens
  let a1 be Element of bool CQC-WFF;
  let a2 be non empty set;
  let a3 be interpretation of a2;
  let a4 be Element of Valuations_in a2;
To prove
     a3,a4 |= a1
it is sufficient to prove
  thus for b1 being Element of CQC-WFF
          st b1 in a1
       holds a3,a4 |= b1;

:: CALCUL_1:def 11
theorem
for b1 being Element of bool CQC-WFF
for b2 being non empty set
for b3 being interpretation of b2
for b4 being Element of Valuations_in b2 holds
      b3,b4 |= b1
   iff
      for b5 being Element of CQC-WFF
            st b5 in b1
         holds b3,b4 |= b5;

:: CALCUL_1:prednot 7 => CALCUL_1:pred 7
definition
  let a1 be Element of bool CQC-WFF;
  let a2 be Element of CQC-WFF;
  pred A1 |= A2 means
    for b1 being non empty set
    for b2 being interpretation of b1
    for b3 being Element of Valuations_in b1
          st b2,b3 |= a1
       holds b2,b3 |= a2;
end;

:: CALCUL_1:dfs 12
definiens
  let a1 be Element of bool CQC-WFF;
  let a2 be Element of CQC-WFF;
To prove
     a1 |= a2
it is sufficient to prove
  thus for b1 being non empty set
    for b2 being interpretation of b1
    for b3 being Element of Valuations_in b1
          st b2,b3 |= a1
       holds b2,b3 |= a2;

:: CALCUL_1:def 12
theorem
for b1 being Element of bool CQC-WFF
for b2 being Element of CQC-WFF holds
      b1 |= b2
   iff
      for b3 being non empty set
      for b4 being interpretation of b3
      for b5 being Element of Valuations_in b3
            st b4,b5 |= b1
         holds b4,b5 |= b2;

:: CALCUL_1:prednot 8 => CALCUL_1:pred 8
definition
  let a1 be Element of CQC-WFF;
  pred |= A1 means
    {} CQC-WFF |= a1;
end;

:: CALCUL_1:dfs 13
definiens
  let a1 be Element of CQC-WFF;
To prove
     |= a1
it is sufficient to prove
  thus {} CQC-WFF |= a1;

:: CALCUL_1:def 13
theorem
for b1 being Element of CQC-WFF holds
      |= b1
   iff
      {} CQC-WFF |= b1;

:: CALCUL_1:prednot 9 => CALCUL_1:pred 9
definition
  let a1 be FinSequence of CQC-WFF;
  let a2 be non empty set;
  let a3 be interpretation of a2;
  let a4 be Element of Valuations_in a2;
  pred A3,A4 |= A1 means
    a3,a4 |= rng a1;
end;

:: CALCUL_1:dfs 14
definiens
  let a1 be FinSequence of CQC-WFF;
  let a2 be non empty set;
  let a3 be interpretation of a2;
  let a4 be Element of Valuations_in a2;
To prove
     a3,a4 |= a1
it is sufficient to prove
  thus a3,a4 |= rng a1;

:: CALCUL_1:def 14
theorem
for b1 being FinSequence of CQC-WFF
for b2 being non empty set
for b3 being interpretation of b2
for b4 being Element of Valuations_in b2 holds
      b3,b4 |= b1
   iff
      b3,b4 |= rng b1;

:: CALCUL_1:prednot 10 => CALCUL_1:pred 10
definition
  let a1 be FinSequence of CQC-WFF;
  let a2 be Element of CQC-WFF;
  pred A1 |= A2 means
    for b1 being non empty set
    for b2 being interpretation of b1
    for b3 being Element of Valuations_in b1
          st b2,b3 |= a1
       holds b2,b3 |= a2;
end;

:: CALCUL_1:dfs 15
definiens
  let a1 be FinSequence of CQC-WFF;
  let a2 be Element of CQC-WFF;
To prove
     a1 |= a2
it is sufficient to prove
  thus for b1 being non empty set
    for b2 being interpretation of b1
    for b3 being Element of Valuations_in b1
          st b2,b3 |= a1
       holds b2,b3 |= a2;

:: CALCUL_1:def 15
theorem
for b1 being FinSequence of CQC-WFF
for b2 being Element of CQC-WFF holds
      b1 |= b2
   iff
      for b3 being non empty set
      for b4 being interpretation of b3
      for b5 being Element of Valuations_in b3
            st b4,b5 |= b1
         holds b4,b5 |= b2;

:: CALCUL_1:th 15
theorem
for b1 being FinSequence of CQC-WFF
      st Suc b1 is_tail_of Ant b1
   holds Ant b1 |= Suc b1;

:: CALCUL_1:th 16
theorem
for b1, b2 being FinSequence of CQC-WFF
      st Ant b1 is_Subsequence_of Ant b2 & Suc b1 = Suc b2 & Ant b1 |= Suc b1
   holds Ant b2 |= Suc b2;

:: CALCUL_1:th 17
theorem
for b1 being non empty set
for b2 being interpretation of b1
for b3 being Element of Valuations_in b1
for b4 being FinSequence of CQC-WFF
      st 0 < len b4
   holds    b2,b3 |= Ant b4 & b2,b3 |= Suc b4
   iff
      b2,b3 |= b4;

:: CALCUL_1:th 18
theorem
for b1, b2 being FinSequence of CQC-WFF
      st 1 < len b1 &
         1 < len b2 &
         Ant Ant b1 = Ant Ant b2 &
         'not' Suc Ant b1 = Suc Ant b2 &
         Suc b1 = Suc b2 &
         Ant b1 |= Suc b1 &
         Ant b2 |= Suc b2
   holds Ant Ant b1 |= Suc b1;

:: CALCUL_1:th 19
theorem
for b1 being Element of CQC-WFF
for b2, b3 being FinSequence of CQC-WFF
      st 1 < len b2 & Ant b2 = Ant b3 & 'not' b1 = Suc Ant b2 & 'not' Suc b2 = Suc b3 & Ant b2 |= Suc b2 & Ant b3 |= Suc b3
   holds Ant Ant b2 |= b1;

:: CALCUL_1:th 20
theorem
for b1, b2 being FinSequence of CQC-WFF
      st Ant b1 = Ant b2 & Ant b1 |= Suc b1 & Ant b2 |= Suc b2
   holds Ant b1 |= (Suc b1) '&' Suc b2;

:: CALCUL_1:th 21
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st Suc b3 = b1 '&' b2 & Ant b3 |= b1 '&' b2
   holds Ant b3 |= b1;

:: CALCUL_1:th 22
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st Suc b3 = b1 '&' b2 & Ant b3 |= b1 '&' b2
   holds Ant b3 |= b2;

:: CALCUL_1:th 23
theorem
for b1 being Element of CQC-WFF
for b2 being non empty set
for b3 being interpretation of b2
for b4 being Element of Valuations_in b2
for b5 being Element of vSUB holds
      b3,b4 |= [b1,b5]
   iff
      b3,b4 |= b1;

:: CALCUL_1:th 24
theorem
for b1 being Element of CQC-WFF
for b2, b3 being Element of bound_QC-variables
for b4 being non empty set
for b5 being interpretation of b4
for b6 being Element of Valuations_in b4 holds
      b5,b6 |= b1 .(b2,b3)
   iff
      ex b7 being Element of b4 st
         b6 . b3 = b7 & b5,b6 . (b2 | b7) |= b1;

:: CALCUL_1:th 25
theorem
for b1 being Element of CQC-WFF
for b2 being Element of bound_QC-variables
for b3 being FinSequence of CQC-WFF
   st Suc b3 = All(b2,b1) & Ant b3 |= Suc b3
for b4 being Element of bound_QC-variables holds
   Ant b3 |= b1 .(b2,b4);

:: CALCUL_1:th 26
theorem
for b1 being Element of bound_QC-variables
for b2 being non empty set
for b3 being Element of Valuations_in b2
for b4 being Element of b2
for b5 being set
      st b5 c= bound_QC-variables & not b1 in b5
   holds (b3 . (b1 | b4)) | b5 = b3 | b5;

:: CALCUL_1:th 27
theorem
for b1 being non empty set
for b2 being interpretation of b1
for b3 being FinSequence of CQC-WFF
for b4, b5 being Element of Valuations_in b1
      st b4 | still_not-bound_in b3 = b5 | still_not-bound_in b3 &
         b2,b4 |= b3
   holds b2,b5 |= b3;

:: CALCUL_1:th 28
theorem
for b1 being Element of CQC-WFF
for b2, b3 being Element of bound_QC-variables
for b4 being non empty set
for b5 being Element of Valuations_in b4
for b6 being Element of b4
      st not b2 in still_not-bound_in All(b3,b1)
   holds ((b5 . (b2 | b6)) . (b3 | b6)) | still_not-bound_in b1 = (b5 . (b3 | b6)) | still_not-bound_in b1;

:: CALCUL_1:th 29
theorem
for b1 being Element of CQC-WFF
for b2, b3 being Element of bound_QC-variables
for b4 being FinSequence of CQC-WFF
      st Suc b4 = b1 .(b2,b3) & Ant b4 |= Suc b4 & not b3 in still_not-bound_in Ant b4 & not b3 in still_not-bound_in All(b2,b1)
   holds Ant b4 |= All(b2,b1);

:: CALCUL_1:th 30
theorem
for b1 being FinSequence of CQC-WFF holds
   Ant (b1 ^ <*VERUM*>) |= Suc (b1 ^ <*VERUM*>);

:: CALCUL_1:th 31
theorem
for b1 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:]
for b2 being natural set
      st 1 <= b2 & b2 <= len b1 & (b1 . b2) `2 <> 0 & (b1 . b2) `2 <> 1 & (b1 . b2) `2 <> 2 & (b1 . b2) `2 <> 3 & (b1 . b2) `2 <> 4 & (b1 . b2) `2 <> 5 & (b1 . b2) `2 <> 6 & (b1 . b2) `2 <> 7 & (b1 . b2) `2 <> 8
   holds (b1 . b2) `2 = 9;

:: CALCUL_1:th 32
theorem
for b1 being Element of CQC-WFF
for b2 being Element of bool CQC-WFF
      st b1 is_formal_provable_from b2
   holds b2 |= b1;

:: CALCUL_1:th 33
theorem
for b1 being FinSequence of CQC-WFF
      st Suc b1 is_tail_of Ant b1
   holds |- b1;

:: CALCUL_1:th 34
theorem
for b1, b2 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:]
for b3 being natural set
      st 1 <= b3 & b3 <= len b1
   holds    b1,b3 is_a_correct_step
   iff
      b1 ^ b2,b3 is_a_correct_step;

:: CALCUL_1:th 35
theorem
for b1 being Element of NAT
for b2, b3 being FinSequence of [:set_of_CQC-WFF-seq,Proof_Step_Kinds:]
      st 1 <= b1 & b1 <= len b2 & b2,b1 is_a_correct_step
   holds b3 ^ b2,b1 + len b3 is_a_correct_step;

:: CALCUL_1:th 36
theorem
for b1, b2 being FinSequence of CQC-WFF
      st Ant b1 is_Subsequence_of Ant b2 & Suc b1 = Suc b2 & |- b1
   holds |- b2;

:: CALCUL_1:th 37
theorem
for b1, b2 being FinSequence of CQC-WFF
      st 1 < len b1 &
         1 < len b2 &
         Ant Ant b1 = Ant Ant b2 &
         'not' Suc Ant b1 = Suc Ant b2 &
         Suc b1 = Suc b2 &
         |- b1 &
         |- b2
   holds |- (Ant Ant b1) ^ <*Suc b1*>;

:: CALCUL_1:th 38
theorem
for b1 being Element of CQC-WFF
for b2, b3 being FinSequence of CQC-WFF
      st 1 < len b2 & Ant b2 = Ant b3 & Suc Ant b2 = 'not' b1 & 'not' Suc b2 = Suc b3 & |- b2 & |- b3
   holds |- (Ant Ant b2) ^ <*b1*>;

:: CALCUL_1:th 39
theorem
for b1, b2 being FinSequence of CQC-WFF
      st Ant b1 = Ant b2 & |- b1 & |- b2
   holds |- (Ant b1) ^ <*(Suc b1) '&' Suc b2*>;

:: CALCUL_1:th 40
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st b1 '&' b2 = Suc b3 & |- b3
   holds |- (Ant b3) ^ <*b1*>;

:: CALCUL_1:th 41
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st b1 '&' b2 = Suc b3 & |- b3
   holds |- (Ant b3) ^ <*b2*>;

:: CALCUL_1:th 42
theorem
for b1 being Element of CQC-WFF
for b2, b3 being Element of bound_QC-variables
for b4 being FinSequence of CQC-WFF
      st Suc b4 = All(b2,b1) & |- b4
   holds |- (Ant b4) ^ <*b1 .(b2,b3)*>;

:: CALCUL_1:th 43
theorem
for b1 being Element of CQC-WFF
for b2, b3 being Element of bound_QC-variables
for b4 being FinSequence of CQC-WFF
      st Suc b4 = b1 .(b2,b3) & not b3 in still_not-bound_in Ant b4 & not b3 in still_not-bound_in All(b2,b1) & |- b4
   holds |- (Ant b4) ^ <*All(b2,b1)*>;

:: CALCUL_1:th 44
theorem
for b1 being Element of CQC-WFF
for b2 being FinSequence of CQC-WFF
      st |- b2 &
         |- (Ant b2) ^ <*'not' Suc b2*>
   holds |- (Ant b2) ^ <*b1*>;

:: CALCUL_1:th 45
theorem
for b1 being Element of CQC-WFF
for b2 being FinSequence of CQC-WFF
      st 1 <= len b2 & |- b2 & |- b2 ^ <*b1*>
   holds |- (Ant b2) ^ <*b1*>;

:: CALCUL_1:th 46
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st |- (b3 ^ <*b1*>) ^ <*b2*>
   holds |- (b3 ^ <*'not' b2*>) ^ <*'not' b1*>;

:: CALCUL_1:th 47
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st |- (b3 ^ <*'not' b1*>) ^ <*'not' b2*>
   holds |- (b3 ^ <*b2*>) ^ <*b1*>;

:: CALCUL_1:th 48
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st |- (b3 ^ <*'not' b1*>) ^ <*b2*>
   holds |- (b3 ^ <*'not' b2*>) ^ <*b1*>;

:: CALCUL_1:th 49
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st |- (b3 ^ <*b1*>) ^ <*'not' b2*>
   holds |- (b3 ^ <*b2*>) ^ <*'not' b1*>;

:: CALCUL_1:th 50
theorem
for b1, b2, b3 being Element of CQC-WFF
for b4 being FinSequence of CQC-WFF
      st |- (b4 ^ <*b1*>) ^ <*b2*> &
         |- (b4 ^ <*b3*>) ^ <*b2*>
   holds |- (b4 ^ <*b1 'or' b3*>) ^ <*b2*>;

:: CALCUL_1:th 51
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st |- b3 ^ <*b1*>
   holds |- b3 ^ <*b1 'or' b2*>;

:: CALCUL_1:th 52
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st |- b3 ^ <*b1*>
   holds |- b3 ^ <*b2 'or' b1*>;

:: CALCUL_1:th 53
theorem
for b1, b2, b3 being Element of CQC-WFF
for b4 being FinSequence of CQC-WFF
      st |- (b4 ^ <*b1*>) ^ <*b2*> &
         |- (b4 ^ <*b3*>) ^ <*b2*>
   holds |- (b4 ^ <*b1 'or' b3*>) ^ <*b2*>;

:: CALCUL_1:th 54
theorem
for b1 being Element of CQC-WFF
for b2 being FinSequence of CQC-WFF
      st |- b2 ^ <*b1*>
   holds |- b2 ^ <*'not' 'not' b1*>;

:: CALCUL_1:th 55
theorem
for b1 being Element of CQC-WFF
for b2 being FinSequence of CQC-WFF
      st |- b2 ^ <*'not' 'not' b1*>
   holds |- b2 ^ <*b1*>;

:: CALCUL_1:th 56
theorem
for b1, b2 being Element of CQC-WFF
for b3 being FinSequence of CQC-WFF
      st |- b3 ^ <*b1 => b2*> & |- b3 ^ <*b1*>
   holds |- b3 ^ <*b2*>;

:: CALCUL_1:th 57
theorem
for b1 being Element of CQC-WFF
for b2, b3 being Element of bound_QC-variables holds
('not' b1) .(b2,b3) = 'not' (b1 .(b2,b3));

:: CALCUL_1:th 58
theorem
for b1 being Element of CQC-WFF
for b2 being Element of bound_QC-variables
for b3 being FinSequence of CQC-WFF
      st ex b4 being Element of bound_QC-variables st
           |- b3 ^ <*b1 .(b2,b4)*>
   holds |- b3 ^ <*Ex(b2,b1)*>;

:: CALCUL_1:th 59
theorem
for b1, b2 being FinSequence of CQC-WFF holds
still_not-bound_in (b1 ^ b2) = (still_not-bound_in b1) \/ still_not-bound_in b2;

:: CALCUL_1:th 60
theorem
for b1 being Element of CQC-WFF holds
   still_not-bound_in <*b1*> = still_not-bound_in b1;

:: CALCUL_1:th 61
theorem
for b1, b2 being Element of CQC-WFF
for b3, b4 being Element of bound_QC-variables
for b5 being FinSequence of CQC-WFF
      st |- (b5 ^ <*b1 .(b3,b4)*>) ^ <*b2*> &
         not b4 in still_not-bound_in ((b5 ^ <*Ex(b3,b1)*>) ^ <*b2*>)
   holds |- (b5 ^ <*Ex(b3,b1)*>) ^ <*b2*>;

:: CALCUL_1:th 62
theorem
for b1 being FinSequence of CQC-WFF holds
   still_not-bound_in b1 = union {still_not-bound_in b2 where b2 is Element of CQC-WFF: ex b3 being Element of NAT st
      b3 in dom b1 & b2 = b1 . b3};

:: CALCUL_1:th 63
theorem
for b1 being FinSequence of CQC-WFF holds
   still_not-bound_in b1 is finite;

:: CALCUL_1:th 64
theorem
Card bound_QC-variables = alef 0 & bound_QC-variables is infinite;

:: CALCUL_1:th 65
theorem
for b1 being FinSequence of CQC-WFF holds
   ex b2 being Element of bound_QC-variables st
      not b2 in still_not-bound_in b1;

:: CALCUL_1:th 66
theorem
for b1 being Element of CQC-WFF
for b2 being Element of bound_QC-variables
for b3 being FinSequence of CQC-WFF
      st |- b3 ^ <*All(b2,b1)*>
   holds |- b3 ^ <*All(b2,'not' 'not' b1)*>;

:: CALCUL_1:th 67
theorem
for b1 being Element of CQC-WFF
for b2 being Element of bound_QC-variables
for b3 being FinSequence of CQC-WFF
      st |- b3 ^ <*All(b2,'not' 'not' b1)*>
   holds |- b3 ^ <*All(b2,b1)*>;

:: CALCUL_1:th 68
theorem
for b1 being Element of CQC-WFF
for b2 being Element of bound_QC-variables
for b3 being FinSequence of CQC-WFF holds
      |- b3 ^ <*All(b2,b1)*>
   iff
      |- b3 ^ <*'not' Ex(b2,'not' b1)*>;