Skip to content

fix: normalize decidable instances before unfolding head conditionals - #193

Merged
dranov merged 2 commits into
mainfrom
codex/fix-head-if-normalization
Nov 21, 2026
Merged

dranov merged 2 commits into
mainfrom
codex/fix-head-if-normalization

Conversation

@dranov

@dranov dranov commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Actions beginning with a quantified if fail to generate wp_local_eq, and invariant checking subsequently errors with cannot translate Type. The equality helper calls whnf before normalizing Decidable instances, unfolding the leading conditional before the concrete and abstract-state expressions can be aligned.

Remove the two preliminary reductions so instance normalization runs first; the subsequent definitional equality check still performs needed reductions. Add regressions for universal quantifiers with and without a type annotation, existential quantifiers, and witness-binding conditionals. Each case checks that both the local WP equality and abstract transition theorem are generated, then verifies its invariant.

Fixes #185.

Validation:

  • All four regression cases fail before the fix and pass afterward with SMT proof reconstruction enabled and in trusted mode.
  • Eight related regression files pass: GhostFunctions, SubtypeChoice, AssertionDecidableFieldRep, WPCompactStateIte, NeutralizeDecidableInst, LocalTheoryPropAbstractEq, LocalRPropAbstractEq, and FalseInvariant.
  • git diff --check passed.

@dranov
dranov marked this pull request as ready for review November 17, 2026 13:48
@dranov
dranov requested a review from zqy1018 November 21, 2026 07:47
@dranov
dranov merged commit 252208c into main Nov 21, 2026
3 checks 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.

Action that starts with a quantified if cannot be verified

2 participants