lean4-htt/tests/lean/varBinderUpdate.lean
Leonardo de Moura 8241c49e11 fix: variable binder update commands
This issue was reported by @hrmacbeth at the ICERM after-party hackton.
2022-07-31 10:08:48 -07:00

61 lines
811 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace Ex1
variable {α : Type}
variable [Add α]
variable (α)
def f (a : α) := a + a
#check f Nat 5
variable {α}
def g (b : α) := b
#check g 5
#check @f
#check @g
end Ex1
namespace Ex2
variable {α β : Type}
variable (α)
def f (a : α) := a
def g (b : β) := b
#check f Nat 5
#check g 5
#check @f
#check @g
variable (α)
end Ex2
namespace Ex3
variable {α : Type}
variable (f : αα)
variable (α)
def g (a : α) := f a
#check @g
variable {f}
def h (a : α) := f a
#check @h
end Ex3
namespace Ex4
variable {α β : Type}
variable (α γ)
def g (a : α) (b : β) (c : γ) := (a, b, c)
#check g Nat Bool 10 "hello" true
end Ex4
namespace Ex5
variable [i : Add α]
variable (i) -- Error
end Ex5
namespace Ex6
variable (a : Nat)
variable (h : a = a := rfl)
variable {h} -- Error
end Ex6