Skip to content

Commit 0f7bb9c

Browse files
committed
chore: backports for leanprover/lean4#4814 (part 33) (#15605)
1 parent 0d96394 commit 0f7bb9c

File tree

25 files changed

+182
-151
lines changed

25 files changed

+182
-151
lines changed

Mathlib/Algebra/Homology/DerivedCategory/Ext.lean

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -238,18 +238,7 @@ lemma mk₀_zero : mk₀ (0 : X ⟶ Y) = 0 := by
238238

239239
section
240240

241-
variable [HasDerivedCategory.{w'} C]
242-
243-
variable (X Y n) in
244-
@[simp]
245-
lemma zero_hom : (0 : Ext X Y n).hom = 0 := by
246-
let β : Ext 0 Y n := 0
247-
have hβ : β.hom = 0 := by apply (Functor.map_isZero _ (isZero_zero C)).eq_of_src
248-
have : (0 : Ext X Y n) = (0 : Ext X 0 0).comp β (zero_add n) := by simp [β]
249-
rw [this, comp_hom, hβ, ShiftedHom.comp_zero]
250-
251-
attribute [local instance] preservesBinaryBiproductsOfPreservesBiproducts
252-
241+
attribute [local instance] preservesBinaryBiproductsOfPreservesBiproducts in
253242
lemma biprod_ext {X₁ X₂ : C} {α β : Ext (X₁ ⊞ X₂) Y n}
254243
(h₁ : (mk₀ biprod.inl).comp α (zero_add n) = (mk₀ biprod.inl).comp β (zero_add n))
255244
(h₂ : (mk₀ biprod.inr).comp α (zero_add n) = (mk₀ biprod.inr).comp β (zero_add n)) :
@@ -262,6 +251,16 @@ lemma biprod_ext {X₁ X₂ : C} {α β : Ext (X₁ ⊞ X₂) Y n}
262251
(BinaryBiproduct.isBilimit X₁ X₂)).isColimit
263252
all_goals assumption
264253

254+
variable [HasDerivedCategory.{w'} C]
255+
256+
variable (X Y n) in
257+
@[simp]
258+
lemma zero_hom : (0 : Ext X Y n).hom = 0 := by
259+
let β : Ext 0 Y n := 0
260+
have hβ : β.hom = 0 := by apply (Functor.map_isZero _ (isZero_zero C)).eq_of_src
261+
have : (0 : Ext X Y n) = (0 : Ext X 0 0).comp β (zero_add n) := by simp [β]
262+
rw [this, comp_hom, hβ, ShiftedHom.comp_zero]
263+
265264
@[simp]
266265
lemma add_hom (α β : Ext X Y n) : (α + β).hom = α.hom + β.hom := by
267266
let α' : Ext (X ⊞ X) Y n := (mk₀ biprod.fst).comp α (zero_add n)

Mathlib/Algebra/Lie/CartanExists.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace LieAlgebra
3232
section CommRing
3333

3434
variable {K R L M : Type*}
35-
variable [Field K] [CommRing R] [Nontrivial R]
35+
variable [Field K] [CommRing R]
3636
variable [LieRing L] [LieAlgebra K L] [LieAlgebra R L]
3737
variable [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M]
3838
variable [Module.Finite K L]
@@ -83,7 +83,7 @@ def lieCharpoly : Polynomial R[X] :=
8383
lemma lieCharpoly_monic : (lieCharpoly R M x y).Monic :=
8484
(polyCharpoly_monic _ _).map _
8585

86-
lemma lieCharpoly_natDegree : (lieCharpoly R M x y).natDegree = finrank R M := by
86+
lemma lieCharpoly_natDegree [Nontrivial R] : (lieCharpoly R M x y).natDegree = finrank R M := by
8787
rw [lieCharpoly, (polyCharpoly_monic _ _).natDegree_map, polyCharpoly_natDegree]
8888

8989
variable {R} in
@@ -97,7 +97,7 @@ lemma lieCharpoly_map_eval (r : R) :
9797
map_add, map_mul, aeval_C, Algebra.id.map_eq_id, RingHom.id_apply, aeval_X, aux,
9898
MvPolynomial.coe_aeval_eq_eval, polyCharpoly_map_eq_charpoly, LieHom.coe_toLinearMap]
9999

100-
lemma lieCharpoly_coeff_natDegree (i j : ℕ) (hij : i + j = finrank R M) :
100+
lemma lieCharpoly_coeff_natDegree [Nontrivial R] (i j : ℕ) (hij : i + j = finrank R M) :
101101
((lieCharpoly R M x y).coeff i).natDegree ≤ j := by
102102
classical
103103
rw [← mul_one j, lieCharpoly, coeff_map]

Mathlib/Algebra/Lie/Killing.lean

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ attribute [simp] IsKilling.killingCompl_top_eq_bot
5454

5555
namespace IsKilling
5656

57-
variable [Module.Free R L] [Module.Finite R L] [IsKilling R L]
57+
variable [IsKilling R L]
5858

5959
@[simp] lemma ker_killingForm_eq_bot :
6060
LinearMap.ker (killingForm R L) = ⊥ := by
@@ -65,7 +65,8 @@ lemma killingForm_nondegenerate :
6565
simp [LinearMap.BilinForm.nondegenerate_iff_ker_eq_bot]
6666

6767
variable {R L} in
68-
lemma ideal_eq_bot_of_isLieAbelian [IsDomain R] [IsPrincipalIdealRing R]
68+
lemma ideal_eq_bot_of_isLieAbelian
69+
[Module.Free R L] [Module.Finite R L] [IsDomain R] [IsPrincipalIdealRing R]
6970
(I : LieIdeal R L) [IsLieAbelian I] : I = ⊥ := by
7071
rw [eq_bot_iff, ← killingCompl_top_eq_bot]
7172
exact I.le_killingCompl_top_of_isLieAbelian
@@ -83,7 +84,9 @@ over fields with positive characteristic.
8384
8485
Note that when the coefficients are a field this instance is redundant since we have
8586
`LieAlgebra.IsKilling.instSemisimple` and `LieAlgebra.IsSemisimple.instHasTrivialRadical`. -/
86-
instance instHasTrivialRadical [IsDomain R] [IsPrincipalIdealRing R] : HasTrivialRadical R L :=
87+
instance instHasTrivialRadical
88+
[Module.Free R L] [Module.Finite R L] [IsDomain R] [IsPrincipalIdealRing R] :
89+
HasTrivialRadical R L :=
8790
(hasTrivialRadical_iff_no_abelian_ideals R L).mpr IsKilling.ideal_eq_bot_of_isLieAbelian
8891

8992
end IsKilling

Mathlib/Algebra/Lie/Weights/Linear.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ class LinearWeights [LieAlgebra.IsNilpotent R L] : Prop :=
5555

5656
namespace Weight
5757

58-
variable [LieAlgebra.IsNilpotent R L] [LinearWeights R L M]
59-
[NoZeroSMulDivisors R M] [IsNoetherian R M] (χ : Weight R L M)
58+
variable [LieAlgebra.IsNilpotent R L] [LinearWeights R L M] (χ : Weight R L M)
6059

6160
/-- A weight of a Lie module, bundled as a linear map. -/
6261
@[simps]
@@ -155,7 +154,7 @@ instance instLinearWeightsOfCharZero [CharZero R] :
155154

156155
end FiniteDimensional
157156

158-
variable [LieAlgebra.IsNilpotent R L] [LinearWeights R L M] (χ : L → R)
157+
variable [LieAlgebra.IsNilpotent R L] (χ : L → R)
159158

160159
/-- A type synonym for the `χ`-weight space but with the action of `x : L` on `m : weightSpace M χ`,
161160
shifted to act as `⁅x, m⁆ - χ x • m`. -/
@@ -166,6 +165,8 @@ namespace shiftedWeightSpace
166165
private lemma aux [h : Nontrivial (shiftedWeightSpace R L M χ)] : weightSpace M χ ≠ ⊥ :=
167166
(LieSubmodule.nontrivial_iff_ne_bot _ _ _).mp h
168167

168+
variable [LinearWeights R L M]
169+
169170
instance : LieRingModule L (shiftedWeightSpace R L M χ) where
170171
bracket x m := ⁅x, m⁆ - χ x • m
171172
add_lie x y m := by
@@ -217,7 +218,7 @@ end shiftedWeightSpace
217218
/-- Given a Lie module `M` of a Lie algebra `L` with coefficients in `R`, if a function `χ : L → R`
218219
has a simultaneous generalized eigenvector for the action of `L` then it has a simultaneous true
219220
eigenvector, provided `M` is Noetherian and has linear weights. -/
220-
lemma exists_forall_lie_eq_smul [IsNoetherian R M] (χ : Weight R L M) :
221+
lemma exists_forall_lie_eq_smul [LinearWeights R L M] [IsNoetherian R M] (χ : Weight R L M) :
221222
∃ m : M, m ≠ 0 ∧ ∀ x : L, ⁅x, m⁆ = χ x • m := by
222223
replace hχ : Nontrivial (shiftedWeightSpace R L M χ) :=
223224
(LieSubmodule.nontrivial_iff_ne_bot R L M).mpr χ.weightSpace_ne_bot

Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Unitary.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ section Generic
2020

2121
variable {R A : Type*} {p : A → Prop} [CommRing R] [StarRing R] [MetricSpace R]
2222
variable [TopologicalRing R] [ContinuousStar R] [TopologicalSpace A] [Ring A] [StarRing A]
23-
variable [Algebra R A] [StarModule R A] [ContinuousFunctionalCalculus R p]
23+
variable [Algebra R A] [ContinuousFunctionalCalculus R p]
2424

2525
lemma cfc_unitary_iff (f : R → R) (a : A) (ha : p a := by cfc_tac)
2626
(hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) :
@@ -35,7 +35,7 @@ end Generic
3535
section Complex
3636

3737
variable {A : Type*} [TopologicalSpace A] [Ring A] [StarRing A] [Algebra ℂ A]
38-
[StarModule ℂ A] [ContinuousFunctionalCalculus ℂ (IsStarNormal : A → Prop)]
38+
[ContinuousFunctionalCalculus ℂ (IsStarNormal : A → Prop)]
3939

4040
lemma unitary_iff_isStarNormal_and_spectrum_subset_unitary {u : A} :
4141
u ∈ unitary A ↔ IsStarNormal u ∧ spectrum ℂ u ⊆ unitary ℂ := by

Mathlib/Analysis/Calculus/FDeriv/Measurable.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,7 @@ that the differentiability set `D` is measurable. -/
787787
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
788788
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [LocallyCompactSpace E]
789789
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
790-
{α : Type*} [TopologicalSpace α] [MeasurableSpace α] [MeasurableSpace E]
791-
[OpensMeasurableSpace α] [OpensMeasurableSpace E]
790+
{α : Type*} [TopologicalSpace α]
792791
{f : α → E → F} (K : Set (E →L[𝕜] F))
793792

794793
namespace FDerivMeasurableAux
@@ -873,6 +872,8 @@ end FDerivMeasurableAux
873872

874873
open FDerivMeasurableAux
875874

875+
variable [MeasurableSpace α] [OpensMeasurableSpace α] [MeasurableSpace E] [OpensMeasurableSpace E]
876+
876877
theorem measurableSet_of_differentiableAt_of_isComplete_with_param
877878
(hf : Continuous f.uncurry) {K : Set (E →L[𝕜] F)} (hK : IsComplete K) :
878879
MeasurableSet {p : α × E | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ K} := by

Mathlib/Analysis/Fourier/AddCircle.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ theorem coeFn_fourierLp (p : ℝ≥0∞) [Fact (1 ≤ p)] (n : ℤ) :
243243
theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) :
244244
(span ℂ (range (@fourierLp T _ p _))).topologicalClosure = ⊤ := by
245245
convert
246-
(ContinuousMap.toLp_denseRange ℂ (@haarAddCircle T hT) hp ℂ).topologicalClosure_map_submodule
246+
(ContinuousMap.toLp_denseRange ℂ (@haarAddCircle T hT) ℂ hp).topologicalClosure_map_submodule
247247
span_fourier_closure_eq_top
248248
erw [map_span, range_comp]
249249
simp only [ContinuousLinearMap.coe_coe]

Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ theorem separate_convex_open_set [TopologicalSpace E] [AddCommGroup E] [Topologi
7575
one_le_gauge_of_not_mem (hs₁.starConvex hs₀)
7676
(absorbent_nhds_zero <| hs₂.mem_nhds hs₀).absorbs hx₀
7777

78-
variable [TopologicalSpace E] [AddCommGroup E] [TopologicalAddGroup E] [Module ℝ E]
79-
[ContinuousSMul ℝ E] {s t : Set E} {x y : E}
78+
variable [TopologicalSpace E] [AddCommGroup E] [Module ℝ E]
79+
{s t : Set E} {x y : E}
80+
section
81+
82+
variable [TopologicalAddGroup E] [ContinuousSMul ℝ E]
8083

8184
/-- A version of the **Hahn-Banach theorem**: given disjoint convex sets `s`, `t` where `s` is open,
8285
there is a continuous linear functional which separates them. -/
@@ -203,6 +206,8 @@ theorem iInter_halfspaces_eq (hs₁ : Convex ℝ s) (hs₂ : IsClosed s) :
203206
obtain ⟨y, hy, hxy⟩ := hx l
204207
exact ((hxy.trans_lt (hlA y hy)).trans hl).not_le le_rfl
205208

209+
end
210+
206211
namespace RCLike
207212

208213
variable [RCLike 𝕜] [Module 𝕜 E] [ContinuousSMul 𝕜 E] [IsScalarTower ℝ 𝕜 E]
@@ -218,12 +223,12 @@ noncomputable def extendTo𝕜'ₗ : (E →L[ℝ] ℝ) →ₗ[ℝ] (E →L[𝕜]
218223
map_smul' := by intros; ext; simp [h, real_smul_eq_coe_mul]; ring }
219224

220225
@[simp]
221-
lemma re_extendTo𝕜'ₗ (g : E →L[ℝ] ℝ) (x : E) : re ((extendTo𝕜'ₗ g) x : 𝕜) = g x := by
226+
lemma re_extendTo𝕜'ₗ (g : E →L[ℝ] ℝ) (x : E) : re ((extendTo𝕜'ₗ g) x : 𝕜) = g x := by
222227
have h g (x : E) : extendTo𝕜'ₗ g x = ((g x : 𝕜) - (I : 𝕜) * (g ((I : 𝕜) • x) : 𝕜)) := rfl
223228
simp only [h , map_sub, ofReal_re, mul_re, I_re, zero_mul, ofReal_im, mul_zero,
224229
sub_self, sub_zero]
225230

226-
variable [ContinuousSMul ℝ E]
231+
variable [TopologicalAddGroup E] [ContinuousSMul ℝ E]
227232

228233
theorem separate_convex_open_set {s : Set E}
229234
(hs₀ : (0 : E) ∈ s) (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) {x₀ : E} (hx₀ : x₀ ∉ s) :

Mathlib/Combinatorics/SimpleGraph/LapMatrix.lean

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ open Finset Matrix
2828
namespace SimpleGraph
2929

3030
variable {V : Type*} (R : Type*)
31-
variable [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj]
31+
variable [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
32+
33+
theorem degree_eq_sum_if_adj {R : Type*} [AddCommMonoidWithOne R] (i : V) :
34+
(G.degree i : R) = ∑ j : V, if G.Adj i j then 1 else 0 := by
35+
unfold degree neighborFinset neighborSet
36+
rw [sum_boole, Set.toFinset_setOf]
37+
38+
variable [DecidableEq V]
3239

3340
/-- The diagonal matrix consisting of the degrees of the vertices in the graph. -/
3441
def degMatrix [AddMonoidWithOne R] : Matrix V V R := Matrix.diagonal (G.degree ·)
@@ -64,11 +71,6 @@ theorem dotProduct_mulVec_degMatrix [CommRing R] (x : V → R) :
6471

6572
variable (R)
6673

67-
theorem degree_eq_sum_if_adj [AddCommMonoidWithOne R] (i : V) :
68-
(G.degree i : R) = ∑ j : V, if G.Adj i j then 1 else 0 := by
69-
unfold degree neighborFinset neighborSet
70-
rw [sum_boole, Set.toFinset_setOf]
71-
7274
/-- Let $L$ be the graph Laplacian and let $x \in \mathbb{R}$, then
7375
$$x^{\top} L x = \sum_{i \sim j} (x_{i}-x_{j})^{2}$$,
7476
where $\sim$ denotes the adjacency relation -/

Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ open Set ChartedSpace SmoothManifoldWithCorners
1919
open scoped Topology Manifold
2020

2121
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
22-
-- declare a smooth manifold `M` over the pair `(E, H)`.
22+
-- declare a charted space `M` over the pair `(E, H)`.
2323
{E : Type*}
2424
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
2525
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
26-
[SmoothManifoldWithCorners I M]
2726
-- declare a smooth manifold `M'` over the pair `(E', H')`.
2827
{E' : Type*}
2928
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
@@ -120,49 +119,6 @@ theorem ContinuousLinearMap.contMDiffOn (L : E →L[𝕜] F) {s} : ContMDiffOn
120119

121120
theorem ContinuousLinearMap.smooth (L : E →L[𝕜] F) : Smooth 𝓘(𝕜, E) 𝓘(𝕜, F) L := L.contMDiff
122121

123-
theorem ContMDiffWithinAt.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁} {s : Set M} {x : M}
124-
(hg : ContMDiffWithinAt I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g s x)
125-
(hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f s x) :
126-
ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n (fun x => (g x).comp (f x)) s x :=
127-
ContDiff.comp_contMDiffWithinAt (g := fun x : (F₁ →L[𝕜] F₃) × (F₂ →L[𝕜] F₁) => x.1.comp x.2)
128-
(f := fun x => (g x, f x)) (contDiff_fst.clm_comp contDiff_snd) (hg.prod_mk_space hf)
129-
130-
theorem ContMDiffAt.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁} {x : M}
131-
(hg : ContMDiffAt I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g x) (hf : ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f x) :
132-
ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n (fun x => (g x).comp (f x)) x :=
133-
(hg.contMDiffWithinAt.clm_comp hf.contMDiffWithinAt).contMDiffAt Filter.univ_mem
134-
135-
theorem ContMDiffOn.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁} {s : Set M}
136-
(hg : ContMDiffOn I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g s) (hf : ContMDiffOn I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f s) :
137-
ContMDiffOn I 𝓘(𝕜, F₂ →L[𝕜] F₃) n (fun x => (g x).comp (f x)) s := fun x hx =>
138-
(hg x hx).clm_comp (hf x hx)
139-
140-
theorem ContMDiff.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁}
141-
(hg : ContMDiff I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g) (hf : ContMDiff I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f) :
142-
ContMDiff I 𝓘(𝕜, F₂ →L[𝕜] F₃) n fun x => (g x).comp (f x) := fun x => (hg x).clm_comp (hf x)
143-
144-
theorem ContMDiffWithinAt.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁} {s : Set M} {x : M}
145-
(hg : ContMDiffWithinAt I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g s x)
146-
(hf : ContMDiffWithinAt I 𝓘(𝕜, F₁) n f s x) :
147-
ContMDiffWithinAt I 𝓘(𝕜, F₂) n (fun x => g x (f x)) s x :=
148-
@ContDiffWithinAt.comp_contMDiffWithinAt _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
149-
(fun x : (F₁ →L[𝕜] F₂) × F₁ => x.1 x.2) (fun x => (g x, f x)) s _ x
150-
(by apply ContDiff.contDiffAt; exact contDiff_fst.clm_apply contDiff_snd) (hg.prod_mk_space hf)
151-
(by simp_rw [preimage_univ, subset_univ])
152-
153-
nonrec theorem ContMDiffAt.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁} {x : M}
154-
(hg : ContMDiffAt I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g x) (hf : ContMDiffAt I 𝓘(𝕜, F₁) n f x) :
155-
ContMDiffAt I 𝓘(𝕜, F₂) n (fun x => g x (f x)) x :=
156-
hg.clm_apply hf
157-
158-
theorem ContMDiffOn.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁} {s : Set M}
159-
(hg : ContMDiffOn I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g s) (hf : ContMDiffOn I 𝓘(𝕜, F₁) n f s) :
160-
ContMDiffOn I 𝓘(𝕜, F₂) n (fun x => g x (f x)) s := fun x hx => (hg x hx).clm_apply (hf x hx)
161-
162-
theorem ContMDiff.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁}
163-
(hg : ContMDiff I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g) (hf : ContMDiff I 𝓘(𝕜, F₁) n f) :
164-
ContMDiff I 𝓘(𝕜, F₂) n fun x => g x (f x) := fun x => (hg x).clm_apply (hf x)
165-
166122
theorem ContMDiffWithinAt.clm_precomp {f : M → F₁ →L[𝕜] F₂} {s : Set M} {x : M}
167123
(hf : ContMDiffWithinAt I 𝓘(𝕜, F₁ →L[𝕜] F₂) n f s x) :
168124
ContMDiffWithinAt I 𝓘(𝕜, (F₂ →L[𝕜] F₃) →L[𝕜] (F₁ →L[𝕜] F₃)) n
@@ -211,6 +167,52 @@ theorem ContMDiff.clm_postcomp {f : M → F₂ →L[𝕜] F₃} (hf : ContMDiff
211167
(fun y ↦ (f y).postcomp F₁ : M → (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) := fun x ↦
212168
(hf x).clm_postcomp
213169

170+
-- Now make `M` a smooth manifold.
171+
variable [SmoothManifoldWithCorners I M]
172+
173+
theorem ContMDiffWithinAt.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁} {s : Set M} {x : M}
174+
(hg : ContMDiffWithinAt I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g s x)
175+
(hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f s x) :
176+
ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n (fun x => (g x).comp (f x)) s x :=
177+
ContDiff.comp_contMDiffWithinAt (g := fun x : (F₁ →L[𝕜] F₃) × (F₂ →L[𝕜] F₁) => x.1.comp x.2)
178+
(f := fun x => (g x, f x)) (contDiff_fst.clm_comp contDiff_snd) (hg.prod_mk_space hf)
179+
180+
theorem ContMDiffAt.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁} {x : M}
181+
(hg : ContMDiffAt I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g x) (hf : ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f x) :
182+
ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n (fun x => (g x).comp (f x)) x :=
183+
(hg.contMDiffWithinAt.clm_comp hf.contMDiffWithinAt).contMDiffAt Filter.univ_mem
184+
185+
theorem ContMDiffOn.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁} {s : Set M}
186+
(hg : ContMDiffOn I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g s) (hf : ContMDiffOn I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f s) :
187+
ContMDiffOn I 𝓘(𝕜, F₂ →L[𝕜] F₃) n (fun x => (g x).comp (f x)) s := fun x hx =>
188+
(hg x hx).clm_comp (hf x hx)
189+
190+
theorem ContMDiff.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁}
191+
(hg : ContMDiff I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g) (hf : ContMDiff I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f) :
192+
ContMDiff I 𝓘(𝕜, F₂ →L[𝕜] F₃) n fun x => (g x).comp (f x) := fun x => (hg x).clm_comp (hf x)
193+
194+
theorem ContMDiffWithinAt.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁} {s : Set M} {x : M}
195+
(hg : ContMDiffWithinAt I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g s x)
196+
(hf : ContMDiffWithinAt I 𝓘(𝕜, F₁) n f s x) :
197+
ContMDiffWithinAt I 𝓘(𝕜, F₂) n (fun x => g x (f x)) s x :=
198+
ContDiffWithinAt.comp_contMDiffWithinAt
199+
(g := fun x : (F₁ →L[𝕜] F₂) × F₁ => x.1 x.2)
200+
(by apply ContDiff.contDiffAt; exact contDiff_fst.clm_apply contDiff_snd) (hg.prod_mk_space hf)
201+
(by simp_rw [preimage_univ, subset_univ])
202+
203+
nonrec theorem ContMDiffAt.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁} {x : M}
204+
(hg : ContMDiffAt I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g x) (hf : ContMDiffAt I 𝓘(𝕜, F₁) n f x) :
205+
ContMDiffAt I 𝓘(𝕜, F₂) n (fun x => g x (f x)) x :=
206+
hg.clm_apply hf
207+
208+
theorem ContMDiffOn.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁} {s : Set M}
209+
(hg : ContMDiffOn I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g s) (hf : ContMDiffOn I 𝓘(𝕜, F₁) n f s) :
210+
ContMDiffOn I 𝓘(𝕜, F₂) n (fun x => g x (f x)) s := fun x hx => (hg x hx).clm_apply (hf x hx)
211+
212+
theorem ContMDiff.clm_apply {g : M → F₁ →L[𝕜] F₂} {f : M → F₁}
213+
(hg : ContMDiff I 𝓘(𝕜, F₁ →L[𝕜] F₂) n g) (hf : ContMDiff I 𝓘(𝕜, F₁) n f) :
214+
ContMDiff I 𝓘(𝕜, F₂) n fun x => g x (f x) := fun x => (hg x).clm_apply (hf x)
215+
214216
theorem ContMDiffWithinAt.cle_arrowCongr {f : M → F₁ ≃L[𝕜] F₂} {g : M → F₃ ≃L[𝕜] F₄}
215217
{s : Set M} {x : M}
216218
(hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n (fun x ↦ ((f x).symm : F₂ →L[𝕜] F₁)) s x)

0 commit comments

Comments
 (0)