|
| 1 | +/- |
| 2 | +Copyright (c) 2025 William Coram. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: William Coram |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.Analysis.Normed.Ring.Basic |
| 9 | +public import Mathlib.RingTheory.MvPowerSeries.Basic |
| 10 | + |
| 11 | +/-! |
| 12 | +# Gauss norm for multivariate power series |
| 13 | +
|
| 14 | +This file defines the Gauss norm for power series. Given a multivariate power series `f`, a |
| 15 | +function `v : R → ℝ` and a tuple `c` of real numbers, the Gauss norm is defined as the supremum of |
| 16 | +the set of all values of `v (coeff t f) * ∏ i : t.support, c i` for all `t : σ →₀ ℕ`. |
| 17 | +
|
| 18 | +## Main definitions and results |
| 19 | +
|
| 20 | +* `MvPowerSeries.gaussNormC` is the supremum of the set of all values of |
| 21 | + `v (coeff t f) * ∏ i : t.support, c i` for all `t : σ →₀ ℕ`, where `f` is a multivariate power |
| 22 | + series, `v : R → ℝ` is a function and `c` is a tuple of real numbers. |
| 23 | +
|
| 24 | +* `MvPowerSeries.gaussNormC_nonneg`: if `v` is a non-negative function, then the Gauss norm is |
| 25 | + non-negative. |
| 26 | +
|
| 27 | +* `MvPowerSeries.gaussNormC_eq_zero_iff`: if `v` is a non-negative function and `v x = 0 ↔ x = 0` |
| 28 | + for all `x : R` and `c` is positive, then the Gauss norm is zero if and only if the power series |
| 29 | + is zero. |
| 30 | +
|
| 31 | +* `MvPowerSeries.gaussNorm_add_le_max`: if `v` is a non-negative non-archimedean function and the |
| 32 | + set of values `v (coeff t f) * ∏ i : t.support, c i` is bounded above (similarily for `g`), then |
| 33 | + the Gauss norm has the non-archimedean property. |
| 34 | +-/ |
| 35 | + |
| 36 | +@[expose] public section |
| 37 | + |
| 38 | +namespace MvPowerSeries |
| 39 | + |
| 40 | +variable {R σ : Type*} [Semiring R] (v : R → ℝ) (c : σ → ℝ) (f : MvPowerSeries σ R) |
| 41 | + |
| 42 | +/-- Given a multivariate power series `f` in, a function `v : R → ℝ` and a tuple `c` of real |
| 43 | + numbers, the Gauss norm is defined as the supremum of the set of all values of |
| 44 | + `v (coeff t f) * ∏ i : t.support, c i` for all `t : σ →₀ ℕ`. -/ |
| 45 | +noncomputable def gaussNorm : ℝ := |
| 46 | + ⨆ t : σ →₀ ℕ, v (coeff t f) * t.prod (c · ^ ·) |
| 47 | + |
| 48 | +/-- We say `f` HasGaussNorm if the values `v (coeff t f) * ∏ i : t.support, c i` is bounded above, |
| 49 | + that is `gaussNormC f` is finite. -/ |
| 50 | +abbrev HasGaussNorm := BddAbove (Set.range (fun (t : σ →₀ ℕ) ↦ (v (coeff t f) * t.prod (c · ^ ·)))) |
| 51 | + |
| 52 | +@[simp] |
| 53 | +theorem gaussNorm_zero (vZero : v 0 = 0) : gaussNorm v c 0 = 0 := by simp [gaussNorm, vZero] |
| 54 | + |
| 55 | +lemma le_gaussNorm (hbd : HasGaussNorm v c f) (t : σ →₀ ℕ) : |
| 56 | + v (coeff t f) * t.prod (c · ^ ·) ≤ gaussNorm v c f := by |
| 57 | + apply le_ciSup hbd |
| 58 | + |
| 59 | +lemma gaussNorm_nonneg (vNonneg : ∀ a, v a ≥ 0) : 0 ≤ gaussNorm v c f := by |
| 60 | + rw [gaussNorm] |
| 61 | + by_cases h : HasGaussNorm v c f |
| 62 | + · trans v (constantCoeff f) |
| 63 | + · simp [vNonneg] |
| 64 | + · convert (le_gaussNorm v c f h 0) |
| 65 | + simp |
| 66 | + · simp [h] |
| 67 | + |
| 68 | +lemma gaussNorm_eq_zero_iff (vZero : v 0 = 0) (vNonneg : ∀ a, v a ≥ 0) |
| 69 | + (h_eq_zero : ∀ x : R, v x = 0 → x = 0) (hc : ∀ i, 0 < c i) (hbd : HasGaussNorm v c f) : |
| 70 | + gaussNorm v c f = 0 ↔ f = 0 := by |
| 71 | + refine ⟨?_, fun hf ↦ by simp [hf, vZero]⟩ |
| 72 | + contrapose! |
| 73 | + intro hf |
| 74 | + apply ne_of_gt |
| 75 | + obtain ⟨n, hn⟩ := (MvPowerSeries.ne_zero_iff_exists_coeff_ne_zero f).mp hf |
| 76 | + calc |
| 77 | + 0 < v (f.coeff n) * ∏ i ∈ n.support, (c i) ^ (n i) := by |
| 78 | + apply mul_pos _ (by exact Finset.prod_pos fun i a ↦ (fun i ↦ pow_pos (hc i) (n i)) i) |
| 79 | + specialize h_eq_zero (f.coeff n) |
| 80 | + grind |
| 81 | + _ ≤ _ := le_gaussNorm v c f hbd n |
| 82 | + |
| 83 | +lemma gaussNorm_add_le_max (f g : MvPowerSeries σ R) (hc : 0 ≤ c) |
| 84 | + (vNonneg : ∀ a, v a ≥ 0) (hv : ∀ x y, v (x + y) ≤ max (v x) (v y)) |
| 85 | + (hbfd : HasGaussNorm v c f) (hbgd : HasGaussNorm v c g) : |
| 86 | + gaussNorm v c (f + g) ≤ max (gaussNorm v c f) (gaussNorm v c g) := by |
| 87 | + have H (t : σ →₀ ℕ) : 0 ≤ ∏ i ∈ t.support, c i ^ t i := |
| 88 | + Finset.prod_nonneg (fun i hi ↦ pow_nonneg (hc i) (t i)) |
| 89 | + have Final (t : σ →₀ ℕ) : v ((coeff t) (f + g)) * ∏ i ∈ t.support, c ↑i ^ t ↑i ≤ |
| 90 | + max (v ((coeff t) f) * ∏ i ∈ t.support, c ↑i ^ t ↑i) |
| 91 | + (v ((coeff t) g) * ∏ i ∈ t.support, c ↑i ^ t ↑i) := by |
| 92 | + specialize hv (coeff t f) (coeff t g) |
| 93 | + rcases max_choice (v ((coeff t) f)) (v ((coeff t) g)) with h | h |
| 94 | + · have : max (v ((coeff t) f) * ∏ i ∈ t.support, c ↑i ^ t ↑i) |
| 95 | + (v ((coeff t) g) * ∏ i ∈ t.support, c ↑i ^ t ↑i) = |
| 96 | + (v ((coeff t) f) * ∏ i ∈ t.support, c ↑i ^ t ↑i) := by |
| 97 | + simp only [sup_eq_left] |
| 98 | + exact mul_le_mul_of_nonneg (by aesop) (by aesop) (by aesop) (H t) |
| 99 | + simp_rw [this] |
| 100 | + exact mul_le_mul_of_nonneg (by aesop) (by aesop) (by aesop) (H t) |
| 101 | + · have : max (v ((coeff t) f) * ∏ i ∈ t.support, c ↑i ^ t ↑i) |
| 102 | + (v ((coeff t) g) * ∏ i ∈ t.support, c ↑i ^ t ↑i) = |
| 103 | + (v ((coeff t) g) * ∏ i ∈ t.support, c ↑i ^ t ↑i) := by |
| 104 | + simp only [sup_eq_right] |
| 105 | + exact mul_le_mul_of_nonneg (by aesop) (by aesop) (by aesop) (H t) |
| 106 | + simp_rw [this] |
| 107 | + exact mul_le_mul_of_nonneg (by aesop) (by aesop) (by aesop) (H t) |
| 108 | + refine Real.iSup_le ?_ ?_ |
| 109 | + · refine fun t ↦ calc |
| 110 | + _ ≤ _ := Final t |
| 111 | + _ ≤ max (gaussNorm v c f) (gaussNorm v c g) := by |
| 112 | + simp only [le_sup_iff] |
| 113 | + rcases max_choice (v ((coeff t) f) * ∏ i ∈ t.support, c i ^ t i) |
| 114 | + (v ((coeff t) g) * ∏ i ∈ t.support, c i ^ t i) with h | h |
| 115 | + · left |
| 116 | + simpa [h] using le_gaussNorm v c f hbfd t |
| 117 | + · right |
| 118 | + simpa [h] using le_gaussNorm v c g hbgd t |
| 119 | + · simp only [le_sup_iff] |
| 120 | + left |
| 121 | + exact gaussNorm_nonneg v c f vNonneg |
| 122 | + |
| 123 | +end MvPowerSeries |
0 commit comments