Re: Proof of an imbecile doctrine
Posted: Fri Mar 14, 2025 2:28 am
Impenitent wrote: ↑Fri Mar 14, 2025 1:48 amI like the Moe Howard-Curly correspondence better - nyuk nyuk nyuk
-Imp
ChatGPT: A proof is a program and a program is a proof.
You're referencing the Curry-Howard Correspondence, a deep connection between logic and computation. This principle states that:
Proofs in logic correspond to programs in a programming language.
Logical propositions correspond to types in a type system.
Breaking it down:
1. A proof is a program
In constructive logic, proving a proposition means providing an explicit witness or construction of it.
In programming, writing a function of a given type is like proving a theorem: the function is the proof.
2. A program is a proof
If a program has a certain type, it can be seen as evidence that the corresponding proposition is true.
Type-checking ensures that programs correspond to valid proofs.
Example:
Consider the simple logical statement:
A → B
In logic, this means “if we have A, we can derive B.”
In programming, this is a function type A → B, meaning a function that takes an argument of type A and returns a value of type B.
Writing such a function is like proving the logical implication.
This idea is fundamental in dependently typed programming languages like Agda, Coq, and Idris, where proving theorems is the same as writing programs.
Are you interested in a particular application of this idea, like functional programming or proof assistants?