Zulip Chat Archive
Stream: Is there code for X?
Topic: combining filters
Alex Kontorovich (Dec 29 2023 at 13:15):
Can someone please remind me what the tactic is for rewriting inside filters? E.g.:
import Mathlib
open Topology
example {f g h : ℝ → ℝ} {x : ℝ} (hfg : ∀ᶠ (y : ℝ) in 𝓝 x, f y = g y) (hgh : g =o[𝓝 x] h) :
f =o[𝓝 x] h := by sorry
Thanks!
David Loeffler (Dec 29 2023 at 13:24):
I'm not sure there's a tactic, per se, but there's a lemma IsLittleO.congr'
showing that you can exchange either side of a little-O statement with something eventually equal. Here's a one-liner:
example {f g h : ℝ → ℝ} {x : ℝ} (hfg : ∀ᶠ (y : ℝ) in 𝓝 x, f y = g y) (hgh : g =o[𝓝 x] h) :
f =o[𝓝 x] h := hgh.congr' (hfg.mp (eventually_of_forall (fun x hx ↦ hx.symm))) (by rfl)
Alex Kontorovich (Dec 29 2023 at 13:31):
Perfect, thanks!
Yury G. Kudryashov (Dec 29 2023 at 17:40):
See also docs#Filter.EventuallyEq.trans_isLittleO
Yury G. Kudryashov (Dec 29 2023 at 17:41):
And you can use it with calc
like
calc
f =ᶠ[𝓝 x] g := hfg
_ =o[𝓝 x] h := hgh
Last updated: May 02 2025 at 03:31 UTC