2014-12-01 05:16:01 +00:00
|
|
|
prelude
|
2014-09-17 21:39:05 +00:00
|
|
|
definition Prop : Type.{1} := Type.{0}
|
2015-04-22 02:33:21 +00:00
|
|
|
section
|
2014-06-14 15:01:52 +00:00
|
|
|
parameter A : Type
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
definition eq (a b : A) : Prop
|
|
|
|
:= ∀P : A → Prop, P a → P b
|
2014-06-14 15:01:52 +00:00
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
theorem subst (P : A → Prop) (a b : A) (H1 : eq a b) (H2 : P a) : P b
|
2014-06-14 15:01:52 +00:00
|
|
|
:= H1 P H2
|
|
|
|
|
|
|
|
theorem refl (a : A) : eq a a
|
2014-07-22 16:43:18 +00:00
|
|
|
:= λ (P : A → Prop) (H : P a), H
|
2014-06-14 15:01:52 +00:00
|
|
|
|
|
|
|
theorem symm (a b : A) (H : eq a b) : eq b a
|
|
|
|
:= subst (λ x : A, eq x a) a b H (refl a)
|
|
|
|
|
|
|
|
theorem trans (a b c : A) (H1 : eq a b) (H2 : eq b c) : eq a c
|
|
|
|
:= subst (λ x : A, eq a x) b c H2 H1
|
|
|
|
end
|
|
|
|
|
|
|
|
check subst.{1}
|
|
|
|
check refl.{1}
|
|
|
|
check symm.{1}
|
2014-09-17 21:39:05 +00:00
|
|
|
check trans.{1}
|