The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.Hessenberg.Similarity

10 declarations. Mathlib docs · Source

Certificate construction for Hessenberg similarity

mkHessenbergSimilarity constructs a Hessenberg.Similarity certificate and corresponding Hessenberg reduction from a literal matrix over ℚ (or more generally a ring S with f : S → ℚ).

Main definitions

  • mkHessenbergSimilarity: produce and elaborate the Hessenberg similarity certificate of a matrix literal.
  • SimilarityResult: the Hessenberg.Similarity certificate together with the reduction data.

Implementation notes

The untrusted computation reduce (in Mathlib.Tactic.Hessenberg.Reduce) produces L a unit lower triangular matrix, σ a permutation corresponding to the row and column swaps, and H an upper Hessenberg matrix.

The mkHessenbergSimilarity function certifies Aσ * L = L * H (where Aσ is the reindexing of A.map f by σ) via the products Aσ * L = P and L * H = P, each proved by certifyProductEq on the lists of rows.

The conditions that L is lower triangular with nonzero diagonal and H is upper Hessenberg are decided by the kernel.

theorem Mathlib.Tactic.Hessenberg.SimilarityResult.mk.injEq E0 #

∀ {n : ℕ} {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} (cert : Q(Matrix.Hessenberg.Similarity «$A»)) (Harr : Q(Array ℚ))
  (toArray_eq : Q(«$cert».H.toArray = «$Harr»)) (red : Mathlib.Tactic.Hessenberg.Reduction)
  (cert_1 : Q(Matrix.Hessenberg.Similarity «$A»)) (Harr_1 : Q(Array ℚ))
  (toArray_eq_1 : Q(«$cert_1».H.toArray = «$Harr_1»)) (red_1 : Mathlib.Tactic.Hessenberg.Reduction),
  ({ cert := cert, Harr := Harr, toArray_eq := toArray_eq, red := red } =
      { cert := cert_1, Harr := Harr_1, toArray_eq := toArray_eq_1, red := red_1 }) =
    (cert = cert_1 ∧ Harr = Harr_1 ∧ toArray_eq = toArray_eq_1 ∧ red = red_1)

def Mathlib.Tactic.Hessenberg.SimilarityResult.ctorIdx E1 #

{n : ℕ} → {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} → Mathlib.Tactic.Hessenberg.SimilarityResult A → ℕ

theorem Mathlib.Tactic.Hessenberg.SimilarityResult.mk.inj E1 #

∀ {n : ℕ} {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} {cert : Q(Matrix.Hessenberg.Similarity «$A»)} {Harr : Q(Array ℚ)}
  {toArray_eq : Q(«$cert».H.toArray = «$Harr»)} {red : Mathlib.Tactic.Hessenberg.Reduction}
  {cert_1 : Q(Matrix.Hessenberg.Similarity «$A»)} {Harr_1 : Q(Array ℚ)}
  {toArray_eq_1 : Q(«$cert_1».H.toArray = «$Harr_1»)} {red_1 : Mathlib.Tactic.Hessenberg.Reduction},
  { cert := cert, Harr := Harr, toArray_eq := toArray_eq, red := red } =
      { cert := cert_1, Harr := Harr_1, toArray_eq := toArray_eq_1, red := red_1 } →
    cert = cert_1 ∧ Harr = Harr_1 ∧ toArray_eq = toArray_eq_1 ∧ red = red_1

structure Mathlib.Tactic.Hessenberg.SimilarityResult E3 #

{n : ℕ} → Q(Matrix (Fin «$n») (Fin «$n») ℚ) → Type

The result of producing a Hessenberg similarity of A.

ctor Mathlib.Tactic.Hessenberg.SimilarityResult.mk E0 #

{n : ℕ} →
  {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} →
    (cert : Q(Matrix.Hessenberg.Similarity «$A»)) →
      (Harr : Q(Array ℚ)) →
        Q(«$cert».H.toArray = «$Harr») →
          Mathlib.Tactic.Hessenberg.Reduction → Mathlib.Tactic.Hessenberg.SimilarityResult A

abbrev Mathlib.Tactic.Hessenberg.SimilarityResult.cert E1 #

{n : ℕ} →
  {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} →
    Mathlib.Tactic.Hessenberg.SimilarityResult A → Q(Matrix.Hessenberg.Similarity «$A»)

The elaborated Matrix.Hessenberg.Similarity certificate term.

abbrev Mathlib.Tactic.Hessenberg.SimilarityResult.Harr E1 #

{n : ℕ} → {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} → Mathlib.Tactic.Hessenberg.SimilarityResult A → Q(Array ℚ)

The literal of the row-major array of the Hessenberg matrix of the certificate.

abbrev Mathlib.Tactic.Hessenberg.SimilarityResult.toArray_eq E0 #

{n : ℕ} →
  {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} →
    (self : Mathlib.Tactic.Hessenberg.SimilarityResult A) → Q(unknown_1.H.toArray = unknown_2)

The proof that Harr is the array of the Hessenberg matrix of the certificate.

abbrev Mathlib.Tactic.Hessenberg.SimilarityResult.red E1 #

{n : ℕ} →
  {A : Q(Matrix (Fin «$n») (Fin «$n») ℚ)} →
    Mathlib.Tactic.Hessenberg.SimilarityResult A → Mathlib.Tactic.Hessenberg.Reduction

The reduction data underlying the certificate.

def Mathlib.Tactic.Hessenberg.mkHessenbergSimilarity E3 #

{u : Lean.Level} →
  {S : Q(Type u)} →
    (f : Q(«$S» → ℚ)) →
      (n : ℕ) →
        (A : Q(Matrix (Fin «$n») (Fin «$n») «$S»)) →
          Array (Array Q(«$S»)) →
            (Q(«$S») → Lean.MetaM ℚ) → Lean.MetaM (Mathlib.Tactic.Hessenberg.SimilarityResult q(«$A».map «$f»))

Produce the Matrix.Hessenberg.Similarity certificate and corresponding reduction of A.map f for the n × n matrix literal A over S and the map f : S → ℚ, from the parsed entries entries of A, where evalEntry evaluates the image under f of an entry.