Article GFACIRC1, MML version 4.99.1005

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


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


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


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

:: GFACIRC1:def 1
theorem
for b1 being Function-like quasi_total Relation of 1 -tuples_on BOOLEAN,BOOLEAN holds
      b1 = inv1
   iff
      for b2 being Element of BOOLEAN holds
         b1 . <*b2*> = 'not' b2;

:: GFACIRC1:th 1
theorem
for b1 being Element of BOOLEAN holds
   inv1 . <*b1*> = 'not' b1 &
    inv1 . <*b1*> = nand2 . <*b1,b1*> &
    inv1 . <*0*> = 1 &
    inv1 . <*1*> = 0;

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

:: GFACIRC1:def 2
theorem
for b1 being Function-like quasi_total Relation of 1 -tuples_on BOOLEAN,BOOLEAN holds
      b1 = buf1
   iff
      for b2 being Element of BOOLEAN holds
         b1 . <*b2*> = b2;

:: GFACIRC1:th 2
theorem
for b1 being Element of BOOLEAN holds
   buf1 . <*b1*> = b1 &
    buf1 . <*b1*> = and2 . <*b1,b1*> &
    buf1 . <*0*> = 0 &
    buf1 . <*1*> = 1;

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

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

:: GFACIRC1:th 3
theorem
for b1, b2 being Element of BOOLEAN holds
and2c . <*b1,b2*> = b1 '&' 'not' b2 &
 and2c . <*b1,b2*> = and2a . <*b2,b1*> &
 and2c . <*b1,b2*> = nor2a . <*b1,b2*> &
 and2c . <*0,0*> = 0 &
 and2c . <*0,1*> = 0 &
 and2c . <*1,0*> = 1 &
 and2c . <*1,1*> = 0;

:: GFACIRC1:funcnot 4 => GFACIRC1:func 4
definition
  func xor2c -> 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' 'not' b2;
end;

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

:: GFACIRC1:th 4
theorem
for b1, b2 being Element of BOOLEAN holds
xor2c . <*b1,b2*> = b1 'xor' 'not' b2 &
 xor2c . <*b1,b2*> = xor2a . <*b1,b2*> &
 xor2c . <*b1,b2*> = or2 . <*and2b . <*b1,b2*>,and2 . <*b1,b2*>*> &
 xor2c . <*0,0*> = 1 &
 xor2c . <*0,1*> = 0 &
 xor2c . <*1,0*> = 0 &
 xor2c . <*1,1*> = 1;

:: GFACIRC1:th 6
theorem
for b1, b2 being Element of BOOLEAN holds
inv1 . <*xor2 . <*b1,b2*>*> = xor2a . <*b1,b2*> &
 inv1 . <*xor2 . <*b1,b2*>*> = xor2c . <*b1,b2*> &
 xor2 . <*inv1 . <*b1*>,inv1 . <*b2*>*> = xor2 . <*b1,b2*>;

:: GFACIRC1:th 8
theorem
for b1, b2, b3 being Element of BOOLEAN holds
inv1 . <*xor2 . <*xor2c . <*b1,b2*>,b3*>*> = xor2c . <*xor2c . <*b1,b2*>,b3*>;

:: GFACIRC1:th 9
theorem
for b1, b2, b3 being Element of BOOLEAN holds
(('not' b1) 'xor' b2) 'xor' 'not' b3 = (b1 'xor' 'not' b2) 'xor' 'not' b3;

:: GFACIRC1:th 10
theorem
for b1, b2, b3 being Element of BOOLEAN holds
xor2c . <*xor2a . <*b1,b2*>,b3*> = xor2c . <*xor2c . <*b1,b2*>,b3*>;

:: GFACIRC1:th 12
theorem
for b1, b2, b3 being Element of BOOLEAN holds
inv1 . <*xor2c . <*xor2b . <*b1,b2*>,b3*>*> = xor2 . <*xor2 . <*b1,b2*>,b3*>;

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

:: GFACIRC1:def 5
theorem
for b1, b2, b3 being set holds
GFA0CarryIStr(b1,b2,b3) = ((1GateCircStr(<*b1,b2*>,and2)) +* 1GateCircStr(<*b2,b3*>,and2)) +* 1GateCircStr(<*b3,b1*>,and2);

:: GFACIRC1:funcnot 6 => GFACIRC1:func 6
definition
  let a1, a2, a3 be set;
  func GFA0CarryICirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA0CarryIStr(a1,a2,a3) equals
    ((1GateCircuit(a1,a2,and2)) +* 1GateCircuit(a2,a3,and2)) +* 1GateCircuit(a3,a1,and2);
end;

:: GFACIRC1:def 6
theorem
for b1, b2, b3 being set holds
GFA0CarryICirc(b1,b2,b3) = ((1GateCircuit(b1,b2,and2)) +* 1GateCircuit(b2,b3,and2)) +* 1GateCircuit(b3,b1,and2);

:: GFACIRC1:funcnot 7 => GFACIRC1:func 7
definition
  let a1, a2, a3 be set;
  func GFA0CarryStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA0CarryIStr(a1,a2,a3)) +* 1GateCircStr(<*[<*a1,a2*>,and2],[<*a2,a3*>,and2],[<*a3,a1*>,and2]*>,or3);
end;

:: GFACIRC1:def 7
theorem
for b1, b2, b3 being set holds
GFA0CarryStr(b1,b2,b3) = (GFA0CarryIStr(b1,b2,b3)) +* 1GateCircStr(<*[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]*>,or3);

:: GFACIRC1:funcnot 8 => GFACIRC1:func 8
definition
  let a1, a2, a3 be set;
  func GFA0CarryCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA0CarryStr(a1,a2,a3) equals
    (GFA0CarryICirc(a1,a2,a3)) +* 1GateCircuit([<*a1,a2*>,and2],[<*a2,a3*>,and2],[<*a3,a1*>,and2],or3);
end;

:: GFACIRC1:def 8
theorem
for b1, b2, b3 being set holds
GFA0CarryCirc(b1,b2,b3) = (GFA0CarryICirc(b1,b2,b3)) +* 1GateCircuit([<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2],or3);

:: GFACIRC1:funcnot 9 => GFACIRC1:func 9
definition
  let a1, a2, a3 be set;
  func GFA0CarryOutput(A1,A2,A3) -> Element of InnerVertices GFA0CarryStr(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2],[<*a2,a3*>,and2],[<*a3,a1*>,and2]*>,or3];
end;

:: GFACIRC1:def 9
theorem
for b1, b2, b3 being set holds
GFA0CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]*>,or3];

:: GFACIRC1:th 13
theorem
for b1, b2, b3 being set holds
InnerVertices GFA0CarryIStr(b1,b2,b3) = {[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]};

:: GFACIRC1:th 14
theorem
for b1, b2, b3 being set holds
InnerVertices GFA0CarryStr(b1,b2,b3) = {[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]} \/ {GFA0CarryOutput(b1,b2,b3)};

:: GFACIRC1:th 15
theorem
for b1, b2, b3 being set holds
InnerVertices GFA0CarryStr(b1,b2,b3) is Relation-like set;

:: GFACIRC1:th 16
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2]
   holds InputVertices GFA0CarryIStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 17
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2]
   holds InputVertices GFA0CarryStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 18
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA0CarryStr(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 19
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA0CarryStr(b1,b2,b3) &
 b2 in the carrier of GFA0CarryStr(b1,b2,b3) &
 b3 in the carrier of GFA0CarryStr(b1,b2,b3) &
 [<*b1,b2*>,and2] in the carrier of GFA0CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2] in the carrier of GFA0CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2] in the carrier of GFA0CarryStr(b1,b2,b3) &
 [<*[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]*>,or3] in the carrier of GFA0CarryStr(b1,b2,b3);

:: GFACIRC1:th 20
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,and2] in InnerVertices GFA0CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2] in InnerVertices GFA0CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2] in InnerVertices GFA0CarryStr(b1,b2,b3) &
 GFA0CarryOutput(b1,b2,b3) in InnerVertices GFA0CarryStr(b1,b2,b3);

:: GFACIRC1:th 21
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2]
   holds b1 in InputVertices GFA0CarryStr(b1,b2,b3) & b2 in InputVertices GFA0CarryStr(b1,b2,b3) & b3 in InputVertices GFA0CarryStr(b1,b2,b3);

:: GFACIRC1:th 22
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA0CarryStr(b1,b2,b3) = {b1,b2,b3};

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

:: GFACIRC1:th 24
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of GFA0CarryCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,and2] &
         b6 = b4 . [<*b2,b3*>,and2] &
         b7 = b4 . [<*b3,b1*>,and2]
   holds (Following b4) . GFA0CarryOutput(b1,b2,b3) = (b5 'or' b6) 'or' b7;

:: GFACIRC1:th 25
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2]
for b4 being Element of product the Sorts of GFA0CarryCirc(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)) . GFA0CarryOutput(b1,b2,b3) = ((b5 '&' b6) 'or' (b6 '&' b7)) 'or' (b7 '&' b5) &
    (Following(b4,2)) . [<*b1,b2*>,and2] = b5 '&' b6 &
    (Following(b4,2)) . [<*b2,b3*>,and2] = b6 '&' b7 &
    (Following(b4,2)) . [<*b3,b1*>,and2] = b7 '&' b5;

:: GFACIRC1:th 26
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2]
for b4 being Element of product the Sorts of GFA0CarryCirc(b1,b2,b3) holds
   Following(b4,2) is stable(GFA0CarryStr(b1,b2,b3), GFA0CarryCirc(b1,b2,b3));

:: GFACIRC1:funcnot 10 => GFACIRC1:func 10
definition
  let a1, a2, a3 be set;
  func GFA0AdderStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    2GatesCircStr(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 10
theorem
for b1, b2, b3 being set holds
GFA0AdderStr(b1,b2,b3) = 2GatesCircStr(b1,b2,b3,xor2);

:: GFACIRC1:funcnot 11 => GFACIRC1:func 11
definition
  let a1, a2, a3 be set;
  func GFA0AdderCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA0AdderStr(a1,a2,a3) equals
    2GatesCircuit(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 11
theorem
for b1, b2, b3 being set holds
GFA0AdderCirc(b1,b2,b3) = 2GatesCircuit(b1,b2,b3,xor2);

:: GFACIRC1:funcnot 12 => GFACIRC1:func 12
definition
  let a1, a2, a3 be set;
  func GFA0AdderOutput(A1,A2,A3) -> Element of InnerVertices GFA0AdderStr(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 12
theorem
for b1, b2, b3 being set holds
GFA0AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2);

:: GFACIRC1:th 27
theorem
for b1, b2, b3 being set holds
InnerVertices GFA0AdderStr(b1,b2,b3) = {[<*b1,b2*>,xor2]} \/ {GFA0AdderOutput(b1,b2,b3)};

:: GFACIRC1:th 31
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA0AdderStr(b1,b2,b3) &
 b2 in the carrier of GFA0AdderStr(b1,b2,b3) &
 b3 in the carrier of GFA0AdderStr(b1,b2,b3) &
 [<*b1,b2*>,xor2] in the carrier of GFA0AdderStr(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2],b3*>,xor2] in the carrier of GFA0AdderStr(b1,b2,b3);

:: GFACIRC1:th 32
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2] in InnerVertices GFA0AdderStr(b1,b2,b3) &
 GFA0AdderOutput(b1,b2,b3) in InnerVertices GFA0AdderStr(b1,b2,b3);

:: GFACIRC1:th 33
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2]
   holds b1 in InputVertices GFA0AdderStr(b1,b2,b3) & b2 in InputVertices GFA0AdderStr(b1,b2,b3) & b3 in InputVertices GFA0AdderStr(b1,b2,b3);

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

:: GFACIRC1:th 36
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2]
for b4 being Element of product the Sorts of GFA0AdderCirc(b1,b2,b3)
for b5, b6, b7, b8 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,xor2] &
         b6 = b4 . b1 &
         b7 = b4 . b2 &
         b8 = b4 . b3
   holds (Following b4) . GFA0AdderOutput(b1,b2,b3) = b5 'xor' b8;

:: GFACIRC1:th 37
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2]
for b4 being Element of product the Sorts of GFA0AdderCirc(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)) . GFA0AdderOutput(b1,b2,b3) = (b5 'xor' b6) 'xor' b7 &
    (Following(b4,2)) . [<*b1,b2*>,xor2] = b5 'xor' b6 &
    (Following(b4,2)) . b1 = b5 &
    (Following(b4,2)) . b2 = b6 &
    (Following(b4,2)) . b3 = b7;

:: GFACIRC1:funcnot 13 => GFACIRC1:func 13
definition
  let a1, a2, a3 be set;
  func BitGFA0Str(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA0AdderStr(a1,a2,a3)) +* GFA0CarryStr(a1,a2,a3);
end;

:: GFACIRC1:def 13
theorem
for b1, b2, b3 being set holds
BitGFA0Str(b1,b2,b3) = (GFA0AdderStr(b1,b2,b3)) +* GFA0CarryStr(b1,b2,b3);

:: GFACIRC1:funcnot 14 => GFACIRC1:func 14
definition
  let a1, a2, a3 be set;
  func BitGFA0Circ(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over BitGFA0Str(a1,a2,a3) equals
    (GFA0AdderCirc(a1,a2,a3)) +* GFA0CarryCirc(a1,a2,a3);
end;

:: GFACIRC1:def 14
theorem
for b1, b2, b3 being set holds
BitGFA0Circ(b1,b2,b3) = (GFA0AdderCirc(b1,b2,b3)) +* GFA0CarryCirc(b1,b2,b3);

:: GFACIRC1:th 39
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA0Str(b1,b2,b3) = (({[<*b1,b2*>,xor2]} \/ {GFA0AdderOutput(b1,b2,b3)}) \/ {[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]}) \/ {GFA0CarryOutput(b1,b2,b3)};

:: GFACIRC1:th 40
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA0Str(b1,b2,b3) is Relation-like set;

:: GFACIRC1:th 41
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2] &
         b1 <> [<*b2,b3*>,and2] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2]
   holds InputVertices BitGFA0Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 42
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA0Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 43
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA0Str(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 44
theorem
for b1, b2, b3 being set holds
b1 in the carrier of BitGFA0Str(b1,b2,b3) &
 b2 in the carrier of BitGFA0Str(b1,b2,b3) &
 b3 in the carrier of BitGFA0Str(b1,b2,b3) &
 [<*b1,b2*>,xor2] in the carrier of BitGFA0Str(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2],b3*>,xor2] in the carrier of BitGFA0Str(b1,b2,b3) &
 [<*b1,b2*>,and2] in the carrier of BitGFA0Str(b1,b2,b3) &
 [<*b2,b3*>,and2] in the carrier of BitGFA0Str(b1,b2,b3) &
 [<*b3,b1*>,and2] in the carrier of BitGFA0Str(b1,b2,b3) &
 [<*[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]*>,or3] in the carrier of BitGFA0Str(b1,b2,b3);

:: GFACIRC1:th 45
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2] in InnerVertices BitGFA0Str(b1,b2,b3) &
 GFA0AdderOutput(b1,b2,b3) in InnerVertices BitGFA0Str(b1,b2,b3) &
 [<*b1,b2*>,and2] in InnerVertices BitGFA0Str(b1,b2,b3) &
 [<*b2,b3*>,and2] in InnerVertices BitGFA0Str(b1,b2,b3) &
 [<*b3,b1*>,and2] in InnerVertices BitGFA0Str(b1,b2,b3) &
 GFA0CarryOutput(b1,b2,b3) in InnerVertices BitGFA0Str(b1,b2,b3);

:: GFACIRC1:th 46
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2] &
         b1 <> [<*b2,b3*>,and2] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2]
   holds b1 in InputVertices BitGFA0Str(b1,b2,b3) & b2 in InputVertices BitGFA0Str(b1,b2,b3) & b3 in InputVertices BitGFA0Str(b1,b2,b3);

:: GFACIRC1:funcnot 15 => GFACIRC1:func 15
definition
  let a1, a2, a3 be set;
  func BitGFA0CarryOutput(A1,A2,A3) -> Element of InnerVertices BitGFA0Str(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2],[<*a2,a3*>,and2],[<*a3,a1*>,and2]*>,or3];
end;

:: GFACIRC1:def 15
theorem
for b1, b2, b3 being set holds
BitGFA0CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2],[<*b2,b3*>,and2],[<*b3,b1*>,and2]*>,or3];

:: GFACIRC1:funcnot 16 => GFACIRC1:func 16
definition
  let a1, a2, a3 be set;
  func BitGFA0AdderOutput(A1,A2,A3) -> Element of InnerVertices BitGFA0Str(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 16
theorem
for b1, b2, b3 being set holds
BitGFA0AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2);

:: GFACIRC1:th 47
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2] &
      b1 <> [<*b2,b3*>,and2] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2]
for b4 being Element of product the Sorts of BitGFA0Circ(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)) . GFA0AdderOutput(b1,b2,b3) = (b5 'xor' b6) 'xor' b7 &
    (Following(b4,2)) . GFA0CarryOutput(b1,b2,b3) = ((b5 '&' b6) 'or' (b6 '&' b7)) 'or' (b7 '&' b5);

:: GFACIRC1:th 48
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2] &
      b1 <> [<*b2,b3*>,and2] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2]
for b4 being Element of product the Sorts of BitGFA0Circ(b1,b2,b3) holds
   Following(b4,2) is stable(BitGFA0Str(b1,b2,b3), BitGFA0Circ(b1,b2,b3));

:: GFACIRC1:funcnot 17 => GFACIRC1:func 17
definition
  let a1, a2, a3 be set;
  func GFA1CarryIStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    ((1GateCircStr(<*a1,a2*>,and2c)) +* 1GateCircStr(<*a2,a3*>,and2a)) +* 1GateCircStr(<*a3,a1*>,and2);
end;

:: GFACIRC1:def 17
theorem
for b1, b2, b3 being set holds
GFA1CarryIStr(b1,b2,b3) = ((1GateCircStr(<*b1,b2*>,and2c)) +* 1GateCircStr(<*b2,b3*>,and2a)) +* 1GateCircStr(<*b3,b1*>,and2);

:: GFACIRC1:funcnot 18 => GFACIRC1:func 18
definition
  let a1, a2, a3 be set;
  func GFA1CarryICirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA1CarryIStr(a1,a2,a3) equals
    ((1GateCircuit(a1,a2,and2c)) +* 1GateCircuit(a2,a3,and2a)) +* 1GateCircuit(a3,a1,and2);
end;

:: GFACIRC1:def 18
theorem
for b1, b2, b3 being set holds
GFA1CarryICirc(b1,b2,b3) = ((1GateCircuit(b1,b2,and2c)) +* 1GateCircuit(b2,b3,and2a)) +* 1GateCircuit(b3,b1,and2);

:: GFACIRC1:funcnot 19 => GFACIRC1:func 19
definition
  let a1, a2, a3 be set;
  func GFA1CarryStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA1CarryIStr(a1,a2,a3)) +* 1GateCircStr(<*[<*a1,a2*>,and2c],[<*a2,a3*>,and2a],[<*a3,a1*>,and2]*>,or3);
end;

:: GFACIRC1:def 19
theorem
for b1, b2, b3 being set holds
GFA1CarryStr(b1,b2,b3) = (GFA1CarryIStr(b1,b2,b3)) +* 1GateCircStr(<*[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]*>,or3);

:: GFACIRC1:funcnot 20 => GFACIRC1:func 20
definition
  let a1, a2, a3 be set;
  func GFA1CarryCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA1CarryStr(a1,a2,a3) equals
    (GFA1CarryICirc(a1,a2,a3)) +* 1GateCircuit([<*a1,a2*>,and2c],[<*a2,a3*>,and2a],[<*a3,a1*>,and2],or3);
end;

:: GFACIRC1:def 20
theorem
for b1, b2, b3 being set holds
GFA1CarryCirc(b1,b2,b3) = (GFA1CarryICirc(b1,b2,b3)) +* 1GateCircuit([<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2],or3);

:: GFACIRC1:funcnot 21 => GFACIRC1:func 21
definition
  let a1, a2, a3 be set;
  func GFA1CarryOutput(A1,A2,A3) -> Element of InnerVertices GFA1CarryStr(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2c],[<*a2,a3*>,and2a],[<*a3,a1*>,and2]*>,or3];
end;

:: GFACIRC1:def 21
theorem
for b1, b2, b3 being set holds
GFA1CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]*>,or3];

:: GFACIRC1:th 49
theorem
for b1, b2, b3 being set holds
InnerVertices GFA1CarryIStr(b1,b2,b3) = {[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]};

:: GFACIRC1:th 50
theorem
for b1, b2, b3 being set holds
InnerVertices GFA1CarryStr(b1,b2,b3) = {[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]} \/ {GFA1CarryOutput(b1,b2,b3)};

:: GFACIRC1:th 51
theorem
for b1, b2, b3 being set holds
InnerVertices GFA1CarryStr(b1,b2,b3) is Relation-like set;

:: GFACIRC1:th 52
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2a] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2c]
   holds InputVertices GFA1CarryIStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 53
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2a] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2c]
   holds InputVertices GFA1CarryStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 54
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA1CarryStr(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 55
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA1CarryStr(b1,b2,b3) &
 b2 in the carrier of GFA1CarryStr(b1,b2,b3) &
 b3 in the carrier of GFA1CarryStr(b1,b2,b3) &
 [<*b1,b2*>,and2c] in the carrier of GFA1CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2a] in the carrier of GFA1CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2] in the carrier of GFA1CarryStr(b1,b2,b3) &
 [<*[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]*>,or3] in the carrier of GFA1CarryStr(b1,b2,b3);

:: GFACIRC1:th 56
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,and2c] in InnerVertices GFA1CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2a] in InnerVertices GFA1CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2] in InnerVertices GFA1CarryStr(b1,b2,b3) &
 GFA1CarryOutput(b1,b2,b3) in InnerVertices GFA1CarryStr(b1,b2,b3);

:: GFACIRC1:th 57
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2a] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2c]
   holds b1 in InputVertices GFA1CarryStr(b1,b2,b3) & b2 in InputVertices GFA1CarryStr(b1,b2,b3) & b3 in InputVertices GFA1CarryStr(b1,b2,b3);

:: GFACIRC1:th 58
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA1CarryStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 59
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of GFA1CarryCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3
   holds (Following b4) . [<*b1,b2*>,and2c] = b5 '&' 'not' b6 &
    (Following b4) . [<*b2,b3*>,and2a] = ('not' b6) '&' b7 &
    (Following b4) . [<*b3,b1*>,and2] = b7 '&' b5;

:: GFACIRC1:th 60
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of GFA1CarryCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,and2c] &
         b6 = b4 . [<*b2,b3*>,and2a] &
         b7 = b4 . [<*b3,b1*>,and2]
   holds (Following b4) . GFA1CarryOutput(b1,b2,b3) = (b5 'or' b6) 'or' b7;

:: GFACIRC1:th 61
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2a] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2c]
for b4 being Element of product the Sorts of GFA1CarryCirc(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)) . GFA1CarryOutput(b1,b2,b3) = ((b5 '&' 'not' b6) 'or' (('not' b6) '&' b7)) 'or' (b7 '&' b5) &
    (Following(b4,2)) . [<*b1,b2*>,and2c] = b5 '&' 'not' b6 &
    (Following(b4,2)) . [<*b2,b3*>,and2a] = ('not' b6) '&' b7 &
    (Following(b4,2)) . [<*b3,b1*>,and2] = b7 '&' b5;

:: GFACIRC1:th 62
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2a] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2c]
for b4 being Element of product the Sorts of GFA1CarryCirc(b1,b2,b3) holds
   Following(b4,2) is stable(GFA1CarryStr(b1,b2,b3), GFA1CarryCirc(b1,b2,b3));

:: GFACIRC1:funcnot 22 => GFACIRC1:func 22
definition
  let a1, a2, a3 be set;
  func GFA1AdderStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    2GatesCircStr(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 22
theorem
for b1, b2, b3 being set holds
GFA1AdderStr(b1,b2,b3) = 2GatesCircStr(b1,b2,b3,xor2c);

:: GFACIRC1:funcnot 23 => GFACIRC1:func 23
definition
  let a1, a2, a3 be set;
  func GFA1AdderCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA1AdderStr(a1,a2,a3) equals
    2GatesCircuit(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 23
theorem
for b1, b2, b3 being set holds
GFA1AdderCirc(b1,b2,b3) = 2GatesCircuit(b1,b2,b3,xor2c);

:: GFACIRC1:funcnot 24 => GFACIRC1:func 24
definition
  let a1, a2, a3 be set;
  func GFA1AdderOutput(A1,A2,A3) -> Element of InnerVertices GFA1AdderStr(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 24
theorem
for b1, b2, b3 being set holds
GFA1AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2c);

:: GFACIRC1:th 63
theorem
for b1, b2, b3 being set holds
InnerVertices GFA1AdderStr(b1,b2,b3) = {[<*b1,b2*>,xor2c]} \/ {GFA1AdderOutput(b1,b2,b3)};

:: GFACIRC1:th 67
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA1AdderStr(b1,b2,b3) &
 b2 in the carrier of GFA1AdderStr(b1,b2,b3) &
 b3 in the carrier of GFA1AdderStr(b1,b2,b3) &
 [<*b1,b2*>,xor2c] in the carrier of GFA1AdderStr(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2c],b3*>,xor2c] in the carrier of GFA1AdderStr(b1,b2,b3);

:: GFACIRC1:th 68
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2c] in InnerVertices GFA1AdderStr(b1,b2,b3) &
 GFA1AdderOutput(b1,b2,b3) in InnerVertices GFA1AdderStr(b1,b2,b3);

:: GFACIRC1:th 69
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2c]
   holds b1 in InputVertices GFA1AdderStr(b1,b2,b3) & b2 in InputVertices GFA1AdderStr(b1,b2,b3) & b3 in InputVertices GFA1AdderStr(b1,b2,b3);

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

:: GFACIRC1:th 72
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c]
for b4 being Element of product the Sorts of GFA1AdderCirc(b1,b2,b3)
for b5, b6, b7, b8 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,xor2c] &
         b6 = b4 . b1 &
         b7 = b4 . b2 &
         b8 = b4 . b3
   holds (Following b4) . GFA1AdderOutput(b1,b2,b3) = b5 'xor' 'not' b8;

:: GFACIRC1:th 73
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c]
for b4 being Element of product the Sorts of GFA1AdderCirc(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)) . GFA1AdderOutput(b1,b2,b3) = (b5 'xor' 'not' b6) 'xor' 'not' b7 &
    (Following(b4,2)) . [<*b1,b2*>,xor2c] = b5 'xor' 'not' b6 &
    (Following(b4,2)) . b1 = b5 &
    (Following(b4,2)) . b2 = b6 &
    (Following(b4,2)) . b3 = b7;

:: GFACIRC1:th 74
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c]
for b4 being Element of product the Sorts of GFA1AdderCirc(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)) . GFA1AdderOutput(b1,b2,b3) = 'not' ((b5 'xor' 'not' b6) 'xor' b7);

:: GFACIRC1:funcnot 25 => GFACIRC1:func 25
definition
  let a1, a2, a3 be set;
  func BitGFA1Str(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA1AdderStr(a1,a2,a3)) +* GFA1CarryStr(a1,a2,a3);
end;

:: GFACIRC1:def 25
theorem
for b1, b2, b3 being set holds
BitGFA1Str(b1,b2,b3) = (GFA1AdderStr(b1,b2,b3)) +* GFA1CarryStr(b1,b2,b3);

:: GFACIRC1:funcnot 26 => GFACIRC1:func 26
definition
  let a1, a2, a3 be set;
  func BitGFA1Circ(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over BitGFA1Str(a1,a2,a3) equals
    (GFA1AdderCirc(a1,a2,a3)) +* GFA1CarryCirc(a1,a2,a3);
end;

:: GFACIRC1:def 26
theorem
for b1, b2, b3 being set holds
BitGFA1Circ(b1,b2,b3) = (GFA1AdderCirc(b1,b2,b3)) +* GFA1CarryCirc(b1,b2,b3);

:: GFACIRC1:th 76
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA1Str(b1,b2,b3) = (({[<*b1,b2*>,xor2c]} \/ {GFA1AdderOutput(b1,b2,b3)}) \/ {[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]}) \/ {GFA1CarryOutput(b1,b2,b3)};

:: GFACIRC1:th 77
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA1Str(b1,b2,b3) is Relation-like set;

:: GFACIRC1:th 78
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2c] &
         b1 <> [<*b2,b3*>,and2a] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2c]
   holds InputVertices BitGFA1Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 79
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA1Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 80
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA1Str(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 81
theorem
for b1, b2, b3 being set holds
b1 in the carrier of BitGFA1Str(b1,b2,b3) &
 b2 in the carrier of BitGFA1Str(b1,b2,b3) &
 b3 in the carrier of BitGFA1Str(b1,b2,b3) &
 [<*b1,b2*>,xor2c] in the carrier of BitGFA1Str(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2c],b3*>,xor2c] in the carrier of BitGFA1Str(b1,b2,b3) &
 [<*b1,b2*>,and2c] in the carrier of BitGFA1Str(b1,b2,b3) &
 [<*b2,b3*>,and2a] in the carrier of BitGFA1Str(b1,b2,b3) &
 [<*b3,b1*>,and2] in the carrier of BitGFA1Str(b1,b2,b3) &
 [<*[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]*>,or3] in the carrier of BitGFA1Str(b1,b2,b3);

:: GFACIRC1:th 82
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2c] in InnerVertices BitGFA1Str(b1,b2,b3) &
 GFA1AdderOutput(b1,b2,b3) in InnerVertices BitGFA1Str(b1,b2,b3) &
 [<*b1,b2*>,and2c] in InnerVertices BitGFA1Str(b1,b2,b3) &
 [<*b2,b3*>,and2a] in InnerVertices BitGFA1Str(b1,b2,b3) &
 [<*b3,b1*>,and2] in InnerVertices BitGFA1Str(b1,b2,b3) &
 GFA1CarryOutput(b1,b2,b3) in InnerVertices BitGFA1Str(b1,b2,b3);

:: GFACIRC1:th 83
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2c] &
         b1 <> [<*b2,b3*>,and2a] &
         b2 <> [<*b3,b1*>,and2] &
         b3 <> [<*b1,b2*>,and2c]
   holds b1 in InputVertices BitGFA1Str(b1,b2,b3) & b2 in InputVertices BitGFA1Str(b1,b2,b3) & b3 in InputVertices BitGFA1Str(b1,b2,b3);

:: GFACIRC1:funcnot 27 => GFACIRC1:func 27
definition
  let a1, a2, a3 be set;
  func BitGFA1CarryOutput(A1,A2,A3) -> Element of InnerVertices BitGFA1Str(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2c],[<*a2,a3*>,and2a],[<*a3,a1*>,and2]*>,or3];
end;

:: GFACIRC1:def 27
theorem
for b1, b2, b3 being set holds
BitGFA1CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2c],[<*b2,b3*>,and2a],[<*b3,b1*>,and2]*>,or3];

:: GFACIRC1:funcnot 28 => GFACIRC1:func 28
definition
  let a1, a2, a3 be set;
  func BitGFA1AdderOutput(A1,A2,A3) -> Element of InnerVertices BitGFA1Str(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 28
theorem
for b1, b2, b3 being set holds
BitGFA1AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2c);

:: GFACIRC1:th 84
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c] &
      b1 <> [<*b2,b3*>,and2a] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2c]
for b4 being Element of product the Sorts of BitGFA1Circ(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)) . GFA1AdderOutput(b1,b2,b3) = 'not' ((b5 'xor' 'not' b6) 'xor' b7) &
    (Following(b4,2)) . GFA1CarryOutput(b1,b2,b3) = ((b5 '&' 'not' b6) 'or' (('not' b6) '&' b7)) 'or' (b7 '&' b5);

:: GFACIRC1:th 85
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c] &
      b1 <> [<*b2,b3*>,and2a] &
      b2 <> [<*b3,b1*>,and2] &
      b3 <> [<*b1,b2*>,and2c]
for b4 being Element of product the Sorts of BitGFA1Circ(b1,b2,b3) holds
   Following(b4,2) is stable(BitGFA1Str(b1,b2,b3), BitGFA1Circ(b1,b2,b3));

:: GFACIRC1:funcnot 29 => GFACIRC1:func 29
definition
  let a1, a2, a3 be set;
  func GFA2CarryIStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    ((1GateCircStr(<*a1,a2*>,and2a)) +* 1GateCircStr(<*a2,a3*>,and2c)) +* 1GateCircStr(<*a3,a1*>,and2b);
end;

:: GFACIRC1:def 29
theorem
for b1, b2, b3 being set holds
GFA2CarryIStr(b1,b2,b3) = ((1GateCircStr(<*b1,b2*>,and2a)) +* 1GateCircStr(<*b2,b3*>,and2c)) +* 1GateCircStr(<*b3,b1*>,and2b);

:: GFACIRC1:funcnot 30 => GFACIRC1:func 30
definition
  let a1, a2, a3 be set;
  func GFA2CarryICirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA2CarryIStr(a1,a2,a3) equals
    ((1GateCircuit(a1,a2,and2a)) +* 1GateCircuit(a2,a3,and2c)) +* 1GateCircuit(a3,a1,and2b);
end;

:: GFACIRC1:def 30
theorem
for b1, b2, b3 being set holds
GFA2CarryICirc(b1,b2,b3) = ((1GateCircuit(b1,b2,and2a)) +* 1GateCircuit(b2,b3,and2c)) +* 1GateCircuit(b3,b1,and2b);

:: GFACIRC1:funcnot 31 => GFACIRC1:func 31
definition
  let a1, a2, a3 be set;
  func GFA2CarryStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA2CarryIStr(a1,a2,a3)) +* 1GateCircStr(<*[<*a1,a2*>,and2a],[<*a2,a3*>,and2c],[<*a3,a1*>,and2b]*>,nor3);
end;

:: GFACIRC1:def 31
theorem
for b1, b2, b3 being set holds
GFA2CarryStr(b1,b2,b3) = (GFA2CarryIStr(b1,b2,b3)) +* 1GateCircStr(<*[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]*>,nor3);

:: GFACIRC1:funcnot 32 => GFACIRC1:func 32
definition
  let a1, a2, a3 be set;
  func GFA2CarryCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA2CarryStr(a1,a2,a3) equals
    (GFA2CarryICirc(a1,a2,a3)) +* 1GateCircuit([<*a1,a2*>,and2a],[<*a2,a3*>,and2c],[<*a3,a1*>,and2b],nor3);
end;

:: GFACIRC1:def 32
theorem
for b1, b2, b3 being set holds
GFA2CarryCirc(b1,b2,b3) = (GFA2CarryICirc(b1,b2,b3)) +* 1GateCircuit([<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b],nor3);

:: GFACIRC1:funcnot 33 => GFACIRC1:func 33
definition
  let a1, a2, a3 be set;
  func GFA2CarryOutput(A1,A2,A3) -> Element of InnerVertices GFA2CarryStr(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2a],[<*a2,a3*>,and2c],[<*a3,a1*>,and2b]*>,nor3];
end;

:: GFACIRC1:def 33
theorem
for b1, b2, b3 being set holds
GFA2CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]*>,nor3];

:: GFACIRC1:th 86
theorem
for b1, b2, b3 being set holds
InnerVertices GFA2CarryIStr(b1,b2,b3) = {[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]};

:: GFACIRC1:th 87
theorem
for b1, b2, b3 being set holds
InnerVertices GFA2CarryStr(b1,b2,b3) = {[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]} \/ {GFA2CarryOutput(b1,b2,b3)};

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

:: GFACIRC1:th 89
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2c] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2a]
   holds InputVertices GFA2CarryIStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 90
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2c] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2a]
   holds InputVertices GFA2CarryStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 91
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA2CarryStr(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 92
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA2CarryStr(b1,b2,b3) &
 b2 in the carrier of GFA2CarryStr(b1,b2,b3) &
 b3 in the carrier of GFA2CarryStr(b1,b2,b3) &
 [<*b1,b2*>,and2a] in the carrier of GFA2CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2c] in the carrier of GFA2CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2b] in the carrier of GFA2CarryStr(b1,b2,b3) &
 [<*[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]*>,nor3] in the carrier of GFA2CarryStr(b1,b2,b3);

:: GFACIRC1:th 93
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,and2a] in InnerVertices GFA2CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2c] in InnerVertices GFA2CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2b] in InnerVertices GFA2CarryStr(b1,b2,b3) &
 GFA2CarryOutput(b1,b2,b3) in InnerVertices GFA2CarryStr(b1,b2,b3);

:: GFACIRC1:th 94
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2c] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2a]
   holds b1 in InputVertices GFA2CarryStr(b1,b2,b3) & b2 in InputVertices GFA2CarryStr(b1,b2,b3) & b3 in InputVertices GFA2CarryStr(b1,b2,b3);

:: GFACIRC1:th 95
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA2CarryStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 96
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of GFA2CarryCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3
   holds (Following b4) . [<*b1,b2*>,and2a] = ('not' b5) '&' b6 &
    (Following b4) . [<*b2,b3*>,and2c] = b6 '&' 'not' b7 &
    (Following b4) . [<*b3,b1*>,and2b] = ('not' b7) '&' 'not' b5;

:: GFACIRC1:th 97
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of GFA2CarryCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,and2a] &
         b6 = b4 . [<*b2,b3*>,and2c] &
         b7 = b4 . [<*b3,b1*>,and2b]
   holds (Following b4) . GFA2CarryOutput(b1,b2,b3) = 'not' ((b5 'or' b6) 'or' b7);

:: GFACIRC1:th 98
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2c] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2a]
for b4 being Element of product the Sorts of GFA2CarryCirc(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)) . GFA2CarryOutput(b1,b2,b3) = 'not' (((('not' b5) '&' b6) 'or' (b6 '&' 'not' b7)) 'or' (('not' b7) '&' 'not' b5)) &
    (Following(b4,2)) . [<*b1,b2*>,and2a] = ('not' b5) '&' b6 &
    (Following(b4,2)) . [<*b2,b3*>,and2c] = b6 '&' 'not' b7 &
    (Following(b4,2)) . [<*b3,b1*>,and2b] = ('not' b7) '&' 'not' b5;

:: GFACIRC1:th 99
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2c] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2a]
for b4 being Element of product the Sorts of GFA2CarryCirc(b1,b2,b3) holds
   Following(b4,2) is stable(GFA2CarryStr(b1,b2,b3), GFA2CarryCirc(b1,b2,b3));

:: GFACIRC1:funcnot 34 => GFACIRC1:func 34
definition
  let a1, a2, a3 be set;
  func GFA2AdderStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    2GatesCircStr(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 34
theorem
for b1, b2, b3 being set holds
GFA2AdderStr(b1,b2,b3) = 2GatesCircStr(b1,b2,b3,xor2c);

:: GFACIRC1:funcnot 35 => GFACIRC1:func 35
definition
  let a1, a2, a3 be set;
  func GFA2AdderCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA2AdderStr(a1,a2,a3) equals
    2GatesCircuit(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 35
theorem
for b1, b2, b3 being set holds
GFA2AdderCirc(b1,b2,b3) = 2GatesCircuit(b1,b2,b3,xor2c);

:: GFACIRC1:funcnot 36 => GFACIRC1:func 36
definition
  let a1, a2, a3 be set;
  func GFA2AdderOutput(A1,A2,A3) -> Element of InnerVertices GFA2AdderStr(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 36
theorem
for b1, b2, b3 being set holds
GFA2AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2c);

:: GFACIRC1:th 100
theorem
for b1, b2, b3 being set holds
InnerVertices GFA2AdderStr(b1,b2,b3) = {[<*b1,b2*>,xor2c]} \/ {GFA2AdderOutput(b1,b2,b3)};

:: GFACIRC1:th 104
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA2AdderStr(b1,b2,b3) &
 b2 in the carrier of GFA2AdderStr(b1,b2,b3) &
 b3 in the carrier of GFA2AdderStr(b1,b2,b3) &
 [<*b1,b2*>,xor2c] in the carrier of GFA2AdderStr(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2c],b3*>,xor2c] in the carrier of GFA2AdderStr(b1,b2,b3);

:: GFACIRC1:th 105
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2c] in InnerVertices GFA2AdderStr(b1,b2,b3) &
 GFA2AdderOutput(b1,b2,b3) in InnerVertices GFA2AdderStr(b1,b2,b3);

:: GFACIRC1:th 106
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2c]
   holds b1 in InputVertices GFA2AdderStr(b1,b2,b3) & b2 in InputVertices GFA2AdderStr(b1,b2,b3) & b3 in InputVertices GFA2AdderStr(b1,b2,b3);

:: GFACIRC1:th 108
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c]
for b4 being Element of product the Sorts of GFA2AdderCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3
   holds (Following b4) . [<*b1,b2*>,xor2c] = b5 'xor' 'not' b6 &
    (Following b4) . b1 = b5 &
    (Following b4) . b2 = b6 &
    (Following b4) . b3 = b7;

:: GFACIRC1:th 109
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c]
for b4 being Element of product the Sorts of GFA2AdderCirc(b1,b2,b3)
for b5, b6, b7, b8 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,xor2c] &
         b6 = b4 . b1 &
         b7 = b4 . b2 &
         b8 = b4 . b3
   holds (Following b4) . GFA2AdderOutput(b1,b2,b3) = b5 'xor' 'not' b8;

:: GFACIRC1:th 110
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c]
for b4 being Element of product the Sorts of GFA2AdderCirc(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)) . GFA2AdderOutput(b1,b2,b3) = (b5 'xor' 'not' b6) 'xor' 'not' b7 &
    (Following(b4,2)) . [<*b1,b2*>,xor2c] = b5 'xor' 'not' b6 &
    (Following(b4,2)) . b1 = b5 &
    (Following(b4,2)) . b2 = b6 &
    (Following(b4,2)) . b3 = b7;

:: GFACIRC1:th 111
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c]
for b4 being Element of product the Sorts of GFA2AdderCirc(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)) . GFA2AdderOutput(b1,b2,b3) = (('not' b5) 'xor' b6) 'xor' 'not' b7;

:: GFACIRC1:funcnot 37 => GFACIRC1:func 37
definition
  let a1, a2, a3 be set;
  func BitGFA2Str(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA2AdderStr(a1,a2,a3)) +* GFA2CarryStr(a1,a2,a3);
end;

:: GFACIRC1:def 37
theorem
for b1, b2, b3 being set holds
BitGFA2Str(b1,b2,b3) = (GFA2AdderStr(b1,b2,b3)) +* GFA2CarryStr(b1,b2,b3);

:: GFACIRC1:funcnot 38 => GFACIRC1:func 38
definition
  let a1, a2, a3 be set;
  func BitGFA2Circ(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over BitGFA2Str(a1,a2,a3) equals
    (GFA2AdderCirc(a1,a2,a3)) +* GFA2CarryCirc(a1,a2,a3);
end;

:: GFACIRC1:def 38
theorem
for b1, b2, b3 being set holds
BitGFA2Circ(b1,b2,b3) = (GFA2AdderCirc(b1,b2,b3)) +* GFA2CarryCirc(b1,b2,b3);

:: GFACIRC1:th 113
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA2Str(b1,b2,b3) = (({[<*b1,b2*>,xor2c]} \/ {GFA2AdderOutput(b1,b2,b3)}) \/ {[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]}) \/ {GFA2CarryOutput(b1,b2,b3)};

:: GFACIRC1:th 114
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA2Str(b1,b2,b3) is Relation-like set;

:: GFACIRC1:th 115
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2c] &
         b1 <> [<*b2,b3*>,and2c] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2a]
   holds InputVertices BitGFA2Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 116
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA2Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 117
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA2Str(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 118
theorem
for b1, b2, b3 being set holds
b1 in the carrier of BitGFA2Str(b1,b2,b3) &
 b2 in the carrier of BitGFA2Str(b1,b2,b3) &
 b3 in the carrier of BitGFA2Str(b1,b2,b3) &
 [<*b1,b2*>,xor2c] in the carrier of BitGFA2Str(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2c],b3*>,xor2c] in the carrier of BitGFA2Str(b1,b2,b3) &
 [<*b1,b2*>,and2a] in the carrier of BitGFA2Str(b1,b2,b3) &
 [<*b2,b3*>,and2c] in the carrier of BitGFA2Str(b1,b2,b3) &
 [<*b3,b1*>,and2b] in the carrier of BitGFA2Str(b1,b2,b3) &
 [<*[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]*>,nor3] in the carrier of BitGFA2Str(b1,b2,b3);

:: GFACIRC1:th 119
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2c] in InnerVertices BitGFA2Str(b1,b2,b3) &
 GFA2AdderOutput(b1,b2,b3) in InnerVertices BitGFA2Str(b1,b2,b3) &
 [<*b1,b2*>,and2a] in InnerVertices BitGFA2Str(b1,b2,b3) &
 [<*b2,b3*>,and2c] in InnerVertices BitGFA2Str(b1,b2,b3) &
 [<*b3,b1*>,and2b] in InnerVertices BitGFA2Str(b1,b2,b3) &
 GFA2CarryOutput(b1,b2,b3) in InnerVertices BitGFA2Str(b1,b2,b3);

:: GFACIRC1:th 120
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2c] &
         b1 <> [<*b2,b3*>,and2c] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2a]
   holds b1 in InputVertices BitGFA2Str(b1,b2,b3) & b2 in InputVertices BitGFA2Str(b1,b2,b3) & b3 in InputVertices BitGFA2Str(b1,b2,b3);

:: GFACIRC1:funcnot 39 => GFACIRC1:func 39
definition
  let a1, a2, a3 be set;
  func BitGFA2CarryOutput(A1,A2,A3) -> Element of InnerVertices BitGFA2Str(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2a],[<*a2,a3*>,and2c],[<*a3,a1*>,and2b]*>,nor3];
end;

:: GFACIRC1:def 39
theorem
for b1, b2, b3 being set holds
BitGFA2CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2a],[<*b2,b3*>,and2c],[<*b3,b1*>,and2b]*>,nor3];

:: GFACIRC1:funcnot 40 => GFACIRC1:func 40
definition
  let a1, a2, a3 be set;
  func BitGFA2AdderOutput(A1,A2,A3) -> Element of InnerVertices BitGFA2Str(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2c);
end;

:: GFACIRC1:def 40
theorem
for b1, b2, b3 being set holds
BitGFA2AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2c);

:: GFACIRC1:th 121
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c] &
      b1 <> [<*b2,b3*>,and2c] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2a]
for b4 being Element of product the Sorts of BitGFA2Circ(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)) . GFA2AdderOutput(b1,b2,b3) = (('not' b5) 'xor' b6) 'xor' 'not' b7 &
    (Following(b4,2)) . GFA2CarryOutput(b1,b2,b3) = 'not' (((('not' b5) '&' b6) 'or' (b6 '&' 'not' b7)) 'or' (('not' b7) '&' 'not' b5));

:: GFACIRC1:th 122
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2c] &
      b1 <> [<*b2,b3*>,and2c] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2a]
for b4 being Element of product the Sorts of BitGFA2Circ(b1,b2,b3) holds
   Following(b4,2) is stable(BitGFA2Str(b1,b2,b3), BitGFA2Circ(b1,b2,b3));

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

:: GFACIRC1:def 41
theorem
for b1, b2, b3 being set holds
GFA3CarryIStr(b1,b2,b3) = ((1GateCircStr(<*b1,b2*>,and2b)) +* 1GateCircStr(<*b2,b3*>,and2b)) +* 1GateCircStr(<*b3,b1*>,and2b);

:: GFACIRC1:funcnot 42 => GFACIRC1:func 42
definition
  let a1, a2, a3 be set;
  func GFA3CarryICirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA3CarryIStr(a1,a2,a3) equals
    ((1GateCircuit(a1,a2,and2b)) +* 1GateCircuit(a2,a3,and2b)) +* 1GateCircuit(a3,a1,and2b);
end;

:: GFACIRC1:def 42
theorem
for b1, b2, b3 being set holds
GFA3CarryICirc(b1,b2,b3) = ((1GateCircuit(b1,b2,and2b)) +* 1GateCircuit(b2,b3,and2b)) +* 1GateCircuit(b3,b1,and2b);

:: GFACIRC1:funcnot 43 => GFACIRC1:func 43
definition
  let a1, a2, a3 be set;
  func GFA3CarryStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA3CarryIStr(a1,a2,a3)) +* 1GateCircStr(<*[<*a1,a2*>,and2b],[<*a2,a3*>,and2b],[<*a3,a1*>,and2b]*>,nor3);
end;

:: GFACIRC1:def 43
theorem
for b1, b2, b3 being set holds
GFA3CarryStr(b1,b2,b3) = (GFA3CarryIStr(b1,b2,b3)) +* 1GateCircStr(<*[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]*>,nor3);

:: GFACIRC1:funcnot 44 => GFACIRC1:func 44
definition
  let a1, a2, a3 be set;
  func GFA3CarryCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA3CarryStr(a1,a2,a3) equals
    (GFA3CarryICirc(a1,a2,a3)) +* 1GateCircuit([<*a1,a2*>,and2b],[<*a2,a3*>,and2b],[<*a3,a1*>,and2b],nor3);
end;

:: GFACIRC1:def 44
theorem
for b1, b2, b3 being set holds
GFA3CarryCirc(b1,b2,b3) = (GFA3CarryICirc(b1,b2,b3)) +* 1GateCircuit([<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b],nor3);

:: GFACIRC1:funcnot 45 => GFACIRC1:func 45
definition
  let a1, a2, a3 be set;
  func GFA3CarryOutput(A1,A2,A3) -> Element of InnerVertices GFA3CarryStr(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2b],[<*a2,a3*>,and2b],[<*a3,a1*>,and2b]*>,nor3];
end;

:: GFACIRC1:def 45
theorem
for b1, b2, b3 being set holds
GFA3CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]*>,nor3];

:: GFACIRC1:th 123
theorem
for b1, b2, b3 being set holds
InnerVertices GFA3CarryIStr(b1,b2,b3) = {[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]};

:: GFACIRC1:th 124
theorem
for b1, b2, b3 being set holds
InnerVertices GFA3CarryStr(b1,b2,b3) = {[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]} \/ {GFA3CarryOutput(b1,b2,b3)};

:: GFACIRC1:th 125
theorem
for b1, b2, b3 being set holds
InnerVertices GFA3CarryStr(b1,b2,b3) is Relation-like set;

:: GFACIRC1:th 126
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2b] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2b]
   holds InputVertices GFA3CarryIStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 127
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2b] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2b]
   holds InputVertices GFA3CarryStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 128
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA3CarryStr(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 129
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA3CarryStr(b1,b2,b3) &
 b2 in the carrier of GFA3CarryStr(b1,b2,b3) &
 b3 in the carrier of GFA3CarryStr(b1,b2,b3) &
 [<*b1,b2*>,and2b] in the carrier of GFA3CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2b] in the carrier of GFA3CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2b] in the carrier of GFA3CarryStr(b1,b2,b3) &
 [<*[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]*>,nor3] in the carrier of GFA3CarryStr(b1,b2,b3);

:: GFACIRC1:th 130
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,and2b] in InnerVertices GFA3CarryStr(b1,b2,b3) &
 [<*b2,b3*>,and2b] in InnerVertices GFA3CarryStr(b1,b2,b3) &
 [<*b3,b1*>,and2b] in InnerVertices GFA3CarryStr(b1,b2,b3) &
 GFA3CarryOutput(b1,b2,b3) in InnerVertices GFA3CarryStr(b1,b2,b3);

:: GFACIRC1:th 131
theorem
for b1, b2, b3 being set
      st b1 <> [<*b2,b3*>,and2b] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2b]
   holds b1 in InputVertices GFA3CarryStr(b1,b2,b3) & b2 in InputVertices GFA3CarryStr(b1,b2,b3) & b3 in InputVertices GFA3CarryStr(b1,b2,b3);

:: GFACIRC1:th 132
theorem
for b1, b2, b3 being non pair set holds
InputVertices GFA3CarryStr(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 133
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of GFA3CarryCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3
   holds (Following b4) . [<*b1,b2*>,and2b] = ('not' b5) '&' 'not' b6 &
    (Following b4) . [<*b2,b3*>,and2b] = ('not' b6) '&' 'not' b7 &
    (Following b4) . [<*b3,b1*>,and2b] = ('not' b7) '&' 'not' b5;

:: GFACIRC1:th 134
theorem
for b1, b2, b3 being set
for b4 being Element of product the Sorts of GFA3CarryCirc(b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,and2b] &
         b6 = b4 . [<*b2,b3*>,and2b] &
         b7 = b4 . [<*b3,b1*>,and2b]
   holds (Following b4) . GFA3CarryOutput(b1,b2,b3) = 'not' ((b5 'or' b6) 'or' b7);

:: GFACIRC1:th 135
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2b] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2b]
for b4 being Element of product the Sorts of GFA3CarryCirc(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)) . GFA3CarryOutput(b1,b2,b3) = 'not' (((('not' b5) '&' 'not' b6) 'or' (('not' b6) '&' 'not' b7)) 'or' (('not' b7) '&' 'not' b5)) &
    (Following(b4,2)) . [<*b1,b2*>,and2b] = ('not' b5) '&' 'not' b6 &
    (Following(b4,2)) . [<*b2,b3*>,and2b] = ('not' b6) '&' 'not' b7 &
    (Following(b4,2)) . [<*b3,b1*>,and2b] = ('not' b7) '&' 'not' b5;

:: GFACIRC1:th 136
theorem
for b1, b2, b3 being set
   st b1 <> [<*b2,b3*>,and2b] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2b]
for b4 being Element of product the Sorts of GFA3CarryCirc(b1,b2,b3) holds
   Following(b4,2) is stable(GFA3CarryStr(b1,b2,b3), GFA3CarryCirc(b1,b2,b3));

:: GFACIRC1:funcnot 46 => GFACIRC1:func 46
definition
  let a1, a2, a3 be set;
  func GFA3AdderStr(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    2GatesCircStr(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 46
theorem
for b1, b2, b3 being set holds
GFA3AdderStr(b1,b2,b3) = 2GatesCircStr(b1,b2,b3,xor2);

:: GFACIRC1:funcnot 47 => GFACIRC1:func 47
definition
  let a1, a2, a3 be set;
  func GFA3AdderCirc(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over GFA3AdderStr(a1,a2,a3) equals
    2GatesCircuit(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 47
theorem
for b1, b2, b3 being set holds
GFA3AdderCirc(b1,b2,b3) = 2GatesCircuit(b1,b2,b3,xor2);

:: GFACIRC1:funcnot 48 => GFACIRC1:func 48
definition
  let a1, a2, a3 be set;
  func GFA3AdderOutput(A1,A2,A3) -> Element of InnerVertices GFA3AdderStr(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 48
theorem
for b1, b2, b3 being set holds
GFA3AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2);

:: GFACIRC1:th 137
theorem
for b1, b2, b3 being set holds
InnerVertices GFA3AdderStr(b1,b2,b3) = {[<*b1,b2*>,xor2]} \/ {GFA3AdderOutput(b1,b2,b3)};

:: GFACIRC1:th 141
theorem
for b1, b2, b3 being set holds
b1 in the carrier of GFA3AdderStr(b1,b2,b3) &
 b2 in the carrier of GFA3AdderStr(b1,b2,b3) &
 b3 in the carrier of GFA3AdderStr(b1,b2,b3) &
 [<*b1,b2*>,xor2] in the carrier of GFA3AdderStr(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2],b3*>,xor2] in the carrier of GFA3AdderStr(b1,b2,b3);

:: GFACIRC1:th 142
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2] in InnerVertices GFA3AdderStr(b1,b2,b3) &
 GFA3AdderOutput(b1,b2,b3) in InnerVertices GFA3AdderStr(b1,b2,b3);

:: GFACIRC1:th 143
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2]
   holds b1 in InputVertices GFA3AdderStr(b1,b2,b3) & b2 in InputVertices GFA3AdderStr(b1,b2,b3) & b3 in InputVertices GFA3AdderStr(b1,b2,b3);

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

:: GFACIRC1:th 146
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2]
for b4 being Element of product the Sorts of GFA3AdderCirc(b1,b2,b3)
for b5, b6, b7, b8 being Element of BOOLEAN
      st b5 = b4 . [<*b1,b2*>,xor2] &
         b6 = b4 . b1 &
         b7 = b4 . b2 &
         b8 = b4 . b3
   holds (Following b4) . GFA3AdderOutput(b1,b2,b3) = b5 'xor' b8;

:: GFACIRC1:th 147
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2]
for b4 being Element of product the Sorts of GFA3AdderCirc(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)) . GFA3AdderOutput(b1,b2,b3) = (b5 'xor' b6) 'xor' b7 &
    (Following(b4,2)) . [<*b1,b2*>,xor2] = b5 'xor' b6 &
    (Following(b4,2)) . b1 = b5 &
    (Following(b4,2)) . b2 = b6 &
    (Following(b4,2)) . b3 = b7;

:: GFACIRC1:th 148
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2]
for b4 being Element of product the Sorts of GFA3AdderCirc(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)) . GFA3AdderOutput(b1,b2,b3) = 'not' ((('not' b5) 'xor' 'not' b6) 'xor' 'not' b7);

:: GFACIRC1:funcnot 49 => GFACIRC1:func 49
definition
  let a1, a2, a3 be set;
  func BitGFA3Str(A1,A2,A3) -> non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign equals
    (GFA3AdderStr(a1,a2,a3)) +* GFA3CarryStr(a1,a2,a3);
end;

:: GFACIRC1:def 49
theorem
for b1, b2, b3 being set holds
BitGFA3Str(b1,b2,b3) = (GFA3AdderStr(b1,b2,b3)) +* GFA3CarryStr(b1,b2,b3);

:: GFACIRC1:funcnot 50 => GFACIRC1:func 50
definition
  let a1, a2, a3 be set;
  func BitGFA3Circ(A1,A2,A3) -> strict locally-finite gate`2=den Boolean MSAlgebra over BitGFA3Str(a1,a2,a3) equals
    (GFA3AdderCirc(a1,a2,a3)) +* GFA3CarryCirc(a1,a2,a3);
end;

:: GFACIRC1:def 50
theorem
for b1, b2, b3 being set holds
BitGFA3Circ(b1,b2,b3) = (GFA3AdderCirc(b1,b2,b3)) +* GFA3CarryCirc(b1,b2,b3);

:: GFACIRC1:th 150
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA3Str(b1,b2,b3) = (({[<*b1,b2*>,xor2]} \/ {GFA3AdderOutput(b1,b2,b3)}) \/ {[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]}) \/ {GFA3CarryOutput(b1,b2,b3)};

:: GFACIRC1:th 151
theorem
for b1, b2, b3 being set holds
InnerVertices BitGFA3Str(b1,b2,b3) is Relation-like set;

:: GFACIRC1:th 152
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2] &
         b1 <> [<*b2,b3*>,and2b] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2b]
   holds InputVertices BitGFA3Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 153
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA3Str(b1,b2,b3) = {b1,b2,b3};

:: GFACIRC1:th 154
theorem
for b1, b2, b3 being non pair set holds
InputVertices BitGFA3Str(b1,b2,b3) is without_pairs;

:: GFACIRC1:th 155
theorem
for b1, b2, b3 being set holds
b1 in the carrier of BitGFA3Str(b1,b2,b3) &
 b2 in the carrier of BitGFA3Str(b1,b2,b3) &
 b3 in the carrier of BitGFA3Str(b1,b2,b3) &
 [<*b1,b2*>,xor2] in the carrier of BitGFA3Str(b1,b2,b3) &
 [<*[<*b1,b2*>,xor2],b3*>,xor2] in the carrier of BitGFA3Str(b1,b2,b3) &
 [<*b1,b2*>,and2b] in the carrier of BitGFA3Str(b1,b2,b3) &
 [<*b2,b3*>,and2b] in the carrier of BitGFA3Str(b1,b2,b3) &
 [<*b3,b1*>,and2b] in the carrier of BitGFA3Str(b1,b2,b3) &
 [<*[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]*>,nor3] in the carrier of BitGFA3Str(b1,b2,b3);

:: GFACIRC1:th 156
theorem
for b1, b2, b3 being set holds
[<*b1,b2*>,xor2] in InnerVertices BitGFA3Str(b1,b2,b3) &
 GFA3AdderOutput(b1,b2,b3) in InnerVertices BitGFA3Str(b1,b2,b3) &
 [<*b1,b2*>,and2b] in InnerVertices BitGFA3Str(b1,b2,b3) &
 [<*b2,b3*>,and2b] in InnerVertices BitGFA3Str(b1,b2,b3) &
 [<*b3,b1*>,and2b] in InnerVertices BitGFA3Str(b1,b2,b3) &
 GFA3CarryOutput(b1,b2,b3) in InnerVertices BitGFA3Str(b1,b2,b3);

:: GFACIRC1:th 157
theorem
for b1, b2, b3 being set
      st b3 <> [<*b1,b2*>,xor2] &
         b1 <> [<*b2,b3*>,and2b] &
         b2 <> [<*b3,b1*>,and2b] &
         b3 <> [<*b1,b2*>,and2b]
   holds b1 in InputVertices BitGFA3Str(b1,b2,b3) & b2 in InputVertices BitGFA3Str(b1,b2,b3) & b3 in InputVertices BitGFA3Str(b1,b2,b3);

:: GFACIRC1:funcnot 51 => GFACIRC1:func 51
definition
  let a1, a2, a3 be set;
  func BitGFA3CarryOutput(A1,A2,A3) -> Element of InnerVertices BitGFA3Str(a1,a2,a3) equals
    [<*[<*a1,a2*>,and2b],[<*a2,a3*>,and2b],[<*a3,a1*>,and2b]*>,nor3];
end;

:: GFACIRC1:def 51
theorem
for b1, b2, b3 being set holds
BitGFA3CarryOutput(b1,b2,b3) = [<*[<*b1,b2*>,and2b],[<*b2,b3*>,and2b],[<*b3,b1*>,and2b]*>,nor3];

:: GFACIRC1:funcnot 52 => GFACIRC1:func 52
definition
  let a1, a2, a3 be set;
  func BitGFA3AdderOutput(A1,A2,A3) -> Element of InnerVertices BitGFA3Str(a1,a2,a3) equals
    2GatesCircOutput(a1,a2,a3,xor2);
end;

:: GFACIRC1:def 52
theorem
for b1, b2, b3 being set holds
BitGFA3AdderOutput(b1,b2,b3) = 2GatesCircOutput(b1,b2,b3,xor2);

:: GFACIRC1:th 158
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2] &
      b1 <> [<*b2,b3*>,and2b] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2b]
for b4 being Element of product the Sorts of BitGFA3Circ(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)) . GFA3AdderOutput(b1,b2,b3) = 'not' ((('not' b5) 'xor' 'not' b6) 'xor' 'not' b7) &
    (Following(b4,2)) . GFA3CarryOutput(b1,b2,b3) = 'not' (((('not' b5) '&' 'not' b6) 'or' (('not' b6) '&' 'not' b7)) 'or' (('not' b7) '&' 'not' b5));

:: GFACIRC1:th 159
theorem
for b1, b2, b3 being set
   st b3 <> [<*b1,b2*>,xor2] &
      b1 <> [<*b2,b3*>,and2b] &
      b2 <> [<*b3,b1*>,and2b] &
      b3 <> [<*b1,b2*>,and2b]
for b4 being Element of product the Sorts of BitGFA3Circ(b1,b2,b3) holds
   Following(b4,2) is stable(BitGFA3Str(b1,b2,b3), BitGFA3Circ(b1,b2,b3));