Skip to content

Commit a7c945e

Browse files
committed
refactor(Analysis): golf Mathlib/Analysis/Normed/Unbundled/SpectralNorm (leanprover-community#38646)
- rewrites `spectralValue_eq_zero_iff` via `eq_X_pow_iff_natDegree_le_natTrailingDegree` and `spectralValueTerms_of_lt_natDegree` - rewrites `spectralNorm.eq_of_normalClosure'` as two applications of `spectralNorm.eq_of_tower` - tidies `spectralNorm_unique` by switching the local transported structures to `set`/`letI`/`haveI` with `inferInstanceAs` Extracted from leanprover-community#37968 [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
1 parent f8e5374 commit a7c945e

1 file changed

Lines changed: 9 additions & 23 deletions

File tree

Mathlib/Analysis/Normed/Unbundled/SpectralNorm.lean

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -182,23 +182,14 @@ variable [NormedRing R]
182182
theorem spectralValue_eq_zero_iff [Nontrivial R] {p : R[X]} (hp : p.Monic) :
183183
spectralValue p = 0 ↔ p = X ^ p.natDegree := by
184184
refine ⟨fun h ↦ ?_, fun h ↦ h ▸ spectralValue_X_pow p.natDegree⟩
185-
rw [spectralValue] at h
186-
ext n
187-
rw [coeff_X_pow]
188-
split_ifs with hn
189-
· rw [hn, coeff_natDegree]; exact hp
190-
· by_cases hn' : n < p.natDegree
191-
· have h_le : iSup (spectralValueTerms p) ≤ 0 := h.le
192-
have h_exp : 0 < 1 / ((p.natDegree : ℝ) - n) := by
193-
rw [one_div_pos, ← cast_sub (le_of_lt hn'), cast_pos]
194-
exact Nat.sub_pos_of_lt hn'
195-
have h0 : (0 : ℝ) = 0 ^ (1 / ((p.natDegree : ℝ) - n)) := by rw [zero_rpow (ne_of_gt h_exp)]
196-
rw [iSup, csSup_le_iff (spectralValueTerms_bddAbove p) (Set.range_nonempty _)] at h_le
197-
specialize h_le (spectralValueTerms p n) ⟨n, rfl⟩
198-
simp only [spectralValueTerms, if_pos hn'] at h_le
199-
rw [h0, rpow_le_rpow_iff (norm_nonneg _) (le_refl _) h_exp] at h_le
200-
exact norm_eq_zero.mp (le_antisymm h_le (norm_nonneg _))
201-
· exact coeff_eq_zero_of_natDegree_lt (lt_of_le_of_ne (le_of_not_gt hn') (ne_comm.mpr hn))
185+
refine hp.eq_X_pow_iff_natDegree_le_natTrailingDegree.mpr <|
186+
le_natTrailingDegree hp.ne_zero fun n hn ↦ ?_
187+
have h0 : spectralValueTerms p n = 0 := by
188+
apply le_antisymm ((le_ciSup (spectralValueTerms_bddAbove p) n).trans h.le)
189+
exact spectralValueTerms_nonneg _ _
190+
rw [spectralValueTerms_of_lt_natDegree _ hn,
191+
Real.rpow_eq_zero_iff_of_nonneg (norm_nonneg _)] at h0
192+
exact norm_eq_zero.mp h0.1
202193

203194
end Normed
204195

@@ -406,12 +397,7 @@ theorem spectralNorm.eq_of_normalClosure' (x : E) :
406397
spectralNorm K (normalClosure K E (AlgebraicClosure E))
407398
(algebraMap E (normalClosure K E (AlgebraicClosure E)) x) =
408399
spectralNorm K L (algebraMap E L x) := by
409-
simp only [spectralNorm, spectralValue]
410-
have h_min : minpoly K (algebraMap (↥E) (↥(normalClosure K (↥E) (AlgebraicClosure ↥E))) x) =
411-
minpoly K (algebraMap (↥E) L x) := by
412-
rw [minpoly.algebraMap_eq (algebraMap (↥E) ↥(normalClosure K E (AlgebraicClosure E))).injective
413-
x, ← minpoly.algebraMap_eq (algebraMap (↥E) L).injective x]
414-
simp_rw [h_min]
400+
simp_rw [← spectralNorm.eq_of_tower]
415401

416402
/-- If `L/E/K` is a tower of fields and `x = algebraMap E L g`, then the spectral norm
417403
of `g : E` when regarded as an element of the normal closure of `E` equals the spectral norm

0 commit comments

Comments
 (0)