Zulip Chat Archive
Stream: Is there code for X?
Topic: CompleteGroupAlgebra
张守信(Shouxin Zhang) (May 03 2025 at 13:29):
Consider the traditional definition of the completed group algebra, I ended up trying the following Lean 4 code implementation:
import Mathlib
open CategoryTheory Opposite
universe u v
variable (G : ProfiniteGrp.{u}) (R : Type v) [CommRing R]
noncomputable def completeGroupAlgebraFunctor : OpenNormalSubgroup G ⥤ AlgebraCat R where
obj N := AlgebraCat.of R (MonoidAlgebra R (G ⧸ N.toSubgroup))
map {N₁ N₂} (f : N₁ ⟶ N₂) :=
AlgebraCat.ofHom <| MonoidAlgebra.mapDomainAlgHom R R <|
(QuotientGroup.map N₁.toSubgroup N₂.toSubgroup (MonoidHom.id G) f.le)
map_id := by simp
map_comp {X Y Z} f g := by ext x y; simp
noncomputable abbrev cGA := AlgebraCat.HasLimits.limitCone (completeGroupAlgebraFunctor G R)
Is this correct? I'm a bit unsure if mathematically it should be (OpenNormalSubgroup G)ᵒᵖ ⥤ AlgebraCat R. Clearly, it's mathematically unlikely to construct a functor (OpenNormalSubgroup G)ᵒᵖ ⥤ AlgebraCat R. But how do we represent the 'inverse' nature of the inverse limit?
Kevin Buzzard (May 03 2025 at 14:58):
What a mathematician calls an "inverse limit" we just call a "limit" in Lean, so take the limit :-)
I think you're right that the functor is covariant. If you added "op" then for two normal subgroups you would have to give a map from to and these maps would have to satisfy a bunch of axioms: good luck with that, I don't think you'd be able to fill in the sorries.
Filippo A. E. Nuccio (May 04 2025 at 00:17):
But in your definition you end up building the raw underlying ring without a topology, right?
Jz Pan (May 04 2025 at 00:22):
Filippo A. E. Nuccio said:
But in your definition you end up building the raw underlying ring without a topology, right?
I think the above definition itself has no topology if each piece AlgebraCat.of R (MonoidAlgebra R (G ⧸ N.toSubgroup)) has no topology given.
Filippo A. E. Nuccio (May 04 2025 at 04:07):
Sure, but
- if those pieces have a natural topology (eg coming from the coefficient ring) it would be important to store it
- even endowing each piece with the discrete topology, the whole "completed" group algebra c/would carry the projective limit topology.
Jz Pan (May 05 2025 at 02:48):
For maximal generality, I want R be only CommSemiring. Do we have analogue of AlgebraCat for Semiring? If not, then I think I have to drop category theory approach.
Jz Pan (May 05 2025 at 03:18):
@Nailin Guan
Jz Pan (May 05 2025 at 03:27):
Jz Pan said:
Do we have analogue of
AlgebraCatforSemiring
Then ModuleCat also needs modification...
Nailin Guan (May 05 2025 at 03:32):
Those categories are far from good, if you insist having CommSemiring or even Semiring, I prefer to make a force construction and then verify it is limit in the good case.
Jz Pan (May 05 2025 at 03:36):
Nailin Guan said:
Those categories are far from good
I don't agree. The construction of limit does not require subtraction, so Semi is good enough.
Nailin Guan (May 05 2025 at 03:55):
It is about the category itself, not the construction.
Adam Topaz (May 07 2025 at 12:48):
SemiRingCat has all limits (just like any algebraic category)
Jz Pan (May 07 2025 at 14:16):
Adam Topaz said:
SemiRingCathas all limits (just like any algebraic category)
But it does not have algebra structure over a CommSemiring. What I want is SemiAlgebraCat which allow Semiring over a CommSemiring. I've played it a little bit at #24599 but seems that it breaks something.
Adam Topaz (May 07 2025 at 14:27):
what breaks? why don’t you just make SemiAlgebraCat as a new type
Jz Pan (May 07 2025 at 14:35):
Adam Topaz said:
what breaks?
Seems that some Ring instance is missing, or is not definitionally equal to the existing one.
why don’t you just make SemiAlgebraCat as a new type
Then I need to copy contents of 4 files from AlgebraCat folder...
Jz Pan (May 07 2025 at 14:49):
The first error occurred at Mathlib/Algebra/BrauerGroup/Defs, it complained that NonUnitalNonAssocRing carrier is not found:
universe u v
section test
variable (K : Type u) [Field K] (R : AlgebraCat.{v} K)
#synth NonUnitalNonAssocRing R.carrier -- This runs correctly
end test
/-- `CSA` is the set of all finite dimensional central simple algebras over field `K`, for its
generalisation over a `CommRing` please find `IsAzumaya` in `Mathlib.Algebra.Azumaya.Defs`. -/
structure CSA (K : Type u) [Field K] extends AlgebraCat.{v} K where
/-- Any member of `CSA` is central. -/
[isCentral : Algebra.IsCentral K carrier]
/-- Any member of `CSA` is simple. -/
[isSimple : IsSimpleRing carrier] -- but here it complains `NonUnitalNonAssocRing carrier` is not found
/-- Any member of `CSA` is finite-dimensional. -/
[fin_dim : FiniteDimensional K carrier]
But in the test code above, #synth NonUnitalNonAssocRing R.carrier works correctly. So I don't know what's wrong in it.
Christian Merten (May 07 2025 at 14:52):
Depending on your application, it might be easier to put algebraic structures on docs#InverseSystem.limit instead (which we should have anyway). Especially if you want to have a topology on the limit, it is probably easier to hook up to the rest of the library if you don't go via category theory.
Andrew Yang (May 07 2025 at 15:23):
cf FLT#428
Jz Pan (May 07 2025 at 15:24):
Whoops, we already have inverse limits of sets in mathlib? That's cool. Seems that we also have direct limits of
various algebraic structures in https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Colimit/DirectLimit.html but we don't have inverse limits of them yet.
Jz Pan (May 07 2025 at 15:27):
I've reinventing the wheel at https://acmepjz.github.io/lean-iwasawa/docs/Iwasawalib/Algebra/CompleteGroupAlgebra/Basic.html :man_facepalming:
Adam Topaz (May 07 2025 at 16:18):
Why does InverseSystem.limit use docs#Set.Iio ?
Christian Merten (May 07 2025 at 16:23):
Adam Topaz said:
Why does InverseSystem.limit use docs#Set.Iio ?
This is a question for @Junyan Xu. I think the original application is some cardinality result, which relates cardinalities of various "sub" limits.
In applications, we can just use WithTop and the limit at \top though.
Adam Topaz (May 07 2025 at 16:29):
yeah, but then you have to deal with going back and forth from WithTop, and in particular you need to specify where Top goes in F, which means you need some junk value...
Adam Topaz (May 07 2025 at 16:29):
I think using CategoryTheory.Functor.sections is the better approach if you want the "standard" type underlying the limit.
Junyan Xu (May 07 2025 at 21:54):
Before we generalize AlgebraCat maybe we should first generalize CategoryTheory.Preadditive and ModuleCat (they both require AddCommGroup now).
The error with IsSimpleRing in CSA is because TwoSidedIdeal currently requires NonUnitalNonAssocRing. TwoSidedIdeal is currently just a wrapper around RingCon, and I think we should redefine it to be {I : Ideal R // I.IsTwoSided} (they're the same over a ring by docs#TwoSidedIdeal.orderIsoIsTwoSided; for semirings there will be a map from RingCon R to TwoSidedIdeal R, and taking the RingCon generated by an ideal is a left inverse), but you'd need to generalize Ideal to allow non-unital and non-associative semirings to achieve the same level of generality. Or maybe we can drop TwoSidedIdeal and just use RingCon.
Junyan Xu (May 07 2025 at 22:00):
Why does docs#InverseSystem.limit use docs#Set.Iio?
yeah, but then you have to deal with going back and forth from
WithTop, and in particular you need to specify whereTopgoes inF, which means you need some junk value...
My original motivation for introducing this is to carry out some transfinite recursive construction which requires taking the inverse limit at a limit ordinal (not dissimilar to the small object argument @Joël Riou carried out in a more categorical setting). Indeed in order to retrieve the final construction I needed to use WithTop (see Field.Emb.Cardinal.embFunctor).
Junyan Xu (May 07 2025 at 22:13):
I think it would be beneficial to generalize Direct/InverseSystem to use (co)filtered indexing categories instead of a preorder. This has been discussed in and #23339 and #23364 are relevant PRs (indeed docs#DirectLimit may be redefined using the colimit type as Quot is almost as nice as Quotient when it comes to defeq, and we just need to show if the indexing category is filtered then equality in the quotient is given by the specific equivalence relation (CategoryTheory.Limits.Types.FilteredColimit.rel_eq_eqvGen_quot_rel)). Special cases like docs#InverseSystem.limit could be given a more specific name.
Jz Pan (May 08 2025 at 02:15):
Junyan Xu said:
The error with
IsSimpleRinginCSAis becauseTwoSidedIdealcurrently requiresNonUnitalNonAssocRing
The question is that I think I already added the relevant instances (see the code above variable (K : Type u) [Field K] (R : AlgebraCat.{v} K); #synth NonUnitalNonAssocRing R.carrier which can be inferred correctly), but seems that it's not recognized by [isSimple : IsSimpleRing carrier].
Jz Pan (May 10 2025 at 14:41):
Andrew Yang said:
cf FLT#428
Interesting, the Algebra and AlgHom version is missing in that PR.
Kevin Buzzard (May 10 2025 at 15:55):
@Jz Pan please feel free to PR! I just merged that one. The review process in FLT is infinitely lighter than in mathlib, and both you and @Junyan Xu would be welcome to experiment. What we need in FLT is the existence of deformation rings. If we could get these before my talk at Big Proof on 9th June, this would be awesome!
Jz Pan (May 10 2025 at 18:31):
Kevin Buzzard said:
Jz Pan please feel free to PR! I just merged that one. The review process in FLT is infinitely lighter than in mathlib, and both you and Junyan Xu would be welcome to experiment. What we need in FLT is the existence of deformation rings. If we could get these before my talk at Big Proof on 9th June, this would be awesome!
In my https://acmepjz.github.io/lean-iwasawa/docs/Iwasawalib/Algebra/CompleteGroupAlgebra/Basic.html it's algebra version. The typeclass is automatically inferred from algebra structure of Pi (I use abbrev instead of def so the typeclass is passthrough). Also in my application I need the concepts of directed and cofinal/coinitial. It turns out that I also need inverse limit of general rings, not only group algebras, which I will refactor later.
Junyan Xu (May 11 2025 at 13:14):
What we need in FLT is the existence of deformation rings. If we could get these before my talk at Big Proof on 9th June, this would be awesome!
Are there some specific sorries for these?
Kevin Buzzard (May 11 2025 at 13:34):
The situation is that I had a student working on this, but unfortunately they have now got a job so have no time to continue. I'll ask them what the situation is.
Kevin Buzzard (May 11 2025 at 15:36):
ok so their WIP work is all in the WIP PR FLT#481 which will need a lot of disentangling (there are conflicts, and it's +2500, I'm currently trying to get it compiling), and the student will not be working on it any more.
Notification Bot (May 12 2025 at 15:09):
A message was moved from this topic to #FLT > Deformation rings by Kevin Buzzard.
Jz Pan (May 13 2025 at 14:40):
Do we have this in mathlib?
import Mathlib
open scoped TensorProduct
variable (R : Type*) [CommRing R] (G H : Type*) [Group G] [Group H]
noncomputable example : MonoidAlgebra R G ⊗[R] MonoidAlgebra R H ≃ₐ[R] MonoidAlgebra R (G × H) :=
sorry
It should come from docs#finsuppTensorFinsupp.
Actually I need PiTensorProduct version. (Which is used to prove from one-variable result.)
Jz Pan (May 13 2025 at 14:42):
Oh, there is a "TODO: generalize to MonoidAlgebra" in module docstring
张守信(Shouxin Zhang) (May 14 2025 at 06:58):
Jz Pan said:
Oh, there is a "TODO: generalize to MonoidAlgebra" in module docstring
I had Gemini generate a proof that looked like some trivial verification of the definition. If the infrastructure on lib was complete, I might be able to try to solve this problem. :grinning_face_with_smiling_eyes:
Jz Pan (May 14 2025 at 07:14):
We also don't have topology on MonoidAlgebra or Finsupp :man_facepalming:
Jz Pan (May 14 2025 at 07:14):
Topology on MvPowerSeries is via docs#MvPowerSeries.WithPiTopology.instTopologicalSpace
Jz Pan (May 14 2025 at 07:16):
So we even can't state there exists an isomorphism of topological rings (missing topological space structure on each piece )
Jz Pan (May 14 2025 at 07:25):
BTW, an unrelated note: seems that we don't have compact open topology (we don't need it yet), and it conflicts with the default instance docs#Pi.topologicalSpace Sorry, it's docs#ContinuousMap.compactOpen
Kevin Buzzard (May 14 2025 at 07:34):
has got three distinct natural topologies on it (-adic, -adic, -adic) and all are used in the literature, so it's not surprising that there are difficulties here in mathlib, where only one "canonical" topology is supposed to be allowed on any type.
Jz Pan (May 14 2025 at 07:48):
Kevin Buzzard said:
has got three distinct natural topologies on it (-adic, -adic, -adic) and all are used in the literature, so it's not surprising that there are difficulties here in mathlib, where only one "canonical" topology is supposed to be allowed on any type.
No worries, the docs#MvPowerSeries.WithPiTopology.instTopologicalSpace is scoped so it's not the only "canonical" one. It is the product topology, and in fact equal to the -adic toploogy.
The point is that the polynomial ring also has these 3 topologies, different one gives different completion (-adic completion is while -adic and -adic completions are --- only as a ring! as topological rings -adic and -adic topology are different). I need to use -adic or -adic completion, not sure.
... And we don't have topologies on polynomial rings yet, even scoped one.
Kevin Buzzard (May 14 2025 at 08:09):
Let's thnk about this question! For to be right I guess it boils down to the following question. Consider the obvious inclusion . Give the only sensible topology; it's both the -adic and the -adic topology! It's also the -module topology BTW. What is the induced topology on as a subset of the product?
Jz Pan (May 14 2025 at 09:55):
Kevin Buzzard said:
What is the induced topology on as a subset of the product?
It's the (p,X)-adic topology.
Jz Pan (May 14 2025 at 09:57):
Let's read my stupid blueprint (online version at https://acmepjz.github.io/lean-iwasawa/blueprint/sect0004.html#Iwasawa-alg-isom-finite-level)
Jz Pan (May 14 2025 at 10:01):
Kevin Buzzard said:
Consider the obvious inclusion
I think it requires Weierstrass division, fortunately it's already in an open PR.
Jz Pan (May 14 2025 at 10:03):
But that indeed looks promising. Maybe I can work out a version without topology first.
Yakov Pechersky (May 14 2025 at 10:08):
Do we have any instances that show that something is a Z_p module, other than the concrete Z_p[X] and the like?
Jz Pan (May 14 2025 at 10:13):
Yakov Pechersky said:
Do we have any instances that show that something is a Z_p module, other than the concrete Z_p[X] and the like?
You mean modules which do not start with , for example inverse limits of ? (Or in fact itself is also a -module.)
Jz Pan (May 14 2025 at 18:38):
Properties of (1 + X) ^ n - 1 is implemented in https://acmepjz.github.io/lean-iwasawa/docs/Iwasawalib/RingTheory/Polynomial/OneAddXPowSubOne.html.
Kevin Buzzard (May 14 2025 at 19:09):
@Jz Pan Re your blueprint proof, the sentence in the second screenshot starting "It's easy to see that..." is false (if I understood it correctly), e.g. 4 choose 2 is 6 and more generally p^n choose p^m will give you problems (as will other choices of i).
Jz Pan (May 15 2025 at 03:23):
Kevin Buzzard said:
the sentence in the second screenshot starting "It's easy to see that..." is false (if I understood it correctly)
Sorry, that's indeed incorrect. Will be fixed soon.
Filippo A. E. Nuccio (May 16 2025 at 09:54):
Jz Pan said:
But that indeed looks promising. Maybe I can work out a version without topology first.
This is indeed the approach taken by Serre Classes des corps cyclotomiques (Sém. Bourbaki, exp 174 ), Section 6: but a bit of topology is required to show that taking the limit gives an isomorphism.
Antoine Chambert-Loir (May 16 2025 at 21:22):
Jz Pan said:
... And we don't have topologies on polynomial rings yet, even scoped one.
Polynomials are function with finite unspecified support, so I believe the natural topology on polynomial rings would be the inductive limit topology of the product topologies on polynomials of given degree. At least that topology has the merit of making continuous the evaluation maps , .
Aaron Liu (May 16 2025 at 21:23):
That's great! What's the topology on polynomials of a given degree?
Kevin Buzzard (May 16 2025 at 21:24):
I guess Antoine means "polynomials of at most a given degree", because these are just R^n with the product topology.
Aaron Liu (May 16 2025 at 21:29):
Then I think this gives you "the finest topology which makes Polynomial.update continuous"
Aaron Liu (May 16 2025 at 21:41):
I'm not sure how this makes the evaluation continuous... got my limits mixed up
Jz Pan (May 17 2025 at 04:43):
I think the question reduced to: what is the topology on docs#Finsupp (or docs#DFinsupp, i.e. coproducts of abelian groups)? Should it be the finest topology such that docs#Finsupp.single is continuous, or the coarsest topology such that docs#Finsupp.linearCombination (corresponding to evaluation maps for polynomials) is continuous?
Jz Pan (May 17 2025 at 04:45):
Note that the finest topology definition seems to be finer then the subspace topology of product topology.
Jz Pan (May 17 2025 at 04:56):
Seems that the coarsest topology definition is the correct one, see https://math.stackexchange.com/questions/5095/what-are-the-product-and-coproduct-in-the-category-of-topological-groups. But it said that "However, it is hard to describe this topology explicitly (and thus, for instance, proving separation axioms)."
Maybe I should stick to an ad-hoc scoped "piTopology"...
Jz Pan (May 17 2025 at 05:50):
Not that the second coarsest topology definition is at least as fine as the first finest topology definition, since you can consider the linearCombination into the first one.
Kevin Buzzard (May 17 2025 at 08:03):
Note that Andrew Yang's work on TopModuleCat has a generalisation of this: the adjoint to the forgetful functor from topological modules to topological spaces takes a type I with a topology and then gives a topology to the free module on I (which I couldn't figure out how to express directly). I maintainer merged the PR yesterday, sorry for no precise link, on mobile
Kevin Buzzard (May 17 2025 at 08:19):
Antoine Chambert-Loir (May 17 2025 at 18:59):
I had explained this property on my blog.
https://freedommathdance.blogspot.com/2024/04/the-topology-on-ring-of-polynomials-and.html
Antoine Chambert-Loir (May 17 2025 at 19:06):
This description is inspired by what is done for test functions in distribution theory. Evaluation is continuous, but I do not claim that it is the coarsest topology that would guarantee the continuity of evaluations. (Unless it is trivially true, I'd guess it unlikely to hold in general.)
Aaron Liu (May 17 2025 at 19:10):
It is not the coarsest topology that makes evaluation continuous, because some polynomials evaluate the same on all inputs
Jz Pan (May 18 2025 at 03:37):
I think it is the coarsest topology that makes linear combination continuous.
Last updated: Dec 20 2025 at 21:32 UTC