algebraixlib.mathobjects.couplet module

A math object that represents a couplet.

class algebraixlib.mathobjects.couplet.Couplet(left, right=None, direct_load=False)[source]

Bases: algebraixlib.mathobjects.mathobject.MathObject

A couplet, consisting of a ‘left component’ MathObject and a ‘right’ MathObject.

Construct an instance, consisting of two MathObject instances left and right.

If either of the arguments is not a MathObject, make it an Atom with the argument as value.

left

Read-only property; return the left component of this instance.

right

Read-only property; return the right of this instance.

get_ground_set()[source]

Return the ground set of the lowest-level algebra of this MathObject.

is_reflexive()[source]

Return True if this Couplet is reflexive.

Reflexive means that left and right are equal.

is_symmetric()[source]

Return True if this Couplet is symmetric.

Reflexive means that left and right are equal.

get_repr()[source]

Return the instance’s code representation.

get_str()[source]

Return the instance’s string representation (the string representation of the value).

__eq__(other)[source]

A value-based comparison for equality. Return True if type and both members match.

__ne__(other)[source]

A value-based comparison for inequality. Return True if type or members don’t match.

__hash__()[source]

Return a hash based on the value that is calculated on demand and cached.

__repr__()[source]

Return the instance’s code representation.

__str__()[source]

Return the instance’s string representation.