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(add: ~collections.abc.Callable[[H, H], H], mult: ~collections.abc.Callable[[H, H], H], one: H, zero: H, negate: ~collections.abc.Callable[[H], H], process: ~collections.abc.Callable[[H], H] = <function CommutativeRing.<lambda>>)¶
- Parameters:
add – Closed commutative and associative function reps.
mult – Closed associative function reps.
one – Representation for multiplicative identity.
zero – Representation for additive identity.
negate – Function mapping element representation to the representation of corresponding negated element.
- __init__(add: ~collections.abc.Callable[[H, H], H], mult: ~collections.abc.Callable[[H, H], H], one: H, zero: H, negate: ~collections.abc.Callable[[H], H], process: ~collections.abc.Callable[[H], H] = <function CommutativeRing.<lambda>>)¶
- Parameters:
add – Closed commutative and associative function reps.
mult – Closed associative function reps.
one – Representation for multiplicative identity.
zero – Representation for additive identity.
negate – Function mapping element representation to the representation of corresponding negated element.
- __call__(rep: H) CommutativeRingElement¶
Add the unique element to the ring with a given rep.
- Parameters:
rep – Representation to add if not already present.
- Returns:
The unique element with that representation.
- class boring_math.abstract_algebra.algebras.commutative_ring.CommutativeRingElement(rep: H, algebra: CommutativeRing[H])¶
- __init__(rep: H, algebra: CommutativeRing[H]) None¶
- __str__() str¶
Return str(self).