lean4-htt/tests/lean/run/impLambdaTac.lean
Leonardo de Moura bf4b9b0ccd fix: use noImplicitLambda% when defining tactic macros such as have, let, etc
Thus, we don't change the expected type when using them.
2021-04-12 23:01:47 -07:00

31 lines
667 B
Text

example (P : Prop) : ∀ {p : P}, P := by
exact fun {p} => p
example (P : Prop) : ∀ {p : P}, P := by
intro h; exact h
example (P : Prop) : ∀ {p : P}, P := by
exact @id _
example (P : Prop) : ∀ {p : P}, P := by
exact noImplicitLambda% id
macro "exact'" x:term : tactic => `(exact noImplicitLambda% $x)
example (P : Prop) : ∀ {p : P}, P := by
exact' id
example (P : Prop) : ∀ {p : P}, P := by
apply id
example (P : Prop) : ∀ p : P, P := by
have _ from 1
apply id
example (P : Prop) : ∀ {p : P}, P := by
refine noImplicitLambda% (have _ from 1; ?_)
apply id
example (P : Prop) : ∀ {p : P}, P := by
have _ from 1
apply id