@@ -125,27 +125,12 @@ theorem discrete_gronwall {n₀ : ℕ} (hun₀ : 0 ≤ u n₀)
125125/-- Discrete Grönwall inequality: uniform bound over an interval.
126126
127127Provides a uniform bound for all `n ∈ [n₀, n₁)`. -/
128- theorem discrete_gronwall_Ico
129- {n₀ n₁ : ℕ}
130- (hun₀ : 0 ≤ u n₀)
128+ theorem discrete_gronwall_Ico {n₀ n₁ : ℕ} (hun₀ : 0 ≤ u n₀)
131129 (hu : ∀ n ≥ n₀, u (n + 1 ) ≤ (1 + c n) * u n + b n)
132- (hc : ∀ n ≥ n₀, 0 ≤ c n)
133- (hb : ∀ n ≥ n₀, 0 ≤ b n) :
134- ∀ n ∈ Ico n₀ n₁,
135- u n ≤ (u n₀ + ∑ k ∈ Ico n₀ n₁, b k) * exp (∑ i ∈ Ico n₀ n₁, c i) := by
136- intro n hn
137- simp only [mem_Ico] at hn
138- have hsum_b : ∑ k ∈ Ico n₀ n, b k ≤ ∑ k ∈ Ico n₀ n₁, b k :=
139- sum_le_sum_of_subset_of_nonneg (Ico_subset_Ico_right (by omega))
140- fun i hi _ ↦ by simp only [mem_Ico] at hi; exact hb i (by omega)
141- have hsum_c : ∑ i ∈ Ico n₀ n, c i ≤ ∑ i ∈ Ico n₀ n₁, c i :=
142- sum_le_sum_of_subset_of_nonneg (Ico_subset_Ico_right (by omega))
143- fun i hi _ ↦ by simp only [mem_Ico] at hi; exact hc i (by omega)
144- have hsum_b₁_nonneg : 0 ≤ ∑ k ∈ Ico n₀ n₁, b k :=
145- sum_nonneg fun i hi ↦ by simp only [mem_Ico] at hi; exact hb i (by omega)
130+ (hc : ∀ n ≥ n₀, 0 ≤ c n) (hb : ∀ n ≥ n₀, 0 ≤ b n) ⦃n : ℕ⦄ (hn : n ∈ Ico n₀ n₁) :
131+ u n ≤ (u n₀ + ∑ k ∈ Ico n₀ n₁, b k) * exp (∑ i ∈ Ico n₀ n₁, c i) := by
132+ have hsum_b₁_nonneg : 0 ≤ ∑ k ∈ Ico n₀ n₁, b k := sum_nonneg <| by grind
146133 calc u n
147134 _ ≤ (u n₀ + ∑ k ∈ Ico n₀ n, b k) * exp (∑ i ∈ Ico n₀ n, c i) :=
148- discrete_gronwall hun₀ hu hc hb n hn.1
149- _ ≤ (u n₀ + ∑ k ∈ Ico n₀ n₁, b k) * exp (∑ i ∈ Ico n₀ n₁, c i) :=
150- mul_le_mul (by linarith) (exp_le_exp_of_le hsum_c) (by positivity)
151- (add_nonneg hun₀ hsum_b₁_nonneg)
135+ discrete_gronwall hun₀ hu hc hb (by grind)
136+ _ ≤ (u n₀ + ∑ k ∈ Ico n₀ n₁, b k) * exp (∑ i ∈ Ico n₀ n₁, c i) := by gcongr <;> grind
0 commit comments