Skip to content

boolean

we have 1 + 10 useful boolean functions: not, and or xor imp con nand nor nxor nimp ncon

we can neatly enumerate all the possible boolean functions: with n inputs, we have 2n possible permutations, for which we have 22n functions.

nullary functions

we have 220 = 2 nullary "functions":

name value symbol description
false ❌ ⊥ boolean bottom element
true ✅ ⊤ boolean top element

these are stored as constants instead

unary functions

with n = 1 inputs, we have 221 = 4 unary functions:

name F T symbol description
false ❌❌ ⊥ constant always-false function
id ❌✅ id identity
not ✅❌ ¬ negation
true ✅✅ ⊤ constants always-true function

not is the only useful non-degenerate function here

binary functions

with n = 2 inputs, we have 222 = 16 binary functions:

name FF FT TF TT symbol description
false ❌❌❌❌ ⊥ constant always-false function
and ❌❌❌✅ ∧ conjunction
nimp ❌❌✅❌ ↛ abjunction
ncon ❌✅❌❌ ↚ converse abjunction
nor ✅❌❌❌ ↓ joint denial
fst ❌❌✅✅ π1 first argument
snd ❌✅❌✅ π2 second argument
xor ❌✅✅❌ ↮ exclusive disjunction
nxor ✅❌❌✅ ↔ material biconditional
nsnd ✅❌✅❌ ¬π2 ¬first argument
nfst ✅✅❌❌ ¬π1 ¬second argument
or ❌✅✅✅ ∨ disjunction
con ✅❌✅✅ ← converse material implication
imp ✅✅❌✅ → material implication
nand ✅✅✅❌ ↑ alternative denial
true ✅✅✅✅ ⊤ constant always-true function

fst, snd, nsnd, nfst are degenerate functions

ternary functions and beyond

with n = 3 inputs, we have 223 = 256 ternary functions. since there are so many, and because they can be composed from binary functions anyway, daamath does not maintain functions of n ≥ 3.