mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-31 01:25:21 +00:00
Five new formal modules, all clean rewrites (not ports from Research Stack). Based on the chiral CRT multiplexing framework. 1. HCMR.lean (Hardware Contention Markov Representation) - Self-loop probs: SUBLEQ=0.823, AVX-512=0.885, ring=0.0 - Throughput = base_rate × (1 - self_loop_prob) - Theorems: ring > SUBLEQ > AVX-512 ordering, COUCH stability - Connection: self_loop = Sidon collision rate 2. CacheSieve.lean (L0 Local Sorter Cache Admission) - 4-state machine: Stable → Rising → Unstable → Reset - Admission control + victim selection - Theorems: stable→promote, high contention→demote, COUCH evicts - Connection: COUCH gate = contention threshold filter 3. Blitter6502OISC.lean (6502 OISC Blitter) - SUBLEQ instruction semantics: M[b] := M[b] - M[a] - Blitter: 3 SUBLEQ per byte (negation trick) - Theorems: subtract semantics, branch on ≤0, ring faster than SUBLEQ - Connection: blitter is the 'word SUBLEQ' regime from HCMR 4. YangMillsPerformance.lean (Distributed Performance) - 5 layers: cache → memory → sync → compression → network - Composed throughput = base × ∏(1 - overhead_i) - Theorems: cache highest overhead, more layers = less throughput - Connection: cache overhead = HCMR SUBLEQ self-loop 5. WorkloadTestbench.lean (Virtual GPU Workload Simulation) - 5 workload types: stream, strided, random, gather, scatter - Maps workloads to HCMR ops and CacheSieve states - Theorems: stream highest throughput, random causes Reset - Connection: stream = ring dispatch, random = AVX-512 Suite composition: WorkloadTestbench (workload → op type) → HCMR (op → self-loop → throughput) → CacheSieve (contention → admit/evict) → Blitter6502OISC (concrete SUBLEQ execution) → YangMillsPerformance (distributed stack composition) All modules registered in lakefile.lean as SilverSightRRC roots. Lean v4.30.0-rc2, Mathlib dependency. Known sorries: 2 (CacheSieve.evict_prefers_reset needs List API work, YangMillsPerformance.compression_overhead_bounded needs conservation law formalization). All other theorems are complete.
158 lines
5.1 KiB
Text
158 lines
5.1 KiB
Text
import Lake
|
|
open Lake DSL
|
|
open System
|
|
|
|
package «SilverSight» where
|
|
leanOptions := #[
|
|
⟨`pp.unicode.fun, true⟩ -- pretty-prints `fun a ↦ b`
|
|
]
|
|
-- Add any additional package configuration options here
|
|
|
|
@[default_target]
|
|
lean_lib «SilverSightCore» where
|
|
-- Add any library configuration options here
|
|
srcDir := "Core"
|
|
roots := #[`SilverSightCore, `SilverSight.FixedPoint, `SilverSight.Semantics.Schema, `SilverSight.Semantics.Layout, `SilverSight.Semantics.WireFormat, `SilverSight.Semantics.View, `SilverSight.Semantics.LayoutBridge, `SilverSight.Semantics.CanalLayout]
|
|
|
|
lean_lib «SilverSightFormal» where
|
|
srcDir := "formal"
|
|
roots := #[
|
|
`CoreFormalism.FixedPoint,
|
|
`SilverSight.PrimeLut,
|
|
`SilverSight.FixedPointBridge,
|
|
`CoreFormalism.Tactics,
|
|
`CoreFormalism.Q16_16Numerics,
|
|
`CoreFormalism.DynamicCanal,
|
|
`CoreFormalism.Bind,
|
|
`CoreFormalism.BraidBracket,
|
|
`CoreFormalism.BraidStrand,
|
|
`CoreFormalism.BraidCross,
|
|
`CoreFormalism.BraidField,
|
|
`CoreFormalism.BraidStateN,
|
|
`CoreFormalism.SidonSets,
|
|
`CoreFormalism.SieveLemmas,
|
|
`CoreFormalism.InteractionGraphSidon,
|
|
`CoreFormalism.BraidEigensolid,
|
|
`CoreFormalism.BraidSpherionBridge,
|
|
`CoreFormalism.E8Sidon,
|
|
`CoreFormalism.EisensteinSeries,
|
|
`CoreFormalism.ComplexProjectiveSpace,
|
|
`CoreFormalism.GoormaghtighEnumeration,
|
|
`CoreFormalism.HachimojiBase,
|
|
`CoreFormalism.HachimojiCodec,
|
|
`CoreFormalism.HachimojiLUT,
|
|
`CoreFormalism.HachimojiBridging,
|
|
`CoreFormalism.HachimojiManifoldAxiom,
|
|
`CoreFormalism.ChentsovFinite,
|
|
`CoreFormalism.HopfFibration,
|
|
`CoreFormalism.StrandCapacityBound,
|
|
`CoreFormalism.CRTSidon,
|
|
`CoreFormalism.CRTSidonN,
|
|
`SilverSight.AngrySphinx,
|
|
`SilverSight.CollatzBraid,
|
|
`SilverSight.GoldenSpiral,
|
|
`SilverSight.GCCL,
|
|
`SilverSight.WireFormat,
|
|
`SilverSight.ProductSchema,
|
|
`SilverSight.ProductWireFormat,
|
|
`SilverSight.Receipt,
|
|
`BindingSite.BindingSiteTypes,
|
|
`BindingSite.BindingSiteHachimoji,
|
|
`BindingSite.BindingSiteEntropy,
|
|
`BindingSite.BindingSiteCodec
|
|
]
|
|
|
|
lean_lib «SilverSightRRC» where
|
|
srcDir := "formal"
|
|
roots := #[
|
|
`SilverSight.HachimojiN8,
|
|
`SilverSight.HachimojiN8Bridge,
|
|
`SilverSight.HachimojiCharClass,
|
|
`SilverSight.PhiDNALayout,
|
|
`SilverSight.PhiConsistency,
|
|
`SilverSight.PhiPipelineReceipt,
|
|
`SilverSight.PIST.Spectral,
|
|
`SilverSight.PIST.SpectralN,
|
|
`SilverSight.PIST.MatrixN,
|
|
`SilverSight.PIST.CharPoly,
|
|
`SilverSight.PIST.FisherRigidity,
|
|
`SilverSight.PIST.FisherRigidityN,
|
|
`SilverSight.PIST.Classify,
|
|
`SilverSight.PIST.ClassifyN,
|
|
`SilverSight.PIST.Matrices250,
|
|
`SilverSight.PIST.UnifiedCovariant,
|
|
`SilverSight.PIST.CartanConnection,
|
|
`SilverSight.PIST.YangBaxter,
|
|
`SilverSight.PIST.SidonMirrorNotch,
|
|
`SilverSight.PIST.Tdoku16D,
|
|
`SilverSight.PIST.CrossDomainSynthesis,
|
|
`SilverSight.PIST.MultiSurfacePacker,
|
|
`SilverSight.PIST.ManifoldShortcut,
|
|
`SilverSight.PIST.SidonAdapter,
|
|
`SilverSight.PIST.WeightCandidateGen,
|
|
`SilverSight.PIST.UnitDistCandidateGen,
|
|
`SilverSight.PIST.CMYKColoringCore,
|
|
`SilverSight.RRCLogogramProjection,
|
|
`SilverSight.ReceiptCore,
|
|
`SilverSight.RRC.Emit,
|
|
`SilverSight.RRC.ReceiptDensity,
|
|
`SilverSight.RRC.PolyFactorIdentity,
|
|
`SilverSight.RRC.EntropyCandidates,
|
|
`SilverSight.RRC.Q16_16Manifold,
|
|
`SilverSight.AVMIsa.Types,
|
|
`SilverSight.AVMIsa.Value,
|
|
`SilverSight.AVMIsa.Instr,
|
|
`SilverSight.AVMIsa.State,
|
|
`SilverSight.AVMIsa.Step,
|
|
`SilverSight.AVMIsa.TypeCheck,
|
|
`SilverSight.AVMIsa.TypeSafety,
|
|
`SilverSight.AVMIsa.Run,
|
|
`SilverSight.AVMIsa.Emit,
|
|
`SilverSight.AdjugateMatrix,
|
|
`SilverSight.ColdReviewer,
|
|
`SilverSight.HCMR,
|
|
`SilverSight.CacheSieve,
|
|
`SilverSight.Blitter6502OISC,
|
|
`SilverSight.YangMillsPerformance,
|
|
`SilverSight.WorkloadTestbench,
|
|
`SilverSight.Rollup,
|
|
`SilverSight.FeasibleSet.Theorem,
|
|
`SilverSight.FeasibleSet.QUBORelaxation,
|
|
`SilverSight.CollectiveIntelligence.CostTransparency,
|
|
`RRCLib.RRCEmit
|
|
]
|
|
|
|
/-! Dead code archived 2026-07-03. See archive/dead_code_2026-07-03/README.md
|
|
- CoreFormalism/CharacterTransform.lean
|
|
- PVGS_DQ_Bridge/ (8 .lean + 1 .py)
|
|
- UniversalEncoding/ (2 .lean)
|
|
- SilverSight/PIST/SpectralWitness.lean
|
|
- SilverSight/Bind.lean
|
|
- SilverSight/FeasibleSet/TestChain.lean
|
|
-/
|
|
|
|
lean_exe «rrc-emit-fixture» where
|
|
root := `RrcEmitFixture
|
|
srcDir := "exe"
|
|
|
|
lean_exe «q16-roundtrip» where
|
|
root := `Q16_16Roundtrip
|
|
srcDir := "exe"
|
|
|
|
-- Static C library for the Q16_16 roundtrip executable.
|
|
def cSrcDir : FilePath := FilePath.mk "c"
|
|
|
|
target q16_canonical.o pkg : FilePath := do
|
|
let oFile := pkg.buildDir / cSrcDir / "q16_canonical.o"
|
|
let srcJob ← inputFile (pkg.srcDir / cSrcDir / "q16_canonical.c") true
|
|
let flags := #["-fPIC", "-O2"]
|
|
buildO oFile srcJob flags
|
|
|
|
extern_lib q16_canonical pkg := do
|
|
let name := nameToStaticLib "q16_canonical"
|
|
let libFile := pkg.buildDir / cSrcDir / name
|
|
let oJob ← fetch <| pkg.target ``q16_canonical.o
|
|
buildStaticLib libFile #[oJob]
|
|
|
|
require mathlib from git
|
|
"https://github.com/leanprover-community/mathlib4.git" @ "v4.30.0-rc2"
|