@@ -437,11 +437,54 @@ lemma MeromorphicAt.eqOn_compl_singleton_toMeromorphicNFAt (hf : MeromorphicAt f
437437 toMeromorphicNFAt f x = 0 := by
438438 simp [toMeromorphicNFAt, hf]
439439
440+ @[simp] lemma toMeromorphicNFAt_of_meromorphicOrderAt_ne_zero
441+ (horder : meromorphicOrderAt f x ≠ 0 ) : toMeromorphicNFAt f x x = 0 := by
442+ have hmero : MeromorphicAt f x := meromorphicAt_of_meromorphicOrderAt_ne_zero horder
443+ simp [toMeromorphicNFAt, hmero, horder]
444+
445+ lemma MeromorphicAt.exists_analytic_and_toMeromorphicNFAt_eventuallyEq (hf : MeromorphicAt f x)
446+ (horder : meromorphicOrderAt f x = 0 ) :
447+ ∃ g : 𝕜 → E, AnalyticAt 𝕜 g x ∧ g x ≠ 0 ∧ toMeromorphicNFAt f x =ᶠ[𝓝 x] g := by
448+ obtain ⟨hanalytic, hgx, hg⟩ := Classical.choose_spec <|
449+ (meromorphicOrderAt_eq_int_iff hf).mp horder
450+ refine ⟨Classical.choose <| (meromorphicOrderAt_eq_int_iff hf).mp horder, hanalytic, hgx, ?_⟩
451+ apply eventuallyEq_nhds_of_eventuallyEq_nhdsNE
452+ · simp only [toMeromorphicNFAt, hf, ↓reduceDIte, horder, coe_zero, ne_eq, zpow_zero, one_smul]
453+ trans f
454+ · classical
455+ apply Function.update_eventuallyEq_nhdsNE
456+ rw [Filter.EventuallyEq]
457+ simp only [zpow_zero, ne_eq, one_smul] at hg
458+ convert! hg
459+ simp
460+ · simp [toMeromorphicNFAt, hf, horder]
461+
440462/-- Conversion to normal form at `x` changes the value only at x. -/
441463lemma MeromorphicAt.eq_nhdsNE_toMeromorphicNFAt (hf : MeromorphicAt f x) :
442464 f =ᶠ[𝓝[≠] x] toMeromorphicNFAt f x :=
443465 eventually_nhdsWithin_of_forall (fun _ hz ↦ hf.eqOn_compl_singleton_toMeromorphicNFAt hz)
444466
467+ @[gcongr]
468+ lemma toMeromorphicNFAt_congr {f g : 𝕜 → E} (hfg : f =ᶠ[𝓝[≠] x] g) :
469+ toMeromorphicNFAt f x x = toMeromorphicNFAt g x x := by
470+ by_cases hf : MeromorphicAt f x
471+ <;> obtain hg := (MeromorphicAt.meromorphicAt_congr hfg).eq ▸ hf
472+ · by_cases hforder : meromorphicOrderAt f x = 0
473+ <;> obtain hgorder := meromorphicOrderAt_congr hfg ▸ hforder
474+ · obtain ⟨f', hf'anl, _, hf'⟩ :=
475+ hf.exists_analytic_and_toMeromorphicNFAt_eventuallyEq hforder
476+ obtain ⟨g', hg'anl, _, hg'⟩ :=
477+ hg.exists_analytic_and_toMeromorphicNFAt_eventuallyEq hgorder
478+ have hf'g' : f' =ᶠ[𝓝[≠] x] g' := (hf'.symm.filter_mono nhdsWithin_le_nhds).trans <|
479+ hf.eq_nhdsNE_toMeromorphicNFAt.symm.trans <| hfg.trans <|
480+ hg.eq_nhdsNE_toMeromorphicNFAt.trans <|
481+ hg'.filter_mono nhdsWithin_le_nhds
482+ have heq : f' x = g' x := Filter.EventuallyEq.eq_of_nhds
483+ ((AnalyticAt.frequently_eq_iff_eventually_eq hf'anl hg'anl).mp hf'g'.frequently)
484+ exact hf'.eq_of_nhds.trans <| heq.trans hg'.eq_of_nhds.symm
485+ · simp [hforder, hgorder]
486+ · simp [hf, hg]
487+
445488/-- After conversion to normal form at `x`, the function has normal form. -/
446489theorem meromorphicNFAt_toMeromorphicNFAt :
447490 MeromorphicNFAt (toMeromorphicNFAt f x) x := by
0 commit comments