Guard choose axioms and support sequence extensional equality - #21
yashmehta00 wants to merge 2 commits into
Conversation
kondylidou
left a comment
There was a problem hiding this comment.
Thanks for this. Could you split it into two PRs? The two halves are in different states.
PR 1, choose: ready once split out. The guarded axiom is the right fix, and I checked the de Bruijn indices through both binders. The tests are well chosen, in particular the no-precondition case moving from pass to unknown, and the cover test showing the old law has a countermodel.
PR 2, sequence =~=: on hold for now. Two concerns:
The new test asserts (a =~= b) <==> (equal length && in-bounds pointwise equality), but =~= is lowered to exactly that formula, so the solver is checking X <==> X. It cannot fail.
The lowering does not connect to ==. On this branch, requires a =~= b; ensures a == b returns unknown, because Sequence is an uninterpreted sort with no extensionality. The operator can be stated but not used to conclude two sequences are equal.
Whether to address that with a native Seq encoding (as useArrayTheory does for Maps) is being discussed on Zulip, and the outcome may make this lowering unnecessary. Please keep this part as a draft PR until that is settled.
Docs, for PR 1: please limit the docs change to the choose entry. The current diff renumbers the gap list per section, which breaks the cross-references that use the old global numbers (Gap #1, #6, #8, #13, #15), and it moves the backticks in all 29 seed-table links so they render as literal text. Both look like formatter side effects.
|
Thanks, I'll split them up so you can close this one. PR1, I resubmitted this here #22 , making sure the docs links match the original and global numbering stays. Just noting that though PR2, for sequences, I understand that for Maps |
You're right on scope. Issue #18 asks for exactly this lowering and not for You're also right that your test checks the lowering: it fails if the lowered formula is not equivalent to the one stated. I put that too strongly before. What I'd still ask for are the two cases in #18's acceptance criteria, since they show the operator working in a program, not only how it is lowered:
Keep your current test as well. One more option, if you want it: |
Fixes two issues opened about Boole’s verification semantics (#18 and #19):
=~=forSequence Tas equal lengths and pointwise equality within bounds, preserving bound-variable scoping.Seed tests are written as general specifications wherever possible: they characterize sequence equality, establish the guarded choice law, and use
coverto exhibit a countermodel to the old unconditional axiom.Result
ensures false.docs/BooleFeatureRequests.mdand related comments updated.lake testpasses.