Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Mathlib/Tactic/FastInstance.lean
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ partial def makeFastInstance (inst expectedType : Expr) (trace : Array Name := #
mvarId.assign (← makeFastInstance arg argExpectedType (trace := trace'))
else
-- For data fields, make sure that the lambda binders have the right type.
forallTelescopeReducing argExpectedType fun xs _ ↦ do
mvarId.assign <| ← mkLambdaFVars xs (arg.beta xs)
mvarId.assign <| ← forallTelescopeReducing argExpectedType fun xs _ ↦ do
mkLambdaFVars xs (← whnfI (mkAppN arg xs))
return mkAppN f (← mvars.mapM instantiateMVars)

/--
Expand Down
2 changes: 1 addition & 1 deletion MathlibTest/InferInstanceAsPercent.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ instance myNatInv_fixed : MyInv MyNat :=
-- The binder type is `MyNat`:
/--
info: @[implicit_reducible] def myNatInv_fixed : MyInv MyNat :=
{ myInv := fun (a : MyNat) => a + 1 }
{ myInv := fun (a : MyNat) => (Nat.add a 0).succ }
-/
#guard_msgs in
#print myNatInv_fixed
Expand Down
Loading