Addition in a Grind.Semiring is an associative operation.
Multiplication in a Grind.Semiring is an associative operation.
0 is a two-sided identity for addition in a Grind.Semiring.
1 is a two-sided identity for multiplication in a Grind.Semiring.
Pull the running accumulator out of a multiplicative fold-product, taking
the product from a 1 start. Stated for any associative multiplication with a
two-sided unit, so it applies to monoids that are not Grind rings (e.g. the
executable polynomial types).
Folding with a step that discards the element and returns the accumulator
unchanged yields the initial accumulator. (Core's List.foldl_const is the
unrelated iterate lemma, hence the name.)
A multiplicative fold-product is invariant under permuting the list.
Pull the running accumulator out of an additive fold-sum, taking the sum
from a 0 start. The additive twin of foldl_mul_eq_mul_foldl.
An additive fold-sum whose body adds a literal 0 returns the initial
accumulator.
Factor a right scalar out of an additive fold-sum (right distributivity, no commutativity needed).
An additive fold-sum of a pointwise sum splits into two folds, distributing the starting accumulator.
An additive fold-sum of a pointwise sum splits into two folds, given a splitting of the starting accumulator.
An additive fold-sum of a pointwise sum from 0 splits into the sum of the
two separate folds from 0.
An additive fold-sum of a pointwise difference splits into the difference of the two fold-sums, distributing the starting accumulator.
An additive fold-sum of a pointwise difference from 0 splits into the
difference of the two fold-sums from 0.
Sum-swap (Fubini) for nested additive fold-sums.
An additive fold-sum over a Nodup list whose summand is supported at a
single matching element collects exactly that summand.