Skip to content

hint simplify registers one rule per conjunct of a lemma - #1110

Merged
strub merged 1 commit into
mainfrom
hint-simplify-conj
Sep 4, 2026
Merged

hint simplify registers one rule per conjunct of a lemma#1110
strub merged 1 commit into
mainfrom
hint-simplify-conj

Conversation

@strub

@strub strub commented Sep 4, 2026

Copy link
Copy Markdown
Member

A lemma whose body is a conjunction of rewrite rules used to compile to
a single eq-true rule whose pattern was the whole conjunction, rooted at
(/\). It registered without error and never fired: the only way to
feed the simplifier a family of equations was one lemma and one hint
line per equation.

EcReduction.User.compile now splits the body recursively and returns
a rule list. Implications distribute their condition over every rule
beneath them, conjunctions contribute both sides, and a conjunct may
carry its own forall. Each rule keeps only the binders occurring in
its conjunct, so a shared outer binder that one conjunct does not
mention no longer trips the missing-variable check. The Th_reduction
entry carries a rule list per lemma (empty meaning "not compiled"), so
printing and cloning replay keep working per lemma name.

@strub
strub force-pushed the hint-simplify-conj branch 3 times, most recently from 7240de1 to fafb906 Compare September 4, 2026 13:05
@strub strub self-assigned this Sep 4, 2026
@strub
strub force-pushed the hint-simplify-conj branch from fafb906 to 27bda38 Compare September 4, 2026 13:29
Comment thread src/ecReduction.ml
A lemma whose body is a conjunction of rewrite rules used to compile to
a single eq-true rule whose pattern was the whole conjunction, rooted at
`(/\)`. It registered without error and never fired: the only way to
feed the simplifier a family of equations was one lemma and one hint
line per equation.

`EcReduction.User.compile` now splits the body recursively and returns
a rule list. Implications distribute their condition over every rule
beneath them, conjunctions contribute both sides, and a conjunct may
carry its own `forall`. Each rule keeps only the binders occurring in
its conjunct, so a shared outer binder that one conjunct does not
mention no longer trips the missing-variable check. The `Th_reduction`
entry carries a rule list per lemma (empty meaning "not compiled"), so
printing and cloning replay keep working per lemma name.
@strub
strub force-pushed the hint-simplify-conj branch 2 times, most recently from 27bda38 to af48d67 Compare September 4, 2026 13:48
@strub
strub enabled auto-merge September 4, 2026 13:53
@strub
strub added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit fbdb125 Sep 4, 2026
19 checks passed
@strub
strub deleted the hint-simplify-conj branch September 4, 2026 15:04
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.

2 participants