1) Equality is a foundational concept in functional programming but proving equality can be complicated due to issues with substitution, floating point numbers, and object references.
2) Boolean logic and the law of excluded middle may be too simplistic for modeling real-world scenarios and natural language, where statements can be unknown, doubtful, or ambiguous.
3) Different types of logic relax or modify classical principles like non-contradiction and excluded middle to better model uncertainty, inconsistency, or partial knowledge. Representing truth as a single bit may not always be the most robust approach.
3. If A = B, does F[A] = F[B] ?
• A ma&er of overriding interest to func4onal programmers
• Subs4tu4on is the founda4on of equa4onal reasoning
• Without subs4tu4on, we are lost
12. Nega%on: not without its problems
Classical logic: p <=> !!p
Intuitionist: p => !!p
Paraconsistent: p <= !!p
Intui&onist: even if p is not false, that doesn't make it true
Paraconsistent: even if p is true, that doesn't mean it isn't false
13. Is nega(on inver(ble?
• He's certainly a/rac0ve.
• He's certainly una/rac0ve.
• He's certainly not una/rac0ve...
14. Is nega(on inver(ble?
• The boss has accepted my plan.
• The boss has rejected my plan.
• The boss has not rejected my plan.
15. Is nega(on inver(ble?
• There is evidence he is at fault.
• There is no evidence he is at fault.
• There is no evidence he is not at fault.
16. I'm exploi+ng natural language.
Maybe it's chea-ng.
But what do Boolean values encode?
17. Taking the principle of
excluded middle from
the mathema5cian
would be like
proscribing the boxer
the use of his fists.
28. He said to his friend, "If the Bri2sh march
By land or sea from the town to-night,
Hang a lantern alo+ in the belfry arch
Of the North Church tower as a signal light,
Zero if by land, and one if by sea;
And I on the opposite shore will be...
35. The principle of explosion
Rejected by paraconsistent "inconsistency
tolerant" logics
36. You can have it all
True or False? Why stop at one?
37. Logic is a system for preserving some property
across logical opera3ons.
• Classical logic: truth
• Intui0onist logic: jus'fica'on
• Probability logic: likelihood
38. Laws to consider repealing
• Law of non-contradic/on: !(p && !p)
"Contradictory statements cannot both be true."
• Law of the excluded middle: p || !p
"Either a proposi/on is true or its nega/on is true."
39. Ari$es of truthiness.
_0 = Void // The void stares back at you
_1 = Unit // Indifference logic
_2 = Bool // You Are Here
_3 = Opt[Bool] // billion dollar mistake?
_4 = Bool x Bool // Is it true? Y/N Is it false? Y/N
R = [0,1) // Fuzzy, possibility, probability logics