gaia.core.abstractions module
GAIA Framework Core Abstractions
This module provides the unified base abstractions for the entire GAIA framework, implementing the category-theoretic foundations From (MAHADEVAN,2024) and report.tex.
Key Design Principles: 1. Unified interfaces for all categorical structures 2. Composition over inheritance where possible 3. Type safety with generic protocols 4. Integration points for all subsystems
- class gaia.core.abstractions.CategoryObject(id, name, dimension)[source]
Bases:
object
Base class for all objects in GAIA categories.
- __init__(id, name, dimension)
- class gaia.core.abstractions.Morphism(*args, **kwargs)[source]
Bases:
Protocol
[X
,Y
]Protocol for morphisms between category objects.
- property domain: X
Source object of the morphism.
- property codomain: Y
Target object of the morphism.
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- class gaia.core.abstractions.Functor(*args, **kwargs)[source]
Bases:
Protocol
[X
,Y
]Protocol for functors between categories.
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- class gaia.core.abstractions.Endofunctor(*args, **kwargs)[source]
Bases:
Functor
[X
,X
],Protocol
Protocol for endofunctors F: C → C.
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- map_morphism(morphism)
Map a morphism from source to target category.
- map_object(obj)
Map an object from source to target category.
- class gaia.core.abstractions.StructureMap(*args, **kwargs)[source]
Bases:
Protocol
[X
]Protocol for coalgebra structure maps γ: X → F(X).
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- class gaia.core.abstractions.Coalgebra(carrier, structure_map)[source]
-
Abstract base class for F-coalgebras (X, γ).
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- class gaia.core.abstractions.FuzzyMembership(*args, **kwargs)[source]
Bases:
Protocol
Protocol for fuzzy membership functions η: X → [0,1].
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- class gaia.core.abstractions.SimplicialStructure(*args, **kwargs)[source]
Bases:
Protocol
Protocol for simplicial structures with face and degeneracy maps.
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- class gaia.core.abstractions.HornFiller(*args, **kwargs)[source]
Bases:
Protocol
Protocol for horn filling algorithms.
- can_fill(horn_type, dimension, missing_face)[source]
Check if this filler can handle the given horn.
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- class gaia.core.abstractions.MessagePasser(*args, **kwargs)[source]
Bases:
Protocol
Protocol for hierarchical message passing.
- process_message(message, source_level, target_level)[source]
Process message between hierarchy levels.
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- __init__(*args, **kwargs)
- class gaia.core.abstractions.TrainingState(epoch, step, loss, parameters, gradients, metadata)[source]
Bases:
object
Unified training state for GAIA framework.
- parameters: Tensor' id='4349657872'>]
- gradients: Tensor' id='4349657872'>]
- __init__(epoch, step, loss, parameters, gradients, metadata)
- class gaia.core.abstractions.GAIAComponent(name, config=None)[source]
Bases:
ABC
Abstract base class for all GAIA framework components.
- class gaia.core.abstractions.IntegratedTrainer(components)[source]
Bases:
ABC
Abstract base class for integrated GAIA trainers.
- gaia.core.abstractions.compose_morphisms(*morphisms)[source]
Compose multiple morphisms: f₁ ∘ f₂ ∘ … ∘ fₙ.
- gaia.core.abstractions.create_identity_morphism(obj)[source]
Create identity morphism for an object.
- gaia.core.abstractions.verify_functor_laws(functor, test_objects, test_morphisms)[source]
Verify functor preserves identity and composition.