Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit df1337e

Browse files
committed
feat(data/local_equiv,topology/local_homeomorph): add local_equiv.pi and local_homeomorph.pi (#6574)
1 parent e221dc9 commit df1337e

File tree

5 files changed

+68
-2
lines changed

5 files changed

+68
-2
lines changed

src/data/equiv/local_equiv.lean

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,29 @@ by ext x; simp [ext_iff]; tauto
520520

521521
end prod
522522

523+
section pi
524+
525+
variables {ι : Type*} {αi βi : ι → Type*} (ei : Π i, local_equiv (αi i) (βi i))
526+
527+
/-- The product of a family of local equivs, as a local equiv on the pi type. -/
528+
@[simps source target] protected def pi : local_equiv (Π i, αi i) (Π i, βi i) :=
529+
{ to_fun := λ f i, ei i (f i),
530+
inv_fun := λ f i, (ei i).symm (f i),
531+
source := pi univ (λ i, (ei i).source),
532+
target := pi univ (λ i, (ei i).target),
533+
map_source' := λ f hf i hi, (ei i).map_source (hf i hi),
534+
map_target' := λ f hf i hi, (ei i).map_target (hf i hi),
535+
left_inv' := λ f hf, funext $ λ i, (ei i).left_inv (hf i trivial),
536+
right_inv' := λ f hf, funext $ λ i, (ei i).right_inv (hf i trivial) }
537+
538+
attribute [mfld_simps] pi_source pi_target
539+
540+
@[simp, mfld_simps] lemma pi_coe : ⇑(local_equiv.pi ei) = λ (f : Π i, αi i) i, ei i (f i) := rfl
541+
@[simp, mfld_simps] lemma pi_symm :
542+
(local_equiv.pi ei).symm = local_equiv.pi (λ i, (ei i).symm) := rfl
543+
544+
end pi
545+
523546
end local_equiv
524547

525548
namespace set

src/data/set/basic.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,17 @@ end
21462146
lemma univ_pi_eq_empty_iff : pi univ t = ∅ ↔ ∃ i, t i = ∅ :=
21472147
by simp [← not_nonempty_iff_eq_empty, univ_pi_nonempty_iff]
21482148

2149+
@[simp] lemma range_dcomp {β : ι → Type*} (f : Π i, α i → β i) :
2150+
range (λ (g : Π i, α i), (λ i, f i (g i))) = pi univ (λ i, range (f i)) :=
2151+
begin
2152+
apply subset.antisymm,
2153+
{ rintro _ ⟨x, rfl⟩ i -,
2154+
exact ⟨x i, rfl⟩ },
2155+
{ intros x hx,
2156+
choose y hy using hx,
2157+
exact ⟨λ i, y i trivial, funext $ λ i, hy i trivial⟩ }
2158+
end
2159+
21492160
@[simp] lemma insert_pi (i : ι) (s : set ι) (t : Π i, set (α i)) :
21502161
pi (insert i s) t = (eval i ⁻¹' t i) ∩ pi s t :=
21512162
by { ext, simp [pi, or_imp_distrib, forall_and_distrib] }

src/topology/constructions.lean

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ hf.prod_mk_nhds hg
213213
lemma continuous_at.prod_map {f : α → γ} {g : β → δ} {p : α × β}
214214
(hf : continuous_at f p.fst) (hg : continuous_at g p.snd) :
215215
continuous_at (λ p : α × β, (f p.1, g p.2)) p :=
216-
(hf.comp continuous_fst.continuous_at).prod (hg.comp continuous_snd.continuous_at)
216+
(hf.comp continuous_at_fst).prod (hg.comp continuous_at_snd)
217217

218218
lemma continuous_at.prod_map' {f : α → γ} {g : β → δ} {x : α} {y : β}
219219
(hf : continuous_at f x) (hg : continuous_at g y) :
@@ -663,6 +663,11 @@ lemma tendsto_pi [t : ∀i, topological_space (π i)] {f : α → Πi, π i} {g
663663
tendsto f u (𝓝 g) ↔ ∀ x, tendsto (λ i, f i x) u (𝓝 (g x)) :=
664664
by simp [nhds_pi, filter.tendsto_comap_iff]
665665

666+
lemma continuous_at_pi [∀ i, topological_space (π i)] [topological_space α] {f : α → Π i, π i}
667+
{x : α} :
668+
continuous_at f x ↔ ∀ i, continuous_at (λ y, f y i) x :=
669+
tendsto_pi
670+
666671
lemma is_open_set_pi [∀a, topological_space (π a)] {i : set ι} {s : Πa, set (π a)}
667672
(hi : finite i) (hs : ∀a∈i, is_open (s a)) : is_open (pi i s) :=
668673
by rw [pi_def]; exact (is_open_bInter hi $ assume a ha, (hs _ ha).preimage (continuous_apply _))

src/topology/continuous_on.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,16 @@ begin
434434
exact hf.prod_map hg,
435435
end
436436

437+
lemma continuous_within_at_pi {ι : Type*} {π : ι → Type*} [∀ i, topological_space (π i)]
438+
{f : α → Π i, π i} {s : set α} {x : α} :
439+
continuous_within_at f s x ↔ ∀ i, continuous_within_at (λ y, f y i) s x :=
440+
tendsto_pi
441+
442+
lemma continuous_on_pi {ι : Type*} {π : ι → Type*} [∀ i, topological_space (π i)]
443+
{f : α → Π i, π i} {s : set α} :
444+
continuous_on f s ↔ ∀ i, continuous_on (λ y, f y i) s :=
445+
⟨λ h i x hx, tendsto_pi.1 (h x hx) i, λ h x hx, tendsto_pi.2 (λ i, h i x hx)⟩
446+
437447
theorem continuous_on_iff {f : α → β} {s : set α} :
438448
continuous_on f s ↔ ∀ x ∈ s, ∀ t : set β, is_open t → f x ∈ t → ∃ u, is_open u ∧ x ∈ u ∧
439449
u ∩ s ⊆ f ⁻¹' t :=

src/topology/local_homeomorph.lean

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ def prod (e : local_homeomorph α β) (e' : local_homeomorph γ δ) : local_home
573573
continuous_inv_fun := continuous_on.prod
574574
(e.continuous_inv_fun.comp continuous_fst.continuous_on (prod_subset_preimage_fst _ _))
575575
(e'.continuous_inv_fun.comp continuous_snd.continuous_on (prod_subset_preimage_snd _ _)),
576-
..e.to_local_equiv.prod e'.to_local_equiv }
576+
to_local_equiv := e.to_local_equiv.prod e'.to_local_equiv }
577577

578578
@[simp, mfld_simps] lemma prod_to_local_equiv (e : local_homeomorph α β) (e' : local_homeomorph γ δ) :
579579
(e.prod e').to_local_equiv = e.to_local_equiv.prod e'.to_local_equiv := rfl
@@ -604,6 +604,23 @@ local_homeomorph.eq_of_local_equiv_eq $
604604

605605
end prod
606606

607+
section pi
608+
609+
variables {ι : Type*} [fintype ι] {Xi Yi : ι → Type*} [Π i, topological_space (Xi i)]
610+
[Π i, topological_space (Yi i)] (ei : Π i, local_homeomorph (Xi i) (Yi i))
611+
612+
/-- The product of a finite family of `local_homeomorph`s. -/
613+
@[simps to_local_equiv] def pi : local_homeomorph (Π i, Xi i) (Π i, Yi i) :=
614+
{ to_local_equiv := local_equiv.pi (λ i, (ei i).to_local_equiv),
615+
open_source := is_open_set_pi finite_univ $ λ i hi, (ei i).open_source,
616+
open_target := is_open_set_pi finite_univ $ λ i hi, (ei i).open_target,
617+
continuous_to_fun := continuous_on_pi.2 $ λ i, (ei i).continuous_on.comp
618+
(continuous_apply _).continuous_on (λ f hf, hf i trivial),
619+
continuous_inv_fun := continuous_on_pi.2 $ λ i, (ei i).continuous_on_symm.comp
620+
(continuous_apply _).continuous_on (λ f hf, hf i trivial) }
621+
622+
end pi
623+
607624
section continuity
608625

609626
/-- Continuity within a set at a point can be read under right composition with a local

0 commit comments

Comments
 (0)