Skip to main content

Crate amari_enumerative

Crate amari_enumerative 

Source
Expand description

§Amari Enumerative Geometry

This crate provides enumerative geometry capabilities for the Amari mathematical library. It implements intersection theory, Schubert calculus, and tools for counting geometric configurations such as curves, surfaces, and higher-dimensional varieties.

§Features

  • Intersection Theory: Chow rings, intersection multiplicities, and Bezout’s theorem
  • Schubert Calculus: Computations on Grassmannians and flag varieties
  • Littlewood-Richardson Coefficients: Complete LR coefficient computation
  • Gromov-Witten Theory: Curve counting and quantum cohomology
  • Tropical Geometry: Tropical curve counting and correspondence theorems
  • Moduli Spaces: Computations on moduli spaces of curves and surfaces
  • Namespace/Capabilities: ShaperOS integration via geometric access control
  • Phantom Types: Compile-time verification of mathematical properties

§Usage

use amari_enumerative::{ProjectiveSpace, ChowClass, IntersectionRing};

// Create projective 2-space
let p2 = ProjectiveSpace::new(2);

// Define two curves
let cubic = ChowClass::hypersurface(3);
let quartic = ChowClass::hypersurface(4);

// Compute intersection number (Bezout's theorem)
let intersection = p2.intersect(&cubic, &quartic);
assert_eq!(intersection.multiplicity(), 12); // 3 * 4 = 12

§Schubert Calculus Example

use amari_enumerative::{SchubertCalculus, SchubertClass, IntersectionResult};

// How many lines meet 4 general lines in projective 3-space?
let mut calc = SchubertCalculus::new((2, 4)); // Gr(2,4)
let sigma_1 = SchubertClass::new(vec![1], (2, 4)).unwrap();

let classes = vec![sigma_1.clone(), sigma_1.clone(), sigma_1.clone(), sigma_1.clone()];
let result = calc.multi_intersect(&classes);

assert_eq!(result, IntersectionResult::Finite(2)); // Answer: 2 lines!

§Phantom Types for Compile-Time Verification

The crate provides zero-cost phantom types for compile-time verification:

  • ValidPartition / UnvalidatedPartition: Partition validity states
  • Semistandard / LatticeWord: Tableau property markers
  • Granted / Pending / Revoked: Capability grant states
  • Transverse / Excess / Deficient: Intersection dimension states
  • FitsInBox / UnverifiedBox: Grassmannian containment states

Re-exports§

pub use geometric_algebra::quantum_k_theory;
pub use geometric_algebra::signatures;
pub use geometric_algebra::GeometricProjectiveSpace;
pub use geometric_algebra::GeometricSchubertClass;
pub use geometric_algebra::GeometricVariety;
pub use gromov_witten::CurveClass as GWCurveClass;
pub use gromov_witten::GromovWittenInvariant;
pub use gromov_witten::QuantumCohomology;
pub use higher_genus::AdvancedCurveCounting;
pub use higher_genus::DTInvariant;
pub use higher_genus::HigherGenusCurve;
pub use higher_genus::JacobianData;
pub use higher_genus::PTInvariant;
pub use intersection::AlgebraicVariety;
pub use intersection::ChowClass;
pub use intersection::Constraint;
pub use intersection::Grassmannian;
pub use intersection::IntersectionNumber;
pub use intersection::IntersectionPoint;
pub use intersection::IntersectionRing;
pub use intersection::MockMultivector;
pub use intersection::ProjectiveSpace;
pub use intersection::QuantumProduct;
pub use moduli_space::CurveClass;
pub use moduli_space::ModuliSpace;
pub use moduli_space::TautologicalClass;
pub use performance::CurveBatchProcessor;
pub use performance::FastIntersectionComputer;
pub use performance::MemoryPool;
pub use performance::SparseSchubertMatrix;
pub use performance::WasmPerformanceConfig;
pub use schubert::FlagVariety;
pub use schubert::IntersectionResult;
pub use schubert::SchubertCalculus;
pub use schubert::SchubertClass;
pub use littlewood_richardson::lr_coefficient;
pub use littlewood_richardson::schubert_product;
pub use littlewood_richardson::Partition;
pub use littlewood_richardson::SkewShape;
pub use littlewood_richardson::SkewTableau;
pub use namespace::capability_accessible;
pub use namespace::namespace_intersection;
pub use namespace::Capability;
pub use namespace::CapabilityId;
pub use namespace::Namespace;
pub use namespace::NamespaceBuilder;
pub use namespace::NamespaceError;
pub use namespace::NamespaceIntersection;
pub use namespace::QuantumCapability;
pub use tropical_curves::verify_mikhalkin_gw;
pub use tropical_curves::MikhalkinResult;
pub use tropical_curves::TropicalCurve;
pub use tropical_curves::TropicalEdge;
pub use tropical_curves::TropicalIntersection;
pub use tropical_curves::TropicalModuliSpace;
pub use tropical_curves::TropicalPoint;
pub use phantom::BoxContainment;
pub use phantom::Deficient;
pub use phantom::Excess;
pub use phantom::FitsInBox;
pub use phantom::GrantState;
pub use phantom::Granted;
pub use phantom::IntersectionDimension;
pub use phantom::LatticeWord;
pub use phantom::PartitionValidity;
pub use phantom::Pending;
pub use phantom::Properties;
pub use phantom::Revoked;
pub use phantom::Semistandard;
pub use phantom::TableauValidity;
pub use phantom::Transverse;
pub use phantom::UnknownDimension;
pub use phantom::UnvalidatedPartition;
pub use phantom::UnverifiedBox;
pub use phantom::UnverifiedTableau;
pub use phantom::ValidLRTableau;
pub use phantom::ValidPartition;
pub use phantom::ValidSchubertClass;
pub use wdvv::WDVVEngine;
pub use localization::EquivariantLocalizer;
pub use localization::FixedPoint;
pub use localization::TorusWeights;
pub use matroid::Matroid;
pub use matroid::ValuatedMatroid;
pub use csm::CSMClass;
pub use csm::SegreClass;
pub use operad::compose_namespaces;
pub use operad::composition_multiplicity;
pub use operad::interfaces_compatible;
pub use operad::ComposableNamespace;
pub use operad::Interface;
pub use operad::InterfaceDirection;
pub use stability::StabilityCondition;
pub use stability::Wall;
pub use stability::WallCrossingEngine;

Modules§

csm
Chern-Schwartz-MacPherson (CSM) Classes
geometric_algebra
Integration between geometric algebra and enumerative geometry
gromov_witten
Gromov-Witten invariants and quantum cohomology
higher_genus
Higher genus computations and advanced enumerative geometry
intersection
Intersection theory and Chow rings
littlewood_richardson
Littlewood-Richardson coefficient computation
localization
Equivariant Localization via the Atiyah-Bott Fixed Point Formula
matroid
Matroid Theory for Enumerative Geometry
moduli_space
Moduli spaces of curves and algebraic varieties
namespace
Namespace and Capability types for ShaperOS
operad
Operadic Composition for ShaperOS Namespace Stacking
performance
Performance optimization module for WASM-first enumerative geometry
phantom
Phantom types for compile-time verification of enumerative geometry properties.
schubert
Schubert calculus on Grassmannians and flag varieties
stability
Wall-Crossing and Bridgeland Stability
tropical_curves
Tropical curve counting and enumerative geometry
verified_contracts
Formal verification contracts for enumerative geometry
wdvv
WDVV Recursion for Genus-0 Gromov-Witten Invariants

Enums§

EnumerativeError
Error types for enumerative geometry computations

Type Aliases§

EnumerativeResult
Result type for enumerative geometry computations