baseset (Abstract)

Implementation Details

  • BaseSet: Base class for algebras

  • BaseElement: Base class for elements of algebras.

class boring_math.abstract_algebra.algebras.baseset.BaseSet(process: ~collections.abc.Callable[[H], H] = <function BaseSet.<lambda>>)
__init__(process: ~collections.abc.Callable[[H], H] = <function BaseSet.<lambda>>) None
abstractmethod __call__(rep: H) BaseElement

Call self as a function.

__eq__(other: object) bool

Warning

API subject to change. Might want to make this some sort of comparison.

Parameters:

other – Object being compared to.

Returns:

self is other if other same type of algebra, otherwise NotImplemented.

__weakref__

list of weak references to the object

class boring_math.abstract_algebra.algebras.baseset.BaseElement(rep: H, algebra: BaseSet[H])
__init__(rep: H, algebra: BaseSet[H]) None
__call__() H
Returns:

The representation wrapped by the element.

__eq__(other: object) bool

Return self==value.

__weakref__

list of weak references to the object

class boring_math.abstract_algebra.algebras.baseset.NaturalMapping(*args, **kwargs)

Similar to the collections/abc.Mapping protocol, NaturalMapping supports read-only access to dict-like objects which can be extended in a “natural” deterministic way.

__init__(*args, **kwargs)
classmethod __subclasshook__(other)

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object