cargo
Rust package manager (36 subcommands).
lean4-music-topos
Formal verification of music topos theorems - spectral gaps, CRDT correctness, color harmony, preference learning
Full skill instructions
Category: Formal Verification - High-Level Theorems
Status: Production Ready (14+ modules)
Last Updated: Dec 21 20:13
Dependencies: theorem-prover-orchestration, Mathlib4 v4.14.0
Comprehensive Lean 4 formalization of the Music Topos - a unified mathematical system proving correctness of:
Master proof coordinator
Distributed consensus proofs
Theorem: merge_associative ∘ merge_commutative → consistency
Perceptual color space formalization
Theorems:
Optimization guarantees
Theorem: training_converges_to_optimum_within_iterations(n)
Category theory - character groups
Musical harmony formalization
Galois theory extension
Foundational definitions
p-adic formalization
Theorem: matches_at_depth c₁ c₂ d ↔ v₃(c₁ - c₂) ≥ d
3-SAT reduction gadget
KEY THEOREM
theorem spectral_gap :
λ₂(blume_capel_model) = 1/4 := by
-- Proof: tricritical point at β = ln(1 + √2)
-- Eigenvalue: (1 - λ₂) corresponds to slowest mixing
-- Mixing time: 4 steps from any configuration
Tritwise (balanced ternary) proofs
Executable entry point
Master importer
import MusicTopos.Basic
import MusicTopos.SpectralGap
import MusicTopos.Padic
import MusicTopos.TritwiseInteraction
import MusicTopos.ThreeMatchGadget
| Theorem | Module | Status | Date |
|---|---|---|---|
| spectralGap = 1/4 | SpectralGap.lean | ✓ | Dec 21 |
| merge_associative | CRDTCorrectness.lean | ✓ | Dec 21 |
| color_harmony_ciede2000 | ColorHarmonyProofs.lean | ✓ | Dec 21 |
| learning_convergence | PreferenceLearning.lean | ✓ | Dec 21 |
| pontryagin_duality_iso | PontryaginDuality.lean | ✓ | Dec 21 |
| matches_at_depth | Padic.lean | ✓ | Dec 21 |
| system_converges_after_mixing | TritwiseInteraction.lean | ✓ | Dec 21 |
-- Import the complete system
import MusicTopos
-- Use theorems in proofs
example (c : Color) : Color := by
-- Verify CRDT merge correctness
apply CRDTCorrectness.merge_associative
exact c
# Generate Lean-to-Haskell extraction
lake build MusicTopos
# Produces: .olean compiled proof objects
# Generate Lean-to-Wasm
lake build --target wasm
# Check spectral gap proof
lake env lean MusicTopos/SpectralGap.lean --check spectral_gap
# Type-check entire system
lake build
Cross-verify Galois theorems:
Dafny: GaloisClosure (spi_galois.dfy:170)
Lean4: GaloisDerangement.lean
Both prove identical mathematical statement with full mutual verification.
# From theorem-prover-orchestration
search_proof("SpectralGap")
=> Returns MusicTopos/SpectralGap.lean:42
compile_proof("spectral_gap", :haskell)
=> Extracts to Haskell via lake build
verify_equivalence([
("Lean4", "SpectralGap.lean"),
("Dafny", "spi_galois.dfy")
])
lean4-music-topos/
├── SKILL.md # This file
├── lakefile.lean # Lake build config
├── MusicTopos/
│ ├── Basic.lean
│ ├── SpectralGap.lean
│ ├── Padic.lean
│ ├── TritwiseInteraction.lean
│ ├── ThreeMatchGadget.lean
│ ├── ProofOrchestration.lean
│ ├── CRDTCorrectness.lean
│ ├── ColorHarmonyProofs.lean
│ ├── PreferenceLearning.lean
│ ├── PontryaginDuality.lean
│ ├── MultiInstrumentComposition.lean
│ ├── GaloisDerangement.lean
│ ├── Main.lean
│ └── MusicTopos.lean
└── examples/
├── verify_spectral_gap.lean
├── crdt_merge_demo.lean
└── color_harmony_example.lean
[package]
name = "music-topos"
version = "0.1.0"
[dependencies]
mathlib = { version = "v4.14.0" }
# Build all proofs
lake build
# Check specific module
lake env lean MusicTopos/SpectralGap.lean
# Generate documentation
lake doc
# Extract to Haskell
lake build --target haskell
# Extract to Wasm
lake build --target wasm
theorem-prover-orchestration - Master dispatcherdafny-formal-verification - Low-level proofsstellogen-proof-search - Automated searchcategorical-composition - Functor correctnessformal-verification-ai - AI verification# As part of plurigrid/asi
npx ai-agent-skills install plurigrid/asi --with-theorem-provers
# Standalone (requires Lean4 & Mathlib4)
npx ai-agent-skills install lean4-music-topos
Rust package manager (36 subcommands).
Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...
**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...
Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations
Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.
Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.
Topological soliton detection and agency bridge with anyonic fusion algebra for concept composition
PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.
Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.
Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.
World C Skill
Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience