NLA-lib Explorer

Index arithmetic

Library · Source module

Index arithmetic

The facts that a program proof needs about offsets: a row (or column) of a block stored by rows (or columns) is inside the block, the next row starts where the row ends, quotients and remainders of a linear offset, positions of the tape after i rounds that each read w entries. They are nonlinear in the sizes, so omega alone does not prove them; idx does, from the bounds of the loop variables in the context.

Main results

* NLAlib.Ops.Idx.mul_add_le_mul: i < k → i n + n ≤ k n, the fact behind every row in bounds. * NLAlib.Ops.Idx.add_lt_mul: i < m → j < p → i p + j < m p. * NLAlib.Ops.Idx.div_add, NLAlib.Ops.Idx.mod_add: the row and column of a row-major offset.

Declarations