:: GATE_1 semantic presentation

notation
let c1 be set ;
antonym $ c1 for empty c1;
end;

theorem Th1: :: GATE_1:1
for b1 being set st b1 = {{} } holds
$ b1 ;

theorem Th2: :: GATE_1:2
ex b1 being set st $ b1
proof end;

definition
let c1 be set ;
func NOT1 c1 -> set equals :Def1: :: GATE_1:def 1
{} if $ a1
otherwise {{} };
correctness
coherence
( ( $ c1 implies {} is set ) & ( not $ c1 implies {{} } is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def1 defines NOT1 GATE_1:def 1 :
for b1 being set holds
( ( $ b1 implies NOT1 b1 = {} ) & ( not $ b1 implies NOT1 b1 = {{} } ) );

theorem Th3: :: GATE_1:3
canceled;

theorem Th4: :: GATE_1:4
for b1 being set holds
( $ NOT1 b1 iff not $ b1 ) by Def1;

theorem Th5: :: GATE_1:5
$ NOT1 {} by Th4;

definition
let c1, c2 be set ;
func AND2 c1,c2 -> set equals :Def2: :: GATE_1:def 2
NOT1 {} if ( $ a1 & $ a2 )
otherwise {} ;
correctness
coherence
( ( $ c1 & $ c2 implies NOT1 {} is set ) & ( ( not $ c1 or not $ c2 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def2 defines AND2 GATE_1:def 2 :
for b1, b2 being set holds
( ( $ b1 & $ b2 implies AND2 b1,b2 = NOT1 {} ) & ( ( not $ b1 or not $ b2 ) implies AND2 b1,b2 = {} ) );

theorem Th6: :: GATE_1:6
for b1, b2 being set holds
( $ AND2 b1,b2 iff ( $ b1 & $ b2 ) ) by Def2, Th5;

definition
let c1, c2 be set ;
func OR2 c1,c2 -> set equals :Def3: :: GATE_1:def 3
NOT1 {} if ( $ a1 or $ a2 )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 ) implies NOT1 {} is set ) & ( $ c1 or $ c2 or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def3 defines OR2 GATE_1:def 3 :
for b1, b2 being set holds
( ( ( $ b1 or $ b2 ) implies OR2 b1,b2 = NOT1 {} ) & ( $ b1 or $ b2 or OR2 b1,b2 = {} ) );

theorem Th7: :: GATE_1:7
for b1, b2 being set holds
( ( $ b1 or $ b2 ) iff $ OR2 b1,b2 ) by Def3, Th5;

definition
let c1, c2 be set ;
func XOR2 c1,c2 -> set equals :Def4: :: GATE_1:def 4
NOT1 {} if ( ( $ a1 & not $ a2 ) or ( not $ a1 & $ a2 ) )
otherwise {} ;
correctness
coherence
( ( ( ( $ c1 & not $ c2 ) or ( not $ c1 & $ c2 ) ) implies NOT1 {} is set ) & ( ( $ c1 & not $ c2 ) or ( not $ c1 & $ c2 ) or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def4 defines XOR2 GATE_1:def 4 :
for b1, b2 being set holds
( ( ( ( $ b1 & not $ b2 ) or ( not $ b1 & $ b2 ) ) implies XOR2 b1,b2 = NOT1 {} ) & ( ( $ b1 & not $ b2 ) or ( not $ b1 & $ b2 ) or XOR2 b1,b2 = {} ) );

theorem Th8: :: GATE_1:8
for b1, b2 being set holds
( ( ( $ b1 & not $ b2 ) or ( not $ b1 & $ b2 ) ) iff $ XOR2 b1,b2 ) by Def4, Th5;

theorem Th9: :: GATE_1:9
for b1 being set holds
( contradiction iff $ XOR2 b1,b1 )
proof end;

theorem Th10: :: GATE_1:10
for b1 being set holds
( $ XOR2 b1,{} iff $ b1 ) by Def4, Th5;

theorem Th11: :: GATE_1:11
for b1, b2 being set holds
( $ XOR2 b1,b2 iff $ XOR2 b2,b1 )
proof end;

definition
let c1, c2 be set ;
func EQV2 c1,c2 -> set equals :Def5: :: GATE_1:def 5
NOT1 {} if ( $ a1 iff $ a2 )
otherwise {} ;
correctness
coherence
( not ( ( $ c1 implies $ c2 ) & ( $ c2 implies $ c1 ) & NOT1 {} is not set ) & ( ( ( $ c1 & not $ c2 ) or ( $ c2 & not $ c1 ) ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def5 defines EQV2 GATE_1:def 5 :
for b1, b2 being set holds
( not ( ( $ b1 implies $ b2 ) & ( $ b2 implies $ b1 ) & not EQV2 b1,b2 = NOT1 {} ) & ( ( ( $ b1 & not $ b2 ) or ( $ b2 & not $ b1 ) ) implies EQV2 b1,b2 = {} ) );

theorem Th12: :: GATE_1:12
for b1, b2 being set holds
( $ EQV2 b1,b2 iff ( $ b1 iff $ b2 ) ) by Def5, Th5;

theorem Th13: :: GATE_1:13
for b1, b2 being set holds
( $ EQV2 b1,b2 iff not $ XOR2 b1,b2 )
proof end;

definition
let c1, c2 be set ;
func NAND2 c1,c2 -> set equals :Def6: :: GATE_1:def 6
NOT1 {} if ( not $ a1 or not $ a2 )
otherwise {} ;
correctness
coherence
( ( ( not $ c1 or not $ c2 ) implies NOT1 {} is set ) & ( $ c1 & $ c2 implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def6 defines NAND2 GATE_1:def 6 :
for b1, b2 being set holds
( ( ( not $ b1 or not $ b2 ) implies NAND2 b1,b2 = NOT1 {} ) & ( $ b1 & $ b2 implies NAND2 b1,b2 = {} ) );

theorem Th14: :: GATE_1:14
for b1, b2 being set holds
( $ NAND2 b1,b2 & $ b1 iff not $ b2 ) by Def6, Th5;

definition
let c1, c2 be set ;
func NOR2 c1,c2 -> set equals :Def7: :: GATE_1:def 7
NOT1 {} if ( not $ a1 & not $ a2 )
otherwise {} ;
correctness
coherence
( ( $ c1 or $ c2 or NOT1 {} is set ) & ( ( $ c1 or $ c2 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def7 defines NOR2 GATE_1:def 7 :
for b1, b2 being set holds
( ( $ b1 or $ b2 or NOR2 b1,b2 = NOT1 {} ) & ( ( $ b1 or $ b2 ) implies NOR2 b1,b2 = {} ) );

theorem Th15: :: GATE_1:15
for b1, b2 being set holds
( $ NOR2 b1,b2 iff ( not $ b1 & not $ b2 ) ) by Def7, Th5;

definition
let c1, c2, c3 be set ;
func AND3 c1,c2,c3 -> set equals :Def8: :: GATE_1:def 8
NOT1 {} if ( $ a1 & $ a2 & $ a3 )
otherwise {} ;
correctness
coherence
( ( $ c1 & $ c2 & $ c3 implies NOT1 {} is set ) & ( ( not $ c1 or not $ c2 or not $ c3 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def8 defines AND3 GATE_1:def 8 :
for b1, b2, b3 being set holds
( ( $ b1 & $ b2 & $ b3 implies AND3 b1,b2,b3 = NOT1 {} ) & ( ( not $ b1 or not $ b2 or not $ b3 ) implies AND3 b1,b2,b3 = {} ) );

theorem Th16: :: GATE_1:16
for b1, b2, b3 being set holds
( $ AND3 b1,b2,b3 iff ( $ b1 & $ b2 & $ b3 ) ) by Def8, Th5;

definition
let c1, c2, c3 be set ;
func OR3 c1,c2,c3 -> set equals :Def9: :: GATE_1:def 9
NOT1 {} if ( $ a1 or $ a2 or $ a3 )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 or $ c3 ) implies NOT1 {} is set ) & ( $ c1 or $ c2 or $ c3 or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def9 defines OR3 GATE_1:def 9 :
for b1, b2, b3 being set holds
( ( ( $ b1 or $ b2 or $ b3 ) implies OR3 b1,b2,b3 = NOT1 {} ) & ( $ b1 or $ b2 or $ b3 or OR3 b1,b2,b3 = {} ) );

theorem Th17: :: GATE_1:17
for b1, b2, b3 being set holds
( ( $ b1 or $ b2 or $ b3 ) iff $ OR3 b1,b2,b3 ) by Def9, Th5;

definition
let c1, c2, c3 be set ;
func XOR3 c1,c2,c3 -> set equals :Def10: :: GATE_1:def 10
NOT1 {} if ( ( ( ( $ a1 & not $ a2 ) or ( not $ a1 & $ a2 ) ) & not $ a3 ) or ( not ( $ a1 & not $ a2 ) & not ( not $ a1 & $ a2 ) & $ a3 ) )
otherwise {} ;
correctness
coherence
( ( ( ( ( ( $ c1 & not $ c2 ) or ( not $ c1 & $ c2 ) ) & not $ c3 ) or ( not ( $ c1 & not $ c2 ) & not ( not $ c1 & $ c2 ) & $ c3 ) ) implies NOT1 {} is set ) & ( ( ( ( $ c1 & not $ c2 ) or ( not $ c1 & $ c2 ) ) & not $ c3 ) or ( not ( $ c1 & not $ c2 ) & not ( not $ c1 & $ c2 ) & $ c3 ) or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def10 defines XOR3 GATE_1:def 10 :
for b1, b2, b3 being set holds
( ( ( ( ( ( $ b1 & not $ b2 ) or ( not $ b1 & $ b2 ) ) & not $ b3 ) or ( not ( $ b1 & not $ b2 ) & not ( not $ b1 & $ b2 ) & $ b3 ) ) implies XOR3 b1,b2,b3 = NOT1 {} ) & ( ( ( ( $ b1 & not $ b2 ) or ( not $ b1 & $ b2 ) ) & not $ b3 ) or ( not ( $ b1 & not $ b2 ) & not ( not $ b1 & $ b2 ) & $ b3 ) or XOR3 b1,b2,b3 = {} ) );

theorem Th18: :: GATE_1:18
for b1, b2, b3 being set holds
( ( ( ( ( $ b1 & not $ b2 ) or ( not $ b1 & $ b2 ) ) & not $ b3 ) or ( not ( $ b1 & not $ b2 ) & not ( not $ b1 & $ b2 ) & $ b3 ) ) iff $ XOR3 b1,b2,b3 ) by Def10, Th5;

definition
let c1, c2, c3 be set ;
func MAJ3 c1,c2,c3 -> set equals :Def11: :: GATE_1:def 11
NOT1 {} if ( ( $ a1 & $ a2 ) or ( $ a2 & $ a3 ) or ( $ a3 & $ a1 ) )
otherwise {} ;
correctness
coherence
( ( ( ( $ c1 & $ c2 ) or ( $ c2 & $ c3 ) or ( $ c3 & $ c1 ) ) implies NOT1 {} is set ) & ( ( $ c1 & $ c2 ) or ( $ c2 & $ c3 ) or ( $ c3 & $ c1 ) or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def11 defines MAJ3 GATE_1:def 11 :
for b1, b2, b3 being set holds
( ( ( ( $ b1 & $ b2 ) or ( $ b2 & $ b3 ) or ( $ b3 & $ b1 ) ) implies MAJ3 b1,b2,b3 = NOT1 {} ) & ( ( $ b1 & $ b2 ) or ( $ b2 & $ b3 ) or ( $ b3 & $ b1 ) or MAJ3 b1,b2,b3 = {} ) );

theorem Th19: :: GATE_1:19
for b1, b2, b3 being set holds
( ( ( $ b1 & $ b2 ) or ( $ b2 & $ b3 ) or ( $ b3 & $ b1 ) ) iff $ MAJ3 b1,b2,b3 ) by Def11, Th5;

definition
let c1, c2, c3 be set ;
func NAND3 c1,c2,c3 -> set equals :Def12: :: GATE_1:def 12
NOT1 {} if ( not $ a1 or not $ a2 or not $ a3 )
otherwise {} ;
correctness
coherence
( ( ( not $ c1 or not $ c2 or not $ c3 ) implies NOT1 {} is set ) & ( $ c1 & $ c2 & $ c3 implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def12 defines NAND3 GATE_1:def 12 :
for b1, b2, b3 being set holds
( ( ( not $ b1 or not $ b2 or not $ b3 ) implies NAND3 b1,b2,b3 = NOT1 {} ) & ( $ b1 & $ b2 & $ b3 implies NAND3 b1,b2,b3 = {} ) );

theorem Th20: :: GATE_1:20
for b1, b2, b3 being set holds
( $ NAND3 b1,b2,b3 & $ b1 & $ b2 iff not $ b3 ) by Def12, Th5;

definition
let c1, c2, c3 be set ;
func NOR3 c1,c2,c3 -> set equals :Def13: :: GATE_1:def 13
NOT1 {} if ( not $ a1 & not $ a2 & not $ a3 )
otherwise {} ;
correctness
coherence
( ( $ c1 or $ c2 or $ c3 or NOT1 {} is set ) & ( ( $ c1 or $ c2 or $ c3 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def13 defines NOR3 GATE_1:def 13 :
for b1, b2, b3 being set holds
( ( $ b1 or $ b2 or $ b3 or NOR3 b1,b2,b3 = NOT1 {} ) & ( ( $ b1 or $ b2 or $ b3 ) implies NOR3 b1,b2,b3 = {} ) );

theorem Th21: :: GATE_1:21
for b1, b2, b3 being set holds
( $ NOR3 b1,b2,b3 iff ( not $ b1 & not $ b2 & not $ b3 ) ) by Def13, Th5;

definition
let c1, c2, c3, c4 be set ;
func AND4 c1,c2,c3,c4 -> set equals :Def14: :: GATE_1:def 14
NOT1 {} if ( $ a1 & $ a2 & $ a3 & $ a4 )
otherwise {} ;
correctness
coherence
( ( $ c1 & $ c2 & $ c3 & $ c4 implies NOT1 {} is set ) & ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def14 defines AND4 GATE_1:def 14 :
for b1, b2, b3, b4 being set holds
( ( $ b1 & $ b2 & $ b3 & $ b4 implies AND4 b1,b2,b3,b4 = NOT1 {} ) & ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 ) implies AND4 b1,b2,b3,b4 = {} ) );

theorem Th22: :: GATE_1:22
for b1, b2, b3, b4 being set holds
( $ AND4 b1,b2,b3,b4 iff ( $ b1 & $ b2 & $ b3 & $ b4 ) ) by Def14, Th5;

definition
let c1, c2, c3, c4 be set ;
func OR4 c1,c2,c3,c4 -> set equals :Def15: :: GATE_1:def 15
NOT1 {} if ( $ a1 or $ a2 or $ a3 or $ a4 )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 or $ c3 or $ c4 ) implies NOT1 {} is set ) & ( $ c1 or $ c2 or $ c3 or $ c4 or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def15 defines OR4 GATE_1:def 15 :
for b1, b2, b3, b4 being set holds
( ( ( $ b1 or $ b2 or $ b3 or $ b4 ) implies OR4 b1,b2,b3,b4 = NOT1 {} ) & ( $ b1 or $ b2 or $ b3 or $ b4 or OR4 b1,b2,b3,b4 = {} ) );

theorem Th23: :: GATE_1:23
for b1, b2, b3, b4 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 ) iff $ OR4 b1,b2,b3,b4 ) by Def15, Th5;

definition
let c1, c2, c3, c4 be set ;
func NAND4 c1,c2,c3,c4 -> set equals :Def16: :: GATE_1:def 16
NOT1 {} if ( not $ a1 or not $ a2 or not $ a3 or not $ a4 )
otherwise {} ;
correctness
coherence
( ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 ) implies NOT1 {} is set ) & ( $ c1 & $ c2 & $ c3 & $ c4 implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def16 defines NAND4 GATE_1:def 16 :
for b1, b2, b3, b4 being set holds
( ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 ) implies NAND4 b1,b2,b3,b4 = NOT1 {} ) & ( $ b1 & $ b2 & $ b3 & $ b4 implies NAND4 b1,b2,b3,b4 = {} ) );

theorem Th24: :: GATE_1:24
for b1, b2, b3, b4 being set holds
( $ NAND4 b1,b2,b3,b4 & $ b1 & $ b2 & $ b3 iff not $ b4 ) by Def16, Th5;

definition
let c1, c2, c3, c4 be set ;
func NOR4 c1,c2,c3,c4 -> set equals :Def17: :: GATE_1:def 17
NOT1 {} if ( not $ a1 & not $ a2 & not $ a3 & not $ a4 )
otherwise {} ;
correctness
coherence
( ( $ c1 or $ c2 or $ c3 or $ c4 or NOT1 {} is set ) & ( ( $ c1 or $ c2 or $ c3 or $ c4 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def17 defines NOR4 GATE_1:def 17 :
for b1, b2, b3, b4 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or NOR4 b1,b2,b3,b4 = NOT1 {} ) & ( ( $ b1 or $ b2 or $ b3 or $ b4 ) implies NOR4 b1,b2,b3,b4 = {} ) );

theorem Th25: :: GATE_1:25
for b1, b2, b3, b4 being set holds
( $ NOR4 b1,b2,b3,b4 iff ( not $ b1 & not $ b2 & not $ b3 & not $ b4 ) ) by Def17, Th5;

definition
let c1, c2, c3, c4, c5 be set ;
func AND5 c1,c2,c3,c4,c5 -> set equals :Def18: :: GATE_1:def 18
NOT1 {} if ( $ a1 & $ a2 & $ a3 & $ a4 & $ a5 )
otherwise {} ;
correctness
coherence
( ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 implies NOT1 {} is set ) & ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def18 defines AND5 GATE_1:def 18 :
for b1, b2, b3, b4, b5 being set holds
( ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 implies AND5 b1,b2,b3,b4,b5 = NOT1 {} ) & ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 ) implies AND5 b1,b2,b3,b4,b5 = {} ) );

theorem Th26: :: GATE_1:26
for b1, b2, b3, b4, b5 being set holds
( $ AND5 b1,b2,b3,b4,b5 iff ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 ) ) by Def18, Th5;

definition
let c1, c2, c3, c4, c5 be set ;
func OR5 c1,c2,c3,c4,c5 -> set equals :Def19: :: GATE_1:def 19
NOT1 {} if ( $ a1 or $ a2 or $ a3 or $ a4 or $ a5 )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 ) implies NOT1 {} is set ) & ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def19 defines OR5 GATE_1:def 19 :
for b1, b2, b3, b4, b5 being set holds
( ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 ) implies OR5 b1,b2,b3,b4,b5 = NOT1 {} ) & ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or OR5 b1,b2,b3,b4,b5 = {} ) );

theorem Th27: :: GATE_1:27
for b1, b2, b3, b4, b5 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 ) iff $ OR5 b1,b2,b3,b4,b5 ) by Def19, Th5;

definition
let c1, c2, c3, c4, c5 be set ;
func NAND5 c1,c2,c3,c4,c5 -> set equals :Def20: :: GATE_1:def 20
NOT1 {} if ( not $ a1 or not $ a2 or not $ a3 or not $ a4 or not $ a5 )
otherwise {} ;
correctness
coherence
( ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 ) implies NOT1 {} is set ) & ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def20 defines NAND5 GATE_1:def 20 :
for b1, b2, b3, b4, b5 being set holds
( ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 ) implies NAND5 b1,b2,b3,b4,b5 = NOT1 {} ) & ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 implies NAND5 b1,b2,b3,b4,b5 = {} ) );

theorem Th28: :: GATE_1:28
for b1, b2, b3, b4, b5 being set holds
( $ NAND5 b1,b2,b3,b4,b5 & $ b1 & $ b2 & $ b3 & $ b4 iff not $ b5 ) by Def20, Th5;

definition
let c1, c2, c3, c4, c5 be set ;
func NOR5 c1,c2,c3,c4,c5 -> set equals :Def21: :: GATE_1:def 21
NOT1 {} if ( not $ a1 & not $ a2 & not $ a3 & not $ a4 & not $ a5 )
otherwise {} ;
correctness
coherence
( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or NOT1 {} is set ) & ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def21 defines NOR5 GATE_1:def 21 :
for b1, b2, b3, b4, b5 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or NOR5 b1,b2,b3,b4,b5 = NOT1 {} ) & ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 ) implies NOR5 b1,b2,b3,b4,b5 = {} ) );

theorem Th29: :: GATE_1:29
for b1, b2, b3, b4, b5 being set holds
( $ NOR5 b1,b2,b3,b4,b5 iff ( not $ b1 & not $ b2 & not $ b3 & not $ b4 & not $ b5 ) ) by Def21, Th5;

definition
let c1, c2, c3, c4, c5, c6 be set ;
func AND6 c1,c2,c3,c4,c5,c6 -> set equals :Def22: :: GATE_1:def 22
NOT1 {} if ( $ a1 & $ a2 & $ a3 & $ a4 & $ a5 & $ a6 )
otherwise {} ;
correctness
coherence
( ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 & $ c6 implies NOT1 {} is set ) & ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 or not $ c6 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def22 defines AND6 GATE_1:def 22 :
for b1, b2, b3, b4, b5, b6 being set holds
( ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 implies AND6 b1,b2,b3,b4,b5,b6 = NOT1 {} ) & ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 or not $ b6 ) implies AND6 b1,b2,b3,b4,b5,b6 = {} ) );

theorem Th30: :: GATE_1:30
for b1, b2, b3, b4, b5, b6 being set holds
( $ AND6 b1,b2,b3,b4,b5,b6 iff ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 ) ) by Def22, Th5;

definition
let c1, c2, c3, c4, c5, c6 be set ;
func OR6 c1,c2,c3,c4,c5,c6 -> set equals :Def23: :: GATE_1:def 23
NOT1 {} if ( $ a1 or $ a2 or $ a3 or $ a4 or $ a5 or $ a6 )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 ) implies NOT1 {} is set ) & ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def23 defines OR6 GATE_1:def 23 :
for b1, b2, b3, b4, b5, b6 being set holds
( ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 ) implies OR6 b1,b2,b3,b4,b5,b6 = NOT1 {} ) & ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or OR6 b1,b2,b3,b4,b5,b6 = {} ) );

theorem Th31: :: GATE_1:31
for b1, b2, b3, b4, b5, b6 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 ) iff $ OR6 b1,b2,b3,b4,b5,b6 ) by Def23, Th5;

definition
let c1, c2, c3, c4, c5, c6 be set ;
func NAND6 c1,c2,c3,c4,c5,c6 -> set equals :Def24: :: GATE_1:def 24
NOT1 {} if ( not $ a1 or not $ a2 or not $ a3 or not $ a4 or not $ a5 or not $ a6 )
otherwise {} ;
correctness
coherence
( ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 or not $ c6 ) implies NOT1 {} is set ) & ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 & $ c6 implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def24 defines NAND6 GATE_1:def 24 :
for b1, b2, b3, b4, b5, b6 being set holds
( ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 or not $ b6 ) implies NAND6 b1,b2,b3,b4,b5,b6 = NOT1 {} ) & ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 implies NAND6 b1,b2,b3,b4,b5,b6 = {} ) );

theorem Th32: :: GATE_1:32
for b1, b2, b3, b4, b5, b6 being set holds
( $ NAND6 b1,b2,b3,b4,b5,b6 & $ b1 & $ b2 & $ b3 & $ b4 & $ b5 iff not $ b6 ) by Def24, Th5;

definition
let c1, c2, c3, c4, c5, c6 be set ;
func NOR6 c1,c2,c3,c4,c5,c6 -> set equals :Def25: :: GATE_1:def 25
NOT1 {} if ( not $ a1 & not $ a2 & not $ a3 & not $ a4 & not $ a5 & not $ a6 )
otherwise {} ;
correctness
coherence
( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or NOT1 {} is set ) & ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def25 defines NOR6 GATE_1:def 25 :
for b1, b2, b3, b4, b5, b6 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or NOR6 b1,b2,b3,b4,b5,b6 = NOT1 {} ) & ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 ) implies NOR6 b1,b2,b3,b4,b5,b6 = {} ) );

theorem Th33: :: GATE_1:33
for b1, b2, b3, b4, b5, b6 being set holds
( $ NOR6 b1,b2,b3,b4,b5,b6 iff ( not $ b1 & not $ b2 & not $ b3 & not $ b4 & not $ b5 & not $ b6 ) ) by Def25, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7 be set ;
func AND7 c1,c2,c3,c4,c5,c6,c7 -> set equals :Def26: :: GATE_1:def 26
NOT1 {} if ( $ a1 & $ a2 & $ a3 & $ a4 & $ a5 & $ a6 & $ a7 )
otherwise {} ;
correctness
coherence
( ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 & $ c6 & $ c7 implies NOT1 {} is set ) & ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 or not $ c6 or not $ c7 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def26 defines AND7 GATE_1:def 26 :
for b1, b2, b3, b4, b5, b6, b7 being set holds
( ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 & $ b7 implies AND7 b1,b2,b3,b4,b5,b6,b7 = NOT1 {} ) & ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 or not $ b6 or not $ b7 ) implies AND7 b1,b2,b3,b4,b5,b6,b7 = {} ) );

theorem Th34: :: GATE_1:34
for b1, b2, b3, b4, b5, b6, b7 being set holds
( $ AND7 b1,b2,b3,b4,b5,b6,b7 iff ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 & $ b7 ) ) by Def26, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7 be set ;
func OR7 c1,c2,c3,c4,c5,c6,c7 -> set equals :Def27: :: GATE_1:def 27
NOT1 {} if ( $ a1 or $ a2 or $ a3 or $ a4 or $ a5 or $ a6 or $ a7 )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 ) implies NOT1 {} is set ) & ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def27 defines OR7 GATE_1:def 27 :
for b1, b2, b3, b4, b5, b6, b7 being set holds
( ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 ) implies OR7 b1,b2,b3,b4,b5,b6,b7 = NOT1 {} ) & ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 or OR7 b1,b2,b3,b4,b5,b6,b7 = {} ) );

theorem Th35: :: GATE_1:35
for b1, b2, b3, b4, b5, b6, b7 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 ) iff $ OR7 b1,b2,b3,b4,b5,b6,b7 ) by Def27, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7 be set ;
func NAND7 c1,c2,c3,c4,c5,c6,c7 -> set equals :Def28: :: GATE_1:def 28
NOT1 {} if ( not $ a1 or not $ a2 or not $ a3 or not $ a4 or not $ a5 or not $ a6 or not $ a7 )
otherwise {} ;
correctness
coherence
( ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 or not $ c6 or not $ c7 ) implies NOT1 {} is set ) & ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 & $ c6 & $ c7 implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def28 defines NAND7 GATE_1:def 28 :
for b1, b2, b3, b4, b5, b6, b7 being set holds
( ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 or not $ b6 or not $ b7 ) implies NAND7 b1,b2,b3,b4,b5,b6,b7 = NOT1 {} ) & ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 & $ b7 implies NAND7 b1,b2,b3,b4,b5,b6,b7 = {} ) );

theorem Th36: :: GATE_1:36
for b1, b2, b3, b4, b5, b6, b7 being set holds
( $ NAND7 b1,b2,b3,b4,b5,b6,b7 & $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 iff not $ b7 ) by Def28, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7 be set ;
func NOR7 c1,c2,c3,c4,c5,c6,c7 -> set equals :Def29: :: GATE_1:def 29
NOT1 {} if ( not $ a1 & not $ a2 & not $ a3 & not $ a4 & not $ a5 & not $ a6 & not $ a7 )
otherwise {} ;
correctness
coherence
( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 or NOT1 {} is set ) & ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def29 defines NOR7 GATE_1:def 29 :
for b1, b2, b3, b4, b5, b6, b7 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 or NOR7 b1,b2,b3,b4,b5,b6,b7 = NOT1 {} ) & ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 ) implies NOR7 b1,b2,b3,b4,b5,b6,b7 = {} ) );

theorem Th37: :: GATE_1:37
for b1, b2, b3, b4, b5, b6, b7 being set holds
( $ NOR7 b1,b2,b3,b4,b5,b6,b7 iff ( not $ b1 & not $ b2 & not $ b3 & not $ b4 & not $ b5 & not $ b6 & not $ b7 ) ) by Def29, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7, c8 be set ;
func AND8 c1,c2,c3,c4,c5,c6,c7,c8 -> set equals :Def30: :: GATE_1:def 30
NOT1 {} if ( $ a1 & $ a2 & $ a3 & $ a4 & $ a5 & $ a6 & $ a7 & $ a8 )
otherwise {} ;
correctness
coherence
( ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 & $ c6 & $ c7 & $ c8 implies NOT1 {} is set ) & ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 or not $ c6 or not $ c7 or not $ c8 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def30 defines AND8 GATE_1:def 30 :
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 & $ b7 & $ b8 implies AND8 b1,b2,b3,b4,b5,b6,b7,b8 = NOT1 {} ) & ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 or not $ b6 or not $ b7 or not $ b8 ) implies AND8 b1,b2,b3,b4,b5,b6,b7,b8 = {} ) );

theorem Th38: :: GATE_1:38
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( $ AND8 b1,b2,b3,b4,b5,b6,b7,b8 iff ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 & $ b7 & $ b8 ) ) by Def30, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7, c8 be set ;
func OR8 c1,c2,c3,c4,c5,c6,c7,c8 -> set equals :Def31: :: GATE_1:def 31
NOT1 {} if ( $ a1 or $ a2 or $ a3 or $ a4 or $ a5 or $ a6 or $ a7 or $ a8 )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 or $ c8 ) implies NOT1 {} is set ) & ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 or $ c8 or {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def31 defines OR8 GATE_1:def 31 :
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 or $ b8 ) implies OR8 b1,b2,b3,b4,b5,b6,b7,b8 = NOT1 {} ) & ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 or $ b8 or OR8 b1,b2,b3,b4,b5,b6,b7,b8 = {} ) );

theorem Th39: :: GATE_1:39
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 or $ b8 ) iff $ OR8 b1,b2,b3,b4,b5,b6,b7,b8 ) by Def31, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7, c8 be set ;
func NAND8 c1,c2,c3,c4,c5,c6,c7,c8 -> set equals :Def32: :: GATE_1:def 32
NOT1 {} if ( not $ a1 or not $ a2 or not $ a3 or not $ a4 or not $ a5 or not $ a6 or not $ a7 or not $ a8 )
otherwise {} ;
correctness
coherence
( ( ( not $ c1 or not $ c2 or not $ c3 or not $ c4 or not $ c5 or not $ c6 or not $ c7 or not $ c8 ) implies NOT1 {} is set ) & ( $ c1 & $ c2 & $ c3 & $ c4 & $ c5 & $ c6 & $ c7 & $ c8 implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def32 defines NAND8 GATE_1:def 32 :
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( ( ( not $ b1 or not $ b2 or not $ b3 or not $ b4 or not $ b5 or not $ b6 or not $ b7 or not $ b8 ) implies NAND8 b1,b2,b3,b4,b5,b6,b7,b8 = NOT1 {} ) & ( $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 & $ b7 & $ b8 implies NAND8 b1,b2,b3,b4,b5,b6,b7,b8 = {} ) );

theorem Th40: :: GATE_1:40
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( $ NAND8 b1,b2,b3,b4,b5,b6,b7,b8 & $ b1 & $ b2 & $ b3 & $ b4 & $ b5 & $ b6 & $ b7 iff not $ b8 ) by Def32, Th5;

definition
let c1, c2, c3, c4, c5, c6, c7, c8 be set ;
func NOR8 c1,c2,c3,c4,c5,c6,c7,c8 -> set equals :Def33: :: GATE_1:def 33
NOT1 {} if ( not $ a1 & not $ a2 & not $ a3 & not $ a4 & not $ a5 & not $ a6 & not $ a7 & not $ a8 )
otherwise {} ;
correctness
coherence
( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 or $ c8 or NOT1 {} is set ) & ( ( $ c1 or $ c2 or $ c3 or $ c4 or $ c5 or $ c6 or $ c7 or $ c8 ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def33 defines NOR8 GATE_1:def 33 :
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 or $ b8 or NOR8 b1,b2,b3,b4,b5,b6,b7,b8 = NOT1 {} ) & ( ( $ b1 or $ b2 or $ b3 or $ b4 or $ b5 or $ b6 or $ b7 or $ b8 ) implies NOR8 b1,b2,b3,b4,b5,b6,b7,b8 = {} ) );

theorem Th41: :: GATE_1:41
for b1, b2, b3, b4, b5, b6, b7, b8 being set holds
( $ NOR8 b1,b2,b3,b4,b5,b6,b7,b8 iff ( not $ b1 & not $ b2 & not $ b3 & not $ b4 & not $ b5 & not $ b6 & not $ b7 & not $ b8 ) ) by Def33, Th5;

theorem Th42: :: GATE_1:42
for b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19 being set st ( $ MAJ3 b2,b6,b1 implies $ b10 ) & ( $ MAJ3 b3,b7,b10 implies $ b11 ) & ( $ MAJ3 b4,b8,b11 implies $ b12 ) & ( $ MAJ3 b5,b9,b12 implies $ b13 ) & ( $ b14 implies $ OR2 b2,b6 ) & ( $ b15 implies $ OR2 b3,b7 ) & ( $ b16 implies $ OR2 b4,b8 ) & ( $ b17 implies $ OR2 b5,b9 ) & ( $ b18 implies $ AND5 b1,b14,b15,b16,b17 ) & ( $ b19 implies $ OR2 b13,b18 ) & ( $ OR2 b13,b18 implies $ b19 ) holds
( $ b13 iff $ b19 )
proof end;

definition
let c1, c2 be set ;
func MODADD2 c1,c2 -> set equals :Def34: :: GATE_1:def 34
NOT1 {} if ( ( $ a1 or $ a2 ) & ( not $ a1 or not $ a2 ) )
otherwise {} ;
correctness
coherence
( ( ( $ c1 or $ c2 ) & ( not $ c1 or not $ c2 ) implies NOT1 {} is set ) & ( ( ( not $ c1 & not $ c2 ) or ( $ c1 & $ c2 ) ) implies {} is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def34 defines MODADD2 GATE_1:def 34 :
for b1, b2 being set holds
( ( ( $ b1 or $ b2 ) & ( not $ b1 or not $ b2 ) implies MODADD2 b1,b2 = NOT1 {} ) & ( ( ( not $ b1 & not $ b2 ) or ( $ b1 & $ b2 ) ) implies MODADD2 b1,b2 = {} ) );

theorem Th43: :: GATE_1:43
for b1, b2 being set holds
( $ MODADD2 b1,b2 iff ( ( $ b1 or $ b2 ) & ( not $ b1 or not $ b2 ) ) ) by Def34, Th5;

notation
let c1, c2, c3 be set ;
synonym ADD1 c1,c2,c3 for XOR3 c1,c2,c3;
synonym CARR1 c1,c2,c3 for MAJ3 c1,c2,c3;
end;

definition
let c1, c2, c3, c4, c5 be set ;
canceled;
canceled;
func ADD2 c3,c4,c1,c2,c5 -> set equals :: GATE_1:def 37
XOR3 a3,a4,(CARR1 a1,a2,a5);
correctness
coherence
XOR3 c3,c4,(CARR1 c1,c2,c5) is set
;
;
end;

:: deftheorem Def35 GATE_1:def 35 :
canceled;

:: deftheorem Def36 GATE_1:def 36 :
canceled;

:: deftheorem Def37 defines ADD2 GATE_1:def 37 :
for b1, b2, b3, b4, b5 being set holds ADD2 b3,b4,b1,b2,b5 = XOR3 b3,b4,(CARR1 b1,b2,b5);

definition
let c1, c2, c3, c4, c5 be set ;
func CARR2 c3,c4,c1,c2,c5 -> set equals :: GATE_1:def 38
MAJ3 a3,a4,(CARR1 a1,a2,a5);
correctness
coherence
MAJ3 c3,c4,(CARR1 c1,c2,c5) is set
;
;
end;

:: deftheorem Def38 defines CARR2 GATE_1:def 38 :
for b1, b2, b3, b4, b5 being set holds CARR2 b3,b4,b1,b2,b5 = MAJ3 b3,b4,(CARR1 b1,b2,b5);

definition
let c1, c2, c3, c4, c5, c6, c7 be set ;
func ADD3 c5,c6,c3,c4,c1,c2,c7 -> set equals :: GATE_1:def 39
XOR3 a5,a6,(CARR2 a3,a4,a1,a2,a7);
correctness
coherence
XOR3 c5,c6,(CARR2 c3,c4,c1,c2,c7) is set
;
;
end;

:: deftheorem Def39 defines ADD3 GATE_1:def 39 :
for b1, b2, b3, b4, b5, b6, b7 being set holds ADD3 b5,b6,b3,b4,b1,b2,b7 = XOR3 b5,b6,(CARR2 b3,b4,b1,b2,b7);

definition
let c1, c2, c3, c4, c5, c6, c7 be set ;
func CARR3 c5,c6,c3,c4,c1,c2,c7 -> set equals :: GATE_1:def 40
MAJ3 a5,a6,(CARR2 a3,a4,a1,a2,a7);
correctness
coherence
MAJ3 c5,c6,(CARR2 c3,c4,c1,c2,c7) is set
;
;
end;

:: deftheorem Def40 defines CARR3 GATE_1:def 40 :
for b1, b2, b3, b4, b5, b6, b7 being set holds CARR3 b5,b6,b3,b4,b1,b2,b7 = MAJ3 b5,b6,(CARR2 b3,b4,b1,b2,b7);

definition
let c1, c2, c3, c4, c5, c6, c7, c8, c9 be set ;
func ADD4 c7,c8,c5,c6,c3,c4,c1,c2,c9 -> set equals :: GATE_1:def 41
XOR3 a7,a8,(CARR3 a5,a6,a3,a4,a1,a2,a9);
correctness
coherence
XOR3 c7,c8,(CARR3 c5,c6,c3,c4,c1,c2,c9) is set
;
;
end;

:: deftheorem Def41 defines ADD4 GATE_1:def 41 :
for b1, b2, b3, b4, b5, b6, b7, b8, b9 being set holds ADD4 b7,b8,b5,b6,b3,b4,b1,b2,b9 = XOR3 b7,b8,(CARR3 b5,b6,b3,b4,b1,b2,b9);

definition
let c1, c2, c3, c4, c5, c6, c7, c8, c9 be set ;
func CARR4 c7,c8,c5,c6,c3,c4,c1,c2,c9 -> set equals :: GATE_1:def 42
MAJ3 a7,a8,(CARR3 a5,a6,a3,a4,a1,a2,a9);
correctness
coherence
MAJ3 c7,c8,(CARR3 c5,c6,c3,c4,c1,c2,c9) is set
;
;
end;

:: deftheorem Def42 defines CARR4 GATE_1:def 42 :
for b1, b2, b3, b4, b5, b6, b7, b8, b9 being set holds CARR4 b7,b8,b5,b6,b3,b4,b1,b2,b9 = MAJ3 b7,b8,(CARR3 b5,b6,b3,b4,b1,b2,b9);

theorem Th44: :: GATE_1:44
for b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, b40, b41 being set holds
not ( ( $ b11 implies $ NOR2 b2,b3 ) & ( $ NOR2 b2,b3 implies $ b11 ) & ( $ b12 implies $ NAND2 b2,b3 ) & ( $ NAND2 b2,b3 implies $ b12 ) & ( $ b13 implies $ MODADD2 b2,b3 ) & ( $ MODADD2 b2,b3 implies $ b13 ) & ( $ b14 implies $ NOR2 b4,b5 ) & ( $ NOR2 b4,b5 implies $ b14 ) & ( $ b15 implies $ NAND2 b4,b5 ) & ( $ NAND2 b4,b5 implies $ b15 ) & ( $ b16 implies $ MODADD2 b4,b5 ) & ( $ MODADD2 b4,b5 implies $ b16 ) & ( $ b17 implies $ NOR2 b6,b7 ) & ( $ NOR2 b6,b7 implies $ b17 ) & ( $ b18 implies $ NAND2 b6,b7 ) & ( $ NAND2 b6,b7 implies $ b18 ) & ( $ b19 implies $ MODADD2 b6,b7 ) & ( $ MODADD2 b6,b7 implies $ b19 ) & ( $ b20 implies $ NOR2 b8,b9 ) & ( $ NOR2 b8,b9 implies $ b20 ) & ( $ b21 implies $ NAND2 b8,b9 ) & ( $ NAND2 b8,b9 implies $ b21 ) & ( $ b22 implies $ MODADD2 b8,b9 ) & ( $ MODADD2 b8,b9 implies $ b22 ) & ( $ b23 implies $ NOT1 b1 ) & ( $ NOT1 b1 implies $ b23 ) & ( $ b24 implies $ NOT1 b23 ) & ( $ NOT1 b23 implies $ b24 ) & ( $ b38 implies $ XOR2 b24,b13 ) & ( $ XOR2 b24,b13 implies $ b38 ) & ( $ b25 implies $ AND2 b23,b12 ) & ( $ AND2 b23,b12 implies $ b25 ) & ( $ b26 implies $ NOR2 b25,b11 ) & ( $ NOR2 b25,b11 implies $ b26 ) & ( $ b39 implies $ XOR2 b26,b16 ) & ( $ XOR2 b26,b16 implies $ b39 ) & ( $ b27 implies $ AND2 b11,b15 ) & ( $ AND2 b11,b15 implies $ b27 ) & ( $ b28 implies $ AND3 b15,b12,b23 ) & ( $ AND3 b15,b12,b23 implies $ b28 ) & ( $ b29 implies $ NOR3 b27,b28,b14 ) & ( $ NOR3 b27,b28,b14 implies $ b29 ) & ( $ b40 implies $ XOR2 b29,b19 ) & ( $ XOR2 b29,b19 implies $ b40 ) & ( $ b30 implies $ AND2 b14,b18 ) & ( $ AND2 b14,b18 implies $ b30 ) & ( $ b31 implies $ AND3 b11,b18,b15 ) & ( $ AND3 b11,b18,b15 implies $ b31 ) & ( $ b32 implies $ AND4 b18,b15,b12,b23 ) & ( $ AND4 b18,b15,b12,b23 implies $ b32 ) & ( $ b33 implies $ NOR4 b30,b31,b32,b17 ) & ( $ NOR4 b30,b31,b32,b17 implies $ b33 ) & ( $ b41 implies $ XOR2 b33,b22 ) & ( $ XOR2 b33,b22 implies $ b41 ) & ( $ b34 implies $ AND2 b17,b21 ) & ( $ AND2 b17,b21 implies $ b34 ) & ( $ b35 implies $ AND3 b14,b21,b18 ) & ( $ AND3 b14,b21,b18 implies $ b35 ) & ( $ b36 implies $ AND4 b11,b21,b18,b15 ) & ( $ AND4 b11,b21,b18,b15 implies $ b36 ) & ( $ b37 implies $ AND5 b21,b18,b15,b12,b23 ) & ( $ AND5 b21,b18,b15,b12,b23 implies $ b37 ) & ( $ b10 implies $ NOR5 b20,b34,b35,b36,b37 ) & ( $ NOR5 b20,b34,b35,b36,b37 implies $ b10 ) & not ( ( $ b38 implies $ ADD1 b2,b3,b1 ) & ( $ ADD1 b2,b3,b1 implies $ b38 ) & ( $ b39 implies $ ADD2 b4,b5,b2,b3,b1 ) & ( $ ADD2 b4,b5,b2,b3,b1 implies $ b39 ) & ( $ b40 implies $ ADD3 b6,b7,b4,b5,b2,b3,b1 ) & ( $ ADD3 b6,b7,b4,b5,b2,b3,b1 implies $ b40 ) & ( $ b41 implies $ ADD4 b8,b9,b6,b7,b4,b5,b2,b3,b1 ) & ( $ ADD4 b8,b9,b6,b7,b4,b5,b2,b3,b1 implies $ b41 ) & ( $ b10 implies $ CARR4 b8,b9,b6,b7,b4,b5,b2,b3,b1 ) & ( $ CARR4 b8,b9,b6,b7,b4,b5,b2,b3,b1 implies $ b10 ) ) )
proof end;