Skip to content

fix: recognize opaque constants of unit-like types as definitionally equal - #14550

Open
kernelpanic888 wants to merge 2 commits into
leanprover:masterfrom
kernelpanic888:codex/fix-opaque-unit-defeq-14348
Open

fix: recognize opaque constants of unit-like types as definitionally equal#14550
kernelpanic888 wants to merge 2 commits into
leanprover:masterfrom
kernelpanic888:codex/fix-opaque-unit-defeq-14348

Conversation

@kernelpanic888

Copy link
Copy Markdown

This PR allows rfl to prove equality between distinct opaque constants whose common type is unit-like, fixing #14348.

The definitional equality checker now falls back to its existing unit-like check only when two constant names differ, preserving the fast path for identical constants. A regression test covers two opaque Unit constants.

Tested with a clean stage1 build and tests/with_stage1_test_env.sh tests/elab/run_test.sh 14348.lean.

AI assistance was used to locate the diagnosed control-flow branch and draft the minimal patch and regression test. I manually reviewed the change and verified the clean build and focused test.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant