fundamental_group#

Fundamental group presentation and Fox calculus utilities.

fundamental_group(k, return_dict=False)#

Return a presentation of the fundamental group of the complement of k in S³.

Relations:
  • Positive crossing: x_i * x_j * x_{i+1}⁻¹ * x_j⁻¹ = 1

  • Negative crossing: x_i * x_j⁻¹ * x_{i+1}⁻¹ * x_j = 1

  • Vertex: x₁^{s₁} * x₂^{s₂} * ... where sᵢ = 1 if the arc is directed into the vertex, and -1 if out of the vertex.

Parameters:
  • k (OrientedPlanarDiagram) – Oriented planar diagram.

  • return_dict (bool) – If True, also return a dict mapping each overstrand endpoint to its generator.

Returns:

  • FpGroup if return_dict is False.

  • Tuple (FpGroup, overstrand_generator_dict) if True.

Raises:

TypeError – If k is not oriented.

Return type:

FpGroup | tuple[FpGroup, dict]

fox_derivative(relator, variable, abelize=True)#

Compute the Fox derivative of relator with respect to variable.

Rules:

∂x_j/∂x_i = 1 if i == j else 0 ∂e/∂x_i = 0 ∂(uv)/∂x_i = ∂u/∂x_i + u * ∂v/∂x_i ∂(u⁻¹)/∂x_i = -u⁻¹ * ∂u/∂x_i

Example

d(x*y*x*y⁻¹*x⁻¹*y⁻¹)/dx = 1 + xy - xyxy⁻¹x⁻¹

Parameters:
  • relator (FreeGroupElement) – Free group element (relator).

  • variable – Generator or its index in relator.

  • abelize (bool) – If True, return the abelianized derivative.

Returns:

Fox derivative (SymPy expression).

Raises:
  • NotImplementedError – If abelize is False.

  • ValueError – If a variable exponent is not ±1.

alexander_fox_matrix(G)#

Compute the Fox Jacobian matrix for a finitely presented group.

Parameters:

G (FpGroup) – Finitely presented group.

Returns:

List of lists of Fox derivatives (as SymPy expressions).

Return type:

MutableDenseMatrix