Matrix and vector notation #
This file includes simp
lemmas for applying operations in Data.Matrix.Basic
to values built out
of the matrix notation ![a, b] = vecCons a (vecCons b vecEmpty)
defined in
Data.Fin.VecNotation
.
This also provides the new notation !![a, b; c, d] = Matrix.of ![![a, b], ![c, d]]
.
This notation also works for empty matrices; !![,,,] : Matrix (Fin 0) (Fin 3)
and
!![;;;] : Matrix (Fin 3) (Fin 0)
.
Implementation notes #
The simp
lemmas require that one of the arguments is of the form vecCons _ _
.
This ensures simp
works with entries only when (some) entries are already given.
In other words, this notation will only appear in the output of simp
if it
already appears in the input.
Notations #
This file provide notation !![a, b; c, d]
for matrices, which corresponds to
Matrix.of ![![a, b], ![c, d]]
.
TODO: until we implement a Lean.PrettyPrinter.Unexpander
for Matrix.of
, the pretty-printer will
not show !!
notation, instead showing the version with of ![![...]]
.
Examples #
Examples of usage can be found in the test/matrix.lean
file.
Matrices can be reflected whenever their entries can. We insert a Matrix.of
to
prevent immediate decay to a function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Updating a row then removing it is the same as removing it.
Updating a column then removing it is the same as removing it.