Skip to content
Closed
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
24 changes: 13 additions & 11 deletions Mathlib/Tactic/FunProp/Core.lean
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,19 @@ def synthesizeArgs (thmId : Origin) (xs : Array Expr)
else
-- try user provided discharger
let ctx : Context ← read
if (← isProp type) then
if let some proof ← ctx.disch type then
if (← isDefEq x proof) then
continue
else do
trace[Meta.Tactic.fun_prop]
"{← ppOrigin thmId}, failed to assign proof{indentExpr type}"
return false
else
logError s!"Failed to prove necessary assumption `{← ppExpr type}` \
when applying theorem `{← ppOrigin' thmId}`."
-- we allow the discharger to both infer propositions (e.g., function properties)
-- and data arguments (e.g., models with corners for use with `ContMDiff` in the manifold
-- library)
if let some proof ← ctx.disch type then
if (← isDefEq x proof) then
continue
else do
trace[Meta.Tactic.fun_prop]
"{← ppOrigin thmId}, failed to assign proof{indentExpr type}"
return false
else
logError s!"Failed to prove necessary assumption `{← ppExpr type}` \
when applying theorem `{← ppOrigin' thmId}`."

if ¬(← isProp type) then
postponed := postponed.push x
Expand Down
Loading