Skip to content

fix: remove withDefault footgun from assignOutParams#12488

Draft
kim-em wants to merge 1 commit intomasterfrom
revert-tc-cache-withDefault
Draft

fix: remove withDefault footgun from assignOutParams#12488
kim-em wants to merge 1 commit intomasterfrom
revert-tc-cache-withDefault

Conversation

@kim-em
Copy link
Collaborator

@kim-em kim-em commented Feb 15, 2026

This PR removes the withDefault from the isDefEq call in assignOutParams, reverting one of the workarounds from #12286 that was temporarily introduced for Mathlib compatibility. (See #12489 for the other.)

withDefault at this isDefEq is a potential performance footgun: TC resolution is supposed to unfold only [reducible] and [instance_reducible] declarations. The withDefault was added back in #12286 because OrderDual (a semireducible type alias def OrderDual (α : Type) : Type := α) triggered thousands of Mathlib failures without it.

This is an experimental branch for testing changes to Mathlib.

🤖 Prepared with Claude Code

This reverts part of the `OrderDual` workaround from #12286.

`withDefault` at the `isDefEq` in `assignOutParams` is a potential
performance footgun: TC resolution is supposed to unfold only
`reducible` and `instance_reducible` declarations. The `withDefault`
was added back because `OrderDual` (a semireducible type alias)
triggered thousands of Mathlib failures without it.

This is an experimental branch for testing whether Mathlib's
`OrderDual` refactoring has progressed enough to remove this
workaround.
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Feb 15, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 0d2a511bde100b0c8690bee398b52c1b715e618f --onto 6ca23a7b8bee57152110ce500ce795148707d4ed. You can force Mathlib CI using the force-mathlib-ci label. (2026-02-15 04:32:22)

@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 0d2a511bde100b0c8690bee398b52c1b715e618f --onto 9da8f5dce42832b8411d58446653f3640a94a6e3. You can force reference manual CI using the force-manual-ci label. (2026-02-15 04:32:24)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants