lean4-htt/tests/lean/run/simp_proj_transparency_issue.lean
Leonardo de Moura 4a317ae3f8
fix: .yesWithDeltaI behavior (#3816)
It should not increase the transparency level from `reducible` to
`instances`. See new test.
2024-04-01 02:36:35 +00:00

19 lines
390 B
Text

structure Foo where
x : Nat
y : Nat := 10
@[instance]
def f (x : Nat) : Foo :=
{ x := x + x }
@[instance]
def g (x : Nat) : Foo :=
{ x := x + x }
opaque q : Nat → Prop
example (h : q (f x).1) : q (g x).1 := by
-- Projections must not bump transparency setting from `reducible` to `instances`
-- Thus, the following tactic must fail
fail_if_success simp [h]
assumption