Skip to content

Instantly share code, notes, and snippets.

@kbuzzard
Created October 22, 2018 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbuzzard/15a40e59ce815b69a0dcc983935abc83 to your computer and use it in GitHub Desktop.
Save kbuzzard/15a40e59ce815b69a0dcc983935abc83 to your computer and use it in GitHub Desktop.
inductive fml
| atom (i : ℕ)
| imp (a b : fml)
| not (a : fml)
open fml
infixr ` →' `:50 := imp -- right associative
local notation ¬ := fml.not
inductive prf : fml → Type
| axk (p q) : prf (p →' q →' p)
| axs (p q r) : prf $ (p →' q →' r) →' (p →' q) →' (p →' r)
| axX (p q) : prf $ (¬q →' ¬p) →' p →' q
| mp (p q) : prf p → prf (p →' q) → prf q
open prf
lemma pqpp (p q : fml) : prf $ (p →' q) →' (p →' p) :=
begin
apply mp (p →' q →' p) ((p →' q) →' p →' p) (axk p q),
exact axs p q p
end
theorem p_implies_p (p : fml) : prf $ p →' p :=
begin
exact mp (p →' p →' p) (p →' p) (axk p p) (pqpp p (p →' p)),
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment