cyjax.Fermat#

class cyjax.Fermat(dim_variety=3)#

Bases: VarietySingle

__init__(dim_variety=3)#

Complex projective variety given by single defining equation.

Instead of using a HomPoly object, varieties can also be created using the classmethod VarietySingle.from_sympy().

Methods

__init__([dim_variety])

Complex projective variety given by single defining equation.

best_dependent(zs, params, patch)

Compute numerically optimal dependent coordinate.

compute_vol(key, params[, batches, ...])

Compute CY (top-form) volume of manifold.

defining(zs[, params, patch])

Defining equation of the variety as embedded in ambient space.

from_sympy(_[, var_name, poly_degree, params])

Construct the variety object from the defining equation.

grad_defining(zs, params[, patch])

Holomorphic gradient of defining equation.

induced_fs(zs, params, patch[, zs_c, dependent])

Induced FS metric.

induced_metric(metric, zs, params, patch[, ...])

Induced metric given ambient CPn metric.

jacobian_embed(zs, params, patch[, dependent])

Jacobian of embedding into ambient projective space.

sample_intersect(key, params, count[, ...])

Sample points on the variety using the intersection method.

sample_intersect_weights(zs, params, patch)

Compute weights dVolCy / dA.

solve_defining(zs, params, dependent[, patch])

Solve defining equation given n-1 points.

Attributes

defining_poly

The defining homogeneous polynomial.

dim

Dimension of variety.

dim_complex

Dimension of ambient complex space.

dim_projective

Dimension of ambient projective space.

dim_variety

Dimension of variety.

num_defining

Number of coordinates fixed by defining equation.

par_count

Number of parameters in defining equation.

parameters

List the symbols which parametrize the defining equation.

best_dependent(zs, params, patch)#

Compute numerically optimal dependent coordinate.

It is determined as the index for which the gradient (of the defining equation) has the largest absolute value. This is numerically optimal, since we divide by this value later, and thus avoid large values.

compute_vol(key, params, batches=200, batch_size=2000, var=False)#

Compute CY (top-form) volume of manifold. If var is True, also return variance.

defining(zs, params=None, patch=None, **kwargs)#

Defining equation of the variety as embedded in ambient space.

This function works for numerical inputs. For symbolic inputs, see VarietySingle.defining_poly.

property defining_poly: HomPoly#

The defining homogeneous polynomial.

property dim: int#

Dimension of variety.

property dim_complex: int#

Dimension of ambient complex space.

property dim_projective: int#

Dimension of ambient projective space.

property dim_variety: int#

Dimension of variety.

classmethod from_sympy(_, var_name='z', poly_degree=5, params=None)#

Construct the variety object from the defining equation.

Parameters:
  • poly – Defining homogeneous polynomial.

  • var_name (str) – Name of the variable polynomial is defined in.

  • poly_degree (int) – Degree of the defining equation.

  • params (Optional[Sequence[Union[Symbol, str]]]) – List of parameters in the defining equation. These can be automatically collected as they appear in the expression for the polynomial.

Returns:

A new HomPoly object.

grad_defining(zs, params, patch=None)#

Holomorphic gradient of defining equation.

induced_fs(zs, params, patch, zs_c=None, dependent=None)#

Induced FS metric. :returns: The induced Fubini-Study metric (and dependent coordinate if None).

induced_metric(metric, zs, params, patch, zs_c=None, dependent=None)#

Induced metric given ambient CPn metric. :returns: Induced metric (and index of dependent coordinate if None).

jacobian_embed(zs, params, patch, dependent=None)#

Jacobian of embedding into ambient projective space.

If dependent is None, also return chosen dependent index.

property num_defining: int#

Number of coordinates fixed by defining equation.

property par_count: int#

Number of parameters in defining equation.

property parameters: Sequence[Symbol]#

List the symbols which parametrize the defining equation.

sample_intersect(key, params, count, affine=False, weights=False)#

Sample points on the variety using the intersection method.

Parameters:
  • key (Union[PRNGKeyArray, Array]) – Random key.

  • count (int) – Number of samples to generate.

  • params – Numeric parameter values of the defining equation.

  • affine – Whether to convert output to affine coordinates.

  • weights – Whether to compute the Monte Carlo weights for the generated samples.

Returns:

Either the homogeneous coordinates or a tuple of affine coordinates and patch indices.

sample_intersect_weights(zs, params, patch, dependent=None, vol=1, separate=False)#

Compute weights dVolCy / dA.

dA here is the measure with respect to the pullback of the ambient FS metric while dVolCy comes from the holomorphic volume form. :type zs: :param zs: Affine coordinates. :type patch: :param patch: Patch affine coordinates are defined in. :param variety: Variety on which points lie. :param par: Parameters (complex moduli) of variety. :type dependent: :param dependent: Which affine coordinate index to treat as dependent. :type separate: :param separate: If true return tuple (dVolCy, dA).

solve_defining(zs, params, dependent, patch=None)#

Solve defining equation given n-1 points.

Given n-1 coordinates, solve for the nth coordinate.

The parameters shuffle_key and patch_size should only be used when the variety is symmetric under coordinate permutations.

Parameters:
  • zs – Local coordinates in given patch where dependent is omitted.

  • patch – Affine patch within which local coordinates are given.

  • dependent – Dependent coordinate; range 0, …, dim_proj.

  • params – Parameters of variety.