(root)/Notes/Notes/notes/boolean.md RSS

Boolean

the set of booleans

see math notation

definition

either true or false

BB == {{ I, O }}

properties

BB < UU, see universal ‹set

booleans can be manipulated through boolean algebra


Operators

operator precedence

see math notation for infix notation › precedence in my math notation

in conventional math notation: \(' \cdot + \oplus\)

Conjunction

aka AND, "min"

notation in my math notation /\ and __

notation in conventional math notation \(\cdot\) or \(\cap\) (may be omitted)

representation truth table

A B A /\ B
0 0 0
0 1 0
1 0 0
1 1 1

Disjunction

aka OR, "max"

notation in my math notation \/ and ^^

notation in conventional math notation \(+\) or \(\cup\)

representation truth table

A B A \/ B
0 0 0
0 1 1
1 0 1
1 1 1

Negation

aka NOT

notation in my math notation >< and +

notation in conventional math notation \(a'\) or \(\bar a\) or \(a^c\)

representation truth table

A +A
0 1
1 0

properties

Symmetric Difference

aka exclusive or, XOR, disjunctive union

notation in my math notation >< and +

notation in conventional math notation \(\oplus\) or \(\vartriangle\)

representation truth table

A B A + B
0 0 0
0 1 1
1 0 1
1 1 0

Implication

aka conditional statement, logical consequence

definition if x = I, then the conditional statement x < y is said to be vacuously true

definition +x > +y is the contrapositive of the statement x < y. they are logically equivalent

definition x > y is the converse of the statement x < y. they are not logically equivalent

definition +x < +y is the inverse of the statement x < y. they are not logically equivalent

note even though the converse and inverse of a conditional statement are not logically equivalent, the converse of a statement is logically equivalent to the inverse of that statement

definition

let S < R < Q (square implies rectangle implies quadrilateral). then,

S is said to be a sufficient condition for R---knowing that S is true allows the deduction that R is true

Q is said to be a necessary condition for R---for R to be true, Q must be true

alternatively, let A < B. then,

A is said to be a sufficient condition for B

B is said to be a necessary condition for A

notation in my math notation < and -| and > and |-

notation in conventional math notation \(\to\) and \(\implies\)

representation truth table

A B A < B
0 0 1
0 1 1
1 0 0
1 1 1

properties

boolean › implication is a partial order

Equivalence

aka XNOR, double implication, equivalence, biconditional statement, bidirectional implication

notatio in my math notation == and =

notation in conventional math notation \(\Leftrightarrow\) or \(\odot\) or \(=\)

representation truth table

A B A == B
0 0 1
0 1 0
1 0 0
1 1 1

properties

boolean › equivalence is a equivalence ‹relation

Difference

notation in my math notation /\ +

notation in conventional math notation \(\backslash\)

representation truth table

A B A /\ +B
0 0 0
0 1 0
1 0 1
1 1 0

identities

properties

identities below hold for all BB {x /\ y}

identity x \/ O == x

identity x /\ I == x

excluded middle x \/ +x == I

excluded middle x /\ +x == O

double negation +I == O

double negation +O == I

idempotence x \/ x == x

idempotence x /\ x == x

domination x \/ I == I

domination x /\ O == O

involution ++x == x

properties

properties

properties below hold for all BB {x /\ y /\ z}

commutativity x \/ y == y \/ x

commutativity x /\ y == y /\ x

associativity x \/ y^^z == x^^y \/ z

associativity x /\ y__z == x__y /\ z

distributivity x /\ y^^z == x__y \/ x__z

distributivity x \/ y__z == x^^y /\ x^^z

De Morgan's +x^^y == +x /\ +y

De Morgan's +x__y == +x \/ +y

absorption x \/ +x__y == x

absorption x /\ +x^^y == x

xor x >< y == x__+y \/ y__+x --- me

xor x >< y == >< x = y --- me

implication x < y == +x \/ y

implication x > y == x \/ +y

biconditional x = y == +x /\ +y \/ x __ y

biconditional x = y == x -| y /\ x |- y

and-implies x__y -| z == x -| z \/ y -| z --- me

or-implies x^^y -| z == x -| z /\ y -| z --- me

implies-or x -| y^^z == x -| y \/ x -| z --- me

implies-and x -| y__z == x -| y /\ x -| z --- me

portation x < y -| z == x__y -| z --- https://www.cs.toronto.edu/~hehner/BAUA.pdf

note many boolean laws based on boolean › implications become painfully obvious when seen from the perspective of type theory by the Curry--Howard correspondence. for instance, the boolean portation law corresponds to currying in type theory