Last active
March 17, 2016 16:24
-
-
Save nponeccop/0259cde8e4bc1e7828ff to your computer and use it in GitHub Desktop.
Dependent induction principle for Church encoded booleans
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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