Zulip Chat Archive
Stream: Is there code for X?
Topic: algebra over an algebra is an algebra
Kevin Buzzard (Jun 05 2024 at 12:57):
Surely we have this in some form:
import Mathlib
example (A B C : Type) [CommRing A] [CommRing B] [CommRing C] [Algebra A B] [Algebra B C] :
Algebra A C := sorry
but exact?
and #synth
aren't finding it for me. This is data -- I want the one for which IsScalarTower A B C
is true :-)
Adam Topaz (Jun 05 2024 at 13:00):
Is it called docs#Algebra.trans or something?
Adam Topaz (Jun 05 2024 at 13:01):
No, I guess not. You can always compose the structure maps and use docs#RingHom.toAlgebra
Andrew Yang (Jun 05 2024 at 13:01):
I would do ((algebraMap B C).comp (algebraMap A C)).toAlgebra
and IsScalarTower.of_algebraMap_eq' rfl
Andrew Yang (Jun 05 2024 at 13:02):
The module version is docs#Module.compHom btw. Maybe we can have one for algebras.
Kevin Buzzard (Jun 05 2024 at 13:03):
Adam Topaz said:
No, I guess not. You can always compose the structure maps and use docs#RingHom.toAlgebra
I always worry about diamonds when doing this kind of thing.
Andrew Yang (Jun 05 2024 at 13:07):
Maybe #mwe ? This is fine in a local proof, and should be fine as long as you control where the algebra instances can come from.
Kevin Buzzard (Jun 05 2024 at 13:44):
In my example I'm not worried :-) If is the integers of a number field (or a Dedekind domain which isn't a field) with field of fractions then (third ring is docs#DedekindDomain.FiniteAdeleRing and 4th is docs#DedekindDomain.ProdAdicCompletions) and I keep needing everything to be an algebra over every smaller thing.
Filippo A. E. Nuccio (Jun 05 2024 at 13:50):
Andrew Yang said:
I would do
((algebraMap B C).comp (algebraMap A C)).toAlgebra
andIsScalarTower.of_algebraMap_eq' rfl
I also believe that this is the right approach, and the IsScalarTower
takes care of diamonds. In our project with @María Inés de Frutos Fernández we had this all over the places to pass from something global (, , ring of integers, number fields) to an extension of a local field.
Kevin Buzzard (Jun 05 2024 at 16:01):
Thanks! Obviously it can't be an instance in general because you can't predict B in advance but I'm in the same situation (four rings coming from number theory which I need to glue together, all types) and I'll try this approach.
Eric Wieser (Jun 05 2024 at 16:20):
To avoid diamonds, you may need to construct the smul field by hand
Kevin Buzzard (Jun 05 2024 at 16:35):
This is exactly what I'm asking about -- I don't know the pitfalls here. How should I define the smul field then? Are you saying the toAlgebra
approach suggested above might lead to diamonds?
Adam Topaz (Jun 05 2024 at 16:38):
I don't see how smul
would be defined without the structure maps except for something that looks silly like (a \bu 1) \bu b
or something like that.
Adam Topaz (Jun 05 2024 at 16:38):
In the special case of adeles, of course you could be much more direct.
Adam Topaz (Jun 05 2024 at 16:42):
Do we have docs#Algebra.copy ?
Last updated: May 02 2025 at 03:31 UTC