Skip to content

Require symbolic evidence before promoting a variable to nonzero - #55

Open
chessing234 wants to merge 1 commit into
teorth:mainfrom
chessing234:codex/estimates-nonzero-proof
Open

chessing234 wants to merge 1 commit into
teorth:mainfrom
chessing234:codex/estimates-nonzero-proof

Conversation

@chessing234

Copy link
Copy Markdown
Contributor

IsNonzero("x") currently solves Ne(x, 0) for an arbitrary declared real variable with no hypothesis. Python's x != 0 is structural inequality and evaluates to True before the proof checker sees it; this also permits promotion when Eq(x, 0) is a hypothesis.

Pass SymPy's Ne(x, 0) to the checker. Regression tests cover absent and contradictory evidence for real/rational/integer declarations, valid evidence through both tactic argument forms, substitution into an unsolved goal, and preservation of the input proof state.

Validation: PYTHONPATH=src python -m pytest tests -q: 26 passed; the existing test_linarith_failure_example fails identically on unchanged upstream (23 passed, 1 failed there). All 3 new regression tests pass; the original unsound proof reproduces on upstream.

This defect was reproduced during a code audit; no existing issue report is claimed.

This branch has not been deployed

No deployments
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