Skip to content

Instantly share code, notes, and snippets.

@nponeccop
Last active March 17, 2016 16:24
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 nponeccop/0259cde8e4bc1e7828ff to your computer and use it in GitHub Desktop.
Save nponeccop/0259cde8e4bc1e7828ff to your computer and use it in GitHub Desktop.
Dependent induction principle for Church encoded booleans
namespace foo
definition bool := ∀ a : Type, a → a → a
definition tt : bool := λ (a : Type) (c d : a), c
definition ff : bool := λ (a : Type) (c d : a), d
definition bor (a b : bool) : bool := a bool tt b
definition boolProp := ∀ a : Prop, a → a → a
definition ind_on_T := ∀ P : bool → Prop, ∀ a : bool, P tt → P ff → P a
definition ind_on : ind_on_T := λ (P : bool → Prop) (a : bool) (t : P tt) (f : P ff), a (P a) t f
theorem tt_bor : ∀ (a : boolProp), bor a tt = tt
:= λ a, ind_on (λ a : boolProp, bor a tt = tt) a rfl rfl
check tt_bor
end foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment