ekc — Birational class orchestrator and result API#

CYBirationalClass orchestrator for extended Kahler cone construction.

The main result container and query API for GV-based EKC computation. Construction is performed by builder modules (build_gv, weyl); this class owns the result data and provides read-only access.

See arXiv:2212.10573 and arXiv:2303.00757 for the underlying theory.

class CYBirationalClass(cy, gvs=None)#

Bases: object

Orchestrator and result container for EKC construction.

Holds a CYGraph of phases and contractions, a reference to the root CYTools CalabiYau, cone generators accumulated during BFS, and Weyl expansion data.

Parameters:
  • cy (cytools.calabiyau.CalabiYau) – The root Calabi-Yau threefold.

  • gvs (cytools.calabiyau.Invariants, optional) – Pre-computed GV invariants. If provided, setup_root skips the expensive compute_gvs call. Useful for caching GVs across multiple runs on the same geometry.

Notes

Construction follows a step-by-step API (arXiv:2303.00757):

  1. ekc = CYBirationalClass(cy) – cheap: wraps CY, creates empty graph

  2. ekc.setup_root(max_deg=10) – moderate: computes GVs

  3. ekc.construct_phases(verbose=True) – expensive: BFS

  4. ekc.apply_coxeter_orbit() – optional: Coxeter orbit expansion

Or use the convenience classmethod CYBirationalClass.from_gv(cy).

Examples

>>> ekc = CYBirationalClass.from_gv(cy, max_deg=10)
>>> ekc.phases
[CalabiYauLite(label='CY_0'), ...]
>>> ekc.coxeter_matrix
array([[...]])
apply_coxeter_orbit(reflections='ekc', phases=True)#

Expand to the extended/hyperextended cone via Coxeter group orbit.

Parameters:
  • reflections (str or iterable, optional) –

    Which reflections to use for orbit expansion:

    • 'ekc' (default): symmetric flop reflections only (produces EKC)

    • 'hekc': sym flop + SU2_NONGENERIC_CS (produces HEKC)

    • 'all': all Coxeter reflections (full group)

    • Custom iterable of reflection matrices

  • phases (bool, optional) – If True (default), create full reflected phase objects. If False, only accumulate cone generators.

See also

arXiv

2212.10573 Section 4.3

property build_log#

BFS construction log entries.

Returns:

list of dict

construct_phases(verbose=True, limit=100, max_deg_ceiling=20, deg_step=2, validate_stability=False, check_toric=False)#

Run BFS construction of the extended Kahler cone.

Iterates over undiagnosed Mori cone walls, classifies each, flops when appropriate, and deduplicates phases by curve-sign dictionaries. Adaptively recomputes GVs to higher degree when walls cannot be classified at the current degree.

Parameters:
  • verbose (bool, optional) – Enable info-level logging. Default True.

  • limit (int, optional) – Maximum number of phases. Default 100.

  • max_deg_ceiling (int or None, optional) – Maximum degree to recompute GVs to. Default 20. Pass None to remove the ceiling (targeted bump drives the degree). Unresolved walls are labelled ContractionType.UNRESOLVED when a ceiling is active.

  • deg_step (int, optional) – Degree increment per retry round (fallback only). Default 2.

  • validate_stability (bool, optional) – If True, after BFS completes, bump degree and re-run to verify results are unchanged. Default False.

  • check_toric (bool, optional) – If True, detect FRST phases and compile toric curves incrementally. Enables phase classification and Mori cone bounds. Default False.

property contractions#

All ExtremalContraction objects.

Returns:

list of ExtremalContraction

property coxeter_group#

CoxeterGroup dataclass with factors, order, rank, repr.

Set by apply_coxeter_orbit(). Returns None if orbit expansion has not been run.

Returns:

CoxeterGroup or None

property coxeter_matrix#

Coxeter matrix from accumulated reflections, or None.

Returns:

numpy.ndarray or None

property coxeter_order#

Order \(|W|\) of the Coxeter group.

Lazily computed on first access. Returns 1 for the trivial group (no reflections), None for infinite groups.

Returns:

int or None

property coxeter_refs#

Set of Coxeter reflection matrices (as tuples of tuples).

Returns:

frozenset

property coxeter_type#

Coxeter group type classification.

Lazily computed on first access from the accumulated reflections. Returns a list of (type_string, rank, order) tuples for each irreducible component. Empty list for the trivial group.

Returns:

list of tuple

property cy#

The root CYTools CalabiYau object.

property eff_cone_gens#

Set of effective cone generators (divisor tuples).

Returns:

frozenset

effective_cone()#

Effective cone of curves from accumulated generators.

Constructed from zero-volume divisors and Kahler cone rays accumulated during BFS and orbit expansion.

Returns:

cytools.Cone or None – The effective cone, or None if no generators.

Notes

See arXiv:2212.10573 Section 2.

extended_kahler_cone()#

Extended Kahler cone (EKC): convex hull of all EKC phase Kahler cone rays.

The EKC is the union of Kahler cones across all phases after symmetric-flop-only orbit expansion. Since the union is not generally convex, this returns the convex hull (outer approximation) as a single Cone.

To get the individual phase cones, iterate self.phases.

Returns:

cytools.Cone or None – Convex hull of all phase Kahler rays, or None.

Notes

See arXiv:2212.10573 Section 4.3. The convex hull is a containing cone; for non-convex EKCs the exact boundary requires the full phase decomposition.

classmethod from_gv(cy, max_deg=4, verbose=True, limit=100, gvs=None, max_deg_ceiling=20, deg_step=2, validate_stability=False, check_toric=False)#

Construct EKC from GV invariants (convenience classmethod).

Runs setup_root -> construct_phases and returns the populated CYBirationalClass. Does NOT run apply_coxeter_orbit automatically (call it separately if needed).

Parameters:
  • cy (cytools.calabiyau.CalabiYau) – The root Calabi-Yau.

  • max_deg (int, optional) – Initial maximum degree for GV computation. Default 4. The BFS adaptively recomputes to higher degrees if needed.

  • verbose (bool, optional) – Enable info-level logging. Default True.

  • limit (int, optional) – Maximum number of phases. Default 100.

  • gvs (cytools.calabiyau.Invariants, optional) – Pre-computed GV invariants. If provided, skips the expensive compute_gvs call in setup_root. Useful for caching GVs across multiple runs.

  • max_deg_ceiling (int or None, optional) – Maximum degree to recompute GVs to. Default 20. Pass None to remove the ceiling. Walls requiring higher degree are labelled ContractionType.UNRESOLVED.

  • deg_step (int, optional) – Degree increment per retry round (fallback only). Default 2.

  • validate_stability (bool, optional) – If True, after BFS completes, bump degree and re-run to verify results are unchanged. Default False.

  • check_toric (bool, optional) – If True, detect FRST phases and compile toric curves incrementally. Default False.

Returns:

CYBirationalClass – Populated result object.

frst_phases()#

Labels of all FRST phases.

Returns:

list of str

property graph#

The phase adjacency graph (CYGraph).

hyperextended_kahler_cone()#

Hyperextended Kahler cone (HEKC): EKC + SU2_NONGENERIC_CS orbits.

The HEKC extends the EKC by also including the orbit under SU2_NONGENERIC_CS reflections. At generic complex structure, HEKC = EKC. At tuned complex structure, HEKC is strictly larger.

Returns the convex hull as a single Cone. For the exact HEKC, run apply_coxeter_orbit(reflections='hekc') first, then call extended_kahler_cone() on the result.

Returns:

cytools.Cone or None

Notes

See arXiv:2212.10573 Section 4.3. This method is equivalent to extended_kahler_cone() when called on a CYBirationalClass that has had apply_coxeter_orbit(reflections='hekc') called. The method exists for API clarity – call it on an HEKC-expanded object to signal intent.

infinity_cone()#

Infinity cone from asymptotic and CFT wall curves.

Returns:

cytools.Cone or None – The infinity cone, or None if no generators.

Notes

See arXiv:2212.10573 Section 2.

property infinity_cone_gens#

Set of infinity cone generators (curve tuples).

Returns:

frozenset

invariants_for(phase_label)#

Reconstruct GV invariants for a phase on demand.

Picks a tip point in the phase’s Kahler cone and re-orients flop curves that pair negatively with that point, starting from the root invariants.

Parameters:

phase_label (str) – Label of the phase.

Returns:

Invariants – CYTools Invariants with flop curves reoriented for this phase.

See also

arXiv

2212.10573 Section 4.3

property is_constructed#

Whether BFS construction has been run.

Returns:

bool

property is_weyl_expanded#

Whether Weyl expansion has been run.

Returns:

bool

mori_cone_exact(phase_label)#

Exact Mori cone if inner == outer bounds match.

Returns:

cytools.Cone or None

mori_cone_inner(phase_label)#

Inner Mori cone bound from toric curves.

Available only when check_toric=True was used and toric curves have been computed for this phase.

Parameters:

phase_label (str)

Returns:

cytools.Cone or None

mori_cone_outer(phase_label)#

Outer Mori cone bound from CYTools mori_cone_cap.

Available only for FRST phases.

Parameters:

phase_label (str)

Returns:

cytools.Cone or None

movable_cone()#

Movable cone: dual of the effective cone.

The movable cone is the cone of divisor classes that are basepoint-free after a birational modification. It equals the dual of the effective cone of curves.

Returns:

cytools.Cone or None – The movable cone, or None if no effective cone generators.

Notes

See arXiv:2212.10573 Section 2.

non_inherited_phases()#

Labels of all non-inherited phases.

Returns:

list of str

phase_type(phase_label)#

Classification of a phase as FRST, vex, or non-inherited.

Only available when check_toric=True was passed to construct_phases.

Parameters:

phase_label (str) – Label of the phase.

Returns:

str or None – One of 'frst', 'vex', 'non_inherited', or None if toric checking was not enabled.

property phases#

All CalabiYauLite phase objects.

Returns:

list of CalabiYauLite

property root_invariants#

The CYTools Invariants object from the root phase.

property root_label#

Label of the root phase.

property root_phase#

The root CalabiYauLite phase.

Returns:

CalabiYauLite or None

setup_root(max_deg=4)#

Set up the root phase from the CYTools CalabiYau.

Computes GV invariants and creates the first CalabiYauLite phase in the graph.

Parameters:

max_deg (int, optional) – Initial maximum degree for GV computation. Default 4. The BFS will adaptively recompute to higher degrees if needed.

property sym_flop_refs#

Set of symmetric-flop reflection matrices.

Returns:

frozenset

to_fundamental_domain(point)#

Map a point to the fundamental domain via chamber walk.

Reflects the point through symmetric-flop walls that pair negatively until it lies in the fundamental domain.

Parameters:

point (array_like) – Point in Mori space.

Returns:

(numpy.ndarray, numpy.ndarray)(fundamental_domain_point, group_element) where the group element maps the fundamental domain to the input chamber.

See also

arXiv

2212.10573 Section 4.3

toric_curves(phase_label=None)#

Access toric curve data, optionally re-oriented for a phase.

Parameters:

phase_label (str, optional) – If provided, re-orient curves for this phase’s Kahler cone. If None, return curves in canonical orientation.

Returns:

ToricCurveData or None

vex_phases()#

Labels of all vex phases.

Returns:

list of str

diagnose_curve(cy, curve, max_deg=10, gvs=None, ekc=None, *, compute_gvs=True)#

Classify an extremal contraction curve with minimal setup.

Convenience function that handles grading vector computation and GV series extraction internally. When an ekc (CYBirationalClass) with toric data is provided, also cross-checks against toric classification and combinatorial GV invariants (per D-12).

With compute_gvs=False and no gvs provided, performs only geometric checks (asymptotic, CFT, zero-volume divisor existence, Coxeter-reflection integrality) and returns a PartialClassification. Use this when the GV computation is too expensive and you want to know whether geometry alone suffices, or which contraction types are still possible.

Parameters:
  • cy (cytools.CalabiYau) – The Calabi-Yau threefold.

  • curve (array_like) – Curve class in the h11 basis.

  • max_deg (int, optional) – Maximum degree for GV computation. Default 10. Ignored when compute_gvs=False and gvs is None.

  • gvs (Invariants or list, optional) – Pre-computed GV invariants. Accepts either a CYTools Invariants object or a plain list [GV(C), GV(2C), GV(3C), ...]. When provided, the compute_gvs flag is ignored.

  • ekc (CYBirationalClass, optional) – If provided and ekc._toric_curve_data is available, adds toric_type and toric_gv keys to the result dict when the curve matches a toric curve. Has no effect on the lazy / geometric path.

  • compute_gvs (bool, default True) – If False AND gvs is None, skip the (potentially expensive) GV computation step and return a PartialClassification instead of the full classification dict. If gvs is provided, this flag is ignored and full classification proceeds.

Returns:

dict or PartialClassification – When compute_gvs=True (default) or gvs is provided, returns the full classification dict from classify_contraction: contraction_type, zero_vol_divisor, coxeter_reflection, gv_invariant, effective_gv, gv_eff_1, gv_series. When ekc is provided and toric data matches, also includes toric_type (str: ‘flop’, ‘weyl_g0’, ‘weyl_higher_genus’, or ‘other’) and toric_gv (int or None).

When compute_gvs=False and no gvs provided, returns a PartialClassification capturing the geometric narrowing.

Examples

>>> from cybir import diagnose_curve
>>> result = diagnose_curve(cy, [1, 0, -1])
>>> result['contraction_type']
ContractionType.FLOP

Skip GV computation, get partial result:

>>> partial = diagnose_curve(cy, [1, 0, -1], compute_gvs=False)
>>> if partial.determined is not None:
...     print(f"Determined: {partial.determined.name}")
... else:
...     print(f"GVs needed; possibilities: {partial.remaining_options}")

Notes

See arXiv:2212.10573 Section 4 for the classification algorithm.