mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-08-17 21:00:35 +00:00
New files:
- docs/reviews/avmisa_audit_report.md: Full AVMIsa rigidity & vulnerability audit
(8 surfaces found, 5 mitigated, 2 open)
- formal/BindingSite/BindingSiteTypes.lean: Binding site type definitions
- formal/CoreFormalism/GoormaghtighEnumeration.lean: Goormaghtigh conjecture enumeration
- formal/SilverSight/HachimojiCharClass.lean: Hachimoji character classification
- formal/SilverSight/HachimojiN8.lean: N=8 minimal alphabet theorem
- formal/SilverSight/HachimojiN8Bridge.lean: Bridge between HachimojiCharClass and N8
- formal/SilverSight/PhiConsistency.lean: Phi pipeline consistency checks
- formal/SilverSight/PhiDNALayout.lean: DNA layout for Phi-encoded equations
- formal/SilverSight/PhiPipelineReceipt.lean: Receipt format for Phi pipeline
53 lines
2.1 KiB
Text
53 lines
2.1 KiB
Text
/-
|
||
HachimojiN8Bridge.lean — Cross-check: HachimojiBase.card_eq ↔ n8_necessity
|
||
|
||
These two facts exist in separate modules:
|
||
- HachimojiBase.card_eq : Fintype.card HachimojiBase = 8 (CoreFormalism)
|
||
- HachimojiN8.n8_necessity : ∀ N, allOk N ↔ N = 8 (SilverSight)
|
||
|
||
They agree — but without this file they don't formally know about each other.
|
||
A session that modifies either (changes a predicate in n8_necessity, or adds a
|
||
constructor to HachimojiBase) breaks THIS theorem, providing a single point of
|
||
detection rather than two silently-diverging correct proofs.
|
||
|
||
Anti-drift role: this is the Ring 1 wire in the outward dependency spiral.
|
||
If it fails, stop and diagnose before touching anything downstream.
|
||
-/
|
||
|
||
import CoreFormalism.HachimojiManifoldAxiom
|
||
import SilverSight.HachimojiN8
|
||
|
||
open SilverSight.HachimojiN8
|
||
|
||
namespace SilverSight.HachimojiN8Bridge
|
||
|
||
-- ============================================================
|
||
-- §1 THE LINKING THEOREM
|
||
-- ============================================================
|
||
|
||
/-- The Hachimoji type's cardinality satisfies n8_necessity.
|
||
Proof: card_eq gives 8; n8_necessity gives allOk 8 = true.
|
||
If HachimojiBase gains or loses a constructor, card_eq changes,
|
||
allOk (new count) = false, and this theorem breaks. -/
|
||
theorem hachimoji_card_matches_necessity :
|
||
Fintype.card HachimojiBase = 8 ∧
|
||
allOk (Fintype.card HachimojiBase) = true :=
|
||
⟨HachimojiBase.card_eq, by rw [HachimojiBase.card_eq]; exact n8_satisfies⟩
|
||
|
||
/-- Equivalently: the cardinality is the unique value satisfying all three constraints.
|
||
This is the statement that the type IS the alphabet justified by n8_necessity. -/
|
||
theorem hachimoji_card_is_unique_valid :
|
||
∀ N : ℕ, allOk N = true ↔ N = Fintype.card HachimojiBase := by
|
||
intro N
|
||
rw [HachimojiBase.card_eq]
|
||
exact n8_necessity N
|
||
|
||
-- ============================================================
|
||
-- §2 WITNESS
|
||
-- ============================================================
|
||
|
||
-- Belt-and-suspenders: both proofs evaluate to the same nat
|
||
#eval Fintype.card HachimojiBase -- expect: 8
|
||
#eval allOk 8 -- expect: true
|
||
|
||
end SilverSight.HachimojiN8Bridge
|