Skip to content

Commit 46cedc0

Browse files
committed
more action topology
1 parent 6bab6d0 commit 46cedc0

File tree

1 file changed

+73
-34
lines changed

1 file changed

+73
-34
lines changed

FLT/ForMathlib/ActionTopology.lean

+73-34
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ If `R` is a topological space acting on an additive abelian group `A`, we define
1313
the *action topology* to be the finest topology on `A` making `• : R × A → A`
1414
and `+ : A × A → A` continuous (with all the products having the product topology).
1515
16-
1716
This topology was suggested by Will Sawin [here](https://mathoverflow.net/a/477763/1384).
1817
1918
-/
@@ -74,7 +73,7 @@ namespace ActionTopology
7473

7574
section zero
7675

77-
lemma subsingleton (R : Type*) [TopologicalSpace R] (A : Type*) [Add A] [SMul R A] [Subsingleton A]
76+
instance subsingleton (R : Type*) [TopologicalSpace R] (A : Type*) [Add A] [SMul R A] [Subsingleton A]
7877
[TopologicalSpace A] : IsActionTopology R A := by
7978
constructor
8079
ext U
@@ -93,7 +92,7 @@ We first prove that the action topology on `R` considered as a module over itsel
9392
is `R`'s topology.
9493
9594
-/
96-
protected lemma id (R : Type*) [Semiring R] [τR : TopologicalSpace R] [TopologicalSemiring R] :
95+
instance instId (R : Type*) [Semiring R] [τR : TopologicalSpace R] [TopologicalSemiring R] :
9796
IsActionTopology R R := by
9897
constructor
9998
/- Let `R` be a topological ring with topology τR. To prove that `τR` is the action
@@ -210,7 +209,7 @@ variable {R : Type*} [τR : TopologicalSpace R] [Semiring R] [TopologicalSemirin
210209
variable {M : Type*} [AddCommMonoid M] [Module R M] [aM : TopologicalSpace M] [IsActionTopology R M]
211210
variable {N : Type*} [AddCommMonoid N] [Module R N] [aN : TopologicalSpace N] [IsActionTopology R N]
212211

213-
lemma prod : IsActionTopology R (M × N) := by
212+
instance prod : IsActionTopology R (M × N) := by
214213
constructor
215214
haveI : ContinuousAdd M := isActionTopology_continuousAdd R M
216215
haveI : ContinuousAdd N := isActionTopology_continuousAdd R N
@@ -225,8 +224,7 @@ lemma prod : IsActionTopology R (M × N) := by
225224
refine @Continuous.comp _ _ _ (_) ((_ : TopologicalSpace ((M × N) × (M × N)))) (_) _ _ bar ?_
226225
apply (@continuous_prod_mk _ _ _ (_) (_) (_) _ _).2
227226
constructor
228-
·
229-
-- bleurgh, fighting typeclass inference all the time, which wants one "canonical"
227+
· -- bleurgh, fighting typeclass inference all the time, which wants one "canonical"
230228
-- topology on e.g. M × N.
231229
refine @Continuous.comp _ _ _ (_) (_) (_) _ ((LinearMap.inl R M N)) ?_
232230
(continuous_fst : Continuous (Prod.fst : M × N → M))
@@ -242,24 +240,53 @@ end prod
242240

243241
section Pi
244242

245-
variable {R : Type} [τR : TopologicalSpace R] [Semiring R] [TopologicalSemiring R]
243+
variable {R : Type*} [τR : TopologicalSpace R] [Semiring R] [TopologicalSemiring R]
244+
245+
instance piNat (n : ℕ) {A : Fin n → Type*} [∀ i, AddCommGroup (A i)]
246+
[∀ i, Module R (A i)] [∀ i, TopologicalSpace (A i)]
247+
[∀ i, IsActionTopology R (A i)]: IsActionTopology R (Π i, A i) := by
248+
induction n
249+
· infer_instance
250+
·
251+
sorry
246252

247253
variable {ι : Type*} [Finite ι] {A : ι → Type*} [∀ i, AddCommGroup (A i)]
248254
[∀ i, Module R (A i)] [∀ i, TopologicalSpace (A i)]
249255
[∀ i, IsActionTopology R (A i)]
250256

251-
lemma Pi : IsActionTopology R (∀ i, A i) := by
252-
sorry -- ask on Zulip how to get this for free from `prod` and `iso`
257+
instance pi : IsActionTopology R (∀ i, A i) := by
258+
induction ι using Finite.induction_empty_option
259+
· case of_equiv X Y e hind _ _ _ _ =>
260+
specialize hind (A := fun x ↦ A (e x))
261+
apply iso (R := R) (A := ∀ i, A (e i)) (B := ∀ i, A i)
262+
(Homeomorph.piCongrLeft e) (by exact LinearEquiv.piCongrLeft R A e)
263+
aesop
264+
· apply subsingleton
265+
· case h_option X _ hind _ _ _ _ =>
266+
specialize hind (A := fun x ↦ A (some x))
267+
-- Option X ≃ X ⊕ Unit
268+
-- look at what Yakov told me
269+
sorry
253270

254271
end Pi
255272

273+
-- elsewhere
274+
lemma finsum_apply {α ι N : Type*} [AddCommMonoid N] [Finite ι]
275+
(f : ι → α → N) (a : α) : (∑ᶠ i, f i) a = ∑ᶠ i, (f i) a := by
276+
classical
277+
simp only [finsum_def, dif_pos (Set.toFinite _), Finset.sum_apply]
278+
symm
279+
apply Finset.sum_subset <;> aesop
280+
256281
section bilinear
257282

258-
variable {R : Type*} [τR : TopologicalSpace R] [CommSemiring R] [TopologicalSemiring R]
283+
-- I need these because ` ChooseBasisIndex.fintype` needs a ring instead of a semiring
284+
variable {R : Type*} [τR : TopologicalSpace R] [CommRing R] [TopologicalRing R]
259285

260-
variable {A : Type*} [AddCommMonoid A] [Module R A] [aA : TopologicalSpace A] [IsActionTopology R A]
261-
variable {B : Type*} [AddCommMonoid B] [Module R B] [aB : TopologicalSpace B] [IsActionTopology R B]
262-
variable {C : Type*} [AddCommMonoid C] [Module R C] [aC : TopologicalSpace C] [IsActionTopology R C]
286+
-- similarly these don't need to be groups
287+
variable {A : Type*} [AddCommGroup A] [Module R A] [aA : TopologicalSpace A] [IsActionTopology R A]
288+
variable {B : Type*} [AddCommGroup B] [Module R B] [aB : TopologicalSpace B] [IsActionTopology R B]
289+
variable {C : Type*} [AddCommGroup C] [Module R C] [aC : TopologicalSpace C] [IsActionTopology R C]
263290

264291
lemma Module.continuous_bilinear_of_pi_finite (ι : Type*) [Finite ι]
265292
(bil : (ι → R) →ₗ[R] B →ₗ[R] C) : Continuous (fun ab ↦ bil ab.1 ab.2 : ((ι → R) × B → C)) := by
@@ -273,34 +300,48 @@ lemma Module.continuous_bilinear_of_pi_finite (ι : Type*) [Finite ι]
273300
simp_rw [← LinearMap.map_smul]
274301
--rw [LinearMap.finsum_apply]
275302
convert AddMonoidHom.map_finsum bil.toAddMonoidHom _
276-
· simp_rw [← Pi.single_smul, smul_eq_mul, mul_one]
303+
·
277304
ext j
305+
simp_rw [← Pi.single_smul, smul_eq_mul, mul_one]
278306
symm
279307
change (∑ᶠ (i : ι), Pi.single i (f i)) j = f j
280-
convert finsum_eq_single (fun j ↦ ∑ᶠ (i : ι), Pi.single i (f i) j) j _
281-
· sorry -- missing? finsum
282-
· symm
283-
convert finsum_eq_single (fun i ↦ Pi.single i (f i) j) j _ using 1
284-
· simp
285-
· intros i hi
286-
simp [hi]
287-
· intros i hi
288-
simp [hi]
289-
-- this goal is false
290-
sorry
308+
rw [finsum_apply]
309+
convert finsum_eq_single (fun i ↦ Pi.single i (f i) j) j _ using 1
310+
· simp
311+
· aesop
291312
· exact Set.toFinite _--(Function.support fun x ↦ f x • Pi.single x 1)
292-
sorry
293-
294-
lemma Module.continuous_bilinear [Module.Finite R A] [Module.Free R A]
313+
rw [foo]
314+
haveI : ContinuousAdd C := isActionTopology_continuousAdd R C
315+
apply continuous_finsum (fun i ↦ by fun_prop)
316+
intro x
317+
use Set.univ
318+
simp [Set.toFinite _]
319+
320+
lemma Module.continuous_bilinear_of_finite_free [Module.Finite R A] [Module.Free R A]
295321
(bil : A →ₗ[R] B →ₗ[R] C) : Continuous (fun ab ↦ bil ab.1 ab.2 : (A × B → C)) := by
296-
sorry
322+
let ι := Module.Free.ChooseBasisIndex R A
323+
let b : Basis ι R A := Module.Free.chooseBasis R A
324+
classical
325+
haveI : Finite ι := Fintype.finite <| Module.Free.ChooseBasisIndex.fintype R A--infer_instance
326+
let elinear : A ≃ₗ[R] (ι → R) := b.equivFun
327+
let bil' : (ι → R) →ₗ[R] B →ₗ[R] C := bil.comp elinear.symm.toLinearMap
328+
have := Module.continuous_bilinear_of_pi_finite ι bil'
329+
have foo : (fun ab ↦ (bil ab.1) ab.2 : A × B → C) = (fun fb ↦ bil' fb.1 fb.2) ∘
330+
(fun ab ↦ (elinear ab.1, ab.2) : A × B → (ι → R) × B) := by
331+
ext ⟨a, b⟩
332+
simp [bil']
333+
rw [foo]
334+
apply Continuous.comp this
335+
apply Continuous.prod_mk
336+
· exact continuous_of_linearMap (elinear.toLinearMap ∘ₗ (LinearMap.fst R A B))
337+
· fun_prop
297338

298339
end bilinear
299340

300341
section algebra
301342

302-
303-
variable (R) [CommSemiring R] [TopologicalSpace R] [TopologicalSemiring R]
343+
-- these shouldn't be rings, they should be semirings
344+
variable (R) [CommRing R] [TopologicalSpace R] [TopologicalRing R]
304345
variable (D : Type*) [Ring D] [Algebra R D] [Module.Finite R D] [Module.Free R D]
305346
variable [TopologicalSpace D] [IsActionTopology R D]
306347

@@ -310,7 +351,7 @@ open scoped TensorProduct
310351
lemma continuous_mul : Continuous (fun ab ↦ ab.1 * ab.2 : D × D → D) := by
311352
letI : TopologicalSpace (D ⊗[R] D) := actionTopology R _
312353
haveI : IsActionTopology R (D ⊗[R] D) := { isActionTopology' := rfl }
313-
apply Module.continuous_bilinear <| LinearMap.mul R D
354+
convert Module.continuous_bilinear_of_finite_free <| LinearMap.mul R D
314355

315356
def Module.topologicalRing : TopologicalRing D where
316357
continuous_add := (isActionTopology_continuousAdd R D).1
@@ -319,8 +360,6 @@ def Module.topologicalRing : TopologicalRing D where
319360

320361
end algebra
321362

322-
323-
324363
-- everything from here on is dead code and ideas which use other topologies
325364
section topology_problem
326365

0 commit comments

Comments
 (0)