blob: 81e313ca9c92ede4c3df389a26c362bf53b35bb7 [file]
structure Foo where
x : Nat
y : Nat := 10
@[instance_reducible]
def f (x : Nat) : Foo :=
{ x := x + x }
@[instance_reducible]
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