:: BINARI_5 semantic presentation

definition
let c1, c2 be boolean set ;
func c1 'nand' c2 -> set equals :: BINARI_5:def 1
'not' (a1 '&' a2);
correctness
coherence
'not' (c1 '&' c2) is set
;
;
commutativity
for b1 being set
for b2, b3 being boolean set st b1 = 'not' (b2 '&' b3) holds
b1 = 'not' (b3 '&' b2)
;
end;

:: deftheorem Def1 defines 'nand' BINARI_5:def 1 :
for b1, b2 being boolean set holds b1 'nand' b2 = 'not' (b1 '&' b2);

registration
let c1, c2 be boolean set ;
cluster a1 'nand' a2 -> boolean ;
correctness
coherence
c1 'nand' c2 is boolean
;
;
end;

definition
let c1, c2 be Element of BOOLEAN ;
redefine func 'nand' as c1 'nand' c2 -> Element of BOOLEAN ;
correctness
coherence
c1 'nand' c2 is Element of BOOLEAN
;
by MARGREL1:def 15;
end;

definition
let c1, c2 be boolean set ;
func c1 'nor' c2 -> set equals :: BINARI_5:def 2
'not' (a1 'or' a2);
correctness
coherence
'not' (c1 'or' c2) is set
;
;
commutativity
for b1 being set
for b2, b3 being boolean set st b1 = 'not' (b2 'or' b3) holds
b1 = 'not' (b3 'or' b2)
;
end;

:: deftheorem Def2 defines 'nor' BINARI_5:def 2 :
for b1, b2 being boolean set holds b1 'nor' b2 = 'not' (b1 'or' b2);

registration
let c1, c2 be boolean set ;
cluster a1 'nor' a2 -> boolean ;
correctness
coherence
c1 'nor' c2 is boolean
;
;
end;

definition
let c1, c2 be Element of BOOLEAN ;
redefine func 'nor' as c1 'nor' c2 -> Element of BOOLEAN ;
correctness
coherence
c1 'nor' c2 is Element of BOOLEAN
;
by MARGREL1:def 15;
end;

definition
let c1, c2 be boolean set ;
func c1 'xnor' c2 -> set equals :: BINARI_5:def 3
'not' (a1 'xor' a2);
correctness
coherence
'not' (c1 'xor' c2) is set
;
;
commutativity
for b1 being set
for b2, b3 being boolean set st b1 = 'not' (b2 'xor' b3) holds
b1 = 'not' (b3 'xor' b2)
;
end;

:: deftheorem Def3 defines 'xnor' BINARI_5:def 3 :
for b1, b2 being boolean set holds b1 'xnor' b2 = 'not' (b1 'xor' b2);

registration
let c1, c2 be boolean set ;
cluster a1 'xnor' a2 -> boolean ;
correctness
coherence
c1 'xnor' c2 is boolean
;
;
end;

definition
let c1, c2 be Element of BOOLEAN ;
redefine func 'xnor' as c1 'xnor' c2 -> Element of BOOLEAN ;
correctness
coherence
c1 'xnor' c2 is Element of BOOLEAN
;
by MARGREL1:def 15;
end;

theorem Th1: :: BINARI_5:1
for b1 being boolean set holds TRUE 'nand' b1 = 'not' b1 by MARGREL1:50;

theorem Th2: :: BINARI_5:2
for b1 being boolean set holds FALSE 'nand' b1 = TRUE
proof end;

theorem Th3: :: BINARI_5:3
for b1 being boolean set holds
( b1 'nand' b1 = 'not' b1 & 'not' (b1 'nand' b1) = b1 )
proof end;

theorem Th4: :: BINARI_5:4
for b1, b2 being boolean set holds 'not' (b1 'nand' b2) = b1 '&' b2 by MARGREL1:40;

theorem Th5: :: BINARI_5:5
for b1 being boolean set holds
( b1 'nand' ('not' b1) = TRUE & 'not' (b1 'nand' ('not' b1)) = FALSE )
proof end;

theorem Th6: :: BINARI_5:6
for b1, b2, b3 being boolean set holds b1 'nand' (b2 '&' b3) = 'not' ((b1 '&' b2) '&' b3) by MARGREL1:52;

theorem Th7: :: BINARI_5:7
for b1, b2, b3 being boolean set holds b1 'nand' (b2 '&' b3) = (b1 '&' b2) 'nand' b3 by MARGREL1:52;

theorem Th8: :: BINARI_5:8
for b1, b2, b3 being boolean set holds b1 'nand' (b2 'or' b3) = ('not' (b1 '&' b2)) '&' ('not' (b1 '&' b3))
proof end;

theorem Th9: :: BINARI_5:9
for b1, b2, b3 being boolean set holds b1 'nand' (b2 'xor' b3) = (b1 '&' b2) 'eqv' (b1 '&' b3)
proof end;

theorem Th10: :: BINARI_5:10
for b1 being boolean set holds TRUE 'nor' b1 = FALSE
proof end;

theorem Th11: :: BINARI_5:11
for b1 being boolean set holds FALSE 'nor' b1 = 'not' b1 by BINARITH:7;

theorem Th12: :: BINARI_5:12
for b1 being boolean set holds
( b1 'nor' b1 = 'not' b1 & 'not' (b1 'nor' b1) = b1 )
proof end;

theorem Th13: :: BINARI_5:13
for b1, b2 being boolean set holds 'not' (b1 'nor' b2) = b1 'or' b2 by MARGREL1:40;

theorem Th14: :: BINARI_5:14
for b1 being boolean set holds
( b1 'nor' ('not' b1) = FALSE & 'not' (b1 'nor' ('not' b1)) = TRUE )
proof end;

theorem Th15: :: BINARI_5:15
for b1, b2, b3 being boolean set holds b1 'nor' (b2 '&' b3) = ('not' (b1 'or' b2)) 'or' ('not' (b1 'or' b3))
proof end;

theorem Th16: :: BINARI_5:16
for b1, b2, b3 being boolean set holds b1 'nor' (b2 'or' b3) = 'not' ((b1 'or' b2) 'or' b3) by BINARITH:20;

theorem Th17: :: BINARI_5:17
for b1 being boolean set holds TRUE 'xnor' b1 = b1
proof end;

theorem Th18: :: BINARI_5:18
for b1 being boolean set holds FALSE 'xnor' b1 = 'not' b1 by BINARITH:14;

theorem Th19: :: BINARI_5:19
for b1 being boolean set holds
( b1 'xnor' b1 = TRUE & 'not' (b1 'xnor' b1) = FALSE )
proof end;

theorem Th20: :: BINARI_5:20
for b1, b2 being boolean set holds 'not' (b1 'xnor' b2) = b1 'xor' b2 by MARGREL1:40;

theorem Th21: :: BINARI_5:21
for b1 being boolean set holds
( b1 'xnor' ('not' b1) = FALSE & 'not' (b1 'xnor' ('not' b1)) = TRUE )
proof end;

theorem Th22: :: BINARI_5:22
for b1, b2, b3 being boolean set holds
( b1 '<' b2 'imp' b3 iff b1 '&' b2 '<' b3 )
proof end;

theorem Th23: :: BINARI_5:23
for b1, b2 being boolean set holds b1 'eqv' b2 = (b1 'imp' b2) '&' (b2 'imp' b1)
proof end;

theorem Th24: :: BINARI_5:24
for b1, b2 being boolean set holds
( b1 'eqv' b2 = TRUE iff ( b1 'imp' b2 = TRUE & b2 'imp' b1 = TRUE ) )
proof end;

theorem Th25: :: BINARI_5:25
for b1, b2 being boolean set st b1 'imp' b2 = TRUE & b2 'imp' b1 = TRUE holds
b1 = b2
proof end;

theorem Th26: :: BINARI_5:26
for b1, b2, b3 being boolean set st b1 'imp' b2 = TRUE & b2 'imp' b3 = TRUE holds
b1 'imp' b3 = TRUE
proof end;

theorem Th27: :: BINARI_5:27
for b1, b2, b3 being boolean set st b1 'eqv' b2 = TRUE & b2 'eqv' b3 = TRUE holds
b1 'eqv' b3 = TRUE
proof end;

theorem Th28: :: BINARI_5:28
for b1, b2 being boolean set holds b1 'imp' b2 = ('not' b2) 'imp' ('not' b1)
proof end;

theorem Th29: :: BINARI_5:29
for b1, b2 being boolean set holds b1 'eqv' b2 = ('not' b1) 'eqv' ('not' b2)
proof end;

theorem Th30: :: BINARI_5:30
for b1, b2, b3, b4 being boolean set st b1 'eqv' b2 = TRUE & b3 'eqv' b4 = TRUE holds
(b1 '&' b3) 'eqv' (b2 '&' b4) = TRUE
proof end;

theorem Th31: :: BINARI_5:31
for b1, b2, b3, b4 being boolean set st b1 'eqv' b2 = TRUE & b3 'eqv' b4 = TRUE holds
(b1 'imp' b3) 'eqv' (b2 'imp' b4) = TRUE
proof end;

theorem Th32: :: BINARI_5:32
for b1, b2, b3, b4 being boolean set st b1 'eqv' b2 = TRUE & b3 'eqv' b4 = TRUE holds
(b1 'or' b3) 'eqv' (b2 'or' b4) = TRUE
proof end;

theorem Th33: :: BINARI_5:33
for b1, b2, b3, b4 being boolean set st b1 'eqv' b2 = TRUE & b3 'eqv' b4 = TRUE holds
(b1 'eqv' b3) 'eqv' (b2 'eqv' b4) = TRUE
proof end;

theorem Th34: :: BINARI_5:34
for b1, b2 being boolean set st b1 = TRUE & b1 'imp' b2 = TRUE holds
b2 = TRUE
proof end;

theorem Th35: :: BINARI_5:35
for b1, b2 being boolean set st b1 = TRUE holds
b2 'imp' b1 = TRUE
proof end;

theorem Th36: :: BINARI_5:36
for b1, b2 being boolean set st 'not' b1 = TRUE holds
b1 'imp' b2 = TRUE
proof end;

theorem Th37: :: BINARI_5:37
for b1 being boolean set holds b1 'imp' b1 = TRUE
proof end;

theorem Th38: :: BINARI_5:38
for b1, b2 being boolean set st b1 'imp' b2 = TRUE & b1 'imp' ('not' b2) = TRUE holds
'not' b1 = TRUE
proof end;

theorem Th39: :: BINARI_5:39
for b1 being boolean set holds (('not' b1) 'imp' b1) 'imp' b1 = TRUE
proof end;

theorem Th40: :: BINARI_5:40
for b1, b2, b3 being boolean set holds (b1 'imp' b2) 'imp' (('not' (b2 '&' b3)) 'imp' ('not' (b1 '&' b3))) = TRUE
proof end;

theorem Th41: :: BINARI_5:41
for b1, b2, b3 being boolean set holds (b1 'imp' b2) 'imp' ((b2 'imp' b3) 'imp' (b1 'imp' b3)) = TRUE
proof end;

theorem Th42: :: BINARI_5:42
for b1, b2, b3 being boolean set st b1 'imp' b2 = TRUE holds
(b2 'imp' b3) 'imp' (b1 'imp' b3) = TRUE
proof end;

theorem Th43: :: BINARI_5:43
for b1, b2 being boolean set holds b1 'imp' (b2 'imp' b1) = TRUE
proof end;

theorem Th44: :: BINARI_5:44
for b1, b2, b3 being boolean set holds ((b1 'imp' b2) 'imp' b3) 'imp' (b2 'imp' b3) = TRUE
proof end;

theorem Th45: :: BINARI_5:45
for b1, b2 being boolean set holds b1 'imp' ((b1 'imp' b2) 'imp' b2) = TRUE
proof end;

theorem Th46: :: BINARI_5:46
for b1, b2, b3 being boolean set holds (b1 'imp' (b2 'imp' b3)) 'imp' (b2 'imp' (b1 'imp' b3)) = TRUE
proof end;

theorem Th47: :: BINARI_5:47
for b1, b2, b3 being boolean set holds (b1 'imp' b2) 'imp' ((b3 'imp' b1) 'imp' (b3 'imp' b2)) = TRUE
proof end;

theorem Th48: :: BINARI_5:48
for b1, b2 being boolean set holds (b1 'imp' (b1 'imp' b2)) 'imp' (b1 'imp' b2) = TRUE
proof end;

theorem Th49: :: BINARI_5:49
for b1, b2, b3 being boolean set holds (b1 'imp' (b2 'imp' b3)) 'imp' ((b1 'imp' b2) 'imp' (b1 'imp' b3)) = TRUE
proof end;

theorem Th50: :: BINARI_5:50
for b1, b2 being boolean set st b1 = TRUE holds
(b1 'imp' b2) 'imp' b2 = TRUE
proof end;

theorem Th51: :: BINARI_5:51
for b1, b2, b3 being boolean set st b1 'imp' (b2 'imp' b3) = TRUE holds
b2 'imp' (b1 'imp' b3) = TRUE
proof end;

theorem Th52: :: BINARI_5:52
for b1, b2, b3 being boolean set st b1 'imp' (b2 'imp' b3) = TRUE & b2 = TRUE holds
b1 'imp' b3 = TRUE
proof end;

theorem Th53: :: BINARI_5:53
for b1, b2, b3 being boolean set st b1 'imp' (b2 'imp' b3) = TRUE & b2 = TRUE & b1 = TRUE holds
b3 = TRUE
proof end;

theorem Th54: :: BINARI_5:54
for b1, b2 being boolean set st b1 'imp' (b1 'imp' b2) = TRUE holds
b1 'imp' b2 = TRUE
proof end;

theorem Th55: :: BINARI_5:55
for b1, b2, b3 being boolean set st b1 'imp' (b2 'imp' b3) = TRUE holds
(b1 'imp' b2) 'imp' (b1 'imp' b3) = TRUE
proof end;