@@ -850,31 +850,26 @@ lemma AnalyticOn.comp {f : F → G} {g : E → F} {s : Set F}
850850 AnalyticOn 𝕜 (f ∘ g) t :=
851851 fun x m ↦ (hf _ (h m)).comp (hg x m) h
852852
853+ -- Allow `to_fun` to eta-expand `g ∘ f`. Ideally, `Function.comp_def` would be a global pull lemma
854+ -- instead, which is not supported yet: see https://github.com/leanprover-community/mathlib4/issues/40183.
855+ attribute [local push ←] Function.comp_def
853856/-- If two functions `g` and `f` are analytic respectively at `f x` and `x`, then `g ∘ f` is
854857analytic at `x`. -/
855- @[fun_prop]
858+ @ [to_fun (attr := fun_prop) ]
856859theorem AnalyticAt.comp {g : F → G} {f : E → F} {x : E} (hg : AnalyticAt 𝕜 g (f x))
857860 (hf : AnalyticAt 𝕜 f x) : AnalyticAt 𝕜 (g ∘ f) x := by
858861 rw [← analyticWithinAt_univ] at hg hf ⊢
859862 apply hg.comp hf (by simp)
860863
861- /-- If two functions `g` and `f` are analytic respectively at `f x` and `x`, then `g ∘ f` is
862- analytic at `x`. -/
863- @[fun_prop]
864- theorem AnalyticAt.comp' {g : F → G} {f : E → F} {x : E} (hg : AnalyticAt 𝕜 g (f x))
865- (hf : AnalyticAt 𝕜 f x) : AnalyticAt 𝕜 (fun z ↦ g (f z)) x :=
866- hg.comp hf
864+ @ [deprecated (since := "2026-01-24" )] alias AnalyticAt.comp' := AnalyticAt.fun_comp
867865
868866/-- Version of `AnalyticAt.comp` where point equality is a separate hypothesis. -/
867+ @[to_fun]
869868theorem AnalyticAt.comp_of_eq {g : F → G} {f : E → F} {y : F} {x : E} (hg : AnalyticAt 𝕜 g y)
870869 (hf : AnalyticAt 𝕜 f x) (hy : f x = y) : AnalyticAt 𝕜 (g ∘ f) x := by
871870 rw [← hy] at hg
872871 exact hg.comp hf
873-
874- /-- Version of `AnalyticAt.comp` where point equality is a separate hypothesis. -/
875- theorem AnalyticAt.comp_of_eq' {g : F → G} {f : E → F} {y : F} {x : E} (hg : AnalyticAt 𝕜 g y)
876- (hf : AnalyticAt 𝕜 f x) (hy : f x = y) : AnalyticAt 𝕜 (fun z ↦ g (f z)) x := by
877- apply hg.comp_of_eq hf hy
872+ @ [deprecated (since := "2026-05-18" )] alias AnalyticAt.comp_of_eq' := AnalyticAt.fun_comp_of_eq
878873
879874theorem AnalyticAt.comp_analyticWithinAt {g : F → G} {f : E → F} {x : E} {s : Set E}
880875 (hg : AnalyticAt 𝕜 g (f x)) (hf : AnalyticWithinAt 𝕜 f s x) :
@@ -939,6 +934,7 @@ theorem HasFiniteFPowerSeriesAt.comp {m n : ℕ} {g : F → G} {f : E → F}
939934
940935/-- If two functions `g` and `f` are continuously polynomial respectively at `f x` and `x`,
941936then `g ∘ f` is continuously polynomial at `x`. -/
937+ @[to_fun]
942938theorem CPolynomialAt.comp {g : F → G} {f : E → F} {x : E}
943939 (hg : CPolynomialAt 𝕜 g (f x)) (hf : CPolynomialAt 𝕜 f x) :
944940 CPolynomialAt 𝕜 (g ∘ f) x := by
@@ -947,25 +943,13 @@ theorem CPolynomialAt.comp {g : F → G} {f : E → F} {x : E}
947943 refine ⟨q.comp p, m * (n + 1 ), ?_⟩
948944 exact hm.comp (hn.of_le (Nat.le_succ n)) (Nat.zero_lt_succ n)
949945
950- /-- If two functions `g` and `f` are continuously polynomial respectively at `f x` and `x`,
951- then `g ∘ f` is continuously polynomial at `x`. -/
952- theorem CPolynomialAt.fun_comp {g : F → G} {f : E → F} {x : E}
953- (hg : CPolynomialAt 𝕜 g (f x)) (hf : CPolynomialAt 𝕜 f x) :
954- CPolynomialAt 𝕜 (fun z ↦ g (f z)) x :=
955- hg.comp hf
956-
957946/-- Version of `CPolynomialAt.comp` where point equality is a separate hypothesis. -/
947+ @[to_fun]
958948theorem CPolynomialAt.comp_of_eq {g : F → G} {f : E → F} {y : F} {x : E} (hg : CPolynomialAt 𝕜 g y)
959949 (hf : CPolynomialAt 𝕜 f x) (hy : f x = y) : CPolynomialAt 𝕜 (g ∘ f) x := by
960950 rw [← hy] at hg
961951 exact hg.comp hf
962952
963- /-- Version of `CPolynomialAt.comp` where point equality is a separate hypothesis. -/
964- theorem CPolynomialAt.fun_comp_of_eq {g : F → G} {f : E → F} {y : F} {x : E}
965- (hg : CPolynomialAt 𝕜 g y) (hf : CPolynomialAt 𝕜 f x) (hy : f x = y) :
966- CPolynomialAt 𝕜 (fun z ↦ g (f z)) x :=
967- hg.comp_of_eq hf hy
968-
969953/-- If two functions `g` and `f` are continuously polynomial respectively on `s.image f` and `s`,
970954then `g ∘ f` is continuously polynomial on `s`. -/
971955theorem CPolynomialOn.comp' {s : Set E} {g : F → G} {f : E → F} (hg : CPolynomialOn 𝕜 g (s.image f))
0 commit comments