2014-12-01 05:16:01 +00:00
|
|
|
prelude
|
2014-09-17 21:39:05 +00:00
|
|
|
definition Prop := Type.{0}
|
2014-06-25 23:15:01 +00:00
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
definition false : Prop := ∀x : Prop, x
|
2014-06-25 23:15:01 +00:00
|
|
|
check false
|
|
|
|
|
2014-12-15 20:05:44 +00:00
|
|
|
theorem false.elim (C : Prop) (H : false) : C
|
2014-06-25 23:15:01 +00:00
|
|
|
:= H C
|
|
|
|
|
|
|
|
definition eq {A : Type} (a b : A)
|
2014-07-22 16:43:18 +00:00
|
|
|
:= ∀ P : A → Prop, P a → P b
|
2014-06-25 23:15:01 +00:00
|
|
|
|
|
|
|
check eq
|
|
|
|
|
2014-07-01 23:55:41 +00:00
|
|
|
infix `=`:50 := eq
|
2014-06-25 23:15:01 +00:00
|
|
|
|
|
|
|
theorem refl {A : Type} (a : A) : a = a
|
|
|
|
:= λ P H, H
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
definition true : Prop
|
2014-06-25 23:15:01 +00:00
|
|
|
:= false = false
|
|
|
|
|
|
|
|
theorem trivial : true
|
|
|
|
:= refl false
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
theorem subst {A : Type} {P : A -> Prop} {a b : A} (H1 : a = b) (H2 : P a) : P b
|
2014-06-25 23:15:01 +00:00
|
|
|
:= H1 _ H2
|
|
|
|
|
|
|
|
theorem symm {A : Type} {a b : A} (H : a = b) : b = a
|
|
|
|
:= subst H (refl a)
|
|
|
|
|
|
|
|
theorem trans {A : Type} {a b c : A} (H1 : a = b) (H2 : b = c) : a = c
|
|
|
|
:= subst H2 H1
|