2014-07-22 16:43:18 +00:00
|
|
|
definition Prop : Type.{1} := Type.{0}
|
2014-10-02 23:20:52 +00:00
|
|
|
constant and : Prop → Prop → Prop
|
2014-10-09 14:13:06 +00:00
|
|
|
context
|
2014-06-23 00:51:00 +00:00
|
|
|
parameter {A : Type} -- Mark A as implicit parameter
|
2014-07-22 16:43:18 +00:00
|
|
|
parameter R : A → A → Prop
|
2014-06-14 00:30:35 +00:00
|
|
|
parameter B : Type
|
|
|
|
definition id (a : A) : A := a
|
2014-09-19 21:30:02 +00:00
|
|
|
private definition refl : Prop := ∀ (a : A), R a a
|
2014-07-22 16:43:18 +00:00
|
|
|
definition symm : Prop := ∀ (a b : A), R a b → R b a
|
|
|
|
definition trans : Prop := ∀ (a b c : A), R a b → R b c → R a c
|
|
|
|
definition equivalence : Prop := and (and refl symm) trans
|
2014-06-14 00:30:35 +00:00
|
|
|
end
|
|
|
|
check id.{2}
|
|
|
|
check trans.{1}
|
|
|
|
check symm.{1}
|
|
|
|
check equivalence.{1}
|
|
|
|
(*
|
|
|
|
local env = get_env()
|
|
|
|
print(env:find("equivalence"):value())
|
|
|
|
*)
|