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:
objectOrchestrator and result container for EKC construction.
Holds a
CYGraphof phases and contractions, a reference to the root CYToolsCalabiYau, 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_rootskips the expensivecompute_gvscall. Useful for caching GVs across multiple runs on the same geometry.
Notes
Construction follows a step-by-step API (arXiv:2303.00757):
ekc = CYBirationalClass(cy)– cheap: wraps CY, creates empty graphekc.setup_root(max_deg=10)– moderate: computes GVsekc.construct_phases(verbose=True)– expensive: BFSekc.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
arXiv2212.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
Noneto remove the ceiling (targeted bump drives the degree). Unresolved walls are labelledContractionType.UNRESOLVEDwhen 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),
Nonefor 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_phasesand returns the populatedCYBirationalClass. Does NOT runapply_coxeter_orbitautomatically (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_gvscall insetup_root. Useful for caching GVs across multiple runs.max_deg_ceiling (int or None, optional) – Maximum degree to recompute GVs to. Default 20. Pass
Noneto remove the ceiling. Walls requiring higher degree are labelledContractionType.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 callextended_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 hadapply_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
arXiv2212.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=Truewas 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=Truewas passed toconstruct_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
arXiv2212.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=Falseand nogvsprovided, performs only geometric checks (asymptotic, CFT, zero-volume divisor existence, Coxeter-reflection integrality) and returns aPartialClassification. 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=Falseandgvsis None.gvs (Invariants or list, optional) – Pre-computed GV invariants. Accepts either a CYTools
Invariantsobject or a plain list[GV(C), GV(2C), GV(3C), ...]. When provided, thecompute_gvsflag is ignored.ekc (CYBirationalClass, optional) – If provided and
ekc._toric_curve_datais available, addstoric_typeandtoric_gvkeys 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
gvsis None, skip the (potentially expensive) GV computation step and return aPartialClassificationinstead of the full classification dict. Ifgvsis provided, this flag is ignored and full classification proceeds.
- Returns:
dict or PartialClassification – When
compute_gvs=True(default) orgvsis provided, returns the full classification dict fromclassify_contraction:contraction_type,zero_vol_divisor,coxeter_reflection,gv_invariant,effective_gv,gv_eff_1,gv_series. Whenekcis provided and toric data matches, also includestoric_type(str: ‘flop’, ‘weyl_g0’, ‘weyl_higher_genus’, or ‘other’) andtoric_gv(int or None).When
compute_gvs=Falseand nogvsprovided, returns aPartialClassificationcapturing 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.