build_gv — BFS pipeline builder for EKC construction#
BFS pipeline builder for extended Kahler cone construction.
Implements setup_root and construct_phases – the core EKC
construction algorithm. The BFS loop iterates over Mori cone walls,
classifies contractions, flops to create new phases, and deduplicates
via curve-sign dictionaries.
This is a faithful translation of the original
extended_kahler_cone.py lines 807-1073 into clean modular code
operating on the Phase 1-2 types.
See arXiv:2212.10573 Section 4 and arXiv:2303.00757 Section 2.
- check_nongeneric_cs(cy, result)#
Re-tag symmetric flops whose zero-vol divisor is a prime toric divisor.
At non-generic complex structure, some walls classified as symmetric flops are actually su(2) enhancements. Detection: if the zero-vol divisor matches (up to sign and proportionality) any row of the GLSM charge matrix, re-tag as SU2_NONGENERIC_CS.
See D-16 through D-19 in 05-CONTEXT.md.
- Parameters:
cy (cytools.CalabiYau) – The Calabi-Yau threefold (provides GLSM charge matrix).
result (dict) – Classification result from
classify_contraction.
- Returns:
dict – The result dict, possibly with contraction_type changed.
- construct_phases(ekc, 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.
Uses adaptive GV degree: starts with the initial degree from
setup_root, runs a full BFS, and if any walls could not be classified (empty series or insufficient GVs), bumps the degree and restarts the entire BFS from scratch with the new GVs.The degree bump is targeted: for each deferred wall, the exact degree needed to resolve the next lattice point along that curve’s ray is computed. The bump goes to the maximum of these.
Potent curves are detected by tracking series length across retries. If a wall’s GV series has >= 4 populated multiples (C, 2C, 3C, 4C) and still doesn’t terminate, it is flagged as potent and not retried.
- Parameters:
ekc (CYBirationalClass) – The orchestrator (must have root set up via
setup_root).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 entirely (the targeted bump drives the degree). When a ceiling is active, 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 the main BFS completes, bump degree by
deg_stepand re-run the full BFS to verify that results are unchanged. If results differ, keep the higher-degree result and log a warning. Default False.check_toric (bool, optional) – If True, detect FRST phases during BFS and compile toric curves incrementally. Enables phase classification (FRST/vex/non-inherited) and Mori cone bounds. Default False.
- setup_root(ekc, max_deg=4)#
Set up the root phase from the CYTools CalabiYau.
Computes GV invariants, creates the first
CalabiYauLitephase, and adds it to the graph.- Parameters:
ekc (CYBirationalClass) – The orchestrator to populate.
max_deg (int, optional) – Initial maximum degree for GV computation. Default 4. The BFS will adaptively recompute to higher degrees if needed for wall classification.