Research-Stack/0-Core-Formalism
Brandon Schneider 49dbd48bf5 feat: CopyIfTactic — native Lean 4 pre-filter tactic
Implements the copy-if pattern as a Lean tactic:
- 'copy_if' tries rfl → decide → omega → norm_num → simp in order
- 'copy_if?' reports which closer worked (for profiling)
- Each closer is a 'zero delta' check — if goal is in normal form,
  closes instantly; if not, tries next closer

This is the Lean-native equivalent of:
- Blog post: vpcompressd register-dest = 40x faster
- VCN: numpy copy-if = 3.3x faster
- Pre-filter: skip trivial theorems = 2.7x faster
- LSP: copy_if tactic = instant close for zero-delta goals

Usage:
  import Semantics.CopyIfTactic
  theorem foo : 1 = 1 := by copy_if
  theorem bar : x + 0 = x := by copy_if
  theorem baz : complex := by copy_if  -- falls through to simp

3298 jobs, 0 errors. Tests pass for rfl, decide, omega, norm_num.
2026-05-29 02:58:19 -05:00
..
core Remove legacy Python prototypes superseded by Lean formalization 2026-05-19 15:34:17 +00:00
lean feat: CopyIfTactic — native Lean 4 pre-filter tactic 2026-05-29 02:58:19 -05:00
otom Add Phys.org May 2026 source intake for bees, biocoatings, THz, and diamond membranes 2026-05-23 19:27:37 -05:00
receipts docs: add bio optical witness living light equations 2026-05-09 20:53:51 -05:00
rust/ftdi_gimbal initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00
README.md initial: sovereign research stack (consolidated, weightless, and lfs-optimized) 2026-05-04 18:11:36 -05:00

0-Core-Formalism

Purpose: Formal foundations for the entire Research Stack — Lean modules, bind primitive, Triumvirate consensus, core source.

No external dependencies. All other layers depend on this.

Contents (Target)

Source Destination
0-Core-Formalism/lean/Semantics/ 0-Core-Formalism/lean/Semantics/
core/ 0-Core-Formalism/core/

Concepts

  • bind — State → (State → Action) → State
  • TriumvirateClock — ternary consensus (ADD/PAUSE/SUBTRACT)
  • Builder/Judge/Warden — roles mapped to hardware registers
  • OTOM — Ordered Transformation & Orchestration Model

Build

cd "0-Core-Formalism"
lake build