:: BINARITH semantic presentation
E1:
for b1, b2 being Nat holds addnat . b1,b2 = b1 + b2
by BINOP_2:def 23;
theorem :: BINARITH:1
canceled;
theorem E2: :: BINARITH:2
theorem E3: :: BINARITH:3
theorem :: BINARITH:4
canceled;
theorem :: BINARITH:5
:: deftheorem defines 'or' BINARITH:def 1 :
:: deftheorem defines 'xor' BINARITH:def 2 :
theorem :: BINARITH:6
canceled;
theorem E4: :: BINARITH:7
theorem :: BINARITH:8
canceled;
theorem E5: :: BINARITH:9
theorem E6: :: BINARITH:10
theorem :: BINARITH:11
canceled;
theorem :: BINARITH:12
theorem :: BINARITH:13
theorem :: BINARITH:14
theorem E7: :: BINARITH:15
theorem E8: :: BINARITH:16
theorem E9: :: BINARITH:17
theorem E10: :: BINARITH:18
theorem E11: :: BINARITH:19
theorem E12: :: BINARITH:20
theorem E13: :: BINARITH:21
theorem E14: :: BINARITH:22
theorem E15: :: BINARITH:23
theorem :: BINARITH:24
theorem E16: :: BINARITH:25
theorem E17: :: BINARITH:26
theorem :: BINARITH:27
theorem :: BINARITH:28
canceled;
theorem :: BINARITH:29
canceled;
theorem :: BINARITH:30
canceled;
theorem :: BINARITH:31
canceled;
theorem :: BINARITH:32
canceled;
theorem E18: :: BINARITH:33
theorem E19: :: BINARITH:34
proof
let c
1, c
2, c
3 be
boolean set ;
E20:
(c1 'xor' c2) 'xor' c
3 =
((('not' c1) '&' c2) 'or' (c1 '&' ('not' c2))) 'xor' c
3
.=
(('not' ((('not' c1) '&' c2) 'or' (c1 '&' ('not' c2)))) '&' c3) 'or' (((('not' c1) '&' c2) 'or' (c1 '&' ('not' c2))) '&' ('not' c3))
.=
((('not' (('not' c1) '&' c2)) '&' ('not' (c1 '&' ('not' c2)))) '&' c3) 'or' (((('not' c1) '&' c2) 'or' (c1 '&' ('not' c2))) '&' ('not' c3))
by E6
;
E21:
'not' (('not' c1) '&' c2) =
('not' ('not' c1)) 'or' ('not' c2)
by E5
.=
c
1 'or' ('not' c2)
by MARGREL1:40
;
'not' (c1 '&' ('not' c2)) =
('not' c1) 'or' ('not' ('not' c2))
by E5
.=
('not' c1) 'or' c
2
by MARGREL1:40
;
then E22:
(('not' (('not' c1) '&' c2)) '&' ('not' (c1 '&' ('not' c2)))) '&' c
3 =
(c1 'or' ('not' c2)) '&' (c3 '&' (('not' c1) 'or' c2))
by E21, MARGREL1:52
.=
(c1 'or' ('not' c2)) '&' ((c3 '&' ('not' c1)) 'or' (c3 '&' c2))
by E14
.=
((c1 'or' ('not' c2)) '&' (c3 '&' ('not' c1))) 'or' ((c1 'or' ('not' c2)) '&' (c3 '&' c2))
by E14
;
E23:
(c1 'or' ('not' c2)) '&' (c3 '&' ('not' c1)) =
((c3 '&' ('not' c1)) '&' c1) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by E14
.=
(c3 '&' (('not' c1) '&' c1)) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by MARGREL1:52
.=
(c3 '&' FALSE ) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by MARGREL1:46
.=
FALSE 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by MARGREL1:49
.=
(c3 '&' ('not' c1)) '&' ('not' c2)
by E4
;
E24:
(c1 'or' ('not' c2)) '&' (c3 '&' c2) =
((c3 '&' c2) '&' c1) 'or' ((c3 '&' c2) '&' ('not' c2))
by E14
.=
((c3 '&' c2) '&' c1) 'or' (c3 '&' (c2 '&' ('not' c2)))
by MARGREL1:52
.=
((c3 '&' c2) '&' c1) 'or' (c3 '&' FALSE )
by MARGREL1:46
.=
((c3 '&' c2) '&' c1) 'or' FALSE
by MARGREL1:49
.=
(c3 '&' c2) '&' c
1
by E4
;
((('not' c1) '&' c2) 'or' (c1 '&' ('not' c2))) '&' ('not' c3) =
(('not' c3) '&' (('not' c1) '&' c2)) 'or' (('not' c3) '&' (c1 '&' ('not' c2)))
by E14
.=
((('not' c3) '&' ('not' c1)) '&' c2) 'or' (('not' c3) '&' (c1 '&' ('not' c2)))
by MARGREL1:52
.=
((('not' c3) '&' ('not' c1)) '&' c2) 'or' ((('not' c3) '&' c1) '&' ('not' c2))
by MARGREL1:52
;
then E25:
(c1 'xor' c2) 'xor' c
3 =
(((c3 '&' c2) '&' c1) 'or' (((('not' c3) '&' ('not' c1)) '&' c2) 'or' ((('not' c3) '&' c1) '&' ('not' c2)))) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by E20, E22, E23, E24, E12
.=
((((c3 '&' c2) '&' c1) 'or' ((('not' c3) '&' c1) '&' ('not' c2))) 'or' ((('not' c3) '&' ('not' c1)) '&' c2)) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by E12
.=
((((c1 '&' c2) '&' c3) 'or' ((('not' c3) '&' c1) '&' ('not' c2))) 'or' ((('not' c3) '&' ('not' c1)) '&' c2)) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by MARGREL1:52
.=
((((c1 '&' c2) '&' c3) 'or' ((c1 '&' ('not' c2)) '&' ('not' c3))) 'or' ((('not' c3) '&' ('not' c1)) '&' c2)) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by MARGREL1:52
.=
((((c1 '&' c2) '&' c3) 'or' ((c1 '&' ('not' c2)) '&' ('not' c3))) 'or' ((('not' c1) '&' c2) '&' ('not' c3))) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by MARGREL1:52
.=
((((c1 '&' c2) '&' c3) 'or' ((c1 '&' ('not' c2)) '&' ('not' c3))) 'or' ((('not' c1) '&' c2) '&' ('not' c3))) 'or' ((('not' c1) '&' ('not' c2)) '&' c3)
by MARGREL1:52
;
E26: c
1 'xor' (c2 'xor' c3) =
c
1 'xor' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3)))
.=
(('not' c1) '&' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3)))) 'or' (c1 '&' ('not' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3)))))
.=
(('not' c1) '&' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3)))) 'or' (c1 '&' (('not' (('not' c2) '&' c3)) '&' ('not' (c2 '&' ('not' c3)))))
by E6
.=
(('not' c1) '&' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3)))) 'or' ((c1 '&' ('not' (('not' c2) '&' c3))) '&' ('not' (c2 '&' ('not' c3))))
by MARGREL1:52
;
E27:
('not' c1) '&' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3))) =
(('not' c1) '&' (('not' c2) '&' c3)) 'or' (('not' c1) '&' (c2 '&' ('not' c3)))
by E14
.=
((('not' c1) '&' ('not' c2)) '&' c3) 'or' (('not' c1) '&' (c2 '&' ('not' c3)))
by MARGREL1:52
.=
((('not' c1) '&' ('not' c2)) '&' c3) 'or' ((('not' c1) '&' c2) '&' ('not' c3))
by MARGREL1:52
;
E28:
'not' (('not' c2) '&' c3) =
('not' ('not' c2)) 'or' ('not' c3)
by E5
.=
c
2 'or' ('not' c3)
by MARGREL1:40
;
'not' (c2 '&' ('not' c3)) =
('not' c2) 'or' ('not' ('not' c3))
by E5
.=
('not' c2) 'or' c
3
by MARGREL1:40
;
then E29:
(c1 '&' ('not' (('not' c2) '&' c3))) '&' ('not' (c2 '&' ('not' c3))) =
(('not' c2) 'or' c3) '&' ((c1 '&' c2) 'or' (c1 '&' ('not' c3)))
by E28, E14
.=
((('not' c2) 'or' c3) '&' (c1 '&' c2)) 'or' ((('not' c2) 'or' c3) '&' (c1 '&' ('not' c3)))
by E14
;
E30:
(('not' c2) 'or' c3) '&' (c1 '&' c2) =
((c1 '&' c2) '&' ('not' c2)) 'or' ((c1 '&' c2) '&' c3)
by E14
.=
(c1 '&' (c2 '&' ('not' c2))) 'or' ((c1 '&' c2) '&' c3)
by MARGREL1:52
.=
(c1 '&' FALSE ) 'or' ((c1 '&' c2) '&' c3)
by MARGREL1:46
.=
FALSE 'or' ((c1 '&' c2) '&' c3)
by MARGREL1:49
.=
(c1 '&' c2) '&' c
3
by E4
;
(('not' c2) 'or' c3) '&' (c1 '&' ('not' c3)) =
((c1 '&' ('not' c3)) '&' ('not' c2)) 'or' ((c1 '&' ('not' c3)) '&' c3)
by E14
.=
((c1 '&' ('not' c3)) '&' ('not' c2)) 'or' (c1 '&' (('not' c3) '&' c3))
by MARGREL1:52
.=
((c1 '&' ('not' c3)) '&' ('not' c2)) 'or' (c1 '&' FALSE )
by MARGREL1:46
.=
((c1 '&' ('not' c3)) '&' ('not' c2)) 'or' FALSE
by MARGREL1:49
.=
(c1 '&' ('not' c3)) '&' ('not' c2)
by E4
;
then c
1 'xor' (c2 'xor' c3) =
((((c1 '&' c2) '&' c3) 'or' ((c1 '&' ('not' c3)) '&' ('not' c2))) 'or' ((('not' c1) '&' c2) '&' ('not' c3))) 'or' ((('not' c1) '&' ('not' c2)) '&' c3)
by E26, E27, E29, E30, E12
.=
((((c1 '&' c2) '&' c3) 'or' ((c1 '&' ('not' c2)) '&' ('not' c3))) 'or' ((('not' c1) '&' c2) '&' ('not' c3))) 'or' ((('not' c1) '&' ('not' c2)) '&' c3)
by MARGREL1:52
;
hence
(c1 'xor' c2) 'xor' c
3 = c
1 'xor' (c2 'xor' c3)
by E25;
end;
theorem :: BINARITH:35