NLA-lib Explorer

Flat column-major indices

Library · Source module

Flat column-major indices

The flat index i + Nj of entry (i, j) of a column-major block with N rows determines (i, j) when i < N. Upstream candidate for Mathlib.Data.Nat.Init; the block bound i + Nj < Nk is Batteries' Nat.add_mul_lt_mul_of_lt_of_lt.

Main results

* Nat.add_mul_eq_add_mul_iff_of_lt: i + Nj = i' + Nj' if and only if i = i' and j = j', for i, i' < N.

Declarations