Skip to content

Commit 1bff4ef

Browse files
vasnesterovReemMelamed
authored andcommitted
feat(Tactic/ComputeAsymptotics/Multiseries): compute limits of Monomials (leanprover-community#37415)
Prove * `UnitMonomial.logToFun_isEquivalent_of_nonzero_head`: `log m.toFun` is asymptotically equivalent to its first summand - `m[0] • log basis[0]` if `m[0] ≠ 0`. Using this theorem we can prove that the asymptotic behavior of a monomial is determined by its first non-zero exponent. * `toFun_tendsto_top_of_FirstNonzeroIsPos` and its variants: used to infer the limit of `t.toFun` from `FirstNonzeroIsPos`/`FirstNonzeroIsNeg`/`AllZero`. * `IsLittleO_of_lt_exps` and its variants: used to asymptotically compare two monomials.
1 parent ed1b665 commit 1bff4ef

2 files changed

Lines changed: 382 additions & 1 deletion

File tree

Mathlib/Tactic/ComputeAsymptotics/Multiseries/Basis.lean

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Authors: Vasilii Nesterov
55
-/
66
module
77
public import Mathlib.Analysis.Complex.Exponential
8+
public import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
89
public import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
10+
public import Mathlib.Tactic.ComputeAsymptotics.Multiseries.Majorized
911

1012
/-!
1113
# Well-formed bases
@@ -156,6 +158,36 @@ theorem push_log_last {basis_hd : ℝ → ℝ} {basis_tl : Basis}
156158
simpa [List.getLast_of_getLast?_eq_some hg] using Real.isLittleO_log_id_atTop.comp_tendsto <|
157159
Real.tendsto_log_atTop.comp <| h_basis.tendsto_atTop <| List.mem_of_getLast? hg
158160

161+
/-- Auxillary lemma. If function `f` is eventually positive, `g` tends to `atTop`, and
162+
`log f =o[atTop] log g` then for any `a` and `b > 0`, then `f^a =o[atTop] g^b`. -/
163+
theorem pow_isLittleO_pow_of_log {f g : ℝ → ℝ} (a b : ℝ) (hf : ∀ᶠ x in atTop, 0 < f x)
164+
(hg : Tendsto g atTop atTop) (h : (Real.log ∘ f) =o[atTop] (Real.log ∘ g)) (hb : 0 < b) :
165+
(f ^ a) =o[atTop] (g ^ b) := by
166+
apply IsLittleO.of_tendsto_div_atTop
167+
apply Tendsto.congr' (f₁ := Real.exp ∘ (b • Real.log ∘ g - a • Real.log ∘ f))
168+
· refine (hf.and (hg.eventually_gt_atTop 0)).mono (fun x ⟨hf, hg⟩ ↦ ?_)
169+
simp [Real.exp_sub, mul_comm a, mul_comm b, Real.exp_mul, Real.exp_log hg, Real.exp_log hf]
170+
apply Real.tendsto_exp_atTop.comp
171+
have h' : (b • Real.log ∘ g - a • Real.log ∘ f) ~[atTop] b • Real.log ∘ g := by
172+
replace h : (a • Real.log ∘ f) =o[atTop] (b • Real.log ∘ g) :=
173+
(h.const_mul_left a).const_mul_right (hb.ne')
174+
grind only [IsEquivalent.sub_isLittleO, IsEquivalent.refl]
175+
rw [h'.tendsto_atTop_iff]
176+
apply Filter.Tendsto.const_mul_atTop hb
177+
apply Real.tendsto_log_atTop.comp hg
178+
179+
/-- Any power of function from a well-formed basis' tail is Majorized by
180+
basis' head with zero exponent. -/
181+
theorem tail_pow_majorized_head {hd f : ℝ → ℝ} {tl : Basis}
182+
(h_basis : WellFormedBasis (hd :: tl)) (hf : f ∈ tl) (r : ℝ) :
183+
Majorized (f ^ r) hd 0 := by
184+
intro exp h_exp
185+
apply pow_isLittleO_pow_of_log
186+
· exact h_basis.tail.eventually_pos.mono fun _ h ↦ h _ hf
187+
· exact h_basis.tendsto_atTop (by simp)
188+
· grind [WellFormedBasis, List.pairwise_cons]
189+
· exact h_exp
190+
159191
end WellFormedBasis
160192

161193
/-! ### Basis extensions -/

0 commit comments

Comments
 (0)