Skip to content

Commit a1da5e4

Browse files
committed
changes from review + push for cache
1 parent bb864d0 commit a1da5e4

6 files changed

Lines changed: 37 additions & 30 deletions

File tree

Mathlib/Topology/OpenPartialHomeomorph/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ theorem isOpen_image_iff_of_subset_source {s : Set X} (hs : s ⊆ e.source) :
122122

123123
/-- A `PartialEquiv` with continuous open forward map and open source is a
124124
`OpenPartialHomeomorph`. -/
125-
@[simps toPartialHomeomorph_toPartialEquiv]
125+
@[simps toPartialHomeomorph]
126126
def ofContinuousOpenRestrict (e : PartialEquiv X Y) (hc : ContinuousOn e e.source)
127127
(ho : IsOpenMap (e.source.restrict e)) (hs : IsOpen e.source) : OpenPartialHomeomorph X Y where
128128
toPartialEquiv := e
@@ -145,7 +145,7 @@ theorem coe_ofContinuousOpenRestrict_symm (e : PartialEquiv X Y) (hc : Continuou
145145

146146
/-- A `PartialEquiv` with continuous open forward map and open source is a
147147
`OpenPartialHomeomorph`. -/
148-
@[simps! toPartialHomeomorph_toPartialEquiv]
148+
@[simps! toPartialHomeomorph]
149149
def ofContinuousOpen (e : PartialEquiv X Y) (hc : ContinuousOn e e.source) (ho : IsOpenMap e)
150150
(hs : IsOpen e.source) : OpenPartialHomeomorph X Y :=
151151
ofContinuousOpenRestrict e hc (ho.restrict hs) hs

Mathlib/Topology/OpenPartialHomeomorph/Composition.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ variable (e' : OpenPartialHomeomorph Y Z)
3737

3838
/-- Composition of two open partial homeomorphisms when the target of the first and the source of
3939
the second coincide. -/
40-
@[simps! apply symm_apply toPartialHomeomorph_toPartialEquiv, simps! -isSimp source target]
40+
@[simps! apply symm_apply toPartialHomeomorph, simps! -isSimp source target]
4141
protected def trans' (h : e.target = e'.source) : OpenPartialHomeomorph X Z where
4242
toPartialEquiv := PartialEquiv.trans' e.toPartialEquiv e'.toPartialEquiv h
4343
open_source := e.open_source
@@ -99,7 +99,7 @@ theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩
9999

100100
theorem trans_assoc (e'' : OpenPartialHomeomorph Z Z') :
101101
(e.trans e').trans e'' = e.trans (e'.trans e'') :=
102-
toPartialHomeomorph_injective <| PartialHomeomorph.toPartialEquiv_injective <| e.1.trans_assoc _ _
102+
toPartialEquiv_comp_toPartialHomeomorph_injective <| e.1.trans_assoc _ _
103103

104104
@[simp, mfld_simps]
105105
theorem trans_refl : e.trans (OpenPartialHomeomorph.refl Y) = e :=
@@ -131,7 +131,7 @@ theorem ofSet_trans_ofSet {s : Set X} (hs : IsOpen s) {s' : Set X} (hs' : IsOpen
131131
ext <;> simp [hs'.interior_eq]
132132

133133
theorem restr_trans (s : Set X) : (e.restr s).trans e' = (e.trans e').restr s :=
134-
toPartialHomeomorph_injective <| PartialHomeomorph.toPartialEquiv_injective <|
134+
toPartialEquiv_comp_toPartialHomeomorph_injective <|
135135
PartialEquiv.restr_trans e.toPartialEquiv e'.toPartialEquiv (interior s)
136136

137137
end trans
@@ -213,7 +213,7 @@ def transOpenPartialHomeomorph (e : X ≃ₜ Y) (f' : OpenPartialHomeomorph Y Z)
213213

214214
theorem transOpenPartialHomeomorph_eq_trans (e : X ≃ₜ Y) (f' : OpenPartialHomeomorph Y Z) :
215215
e.transOpenPartialHomeomorph f' = e.toOpenPartialHomeomorph.trans f' :=
216-
OpenPartialHomeomorph.toPartialHomeomorph_injective <| PartialHomeomorph.toPartialEquiv_injective
216+
OpenPartialHomeomorph.toPartialEquiv_comp_toPartialHomeomorph_injective
217217
<| Equiv.transPartialEquiv_eq_trans _ _
218218

219219
@[simp, mfld_simps]

Mathlib/Topology/OpenPartialHomeomorph/Constructions.lean

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ section Prod
7676

7777
/-- The product of two open partial homeomorphisms, as an open partial homeomorphism on the product
7878
space. -/
79-
@[simps! (attr := mfld_simps) -fullyApplied toPartialHomeomorph_toPartialEquiv apply,
79+
@[simps! (attr := mfld_simps) -fullyApplied toPartialHomeomorph apply,
8080
simps! -isSimp source target symm_apply]
8181
def prod (eX : OpenPartialHomeomorph X X') (eY : OpenPartialHomeomorph Y Y') :
8282
OpenPartialHomeomorph (X × Y) (X' × Y') where
@@ -100,7 +100,7 @@ theorem refl_prod_refl : (OpenPartialHomeomorph.refl X).prod (OpenPartialHomeomo
100100
theorem prod_trans (e : OpenPartialHomeomorph X Y) (f : OpenPartialHomeomorph Y Z)
101101
(e' : OpenPartialHomeomorph X' Y') (f' : OpenPartialHomeomorph Y' Z') :
102102
(e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') :=
103-
toPartialHomeomorph_injective <| PartialHomeomorph.toPartialEquiv_injective <| e.1.prod_trans ..
103+
toPartialEquiv_comp_toPartialHomeomorph_injective <| e.1.prod_trans ..
104104

105105
theorem prod_eq_prod_of_nonempty {eX eX' : OpenPartialHomeomorph X X'}
106106
{eY eY' : OpenPartialHomeomorph Y Y'} (h : (eX.prod eY).source.Nonempty) :
@@ -137,7 +137,7 @@ variable {ι : Type*} [Finite ι] {X Y : ι → Type*} [∀ i, TopologicalSpace
137137
[∀ i, TopologicalSpace (Y i)] (ei : ∀ i, OpenPartialHomeomorph (X i) (Y i))
138138

139139
/-- The product of a finite family of `OpenPartialHomeomorph`s. -/
140-
@[simps! toPartialHomeomorph_toPartialEquiv apply symm_apply source target]
140+
@[simps! toPartialHomeomorph apply symm_apply source target]
141141
def pi : OpenPartialHomeomorph (∀ i, X i) (∀ i, Y i) where
142142
toPartialEquiv := PartialEquiv.pi fun i => (ei i).toPartialEquiv
143143
open_source := isOpen_set_pi finite_univ fun i _ => (ei i).open_source
@@ -164,7 +164,7 @@ To ensure the maps `toFun` and `invFun` are inverse of each other on the new `so
164164
the definition assumes that the sets `s` and `t` are related both by `e.is_image` and `e'.is_image`.
165165
To ensure that the new maps are continuous on `source`/`target`, it also assumes that `e.source` and
166166
`e'.source` meet `frontier s` on the same set and `e x = e' x` on this intersection. -/
167-
@[simps! -fullyApplied toPartialHomeomorph_toPartialEquiv apply]
167+
@[simps! -fullyApplied toPartialHomeomorph apply]
168168
def piecewise (e e' : OpenPartialHomeomorph X Y) (s : Set X) (t : Set Y) [∀ x, Decidable (x ∈ s)]
169169
[∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t)
170170
(Hs : e.source ∩ frontier s = e'.source ∩ frontier s)
@@ -226,8 +226,7 @@ def transHomeomorph (e : OpenPartialHomeomorph X Y) (f' : Y ≃ₜ Z) : OpenPart
226226

227227
theorem transHomeomorph_eq_trans (e : OpenPartialHomeomorph X Y) (f' : Y ≃ₜ Z) :
228228
e.transHomeomorph f' = e.trans f'.toOpenPartialHomeomorph :=
229-
toPartialHomeomorph_injective <| PartialHomeomorph.toPartialEquiv_injective
230-
<| PartialEquiv.transEquiv_eq_trans _ _
229+
toPartialEquiv_comp_toPartialHomeomorph_injective <| PartialEquiv.transEquiv_eq_trans _ _
231230

232231
@[simp, mfld_simps]
233232
theorem transHomeomorph_transHomeomorph (e : OpenPartialHomeomorph X Y) (f' : Y ≃ₜ Z)

Mathlib/Topology/OpenPartialHomeomorph/Defs.lean

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ variable (e : OpenPartialHomeomorph X Y)
6262
/-! Basic properties; inverse (symm instance) -/
6363
section Basic
6464
/-- Coercion of an open partial homeomorphisms to a function. We don't use `e.toFun` because it is
65-
actually `e.toPartialEquiv.toFun`, so `simp` will apply lemmas about `toPartialEquiv`.
66-
While we may want to switch to this behavior later, doing it mid-port will break a lot of proofs. -/
65+
actually `e.toPartialEquiv.toFun`, so `simp` will apply lemmas about `toPartialEquiv`. -/
6766
@[coe] def toFun' : X → Y := e.toFun
6867

6968
/-- Coercion of an `OpenPartialHomeomorph` to function.
@@ -87,15 +86,17 @@ def Simps.symm_apply (e : OpenPartialHomeomorph X Y) : Y → X := e.symm
8786

8887
initialize_simps_projections OpenPartialHomeomorph (toFun → apply, invFun → symm_apply)
8988

89+
@[fun_prop]
9090
protected theorem continuousOn : ContinuousOn e e.source :=
9191
e.continuousOn_toFun
9292

93+
@[fun_prop]
9394
theorem continuousOn_symm : ContinuousOn e.symm e.target :=
9495
e.continuousOn_invFun
9596

9697
@[simp, mfld_simps]
97-
theorem mk_coe (e : PartialEquiv X Y) (a b c d) :
98-
(OpenPartialHomeomorph.mk (.mk e a b) c d : X → Y) = e :=
98+
theorem mk_coe (e : PartialEquiv X Y) (h1 h2 h3 h4) :
99+
(OpenPartialHomeomorph.mk (.mk e h1 h2) h3 h4 : X → Y) = e :=
99100
rfl
100101

101102
@[simp, mfld_simps]
@@ -107,6 +108,11 @@ theorem toPartialHomeomorph_injective :
107108
Injective (toPartialHomeomorph : OpenPartialHomeomorph X Y → PartialHomeomorph X Y)
108109
| ⟨_, _, _⟩, ⟨_, _, _⟩, rfl => rfl
109110

111+
theorem toPartialEquiv_comp_toPartialHomeomorph_injective :
112+
Injective (PartialHomeomorph.toPartialEquiv ∘ toPartialHomeomorph :
113+
OpenPartialHomeomorph X Y → PartialEquiv X Y) :=
114+
PartialHomeomorph.toPartialEquiv_injective.comp toPartialHomeomorph_injective
115+
110116
/- Register a few simp lemmas to make sure that `simp` puts the application of a local
111117
homeomorphism in its normal form, i.e., in terms of its coercion to a function. -/
112118
@[simp, mfld_simps]
@@ -141,7 +147,7 @@ theorem coe_toPartialHomeomorph : (e.toPartialHomeomorph : X → Y) = e :=
141147
theorem coe_toPartialHomeomorph_symm : (e.toPartialHomeomorph.symm : Y → X) = e.symm :=
142148
rfl
143149

144-
/-- Variant of `map_source`, stated for images of subsets of `source`. -/
150+
/-- Variant of `map_source`, stated in terms of subsets. -/
145151
lemma map_source'' : e '' e.source ⊆ e.target :=
146152
fun _ ⟨_, hx, hex⟩ ↦ mem_of_eq_of_mem (id hex.symm) (e.map_source' hx)
147153

@@ -166,6 +172,8 @@ protected theorem mapsTo : MapsTo e e.source e.target := fun _ => e.map_source
166172
protected theorem mapsTo_symm : MapsTo e.symm e.target e.source :=
167173
e.symm.mapsTo
168174

175+
@[deprecated (since := "2026-05-18")] alias symm_mapsTo := OpenPartialHomeomorph.mapsTo_symm
176+
169177
protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun _ => e.left_inv
170178

171179
protected theorem rightInvOn : RightInvOn e.symm e e.target := fun _ => e.right_inv

Mathlib/Topology/OpenPartialHomeomorph/IsImage.lean

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ theorem isOpen_iff (h : e.IsImage s t) : IsOpen (e.source ∩ s) ↔ IsOpen (e.t
171171
h.preimage_eq' ▸ e.isOpen_inter_preimage hs⟩
172172

173173
/-- Restrict an `OpenPartialHomeomorph` to a pair of corresponding open sets. -/
174-
@[simps! -fullyApplied apply symm_apply toPartialHomeomorph_toPartialEquiv]
174+
@[simps! -fullyApplied apply symm_apply toPartialHomeomorph]
175175
def restr (h : e.IsImage s t) (hs : IsOpen (e.source ∩ s)) : OpenPartialHomeomorph X Y where
176176
toPartialEquiv := h.toPartialEquiv.restr
177177
open_source := hs
@@ -254,8 +254,8 @@ theorem restr_toPartialEquiv' (s : Set X) (hs : IsOpen s) :
254254

255255
theorem restr_eq_of_source_subset {e : OpenPartialHomeomorph X Y} {s : Set X} (h : e.source ⊆ s) :
256256
e.restr s = e :=
257-
toPartialHomeomorph_injective <| PartialHomeomorph.toPartialEquiv_injective
258-
<| PartialEquiv.restr_eq_of_source_subset <| interior_maximal h e.open_source
257+
toPartialEquiv_comp_toPartialHomeomorph_injective <| PartialEquiv.restr_eq_of_source_subset <|
258+
interior_maximal h e.open_source
259259

260260
@[simp, mfld_simps]
261261
theorem restr_univ {e : OpenPartialHomeomorph X Y} : e.restr univ = e :=
@@ -360,8 +360,7 @@ theorem Set.EqOn.restr_eqOn_source {e e' : OpenPartialHomeomorph X Y}
360360

361361
theorem eq_of_eqOnSource_univ {e e' : OpenPartialHomeomorph X Y} (h : e ≈ e') (s : e.source = univ)
362362
(t : e.target = univ) : e = e' :=
363-
toPartialHomeomorph_injective <| PartialHomeomorph.toPartialEquiv_injective <|
364-
PartialEquiv.eq_of_eqOnSource_univ _ _ h s t
363+
toPartialEquiv_comp_toPartialHomeomorph_injective <| PartialEquiv.eq_of_eqOnSource_univ _ _ h s t
365364

366365
variable {s : Set X}
367366

Mathlib/Topology/PartialHomeomorph/Defs.lean

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ variable (e : PartialHomeomorph X Y)
6262
/-! Basic properties; inverse (symm instance) -/
6363
section Basic
6464
/-- Coercion of a partial homeomorphisms to a function. We don't use `e.toFun` because it is
65-
actually `e.toPartialEquiv.toFun`, so `simp` will apply lemmas about `toPartialEquiv`.
66-
While we may want to switch to this behavior later, doing it mid-port will break a lot of proofs. -/
65+
actually `e.toPartialEquiv.toFun`, so `simp` will apply lemmas about `toPartialEquiv`. -/
6766
@[coe] def toFun' : X → Y := e.toFun
6867

6968
/-- Coercion of a `PartialHomeomorph` to function.
@@ -87,14 +86,16 @@ def Simps.symm_apply (e : PartialHomeomorph X Y) : Y → X := e.symm
8786

8887
initialize_simps_projections PartialHomeomorph (toFun → apply, invFun → symm_apply)
8988

89+
@[fun_prop]
9090
protected theorem continuousOn : ContinuousOn e e.source :=
9191
e.continuousOn_toFun
9292

93+
@[fun_prop]
9394
theorem continuousOn_symm : ContinuousOn e.symm e.target :=
9495
e.continuousOn_invFun
9596

9697
@[simp]
97-
theorem mk_coe (e : PartialEquiv X Y) (a b) : (PartialHomeomorph.mk e a b : X → Y) = e := rfl
98+
theorem mk_coe (e : PartialEquiv X Y) (h1 h2) : (PartialHomeomorph.mk e h1 h2 : X → Y) = e := rfl
9899

99100
@[simp]
100101
theorem mk_coe_symm (e : PartialEquiv X Y) (a b) :
@@ -116,18 +117,18 @@ theorem invFun_eq_coe (e : PartialHomeomorph X Y) : e.invFun = e.symm :=
116117
rfl
117118

118119
@[simp]
119-
theorem coe_coe : (e.toPartialEquiv : X → Y) = e :=
120+
theorem coe_toPartialEquiv : (e.toPartialEquiv : X → Y) = e :=
120121
rfl
121122

122123
@[simp]
123-
theorem coe_coe_symm : (e.toPartialEquiv.symm : Y → X) = e.symm :=
124+
theorem coe_toPartialEquiv_symm : (e.toPartialEquiv.symm : Y → X) = e.symm :=
124125
rfl
125126

126127
@[simp]
127128
theorem map_source {x : X} (h : x ∈ e.source) : e x ∈ e.target :=
128129
e.map_source' h
129130

130-
/-- Variant of `map_source`, stated for images of subsets of `source`. -/
131+
/-- Variant of `map_source`, stated in terms of subsets. -/
131132
lemma map_source'' : e '' e.source ⊆ e.target :=
132133
fun _ ⟨_, hx, hex⟩ ↦ mem_of_eq_of_mem (id hex.symm) (e.map_source' hx)
133134

@@ -149,7 +150,7 @@ theorem eq_symm_apply {x : X} {y : Y} (hx : x ∈ e.source) (hy : y ∈ e.target
149150

150151
protected theorem mapsTo : MapsTo e e.source e.target := fun _ => e.map_source
151152

152-
protected theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
153+
protected theorem mapsTo_symm : MapsTo e.symm e.target e.source :=
153154
e.symm.mapsTo
154155

155156
protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun _ => e.left_inv
@@ -163,7 +164,7 @@ protected theorem injOn : InjOn e e.source :=
163164
e.leftInvOn.injOn
164165

165166
protected theorem bijOn : BijOn e e.source e.target :=
166-
e.invOn.bijOn e.mapsTo e.symm_mapsTo
167+
e.invOn.bijOn e.mapsTo e.mapsTo_symm
167168

168169
protected theorem surjOn : SurjOn e e.source e.target :=
169170
e.bijOn.surjOn

0 commit comments

Comments
 (0)