lean4-htt/tests/lean/param_binder_update.lean
Leonardo de Moura 90bfd84a07 feat(frontends/lean): Type is now (Type 1)
In the standard library, we should use explicit universe variables for
universe polymorphic definitions.

Users that want to declare universe polymorphic definitions but do not
want to provide universe level parameters should use
  Type _
or
  Type*
2016-09-17 14:30:54 -07:00

83 lines
1.1 KiB
Text

section
parameter {A : Type*}
parameter A
-- definition id (a : A) := a
parameter {A}
definition id₂ (a : A) := a
end
check @id
check @id₂
section
parameters {A : Type*} {B : Type*}
definition foo1 (a : A) (b : B) := a
parameters {A} (B)
definition foo2 (a : A) (b : B) := a
parameters (A) {B}
definition foo3 (a : A) (b : B) := a
parameters (A) (B)
definition foo4 (a : A) (b : B) := a
check @foo1
check @foo2
check @foo3
check @foo4
end
check @foo1
check @foo2
check @foo3
check @foo4
section
variables {A : Type*} {B : Type*}
definition boo1 (a : A) (b : B) := a
variables {A} (B)
definition boo2 (a : A) (b : B) := a
variables (A) {B}
definition boo3 (a : A) (b : B) := a
variables (A) (B)
definition boo4 (a : A) (b : B) := a
check @boo1
check @boo2
check @boo3
check @boo4
end
section
variables {A : Type*} {B : Type*}
parameter (A) -- ERROR
variable (C) -- ERROR
variables (C) (D) -- ERROR
variables C -- ERROR
definition id3 (a : A) := a
parameter id3 -- ERROR
parameter (C : Type)
variables {C} -- ERROR
end