-
Notifications
You must be signed in to change notification settings - Fork 257
Open
Labels
Description
I've been thinking for a while about how to "correctly" implement modular arithmetic, such that it is:
- Easy to prove properties about
- Easily extensible to other rings (e.g. polynomials over the rationals)
Here's my plan as it stands, I'd like to gather design thoughts before I render it into existence
Algebra.Ideal
: left, right, two-sided, and symmetric ideals, defined as (left-, right-, bi-) modules with a monomorphism toAlgebra.Module.Construct.TensorUnit.whatever
. Possibly also prime and maximal ideals.Algebra.Ideal.Construct.Principal
: for every element of a ring we can find the smallest ideal containing that elementAlgebra.Ideal.Construct.Sum
: given two ideals, we can form another ideal consisting of all the elements{a + b | a in A, b in B}
Algebra.Ideal.Construct.Intersection
: given two ideals, we can form another ideal consisting of the elements that are in both idealsAlgebra.Construct.Quotient.Ring
: we can construct a new ring by quotienting a ring by an ideal. This could be extended to groups and normal subgroups too but I don't know how to make that fit quite yetAlgebra.Ideal.Relation.Binary.Coprime
: two ideals are coprime if their sum is isomorphic to the ambient ringAlgebra.ChineseRemainderTheorem
: if two ideals are coprime, then the product of their quotients is isomorphic to the quotient of their intersectionAlgbera.RIng.Bézout
: a Bézout ring is one where the sum of two principal ideals is itself principal (up to isomorphism). The integers are an example of this.
Once we have this, we can make other modules specialized to the integers, and that's a high road to modular arithmetic.
Other things to prove:
- when are quotient rings fields or integral domains? For this we need to better define fields and integral domains (see e.g. Discrete fields #1826)
- Most quotient rings over the integers are finite (we should have a definition of finite algebraic structures Add a notion of finite algebraic structures #1881 but we can show they're isomorphic as sets to
Fin n
)