feat(axiom5): toward = fold direction + paper-incidence filter (v0.19-dev) #70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "toward-direction"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements
notes/2026-07-05-toward-direction-semantics.mdandnotes/2026-07-05-axiom5-paper-incidence.md: axiom-5towardstops being a sector selector and becomes a fold direction, and omittedtowardnow runs a paper-incidence filter before erroring.Semantics for
map --l1 onto --l2:toward Xpresent — a bisector is selected iff reflecting the swinging material of--l1across it lands on X's side of--l1.Xon--l2is now legal;Xon--l1errors (towardnames where the fold goes, not where it comes from). The residual straddle case (hinge interior to the material) resolves viamoving, otherwise errors with a fix-it hint.towardomitted — candidates that crease no face (corner/edge grazers) are filtered out first; only a genuine two-way tie still asks fortoward .p.movingis now optional on@map … onto …— derived as the side carrying--l1's material, analogous to axiom 2's implied moving point.up tostill needsmoving.Binds use the same material rule; center-cross binds (both halves swing either way) are honest ambiguity errors now, so
bisect-a/bwere rewritten as hinge-at-endpoint programs andbisect-intermediate(sector-semantics demo) becamebisect-straddle.The payoff example — the kite base drops from 9 statements (helper constructions,
towardon helper points, explicitmoving) to 4, with no selector at all:towardas a direction, one token apart:Enabling work that rode along: the golden/e2e harness now scans
examples/recursively (the reorg intosyntax//bases/had detached it);Geom.clip_line_to_convex(exact Cyrus–Beck) + strict-interiorline_cuts_polygon; and a real pre-existing bug found by the new tests —table_polygonreturns CW polygons for reflected faces, which silently disabled the taco-tortilla check on folded states (c284075).Spec §4.5 rewritten accordingly (error strings byte-matched against the evaluator); axioms 6/7
toward(metric landing pick) are untouched — separate pass, per the note.Note for the future: the bind straddle error suggests
at-selection of the swinging segment; oncepinch(#50 slice 2) lands, that hint gets a second natural resolution.Golden and e2e harnesses only scanned examples/ non-recursively, so the syntax/ and bases/ reorg left e2e reading stale paths and golden blind to the moved/new .bel files. Walk recursively, mirror the golden path to the subdirectory (needed since two examples share the name multiple-folds.bel), and keep the basename as the span name passed to fold_string so existing golden bytes don't drift. Move existing goldens into tests/golden/{syntax,bases}/ and regen the ones with no prior golden (bases/kite.fold, syntax/multiple-folds.fold, syntax/crease-flap-restrict.fold — the last one wasn't called out in the brief but has no predecessor golden either).- drop broken reorg imports: examples/syntax/{crease-flap-restrict,multiple-folds}.bel + their goldens (the working top-level multiple-folds.bel stays) - fix stale examples/ paths after the syntax/ reorg: README.md landing images, tools/README.md, editors/vscode/README.md, bibliography.md - spec/SPECIFICATION.md §4.5: reword the paper-incidence filter to say it keeps candidates cutting a face's interior, not just "a positive-length segment" - tests/test_eval.ml: add E8 (`up to` without `moving`, no implied anchor) via the kite fold; extend the E3/E7 NOTE to also cover the toward-without-moving empty-viables branch, unreachable on the flat sheet (confirmed by CLI sweep) - notes/2026-07-05-toward-direction-semantics.md: mark the §4.5 rewrite bullet doneMoved to GitHub: https://github.com/tophcodes/beloch/pull/16 (repo migrated 2026-07-05, GitHub is the source of truth now).
Pull request closed