ogposets.Closed

class rewalt.ogposets.Closed(support, ambient, **params)

Bases: GrSubset

Subclass of GrSubset for (downwards) closed subsets.

Implements a number of methods that do not make sense for non-closed subsets, in particular those computing input and output boundaries in each dimension.

Parameters
  • support (GrSet) – The underlying graded set.

  • ambient (OgPoset) – The ambient oriented graded poset.

Keyword Arguments

wfcheck (bool) – Check whether the support is a well-formed, closed subset of the ambient (default is True).

Notes

There is an alternative constructor subset() which takes a GrSubset, and “upgrades” it to a Closed if it is downwards closed.

Examples

After creating an oriented graded poset, we can obtain the closed subset of all its elements with OgPoset.all().

>>> point = OgPoset.point()
>>> triangle = point >> point >> point
>>> all = triangle.all()

We can compute its input and output boundary…

>>> all_in = all.input
>>> all_out = all.output

And since all happens to be a molecule, we can check the “globular” relations.

>>> assert all_in.input == all_out.input
>>> assert all_in.output == all_out.output

Methods

boundary([sign, dim])

Returns the boundary of a given orientation and dimension.

boundary_max([sign, dim])

Returns the subset of maximal elements of the boundary of a given orientation and dimension.

maximal()

Returns the subset of maximal elements, that is, those that are not covered by any other element in the closed subset.

subset(grsubset, **params)

Alternative constructor that promotes a GrSubset to a Closed.

Attributes

as_map

Returns an injective map representing the inclusion of the closed subset in the ambient.

input

Alias for boundary('-').

ispure

Returns whether the maximal elements of the closed subset all have the same dimension.

isround

Returns whether the closed subset is round ("has spherical boundary").

output

Alias for boundary('+').

property as_map

Returns an injective map representing the inclusion of the closed subset in the ambient.

Returns

as_map – A map of oriented graded posets representing the inclusion of the closed subset.

Return type

OgMap

property ispure

Returns whether the maximal elements of the closed subset all have the same dimension.

Returns

ispureTrue if and only if the subset is pure.

Return type

bool

property isround

Returns whether the closed subset is round (“has spherical boundary”).

This means that, for all k smaller than the dimension of the subset, the intersection of its input k-boundary and of its output k-boundary is equal to its (k-1)- boundary.

Returns

isroundTrue if and only if the subset is round.

Return type

bool

maximal()

Returns the subset of maximal elements, that is, those that are not covered by any other element in the closed subset.

Returns

maximal – The subset of maximal elements.

Return type

GrSubset

boundary_max(sign=None, dim=None)

Returns the subset of maximal elements of the boundary of a given orientation and dimension.

Parameters
  • sign (str, optional) – Orientation: '-' for input, '+' for output, None (default) for both.

  • dim (int, optional) – Dimension of the boundary (default is self.dim - 1).

Returns

boundary_max – The maximal elements of the requested boundary.

Return type

GrSubset

boundary(sign=None, dim=None)

Returns the boundary of a given orientation and dimension.

Parameters
  • sign (str, optional) – Orientation: '-' for input, '+' for output, None (default) for both.

  • dim (int, optional) – Dimension of the boundary (default is self.dim - 1).

Returns

boundary – The requested boundary subset.

Return type

Closed

property input

Alias for boundary('-').

property output

Alias for boundary('+').

static subset(grsubset, **params)

Alternative constructor that promotes a GrSubset to a Closed.

Parameters

grsubset (GrSubset) – The subset to promote.

Keyword Arguments

wfcheck (bool) – Check whether the subset is downwards closed (default is True).