Files
lucidia-math/lab/sine_wave_codex.py
Alexa Louise f5f1551964 Initial extraction from blackroad-prism-console
Lucidia Math - Advanced mathematical engines:

forge/ - Mathematical Foundations:
- consciousness.py (650 lines) - Consciousness modeling
- unified_geometry.py (402 lines) - Geometric transformations
- advanced_tools.py (356 lines) - Advanced utilities
- main.py (209 lines) - CLI orchestration
- numbers.py, proofs.py, fractals.py, dimensions.py

lab/ - Experimental Mathematics:
- unified_geometry_engine.py (492 lines) - Geometry engine
- amundson_equations.py (284 lines) - Custom equations
- iterative_math_build.py (198 lines) - Iterative construction
- trinary_logic.py (111 lines) - Three-valued logic
- prime_explorer.py (108 lines) - Prime exploration
- quantum_finance.py (83 lines) - Quantum finance models

3,664 lines of Python.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 08:43:07 -06:00

39 lines
997 B
Python

"""Symbolic sine-wave superposition utilities."""
from __future__ import annotations
from typing import Iterable, Tuple
import matplotlib.pyplot as plt
import numpy as np
Wave = Tuple[float, float, float] # frequency, phase, amplitude
def superposition(waves: Iterable[Wave], samples: int = 1000) -> Tuple[np.ndarray, np.ndarray]:
"""Compute the superposition of sine waves."""
t = np.linspace(0, 2 * np.pi, samples)
result = np.zeros_like(t)
for freq, phase, amp in waves:
result += amp * np.sin(freq * t + phase)
return t, result
def classify_wave(value: float, eps: float = 1e-3) -> str:
"""Classify wave value into truth/false/paradox."""
if value > eps:
return "truth"
if value < -eps:
return "false"
return "paradox"
def plot_waves(waves: Iterable[Wave]) -> plt.Figure:
t, result = superposition(waves)
fig, ax = plt.subplots()
ax.plot(t, result)
ax.set_title("Sine wave superposition")
return fig