AFTD Auto-Formalizing Theoretical Domains

singularValuesSorted_zero_eq_sup

theoremverifiedformalizationimported Lean

The 0th sorted singular value is the maximum of the singular values.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BigOperators Matrix in
variable {d : Type*} [Fintype d] [DecidableEq d] in
lemma singularValuesSorted_zero_eq_sup {e : Type*} [Fintype e] [DecidableEq e]
    (A : Matrix e e ℂ) (h : 0 < Fintype.card e) :
    singularValuesSorted A ⟨0, h⟩ = Finset.sup' Finset.univ
      (Finset.univ_nonempty_iff.mpr (Fintype.card_pos_iff.mp h))
      (singularValues A)
Formalizes
QuantumInfo, `singularValuesSorted_zero_eq_sup`
Lean proof
By Alex Meiburg, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2026 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.
Verified
17 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • singularValuesSorted_antitoneSorted singular values are antitone (decreasing).
  • singularValuesThe singular values of a square complex matrix A, defined as the square roots of the eigenvalues of A†A. These are indexed by d…
  • singularValuesSortedThe sorted singular values of a square complex matrix, in decreasing order, indexed by Fin (Fintype.card d). We define them by sorting…
Used by 2

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BigOperators Matrix in
variable {d : Type*} [Fintype d] [DecidableEq d] in
/-- The 0th sorted singular value is the maximum of the singular values. -/
lemma singularValuesSorted_zero_eq_sup {e : Type*} [Fintype e] [DecidableEq e]
    (A : Matrix e e ℂ) (h : 0 < Fintype.card e) :
    singularValuesSorted A ⟨0, h⟩ = Finset.sup' Finset.univ
      (Finset.univ_nonempty_iff.mpr (Fintype.card_pos_iff.mp h))
      (singularValues A) := by
  refine' le_antisymm _ _
  · -- Since the list is sorted in decreasing order, every element in the list is less than or equal to the supremum of the original set.
    have h_le_sup : ∀ x ∈ Multiset.sort (Multiset.map (singularValues A) Finset.univ.val) (· ≥ ·), x ≤ Finset.sup' Finset.univ (Finset.univ_nonempty_iff.mpr ⟨Classical.choose (Finset.card_pos.mp h)⟩) (singularValues A) := by
      aesop
    exact h_le_sup _ (by simp [singularValuesSorted])
  · have h_max_le_ge : ∀ i, singularValues A i ≤ singularValuesSorted A ⟨0, h⟩ := by
      intro i
      have h_max_le_ge : ∀ j, singularValuesSorted A j ≤ singularValuesSorted A ⟨0, h⟩ := by
        exact fun j => singularValuesSorted_antitone A (Nat.zero_le _)
      exact (by
      have h_max_le_ge : ∃ j, singularValues A i = singularValuesSorted A j := by
        have h_exists_j : singularValues A i ∈ Multiset.sort (Finset.univ.val.map (singularValues A)) (· ≥ ·) := by
          simp [Multiset.mem_sort]
        obtain ⟨j, hj⟩ := List.mem_iff_get.mp h_exists_j
        exact ⟨⟨j, by simpa using j.2⟩, hj.symm⟩
      aesop)
    exact Finset.sup'_le _ _ fun i _ => h_max_le_ge i
See it in the graphDiscuss this resultChallenge it