ADR-050..053: width-parametric arithmetic + wide literal carrier + axis-generic SDK emission + Div/Mod/Pow catalog extension
Four ADRs plus two inline amendments commit substrate arithmetic at
the full Witt tower, widen the literal carrier to match, and admit
parametric impl types in the SDK's axis-extension emission. Per the
implementer document (prism repo implementing uor-foundation/SDK).
- ADR-050 (width-parametric arithmetic fold-rules) — the ring-axis
and hypercube-axis arithmetic PrimitiveOps (Neg/Bnot/Succ/Pred/
Add/Sub/Mul/Xor/And/Or, plus Div/Mod/Pow per ADR-053) evaluate at
the full Witt tower with width = max(operand widths) for binary
ops. The pre-ADR fold-rules silently truncated to u64, a
Correction-4-class soundness gap. Operands wider than result_width
are now rejected as ShapeViolation::CardinalityViolation; comparison
primitives Le/Lt/Ge/Gt and Concat retain byte-level semantics.
- ADR-051 (wide-value Term::Literal carrier) — Term::Literal widens
from `value: u64` to `value: TermValue` (byte sequence sized to
level.witt_length() / 8). Wide constants become single records
instead of Concat-of-narrow chains. SDK helper literal_u64(value,
level) preserves the narrow-construction surface.
- ADR-052 (axis! macro generic-form emission) — the companion
axis_extension_impl_for_<name>! macro accepts :ty (not just
:ident), admitting parametric impl types like
BigIntModularNumeric<BYTES> without hand-written AxisExtension
boilerplate. Existing call sites continue to work; SDK seal
discipline per ADR-022 D1 preserved.
- ADR-053 (Div/Mod/Pow PrimitiveOp catalog extension) — catalog
extends from 15 to 18 variants. Each is a folding-transformation
per ADR-053's coined principle (one fold = one Term variant, not
multiple Term variants the catamorphism walks). Div/Mod are
Euclidean (b=0 → ShapeViolation with the nonZeroDivisor IRI);
Pow is square-and-multiply modular exponentiation. Identity
individuals DV_1..DV_4 + PW_1..PW_3 added to the Lean corpus
commitment. GeometricCharacter gains Quotient/Remainder/
IteratedScaling.
Inline amendments:
- ADR-026 line ~670: Γ = {Add, Sub, Mul, Div, Mod, Pow} (six ring-
axis primitives on Z/(2^n)Z) — corrected from the prior five-
element form. Hypercube-axis ops {Xor, And, Or, Bnot} remain
separate per the MetricAxis enum.
- ADR-031 numerics sub-crate roster: substrate-native ring
arithmetic is closed under PrimitiveOp::{Add,Sub,Mul,Div,Mod,Pow};
substrate-native hypercube arithmetic under {Xor,And,Or,Bnot}.
BigIntAxis/FixedPointAxis/RingAxis dissolve into the substrate
PrimitiveOp catalog at the appropriate Witt-level. FieldAxis
retained for prime parametricity (PrimeFieldNumeric<P> instances).
prism-numerics' role shifts to publishing shapes plus compound
arithmetic verbs (modexp_p, polyeval, gcd, ext_euclidean, horner,
newton_step, fma, field_<add|sub|mul|inv><P>).
ADR-013 substrate-amendment paragraph + typed-iso surface
consolidation paragraph updated. Glossary entries added for
Folding-transformation (ADR-053's coined principle), literal_u64
(ADR-051's SDK helper), Term::Literal (wide-value carrier). PrimitiveOp
glossary entry updated to 18-variant catalog at the post-ADR-053
snapshot. Gauge-tower Γ entry corrected to the six-element form.
All 8 validators pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>