Article FACIRC_1, MML version 4.99.1005

:: FACIRC_1:attrnot 1 => FACIRC_1:attr 1
definition
  let a1 be set;
  attr a1 is pair means
    ex b1, b2 being set st
       a1 = [b1,b2];
end;

:: FACIRC_1:dfs 1
definiens
  let a1 be set;
To prove
     a1 is pair
it is sufficient to prove
  thus ex b1, b2 being set st
       a1 = [b1,b2];

:: FACIRC_1:def 1
theorem
for b1 being set holds
      b1 is pair
   iff
      ex b2, b3 being set st
         b1 = [b2,b3];

:: FACIRC_1:condreg 1
registration
  cluster pair -> non empty (set);
end;

:: FACIRC_1:funcreg 1
registration
  let a1, a2 be set;
  cluster [a1,a2] -> pair;
end;

:: FACIRC_1:exreg 1
registration
  cluster pair set;
end;

:: FACIRC_1:exreg 2
registration
  cluster non pair set;
end;

:: FACIRC_1:condreg 2
registration
  cluster natural -> non pair (set);
end;

:: FACIRC_1:attrnot 2 => FACIRC_1:attr 2
definition
  let a1 be set;
  attr a1 is with_pair means
    ex b1 being pair set st
       b1 in a1;
end;

:: FACIRC_1:dfs 2
definiens
  let a1 be set;
To prove
     a1 is with_pair
it is sufficient to prove
  thus ex b1 being pair set st
       b1 in a1;

:: FACIRC_1:def 2
theorem
for b1 being set holds
      b1 is with_pair
   iff
      ex b2 being pair set st
         b2 in b1;

:: FACIRC_1:attrnot 3 => FACIRC_1:attr 2
notation
  let a1 be set;
  antonym without_pairs for with_pair;
end;

:: FACIRC_1:condreg 3
registration
  cluster empty -> without_pairs (set);
end;

:: FACIRC_1:funcreg 2
registration
  let a1 be non pair set;
  cluster {a1} -> without_pairs;
end;

:: FACIRC_1:funcreg 3
registration
  let a1, a2 be non pair set;
  cluster {a1,a2} -> without_pairs;
end;

:: FACIRC_1:funcreg 4
registration
  let a1, a2, a3 be non pair set;
  cluster {a1,a2,a3} -> without_pairs;
end;

:: FACIRC_1:exreg 3
registration
  cluster non empty without_pairs set;
end;

:: FACIRC_1:funcreg 5
registration
  let a1, a2 be without_pairs set;
  cluster a1 \/ a2 -> without_pairs;
end;

:: FACIRC_1:funcreg 6
registration
  let a1 be without_pairs set;
  let a2 be set;
  cluster a1 \ a2 -> without_pairs;
end;

:: FACIRC_1:funcreg 7
registration
  let a1 be without_pairs set;
  let a2 be set;
  cluster a1 /\ a2 -> without_pairs;
end;

:: FACIRC_1:funcreg 8
registration
  let a1 be without_pairs set;
  let a2 be set;
  cluster a2 /\ a1 -> without_pairs;
end;

:: FACIRC_1:funcreg 9
registration
  let a1 be pair set;
  cluster {a1} -> Relation-like;
end;

:: FACIRC_1:funcreg 10
registration
  let a1, a2 be pair set;
  cluster {a1,a2} -> Relation-like;
end;

:: FACIRC_1:funcreg 11
registration
  let a1, a2, a3 be pair set;
  cluster {a1,a2,a3} -> Relation-like;
end;

:: FACIRC_1:condreg 4
registration
  cluster Relation-like without_pairs -> empty (set);
end;

:: FACIRC_1:attrnot 4 => FACIRC_1:attr 3
definition
  let a1 be Relation-like Function-like set;
  attr a1 is nonpair-yielding means
    for b1 being set
          st b1 in proj1 a1
       holds a1 . b1 is not pair;
end;

:: FACIRC_1:dfs 3
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is nonpair-yielding
it is sufficient to prove
  thus for b1 being set
          st b1 in proj1 a1
       holds a1 . b1 is not pair;

:: FACIRC_1:def 3
theorem
for b1 being Relation-like Function-like set holds
      b1 is nonpair-yielding
   iff
      for b2 being set
            st b2 in proj1 b1
         holds b1 . b2 is not pair;

:: FACIRC_1:funcreg 12
registration
  let a1 be non pair set;
  cluster <*a1*> -> nonpair-yielding;
end;

:: FACIRC_1:funcreg 13
registration
  let a1, a2 be non pair set;
  cluster <*a1,a2*> -> nonpair-yielding;
end;

:: FACIRC_1:funcreg 14
registration
  let a1, a2, a3 be non pair set;
  cluster <*a1,a2,a3*> -> nonpair-yielding;
end;

:: FACIRC_1:th 1
theorem
for b1 being Relation-like Function-like set
      st b1 is nonpair-yielding
   holds proj2 b1 is without_pairs;

:: FACIRC_1:exreg 4
registration
  let a1 be natural set;
  cluster Relation-like Function-like one-to-one finite FinSequence-like nonpair-yielding FinSeqLen of a1;
end;

:: FACIRC_1:exreg 5
registration
  cluster Relation-like Function-like one-to-one finite FinSequence-like nonpair-yielding set;
end;

:: FACIRC_1:funcreg 15
registration
  let a1 be Relation-like Function-like nonpair-yielding set;
  cluster proj2 a1 -> without_pairs;
end;

:: FACIRC_1:th 2
theorem
for b1, b2 being non empty ManySortedSign
      st b1 tolerates b2 & InnerVertices b1 is Relation-like set & InnerVertices b2 is Relation-like set
   holds InnerVertices (b1 +* b2) is Relation-like set;

:: FACIRC_1:th 3
theorem
for b1, b2 being non empty unsplit gate`1=arity ManySortedSign
      st InnerVertices b1 is Relation-like set & InnerVertices b2 is Relation-like set
   holds InnerVertices (b1 +* b2) is Relation-like set;

:: FACIRC_1:th 4
theorem
for b1, b2 being non empty ManySortedSign
      st b1 tolerates b2 & InnerVertices b2 misses InputVertices b1
   holds InputVertices b1 c= InputVertices (b1 +* b2) &
    InputVertices (b1 +* b2) = (InputVertices b1) \/ ((InputVertices b2) \ InnerVertices b1);

:: FACIRC_1:th 5
theorem
for b1, b2 being set
      st b1 is without_pairs & b2 is Relation-like set
   holds b1 misses b2;

:: FACIRC_1:th 6
theorem
for b1, b2 being non empty unsplit gate`1=arity ManySortedSign
      st InputVertices b1 is without_pairs & InnerVertices b2 is Relation-like set
   holds InputVertices b1 c= InputVertices (b1 +* b2) &
    InputVertices (b1 +* b2) = (InputVertices b1) \/ ((InputVertices b2) \ InnerVertices b1);

:: FACIRC_1:th 7
theorem
for b1, b2 being non empty unsplit gate`1=arity ManySortedSign
      st InputVertices b1 is without_pairs & InnerVertices b1 is Relation-like set & InputVertices b2 is without_pairs & InnerVertices b2 is Relation-like set
   holds InputVertices (b1 +* b2) = (InputVertices b1) \/ InputVertices b2;

:: FACIRC_1:th 8
theorem
for b1, b2 being non empty ManySortedSign
      st b1 tolerates b2 & InputVertices b1 is without_pairs & InputVertices b2 is without_pairs
   holds InputVertices (b1 +* b2) is without_pairs;

:: FACIRC_1:th 9
theorem
for b1, b2 being non empty unsplit gate`1=arity ManySortedSign
      st InputVertices b1 is without_pairs & InputVertices b2 is without_pairs
   holds InputVertices (b1 +* b2) is without_pairs;

:: FACIRC_1:sch 1
scheme FACIRC_1:sch 1
{F1 -> Element of BOOLEAN}:
ex b1 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN st
   for b2, b3 being Element of BOOLEAN holds
   b1 . <*b2,b3*> = F1(b2, b3)


:: FACIRC_1:sch 2
scheme FACIRC_1:sch 2
{F1 -> Element of BOOLEAN}:
for b1, b2 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
      st (for b3, b4 being Element of BOOLEAN holds
         b1 . <*b3,b4*> = F1(b3, b4)) &
         (for b3, b4 being Element of BOOLEAN holds
         b2 . <*b3,b4*> = F1(b3, b4))
   holds b1 = b2


:: FACIRC_1:sch 3
scheme FACIRC_1:sch 3
{F1 -> Element of BOOLEAN}:
(ex b1 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN st
    for b2, b3 being Element of BOOLEAN holds
    b1 . <*b2,b3*> = F1(b2, b3)) &
 (for b1, b2 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
       st (for b3, b4 being Element of BOOLEAN holds
          b1 . <*b3,b4*> = F1(b3, b4)) &
          (for b3, b4 being Element of BOOLEAN holds
          b2 . <*b3,b4*> = F1(b3, b4))
    holds b1 = b2)


:: FACIRC_1:sch 4
scheme FACIRC_1:sch 4
{F1 -> Element of BOOLEAN}:
ex b1 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN st
   for b2, b3, b4 being Element of BOOLEAN holds
   b1 . <*b2,b3,b4*> = F1(b2, b3, b4)


:: FACIRC_1:sch 5
scheme FACIRC_1:sch 5
{F1 -> Element of BOOLEAN}:
for b1, b2 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN
      st (for b3, b4, b5 being Element of BOOLEAN holds
         b1 . <*b3,b4,b5*> = F1(b3, b4, b5)) &
         (for b3, b4, b5 being Element of BOOLEAN holds
         b2 . <*b3,b4,b5*> = F1(b3, b4, b5))
   holds b1 = b2


:: FACIRC_1:sch 6
scheme FACIRC_1:sch 6
{F1 -> Element of BOOLEAN}:
(ex b1 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN st
    for b2, b3, b4 being Element of BOOLEAN holds
    b1 . <*b2,b3,b4*> = F1(b2, b3, b4)) &
 (for b1, b2 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN
       st (for b3, b4, b5 being Element of BOOLEAN holds
          b1 . <*b3,b4,b5*> = F1(b3, b4, b5)) &
          (for b3, b4, b5 being Element of BOOLEAN holds
          b2 . <*b3,b4,b5*> = F1(b3, b4, b5))
    holds b1 = b2)


:: FACIRC_1:funcnot 1 => FACIRC_1:func 1
definition
  func 'xor' -> Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN means
    for b1, b2 being Element of BOOLEAN holds
    it . <*b1,b2*> = b1 'xor' b2;
end;

:: FACIRC_1:def 4
theorem
for b1 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
      b1 = 'xor'
   iff
      for b2, b3 being Element of BOOLEAN holds
      b1 . <*b2,b3*> = b2 'xor' b3;

:: FACIRC_1:funcnot 2 => FACIRC_1:func 2
definition
  func 'or' -> Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN means
    for b1, b2 being Element of BOOLEAN holds
    it . <*b1,b2*> = b1 'or' b2;
end;

:: FACIRC_1:def 5
theorem
for b1 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
      b1 = 'or'
   iff
      for b2, b3 being Element of BOOLEAN holds
      b1 . <*b2,b3*> = b2 'or' b3;

:: FACIRC_1:funcnot 3 => FACIRC_1:func 3
definition
  func '&' -> Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN means
    for b1, b2 being Element of BOOLEAN holds
    it . <*b1,b2*> = b1 '&' b2;
end;

:: FACIRC_1:def 6
theorem
for b1 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
      b1 = '&'
   iff
      for b2, b3 being Element of BOOLEAN holds
      b1 . <*b2,b3*> = b2 '&' b3;

:: FACIRC_1:funcnot 4 => FACIRC_1:func 4
definition
  func or3 -> Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN means
    for b1, b2, b3 being Element of BOOLEAN holds
    it . <*b1,b2,b3*> = (b1 'or' b2) 'or' b3;
end;

:: FACIRC_1:def 7
theorem
for b1 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN holds
      b1 = or3
   iff
      for b2, b3, b4 being Element of BOOLEAN holds
      b1 . <*b2,b3,b4*> = (b2 'or' b3) 'or' b4;

:: FACIRC_1:funcnot 5 => FACIRC_1:func 5
definition
  let a1 be set;
  redefine func <*a1*> -> FinSeqLen of 1;
end;

:: FACIRC_1:funcnot 6 => FACIRC_1:func 6
definition
  let a1, a2 be set;
  redefine func <*a1, a2*> -> FinSeqLen of 2;
end;

:: FACIRC_1:funcnot 7 => FACIRC_1:func 7
definition
  let a1, a2, a3 be set;
  redefine func <*a1, a2, a3*> -> FinSeqLen of 3;
end;

:: FACIRC_1:funcnot 8 => FACIRC_1:func 8
definition
  let a1, a2 be natural set;
  let a3 be FinSeqLen of a1;
  let a4 be FinSeqLen of a2;
  redefine func a3 ^ a4 -> FinSeqLen of a1 + a2;
end;

:: FACIRC_1:th 10
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 being Element of the OperSymbols of b1 holds
   (Following b3) . the_result_sort_of b4 = (Den(b4,b2)) . ((the_arity_of b4) * b3);

:: FACIRC_1:funcnot 9 => FACIRC_1:func 9
definition
  let a1 be non empty non void Circuit-like ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  let a4 be natural set;
  func Following(A3,A4) -> Element of product the Sorts of a2 means
    ex b1 being Function-like quasi_total Relation of NAT,product the Sorts of a2 st
       it = b1 . a4 &
        b1 . 0 = a3 &
        (for b2 being natural set holds
           b1 . (b2 + 1) = Following (b1 . b2));
end;

:: FACIRC_1:def 8
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 being natural set
for b5 being Element of product the Sorts of b2 holds
      b5 = Following(b3,b4)
   iff
      ex b6 being Function-like quasi_total Relation of NAT,product the Sorts of b2 st
         b5 = b6 . b4 &
          b6 . 0 = b3 &
          (for b7 being natural set holds
             b6 . (b7 + 1) = Following (b6 . b7));

:: FACIRC_1:th 11
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 holds
   Following(b3,0) = b3;

:: FACIRC_1:th 12
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 being natural set holds
   Following(b3,b4 + 1) = Following Following(b3,b4);

:: FACIRC_1:th 13
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 holds
Following(b3,b4 + b5) = Following(Following(b3,b4),b5);

:: FACIRC_1:th 14
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 holds
   Following(b3,1) = Following b3;

:: FACIRC_1:th 15
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 holds
   Following(b3,2) = Following Following b3;

:: FACIRC_1:th 16
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 being natural set holds
   Following(b3,b4 + 1) = Following(Following b3,b4);

:: FACIRC_1:prednot 1 => FACIRC_1:pred 1
definition
  let a1 be non empty non void Circuit-like ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  let a4 be set;
  pred A3 is_stable_at A4 means
    for b1 being natural set holds
       (Following(a3,b1)) . a4 = a3 . a4;
end;

:: FACIRC_1:dfs 9
definiens
  let a1 be non empty non void Circuit-like ManySortedSign;
  let a2 be non-empty locally-finite MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  let a4 be set;
To prove
     a3 is_stable_at a4
it is sufficient to prove
  thus for b1 being natural set holds
       (Following(a3,b1)) . a4 = a3 . a4;

:: FACIRC_1:def 9
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 being set holds
      b3 is_stable_at b4
   iff
      for b5 being natural set holds
         (Following(b3,b5)) . b4 = b3 . b4;

:: FACIRC_1:th 17
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 being set
   st b3 is_stable_at b4
for b5 being natural set holds
   Following(b3,b5) is_stable_at b4;

:: FACIRC_1:th 18
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 being set
      st b4 in InputVertices b1
   holds b3 is_stable_at b4;

:: FACIRC_1:th 19
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 being Element of the OperSymbols of b1
      st for b5 being set
              st b5 in proj2 the_arity_of b4
           holds b3 is_stable_at b5
   holds Following b3 is_stable_at the_result_sort_of b4;

:: FACIRC_1:th 20
theorem
for b1, b2 being non empty ManySortedSign
for b3 being Element of the carrier of b1 holds
   b3 in the carrier of b1 +* b2 & b3 in the carrier of b2 +* b1;

:: FACIRC_1:th 21
theorem
for b1, b2 being non empty unsplit gate`1=arity ManySortedSign
for b3 being set
      st b3 in InnerVertices b1
   holds b3 in InnerVertices (b1 +* b2) & b3 in InnerVertices (b2 +* b1);

:: FACIRC_1:th 22
theorem
for b1, b2 being non empty ManySortedSign
for b3 being set
      st b3 in InnerVertices b2
   holds b3 in InnerVertices (b1 +* b2);

:: FACIRC_1:th 23
theorem
for b1, b2 being non empty unsplit gate`1=arity ManySortedSign holds
b1 +* b2 = b2 +* b1;

:: FACIRC_1:th 24
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
for b3 being locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being locally-finite gate`2=den Boolean MSAlgebra over b2 holds
   b3 +* b4 = b4 +* b3;

:: FACIRC_1:th 25
theorem
for b1, b2, b3 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
for b4 being locally-finite Boolean MSAlgebra over b1
for b5 being locally-finite Boolean MSAlgebra over b2
for b6 being locally-finite Boolean MSAlgebra over b3 holds
   (b4 +* b5) +* b6 = b4 +* (b5 +* b6);

:: FACIRC_1:th 26
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
for b3 being non-empty locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being non-empty locally-finite gate`2=den Boolean MSAlgebra over b2
for b5 being Element of product the Sorts of b3 +* b4 holds
   b5 | the carrier of b1 is Element of product the Sorts of b3 &
    b5 | the carrier of b2 is Element of product the Sorts of b4;

:: FACIRC_1:th 27
theorem
for b1, b2 being non empty unsplit gate`1=arity ManySortedSign holds
InnerVertices (b1 +* b2) = (InnerVertices b1) \/ InnerVertices b2;

:: FACIRC_1:th 28
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   st InnerVertices b2 misses InputVertices b1
for b3 being locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being locally-finite gate`2=den Boolean MSAlgebra over b2
for b5 being Element of product the Sorts of b3 +* b4
for b6 being Element of product the Sorts of b3
      st b6 = b5 | the carrier of b1
   holds (Following b5) | the carrier of b1 = Following b6;

:: FACIRC_1:th 29
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   st InnerVertices b1 misses InputVertices b2
for b3 being locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being locally-finite gate`2=den Boolean MSAlgebra over b2
for b5 being Element of product the Sorts of b3 +* b4
for b6 being Element of product the Sorts of b4
      st b6 = b5 | the carrier of b2
   holds (Following b5) | the carrier of b2 = Following b6;

:: FACIRC_1:th 30
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   st InnerVertices b2 misses InputVertices b1
for b3 being locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being locally-finite gate`2=den Boolean MSAlgebra over b2
for b5 being Element of product the Sorts of b3 +* b4
for b6 being Element of product the Sorts of b3
   st b6 = b5 | the carrier of b1
for b7 being natural set holds
   (Following(b5,b7)) | the carrier of b1 = Following(b6,b7);

:: FACIRC_1:th 31
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   st InnerVertices b1 misses InputVertices b2
for b3 being locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being locally-finite gate`2=den Boolean MSAlgebra over b2
for b5 being Element of product the Sorts of b3 +* b4
for b6 being Element of product the Sorts of b4
   st b6 = b5 | the carrier of b2
for b7 being natural set holds
   (Following(b5,b7)) | the carrier of b2 = Following(b6,b7);

:: FACIRC_1:th 32
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   st InnerVertices b2 misses InputVertices b1
for b3 being locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being locally-finite gate`2=den Boolean MSAlgebra over b2
for b5 being Element of product the Sorts of b3 +* b4
for b6 being Element of product the Sorts of b3
   st b6 = b5 | the carrier of b1
for b7 being set
   st b7 in the carrier of b1
for b8 being natural set holds
   (Following(b5,b8)) . b7 = (Following(b6,b8)) . b7;

:: FACIRC_1:th 33
theorem
for b1, b2 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
   st InnerVertices b1 misses InputVertices b2
for b3 being locally-finite gate`2=den Boolean MSAlgebra over b1
for b4 being locally-finite gate`2=den Boolean MSAlgebra over b2
for b5 being Element of product the Sorts of b3 +* b4
for b6 being Element of product the Sorts of b4
   st b6 = b5 | the carrier of b2
for b7 being set
   st b7 in the carrier of b2
for b8 being natural set holds
   (Following(b5,b8)) . b7 = (Following(b6,b8)) . b7;

:: FACIRC_1:funcreg 16
registration
  let a1 be non empty non void gate`2=den ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  cluster a2 `2 -> Relation-like Function-like;
end;

:: FACIRC_1:th 34
theorem
for b1 being non empty non void Circuit-like gate`2=den ManySortedSign
for b2 being non-empty locally-finite MSAlgebra over b1
   st b2 is gate`2=den(b1)
for b3 being Element of product the Sorts of b2
for b4 being Element of the OperSymbols of b1 holds
   (Following b3) . the_result_sort_of b4 = b4 `2 . ((the_arity_of b4) * b3);

:: FACIRC_1:th 35
theorem
for b1 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
for b2 being non-empty locally-finite gate`2=den Boolean MSAlgebra over b1
for b3 being Element of product the Sorts of b2
for b4 being Relation-like Function-like FinSequence-like set
for b5 being Relation-like Function-like set
      st [b4,b5] in the OperSymbols of b1
   holds (Following b3) . [b4,b5] = b5 . (b4 * b3);

:: FACIRC_1:th 36
theorem
for b1 being non empty non void unsplit gate`1=arity gate`2isBoolean ManySortedSign
for b2 being non-empty locally-finite gate`2=den Boolean MSAlgebra over b1
for b3 being Element of product the Sorts of b2
for b4 being Relation-like Function-like FinSequence-like set
for b5 being Relation-like Function-like set
      st [b4,b5] in the OperSymbols of b1 &
         (for b6 being set
               st b6 in proj2 b4
            holds b3 is_stable_at b6)
   holds Following b3 is_stable_at [b4,b5];

:: FACIRC_1:th 37
theorem
for b1 being non empty unsplit ManySortedSign holds
   InnerVertices b1 = the OperSymbols of b1;

:: FACIRC_1:th 38
theorem
for b1 being set
for b2 being Relation-like Function-like FinSequence-like set holds
   InnerVertices 1GateCircStr(b2,b1) is Relation-like set;

:: FACIRC_1:th 39
theorem
for b1 being set
for b2 being Relation-like Function-like FinSequence-like nonpair-yielding set holds
   InputVertices 1GateCircStr(b2,b1) is without_pairs;

:: FACIRC_1:th 40
theorem
for b1, b2, b3 being set holds
InputVertices 1GateCircStr(<*b2,b3*>,b1) = {b2,b3};

:: FACIRC_1:th 41
theorem
for b1 being set
for b2, b3 being non pair set holds
InputVertices 1GateCircStr(<*b2,b3*>,b1) is without_pairs;

:: FACIRC_1:th 42
theorem
for b1, b2, b3, b4 being set holds
InputVertices 1GateCircStr(<*b2,b3,b4*>,b1) = {b2,b3,b4};

:: FACIRC_1:th 43
theorem
for b1, b2, b3 being set holds
b1 in the carrier of 1GateCircStr(<*b1,b2*>,b3) &
 b2 in the carrier of 1GateCircStr(<*b1,b2*>,b3) &
 [<*b1,b2*>,b3] in the carrier of 1GateCircStr(<*b1,b2*>,b3);

:: FACIRC_1:th 44
theorem
for b1, b2, b3, b4 being set holds
b1 in the carrier of 1GateCircStr(<*b1,b2,b3*>,b4) &
 b2 in the carrier of 1GateCircStr(<*b1,b2,b3*>,b4) &
 b3 in the carrier of 1GateCircStr(<*b1,b2,b3*>,b4);

:: FACIRC_1:th 45
theorem
for b1, b2 being set
for b3 being Relation-like Function-like FinSequence-like set holds
   b2 in the carrier of 1GateCircStr(b3,b1,b2) &
    (for b4 being set
          st b4 in proj2 b3
       holds b4 in the carrier of 1GateCircStr(b3,b1,b2));

:: FACIRC_1:th 46
theorem
for b1, b2 being set
for b3 being Relation-like Function-like FinSequence-like set holds
   1GateCircStr(b3,b1,b2) is gate`1=arity & 1GateCircStr(b3,b1,b2) is Circuit-like;

:: FACIRC_1:th 47
theorem
for b1 being Relation-like Function-like FinSequence-like set
for b2 being set holds
   [b1,b2] in InnerVertices 1GateCircStr(b1,b2);

:: FACIRC_1:funcnot 10 => FACIRC_1:func 10
definition
  let a1, a2 be set;
  let a3 be Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN;
  func 1GateCircuit(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over 1GateCircStr(<*a1,a2*>,a3) equals
    1GateCircuit(<*a1,a2*>,a3);
end;

:: FACIRC_1:def 10
theorem
for b1, b2 being set
for b3 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   1GateCircuit(b1,b2,b3) = 1GateCircuit(<*b1,b2*>,b3);

:: FACIRC_1:th 48
theorem
for b1, b2 being set
for b3 being non empty finite set
for b4 being Function-like quasi_total Relation of 2 -tuples_on b3,b3
for b5 being Element of product the Sorts of 1GateCircuit(<*b1,b2*>,b4) holds
   (Following b5) . [<*b1,b2*>,b4] = b4 . <*b5 . b1,b5 . b2*> &
    (Following b5) . b1 = b5 . b1 &
    (Following b5) . b2 = b5 . b2;

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

:: FACIRC_1:th 50
theorem
for b1, b2 being set
for b3 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
for b4 being Element of product the Sorts of 1GateCircuit(b1,b2,b3) holds
   (Following b4) . [<*b1,b2*>,b3] = b3 . <*b4 . b1,b4 . b2*> &
    (Following b4) . b1 = b4 . b1 &
    (Following b4) . b2 = b4 . b2;

:: FACIRC_1:th 51
theorem
for b1, b2 being set
for b3 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
for b4 being Element of product the Sorts of 1GateCircuit(b1,b2,b3) holds
   Following b4 is stable(1GateCircStr(<*b1,b2*>,b3), 1GateCircuit(b1,b2,b3));

:: FACIRC_1:funcnot 11 => FACIRC_1:func 11
definition
  let a1, a2, a3 be set;
  let a4 be Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN;
  func 1GateCircuit(A1,A2,A3,A4) -> strict locally-finite gate`2=den Boolean MSAlgebra over 1GateCircStr(<*a1,a2,a3*>,a4) equals
    1GateCircuit(<*a1,a2,a3*>,a4);
end;

:: FACIRC_1:def 11
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN holds
   1GateCircuit(b1,b2,b3,b4) = 1GateCircuit(<*b1,b2,b3*>,b4);

:: FACIRC_1:th 52
theorem
for b1, b2, b3 being set
for b4 being non empty finite set
for b5 being Function-like quasi_total Relation of 3 -tuples_on b4,b4
for b6 being Element of product the Sorts of 1GateCircuit(<*b1,b2,b3*>,b5) holds
   (Following b6) . [<*b1,b2,b3*>,b5] = b5 . <*b6 . b1,b6 . b2,b6 . b3*> &
    (Following b6) . b1 = b6 . b1 &
    (Following b6) . b2 = b6 . b2 &
    (Following b6) . b3 = b6 . b3;

:: FACIRC_1:th 53
theorem
for b1, b2, b3 being set
for b4 being non empty finite set
for b5 being Function-like quasi_total Relation of 3 -tuples_on b4,b4
for b6 being Element of product the Sorts of 1GateCircuit(<*b1,b2,b3*>,b5) holds
   Following b6 is stable(1GateCircStr(<*b1,b2,b3*>,b5), 1GateCircuit(<*b1,b2,b3*>,b5));

:: FACIRC_1:th 54
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN
for b5 being Element of product the Sorts of 1GateCircuit(b1,b2,b3,b4) holds
   (Following b5) . [<*b1,b2,b3*>,b4] = b4 . <*b5 . b1,b5 . b2,b5 . b3*> &
    (Following b5) . b1 = b5 . b1 &
    (Following b5) . b2 = b5 . b2 &
    (Following b5) . b3 = b5 . b3;

:: FACIRC_1:th 55
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 3 -tuples_on BOOLEAN,BOOLEAN
for b5 being Element of product the Sorts of 1GateCircuit(b1,b2,b3,b4) holds
   Following b5 is stable(1GateCircStr(<*b1,b2,b3*>,b4), 1GateCircuit(b1,b2,b3,b4));

:: FACIRC_1:funcnot 12 => FACIRC_1:func 12
definition
  let a1, a2, a3 be set;
  let a4 be Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN;
  func 2GatesCircStr(A1,A2,A3,A4) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (1GateCircStr(<*a1,a2*>,a4)) +* 1GateCircStr(<*[<*a1,a2*>,a4],a3*>,a4);
end;

:: FACIRC_1:def 12
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   2GatesCircStr(b1,b2,b3,b4) = (1GateCircStr(<*b1,b2*>,b4)) +* 1GateCircStr(<*[<*b1,b2*>,b4],b3*>,b4);

:: FACIRC_1:funcnot 13 => FACIRC_1:func 13
definition
  let a1, a2, a3 be set;
  let a4 be Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN;
  func 2GatesCircOutput(A1,A2,A3,A4) -> Element of InnerVertices 2GatesCircStr(a1,a2,a3,a4) equals
    [<*[<*a1,a2*>,a4],a3*>,a4];
end;

:: FACIRC_1:def 13
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   2GatesCircOutput(b1,b2,b3,b4) = [<*[<*b1,b2*>,b4],b3*>,b4];

:: FACIRC_1:funcreg 17
registration
  let a1, a2, a3 be set;
  let a4 be Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN;
  cluster 2GatesCircOutput(a1,a2,a3,a4) -> pair;
end;

:: FACIRC_1:th 56
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   InnerVertices 2GatesCircStr(b1,b2,b3,b4) = {[<*b1,b2*>,b4],2GatesCircOutput(b1,b2,b3,b4)};

:: FACIRC_1:th 57
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
      st b1 <> [<*b2,b3*>,b4]
   holds InputVertices 2GatesCircStr(b2,b3,b1,b4) = {b2,b3,b1};

:: FACIRC_1:funcnot 14 => FACIRC_1:func 14
definition
  let a1, a2, a3 be set;
  let a4 be Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN;
  func 2GatesCircuit(A1,A2,A3,A4) -> strict locally-finite gate`2=den Boolean MSAlgebra over 2GatesCircStr(a1,a2,a3,a4) equals
    (1GateCircuit(a1,a2,a4)) +* 1GateCircuit([<*a1,a2*>,a4],a3,a4);
end;

:: FACIRC_1:def 14
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   2GatesCircuit(b1,b2,b3,b4) = (1GateCircuit(b1,b2,b4)) +* 1GateCircuit([<*b1,b2*>,b4],b3,b4);

:: FACIRC_1:th 58
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   InnerVertices 2GatesCircStr(b1,b2,b3,b4) is Relation-like set;

:: FACIRC_1:th 59
theorem
for b1 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
for b2, b3, b4 being non pair set holds
InputVertices 2GatesCircStr(b2,b3,b4,b1) is without_pairs;

:: FACIRC_1:th 60
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   b1 in the carrier of 2GatesCircStr(b1,b2,b3,b4) & b2 in the carrier of 2GatesCircStr(b1,b2,b3,b4) & b3 in the carrier of 2GatesCircStr(b1,b2,b3,b4);

:: FACIRC_1:th 61
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN holds
   [<*b1,b2*>,b4] in the carrier of 2GatesCircStr(b1,b2,b3,b4) &
    [<*[<*b1,b2*>,b4],b3*>,b4] in the carrier of 2GatesCircStr(b1,b2,b3,b4);

:: FACIRC_1:funcnot 15 => FACIRC_1:func 15
definition
  let a1 be non empty non void unsplit ManySortedSign;
  let a2 be locally-finite Boolean MSAlgebra over a1;
  let a3 be Element of product the Sorts of a2;
  let a4 be Element of the carrier of a1;
  redefine func a3 . a4 -> Element of BOOLEAN;
end;

:: FACIRC_1:th 62
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
for b5 being Element of product the Sorts of 2GatesCircuit(b2,b3,b1,b4)
      st b1 <> [<*b2,b3*>,b4]
   holds (Following(b5,2)) . 2GatesCircOutput(b2,b3,b1,b4) = b4 . <*b4 . <*b5 . b2,b5 . b3*>,b5 . b1*> &
    (Following(b5,2)) . [<*b2,b3*>,b4] = b4 . <*b5 . b2,b5 . b3*> &
    (Following(b5,2)) . b2 = b5 . b2 &
    (Following(b5,2)) . b3 = b5 . b3 &
    (Following(b5,2)) . b1 = b5 . b1;

:: FACIRC_1:th 63
theorem
for b1, b2, b3 being set
for b4 being Function-like quasi_total Relation of 2 -tuples_on BOOLEAN,BOOLEAN
for b5 being Element of product the Sorts of 2GatesCircuit(b2,b3,b1,b4)
      st b1 <> [<*b2,b3*>,b4]
   holds Following(b5,2) is stable(2GatesCircStr(b2,b3,b1,b4), 2GatesCircuit(b2,b3,b1,b4));

:: FACIRC_1:th 64
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,'xor']
for b4 being Element of product the Sorts of 2GatesCircuit(b2,b3,b1,'xor')
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b2 & b6 = b4 . b3 & b7 = b4 . b1
   holds (Following(b4,2)) . 2GatesCircOutput(b2,b3,b1,'xor') = (b5 'xor' b6) 'xor' b7;

:: FACIRC_1:th 65
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,'or']
for b4 being Element of product the Sorts of 2GatesCircuit(b2,b3,b1,'or')
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b2 & b6 = b4 . b3 & b7 = b4 . b1
   holds (Following(b4,2)) . 2GatesCircOutput(b2,b3,b1,'or') = (b5 'or' b6) 'or' b7;

:: FACIRC_1:th 66
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,'&']
for b4 being Element of product the Sorts of 2GatesCircuit(b2,b3,b1,'&')
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b2 & b6 = b4 . b3 & b7 = b4 . b1
   holds (Following(b4,2)) . 2GatesCircOutput(b2,b3,b1,'&') = (b5 '&' b6) '&' b7;

:: FACIRC_1:funcnot 16 => FACIRC_1:func 16
definition
  let a1, a2, a3 be set;
  func BitAdderOutput(A1,A2,A3) -> Element of InnerVertices 2GatesCircStr(a1,a2,a3,'xor') equals
    2GatesCircOutput(a1,a2,a3,'xor');
end;

:: FACIRC_1:def 15
theorem
for b1, b2, b3 being set holds
BitAdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,'xor');

:: FACIRC_1:funcnot 17 => FACIRC_1:func 17
definition
  let a1, a2, a3 be set;
  func BitAdderCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over 2GatesCircStr(a1,a2,a3,'xor') equals
    2GatesCircuit(a1,a2,a3,'xor');
end;

:: FACIRC_1:def 16
theorem
for b1, b2, b3 being set holds
BitAdderCirc(b1,b2,b3) = 2GatesCircuit(b1,b2,b3,'xor');

:: FACIRC_1:funcnot 18 => FACIRC_1:func 18
definition
  let a1, a2, a3 be set;
  func MajorityIStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    ((1GateCircStr(<*a1,a2*>,'&')) +* 1GateCircStr(<*a2,a3*>,'&')) +* 1GateCircStr(<*a3,a1*>,'&');
end;

:: FACIRC_1:def 17
theorem
for b1, b2, b3 being set holds
MajorityIStr(b1,b2,b3) = ((1GateCircStr(<*b1,b2*>,'&')) +* 1GateCircStr(<*b2,b3*>,'&')) +* 1GateCircStr(<*b3,b1*>,'&');

:: FACIRC_1:funcnot 19 => FACIRC_1:func 19
definition
  let a1, a2, a3 be set;
  func MajorityStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (MajorityIStr(a1,a2,a3)) +* 1GateCircStr(<*[<*a1,a2*>,'&'],[<*a2,a3*>,'&'],[<*a3,a1*>,'&']*>,or3);
end;

:: FACIRC_1:def 18
theorem
for b1, b2, b3 being set holds
MajorityStr(b1,b2,b3) = (MajorityIStr(b1,b2,b3)) +* 1GateCircStr(<*[<*b1,b2*>,'&'],[<*b2,b3*>,'&'],[<*b3,b1*>,'&']*>,or3);

:: FACIRC_1:funcnot 20 => FACIRC_1:func 20
definition
  let a1, a2, a3 be set;
  func MajorityICirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over MajorityIStr(a1,a2,a3) equals
    ((1GateCircuit(a1,a2,'&')) +* 1GateCircuit(a2,a3,'&')) +* 1GateCircuit(a3,a1,'&');
end;

:: FACIRC_1:def 19
theorem
for b1, b2, b3 being set holds
MajorityICirc(b1,b2,b3) = ((1GateCircuit(b1,b2,'&')) +* 1GateCircuit(b2,b3,'&')) +* 1GateCircuit(b3,b1,'&');

:: FACIRC_1:th 67
theorem
for b1, b2, b3 being set holds
InnerVertices MajorityStr(b1,b2,b3) is Relation-like set;

:: FACIRC_1:th 68
theorem
for b1, b2, b3 being non pair set holds
InputVertices MajorityStr(b1,b2,b3) is without_pairs;

:: FACIRC_1:th 69
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of MajorityICirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2
   holds (Following b4) . [<*b1,b2*>,'&'] = b5 '&' b6;

:: FACIRC_1:th 70
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of MajorityICirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b2 & b6 = b4 . b3
   holds (Following b4) . [<*b2,b3*>,'&'] = b5 '&' b6;

:: FACIRC_1:th 71
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of MajorityICirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b3 & b6 = b4 . b1
   holds (Following b4) . [<*b3,b1*>,'&'] = b5 '&' b6;

:: FACIRC_1:funcnot 21 => FACIRC_1:func 21
definition
  let a1, a2, a3 be set;
  func MajorityOutput(A1,A2,A3) -> Element of InnerVertices MajorityStr(a1,a2,a3) equals
    [<*[<*a1,a2*>,'&'],[<*a2,a3*>,'&'],[<*a3,a1*>,'&']*>,or3];
end;

:: FACIRC_1:def 20
theorem
for b1, b2, b3 being set holds
MajorityOutput(b1,b2,b3) = [<*[<*b1,b2*>,'&'],[<*b2,b3*>,'&'],[<*b3,b1*>,'&']*>,or3];

:: FACIRC_1:funcnot 22 => FACIRC_1:func 22
definition
  let a1, a2, a3 be set;
  func MajorityCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over MajorityStr(a1,a2,a3) equals
    (MajorityICirc(a1,a2,a3)) +* 1GateCircuit([<*a1,a2*>,'&'],[<*a2,a3*>,'&'],[<*a3,a1*>,'&'],or3);
end;

:: FACIRC_1:def 21
theorem
for b1, b2, b3 being set holds
MajorityCirc(b1,b2,b3) = (MajorityICirc(b1,b2,b3)) +* 1GateCircuit([<*b1,b2*>,'&'],[<*b2,b3*>,'&'],[<*b3,b1*>,'&'],or3);

:: FACIRC_1:th 72
theorem
for b1, b2, b3 being set holds
b1 in the carrier of MajorityStr(b1,b2,b3) & b2 in the carrier of MajorityStr(b1,b2,b3) & b3 in the carrier of MajorityStr(b1,b2,b3);

:: FACIRC_1:th 73
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,'&'] in InnerVertices MajorityStr(b1,b2,b3) &
 [<*b2,b3*>,'&'] in InnerVertices MajorityStr(b1,b2,b3) &
 [<*b3,b1*>,'&'] in InnerVertices MajorityStr(b1,b2,b3);

:: FACIRC_1:th 74
theorem
for b1, b2, b3 being non pair set holds
b1 in InputVertices MajorityStr(b1,b2,b3) & b2 in InputVertices MajorityStr(b1,b2,b3) & b3 in InputVertices MajorityStr(b1,b2,b3);

:: FACIRC_1:th 75
theorem
for b1, b2, b3 being non pair set holds
InputVertices MajorityStr(b1,b2,b3) = {b1,b2,b3} &
 InnerVertices MajorityStr(b1,b2,b3) = {[<*b1,b2*>,'&'],[<*b2,b3*>,'&'],[<*b3,b1*>,'&']} \/ {MajorityOutput(b1,b2,b3)};

:: FACIRC_1:th 76
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2
   holds (Following b4) . [<*b1,b2*>,'&'] = b5 '&' b6;

:: FACIRC_1:th 77
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b2 & b6 = b4 . b3
   holds (Following b4) . [<*b2,b3*>,'&'] = b5 '&' b6;

:: FACIRC_1:th 78
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b3
   holds (Following b4) . [<*b3,b1*>,'&'] = b6 '&' b5;

:: FACIRC_1:th 79
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,'&'] &
         b6 = b4 . [<*b2,b3*>,'&'] &
         b7 = b4 . [<*b3,b1*>,'&']
   holds (Following b4) . MajorityOutput(b1,b2,b3) = (b5 'or' b6) 'or' b7;

:: FACIRC_1:th 80
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2
   holds (Following(b4,2)) . [<*b1,b2*>,'&'] = b5 '&' b6;

:: FACIRC_1:th 81
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b2 & b6 = b4 . b3
   holds (Following(b4,2)) . [<*b2,b3*>,'&'] = b5 '&' b6;

:: FACIRC_1:th 82
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b3
   holds (Following(b4,2)) . [<*b3,b1*>,'&'] = b6 '&' b5;

:: FACIRC_1:th 83
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3
   holds (Following(b4,2)) . MajorityOutput(b1,b2,b3) = ((b5 '&' b6) 'or' (b6 '&' b7)) 'or' (b7 '&' b5);

:: FACIRC_1:th 84
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of MajorityCirc(b1,b2,b3) holds
   Following(b4,2) is stable(MajorityStr(b1,b2,b3), MajorityCirc(b1,b2,b3));

:: FACIRC_1:funcnot 23 => FACIRC_1:func 23
definition
  let a1, a2, a3 be set;
  func BitAdderWithOverflowStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (2GatesCircStr(a1,a2,a3,'xor')) +* MajorityStr(a1,a2,a3);
end;

:: FACIRC_1:def 22
theorem
for b1, b2, b3 being set holds
BitAdderWithOverflowStr(b1,b2,b3) = (2GatesCircStr(b1,b2,b3,'xor')) +* MajorityStr(b1,b2,b3);

:: FACIRC_1:th 85
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitAdderWithOverflowStr(b1,b2,b3) = {b1,b2,b3};

:: FACIRC_1:th 86
theorem
for b1, b2, b3 being non pair set holds
InnerVertices BitAdderWithOverflowStr(b1,b2,b3) = ({[<*b1,b2*>,'xor'],2GatesCircOutput(b1,b2,b3,'xor')} \/ {[<*b1,b2*>,'&'],[<*b2,b3*>,'&'],[<*b3,b1*>,'&']}) \/ {MajorityOutput(b1,b2,b3)};

:: FACIRC_1:th 87
theorem
for b1, b2, b3 being set
for b4 being non empty ManySortedSign
      st b4 = BitAdderWithOverflowStr(b1,b2,b3)
   holds b1 in the carrier of b4 & b2 in the carrier of b4 & b3 in the carrier of b4;

:: FACIRC_1:funcnot 24 => FACIRC_1:func 24
definition
  let a1, a2, a3 be set;
  func BitAdderWithOverflowCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over BitAdderWithOverflowStr(a1,a2,a3) equals
    (BitAdderCirc(a1,a2,a3)) +* MajorityCirc(a1,a2,a3);
end;

:: FACIRC_1:def 23
theorem
for b1, b2, b3 being set holds
BitAdderWithOverflowCirc(b1,b2,b3) = (BitAdderCirc(b1,b2,b3)) +* MajorityCirc(b1,b2,b3);

:: FACIRC_1:th 88
theorem
for b1, b2, b3 being set holds
InnerVertices BitAdderWithOverflowStr(b1,b2,b3) is Relation-like set;

:: FACIRC_1:th 89
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitAdderWithOverflowStr(b1,b2,b3) is without_pairs;

:: FACIRC_1:th 90
theorem
for b1, b2, b3 being set holds
BitAdderOutput(b1,b2,b3) in InnerVertices BitAdderWithOverflowStr(b1,b2,b3) &
 MajorityOutput(b1,b2,b3) in InnerVertices BitAdderWithOverflowStr(b1,b2,b3);

:: FACIRC_1:th 91
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of BitAdderWithOverflowCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3
   holds (Following(b4,2)) . BitAdderOutput(b1,b2,b3) = (b5 'xor' b6) 'xor' b7 &
    (Following(b4,2)) . MajorityOutput(b1,b2,b3) = ((b5 '&' b6) 'or' (b6 '&' b7)) 'or' (b7 '&' b5);

:: FACIRC_1:th 92
theorem
for b1, b2, b3 being non pair set
for b4 being Element of product the Sorts of BitAdderWithOverflowCirc(b1,b2,b3) holds
   Following(b4,2) is stable(BitAdderWithOverflowStr(b1,b2,b3), BitAdderWithOverflowCirc(b1,b2,b3));