checkRingLaws
checkRingLaws<
T>(ring,samples):LawViolation<T>[]
Defined in: laws.ts:21
Checks the ring axioms against samples by exhaustive substitution.
O(n³) in the sample count — associativity and distributivity are ternary. Intended for property tests with a handful of hand-picked edge values, not for large sample sets.
Type Parameters
Section titled “Type Parameters”T
The carrier set.
Parameters
Section titled “Parameters”Ring<T>
Ring evidence for T.
samples
Section titled “samples”readonly T[]
Values to substitute into the axioms.
Returns
Section titled “Returns”LawViolation<T>[]
Every violation found, empty when the axioms hold.