@@ -1393,7 +1393,10 @@ end OpenEmbedding
13931393/- inclusion of an open set in a topological space -/
13941394namespace TopologicalSpace.Opens
13951395
1396- variable (s : Opens α) [Nonempty s]
1396+ /- `Nonempty s` is not a type class argument because `s`, being a subset, rarely comes with a type
1397+ class instance. Then we'd have to manually provide the instance every time we use the following
1398+ lemmas, tediously using `haveI := ...` or `@foobar _ _ _ ...`. -/
1399+ variable (s : Opens α) (hs : Nonempty s)
13971400
13981401/-- The inclusion of an open subset `s` of a space `α` into `α` is a partial homeomorphism from the
13991402subtype `s` to `α`. -/
@@ -1402,17 +1405,17 @@ noncomputable def partialHomeomorphSubtypeCoe : PartialHomeomorph s α :=
14021405#align topological_space.opens.local_homeomorph_subtype_coe TopologicalSpace.Opens.partialHomeomorphSubtypeCoe
14031406
14041407@ [simp, mfld_simps]
1405- theorem partialHomeomorphSubtypeCoe_coe : (s.partialHomeomorphSubtypeCoe : s → α) = (↑) :=
1408+ theorem partialHomeomorphSubtypeCoe_coe : (s.partialHomeomorphSubtypeCoe hs : s → α) = (↑) :=
14061409 rfl
14071410#align topological_space.opens.local_homeomorph_subtype_coe_coe TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_coe
14081411
14091412@ [simp, mfld_simps]
1410- theorem partialHomeomorphSubtypeCoe_source : s.partialHomeomorphSubtypeCoe.source = Set.univ :=
1413+ theorem partialHomeomorphSubtypeCoe_source : ( s.partialHomeomorphSubtypeCoe hs) .source = Set.univ :=
14111414 rfl
14121415#align topological_space.opens.local_homeomorph_subtype_coe_source TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_source
14131416
14141417@ [simp, mfld_simps]
1415- theorem partialHomeomorphSubtypeCoe_target : s.partialHomeomorphSubtypeCoe.target = s := by
1418+ theorem partialHomeomorphSubtypeCoe_target : ( s.partialHomeomorphSubtypeCoe hs) .target = s := by
14161419 simp only [partialHomeomorphSubtypeCoe, Subtype.range_coe_subtype, mfld_simps]
14171420 rfl
14181421#align topological_space.opens.local_homeomorph_subtype_coe_target TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_target
@@ -1459,31 +1462,32 @@ open TopologicalSpace
14591462
14601463variable (e : PartialHomeomorph α β)
14611464
1462- variable (s : Opens α) [ Nonempty s]
1465+ variable (s : Opens α) (hs : Nonempty s)
14631466
14641467/-- The restriction of a partial homeomorphism `e` to an open subset `s` of the domain type
14651468produces a partial homeomorphism whose domain is the subtype `s`. -/
14661469noncomputable def subtypeRestr : PartialHomeomorph s β :=
1467- s.partialHomeomorphSubtypeCoe.trans e
1470+ ( s.partialHomeomorphSubtypeCoe hs) .trans e
14681471#align local_homeomorph.subtype_restr PartialHomeomorph.subtypeRestr
14691472
1470- theorem subtypeRestr_def : e.subtypeRestr s = s.partialHomeomorphSubtypeCoe.trans e :=
1473+ theorem subtypeRestr_def : e.subtypeRestr s hs = ( s.partialHomeomorphSubtypeCoe hs) .trans e :=
14711474 rfl
14721475#align local_homeomorph.subtype_restr_def PartialHomeomorph.subtypeRestr_def
14731476
14741477@ [simp, mfld_simps]
14751478theorem subtypeRestr_coe :
1476- ((e.subtypeRestr s : PartialHomeomorph s β) : s → β) = Set.restrict ↑s (e : α → β) :=
1479+ ((e.subtypeRestr s hs : PartialHomeomorph s β) : s → β) = Set.restrict ↑s (e : α → β) :=
14771480 rfl
14781481#align local_homeomorph.subtype_restr_coe PartialHomeomorph.subtypeRestr_coe
14791482
14801483@ [simp, mfld_simps]
1481- theorem subtypeRestr_source : (e.subtypeRestr s).source = (↑) ⁻¹' e.source := by
1484+ theorem subtypeRestr_source : (e.subtypeRestr s hs ).source = (↑) ⁻¹' e.source := by
14821485 simp only [subtypeRestr_def, mfld_simps]
14831486#align local_homeomorph.subtype_restr_source PartialHomeomorph.subtypeRestr_source
14841487
14851488variable {s} in
1486- theorem map_subtype_source {x : s} (hxe : (x : α) ∈ e.source): e x ∈ (e.subtypeRestr s).target := by
1489+ theorem map_subtype_source {x : s} (hxe : (x : α) ∈ e.source) :
1490+ e x ∈ (e.subtypeRestr s hs).target := by
14871491 refine' ⟨e.map_source hxe, _⟩
14881492 rw [s.partialHomeomorphSubtypeCoe_target, mem_preimage, e.leftInvOn hxe]
14891493 exact x.prop
@@ -1492,7 +1496,7 @@ theorem map_subtype_source {x : s} (hxe : (x : α) ∈ e.source): e x ∈ (e.sub
14921496/- This lemma characterizes the transition functions of an open subset in terms of the transition
14931497functions of the original space. -/
14941498theorem subtypeRestr_symm_trans_subtypeRestr (f f' : PartialHomeomorph α β) :
1495- (f.subtypeRestr s).symm.trans (f'.subtypeRestr s) ≈
1499+ (f.subtypeRestr s hs ).symm.trans (f'.subtypeRestr s hs ) ≈
14961500 (f.symm.trans f').restr (f.target ∩ f.symm ⁻¹' s) := by
14971501 simp only [subtypeRestr_def, trans_symm_eq_symm_trans_symm]
14981502 have openness₁ : IsOpen (f.target ∩ f.symm ⁻¹' s) := f.isOpen_inter_preimage_symm s.2
@@ -1505,35 +1509,35 @@ theorem subtypeRestr_symm_trans_subtypeRestr (f f' : PartialHomeomorph α β) :
15051509 rw [ofSet_trans', sets_identity, ← trans_of_set' _ openness₂, trans_assoc]
15061510 refine' EqOnSource.trans' (eqOnSource_refl _) _
15071511 -- f has been eliminated !!!
1508- refine' Setoid.trans (symm_trans_self s.partialHomeomorphSubtypeCoe) _
1512+ refine' Setoid.trans (symm_trans_self ( s.partialHomeomorphSubtypeCoe hs) ) _
15091513 simp only [mfld_simps, Setoid.refl]
15101514#align local_homeomorph.subtype_restr_symm_trans_subtype_restr PartialHomeomorph.subtypeRestr_symm_trans_subtypeRestr
15111515
1512- theorem subtypeRestr_symm_eqOn (U : Opens α) [ Nonempty U] :
1513- EqOn e.symm (Subtype.val ∘ (e.subtypeRestr U).symm) (e.subtypeRestr U).target := by
1516+ theorem subtypeRestr_symm_eqOn (U : Opens α) (hU : Nonempty U) :
1517+ EqOn e.symm (Subtype.val ∘ (e.subtypeRestr U hU ).symm) (e.subtypeRestr U hU ).target := by
15141518 intro y hy
15151519 rw [eq_comm, eq_symm_apply _ _ hy.1 ]
15161520 · change restrict _ e _ = _
1517- rw [← subtypeRestr_coe, (e.subtypeRestr U).right_inv hy]
1521+ rw [← subtypeRestr_coe, (e.subtypeRestr U hU ).right_inv hy]
15181522 · have := map_target _ hy; rwa [subtypeRestr_source] at this
15191523
1520- theorem subtypeRestr_symm_eqOn_of_le {U V : Opens α} [Nonempty U] [ Nonempty V] (hUV : U ≤ V) :
1521- EqOn (e.subtypeRestr V).symm (Set.inclusion hUV ∘ (e.subtypeRestr U).symm)
1522- (e.subtypeRestr U).target := by
1524+ theorem subtypeRestr_symm_eqOn_of_le {U V : Opens α} (hU : Nonempty U) (hV : Nonempty V)
1525+ (hUV : U ≤ V) : EqOn (e.subtypeRestr V hV ).symm (Set.inclusion hUV ∘ (e.subtypeRestr U hU ).symm)
1526+ (e.subtypeRestr U hU ).target := by
15231527 set i := Set.inclusion hUV
15241528 intro y hy
15251529 dsimp [PartialHomeomorph.subtypeRestr_def] at hy ⊢
1526- have hyV : e.symm y ∈ V.partialHomeomorphSubtypeCoe.target := by
1530+ have hyV : e.symm y ∈ ( V.partialHomeomorphSubtypeCoe hV) .target := by
15271531 rw [Opens.partialHomeomorphSubtypeCoe_target] at hy ⊢
15281532 exact hUV hy.2
1529- refine' V.partialHomeomorphSubtypeCoe.injOn _ trivial _
1533+ refine' ( V.partialHomeomorphSubtypeCoe hV) .injOn _ trivial _
15301534 · rw [← PartialHomeomorph.symm_target]
15311535 apply PartialHomeomorph.map_source
15321536 rw [PartialHomeomorph.symm_source]
15331537 exact hyV
1534- · rw [V.partialHomeomorphSubtypeCoe.right_inv hyV]
1535- show _ = U.partialHomeomorphSubtypeCoe _
1536- rw [U.partialHomeomorphSubtypeCoe.right_inv hy.2 ]
1538+ · rw [( V.partialHomeomorphSubtypeCoe hV) .right_inv hyV]
1539+ show _ = U.partialHomeomorphSubtypeCoe hU _
1540+ rw [( U.partialHomeomorphSubtypeCoe hU) .right_inv hy.2 ]
15371541#align local_homeomorph.subtype_restr_symm_eq_on_of_le PartialHomeomorph.subtypeRestr_symm_eqOn_of_le
15381542
15391543end subtypeRestr
0 commit comments