Physlib.Mathematics.SchurTriangulation
Schur triangulation
Schur triangulation is more commonly known as Schur decomposition or Schur triangularization, but "triangulation" makes the API more readable. It states that a square matrix over an algebraically closed field, e.g., `ℂ`, is unitarily similar to an upper triangular matrix.
Main definitions
- `Matrix.schur_triangulation` : a matrix `A : Matrix n n 𝕜` with `𝕜` being algebraically closed can be decomposed as `A = U * T * star U` where `U` is unitary and `T` is upper triangular. - `Matrix.schurTriangulationUnitary` : the unitary matrix `U` as previously stated. - `Matrix.schurTriangulation` : the upper triangular matrix `T` as previously stated. - Some auxiliary definitions are not meant to be used directly, but `LinearMap.SchurTriangulationAux.of` contains the main algorithm for the triangulation procedure.
Schur's recursive triangulation procedure
Given a linear endomorphism `f` on a non-trivial finite-dimensional vector space `E` over an algebraically closed field `𝕜`, one can always pick an eigenvalue `μ` of `f` whose corresponding eigenspace `V` is non-trivial. Given that `E` is also an inner product space, let `bV` and `bW` be orthonormal bases for `V` and `Vᗮ` respectively. Then, the collection of vectors in `bV` and `bW` forms an orthonormal basis `bE` for `E`, as the direct sum of `V` and `Vᗮ` is an internal decomposition of `E`. The matrix representation of `f` with respect to `bE` satisfies \[ \sideset{_\mathrm{bE}}{_\mathrm{bE}}{[f]} = \begin{bmatrix} \sideset{_\mathrm{bV}}{_\mathrm{bV}}{[f]} & \sideset{_\mathrm{bW}}{_\mathrm{bV}}{[f]} \\ \sideset{_\mathrm{bV}}{_\mathrm{bW}}{[f]} & \sideset{_\mathrm{bW}}{_\mathrm{bW}}{[f]} \end{bmatrix} = \begin{bmatrix} \mu I & □ \\ 0 & \sideset{_\mathrm{bW}}{_\mathrm{bW}}{[f]} \end{bmatrix}, \] which is upper triangular as long as $\sideset{_\mathrm{bW}}{_\mathrm{bW}}{[f]}$ is. Finally, one observes that the recursion from $\sideset{_\mathrm{bE}}{_\mathrm{bE}}{[f]}$ to $\sideset{_\mathrm{bW}}{_\mathrm{bW}}{[f]}$ is well-founded, as the dimension of `bW` is smaller than that of `bE` because `bV` is non-trivial.
However, in order to leverage `DirectSum.IsInternal.collectedOrthonormalBasis`, the type `Σ b, cond b (Fin m) (Fin n)` has to be used instead of the more natural `Fin m ⊕ Fin n` while their equivalence is propositionally established by `Equiv.sumEquivSigmalCond`.
15 declarations
for such that
Given a finite index and a proof that , this function returns the value as an element of the set .
The equivalence defines a bijection between the disjoint union of two finite sets and the dependent sum , where and . Here, denotes the set of natural numbers , and the mapping uses the conditional operator to select the appropriate set based on the boolean index .
The equivalence defines a bijection between the set of indices and the dependent sum , where and . For an index , the mapping is defined such that if , it corresponds to , and if , it corresponds to . This construction is used to partition basis indices during the recursive step of Schur triangulation.
maps to the true branch
Let and be natural numbers. For any index , if , then the equivalence maps to the element in the dependent sum , where is the proof that . In other words, indices less than are mapped to the first component (the "true" branch) of the partition.
maps to the false branch
Let and be natural numbers. For any index , if , then the equivalence maps to the element in the dependent sum . In this context, is treated as an element of , and the "false" branch corresponds to the second component of the partition.
Finiteness of the type
Given two finite types and , for any boolean value , the type defined by the conditional (which is if is and if is ) is also a finite type.
Decidable equality for the disjoint union
Given two types and that both possess decidable equality, the dependent sum type also possesses decidable equality. Here, evaluates to if is true and if is false, effectively representing the disjoint union . Two elements and in this type are equal if and only if and .
Matrix is upper triangular
Let be a type equipped with a less-than relation and be a commutative ring. A square matrix with entries in and indexed by is upper triangular if for all , the entry whenever .
Subtype of upper triangular matrices
For a type equipped with a less-than relation and a commutative ring , `Matrix.UpperTriangular n R` is the subtype consisting of all square matrices of size with entries in that are upper triangular. A matrix is upper triangular if its entries satisfy for all such that .
Schur triangulation of a linear map
Given a linear endomorphism on a finite-dimensional inner product space over an algebraically closed field , this definition implements the recursive algorithm for Schur triangulation (also known as Schur decomposition). It constructs an orthonormal basis for such that the matrix representation of the operator is upper triangular. The algorithm proceeds as follows: 1. If is trivial, it returns an empty basis. 2. If is non-trivial, it selects an eigenvalue and its corresponding eigenspace . 3. It considers the orthogonal complement and recursively applies the algorithm to the map defined by , where is the orthogonal projection onto . 4. The final orthonormal basis is formed by joining an orthonormal basis for with the orthonormal basis of obtained from the recursion.
Orthonormal basis and upper triangular matrix pair for the Schur triangulation of
Given a square matrix of size over an algebraically closed field , this definition provides a pair consisting of an orthonormal basis for the Euclidean space and an upper triangular matrix . The matrix is the matrix representation of the linear endomorphism with respect to the basis . The construction is obtained by adapting the recursive Schur triangulation algorithm for linear maps to the specific case of matrices acting on Euclidean space.
Orthonormal basis for the Schur triangulation of
Given a square matrix of size over an algebraically closed field , this definition provides the orthonormal basis of the Euclidean space such that the matrix representation of the linear operator with respect to is upper triangular. It is defined as the first component of the pair generated by the Schur triangulation algorithm `Matrix.schurTriangulationAux`.
Unitary matrix in the Schur decomposition of
Given a square matrix of size over an algebraically closed field (such as the complex numbers ), this definition provides the unitary matrix such that , where is an upper triangular matrix and is the conjugate transpose of . Specifically, is the change-of-basis matrix from the standard basis of the Euclidean space to the orthonormal basis (the Schur basis) derived during the triangulation procedure, meaning the columns of are the vectors of .
Upper triangular matrix in the Schur decomposition of
Given a square matrix of size over an algebraically closed field (such as the complex numbers ), this definition returns the upper triangular matrix that is unitarily similar to . Specifically, is the matrix such that for some unitary matrix , where for all indices such that . This matrix is the second component of the auxiliary Schur triangulation result, representing the linear map with respect to the orthonormal basis derived during the triangulation procedure.
Schur decomposition
For any square matrix over an algebraically closed field , the matrix can be decomposed as , where is the unitary matrix provided by `schurTriangulationUnitary`, is the upper triangular matrix provided by `schurTriangulation`, and denotes the conjugate transpose of .
