UNPKG

@uor-foundation/operators

Version:

Layer 3: Arithmetic operators - operations as chemical reactions between numbers

101 lines 2.79 kB
import { type FieldSubstrate } from '@uor-foundation/field-substrate'; import type { ResonanceDynamics } from '@uor-foundation/resonance'; import { type DenormalizationArtifact } from './carry'; /** * Tracks and analyzes denormalization artifacts during arithmetic operations * These artifacts are the universe's way of creating/destroying information */ export declare class DenormalizationEngine { private substrate; private resonance; private carryOperator; constructor(substrate: FieldSubstrate, resonance: ResonanceDynamics); /** * Track artifacts during multiplication */ trackMultiplication(a: bigint, b: bigint): MultiplicationArtifacts; /** * Predict artifacts for a multiplication without performing it */ predictArtifacts(a: bigint, b: bigint): PredictedArtifacts; /** * Find multiplication pairs that produce specific artifacts */ findArtifactProducers(targetField: number, artifactType: 'vanishing' | 'emergent', searchRange: { min: bigint; max: bigint; }): ArtifactProducer[]; /** * Analyze artifact patterns in a number sequence */ analyzeSequence(numbers: bigint[]): SequenceArtifactAnalysis; /** * Count unique active fields across patterns */ private countUniqueActiveFields; } /** * Result of tracking multiplication artifacts */ export interface MultiplicationArtifacts { operands: { a: number; b: number; }; product: number; artifacts: DenormalizationArtifact[]; fieldEvolution: { before: { activeInA: number; activeInB: number; totalActive: number; }; after: { activeInProduct: number; }; vanished: number; emerged: number; }; resonanceEvolution: { before: { a: number; b: number; }; after: number; energyChange: number; }; } /** * Predicted artifacts for a multiplication */ export interface PredictedArtifacts { operands: { a: number; b: number; }; predictions: Array<{ field: number; likelihood: number; type: 'vanishing' | 'emergent'; }>; } /** * A multiplication that produces a specific artifact */ export interface ArtifactProducer { factors: number[]; product: number; targetField: number; artifactType: 'vanishing' | 'emergent'; } /** * Analysis of artifacts in a number sequence */ export interface SequenceArtifactAnalysis { sequence: number[]; totalArtifacts: number; artifactDistribution: Record<string, number>; mostActiveField: number; averageArtifactsPerOperation: number; } //# sourceMappingURL=denormalization.d.ts.map