feat(Manifold/PartitionOfUnity): Existence of global C^n smooth section for nontrivial bundles#24966
feat(Manifold/PartitionOfUnity): Existence of global C^n smooth section for nontrivial bundles#24966michaellee94 wants to merge 11 commits intomasterfrom
Conversation
PR summary 366f454f66
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Geometry.Manifold.PartitionOfUnity | 2292 | 2300 | +8 (+0.35%) |
Import changes for all files
| Files | Import difference |
|---|---|
Mathlib.Geometry.Manifold.WhitneyEmbedding |
1 |
3 filesMathlib.Analysis.Calculus.Rademacher Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff Mathlib.Geometry.Manifold.PartitionOfUnity |
8 |
Declarations diff
+ contMDiff_totalSpace_weighted_sum_of_local_sections
+ exists_contMDiffOn_section_forall_mem_convex_of_local
+ exists_smooth_section_forall_mem_convex_of_local
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for script/declarations_diff.sh contains some details about this script.
No changes to technical debt.
You can run this locally as
./scripts/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
|
Thanks for your PR; it's great to see progress in differential geometry! As I said on zulip - can you use this to golf the proof of exists_contMDiffOn_forall_mem_convex_of_local, please? |
|
Thanks for taking a look, @grunweg. I've golfed |
PatrickMassot
left a comment
There was a problem hiding this comment.
Thanks for this contribution! And sorry about the delay.
I’ve compressed proofs a bit. Some of these compressions mostly aim at showing you some tricks that you may find interesting. I recommend studying those proofs carefully to understand those tricks.
| (fun x => (TotalSpace.mk x (s_loc i x) : TotalSpace F_fiber V)) (U i)) : | ||
| ContMDiff I (I.prod 𝓘(ℝ, F_fiber)) n | ||
| (fun x => (TotalSpace.mk x (∑ᶠ (j : ι), (ρ j x) • (s_loc j x)) : TotalSpace F_fiber V)) := by | ||
| let s_val (x : M) : V x := ∑ᶠ (j : ι), (ρ j x) • (s_loc j x) | ||
| intro x₀ | ||
| apply (Bundle.contMDiffAt_section s_val x₀).mpr | ||
| let e₀ := trivializationAt F_fiber V x₀ | ||
| apply ContMDiffAt.congr_of_eventuallyEq | ||
| · apply ρ.contMDiffAt_finsum | ||
| · intro j h_x₀_in_tsupport_ρj | ||
| have h_slocj_smooth_at_x₀ : ContMDiffAt I (I.prod 𝓘(ℝ, F_fiber)) n | ||
| (fun x => (TotalSpace.mk x (s_loc j x) : TotalSpace F_fiber V)) x₀ := | ||
| (h_smooth_s_loc j).contMDiffAt ((hU_isOpen j).mem_nhds (hρ_subord j h_x₀_in_tsupport_ρj)) | ||
| exact (contMDiffAt_section (s_loc j) x₀).mp h_slocj_smooth_at_x₀ | ||
| · have : (fun x ↦ (e₀ ⟨x, s_val x⟩).2) | ||
| =ᶠ[𝓝 x₀] | ||
| fun x ↦ ∑ᶠ i, ρ i x • (e₀ ⟨x, s_loc i x⟩).2 := by | ||
| have h_base : {x : M | x ∈ e₀.baseSet} ∈ (𝓝 x₀) := | ||
| e₀.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt' x₀) | ||
| filter_upwards [ρ.eventually_fintsupport_subset x₀, h_base] with x _ hx_base | ||
| have hlin : IsLinearMap ℝ (fun y ↦ (e₀ ⟨x, y⟩).2) := e₀.linear ℝ hx_base | ||
| have hfin : {i : ι | (ρ i x • s_loc i x) ≠ 0}.Finite := by | ||
| refine (ρ.locallyFinite.point_finite x).subset fun i hi_smul_ne_zero => ?_ | ||
| contrapose! hi_smul_ne_zero | ||
| simp only [ne_eq, smul_eq_zero, not_or, mem_setOf_eq, not_and, not_not] | ||
| exact fun a ↦ False.elim (hi_smul_ne_zero a) | ||
| let Llin : V x →ₗ[ℝ] F_fiber := | ||
| { toFun := fun y ↦ (e₀ ⟨x, y⟩).2 | ||
| map_add' := by intro u v; simpa using hlin.map_add u v | ||
| map_smul' := by intro c u; simpa using hlin.map_smul c u } | ||
| have h_map : | ||
| (fun y ↦ (e₀ ⟨x, y⟩).2) (∑ᶠ i, ρ i x • s_loc i x) = | ||
| ∑ᶠ i, ρ i x • (fun y ↦ (e₀ ⟨x, y⟩).2) (s_loc i x) := by | ||
| simpa only [LinearMap.toAddMonoidHom_coe, map_smul] using | ||
| Llin.toAddMonoidHom.map_finsum hfin | ||
| exact h_map | ||
| exact this |
There was a problem hiding this comment.
| (fun x => (TotalSpace.mk x (s_loc i x) : TotalSpace F_fiber V)) (U i)) : | |
| ContMDiff I (I.prod 𝓘(ℝ, F_fiber)) n | |
| (fun x => (TotalSpace.mk x (∑ᶠ (j : ι), (ρ j x) • (s_loc j x)) : TotalSpace F_fiber V)) := by | |
| let s_val (x : M) : V x := ∑ᶠ (j : ι), (ρ j x) • (s_loc j x) | |
| intro x₀ | |
| apply (Bundle.contMDiffAt_section s_val x₀).mpr | |
| let e₀ := trivializationAt F_fiber V x₀ | |
| apply ContMDiffAt.congr_of_eventuallyEq | |
| · apply ρ.contMDiffAt_finsum | |
| · intro j h_x₀_in_tsupport_ρj | |
| have h_slocj_smooth_at_x₀ : ContMDiffAt I (I.prod 𝓘(ℝ, F_fiber)) n | |
| (fun x => (TotalSpace.mk x (s_loc j x) : TotalSpace F_fiber V)) x₀ := | |
| (h_smooth_s_loc j).contMDiffAt ((hU_isOpen j).mem_nhds (hρ_subord j h_x₀_in_tsupport_ρj)) | |
| exact (contMDiffAt_section (s_loc j) x₀).mp h_slocj_smooth_at_x₀ | |
| · have : (fun x ↦ (e₀ ⟨x, s_val x⟩).2) | |
| =ᶠ[𝓝 x₀] | |
| fun x ↦ ∑ᶠ i, ρ i x • (e₀ ⟨x, s_loc i x⟩).2 := by | |
| have h_base : {x : M | x ∈ e₀.baseSet} ∈ (𝓝 x₀) := | |
| e₀.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt' x₀) | |
| filter_upwards [ρ.eventually_fintsupport_subset x₀, h_base] with x _ hx_base | |
| have hlin : IsLinearMap ℝ (fun y ↦ (e₀ ⟨x, y⟩).2) := e₀.linear ℝ hx_base | |
| have hfin : {i : ι | (ρ i x • s_loc i x) ≠ 0}.Finite := by | |
| refine (ρ.locallyFinite.point_finite x).subset fun i hi_smul_ne_zero => ?_ | |
| contrapose! hi_smul_ne_zero | |
| simp only [ne_eq, smul_eq_zero, not_or, mem_setOf_eq, not_and, not_not] | |
| exact fun a ↦ False.elim (hi_smul_ne_zero a) | |
| let Llin : V x →ₗ[ℝ] F_fiber := | |
| { toFun := fun y ↦ (e₀ ⟨x, y⟩).2 | |
| map_add' := by intro u v; simpa using hlin.map_add u v | |
| map_smul' := by intro c u; simpa using hlin.map_smul c u } | |
| have h_map : | |
| (fun y ↦ (e₀ ⟨x, y⟩).2) (∑ᶠ i, ρ i x • s_loc i x) = | |
| ∑ᶠ i, ρ i x • (fun y ↦ (e₀ ⟨x, y⟩).2) (s_loc i x) := by | |
| simpa only [LinearMap.toAddMonoidHom_coe, map_smul] using | |
| Llin.toAddMonoidHom.map_finsum hfin | |
| exact h_map | |
| exact this | |
| (fun x ↦ (TotalSpace.mk x (s_loc i x) : TotalSpace F_fiber V)) (U i)) : | |
| ContMDiff I (I.prod 𝓘(ℝ, F_fiber)) n | |
| (fun x ↦ (TotalSpace.mk x (∑ᶠ (j : ι), (ρ j x) • (s_loc j x)) : TotalSpace F_fiber V)) := by | |
| intro x₀ | |
| apply (Bundle.contMDiffAt_section _ x₀).mpr | |
| let e₀ := trivializationAt F_fiber V x₀ | |
| apply ContMDiffAt.congr_of_eventuallyEq | |
| · apply ρ.contMDiffAt_finsum | |
| · intro j hx₀ | |
| rw [← contMDiffAt_section (s_loc j)] | |
| exact h_smooth_s_loc j |>.contMDiffAt <| (hU_isOpen j).mem_nhds <| hρ_subord j hx₀ | |
| · have h_base : {x : M | x ∈ e₀.baseSet} ∈ 𝓝 x₀ := | |
| e₀.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt' x₀) | |
| filter_upwards [ρ.eventually_fintsupport_subset x₀, h_base] with x _ hx_base | |
| have hfin : {i : ι | (ρ i x • s_loc i x) ≠ 0}.Finite := by | |
| refine (ρ.locallyFinite.point_finite x).subset fun i hi_smul_ne_zero => ?_ | |
| have : ρ i x ≠ 0 ∧ s_loc i x ≠ 0 := by simpa using hi_smul_ne_zero | |
| exact this.1 | |
| simpa using e₀.linearEquivAt ℝ x hx_base |>.toAddMonoidHom.map_finsum hfin |
| (fun x => (⟨x, s_loc x⟩ : TotalSpace F_fiber V)) U_x₀) ∧ | ||
| (∀ y ∈ U_x₀, s_loc y ∈ t y)) : | ||
| ∃ s : Cₛ^n⟮I; F_fiber, V⟯, ∀ x : M, s x ∈ t x := by | ||
| choose U_map h_nhds s_loc h_smooth_s_loc_on_U_map h_mem_t using Hloc | ||
|
|
||
| -- Construct an open cover from the interiors of the given neighborhoods. | ||
| let U_open_cover (x : M) : Set M := interior (U_map x) | ||
| have hU_isOpen : ∀ x, IsOpen (U_open_cover x) := fun x ↦ isOpen_interior | ||
| have hU_covers_univ : univ ⊆ ⋃ x, U_open_cover x := by | ||
| intro x_pt _ | ||
| simp only [mem_iUnion, mem_univ] | ||
| exact ⟨x_pt, mem_interior_iff_mem_nhds.mpr (h_nhds x_pt)⟩ | ||
|
|
||
| -- Obtain a smooth partition of unity subordinate to this open cover. | ||
| obtain ⟨ρ, hρ_subord⟩ : ∃ ρ : SmoothPartitionOfUnity M I M univ, | ||
| ρ.IsSubordinate U_open_cover := | ||
| SmoothPartitionOfUnity.exists_isSubordinate | ||
| I isClosed_univ U_open_cover hU_isOpen hU_covers_univ | ||
|
|
||
| -- Define the global section `s_val` by taking a weighted sum of the local sections. | ||
| let s_val (x : M) : V x := ∑ᶠ (j : M), (ρ j x) • (s_loc j x) | ||
|
|
||
| -- Prove that `s_val`, when viewed as a map to the total space, is smooth. | ||
| have hs_val_tot_space_smooth : ContMDiff I (I.prod 𝓘(ℝ, F_fiber)) n | ||
| (fun x => (TotalSpace.mk x (s_val x) : TotalSpace F_fiber V)) := by | ||
| apply SmoothPartitionOfUnity.contMDiff_totalSpace_weighted_sum_of_local_sections I V ρ s_loc | ||
| U_open_cover hU_isOpen hρ_subord | ||
| intro j | ||
| exact (h_smooth_s_loc_on_U_map j).mono interior_subset | ||
|
|
||
| -- Construct the smooth section and prove it lies in the convex sets `t x`. | ||
| refine ⟨⟨s_val, hs_val_tot_space_smooth⟩, fun x => ?_⟩ | ||
| apply (ht_conv x).finsum_mem (fun j => ρ.nonneg j x) (ρ.sum_eq_one (mem_univ x)) | ||
| intro j h_ρjx_ne_zero | ||
| have h_x_in_tsupport_ρj : x ∈ tsupport (ρ j) := subset_closure (mem_support.mpr h_ρjx_ne_zero) | ||
| have h_x_in_Umap_j : x ∈ U_map j := interior_subset (hρ_subord j h_x_in_tsupport_ρj) | ||
| exact h_mem_t j x h_x_in_Umap_j |
There was a problem hiding this comment.
| (fun x => (⟨x, s_loc x⟩ : TotalSpace F_fiber V)) U_x₀) ∧ | |
| (∀ y ∈ U_x₀, s_loc y ∈ t y)) : | |
| ∃ s : Cₛ^n⟮I; F_fiber, V⟯, ∀ x : M, s x ∈ t x := by | |
| choose U_map h_nhds s_loc h_smooth_s_loc_on_U_map h_mem_t using Hloc | |
| -- Construct an open cover from the interiors of the given neighborhoods. | |
| let U_open_cover (x : M) : Set M := interior (U_map x) | |
| have hU_isOpen : ∀ x, IsOpen (U_open_cover x) := fun x ↦ isOpen_interior | |
| have hU_covers_univ : univ ⊆ ⋃ x, U_open_cover x := by | |
| intro x_pt _ | |
| simp only [mem_iUnion, mem_univ] | |
| exact ⟨x_pt, mem_interior_iff_mem_nhds.mpr (h_nhds x_pt)⟩ | |
| -- Obtain a smooth partition of unity subordinate to this open cover. | |
| obtain ⟨ρ, hρ_subord⟩ : ∃ ρ : SmoothPartitionOfUnity M I M univ, | |
| ρ.IsSubordinate U_open_cover := | |
| SmoothPartitionOfUnity.exists_isSubordinate | |
| I isClosed_univ U_open_cover hU_isOpen hU_covers_univ | |
| -- Define the global section `s_val` by taking a weighted sum of the local sections. | |
| let s_val (x : M) : V x := ∑ᶠ (j : M), (ρ j x) • (s_loc j x) | |
| -- Prove that `s_val`, when viewed as a map to the total space, is smooth. | |
| have hs_val_tot_space_smooth : ContMDiff I (I.prod 𝓘(ℝ, F_fiber)) n | |
| (fun x => (TotalSpace.mk x (s_val x) : TotalSpace F_fiber V)) := by | |
| apply SmoothPartitionOfUnity.contMDiff_totalSpace_weighted_sum_of_local_sections I V ρ s_loc | |
| U_open_cover hU_isOpen hρ_subord | |
| intro j | |
| exact (h_smooth_s_loc_on_U_map j).mono interior_subset | |
| -- Construct the smooth section and prove it lies in the convex sets `t x`. | |
| refine ⟨⟨s_val, hs_val_tot_space_smooth⟩, fun x => ?_⟩ | |
| apply (ht_conv x).finsum_mem (fun j => ρ.nonneg j x) (ρ.sum_eq_one (mem_univ x)) | |
| intro j h_ρjx_ne_zero | |
| have h_x_in_tsupport_ρj : x ∈ tsupport (ρ j) := subset_closure (mem_support.mpr h_ρjx_ne_zero) | |
| have h_x_in_Umap_j : x ∈ U_map j := interior_subset (hρ_subord j h_x_in_tsupport_ρj) | |
| exact h_mem_t j x h_x_in_Umap_j | |
| (fun x ↦ (⟨x, s_loc x⟩ : TotalSpace F_fiber V)) U_x₀) ∧ | |
| (∀ y ∈ U_x₀, s_loc y ∈ t y)) : | |
| ∃ s : Cₛ^n⟮I; F_fiber, V⟯, ∀ x : M, s x ∈ t x := by | |
| choose W h_nhds s_loc s_smooth h_mem_t using Hloc | |
| -- Construct an open cover from the interiors of the given neighborhoods. | |
| let U (x : M) : Set M := interior (W x) | |
| have U_op : ∀ x, IsOpen (U x) := fun x ↦ isOpen_interior | |
| have hU_covers_univ : univ ⊆ ⋃ x, U x := by | |
| intro x_pt _ | |
| simp only [mem_iUnion, mem_univ] | |
| exact ⟨x_pt, mem_interior_iff_mem_nhds.mpr (h_nhds x_pt)⟩ | |
| -- Obtain a smooth partition of unity subordinate to this open cover. | |
| obtain ⟨ρ, hρU⟩ : ∃ ρ : SmoothPartitionOfUnity M I M univ, | |
| ρ.IsSubordinate U := | |
| SmoothPartitionOfUnity.exists_isSubordinate | |
| I isClosed_univ U U_op hU_covers_univ | |
| -- Define the global section `s` by taking a weighted sum of the local sections. | |
| let s x : V x := ∑ᶠ j, (ρ j x) • s_loc j x | |
| -- Prove that `s`, when viewed as a map to the total space, is smooth. | |
| have s_smooth : ContMDiff I (I.prod 𝓘(ℝ, F_fiber)) n | |
| (fun x ↦ (TotalSpace.mk x (s x) : TotalSpace F_fiber V)) := | |
| ρ.contMDiff_weighted_sum I V s_loc U U_op hρU fun j ↦ (s_smooth j).mono interior_subset | |
| -- Construct the smooth section and prove it lies in the convex sets `t x`. | |
| refine ⟨⟨s, s_smooth⟩, fun x ↦ ?_⟩ | |
| apply (ht_conv x).finsum_mem (ρ.nonneg · x) (ρ.sum_eq_one (mem_univ x)) | |
| intro j h_ρjx_ne_zero | |
| have h_x_in_tsupport_ρj : x ∈ tsupport (ρ j) := subset_closure (mem_support.mpr h_ρjx_ne_zero) | |
| have h_x_in_Umap_j : x ∈ W j := interior_subset (hρU j h_x_in_tsupport_ρj) | |
| exact h_mem_t j x h_x_in_Umap_j |
| `exists_smooth_forall_mem_convex_of_local_const`. -/ | ||
| theorem exists_contMDiffOn_forall_mem_convex_of_local (ht : ∀ x, Convex ℝ (t x)) | ||
| (Hloc : ∀ x : M, ∃ U ∈ 𝓝 x, ∃ g : M → F, ContMDiffOn I 𝓘(ℝ, F) n g U ∧ ∀ y ∈ U, g y ∈ t y) : | ||
| ∃ g : C^n⟮I, M; 𝓘(ℝ, F), F⟯, ∀ x, g x ∈ t x := by |
There was a problem hiding this comment.
| ∃ g : C^n⟮I, M; 𝓘(ℝ, F), F⟯, ∀ x, g x ∈ t x := by | |
| ∃ g : C^n⟮I, M; 𝓘(ℝ, F), F⟯, ∀ x, g x ∈ t x := |
| let V (_ : M) : Type _ := F | ||
| rcases exists_contMDiffOn_section_forall_mem_convex_of_local I V t ht | ||
| (fun x₀ ↦ by | ||
| rcases Hloc x₀ with ⟨U, hU, g, hgs, hgt⟩ | ||
| refine ⟨U, hU, g, ?_, hgt⟩ | ||
| intro y hy | ||
| rw [@Bundle.contMDiffWithinAt_section] | ||
| apply hgs y hy) | ||
| with ⟨s, hs⟩ | ||
| refine ⟨⟨fun x ↦ (s x : F), fun x₀ ↦ ?_⟩, hs⟩ | ||
| have := s.contMDiff x₀ | ||
| rw [Bundle.contMDiffAt_section] at this | ||
| exact this |
There was a problem hiding this comment.
| let V (_ : M) : Type _ := F | |
| rcases exists_contMDiffOn_section_forall_mem_convex_of_local I V t ht | |
| (fun x₀ ↦ by | |
| rcases Hloc x₀ with ⟨U, hU, g, hgs, hgt⟩ | |
| refine ⟨U, hU, g, ?_, hgt⟩ | |
| intro y hy | |
| rw [@Bundle.contMDiffWithinAt_section] | |
| apply hgs y hy) | |
| with ⟨s, hs⟩ | |
| refine ⟨⟨fun x ↦ (s x : F), fun x₀ ↦ ?_⟩, hs⟩ | |
| have := s.contMDiff x₀ | |
| rw [Bundle.contMDiffAt_section] at this | |
| exact this | |
| let ⟨s, hs⟩ := exists_contMDiffOn_section_forall_mem_convex_of_local I (fun _ ↦ F) t ht | |
| (fun x₀ ↦ let ⟨U, hU, g, hgs, hgt⟩ := Hloc x₀ | |
| ⟨U, hU, g, fun y hy ↦ Bundle.contMDiffWithinAt_section _ _ _ |>.mpr <| hgs y hy, hgt⟩) | |
| ⟨⟨s, (Bundle.contMDiffAt_section _ _ |>.mp <| s.contMDiff ·)⟩, hs⟩ |
Note that such extreme golfs are meant to convey the message “this result is a direct consequence of previously proven things”.
|
Hi @michaellee94! Thanks again for your PR, this will be a great addition to mathlib. |
|
Hi, @grunweg and @PatrickMassot. Thanks for the reminder about this. Will address comments today! |
|
Continued by #26875 |
Add existence of global C^n smooth section for nontrivial bundles