Skip to content

experiment: always check types for instance metavariables at instance transparency#13831

Draft
TwoFX wants to merge 3 commits into
leanprover:masterfrom
TwoFX:julia/just-try
Draft

experiment: always check types for instance metavariables at instance transparency#13831
TwoFX wants to merge 3 commits into
leanprover:masterfrom
TwoFX:julia/just-try

Conversation

@TwoFX
Copy link
Copy Markdown
Member

@TwoFX TwoFX commented May 25, 2026

Claude-generated, just for testing, do not merge.

TwoFX and others added 3 commits May 21, 2026 17:12
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 the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label May 25, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-05-20 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-05-25 11:01:33)

@github-actions github-actions Bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label May 25, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the builds-mathlib CI has verified that Mathlib builds against this PR label May 25, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

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

Labels

builds-mathlib CI has verified that Mathlib builds against this PR 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.

3 participants