Skip to content

Embed Bool functions of six arguments - #3

Open
cskiraly wants to merge 1 commit into
verse-lab:v4.35.0-veil-no-mathlibfrom
cskiraly:fix/bool-embedding-arity-6-veil
Open

cskiraly wants to merge 1 commit into
verse-lab:v4.35.0-veil-no-mathlibfrom
cskiraly:fix/bool-embedding-arity-6-veil

Conversation

@cskiraly

@cskiraly cskiraly commented Nov 8, 2026

Copy link
Copy Markdown

A cherry-pick of ufmg-smite#277 onto v4.35.0-veil-no-mathlib, the branch Veil pins, so that Veil can take it before this branch next moves to a newer upstream. Once Veil's manifest points here, it fixes verse-lab/veil#177: with veil.smt.trust false, a relation with six arguments made every preservation check of a module fail, because the Bool embedding's function lemmas stopped at five arguments.

The commit adds forall_bool_out_as_prop₆ and forall_bool_in_as_prop₆, copies of the fifth lemmas, with Test/Bool/Arity6.lean. Test/Bool/Assoc.expected and Test/Bool/Comm.expected list the same counter-examples in another order: the order changes with the set of embedding lemmas.

Tested on this branch with Lean 4.35.0: lake build Smt Smt.Rat and lake run test, all 107 tests pass (106 before the change). On the branch's tip the two six-argument cases of Test/Bool/Arity6.lean fail with "type expected" and cvc5's "Expected SMT-LIBv2 sort constructor".

This branch's CI workflow will fail on this PR, as it does on the branch's tip (293dab6, 2026-11-05): it runs lake build Smt Smt.Rat Smt.Real, and Smt.Real imports mathlib, which this branch does not require. The PR leaves the workflow as it is.

The Bool embedding's function lemmas stop at five arguments. Past
that, a function keeps its Bool type while its applications are
embedded as propositions, and the goal fails to elaborate or reaches
cvc5 malformed. Add the sixth lemmas of both families, copies of the
fifth, and test both families at five and six arguments.

Adding embedding lemmas changes the order in which counter-examples
list their assignments, so the Assoc and Comm expected files are
regenerated.
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