Transf, PPerm, and Perm helpers

This page contains the documentation for various helper functions for manipulating transformations, partial permutations, and permutations.

Contents

domain(…)

Returns the set of points where a partial transformation is defined.

image(…)

Returns the set of points in the image of a partial transformation.

inverse(…)

Returns the inverse of a partial perm or permutation.

left_one(…)

Returns the left one of a partial perm.

one(…)

Returns the identity on the same number of points as the degree of f.

right_one(…)

Returns the right one of a partial perm.

Full API

This page contains the documentation for the transf subpackage, that contains helper functions for the Transf, Perm, PPerm classes.

transf.domain(f: Transf | PPerm | Perm) list[int]

Returns the set of points where a partial transformation is defined.

This function returns a list[int] containing those values i such that:

  • \(i\in \{0, \ldots, n - 1\}\) where n is the degree of f; and

  • f[i] != UNDEFINED (only applies to partial perms).

Parameters:

f (Transf | PPerm | Perm) – the transformation, partial perm, or permutation.

Returns:

The sorted list of points in the domain.

Return type:

list[int]

Complexity:

Linear in the degree of f.

transf.image(f: Transf | PPerm | Perm) list[int]

Returns the set of points in the image of a partial transformation.

Returns a list[int] containing those values f[i] such that:

  • \(i\in \{0, \ldots, n - 1\}\) where n is the degree of f; and

  • f[i] != UNDEFINED.

Parameters:

f (Transf | PPerm | Perm) – the transformation.

Returns:

The sorted list of points in the image.

Return type:

list[int]

Complexity:

Linear in the degree of f.

transf.inverse(f: PPerm | Perm) PPerm | Perm

Returns the inverse of a partial perm or permutation.

This function returns a newly constructed inverse of f. The inverse of a partial permutation f is the partial perm g such that fgf = f and gfg = g.

Parameters:

f (PPerm | Perm) – the partial perm.

Returns:

The inverse of f.

Return type:

PPerm | Perm

Complexity:

Linear in the degree of f.

transf.left_one(f: PPerm) PPerm

Returns the left one of a partial perm.

This function returns a newly constructed partial perm with degree equal to that of f that fixes every value in the domain of f, and is UNDEFINED on any other values.

Parameters:

f (PPerm) – the partial perm.

Returns:

The left one of f.

Return type:

PPerm

Complexity:

Linear in the degree of f.

transf.one(f: Transf | PPerm | Perm) Transf | PPerm | Perm

Returns the identity on the same number of points as the degree of f. This function returns a newly constructed object of the same type as f that fixes every value from 0 to f.degree().

Parameters:

f (Transf | PPerm | Perm) – the transformation, partial perm, or permutation.

Returns:

The identity.

Return type:

Transf | PPerm | Perm

Complexity:

Linear in the degree of f.

transf.right_one(f: PPerm) PPerm

Returns the right one of a partial perm.

This function returns a newly constructed partial perm with degree equal to that of f that fixes every value in the image of f, and is UNDEFINED on any other values.

Parameters:

f (PPerm) – the partial perm.

Returns:

The right one of f.

Return type:

PPerm

Complexity:

Linear in the degree of f.