We present the calculus of natural deduction for intuitionstic propositional logic twice.
The first version only concerns the logic and allows us to do pen-and-paper proofs.
The second version is an exercise where the reader is asked to add proof terms (=programs) to the rules. These proof terms should be the same as used in the proof assistant Lean.
The calculus of natural deduction of intuitionistic logic.
\[ \frac{A\quad\quad B}{A\wedge B} \]
\[ \frac{A\wedge B}{A} \quad\quad\quad\quad \frac{A\wedge B}{B} \]
\[ \frac{\text{Assume $A$ ... prove $B$}}{A\to B} \]
\[ \frac{A \quad\quad A\to B}{B} \]
\[ \frac{A}{A\vee B} \quad\quad\quad\quad \frac{B}{A\vee B} \]
\[ \frac{A\vee B \quad\quad A\to C \quad\quad B\to C}{C} \]
\[ \frac{\bot}{A} \]
\[ \text{$\neg A$ is an abbreviation for $A\to\bot$} \]
We repeat the calculus above. Add the proof terms.
\[ \frac{A\quad\quad B}{A\wedge B} \]
\[ \frac{A\wedge B}{A} \quad\quad\quad\quad \frac{A\wedge B}{B} \]
\[ \frac{\text{Assume $A$ ... prove $B$}}{A\to B} \]
\[ \frac{A \quad\quad A\to B}{B} \]
\[ \frac{A}{A\vee B} \quad\quad\quad\quad \frac{B}{A\vee B} \]
\[ \frac{A\vee B \quad\quad A\to C \quad\quad B\to C}{C} \]
\[ \frac{\bot}{A} \]
\[ \text{$\neg A$ is an abbreviation for $A\to\bot$} \]