gaia.core.simplices module
Module: simplices Defines simplicial objects for the GAIA framework.
Following Mahadevan (2024), this implements simplicial objects as functorial mappings from the simplex category Δ to neural network parameters.
Key principles: 1. Pure categorical structure - no local identity checking 2. Simplicial objects are immutable after creation 3. Face and degeneracy operations are purely structural 4. Composition is handled dynamically for coherence
- class gaia.core.simplices.SimplicialObject(level, name, payload=None)[source]
Bases:
object
Base class for all simplicial objects in the GAIA framework.
- __init__(level, name, payload=None)
- class gaia.core.simplices.BasisRegistry[source]
Bases:
object
Registry for managing basis transformations between parameter spaces.
Following Mahadevan (2024), this implements the basis equivalence relation that defines the Param category. Two parameter spaces are equivalent if there exists a differentiable isomorphism between them.
The registry maintains: 1. Canonical basis representatives for each dimension 2. Isomorphisms between equivalent bases 3. Efficient lookup for basis equivalence queries
- canonical_id(dim)[source]
Get the canonical basis ID for a given dimension.
This implements the canonical choice function that selects a representative from each equivalence class of parameter spaces.
- register_isomorphism(basis_a, basis_b, iso)[source]
Register an isomorphism between two bases.
This extends the equivalence relation by adding a new isomorphism. The registry automatically computes the inverse and maintains transitivity through composition.
- get_isomorphism(basis_a, basis_b)[source]
Get the isomorphism from basis_a to basis_b, if it exists.
- get_canonical_id(dim)
Get the canonical basis ID for a given dimension.
This implements the canonical choice function that selects a representative from each equivalence class of parameter spaces.
- class gaia.core.simplices.Simplex0(dim, name, registry, payload=None, same_basis=False, basis_id=None)[source]
Bases:
SimplicialObject
0-simplex representing an object in the Param category.
Following Mahadevan (2024), objects are equivalence classes of parameter spaces <d> modulo differentiable isomorphism.
- dim
- basis_id
- class gaia.core.simplices.SimplexN(level, name, components, payload=None)[source]
Bases:
SimplicialObject
n-simplex for n ≥ 1, representing higher-dimensional simplicial structure.
This is a pure categorical implementation with no local identity checking. All simplicial identities are verified globally at the functor level.
- face(i)[source]
Compute the i-th face by removing the i-th component.
This is a pure categorical operation - no identity verification. The functor is responsible for maintaining simplicial identities.
- degeneracy(j)[source]
Compute the j-th degeneracy by duplicating the j-th component.
Pure categorical operation with no identity checking.
- components
- class gaia.core.simplices.Simplex1(morphism, domain, codomain, name, payload=None)[source]
Bases:
SimplexN
1-simplex representing a morphism in the Param category.
Following Mahadevan (2024), morphisms are equivalence classes of differentiable maps modulo parameter re-parameterization.
- __call__(x)[source]
Apply the morphism to input tensor x.
If this is a composition morphism (with payload function), always use the payload to ensure dynamic composition is maintained.
- morphism
- __eq__(other)
Equality based on level, components, and name.
- __hash__()
Hash based on level, components, and name.
- components
- degeneracy(j)
Compute the j-th degeneracy by duplicating the j-th component.
Pure categorical operation with no identity checking.
- face(i)
Compute the i-th face by removing the i-th component.
This is a pure categorical operation - no identity verification. The functor is responsible for maintaining simplicial identities.
- class gaia.core.simplices.Simplex2(f, g, name, payload=None)[source]
Bases:
SimplexN
2-simplex representing a commutative triangle in the Param category.
Following Mahadevan (2024), this implements the inner horn Λ²₁ with endofunctorial solver where h = g ∘ f is computed dynamically to maintain coherence during training.
- is_inner_horn(missing_face)[source]
Check if this is an inner horn with the specified missing face.
- is_outer_horn(missing_face)[source]
Check if this is an outer horn with the specified missing face.
- components
- __eq__(other)
Equality based on level, components, and name.
- __hash__()
Hash based on level, components, and name.
- degeneracy(j)
Compute the j-th degeneracy by duplicating the j-th component.
Pure categorical operation with no identity checking.
- face(i)
Compute the i-th face by removing the i-th component.
This is a pure categorical operation - no identity verification. The functor is responsible for maintaining simplicial identities.