Compare commits

...

1 Commits

Author SHA1 Message Date
Leonardo de Moura
337d019508 fix: dsimp should reduce kernel projections
closes #3395
2024-03-05 06:41:06 -08:00
2 changed files with 11 additions and 0 deletions

View File

@@ -159,6 +159,9 @@ private def reduceStep (e : Expr) : SimpM Expr := do
return f.betaRev e.getAppRevArgs
-- TODO: eta reduction
if cfg.proj then
match ( reduceProj? e) with
| some e => return e
| none =>
match ( reduceProjFn? e) with
| some e => return e
| none => pure ()

8
tests/lean/run/3395.lean Normal file
View File

@@ -0,0 +1,8 @@
structure S where
f : Nat Nat
example (h : g 1 = x) : { f := g : S }.f 1 = x := by
unfold S.f
dsimp
guard_target = g 1 = x
assumption