Skip to content

Commit 3248cb9

Browse files
committed
Generalize an inductive construction lemma
1 parent ac21cca commit 3248cb9

File tree

2 files changed

+60
-15
lines changed

2 files changed

+60
-15
lines changed

Diff for: SphereEversion/InductiveConstructions.lean

+56-11
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,51 @@ theorem inductive_construction_of_loc {X Y : Type*} [EMetricSpace X] [LocallyCom
152152
(hP₀f₀ : ∀ x, P₀ x f₀ ∧ P₀' x f₀)
153153
(loc : ∀ x, ∃ f : X → Y, (∀ x, P₀ x f) ∧ ∀ᶠ x' in 𝓝 x, P₁ x' f)
154154
(ind : ∀ {U₁ U₂ K₁ K₂ : Set X} {f₁ f₂ : X → Y}, IsOpen U₁ → IsOpen U₂ →
155-
IsClosed K₁ → IsClosed K₂ → K₁ ⊆ U₁ → K₂ ⊆ U₂ →
155+
IsCompact K₁ → IsCompact K₂ → K₁ ⊆ U₁ → K₂ ⊆ U₂ →
156156
(∀ x, P₀ x f₁ ∧ P₀' x f₁) → (∀ x, P₀ x f₂) → (∀ x ∈ U₁, P₁ x f₁) → (∀ x ∈ U₂, P₁ x f₂) →
157157
∃ f : X → Y, (∀ x, P₀ x f ∧ P₀' x f) ∧
158158
(∀ᶠ x near K₁ ∪ K₂, P₁ x f) ∧ ∀ᶠ x near K₁ ∪ U₂ᶜ, f x = f₁ x) :
159159
∃ f : X → Y, ∀ x, P₀ x f ∧ P₀' x f ∧ P₁ x f := by
160160
apply inductive_construction_of_loc' P₀ P₀' P₁ hP₀f₀ loc
161161
intro U₁ U₂ K₁ K₂ f₁ f₂ hU₁ hU₂ hK₁ hK₂
162-
replace hK₁ := hK₁.isClosed
163-
replace hK₂ := hK₂.isClosed
164162
solve_by_elim
165163

164+
theorem set_juggling {X : Type*} [TopologicalSpace X] [NormalSpace X] [T2Space X]
165+
{K : Set X} (hK : IsClosed K) {U₁ U₂ K₁ K₂ : Set X} (U₁_op : IsOpen U₁)
166+
(U₂_op : IsOpen U₂) (K₁_cpct : IsCompact K₁) (K₂_cpct : IsCompact K₂) (hK₁U₁ : K₁ ⊆ U₁)
167+
(hK₂U₂ : K₂ ⊆ U₂) (U : Set X) (U_op : IsOpen U) (hKU : K ⊆ U) :
168+
∃ K₁' K₂' U₁' U₂',
169+
IsOpen U₁' ∧ IsOpen U₂' ∧ IsCompact K₁' ∧ IsCompact K₂' ∧ K₁ ⊆ K₁' ∧ K₁' ⊆ U₁' ∧ K₂' ⊆ U₂' ∧
170+
K₁' ∪ K₂' = K₁ ∪ K₂ ∧ K ⊆ U₂'ᶜ ∧ U₁' ⊆ U ∪ U₁ ∧ U₂' ⊆ U₂ := by
171+
obtain ⟨U', U'_op, hKU', hU'U⟩ : ∃ U' : Set X, IsOpen U' ∧ K ⊆ U' ∧ closure U' ⊆ U :=
172+
normal_exists_closure_subset hK U_op hKU
173+
refine ⟨K₁ ∪ closure (K₂ ∩ U'), K₂ \ U', U₁ ∪ U, U₂ \ K, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩
174+
· exact IsOpen.union U₁_op U_op
175+
· exact IsOpen.sdiff U₂_op hK
176+
· refine IsCompact.union K₁_cpct ?_
177+
refine K₂_cpct.closure_of_subset ?_
178+
exact inter_subset_left K₂ U'
179+
· exact IsCompact.diff K₂_cpct U'_op
180+
· exact subset_union_left K₁ (closure (K₂ ∩ U'))
181+
· apply union_subset_union
182+
exact hK₁U₁
183+
apply subset_trans _ hU'U
184+
gcongr
185+
exact inter_subset_right K₂ U'
186+
· exact diff_subset_diff hK₂U₂ hKU'
187+
· rw [union_assoc]
188+
congr
189+
apply subset_antisymm
190+
· apply union_subset
191+
· apply K₂_cpct.isClosed.closure_subset_iff.mpr
192+
exact inter_subset_left K₂ U'
193+
· exact diff_subset K₂ U'
194+
· calc K₂ = K₂ ∩ U' ∪ K₂ \ U' := (inter_union_diff K₂ U').symm
195+
_ ⊆ closure (K₂ ∩ U') ∪ K₂ \ U' := union_subset_union_left (K₂ \ U') subset_closure
196+
· intro x hx hx'
197+
exact hx'.2 hx
198+
· rw [union_comm]
199+
· exact diff_subset U₂ K
166200

167201
/-- We are given a suitably nice extended metric space `X` and three local constraints `P₀`,`P₀'`
168202
and `P₁` on maps from `X` to some type `Y`. All maps entering the discussion are required to
@@ -178,27 +212,38 @@ theorem relative_inductive_construction_of_loc {X Y : Type*} [EMetricSpace X]
178212
{K : Set X} (hK : IsClosed K) {f₀ : X → Y} (hP₀f₀ : ∀ x, P₀ x f₀) (hP₁f₀ : ∀ᶠ x near K, P₁ x f₀)
179213
(loc : ∀ x, ∃ f : X → Y, (∀ x, P₀ x f) ∧ ∀ᶠ x' in 𝓝 x, P₁ x' f)
180214
(ind : ∀ {U₁ U₂ K₁ K₂ : Set X} {f₁ f₂ : X → Y},
181-
IsOpen U₁ → IsOpen U₂ → IsClosed K₁ → IsClosed K₂ → K₁ ⊆ U₁ → K₂ ⊆ U₂ →
215+
IsOpen U₁ → IsOpen U₂ → IsCompact K₁ → IsCompact K₂ → K₁ ⊆ U₁ → K₂ ⊆ U₂ →
182216
(∀ x, P₀ x f₁) → (∀ x, P₀ x f₂) → (∀ x ∈ U₁, P₁ x f₁) → (∀ x ∈ U₂, P₁ x f₂) →
183217
∃ f : X → Y, (∀ x, P₀ x f) ∧ (∀ᶠ x near K₁ ∪ K₂, P₁ x f) ∧ ∀ᶠ x near K₁ ∪ U₂ᶜ, f x = f₁ x) :
184218
∃ f : X → Y, (∀ x, P₀ x f ∧ P₁ x f) ∧ ∀ᶠ x near K, f x = f₀ x := by
185219
let P₀' : ∀ x : X, Germ (𝓝 x) Y → Prop := RestrictGermPredicate (fun x φ ↦ φ.value = f₀ x) K
186220
have hf₀ : ∀ x, P₀ x f₀ ∧ P₀' x f₀ := fun x ↦
187221
⟨hP₀f₀ x, fun _ ↦ eventually_of_forall fun x' ↦ rfl⟩
188222
have ind' : ∀ {U₁ U₂ K₁ K₂ : Set X} {f₁ f₂ : X → Y},
189-
IsOpen U₁ → IsOpen U₂ → IsClosed K₁ → IsClosed K₂ → K₁ ⊆ U₁ → K₂ ⊆ U₂ →
223+
IsOpen U₁ → IsOpen U₂ → IsCompact K₁ → IsCompact K₂ → K₁ ⊆ U₁ → K₂ ⊆ U₂ →
190224
(∀ x, P₀ x f₁ ∧ P₀' x f₁) → (∀ x, P₀ x f₂) → (∀ x ∈ U₁, P₁ x f₁) → (∀ x ∈ U₂, P₁ x f₂) →
191225
∃ f : X → Y, (∀ x, P₀ x f ∧ P₀' x f) ∧
192226
(∀ᶠ x near K₁ ∪ K₂, P₁ x f) ∧ ∀ᶠ x near K₁ ∪ U₂ᶜ, f x = f₁ x := by
193227
intro U₁ U₂ K₁ K₂ f₁ f₂ U₁_op U₂_op K₁_cpct K₂_cpct hK₁U₁ hK₂U₂ hf₁ hf₂ hf₁U₁ hf₂U₂
194228
obtain ⟨h₀f₁, h₀'f₁⟩ := forall_and.mp hf₁
195229
rw [forall_restrictGermPredicate_iff] at h₀'f₁
196-
rcases(hasBasis_nhdsSet K).mem_iff.mp (hP₁f₀.germ_congr_set h₀'f₁) with ⟨U, ⟨U_op, hKU⟩, hU⟩
197-
rcases ind (U_op.union U₁_op) U₂_op (hK.union K₁_cpct) K₂_cpct (union_subset_union hKU hK₁U₁)
198-
hK₂U₂ h₀f₁ hf₂ (fun x hx ↦ hx.elim (fun hx ↦ hU hx) fun hx ↦ hf₁U₁ x hx) hf₂U₂ with
199-
⟨f, h₀f, hf, h'f⟩
200-
rw [union_assoc, Eventually.union_nhdsSet] at hf h'f
201-
exact ⟨f, fun x ↦ ⟨h₀f x, restrictGermPredicate_congr (hf₁ x).2 h'f.1⟩, hf.2, h'f.2
230+
rcases(hasBasis_nhdsSet K).mem_iff.mp (hP₁f₀.germ_congr_set h₀'f₁) with ⟨U,
231+
⟨U_op, hKU⟩, hU : ∀ {x}, x ∈ U → P₁ x f₁⟩
232+
obtain ⟨K₁', K₂', U₁', U₂', U₁'_op, U₂'_op, K₁'_cpct, K₂'_cpct, hK₁K₁', hK₁'U₁', hK₂'U₂',
233+
hK₁'K₂', hKU₂', hU₁'U, hU₂'U₂⟩ : ∃ (K₁' K₂' U₁' U₂' : Set X),
234+
IsOpen U₁' ∧ IsOpen U₂' ∧ IsCompact K₁' ∧ IsCompact K₂' ∧
235+
K₁ ⊆ K₁' ∧ K₁' ⊆ U₁' ∧ K₂' ⊆ U₂' ∧ K₁' ∪ K₂' = K₁ ∪ K₂ ∧ K ⊆ U₂'ᶜ ∧
236+
U₁' ⊆ U ∪ U₁ ∧ U₂' ⊆ U₂ := by
237+
apply set_juggling <;> assumption
238+
have hU₁'P₁ : ∀ x ∈ U₁', P₁ x ↑f₁ :=
239+
fun x hx ↦ (hU₁'U hx).casesOn (fun h _ ↦ hU h) (fun h _ ↦ hf₁U₁ x h) (hU₁'U hx)
240+
rcases ind U₁'_op U₂'_op K₁'_cpct K₂'_cpct hK₁'U₁' hK₂'U₂' h₀f₁ hf₂ hU₁'P₁
241+
(fun x hx ↦ hf₂U₂ x (hU₂'U₂ hx)) with ⟨f, h₀f, hf, h'f⟩
242+
refine ⟨f, fun x ↦ ⟨h₀f x, restrictGermPredicate_congr (hf₁ x).2 ?_⟩, ?_, ?_⟩
243+
· exact h'f.filter_mono (nhdsSet_mono <| subset_union_of_subset_right hKU₂' K₁')
244+
· rwa [hK₁'K₂'] at hf
245+
· apply h'f.filter_mono (nhdsSet_mono <| ?_)
246+
exact union_subset_union hK₁K₁' <| compl_subset_compl_of_subset hU₂'U₂
202247
rcases inductive_construction_of_loc P₀ P₀' P₁ hf₀ loc ind' with ⟨f, hf⟩
203248
simp only [forall_and, forall_restrictGermPredicate_iff] at hf ⊢
204249
exact ⟨f, ⟨hf.1, hf.2.2⟩, hf.2.1

Diff for: SphereEversion/Loops/Surrounding.lean

+4-4
Original file line numberDiff line numberDiff line change
@@ -982,10 +982,10 @@ theorem exists_surrounding_loops (hK : IsClosed K) (hΩ_op : IsOpen Ω) (hg :
982982
cases' surroundingFamilyIn_iff_germ.mp H with H H'
983983
exact ⟨γ, H, mem_of_superset U_in H'⟩
984984
· intro U₁ U₂ K₁ K₂ γ₁ γ₂ hU₁ hU₂ hK₁ hK₂ hKU₁ hKU₂ hγ₁ hγ₂ h'γ₁ h'γ₂
985-
rcases extend_loops hU₁ hU₂ hK₁ hK₂ hKU₁ hKU₂ (surroundingFamilyIn_iff_germ.mpr ⟨hγ₁, h'γ₁⟩)
986-
(surroundingFamilyIn_iff_germ.mpr ⟨hγ, h'γ₂⟩) with
987-
⟨U, U_in, γ, H, H''⟩
988-
cases' surroundingFamilyIn_iff_germ.mp H with H H'
985+
rcases extend_loops hU₁ hU₂ hK₁.isClosed hK₂.isClosed hKU₁ hKU₂
986+
(surroundingFamilyIn_iff_germ.mpr ⟨hγ, h'γ₁⟩)
987+
(surroundingFamilyIn_iff_germ.mpr ⟨hγ₂, h'γ₂⟩) with ⟨U, U_in, γ, H, H''⟩
988+
rcases surroundingFamilyIn_iff_germ.mp H with ⟨H, H'
989989
exact ⟨γ, H, mem_of_superset U_in H', Eventually.union_nhdsSet.mpr H''⟩
990990

991991
-- #lint

0 commit comments

Comments
 (0)