jacopy.Wedge

class jacopy.Wedge(*children)

Bases: Expr

n-ary wedge product α_1 ∧ α_2 ∧ … ∧ α_p.

Children are stored in the order given. No graded reordering is applied at construction, that requires degree information and lives in jacopy.algorithms.sort_product (or a dedicated wedge-sort pass added when needed).

The smart constructor make() flattens nested wedges (associativity), absorbs any 0 factor, drops integer-1 factors (the wedge unit), and collapses to a single factor when only one remains. Degree-aware identities such as α ∧ α = 0 for a degree-1 α are not applied here; a graded-canonicalize pass is responsible for those.

Parameters:

children (Expr)

__init__(*children)
Parameters:

children (Expr)

Return type:

None

Methods

__init__(*children)

clone()

Return self.

find(predicate)

Yield descendants (including self) satisfying predicate.

make(*args)

Smart constructor.

replace_at(path, new)

Return a new tree with new spliced at path.

substitute_atom(dummy, target)

Return self with every occurrence of dummy replaced by target.

walk()

Pre-order traversal yielding self followed by descendants through children only.

Attributes

children

Tuple of immediate children.

is_atom

property children: Tuple[Expr, ...]

Tuple of immediate children. Atoms return ().

classmethod make(*args)

Smart constructor.

  • Flattens nested wedges (associativity).

  • Returns Zero if any factor is the integer 0.

  • Drops integer-1 factors (the wedge unit).

  • Collapses an empty wedge to One and a one-factor wedge to that factor.

Parameters:

args (Expr)

Return type:

Expr