diff --git a/_drafts/haskell-and-logic.md b/_drafts/haskell-and-logic.md new file mode 100644 index 0000000..c4c57ea --- /dev/null +++ b/_drafts/haskell-and-logic.md @@ -0,0 +1,64 @@ +--- +layout: post +title: "Haskell and Logic" +--- + +Newcomers to Haskell are often told that Haskell is "pure", or that it is "mathematical". It is often not clear what this means, or why these properties would be of interest to begin with. In this blog post I aim to combat this confusion by introducing the fascinating connection between Haskell and mathematical logic. Given some mathematical interest and basic Haskell knowledge you too may experience the sense of wonder I first did when discovering this topic. + + + +{% katexmm %} + +## What is purity? + +* What does it mean to be mathematical + * Non-mutable variables + * Functions are memoizable + * Counter-Examples from Python + +* IO - topic for another day + +* OK, but What does one gain from purity? + +## Equational Reasoning + +* The ability to reason about how programs execute +* Pattern matching by hand, expanding definitions + +## What is logic? + +* Propositional logic +* Truth, Falsehood +* Connectives, Negation and Implication +* Truth Tables? + +* What does this have to do with Haskell? + +## Interpreting logic in Haskell + +* Types as propositions + * Programs as Proofs +* Interpretation of sentences + +## The paradoxes of Haskell + +* Bottom/Undefined +* Recursion +* Checking proofs in Haskell (having to evaluate them) + +## Intuitionism + +* Cannot prove all things from logic +* Our truthtables are an oversimplification +* Broader logic needed, intutionistic logic + * Liknelse till kommutativitet från gruppteori? + +## The Horizon: Type theory + +* Quick recap, where does one go from here though? (överkurs) +* But how does one interpret higher order logic? +* Pi and Sigma types +* Equality types +* Quick comment on HoTT + +{% endkatexmm %}