mk: intarith.sx — ground-only integer arithmetic via project
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s

pluso-i / minuso-i / *o-i / lto-i / lteo-i / neqo-i wrap host arithmetic
in project. They run at native speed but require their inputs to walk
to ground numbers — they are NOT relational the way Peano pluso is.
Use them when puzzle size makes Peano impractical (which is most cases
beyond toy examples).

Composes with relational goals — for instance,
  (fresh (x) (membero x (1 2 3 4 5)) (lto-i x 3) (== q x))
filters the domain by < 3 and returns (1 2).

18 new tests, 287/287 cumulative.
This commit is contained in:
2026-05-08 11:02:09 +00:00
parent b89b0def93
commit 9795532f7d
3 changed files with 152 additions and 0 deletions

View File

@@ -173,6 +173,13 @@ _(none yet)_
_Newest first._
- **2026-05-08** — **intarith.sx — fast ground-only integer arithmetic**:
pluso-i / minuso-i / *o-i / lto-i / lteo-i / neqo-i wrap host arithmetic
via `project`. They are not relational like Peano `pluso` (require args
to walk to numbers), but run at native host speed — a viable escape
hatch when puzzle size makes Peano impractical. Composes with relational
goals: `(membero x dom) (lto-i x 3)` filters dom by `< 3`. 18 new tests,
287/287 cumulative.
- **2026-05-08** — **2x2 Latin square**: small classic constraint demo using
`ino` + 4 `all-distincto` constraints. Enumerates exactly 2 squares
(`((1 2)(2 1))` and `((2 1)(1 2))`); a clue (top-left = 1) narrows to one.