Skip to content

Show both types when theorem statements differ - #105

Open
muneikh wants to merge 1 commit into
leanprover:masterfrom
muneikh:show-theorem-statement-mismatches
Open

muneikh wants to merge 1 commit into
leanprover:masterfrom
muneikh:show-theorem-statement-mismatches

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026

Copy link
Copy Markdown

When a theorem or axiom target has a different statement, Comparator currently reports only the target name. Include both exported types and their universe parameter lists in the existing mismatch error, using Lean's environment-independent expression representation. This also explains mismatches caused solely by different universe parameters.

The comparison criteria, error prefix and acceptance behavior remain unchanged. The diagnostics inspect the parsed constant values without installing declarations or loading a pretty-printing environment.

Fixes #9.

Validation:

  • lake build lean4export comparator passed with the pinned Lean v4.35.0-rc4 toolchain.
  • lake env lean tests/StatementDiagnostics.lean: eight regressions passed, covering theorem and axiom type diagnostics, universe-only mismatches, matching statements, missing targets and differing constant kinds. The three diagnostic cases fail against the unchanged upstream comparison module; all five controls pass before and after.
  • All 20 existing integration fixtures passed with the real exporter and Nanoda executable and the documented macOS development launcher. These local runs do not validate Linux sandbox isolation.
  • git diff --check passed.

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.

Display both types in "Challenge and solution theorem statement do not match"

1 participant