Repository navigation
Conversation
|
Rebased onto main after #1218: the candidate models and the backtracking now run inside its bounded search (one |
|
Rebased onto main 53fc961 (after #1338/#1220/#1224). #1338's Unit-provenance check is kept inside the unchanged first answer; it does not cover the |
|
This conflicts again after #1353/#1354 (both touch |
…of a ~ function reaches the kernel (bendlang#1182) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLZJANUtM1mTd4jg5kXqJf
fb1577e to
a357864
Compare
|
Thanks @MuhDur I'm reviewing rn and ended up rebasing, i'll report back shortly |
|
Thanks @MuhDur, the diagnosis is right: safe.ts picks one model per ~ constant at a time, and that is why v_n Why it doesn't fix #1182: I rebased it onto current main and ran leo-guinan's three repros ( Why we'd rather not take it as a partial fix: • It adds about 900 ttok to safe.ts. Fixing the problems below brings that to about 1,400, which leaves 336 A direction that could fix #1182: use checked defs as models. If the book has a closed, kernel-checked def of Note: the head of this branch (a357864) is my rebase, which has a --verdict crash (vs.flatMap(at) passes the |
Pin the v2.0.36 archives and source files at ae1101ca (bend.ts: write-let parse fix and match error wording; base.bend: Poll and the try_ IO twins, new Chan/TCP/UDP result types, none used by bendlib). 2.0.36 keeps the hub key in ~/.bend/bendai.json and moves an older bender.json there on its next hub call, so release.ts accepts a key in either file; its tests cover both names. Goldens regenerated after review: only the version field changes. F-fact replay 56/56; all modules check; --verdict unchanged (8 pass, algebra/order/sort/all blocked). The released lawcheck 0.3.2 and the published bend-mathlib 0.7.2.0 check on 2.0.36 from an empty BEND_LIB. Upstream closed bendlang/bend#1263 unmerged, so README and ci.yml now describe the algebra/order blocker and link the PR as its diagnosis, not as a pending fix; the sort blocker uses 2.0.36's wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLZJANUtM1mTd4jg5kXqJf
Closes #1182.
--verdictchecks a template at opaque constantsk~p, and the kernel needs each one to have a model. The models were picked one at a time:legotλx y. False{}, so a law~step: … -> {le(x, y) == True{}}had none, the def went out of scope (bend f.bend -o f.bendttsaysno model for step_le~step), and--verdictreported a mismatch without running the kernel. A law over a template type,{x == y : A}atA = Unit, had none either.model_atnow yields its models best first, inside #1218's bounded search; the first is the one it returned before, after the same work, so every modelmodel()picks is unchanged (#1338's Unit and datatype checks included). When a constant has none,refitbacktracks over the root's constants so far, up to 8 models each, inmodel_by's rounds of doubling depth on oneMODEL_FUEL, so the backtracking is bounded too;def_emitemits the models it chose. Only in that search, a live λ of a datatype whose constructors have no fields, with no model under a variable, gets a match. The kernel still checks every model and the constants stay opaque in the body. Contradictory laws have no models that hold together, so they stay out of scope instead of handing the kernel a closed def of typeEmpty.Checks:
tests/proof/template_law_modelsgivesSOME PROOFS FAILunder--verdicton main andALL PROOFS CHECKhere;tests/proof/template_laws_contradictis accepted by bend2 and stays out of scope (no model for bad~ir).{==}: rejected (expected: le x0 x1, observed: True;expected: x0, observed: x1), so the convenient models don't leak into the proofs.tests/**/*.bend,--verdictoutput and the-oBendTT text are byte-identical to main; only the two new tests are added.tscgives the same 12 errors as main.gates/repo.tspasses 50 / 50;safe.tsgoes from 21,935 to 22,836 ttok (cap 24,000).bend-mathlib,algebraandorder(transitivity/associativity chains over a~le/~opwith their laws as~proofs) now pass--verdict;bool,equal,list,maybe,nat,permandstringemit identical BendTT.sortbrings its~le_totalroots into scope but still fails on defs out of scope for another reason (a kind that depends on a run-time value).gates/safe.tsandgates/test.tsincluded.Not covered: a
~law whose only model is a real proof (the injectivity~Fin the original report) still has none.🤖 Generated with Claude Code
https://claude.ai/code/session_01LLZJANUtM1mTd4jg5kXqJf