AFTD Auto-Formalizing Theoretical Domains

HermitianMat.nonSingular_iff_support_top

theoremverifiedformalizationimported Lean

HermitianMat.nonSingular_iff_support_top

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open HermitianMat in
variable {n m R π•œ : Type*} [Fintype n] [DecidableEq n] [Fintype m] [DecidableEq m] in
variable [CommRing R] [StarRing R] [RCLike π•œ] in
variable (A : HermitianMat n R) (B : HermitianMat m R) in
variable {A : HermitianMat n π•œ} {B : HermitianMat m π•œ} {C : Matrix n n π•œ} in
open ComplexOrder in
theorem HermitianMat.nonSingular_iff_support_top : NonSingular A ↔ A.support = ⊀
Formalizes
QuantumInfo, `HermitianMat.nonSingular_iff_support_top`
Lean proof
By Alex Meiburg, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Alex Meiburg. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
What was changed in HermitianMat.nonSingular_iff_support_top
--- QuantumInfo/ForMathlib/HermitianMat/NonSingular.lean:113 (HermitianMat.nonSingular_iff_support_top)
+++ as compiled here
@@ -1,3 +1,11 @@
-theorem nonSingular_iff_support_top : NonSingular A ↔ A.support = ⊀ := by
-  simp only [support, Submodule.eq_top_iff']
+set_option autoImplicit true in
+set_option relaxedAutoImplicit true in
+open HermitianMat in
+variable {n m R π•œ : Type*} [Fintype n] [DecidableEq n] [Fintype m] [DecidableEq m] in
+variable [CommRing R] [StarRing R] [RCLike π•œ] in
+variable (A : HermitianMat n R) (B : HermitianMat m R) in
+variable {A : HermitianMat n π•œ} {B : HermitianMat m π•œ} {C : Matrix n n π•œ} in
+open ComplexOrder in
+theorem HermitianMat.nonSingular_iff_support_top : NonSingular A ↔ A.support = ⊀ := by
+  simp only [HermitianMat.support, Submodule.eq_top_iff']
   refine ⟨fun hA ↦ ?_, fun hA ↦ ?_⟩
Verified
17 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 131
Used by 1

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open HermitianMat in
variable {n m R π•œ : Type*} [Fintype n] [DecidableEq n] [Fintype m] [DecidableEq m] in
variable [CommRing R] [StarRing R] [RCLike π•œ] in
variable (A : HermitianMat n R) (B : HermitianMat m R) in
variable {A : HermitianMat n π•œ} {B : HermitianMat m π•œ} {C : Matrix n n π•œ} in
open ComplexOrder in
theorem HermitianMat.nonSingular_iff_support_top : NonSingular A ↔ A.support = ⊀ := by
  simp only [HermitianMat.support, Submodule.eq_top_iff']
  refine ⟨fun hA ↦ ?_, fun hA ↦ ?_⟩
  Β· intro x
    have hA_inv : IsUnit A.mat := hA.isUnit
    rcases hA_inv.exists_right_inv with ⟨y, hy⟩
    exact ⟨WithLp.toLp 2 (y.mulVec x.ofLp), by
      apply PiLp.ext; intro i
      simp [lin, Matrix.toLpLin_apply, Matrix.mulVec_mulVec, hy]⟩
  Β· constructor
    have : Function.Surjective A.mat.mulVec := by
      intro y
      obtain ⟨x, hx⟩ := hA (WithLp.toLp 2 y)
      exact ⟨x.ofLp, by
        have := congr_arg WithLp.ofLp hx
        simp [lin, Matrix.toLpLin_apply] at this
        exact this⟩
    exact Matrix.mulVec_surjective_iff_isUnit.mp this
See it in the graphDiscuss this resultChallenge it