algebraixlib.mathobjects package

This package contains the modules that define the classes that represent data.

The modules are:

  • mathobject: Contains the abstract base class MathObject. It is the base class of all other data classes and can’t be instantiated. It also provides the utility functions raise_if_not_mathobject() and raise_if_not_mathobjects() that raise a TypeError if the argument is not an instance of MathObject (resp. is not a collection of such instances).
  • atom: Contains the class Atom. Instances of this class represent atoms; that is, values (of non-math objects, like numbers, strings or any immutable Python value). All instances of Atom are members of set A (\(A\)), or conversely, set A is the set of all instances of Atom. It also provides the utility function auto_convert() that makes sure that its argument is always an instance of MathObject; if it isn’t, it converts it into an Atom.
  • couplet: Contains the class Couplet that represents a couplet.
  • set: Contains the class Set that represents a set.

If you import mathobjects (the package), all module-level symbols (functions, classes) are imported.