by hiker · 8y ago · 0 comments
I'll just leave this here https://78.media.tumblr.com/bfc158b432199a3e4f5de2ddc1bd7381...
You’re going to be very surprised when you look up the origins of type theory.
Not that much surprised. History of type theory is a history of trying to define precisely computation. That is, try to allow recursion but enforce that all programs terminate.
The solution to this problem these days is to use a purely functional programming language with dependent types (e.g. Homotopy Type Theory, Lean).
Haskell, for example, being a practical functional programming language, is logically inconsistent. Using the fix function:
fix :: (a -> a) -> a
fix f = let x = f x in x
one can produce proof of everything Prelude Data.Function> :t fix id
fix id :: a
that is just an infinite loop.In a logically consistent functional language such as Lean https://leanprover.github.io, this definition is not allowed.
It's not only a syntax, it's a functional programming language which turns out to be a computational model for logic.
Homotopy Type Theory: Univalent Foundations of Mathematics