meta-log-db
Version:
Native database package for Meta-Log (ProLog, DataLog, R5RS)
41 lines • 957 B
TypeScript
/**
* Chain Complex and Homology Types
*
* Types for algebraic topology chain complexes and homology validation
*/
/**
* Cell in a chain complex
* @template N - Dimension (0, 1, 2, 3, or 4)
*/
export interface Cell<N extends 0 | 1 | 2 | 3 | 4> {
id: string;
dim: N;
boundary: string[];
data: any;
}
/**
* Chain Complex structure
*
* A chain complex is a sequence of abelian groups (C₀, C₁, C₂, C₃, C₄)
* connected by boundary operators (∂₁, ∂₂, ∂₃, ∂₄)
*
* Property: ∂_{n-1} ∘ ∂_n = 0 (boundary of boundary is zero)
*/
export interface ChainComplex {
C0: Cell<0>[];
C1: Cell<1>[];
C2: Cell<2>[];
C3: Cell<3>[];
C4: Cell<4>[];
boundary: Map<string, string[]>;
}
/**
* Homology validation result
*/
export interface HomologyResult {
valid: boolean;
betti: number[];
eulerCharacteristic: number;
violations?: string[];
}
//# sourceMappingURL=types.d.ts.map