gaia.core.fuzzy module
Module: fuzzy Implements fuzzy sets and fuzzy simplicial sets for the GAIA framework.
Following Spivak’s theory and Mahadevan (2024), this implements: 1. Fuzzy sets as sheaves on the unit interval I=[0,1] 2. Morphisms preserving membership strengths 3. Fuzzy simplicial sets as functors S: Δᵒᵖ → Fuz 4. Membership coherence constraints 5. Strength preservation by degeneracies
Key principles: 1. Fuzzy sets are sheaves with injective restriction maps 2. Membership functions η: X → [0,1] define classical fuzzy sets 3. Morphisms preserve membership: ξ(f(x)) ≥ η(x) 4. Fuzzy simplicial sets generalize weighted graphs to higher-order relations
- class gaia.core.fuzzy.FuzzySet(elements, membership_function, name='')[source]
Bases:
object
Fuzzy set as sheaf on unit interval I=[0,1].
Following Definition 2.1 from the theoretical framework: - Sheaf on I=[0,1] with injective restriction maps - Equivalent to classical fuzzy set (X,η) where η: X→[0,1] - Morphisms preserve membership strengths
- __init__(elements, membership_function, name='')
- class gaia.core.fuzzy.FuzzySetMorphism(source, target, mapping, name='')[source]
Bases:
object
Morphism between fuzzy sets preserving membership strengths.
For f: (X,η) → (Y,ξ), requires ξ(f(x)) ≥ η(x) for all x ∈ X.
- class gaia.core.fuzzy.FuzzyCategory(name='Fuz')[source]
Bases:
object
Category Fuz of fuzzy sets with membership-preserving morphisms.
Objects: Fuzzy sets Morphisms: Membership-preserving functions
- class gaia.core.fuzzy.FuzzySimplicialSet(name, dimension, fuzzy_sets=<factory>, face_maps=<factory>, degeneracy_maps=<factory>)[source]
Bases:
object
Fuzzy simplicial set as contravariant functor S: Δᵒᵖ → Fuz.
Following Section 2.3 of the theoretical framework: - Maps each [n] ∈ Δ to fuzzy set S_n - Face maps preserve membership coherence - Degeneracies preserve strength - Generalizes weighted graphs to higher-order relations
- add_face_map(source_level, target_level, face_index, mapping)[source]
Add face map δᵢ: S_{n-1} → S_n.
- add_degeneracy_map(source_level, target_level, deg_index, mapping)[source]
Add degeneracy map σᵢ: S_{n+1} → S_n.
- verify_membership_coherence()[source]
Verify membership coherence: strength of simplex ≤ min(strength of faces).
For each n-simplex σ, check that membership(σ) ≤ min(membership(∂ᵢσ))
- __init__(name, dimension, fuzzy_sets=<factory>, face_maps=<factory>, degeneracy_maps=<factory>)
- class gaia.core.fuzzy.FuzzySimplicialFunctor(name, fuzzy_category)[source]
Bases:
object
Contravariant functor S: Δᵒᵖ → Fuz mapping simplicial category to fuzzy sets.
This extends SimplicialFunctor to work with fuzzy sets instead of classical sets.
- gaia.core.fuzzy.create_discrete_fuzzy_set(elements_with_membership, name='')[source]
Create fuzzy set from discrete elements with membership values.
- gaia.core.fuzzy.create_gaussian_fuzzy_set(center, sigma, domain, name='')[source]
Create Gaussian fuzzy set over continuous domain.
- gaia.core.fuzzy.create_triangular_fuzzy_set(a, b, c, domain, name='')[source]
Create triangular fuzzy set with parameters (a, b, c).