:: BINARITH semantic presentation
Lemma1:
for b1, b2 being Nat holds addnat . b1,b2 = b1 + b2
by BINOP_2:def 23;
theorem Th1: :: BINARITH:1
canceled;
theorem Th2: :: BINARITH:2
theorem Th3: :: BINARITH:3
theorem Th4: :: BINARITH:4
canceled;
theorem Th5: :: BINARITH:5
:: deftheorem Def1 defines 'or' BINARITH:def 1 :
:: deftheorem Def2 defines 'xor' BINARITH:def 2 :
theorem Th6: :: BINARITH:6
canceled;
theorem Th7: :: BINARITH:7
theorem Th8: :: BINARITH:8
canceled;
theorem Th9: :: BINARITH:9
theorem Th10: :: BINARITH:10
theorem Th11: :: BINARITH:11
canceled;
theorem Th12: :: BINARITH:12
theorem Th13: :: BINARITH:13
theorem Th14: :: BINARITH:14
theorem Th15: :: BINARITH:15
theorem Th16: :: BINARITH:16
theorem Th17: :: BINARITH:17
theorem Th18: :: BINARITH:18
theorem Th19: :: BINARITH:19
theorem Th20: :: BINARITH:20
theorem Th21: :: BINARITH:21
theorem Th22: :: BINARITH:22
theorem Th23: :: BINARITH:23
theorem Th24: :: BINARITH:24
theorem Th25: :: BINARITH:25
theorem Th26: :: BINARITH:26
theorem Th27: :: BINARITH:27
theorem Th28: :: BINARITH:28
canceled;
theorem Th29: :: BINARITH:29
canceled;
theorem Th30: :: BINARITH:30
canceled;
theorem Th31: :: BINARITH:31
canceled;
theorem Th32: :: BINARITH:32
canceled;
theorem Th33: :: BINARITH:33
theorem Th34: :: BINARITH:34
proof
let c
1, c
2, c
3 be
boolean set ;
E18:
(('not' (('not' c1) '&' c2)) '&' ('not' (c1 '&' ('not' c2)))) '&' c
3 =
(c1 'or' ('not' c2)) '&' (c3 '&' (('not' c1) 'or' c2))
by MARGREL1:52
.=
(c1 'or' ('not' c2)) '&' ((c3 '&' ('not' c1)) 'or' (c3 '&' c2))
by Th22
.=
((c1 'or' ('not' c2)) '&' (c3 '&' ('not' c1))) 'or' ((c1 'or' ('not' c2)) '&' (c3 '&' c2))
by Th22
;
E19:
(c1 'or' ('not' c2)) '&' (c3 '&' ('not' c1)) =
((c3 '&' ('not' c1)) '&' c1) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by Th22
.=
(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 Th7
;
E20:
(c1 'or' ('not' c2)) '&' (c3 '&' c2) =
((c3 '&' c2) '&' c1) 'or' ((c3 '&' c2) '&' ('not' c2))
by Th22
.=
((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 Th7
;
((('not' c1) '&' c2) 'or' (c1 '&' ('not' c2))) '&' ('not' c3) =
(('not' c3) '&' (('not' c1) '&' c2)) 'or' (('not' c3) '&' (c1 '&' ('not' c2)))
by Th22
.=
((('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 E21:
(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 E18, E19, E20, Th20
.=
((((c3 '&' c2) '&' c1) 'or' ((('not' c3) '&' c1) '&' ('not' c2))) 'or' ((('not' c3) '&' ('not' c1)) '&' c2)) 'or' ((c3 '&' ('not' c1)) '&' ('not' c2))
by Th20
.=
((((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
;
E22: 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)))))
.=
(('not' c1) '&' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3)))) 'or' ((c1 '&' ('not' (('not' c2) '&' c3))) '&' ('not' (c2 '&' ('not' c3))))
by MARGREL1:52
;
E23:
('not' c1) '&' ((('not' c2) '&' c3) 'or' (c2 '&' ('not' c3))) =
(('not' c1) '&' (('not' c2) '&' c3)) 'or' (('not' c1) '&' (c2 '&' ('not' c3)))
by Th22
.=
((('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
;
E24:
'not' (('not' c2) '&' c3) =
('not' ('not' c2)) 'or' ('not' c3)
.=
c
2 'or' ('not' c3)
;
E25:
(c1 '&' ('not' (('not' c2) '&' c3))) '&' ('not' (c2 '&' ('not' c3))) =
(('not' c2) 'or' c3) '&' ((c1 '&' c2) 'or' (c1 '&' ('not' c3)))
by E24, Th22
.=
((('not' c2) 'or' c3) '&' (c1 '&' c2)) 'or' ((('not' c2) 'or' c3) '&' (c1 '&' ('not' c3)))
by Th22
;
E26:
(('not' c2) 'or' c3) '&' (c1 '&' c2) =
((c1 '&' c2) '&' ('not' c2)) 'or' ((c1 '&' c2) '&' c3)
by Th22
.=
(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 Th7
;
(('not' c2) 'or' c3) '&' (c1 '&' ('not' c3)) =
((c1 '&' ('not' c3)) '&' ('not' c2)) 'or' ((c1 '&' ('not' c3)) '&' c3)
by Th22
.=
((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 Th7
;
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 E22, E23, E25, E26, Th20
.=
((((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 E21;
end;
theorem Th35: :: BINARITH:35
theorem Th36: :: BINARITH:36
theorem Th37: :: BINARITH:37