use crate::Primitives;
pub trait CochainGroup<P: Primitives> {
fn cochain_degree(&self) -> P::Integer;
fn cochain_rank(&self) -> P::NonNegativeInteger;
type ChainGroup: crate::bridge::homology::ChainGroup<P>;
fn dual_of(&self) -> &Self::ChainGroup;
}
pub trait CoboundaryOperator<P: Primitives> {
type CochainGroup: CochainGroup<P>;
fn coboundary_source(&self) -> &Self::CochainGroup;
fn coboundary_target(&self) -> &Self::CochainGroup;
fn satisfies_coboundary_squared_zero(&self) -> P::Boolean;
}
pub trait CochainComplex<P: Primitives> {
type CochainGroup: CochainGroup<P>;
fn has_cochain_group(&self) -> &[Self::CochainGroup];
type CoboundaryOperator: CoboundaryOperator<P>;
fn has_coboundary(&self) -> &[Self::CoboundaryOperator];
}
pub trait CohomologyGroup<P: Primitives> {
fn cohomology_degree(&self) -> P::Integer;
fn cohomology_rank(&self) -> P::NonNegativeInteger;
}
pub trait Sheaf<P: Primitives> {
type SimplicialComplex: crate::bridge::homology::SimplicialComplex<P>;
fn sheaf_over(&self) -> &Self::SimplicialComplex;
type Ring: crate::kernel::schema::Ring<P>;
fn coefficient_in(&self) -> &Self::Ring;
type Stalk: Stalk<P>;
fn has_stalks(&self) -> &[Self::Stalk];
type Section: Section<P>;
fn has_global_section(&self) -> &[Self::Section];
}
pub trait Stalk<P: Primitives> {
type Simplex: crate::bridge::homology::Simplex<P>;
fn stalk_at(&self) -> &Self::Simplex;
}
pub trait Section<P: Primitives> {}
pub trait LocalSection<P: Primitives>: Section<P> {}
pub trait RestrictionMap<P: Primitives> {
type Simplex: crate::bridge::homology::Simplex<P>;
fn restricts_from(&self) -> &Self::Simplex;
fn restricts_to(&self) -> &Self::Simplex;
}
pub trait GluingObstruction<P: Primitives> {
type CohomologyGroup: CohomologyGroup<P>;
fn obstruction_class(&self) -> &Self::CohomologyGroup;
type RefinementSuggestion: crate::bridge::resolver::RefinementSuggestion<P>;
fn addresses_suggestion(&self) -> &[Self::RefinementSuggestion];
}
pub mod coboundary_squared_zero {
pub const FOR_ALL: &str = "f ∈ C^k";
pub const LHS: &str = "δ^{k+1}(δ^k(f))";
pub const RHS: &str = "0";
pub const VERIFICATION_DOMAIN: &str = "https://uor.foundation/op/Topological";
pub const VERIFICATION_PATH_NOTE: &str = "CochainComplex → CoboundaryOperator → δ² = 0";
}
pub mod de_rham_duality {
pub const FOR_ALL: &str = "simplicial complex K, ring R";
pub const LHS: &str = "H^k(K; R)";
pub const RHS: &str = "Hom(H_k(K), R)";
pub const VERIFICATION_DOMAIN: &str = "https://uor.foundation/op/Topological";
pub const VERIFICATION_PATH_NOTE: &str = "CohomologyGroup ≅ dual(HomologyGroup)";
}
pub mod sheaf_cohomology_bridge {
pub const FOR_ALL: &str = "constant sheaf F_R over K";
pub const LHS: &str = "H^k(K; F_R)";
pub const RHS: &str = "H^k(K; R)";
pub const VERIFICATION_DOMAIN: &str = "https://uor.foundation/op/Topological";
pub const VERIFICATION_PATH_NOTE: &str = "Sheaf → constant coefficient → CochainComplex";
}
pub mod local_global_principle {
pub const FOR_ALL: &str = "sheaf F over K";
pub const LHS: &str = "H^1(K; F) = 0";
pub const RHS: &str = "all local sections glue";
pub const VERIFICATION_DOMAIN: &str = "https://uor.foundation/op/Topological";
pub const VERIFICATION_PATH_NOTE: &str = "CohomologyGroup → GluingObstruction → vanishing";
}