Article CIRCCMB2, MML version 4.99.1005

:: CIRCCMB2:funcreg 1
registration
  let a1 be natural set;
  let a2 be Function-like quasi_total Relation of a1 -tuples_on BOOLEAN,BOOLEAN;
  let a3 be FinSeqLen of a1;
  cluster 1GateCircuit(a3,a2) -> strict non-empty Boolean;
end;

:: CIRCCMB2:th 1
theorem
for b1 being non empty finite set
for b2 being natural set
for b3 being FinSeqLen of b2
for b4 being Function-like quasi_total Relation of b2 -tuples_on b1,b1
for b5 being Element of the OperSymbols of 1GateCircStr(b3,b4)
for b6 being Element of product the Sorts of 1GateCircuit(b3,b4) holds
   b5 depends_on_in b6 = b3 * b6;

:: CIRCCMB2:th 2
theorem
for b1 being non empty finite set
for b2 being natural set
for b3 being FinSeqLen of b2
for b4 being Function-like quasi_total Relation of b2 -tuples_on b1,b1
for b5 being Element of product the Sorts of 1GateCircuit(b3,b4) holds
   Following b5 is stable(1GateCircStr(b3,b4), 1GateCircuit(b3,b4));

:: CIRCCMB2:th 3
theorem
for b1 being non empty non void Circuit-like ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of product the Sorts of b2
   st b3 is stable(b1, b2)
for b4 being natural set holds
   Following(b3,b4) = b3;

:: CIRCCMB2:th 4
theorem
for b1 being non empty non void Circuit-like ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
for b3 being Element of product the Sorts of b2
for b4, b5 being natural set
      st Following(b3,b4) is stable(b1, b2) & b4 <= b5
   holds Following(b3,b5) = Following(b3,b4);

:: CIRCCMB2:sch 1
scheme CIRCCMB2:sch 1
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> non empty ManySortedSign,
  F4 -> set}:
ex b1, b2 being ManySortedSet of NAT st
   b1 . 0 = F1() &
    b2 . 0 = F2() &
    (for b3 being natural set
    for b4 being non empty ManySortedSign
    for b5 being set
          st b4 = b1 . b3 & b5 = b2 . b3
       holds b1 . (b3 + 1) = F3(b4, b5, b3) & b2 . (b3 + 1) = F4(b5, b3))


:: CIRCCMB2:sch 2
scheme CIRCCMB2:sch 2
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> ManySortedSet of NAT,
  F4 -> ManySortedSet of NAT}:
for b1 being natural set holds
   ex b2 being non empty ManySortedSign st
      b2 = F3() . b1 & P1[b2, F4() . b1, b1]
provided
   ex b1 being non empty ManySortedSign st
      ex b2 being set st
         b1 = F3() . 0 & b2 = F4() . 0 & P1[b1, b2, 0]
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being set
         st b2 = F3() . b1 & b3 = F4() . b1
      holds F3() . (b1 + 1) = F1(b2, b3, b1) & F4() . (b1 + 1) = F2(b3, b1)
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being set
         st b2 = F3() . b1 & b3 = F4() . b1 & P1[b2, b3, b1]
      holds P1[F1(b2, b3, b1), F2(b3, b1), b1 + 1];


:: CIRCCMB2:sch 3
scheme CIRCCMB2:sch 3
{F1 -> non empty ManySortedSign,
  F2 -> non empty ManySortedSign,
  F3 -> set,
  F4 -> ManySortedSet of NAT,
  F5 -> ManySortedSet of NAT}:
for b1 being natural set
for b2 being set
      st b2 = F5() . b1
   holds F5() . (b1 + 1) = F3(b2, b1)
provided
   F4() . 0 = F1()
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being set
         st b2 = F4() . b1 & b3 = F5() . b1
      holds F4() . (b1 + 1) = F2(b2, b3, b1) & F5() . (b1 + 1) = F3(b3, b1);


:: CIRCCMB2:sch 4
scheme CIRCCMB2:sch 4
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> non empty ManySortedSign,
  F4 -> set,
  F5 -> natural set}:
ex b1 being non empty ManySortedSign st
   ex b2, b3 being ManySortedSet of NAT st
      b1 = b2 . F5() &
       b2 . 0 = F1() &
       b3 . 0 = F2() &
       (for b4 being natural set
       for b5 being non empty ManySortedSign
       for b6 being set
             st b5 = b2 . b4 & b6 = b3 . b4
          holds b2 . (b4 + 1) = F3(b5, b6, b4) & b3 . (b4 + 1) = F4(b6, b4))


:: CIRCCMB2:sch 5
scheme CIRCCMB2:sch 5
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> non empty ManySortedSign,
  F4 -> set,
  F5 -> natural set}:
for b1, b2 being non empty ManySortedSign
      st (ex b3, b4 being ManySortedSet of NAT st
            b1 = b3 . F5() &
             b3 . 0 = F1() &
             b4 . 0 = F2() &
             (for b5 being natural set
             for b6 being non empty ManySortedSign
             for b7 being set
                   st b6 = b3 . b5 & b7 = b4 . b5
                holds b3 . (b5 + 1) = F3(b6, b7, b5) & b4 . (b5 + 1) = F4(b7, b5))) &
         (ex b3, b4 being ManySortedSet of NAT st
            b2 = b3 . F5() &
             b3 . 0 = F1() &
             b4 . 0 = F2() &
             (for b5 being natural set
             for b6 being non empty ManySortedSign
             for b7 being set
                   st b6 = b3 . b5 & b7 = b4 . b5
                holds b3 . (b5 + 1) = F3(b6, b7, b5) & b4 . (b5 + 1) = F4(b7, b5)))
   holds b1 = b2


:: CIRCCMB2:sch 6
scheme CIRCCMB2:sch 6
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> non empty ManySortedSign,
  F4 -> set,
  F5 -> natural set}:
(ex b1 being non empty ManySortedSign st
    ex b2, b3 being ManySortedSet of NAT st
       b1 = b2 . F5() &
        b2 . 0 = F1() &
        b3 . 0 = F2() &
        (for b4 being natural set
        for b5 being non empty ManySortedSign
        for b6 being set
              st b5 = b2 . b4 & b6 = b3 . b4
           holds b2 . (b4 + 1) = F3(b5, b6, b4) & b3 . (b4 + 1) = F4(b6, b4))) &
 (for b1, b2 being non empty ManySortedSign
       st (ex b3, b4 being ManySortedSet of NAT st
             b1 = b3 . F5() &
              b3 . 0 = F1() &
              b4 . 0 = F2() &
              (for b5 being natural set
              for b6 being non empty ManySortedSign
              for b7 being set
                    st b6 = b3 . b5 & b7 = b4 . b5
                 holds b3 . (b5 + 1) = F3(b6, b7, b5) & b4 . (b5 + 1) = F4(b7, b5))) &
          (ex b3, b4 being ManySortedSet of NAT st
             b2 = b3 . F5() &
              b3 . 0 = F1() &
              b4 . 0 = F2() &
              (for b5 being natural set
              for b6 being non empty ManySortedSign
              for b7 being set
                    st b6 = b3 . b5 & b7 = b4 . b5
                 holds b3 . (b5 + 1) = F3(b6, b7, b5) & b4 . (b5 + 1) = F4(b7, b5)))
    holds b1 = b2)


:: CIRCCMB2:sch 7
scheme CIRCCMB2:sch 7
{F1 -> non empty ManySortedSign,
  F2 -> non empty ManySortedSign,
  F3 -> set,
  F4 -> set,
  F5 -> natural set}:
ex b1 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign st
   ex b2, b3 being ManySortedSet of NAT st
      b1 = b2 . F5() &
       b2 . 0 = F1() &
       b3 . 0 = F3() &
       (for b4 being natural set
       for b5 being non empty ManySortedSign
       for b6 being set
             st b5 = b2 . b4 & b6 = b3 . b4
          holds b2 . (b4 + 1) = F2(b5, b6, b4) & b3 . (b4 + 1) = F4(b6, b4))
provided
   F1() is unsplit & F1() is gate`1=arity & F1() is gate`2isBoolean & F1() is not void & F1() is not empty & F1() is strict
and
   for b1 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   for b2 being set
   for b3 being natural set holds
      F2(b1, b2, b3) is unsplit & F2(b1, b2, b3) is gate`1=arity & F2(b1, b2, b3) is gate`2isBoolean & F2(b1, b2, b3) is not void & F2(b1, b2, b3) is not empty & F2(b1, b2, b3) is strict;


:: CIRCCMB2:sch 8
scheme CIRCCMB2:sch 8
{F1 -> non empty ManySortedSign,
  F2 -> non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F3 -> set,
  F4 -> set,
  F5 -> natural set}:
ex b1 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign st
   ex b2, b3 being ManySortedSet of NAT st
      b1 = b2 . F5() &
       b2 . 0 = F1() &
       b3 . 0 = F3() &
       (for b4 being natural set
       for b5 being non empty ManySortedSign
       for b6 being set
             st b5 = b2 . b4 & b6 = b3 . b4
          holds b2 . (b4 + 1) = b5 +* F2(b6, b4) & b3 . (b4 + 1) = F4(b6, b4))
provided
   F1() is unsplit & F1() is gate`1=arity & F1() is gate`2isBoolean & F1() is not void & F1() is not empty & F1() is strict;


:: CIRCCMB2:sch 9
scheme CIRCCMB2:sch 9
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> non empty ManySortedSign,
  F4 -> set,
  F5 -> natural set}:
for b1, b2 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
      st (ex b3, b4 being ManySortedSet of NAT st
            b1 = b3 . F5() &
             b3 . 0 = F1() &
             b4 . 0 = F2() &
             (for b5 being natural set
             for b6 being non empty ManySortedSign
             for b7 being set
                   st b6 = b3 . b5 & b7 = b4 . b5
                holds b3 . (b5 + 1) = F3(b6, b7, b5) & b4 . (b5 + 1) = F4(b7, b5))) &
         (ex b3, b4 being ManySortedSet of NAT st
            b2 = b3 . F5() &
             b3 . 0 = F1() &
             b4 . 0 = F2() &
             (for b5 being natural set
             for b6 being non empty ManySortedSign
             for b7 being set
                   st b6 = b3 . b5 & b7 = b4 . b5
                holds b3 . (b5 + 1) = F3(b6, b7, b5) & b4 . (b5 + 1) = F4(b7, b5)))
   holds b1 = b2


:: CIRCCMB2:th 6
theorem
for b1, b2 being non empty ManySortedSign
      st b1 tolerates b2
   holds InputVertices (b1 +* b2) = ((InputVertices b1) \ InnerVertices b2) \/ ((InputVertices b2) \ InnerVertices b1);

:: CIRCCMB2:th 7
theorem
for b1 being without_pairs set
for b2 being Relation-like set holds
   b1 \ b2 = b1;

:: CIRCCMB2:th 8
theorem
for b1 being Relation-like set
for b2, b3 being set
      st b3 c= b2 & b2 \ b3 is without_pairs
   holds b1 \ b2 = b1 \ b3;

:: CIRCCMB2:th 9
theorem
for b1, b2 being set
for b3 being Relation-like set
      st b2 c= b3 & b1 \ b2 is without_pairs
   holds b1 \ b3 = b1 \ b2;

:: CIRCCMB2:sch 10
scheme CIRCCMB2:sch 10
{F1 -> non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F2 -> set,
  F3 -> ManySortedSet of NAT,
  F4 -> non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F5 -> set}:
for b1 being natural set holds
   ex b2, b3 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign st
      b2 = F2(b1) &
       b3 = F2(b1 + 1) &
       InputVertices b3 = (InputVertices b2) \/ ((InputVertices F4(F3() . b1, b1)) \ {F3() . b1}) &
       InnerVertices b2 is Relation-like set &
       InputVertices b2 is without_pairs
provided
   InnerVertices F1() is Relation-like set
and
   InputVertices F1() is without_pairs
and
   F2(0) = F1() & F3() . 0 in InnerVertices F1()
and
   for b1 being natural set
   for b2 being set holds
      InnerVertices F4(b2, b1) is Relation-like set
and
   for b1 being natural set
   for b2 being set
         st b2 = F3() . b1
      holds (InputVertices F4(b2, b1)) \ {b2} is without_pairs
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being set
         st b2 = F2(b1) & b3 = F3() . b1
      holds F2(b1 + 1) = b2 +* F4(b3, b1) & F3() . (b1 + 1) = F5(b3, b1) & b3 in InputVertices F4(b3, b1) & F5(b3, b1) in InnerVertices F4(b3, b1);


:: CIRCCMB2:sch 11
scheme CIRCCMB2:sch 11
{F1 -> non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F2 -> ManySortedSet of NAT,
  F3 -> non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F4 -> set}:
for b1 being natural set holds
   InputVertices F1(b1 + 1) = (InputVertices F1(b1)) \/ ((InputVertices F3(F2() . b1, b1)) \ {F2() . b1}) &
    InnerVertices F1(b1) is Relation-like set &
    InputVertices F1(b1) is without_pairs
provided
   InnerVertices F1(0) is Relation-like set
and
   InputVertices F1(0) is without_pairs
and
   F2() . 0 in InnerVertices F1(0)
and
   for b1 being natural set
   for b2 being set holds
      InnerVertices F3(b2, b1) is Relation-like set
and
   for b1 being natural set
   for b2 being set
         st b2 = F2() . b1
      holds (InputVertices F3(b2, b1)) \ {b2} is without_pairs
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being set
         st b2 = F1(b1) & b3 = F2() . b1
      holds F1(b1 + 1) = b2 +* F3(b3, b1) & F2() . (b1 + 1) = F4(b3, b1) & b3 in InputVertices F3(b3, b1) & F4(b3, b1) in InnerVertices F3(b3, b1);


:: CIRCCMB2:sch 12
scheme CIRCCMB2:sch 12
{F1 -> non empty ManySortedSign,
  F2 -> non-empty MSAlgebra over F1(),
  F3 -> set,
  F4 -> non empty ManySortedSign,
  F5 -> set,
  F6 -> set}:
ex b1, b2, b3 being ManySortedSet of NAT st
   b1 . 0 = F1() &
    b2 . 0 = F2() &
    b3 . 0 = F3() &
    (for b4 being natural set
    for b5 being non empty ManySortedSign
    for b6 being non-empty MSAlgebra over b5
    for b7 being set
          st b5 = b1 . b4 & b6 = b2 . b4 & b7 = b3 . b4
       holds b1 . (b4 + 1) = F4(b5, b7, b4) & b2 . (b4 + 1) = F5(b5, b6, b7, b4) & b3 . (b4 + 1) = F6(b7, b4))


:: CIRCCMB2:sch 13
scheme CIRCCMB2:sch 13
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> set,
  F4 -> ManySortedSet of NAT,
  F5 -> ManySortedSet of NAT,
  F6 -> ManySortedSet of NAT}:
for b1 being natural set holds
   ex b2 being non empty ManySortedSign st
      ex b3 being non-empty MSAlgebra over b2 st
         b2 = F4() . b1 & b3 = F5() . b1 & P1[b2, b3, F6() . b1, b1]
provided
   ex b1 being non empty ManySortedSign st
      ex b2 being non-empty MSAlgebra over b1 st
         ex b3 being set st
            b1 = F4() . 0 & b2 = F5() . 0 & b3 = F6() . 0 & P1[b1, b2, b3, 0]
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being non-empty MSAlgebra over b2
   for b4 being set
         st b2 = F4() . b1 & b3 = F5() . b1 & b4 = F6() . b1
      holds F4() . (b1 + 1) = F1(b2, b4, b1) & F5() . (b1 + 1) = F2(b2, b3, b4, b1) & F6() . (b1 + 1) = F3(b4, b1)
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being non-empty MSAlgebra over b2
   for b4 being set
         st b2 = F4() . b1 & b3 = F5() . b1 & b4 = F6() . b1 & P1[b2, b3, b4, b1]
      holds P1[F1(b2, b4, b1), F2(b2, b3, b4, b1), F3(b4, b1), b1 + 1]
and
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F2(b1, b2, b3, b4) is non-empty MSAlgebra over F1(b1, b3, b4);


:: CIRCCMB2:sch 14
scheme CIRCCMB2:sch 14
{F1 -> non empty ManySortedSign,
  F2 -> set,
  F3 -> set,
  F4 -> ManySortedSet of NAT,
  F5 -> ManySortedSet of NAT,
  F6 -> ManySortedSet of NAT,
  F7 -> ManySortedSet of NAT,
  F8 -> ManySortedSet of NAT,
  F9 -> ManySortedSet of NAT}:
F4() = F5() & F6() = F7() & F8() = F9()
provided
   ex b1 being non empty ManySortedSign st
      ex b2 being non-empty MSAlgebra over b1 st
         b1 = F4() . 0 & b2 = F6() . 0
and
   F4() . 0 = F5() . 0 & F6() . 0 = F7() . 0 & F8() . 0 = F9() . 0
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being non-empty MSAlgebra over b2
   for b4 being set
         st b2 = F4() . b1 & b3 = F6() . b1 & b4 = F8() . b1
      holds F4() . (b1 + 1) = F1(b2, b4, b1) & F6() . (b1 + 1) = F2(b2, b3, b4, b1) & F8() . (b1 + 1) = F3(b4, b1)
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being non-empty MSAlgebra over b2
   for b4 being set
         st b2 = F5() . b1 & b3 = F7() . b1 & b4 = F9() . b1
      holds F5() . (b1 + 1) = F1(b2, b4, b1) & F7() . (b1 + 1) = F2(b2, b3, b4, b1) & F9() . (b1 + 1) = F3(b4, b1)
and
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F2(b1, b2, b3, b4) is non-empty MSAlgebra over F1(b1, b3, b4);


:: CIRCCMB2:sch 15
scheme CIRCCMB2:sch 15
{F1 -> non empty ManySortedSign,
  F2 -> non-empty MSAlgebra over F1(),
  F3 -> non empty ManySortedSign,
  F4 -> set,
  F5 -> set,
  F6 -> ManySortedSet of NAT,
  F7 -> ManySortedSet of NAT,
  F8 -> ManySortedSet of NAT}:
for b1 being natural set
for b2 being non empty ManySortedSign
for b3 being set
      st b2 = F6() . b1 & b3 = F8() . b1
   holds F6() . (b1 + 1) = F3(b2, b3, b1) & F8() . (b1 + 1) = F5(b3, b1)
provided
   F6() . 0 = F1() & F7() . 0 = F2()
and
   for b1 being natural set
   for b2 being non empty ManySortedSign
   for b3 being non-empty MSAlgebra over b2
   for b4 being set
         st b2 = F6() . b1 & b3 = F7() . b1 & b4 = F8() . b1
      holds F6() . (b1 + 1) = F3(b2, b4, b1) & F7() . (b1 + 1) = F4(b2, b3, b4, b1) & F8() . (b1 + 1) = F5(b4, b1)
and
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F4(b1, b2, b3, b4) is non-empty MSAlgebra over F3(b1, b3, b4);


:: CIRCCMB2:sch 16
scheme CIRCCMB2:sch 16
{F1 -> non empty ManySortedSign,
  F2 -> non-empty MSAlgebra over F1(),
  F3 -> set,
  F4 -> non empty ManySortedSign,
  F5 -> set,
  F6 -> set,
  F7 -> natural set}:
ex b1 being non empty ManySortedSign st
   ex b2 being non-empty MSAlgebra over b1 st
      ex b3, b4, b5 being ManySortedSet of NAT st
         b1 = b3 . F7() &
          b2 = b4 . F7() &
          b3 . 0 = F1() &
          b4 . 0 = F2() &
          b5 . 0 = F3() &
          (for b6 being natural set
          for b7 being non empty ManySortedSign
          for b8 being non-empty MSAlgebra over b7
          for b9 being set
                st b7 = b3 . b6 & b8 = b4 . b6 & b9 = b5 . b6
             holds b3 . (b6 + 1) = F4(b7, b9, b6) & b4 . (b6 + 1) = F5(b7, b8, b9, b6) & b5 . (b6 + 1) = F6(b9, b6))
provided
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F5(b1, b2, b3, b4) is non-empty MSAlgebra over F4(b1, b3, b4);


:: CIRCCMB2:sch 17
scheme CIRCCMB2:sch 17
{F1 -> non empty ManySortedSign,
  F2 -> non empty ManySortedSign,
  F3 -> non-empty MSAlgebra over F1(),
  F4 -> set,
  F5 -> non empty ManySortedSign,
  F6 -> set,
  F7 -> set,
  F8 -> natural set}:
ex b1 being non-empty MSAlgebra over F2() st
   ex b2, b3, b4 being ManySortedSet of NAT st
      F2() = b2 . F8() &
       b1 = b3 . F8() &
       b2 . 0 = F1() &
       b3 . 0 = F3() &
       b4 . 0 = F4() &
       (for b5 being natural set
       for b6 being non empty ManySortedSign
       for b7 being non-empty MSAlgebra over b6
       for b8 being set
             st b6 = b2 . b5 & b7 = b3 . b5 & b8 = b4 . b5
          holds b2 . (b5 + 1) = F5(b6, b8, b5) & b3 . (b5 + 1) = F6(b6, b7, b8, b5) & b4 . (b5 + 1) = F7(b8, b5))
provided
   ex b1, b2 being ManySortedSet of NAT st
      F2() = b1 . F8() &
       b1 . 0 = F1() &
       b2 . 0 = F4() &
       (for b3 being natural set
       for b4 being non empty ManySortedSign
       for b5 being set
             st b4 = b1 . b3 & b5 = b2 . b3
          holds b1 . (b3 + 1) = F5(b4, b5, b3) & b2 . (b3 + 1) = F7(b5, b3))
and
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F6(b1, b2, b3, b4) is non-empty MSAlgebra over F5(b1, b3, b4);


:: CIRCCMB2:sch 18
scheme CIRCCMB2:sch 18
{F1 -> non empty ManySortedSign,
  F2 -> non empty ManySortedSign,
  F3 -> non-empty MSAlgebra over F1(),
  F4 -> set,
  F5 -> non empty ManySortedSign,
  F6 -> set,
  F7 -> set,
  F8 -> natural set}:
for b1, b2 being non-empty MSAlgebra over F2()
      st (ex b3, b4, b5 being ManySortedSet of NAT st
            F2() = b3 . F8() &
             b1 = b4 . F8() &
             b3 . 0 = F1() &
             b4 . 0 = F3() &
             b5 . 0 = F4() &
             (for b6 being natural set
             for b7 being non empty ManySortedSign
             for b8 being non-empty MSAlgebra over b7
             for b9 being set
                   st b7 = b3 . b6 & b8 = b4 . b6 & b9 = b5 . b6
                holds b3 . (b6 + 1) = F5(b7, b9, b6) & b4 . (b6 + 1) = F6(b7, b8, b9, b6) & b5 . (b6 + 1) = F7(b9, b6))) &
         (ex b3, b4, b5 being ManySortedSet of NAT st
            F2() = b3 . F8() &
             b2 = b4 . F8() &
             b3 . 0 = F1() &
             b4 . 0 = F3() &
             b5 . 0 = F4() &
             (for b6 being natural set
             for b7 being non empty ManySortedSign
             for b8 being non-empty MSAlgebra over b7
             for b9 being set
                   st b7 = b3 . b6 & b8 = b4 . b6 & b9 = b5 . b6
                holds b3 . (b6 + 1) = F5(b7, b9, b6) & b4 . (b6 + 1) = F6(b7, b8, b9, b6) & b5 . (b6 + 1) = F7(b9, b6)))
   holds b1 = b2
provided
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F6(b1, b2, b3, b4) is non-empty MSAlgebra over F5(b1, b3, b4);


:: CIRCCMB2:sch 19
scheme CIRCCMB2:sch 19
{F1 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F2 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F3 -> strict locally-finite gate`2=den Boolean MSAlgebra over F1(),
  F4 -> non empty ManySortedSign,
  F5 -> set,
  F6 -> set,
  F7 -> set,
  F8 -> natural set}:
ex b1 being strict locally-finite gate`2=den Boolean MSAlgebra over F2() st
   ex b2, b3, b4 being ManySortedSet of NAT st
      F2() = b2 . F8() &
       b1 = b3 . F8() &
       b2 . 0 = F1() &
       b3 . 0 = F3() &
       b4 . 0 = F6() &
       (for b5 being natural set
       for b6 being non empty ManySortedSign
       for b7 being non-empty MSAlgebra over b6
       for b8 being set
             st b6 = b2 . b5 & b7 = b3 . b5 & b8 = b4 . b5
          holds b2 . (b5 + 1) = F4(b6, b8, b5) & b3 . (b5 + 1) = F5(b6, b7, b8, b5) & b4 . (b5 + 1) = F7(b8, b5))
provided
   for b1 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   for b2 being set
   for b3 being natural set holds
      F4(b1, b2, b3) is unsplit & F4(b1, b2, b3) is gate`1=arity & F4(b1, b2, b3) is gate`2isBoolean & F4(b1, b2, b3) is not void & F4(b1, b2, b3) is strict
and
   ex b1, b2 being ManySortedSet of NAT st
      F2() = b1 . F8() &
       b1 . 0 = F1() &
       b2 . 0 = F6() &
       (for b3 being natural set
       for b4 being non empty ManySortedSign
       for b5 being set
             st b4 = b1 . b3 & b5 = b2 . b3
          holds b1 . (b3 + 1) = F4(b4, b5, b3) & b2 . (b3 + 1) = F7(b5, b3))
and
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F5(b1, b2, b3, b4) is non-empty MSAlgebra over F4(b1, b3, b4)
and
   for b1, b2 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   for b3 being strict locally-finite gate`2=den Boolean MSAlgebra over b1
   for b4 being set
   for b5 being natural set
         st b2 = F4(b1, b4, b5)
      holds F5(b1, b3, b4, b5) is strict locally-finite gate`2=den Boolean MSAlgebra over b2;


:: CIRCCMB2:funcnot 1 => CIRCCMB2:func 1
definition
  let a1 be non empty ManySortedSign;
  let a2 be set;
  assume a2 is non-empty MSAlgebra over a1;
  func MSAlg(A2,A1) -> non-empty MSAlgebra over a1 means
    it = a2;
end;

:: CIRCCMB2:def 1
theorem
for b1 being non empty ManySortedSign
for b2 being set
   st b2 is non-empty MSAlgebra over b1
for b3 being non-empty MSAlgebra over b1 holds
      b3 = MSAlg(b2,b1)
   iff
      b3 = b2;

:: CIRCCMB2:sch 20
scheme CIRCCMB2:sch 20
{F1 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F2 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F3 -> strict locally-finite gate`2=den Boolean MSAlgebra over F1(),
  F4 -> non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F5 -> set,
  F6 -> set,
  F7 -> set,
  F8 -> natural set}:
ex b1 being strict locally-finite gate`2=den Boolean MSAlgebra over F2() st
   ex b2, b3, b4 being ManySortedSet of NAT st
      F2() = b2 . F8() &
       b1 = b3 . F8() &
       b2 . 0 = F1() &
       b3 . 0 = F3() &
       b4 . 0 = F6() &
       (for b5 being natural set
       for b6 being non empty ManySortedSign
       for b7 being non-empty MSAlgebra over b6
       for b8 being set
       for b9 being non-empty MSAlgebra over F4(b8, b5)
             st b6 = b2 . b5 & b7 = b3 . b5 & b8 = b4 . b5 & b9 = F5(b8, b5)
          holds b2 . (b5 + 1) = b6 +* F4(b8, b5) & b3 . (b5 + 1) = b7 +* b9 & b4 . (b5 + 1) = F7(b8, b5))
provided
   ex b1, b2 being ManySortedSet of NAT st
      F2() = b1 . F8() &
       b1 . 0 = F1() &
       b2 . 0 = F6() &
       (for b3 being natural set
       for b4 being non empty ManySortedSign
       for b5 being set
             st b4 = b1 . b3 & b5 = b2 . b3
          holds b1 . (b3 + 1) = b4 +* F4(b5, b3) & b2 . (b3 + 1) = F7(b5, b3))
and
   for b1 being set
   for b2 being natural set holds
      F5(b1, b2) is strict locally-finite gate`2=den Boolean MSAlgebra over F4(b1, b2);


:: CIRCCMB2:sch 21
scheme CIRCCMB2:sch 21
{F1 -> non empty ManySortedSign,
  F2 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F3 -> non-empty MSAlgebra over F1(),
  F4 -> set,
  F5 -> non empty ManySortedSign,
  F6 -> set,
  F7 -> set,
  F8 -> natural set}:
for b1, b2 being strict locally-finite gate`2=den Boolean MSAlgebra over F2()
      st (ex b3, b4, b5 being ManySortedSet of NAT st
            F2() = b3 . F8() &
             b1 = b4 . F8() &
             b3 . 0 = F1() &
             b4 . 0 = F3() &
             b5 . 0 = F4() &
             (for b6 being natural set
             for b7 being non empty ManySortedSign
             for b8 being non-empty MSAlgebra over b7
             for b9 being set
                   st b7 = b3 . b6 & b8 = b4 . b6 & b9 = b5 . b6
                holds b3 . (b6 + 1) = F5(b7, b9, b6) & b4 . (b6 + 1) = F6(b7, b8, b9, b6) & b5 . (b6 + 1) = F7(b9, b6))) &
         (ex b3, b4, b5 being ManySortedSet of NAT st
            F2() = b3 . F8() &
             b2 = b4 . F8() &
             b3 . 0 = F1() &
             b4 . 0 = F3() &
             b5 . 0 = F4() &
             (for b6 being natural set
             for b7 being non empty ManySortedSign
             for b8 being non-empty MSAlgebra over b7
             for b9 being set
                   st b7 = b3 . b6 & b8 = b4 . b6 & b9 = b5 . b6
                holds b3 . (b6 + 1) = F5(b7, b9, b6) & b4 . (b6 + 1) = F6(b7, b8, b9, b6) & b5 . (b6 + 1) = F7(b9, b6)))
   holds b1 = b2
provided
   for b1 being non empty ManySortedSign
   for b2 being non-empty MSAlgebra over b1
   for b3 being set
   for b4 being natural set holds
      F6(b1, b2, b3, b4) is non-empty MSAlgebra over F5(b1, b3, b4);


:: CIRCCMB2:th 10
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InnerVertices b1 misses InputVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b5
for b8 being Element of product the Sorts of b6
      st b7 = b8 | the carrier of b2
   holds Following b7 = (Following b8) | the carrier of b2;

:: CIRCCMB2:th 11
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b4
for b8 being Element of product the Sorts of b6
      st b7 = b8 | the carrier of b1
   holds Following b7 = (Following b8) | the carrier of b1;

:: CIRCCMB2:th 12
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st b1 tolerates b2 & InnerVertices b1 misses InputVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b4
for b8 being Element of product the Sorts of b5
for b9 being Element of product the Sorts of b6
      st b7 = b9 | the carrier of b1 & b8 = b9 | the carrier of b2 & b7 is stable(b1, b4) & b8 is stable(b2, b5)
   holds b9 is stable(b3, b6);

:: CIRCCMB2:th 13
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st b1 tolerates b2 & InputVertices b1 misses InnerVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b4
for b8 being Element of product the Sorts of b5
for b9 being Element of product the Sorts of b6
      st b7 = b9 | the carrier of b1 & b8 = b9 | the carrier of b2 & b7 is stable(b1, b4) & b8 is stable(b2, b5)
   holds b9 is stable(b3, b6);

:: CIRCCMB2:th 14
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b6
for b8 being Element of product the Sorts of b4
   st b8 = b7 | the carrier of b1
for b9 being natural set holds
   (Following(b7,b9)) | the carrier of b1 = Following(b8,b9);

:: CIRCCMB2:th 15
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b2 misses InnerVertices b1 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b6
for b8 being Element of product the Sorts of b5
   st b8 = b7 | the carrier of b2
for b9 being natural set holds
   (Following(b7,b9)) | the carrier of b2 = Following(b8,b9);

:: CIRCCMB2:th 16
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b6
for b8 being Element of product the Sorts of b4
   st b8 = b7 | the carrier of b1 & b8 is stable(b1, b4)
for b9 being Element of product the Sorts of b5
      st b9 = b7 | the carrier of b2
   holds (Following b7) | the carrier of b2 = Following b9;

:: CIRCCMB2:th 17
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b6
for b8 being Element of product the Sorts of b4
   st b8 = b7 | the carrier of b1 & b8 is stable(b1, b4)
for b9 being Element of product the Sorts of b5
      st b9 = b7 | the carrier of b2 & b9 is stable(b2, b5)
   holds b7 is stable(b3, b6);

:: CIRCCMB2:th 18
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b6
      st b7 is stable(b3, b6)
   holds (for b8 being Element of product the Sorts of b4
          st b8 = b7 | the carrier of b1
       holds b8 is stable(b1, b4)) &
    (for b8 being Element of product the Sorts of b5
          st b8 = b7 | the carrier of b2
       holds b8 is stable(b2, b5));

:: CIRCCMB2:th 19
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b4
for b8 being Element of product the Sorts of b5
for b9 being Element of product the Sorts of b6
   st b7 = b9 | the carrier of b1 & b8 = b9 | the carrier of b2 & b7 is stable(b1, b4)
for b10 being natural set holds
   (Following(b9,b10)) | the carrier of b2 = Following(b8,b10);

:: CIRCCMB2:th 20
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7, b8 being natural set
for b9 being Element of product the Sorts of b6
for b10 being Element of product the Sorts of b4
for b11 being Element of product the Sorts of b5
      st b10 = b9 | the carrier of b1 & Following(b10,b7) is stable(b1, b4) & b11 = (Following(b9,b7)) | the carrier of b2 & Following(b11,b8) is stable(b2, b5)
   holds Following(b9,b7 + b8) is stable(b3, b6);

:: CIRCCMB2:th 21
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7, b8 being natural set
   st (for b9 being Element of product the Sorts of b4 holds
         Following(b9,b7) is stable(b1, b4)) &
      (for b9 being Element of product the Sorts of b5 holds
         Following(b9,b8) is stable(b2, b5))
for b9 being Element of product the Sorts of b6 holds
   Following(b9,b7 + b8) is stable(b3, b6);

:: CIRCCMB2:th 22
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & InputVertices b2 misses InnerVertices b1 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being Element of product the Sorts of b6
for b8 being Element of product the Sorts of b4
   st b8 = b7 | the carrier of b1
for b9 being Element of product the Sorts of b5
   st b9 = b7 | the carrier of b2
for b10 being natural set holds
   Following(b7,b10) = (Following(b8,b10)) +* Following(b9,b10);

:: CIRCCMB2:th 23
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & InputVertices b2 misses InnerVertices b1 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7, b8 being natural set
for b9 being Element of product the Sorts of b6
for b10 being Element of product the Sorts of b4
   st b10 = b9 | the carrier of b1
for b11 being Element of product the Sorts of b5
      st b11 = b9 | the carrier of b2 & Following(b10,b7) is stable(b1, b4) & Following(b11,b8) is stable(b2, b5)
   holds Following(b9,max(b7,b8)) is stable(b3, b6);

:: CIRCCMB2:th 24
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & InputVertices b2 misses InnerVertices b1 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7 being natural set
for b8 being Element of product the Sorts of b6
for b9 being Element of product the Sorts of b4
   st b9 = b8 | the carrier of b1
for b10 being Element of product the Sorts of b5
      st b10 = b8 | the carrier of b2 &
         (Following(b9,b7) is stable(b1, b4) implies Following(b10,b7) is not stable(b2, b5))
   holds Following(b8,b7) is not stable(b3, b6);

:: CIRCCMB2:th 25
theorem
for b1, b2, b3 being non empty non void Circuit-like ManySortedSign
   st InputVertices b1 misses InnerVertices b2 & InputVertices b2 misses InnerVertices b1 & b3 = b1 +* b2
for b4 being non-empty locally-finite MSAlgebra over b1
for b5 being non-empty locally-finite MSAlgebra over b2
for b6 being non-empty locally-finite MSAlgebra over b3
   st b4 tolerates b5 & b6 = b4 +* b5
for b7, b8 being natural set
   st (for b9 being Element of product the Sorts of b4 holds
         Following(b9,b7) is stable(b1, b4)) &
      (for b9 being Element of product the Sorts of b5 holds
         Following(b9,b8) is stable(b2, b5))
for b9 being Element of product the Sorts of b6 holds
   Following(b9,max(b7,b8)) is stable(b3, b6);

:: CIRCCMB2:sch 22
scheme CIRCCMB2:sch 22
{F1 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F2 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F3 -> strict locally-finite gate`2=den Boolean MSAlgebra over F1(),
  F4 -> strict locally-finite gate`2=den Boolean MSAlgebra over F2(),
  F5 -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign,
  F6 -> set,
  F7 -> ManySortedSet of NAT,
  F8 -> set,
  F9 -> set,
  F10 -> natural set}:
for b1 being Element of product the Sorts of F4() holds
   Following(b1,F10(0) + (F10(2) * F10(1))) is stable(F2(), F4())
provided
   for b1 being set
   for b2 being natural set holds
      F6(b1, b2) is strict locally-finite gate`2=den Boolean MSAlgebra over F5(b1, b2)
and
   for b1 being Element of product the Sorts of F3() holds
      Following(b1,F10(0)) is stable(F1(), F3())
and
   for b1 being natural set
   for b2 being set
   for b3 being non-empty locally-finite MSAlgebra over F5(b2, b1)
      st b2 = F7() . b1 & b3 = F6(b2, b1)
   for b4 being Element of product the Sorts of b3 holds
      Following(b4,F10(1)) is stable(F5(b2, b1), b3)
and
   ex b1, b2 being ManySortedSet of NAT st
      F2() = b1 . F10(2) &
       F4() = b2 . F10(2) &
       b1 . 0 = F1() &
       b2 . 0 = F3() &
       F7() . 0 = F8() &
       (for b3 being natural set
       for b4 being non empty ManySortedSign
       for b5 being non-empty MSAlgebra over b4
       for b6 being set
       for b7 being non-empty MSAlgebra over F5(b6, b3)
             st b4 = b1 . b3 & b5 = b2 . b3 & b6 = F7() . b3 & b7 = F6(b6, b3)
          holds b1 . (b3 + 1) = b4 +* F5(b6, b3) & b2 . (b3 + 1) = b5 +* b7 & F7() . (b3 + 1) = F9(b6, b3))
and
   InnerVertices F1() is Relation-like set & InputVertices F1() is without_pairs
and
   F7() . 0 = F8() & F8() in InnerVertices F1()
and
   for b1 being natural set
   for b2 being set holds
      InnerVertices F5(b2, b1) is Relation-like set
and
   for b1 being natural set
   for b2 being set
         st b2 = F7() . b1
      holds (InputVertices F5(b2, b1)) \ {b2} is without_pairs
and
   for b1 being natural set
   for b2 being set
         st b2 = F7() . b1
      holds F7() . (b1 + 1) = F9(b2, b1) & b2 in InputVertices F5(b2, b1) & F9(b2, b1) in InnerVertices F5(b2, b1);