Skip to content

experiment: always check types for instance metavariables at instance…#13846

Draft
TwoFX wants to merge 28 commits into
leanprover:defeq_todo_4_paulfrom
TwoFX:julia/just-try-2
Draft

experiment: always check types for instance metavariables at instance…#13846
TwoFX wants to merge 28 commits into
leanprover:defeq_todo_4_paulfrom
TwoFX:julia/just-try-2

Conversation

@TwoFX
Copy link
Copy Markdown
Member

@TwoFX TwoFX commented May 26, 2026

No description provided.

leodemoura and others added 28 commits May 12, 2026 14:34
…tions

This PR adds `implicit_reducible` and/or `expose` attributes to definitions
that need to be unfolded during defeq checking without full transparency.
Preparatory commit for removing the TODO workaround in ExprDefEq.lean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nprover#13823 (leanprover#13584)

This PR fixes some warnings in stage2 due to redundant `@[expose]`.
This reverts commit cc007d9.
This reverts commit d74fd4a.
This PR adds two opt-in trace augmentations for debugging definitional
equality. Setting `trace.Meta.isDefEq.printTransparency` prefixes each
`Meta.isDefEq` `=?=` trace node with the current transparency level
(e.g. `[default]`, `[instances]`, `[implicit]`). Enabling the new
`Meta.isDefEq.transparency` trace class additionally logs the reason
whenever `withInstanceConfig` or `withImplicitConfig` raises the
transparency to check an instance-implicit or implicit-value argument.

Implementation: adds a `ToString TransparencyMode` instance, registers
the option and trace class, and instruments the two wrappers in
`ExprDefEq.lean`. Both features are off by default and incur no cost
when disabled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN labels May 27, 2026
@leanprover-bot leanprover-bot added the breaks-manual This is not necessarily a blocker for merging, but there needs to be a plan. label May 27, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

leanprover-bot commented May 27, 2026

Reference manual CI status:

@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label May 27, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

@datokrat datokrat force-pushed the defeq_todo_4_paul branch 4 times, most recently from 64eaca4 to c467d9e Compare May 29, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks-manual This is not necessarily a blocker for merging, but there needs to be a plan. breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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.

5 participants