Congruence helpers

This page contains the documentation for various helper functions for manipulating Congruence objects.

Contents

non_trivial_classes(…)

Find the non-trivial classes in the partition of a list of words.

partition(…)

Partition a list of words.

Full API

This page contains the documentation for various helper functions for manipulating Congruence objects. All such functions are contained in the submodule congruence.

congruence.non_trivial_classes(c: Congruence, words: list[list[int] | str]) list[list[list[int]] | list[str]]

Find the non-trivial classes in the partition of a list of words.

This function returns the classes with size at least \(2\) in the partition of the words in the list words induced by the Congruence instance c.

Parameters:
Returns:

The partition of the input list.

Return type:

list[list[list[int]] | list[str]]

congruence.partition(c: Congruence, words: list[list[int] | str]) list[list[list[int]] | list[str]]

Partition a list of words.

This function returns the classes in the partition of the words in the input list words induced by the Congruence instance c. This function triggers a full enumeration of c.

Parameters:
Returns:

The partitioned list of words.

Return type:

list[list[list[int]] | list[str]]