claude-math/hooks
boyreau 41c98fc1ab Track bare-symbol values across a modulus instead of skipping
A line like `x = <formula> mod N` can't be solved for x (it's just a
name for "whatever this reduces to"), so the chain handler gave up on
any modular equation once a bare symbol was involved. That silently
passed over real errors in exactly the shape a CRT reconstruction
produces: `x = 2*77*2+... mod 231` followed by a contradicting
`x ≡ 57+66+126 mod 231` (the latter reduces to a different value mod
231) went unflagged.

Now, when exactly one side of the chain is a bare single letter and
every other side is a plain number, its reduced value is tracked in
known_vars the same way solved variables already are - catching the
mismatch as a contradiction without ever needing to solve for x.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-08 12:39:32 +01:00
..
hooks.json Plugin claude-math : exercices et vérification de calculs 2026-11-07 19:12:25 +01:00
verify-calculations.sh Track bare-symbol values across a modulus instead of skipping 2026-11-08 12:39:32 +01:00