uconf.core.signs

Shared sign conventions for shifted operadic/cooperadic constructions.

Functions

get_on_basis(morphism)

Extract the on_basis callable from a Sage module morphism.

koszul_sign_of_permutation(perm_0idx, degrees)

Compute the Koszul sign of a permutation acting on graded elements.

permutation_signature(sigma)

Return the signature of a permutation as +1 or -1.

shifted_boundary_sign(shift_degree)

Return the differential transport sign for an integer shift.

shifted_operadic_compose_sign(shift_degree, ...)

Return shift sign for operadic partial composition.

shifted_permutation_sign(shift_degree, sigma)

Return the suspension twist sgn(sigma)^shift_degree.

sign_from_exponent(exponent)

Return (-1)^exponent as +1 or -1.

uconf.core.signs.sign_from_exponent(exponent)[source]

Return (-1)^exponent as +1 or -1.

Parameters:

exponent (int)

Return type:

int

uconf.core.signs.permutation_signature(sigma)[source]

Return the signature of a permutation as +1 or -1.

Parameters:

sigma (Any)

Return type:

int

uconf.core.signs.shifted_permutation_sign(shift_degree, sigma)[source]

Return the suspension twist sgn(sigma)^shift_degree.

Parameters:
  • shift_degree (int)

  • sigma (Any)

Return type:

int

uconf.core.signs.shifted_boundary_sign(shift_degree)[source]

Return the differential transport sign for an integer shift.

Parameters:

shift_degree (int)

Return type:

int

uconf.core.signs.shifted_operadic_compose_sign(shift_degree, input_position, left_arity, right_arity, right_degree)[source]

Return shift sign for operadic partial composition.

Formula used in uconf.shifted_operad.ShiftedOperad: (-1)^(d * ((i-1)(n-1) + (m-1)|y|)).

Parameters:
  • shift_degree (int)

  • input_position (int)

  • left_arity (int)

  • right_arity (int)

  • right_degree (int)

Return type:

int

uconf.core.signs.koszul_sign_of_permutation(perm_0idx, degrees)[source]

Compute the Koszul sign of a permutation acting on graded elements.

Given a permutation perm and degrees [d_1, …, d_k], compute the sign incurred by permuting elements of degrees d_{perm[0]}, d_{perm[1]}, … back to their original order.

The sign is (-1)^{sum of d_i * d_j for all inversions (i,j) in perm}.

Warning: This function assumes that the input permutation is zero-indexed.

Parameters:
  • perm_0idx (list[int])

  • degrees (list[int])

Return type:

int

uconf.core.signs.get_on_basis(morphism)[source]

Extract the on_basis callable from a Sage module morphism.

Returns the on_basis function if available, or None. Calling on_basis(key) directly bypasses the overhead of morphism.__call__linear_combination for single-term inputs.

Parameters:

morphism (Any)