Skip to content

Commit 01cae52

Browse files
committed
remove freeness hypothesis :-)
1 parent a6ee732 commit 01cae52

File tree

1 file changed

+121
-80
lines changed

1 file changed

+121
-80
lines changed

FLT/ForMathlib/ActionTopology.lean

+121-80
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,67 @@ lemma continuous_neg (C : Type*) [AddCommGroup C] [Module R C] [TopologicalSpace
250250

251251
end function
252252

253+
section surjection
254+
255+
variable {R : Type*} [τR : TopologicalSpace R] [Ring R] [TopologicalRing R]
256+
variable {A : Type*} [AddCommGroup A] [Module R A] [aA : TopologicalSpace A] [IsActionTopology R A]
257+
variable {B : Type*} [AddCommGroup B] [Module R B] [aB : TopologicalSpace B] [IsActionTopology R B]
258+
259+
-- Here I need the lemma about how quotients are open so I do need groups
260+
-- because this relies on translates of an open being open
261+
lemma coinduced_of_surjective {φ : A →ₗ[R] B} (hφ : Function.Surjective φ) :
262+
TopologicalSpace.coinduced φ (actionTopology R A) = actionTopology R B := by
263+
have : Continuous φ := continuous_of_linearMap φ
264+
rw [continuous_iff_coinduced_le, isActionTopology R A, isActionTopology R B] at this
265+
apply le_antisymm this
266+
have : ContinuousAdd A := isActionTopology_continuousAdd R A
267+
refine sInf_le ⟨?_, ?_⟩
268+
· apply @ContinuousSMul.mk R B _ _ (_)
269+
obtain ⟨foo⟩ : ContinuousSMul R A := inferInstance
270+
rw [continuous_def] at foo ⊢
271+
intro U hU
272+
rw [isOpen_coinduced, ← isActionTopology R A] at hU
273+
specialize foo _ hU; clear hU
274+
rw [← Set.preimage_comp, show φ ∘ (fun p ↦ p.1 • p.2 : R × A → A) =
275+
(fun p ↦ p.1 • p.2 : R × B → B) ∘
276+
(Prod.map id ⇑φ.toAddMonoidHom) by ext; simp, Set.preimage_comp] at foo
277+
clear! aB -- easiest to just remove topology on B completely now so typeclass inference
278+
-- never sees it
279+
convert isOpenMap_of_coinduced (AddMonoidHom.prodMap (AddMonoidHom.id R) φ.toAddMonoidHom)
280+
(_) (_) (_) foo
281+
· -- aesop would do this if `Function.surjective_id : Surjective ⇑(AddMonoidHom.id R)`
282+
-- was known by it
283+
apply (Set.image_preimage_eq _ _).symm
284+
rw [AddMonoidHom.coe_prodMap, Prod.map_surjective]
285+
exact ⟨Function.surjective_id, by simp_all⟩
286+
· -- should `apply continuousprodmap ctrl-space` find `Continuous.prod_map`?
287+
apply @Continuous.prod_map _ _ _ _ (_) (_) (_) (_) id φ continuous_id
288+
rw [continuous_iff_coinduced_le, isActionTopology R A]
289+
· rw [← isActionTopology R A]
290+
exact coinduced_prod_eq_prod_coinduced (AddMonoidHom.id R) φ.toAddMonoidHom
291+
(Function.surjective_id) hφ
292+
· apply @ContinuousAdd.mk _ (_)
293+
obtain ⟨bar⟩ := isActionTopology_continuousAdd R A
294+
rw [continuous_def] at bar ⊢
295+
intro U hU
296+
rw [isOpen_coinduced, ← isActionTopology R A] at hU
297+
specialize bar _ hU; clear hU
298+
rw [← Set.preimage_comp, show φ ∘ (fun p ↦ p.1 + p.2 : A × A → A) =
299+
(fun p ↦ p.1 + p.2 : B × B → B) ∘
300+
(Prod.map ⇑φ.toAddMonoidHom ⇑φ.toAddMonoidHom) by ext; simp, Set.preimage_comp] at bar
301+
clear! aB -- easiest to just remove topology on B completely now
302+
convert isOpenMap_of_coinduced (AddMonoidHom.prodMap φ.toAddMonoidHom φ.toAddMonoidHom)
303+
(_) (_) (_) bar
304+
· aesop
305+
· apply @Continuous.prod_map _ _ _ _ (_) (_) (_) (_) <;>
306+
· rw [continuous_iff_coinduced_le, isActionTopology R A]; rfl
307+
· rw [← isActionTopology R A]
308+
exact coinduced_prod_eq_prod_coinduced φ φ hφ hφ
309+
310+
311+
end surjection
312+
313+
253314
section prod
254315

255316
variable {R : Type*} [τR : TopologicalSpace R] [Semiring R] [TopologicalSemiring R]
@@ -287,16 +348,6 @@ section Pi
287348

288349
variable {R : Type*} [τR : TopologicalSpace R] [Semiring R] [TopologicalSemiring R]
289350

290-
-- not sure I'm going to do it this way -- see `pi` below.
291-
-- instance piNat (n : ℕ) {A : Fin n → Type*} [∀ i, AddCommGroup (A i)]
292-
-- [∀ i, Module R (A i)] [∀ i, TopologicalSpace (A i)]
293-
-- [∀ i, IsActionTopology R (A i)]: IsActionTopology R (Π i, A i) := by
294-
-- induction n
295-
-- · infer_instance
296-
-- · case succ n IH _ _ _ _ =>
297-
-- specialize IH (A := fun i => A (Fin.castSucc i))
298-
-- sorry
299-
300351
variable {ι : Type*} [Finite ι] {A : ι → Type*} [∀ i, AddCommGroup (A i)]
301352
[∀ i, Module R (A i)] [∀ i, TopologicalSpace (A i)]
302353
[∀ i, IsActionTopology R (A i)]
@@ -319,10 +370,10 @@ instance pi : IsActionTopology R (∀ i, A i) := by
319370

320371
end Pi
321372

322-
section bilinear
373+
section semiring_bilinear
323374

324375
-- I need rings not semirings here, because ` ChooseBasisIndex.fintype` incorrectly(?) needs
325-
-- a ring instead of a semiring
376+
-- a ring instead of a semiring. This should be fixed.
326377
variable {R : Type*} [τR : TopologicalSpace R] [CommRing R] [TopologicalRing R]
327378

328379
-- similarly these don't need to be groups
@@ -359,12 +410,7 @@ lemma Module.continuous_bilinear_of_pi_finite (ι : Type*) [Finite ι]
359410
use Set.univ
360411
simp [Set.toFinite _]
361412

362-
-- Probably this can be beefed up in two distinct ways:
363-
-- Firstly, as it stands the lemma should be provable for semirings.
364-
-- Secind, we should be able to drop Module.Free in the ring case, change elinear.symm
365-
-- into a
366-
-- surjection not a bijection, and then use that quotients coinduce the action
367-
-- topology for groups (proved later, but not using this)
413+
-- Probably this can be beefed up to semirings.
368414
lemma Module.continuous_bilinear_of_finite_free [Module.Finite R A] [Module.Free R A]
369415
(bil : A →ₗ[R] B →ₗ[R] C) : Continuous (fun ab ↦ bil ab.1 ab.2 : (A × B → C)) := by
370416
let ι := Module.Free.ChooseBasisIndex R A
@@ -382,9 +428,42 @@ lemma Module.continuous_bilinear_of_finite_free [Module.Finite R A] [Module.Free
382428
· exact continuous_of_linearMap (elinear.toLinearMap ∘ₗ (LinearMap.fst R A B))
383429
· fun_prop
384430

385-
end bilinear
431+
end semiring_bilinear
432+
433+
section ring_bilinear
434+
435+
variable {R : Type*} [τR : TopologicalSpace R] [CommRing R] [TopologicalRing R]
436+
437+
variable {A : Type*} [AddCommGroup A] [Module R A] [aA : TopologicalSpace A] [IsActionTopology R A]
438+
variable {B : Type*} [AddCommGroup B] [Module R B] [aB : TopologicalSpace B] [IsActionTopology R B]
439+
variable {C : Type*} [AddCommGroup C] [Module R C] [aC : TopologicalSpace C] [IsActionTopology R C]
440+
441+
-- This needs rings though
442+
lemma Module.continuous_bilinear_of_finite [Module.Finite R A]
443+
(bil : A →ₗ[R] B →ₗ[R] C) : Continuous (fun ab ↦ bil ab.1 ab.2 : (A × B → C)) := by
444+
obtain ⟨m, f, hf⟩ := Module.Finite.exists_fin' R A
445+
let bil' : (Fin m → R) →ₗ[R] B →ₗ[R] C := bil.comp f
446+
have := Module.continuous_bilinear_of_pi_finite (Fin m) bil'
447+
let φ := f.prodMap (LinearMap.id : B →ₗ[R] B)
448+
have foo : Function.Surjective (LinearMap.id : B →ₗ[R] B) :=
449+
Function.RightInverse.surjective (congrFun rfl)
450+
have hφ : Function.Surjective φ := Function.Surjective.prodMap hf foo
451+
have := coinduced_of_surjective hφ
452+
rw [isActionTopology R (A × B), ← this, continuous_def]
453+
intro U hU
454+
rw [isOpen_coinduced, ← Set.preimage_comp]
455+
suffices Continuous ((fun ab ↦ (bil ab.1) ab.2) ∘ φ : (Fin m → R) × B → C) by
456+
rw [continuous_def] at this
457+
convert this _ hU
458+
rw [← prod.isActionTopology']
459+
rw [show (fun ab ↦ (bil ab.1) ab.2 : A × B → C) ∘ φ = (fun fb ↦ bil' fb.1 fb.2) by
460+
ext ⟨a, b⟩
461+
simp [bil', φ]]
462+
apply Module.continuous_bilinear_of_finite_free
463+
464+
end ring_bilinear
386465

387-
section algebra
466+
section semiring_algebra
388467

389468
-- these shouldn't be rings, they should be semirings
390469
variable (R) [CommRing R] [TopologicalSpace R] [TopologicalRing R]
@@ -394,74 +473,36 @@ variable [TopologicalSpace D] [IsActionTopology R D]
394473
open scoped TensorProduct
395474

396475
@[continuity, fun_prop]
397-
lemma continuous_mul : Continuous (fun ab ↦ ab.1 * ab.2 : D × D → D) := by
476+
lemma continuous_mul' : Continuous (fun ab ↦ ab.1 * ab.2 : D × D → D) := by
398477
letI : TopologicalSpace (D ⊗[R] D) := actionTopology R _
399478
haveI : IsActionTopology R (D ⊗[R] D) := { isActionTopology' := rfl }
400479
convert Module.continuous_bilinear_of_finite_free <| LinearMap.mul R D
401480

402-
def Module.topologicalRing : TopologicalRing D where
481+
-- this should be about top semirings
482+
def Module.topologicalSemiring : TopologicalSemiring D where
403483
continuous_add := (isActionTopology_continuousAdd R D).1
404-
continuous_mul := continuous_mul R D
405-
continuous_neg := continuous_neg R D
484+
continuous_mul := continuous_mul' R D
406485

407-
end algebra
486+
end semiring_algebra
408487

409-
section topology_problem
488+
section ring_algebra
410489

411-
variable {R : Type*} [τR : TopologicalSpace R] [Ring R] [TopologicalRing R]
412-
variable {A : Type*} [AddCommGroup A] [Module R A] [aA : TopologicalSpace A] [IsActionTopology R A]
413-
variable {B : Type*} [AddCommGroup B] [Module R B] [aB : TopologicalSpace B] [IsActionTopology R B]
490+
-- these shouldn't be rings, they should be semirings
491+
variable (R) [CommRing R] [TopologicalSpace R] [TopologicalRing R]
492+
variable (D : Type*) [Ring D] [Algebra R D] [Module.Finite R D]
493+
variable [TopologicalSpace D] [IsActionTopology R D]
414494

415-
-- Here I need the lemma about how quotients are open so I do need groups
416-
-- because this relies on translates of an open being open
417-
lemma coinduced_of_surjective {φ : A →ₗ[R] B} (hφ : Function.Surjective φ) :
418-
TopologicalSpace.coinduced φ (actionTopology R A) = actionTopology R B := by
419-
have : Continuous φ := continuous_of_linearMap φ
420-
rw [continuous_iff_coinduced_le, isActionTopology R A, isActionTopology R B] at this
421-
apply le_antisymm this
422-
have : ContinuousAdd A := isActionTopology_continuousAdd R A
423-
refine sInf_le ⟨?_, ?_⟩
424-
· apply @ContinuousSMul.mk R B _ _ (_)
425-
obtain ⟨foo⟩ : ContinuousSMul R A := inferInstance
426-
rw [continuous_def] at foo ⊢
427-
intro U hU
428-
rw [isOpen_coinduced, ← isActionTopology R A] at hU
429-
specialize foo _ hU; clear hU
430-
rw [← Set.preimage_comp, show φ ∘ (fun p ↦ p.1 • p.2 : R × A → A) =
431-
(fun p ↦ p.1 • p.2 : R × B → B) ∘
432-
(Prod.map id ⇑φ.toAddMonoidHom) by ext; simp, Set.preimage_comp] at foo
433-
clear! aB -- easiest to just remove topology on B completely now so typeclass inference
434-
-- never sees it
435-
convert isOpenMap_of_coinduced (AddMonoidHom.prodMap (AddMonoidHom.id R) φ.toAddMonoidHom)
436-
(_) (_) (_) foo
437-
· -- aesop would do this if `Function.surjective_id : Surjective ⇑(AddMonoidHom.id R)`
438-
-- was known by it
439-
apply (Set.image_preimage_eq _ _).symm
440-
rw [AddMonoidHom.coe_prodMap, Prod.map_surjective]
441-
exact ⟨Function.surjective_id, by simp_all⟩
442-
· -- should `apply continuousprodmap ctrl-space` find `Continuous.prod_map`?
443-
apply @Continuous.prod_map _ _ _ _ (_) (_) (_) (_) id φ continuous_id
444-
rw [continuous_iff_coinduced_le, isActionTopology R A]
445-
· rw [← isActionTopology R A]
446-
exact coinduced_prod_eq_prod_coinduced (AddMonoidHom.id R) φ.toAddMonoidHom
447-
(Function.surjective_id) hφ
448-
· apply @ContinuousAdd.mk _ (_)
449-
obtain ⟨bar⟩ := isActionTopology_continuousAdd R A
450-
rw [continuous_def] at bar ⊢
451-
intro U hU
452-
rw [isOpen_coinduced, ← isActionTopology R A] at hU
453-
specialize bar _ hU; clear hU
454-
rw [← Set.preimage_comp, show φ ∘ (fun p ↦ p.1 + p.2 : A × A → A) =
455-
(fun p ↦ p.1 + p.2 : B × B → B) ∘
456-
(Prod.map ⇑φ.toAddMonoidHom ⇑φ.toAddMonoidHom) by ext; simp, Set.preimage_comp] at bar
457-
clear! aB -- easiest to just remove topology on B completely now
458-
convert isOpenMap_of_coinduced (AddMonoidHom.prodMap φ.toAddMonoidHom φ.toAddMonoidHom)
459-
(_) (_) (_) bar
460-
· aesop
461-
· apply @Continuous.prod_map _ _ _ _ (_) (_) (_) (_) <;>
462-
· rw [continuous_iff_coinduced_le, isActionTopology R A]; rfl
463-
· rw [← isActionTopology R A]
464-
exact coinduced_prod_eq_prod_coinduced φ φ hφ hφ
495+
open scoped TensorProduct
465496

497+
@[continuity, fun_prop]
498+
lemma continuous_mul : Continuous (fun ab ↦ ab.1 * ab.2 : D × D → D) := by
499+
letI : TopologicalSpace (D ⊗[R] D) := actionTopology R _
500+
haveI : IsActionTopology R (D ⊗[R] D) := { isActionTopology' := rfl }
501+
convert Module.continuous_bilinear_of_finite <| LinearMap.mul R D
502+
503+
def Module.topologicalRing : TopologicalRing D where
504+
continuous_add := (isActionTopology_continuousAdd R D).1
505+
continuous_mul := continuous_mul R D
506+
continuous_neg := continuous_neg R D
466507

467-
end topology_problem
508+
end ring_algebra

0 commit comments

Comments
 (0)