Matrix and vector notation #
This file defines notation for vectors and matrices. Given
a b c d : α,
the notation allows us to write
![a, b, c, d] : fin 4 → α.
Nesting vectors gives a matrix, so
![![a, b], ![c, d]] : matrix (fin 2) (fin 2) α.
This file includes
simp lemmas for applying operations in
data.matrix.basic to values built out of this notation.
Main definitions #
vec_emptyis the empty vector (or
vec_consprepends an entry to a vector, so
vec_cons a (vec_cons b vec_empty)
Implementation notes #
simp lemmas require that one of the arguments is of the form
vec_cons _ _.
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.
The main new notation is
![a, b], which gets expanded to
vec_cons a (vec_cons b vec_empty).
Examples of usage can be found in the
The following definitions and
simp lemmas are to allow any
numeral-indexed element of a vector given with matrix notation to
be extracted by
simp (even when the numeral is larger than the
number of elements in the vector, which is taken modulo that number
of elements by virtue of the semantics of
bit1 and of