lean2/tests/lean/t7.lean
Leonardo de Moura 39177ec10a feat(frontends/lean): flip definition modifiers position, now they must occur after the identifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-20 11:58:05 -07:00

20 lines
623 B
Text

definition Bool : Type.{1} := Type.{0}
variable and : Bool → Bool → Bool
section
{parameter} A : Type -- Mark A as implicit parameter
parameter R : A → A → Bool
parameter B : Type
definition id (a : A) : A := a
definition refl [private] : Bool := ∀ (a : A), R a a
definition symm : Bool := ∀ (a b : A), R a b → R b a
definition trans : Bool := ∀ (a b c : A), R a b → R b c → R a c
definition equivalence : Bool := and (and refl symm) trans
end
check id.{2}
check trans.{1}
check symm.{1}
check equivalence.{1}
(*
local env = get_env()
print(env:find("equivalence"):value())
*)