Skip to content

feat: support for theorem disproof#48

Open
augustepoiroux wants to merge 11 commits into
leanprover:masterfrom
augustepoiroux:upstream/disproofs
Open

feat: support for theorem disproof#48
augustepoiroux wants to merge 11 commits into
leanprover:masterfrom
augustepoiroux:upstream/disproofs

Conversation

@augustepoiroux
Copy link
Copy Markdown

@augustepoiroux augustepoiroux commented Jun 3, 2026

This pull request introduces the ability to verify theorem disproofs. When allow_disproofs is set to true in config.json, one can solve a challenge by proving the negation of a theorem target instead of proving the theorem itself.

Key Changes

  1. allow_disproofs: Added an optional config flag allow_disproofs (defaults to false).
  2. Disproof Signature: Implemented signature matching in checkDisproof to verify that the disproof target (named <TheoremName>.disproof) is of type T → False or ¬ T.
  3. Universe Matching: Support instantiating/matching universe level parameters to handle refutation of universe-polymorphic claims.

Design decisions to be discussed:

  • What should happen when both foo and foo.disproof are submitted? In the current state, it prioritizes foo.disproof when present in the environment. Maybe a more sensible policy would be to accept a submission as long as one of foo and foo.disproof is correct.

Note: this PR is marked as a draft as it currently depends on leanprover/lean4export#36

@augustepoiroux augustepoiroux marked this pull request as ready for review June 5, 2026 15:57
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