Skip to content

Commit fbe1f6b

Browse files
committed
feat: add sumPiEquivProdPi and piUnique (#20195)
From FLT. Add topological and algebraic versions of `Equiv.sumPiEquivProdPi` and `Equiv.piUnique`.
1 parent 0571c82 commit fbe1f6b

File tree

4 files changed

+101
-5
lines changed

4 files changed

+101
-5
lines changed

Mathlib/Algebra/Module/Equiv/Basic.lean

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Mathlib.Algebra.Module.Equiv.Defs
1111
import Mathlib.Algebra.Module.Hom
1212
import Mathlib.Algebra.Module.LinearMap.End
1313
import Mathlib.Algebra.Module.Pi
14+
import Mathlib.Algebra.Module.Prod
1415

1516
/-!
1617
# Further results on (semi)linear equivalences.
@@ -698,4 +699,36 @@ end LinearEquiv
698699

699700
end FunLeft
700701

702+
section Pi
703+
704+
namespace LinearEquiv
705+
706+
/-- The product over `S ⊕ T` of a family of modules is isomorphic to the product of
707+
(the product over `S`) and (the product over `T`).
708+
709+
This is `Equiv.sumPiEquivProdPi` as a `LinearEquiv`.
710+
-/
711+
def sumPiEquivProdPi (R : Type*) [Semiring R] (S T : Type*) (A : S ⊕ T → Type*)
712+
[∀ st, AddCommMonoid (A st)] [∀ st, Module R (A st)] :
713+
(Π (st : S ⊕ T), A st) ≃ₗ[R] (Π (s : S), A (.inl s)) × (Π (t : T), A (.inr t)) where
714+
__ := Equiv.sumPiEquivProdPi _
715+
map_add' _ _ := rfl
716+
map_smul' _ _ := rfl
717+
718+
/-- The product `Π t : α, f t` of a family of modules is linearly isomorphic to the module
719+
`f ⬝` when `α` only contains `⬝`.
720+
721+
This is `Equiv.piUnique` as a `LinearEquiv`.
722+
-/
723+
@[simps (config := .asFn)]
724+
def piUnique {α : Type*} [Unique α] (R : Type*) [Semiring R] (f : α → Type*)
725+
[∀ x, AddCommMonoid (f x)] [∀ x, Module R (f x)] : (Π t : α, f t) ≃ₗ[R] f default where
726+
__ := Equiv.piUnique _
727+
map_add' _ _ := rfl
728+
map_smul' _ _ := rfl
729+
730+
end LinearEquiv
731+
732+
end Pi
733+
701734
end AddCommMonoid

Mathlib/Topology/Algebra/Module/Equiv.lean

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,45 @@ def arrowCongrEquiv (e₁₂ : M₁ ≃SL[σ₁₂] M₂) (e₄₃ : M₄ ≃SL[
567567
ContinuousLinearMap.ext fun x => by
568568
simp only [ContinuousLinearMap.comp_apply, apply_symm_apply, coe_coe]
569569

570+
section Pi
571+
572+
/-- Combine a family of linear equivalences into a linear equivalence of `pi`-types.
573+
This is `Equiv.piCongrLeft` as a `ContinuousLinearEquiv`.
574+
-/
575+
def piCongrLeft (R : Type*) [Semiring R] {ι ι' : Type*}
576+
(φ : ι → Type*) [∀ i, AddCommMonoid (φ i)] [∀ i, Module R (φ i)]
577+
[∀ i, TopologicalSpace (φ i)]
578+
(e : ι' ≃ ι) : ((i' : ι') → φ (e i')) ≃L[R] (i : ι) → φ i where
579+
__ := Homeomorph.piCongrLeft e
580+
__ := LinearEquiv.piCongrLeft R φ e
581+
582+
/-- The product over `S ⊕ T` of a family of topological modules
583+
is isomorphic (topologically and alegbraically) to the product of
584+
(the product over `S`) and (the product over `T`).
585+
586+
This is `Equiv.sumPiEquivProdPi` as a `ContinuousLinearEquiv`.
587+
-/
588+
def sumPiEquivProdPi (R : Type*) [Semiring R] (S T : Type*)
589+
(A : S ⊕ T → Type*) [∀ st, AddCommMonoid (A st)] [∀ st, Module R (A st)]
590+
[∀ st, TopologicalSpace (A st)] :
591+
((st : S ⊕ T) → A st) ≃L[R] ((s : S) → A (Sum.inl s)) × ((t : T) → A (Sum.inr t)) where
592+
__ := LinearEquiv.sumPiEquivProdPi R S T A
593+
__ := Homeomorph.sumPiEquivProdPi S T A
594+
595+
/-- The product `Π t : α, f t` of a family of topological modules is isomorphic
596+
(both topologically and algebraically) to the space `f ⬝` when `α` only contains `⬝`.
597+
598+
This is `Equiv.piUnique` as a `ContinuousLinearEquiv`.
599+
-/
600+
@[simps! (config := .asFn)]
601+
def piUnique {α : Type*} [Unique α] (R : Type*) [Semiring R] (f : α → Type*)
602+
[∀ x, AddCommMonoid (f x)] [∀ x, Module R (f x)] [∀ x, TopologicalSpace (f x)] :
603+
(Π t, f t) ≃L[R] f default where
604+
__ := LinearEquiv.piUnique R f
605+
__ := Homeomorph.piUnique f
606+
607+
end Pi
608+
570609
section piCongrRight
571610

572611
variable {ι : Type*} {M : ι → Type*} [∀ i, TopologicalSpace (M i)] [∀ i, AddCommMonoid (M i)]

Mathlib/Topology/Basic.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,12 @@ theorem IsOpen.preimage (hf : Continuous f) {t : Set Y} (h : IsOpen t) :
13651365
IsOpen (f ⁻¹' t) :=
13661366
hf.isOpen_preimage t h
13671367

1368+
lemma Equiv.continuous_symm_iff (e : X ≃ Y) : Continuous e.symm ↔ IsOpenMap e := by
1369+
simp_rw [continuous_def, ← Set.image_equiv_eq_preimage_symm, IsOpenMap]
1370+
1371+
lemma Equiv.isOpenMap_symm_iff (e : X ≃ Y) : IsOpenMap e.symm ↔ Continuous e := by
1372+
simp_rw [← Equiv.continuous_symm_iff, Equiv.symm_symm]
1373+
13681374
theorem continuous_congr {g : X → Y} (h : ∀ x, f x = g x) :
13691375
Continuous f ↔ Continuous g :=
13701376
.of_eq <| congrArg _ <| funext h

Mathlib/Topology/Homeomorph.lean

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,7 @@ theorem locallyCompactSpace_iff (h : X ≃ₜ Y) :
427427
@[simps toEquiv]
428428
def homeomorphOfContinuousOpen (e : X ≃ Y) (h₁ : Continuous e) (h₂ : IsOpenMap e) : X ≃ₜ Y where
429429
continuous_toFun := h₁
430-
continuous_invFun := by
431-
rw [continuous_def]
432-
intro s hs
433-
convert ← h₂ s hs using 1
434-
apply e.image_eq_preimage
430+
continuous_invFun := e.continuous_symm_iff.2 h₂
435431
toEquiv := e
436432

437433
/-- If a bijective map `e : X ≃ Y` is continuous and closed, then it is a homeomorphism. -/
@@ -671,6 +667,28 @@ def homeomorphOfUnique [Unique X] [Unique Y] : X ≃ₜ Y :=
671667
continuous_toFun := continuous_const
672668
continuous_invFun := continuous_const }
673669

670+
/-- The product over `S ⊕ T` of a family of topological spaces
671+
is homeomorphic to the product of (the product over `S`) and (the product over `T`).
672+
673+
This is `Equiv.sumPiEquivProdPi` as a `Homeomorph`.
674+
-/
675+
def sumPiEquivProdPi (S T : Type*) (A : S ⊕ T → Type*)
676+
[∀ st, TopologicalSpace (A st)] :
677+
(Π (st : S ⊕ T), A st) ≃ₜ (Π (s : S), A (.inl s)) × (Π (t : T), A (.inr t)) where
678+
__ := Equiv.sumPiEquivProdPi _
679+
continuous_toFun := Continuous.prod_mk (by fun_prop) (by fun_prop)
680+
continuous_invFun := continuous_pi <| by rintro (s | t) <;> simp <;> fun_prop
681+
682+
/-- The product `Π t : α, f t` of a family of topological spaces is homeomorphic to the
683+
space `f ⬝` when `α` only contains `⬝`.
684+
685+
This is `Equiv.piUnique` as a `Homeomorph`.
686+
-/
687+
@[simps! (config := .asFn)]
688+
def piUnique {α : Type*} [Unique α] (f : α → Type*) [∀ x, TopologicalSpace (f x)] :
689+
(Π t, f t) ≃ₜ f default :=
690+
homeomorphOfContinuousOpen (Equiv.piUnique f) (continuous_apply default) (isOpenMap_eval _)
691+
674692
end prod
675693

676694
/-- `Equiv.piCongrLeft` as a homeomorphism: this is the natural homeomorphism

0 commit comments

Comments
 (0)