commutative ring¶
Commutative Ring¶
Commutative Ring
Mathematically a Commutative Ring is a Ring whose multiplication is commutative.
Important
Contract: Ring initializer parameters must have
add closed, commutative and associative on reps
mult closed, commutative and associative on reps
one an identity on reps,
rep*one == rep == one*repzero an identity on reps,
rep+zero == rep == zero+repnegate maps
rep -> -rep,rep + negate(rep) == zerozero
!=one
- class boring_math.abstract_algebra.algebras.commutative_ring.CommutativeRing¶
-
- __init__(mult: Callable[[H, H], H], add: Callable[[H, H], H], one: H, zero: H, negate: Callable[[H], H], narrow: Callable[[H], H] | None = None)¶
init
- param mult:
Closed associative function reps.
- param add:
Closed commutative and associative function reps.
- param one:
Representation for multiplicative identity.
- param zero:
Representation for additive identity.
- param negate:
Function mapping element representation to the representation of corresponding negated element.
- param narrow:
Narrow the rep type, many-to-one function. Like choosing an element from a coset of a group.
- class boring_math.abstract_algebra.algebras.commutative_ring.CommutativeRingElement¶
Bases:
RingElement,Generic- __init__(rep: H, algebra: CommutativeRing[H]) None¶
init
- param rep:
Coset element to be narrowed.
- param algebra:
Abelian group to which element belongs.