Functional Programming & Proofs
V. Coq proof assistant
- Induction principle
A recursive datatype (e.g. int, lists or trees) involves an "induction" principle. For instance, prooving a property on natural number (or a list) requires to:
- prove the property for an initial case 0 (or the empty list), and
- admit the property for n (or a list l) and prove the property for (n+1) (or x::l).
As a simple example, Nat
ural numbers and the addition are defined below with some proofs of properties of the addition.
source
Nb. t3
corresponds to the "commutativity" of the addition.
But how to prove "associativity", ie. n+(m+p)=(n+m)+p ?
Formally, induction principle on natural numbers can be expressed as follow:
induction: forall P, P(0) /\ (forall n, P(n)=>P(n+1)) => forall n, P(n).
4 - 7
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide
docteur dr laurent thiry uha mulhouse france functional programming fsharp proof theory coq coqide