Fix false Valid results from empty types and type classes - #224
Open
RSoulatIOHK wants to merge 3 commits into
Open
Fix false Valid results from empty types and type classes#224RSoulatIOHK wants to merge 3 commits into
RSoulatIOHK wants to merge 3 commits into
Conversation
…iers # Conflicts: # Tests/FixedIssues.lean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blaster reports
Validfor∀ α : Type, (∀ _ : α, False) → False, althoughα := Emptyrefutes it. The same problem affects function spaces and classes such asInhabited α: both unused-quantifier elimination and SMT class-binder erasure assumed nonemptiness without evidence.Require an inhabitant before dropping a domain. Search global
Nonemptyinstances and bounded constructor/function witnesses, excluding retained local instances that may belong to a closed binder. This also supports inhabited classes and constructor fields without treating every class as inhabited. Preserve SMT membership constraints for classes whose nonemptiness is unknown.The tests include four kernel-checked counterexample proofs, five solver regressions requiring
Falsified, a closed-local-instance regression, and positive coverage forLT,BEq, constructor fields and function codomains. Seventeen existing optimizer expectations were corrected to preserve vacuity or recognize newly supported inhabited domains.Validation: the full optimizer suite and all new/old fixed-issue tests pass. A full
lake testrun with a uniform 30-second Z3 process cap passed every module except the existing nonlinear arithmetic case atTests/Smt/SmtNat/SmtNatMod.lean:37, which timed out. The pristine beta suite also stalled in that module for six minutes without a cap; its bounded rerun passed. This solver-sensitive performance case is being addressed in a following optimization PR rather than weakening its expected verdict.Stacked on #223; base branch
fix/beta-proof-irrelevance.Fixes #226. Regression:
Tests/FixedIssues/Issue226.lean.Follow-up: the complete stack through #230 passes
lake testwith the same 30-second Z3 process cap. #230 removes the nonlinear modulo bottleneck through a kernel-justified optimizer rule.