Aether Catalog definitions — Bridges_StoneDualityMLAdvanced
DefinitionBridges_StoneDualityMLAdvancedaether-catalogbridges
Definition bundle for the Aether Catalog module Bridges.StoneDualityMLAdvanced, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from Bridges/StoneDualityMLAdvanced.lean by skeleton subtraction
import Mathlib
import Definitions.Def_Bridges_StoneDualityMLCore
/-
# Stone Duality for ML: Advanced Theorems
Shattering Entropy Bounds, Topological Learning Certificates,
and Lattice-Crypto Security from CB Rank
Bridge: Topology (CB rank, Stone spaces) ↔ Machine Learning
(Littlestone dimension, online learning) ↔ Cryptography (post-quantum security)
↔ Information Theory (entropy bounds).
-/
open Set Function Finset StoneDualityML
namespace StoneDualityMLAdv
/-! ## Section 1: Filter Partition
Bridge: Combinatorics ↔ Information Theory -/
/-! ## Section 2: Shattering Entropy Bound
Bridge: ML ↔ Information Theory ↔ Combinatorics -/
/-! ## Section 3: Tree Construction
Bridge: Combinatorics ↔ ML -/
/-- Canonical tree: nodes labeled 0..d-1. -/
def canonicalTree : (d : ℕ) → STree d
| 0 => .leaf
| d + 1 => .node d (canonicalTree d) (canonicalTree d)
/-! ## Section 4: Topological Learning Certificates
Bridge: Topology ↔ ML ↔ Cryptography -/
/-- Topological learning certificate.
Bridge: Topology (CB rank) ↔ ML (learnability) -/
structure TopoLearnCert where
cbRank : ℕ
mistakeBound : ℕ
rank_bounds : mistakeBound ≤ cbRank
rank_positive : 1 ≤ cbRank
/-- Crypto-topological hardness.
Bridge: Cryptography (lattice_crypto) ↔ Topology (CB rank) -/
structure CryptoTopoHardness where
latticeDim : ℕ
cbRankDual : ℕ
secParam : ℕ
rank_ge_dim : latticeDim ≤ cbRankDual
sec_ge_rank : cbRankDual ≤ secParam
/-! ## Section 5: Hamming Ball Geometry
Bridge: ML (certified_robustness) ↔ Combinatorics ↔ Analysis -/
/-- Hamming ball of radius r. -/
def hammingBall (n : ℕ) (h₀ : Fin n → Bool) (r : ℕ) : Finset (Fin n → Bool) :=
Finset.univ.filter (fun h => hammingDist n h₀ h ≤ r)
/-! ## Section 6: Adversarial Robustness
Bridge: ML (adversarial robustness) ↔ Topology -/
/-- Adversarial closeness within budget r.
Bridge: ML (adversarial examples) ↔ Analysis -/
def adversariallyClose (n : ℕ) (h₁ h₂ : Fin n → Bool) (r : ℕ) : Prop :=
hammingDist n h₁ h₂ ≤ r
/-! ## Section 7: Topological Entropy
Bridge: Information Theory ↔ Topology ↔ Algebra -/
/-- Topological entropy of a Boolean algebra with 2^n atoms. -/
noncomputable def topoEntropy (n : ℕ) : ℝ :=
Real.log (2 ^ n) / Real.log 2
/-! ## Section 8: VC Dimension
Bridge: ML (statistical learning) ↔ Combinatorics -/
/-- VC dimension of a hypothesis class.
Bridge: ML (statistical learning) ↔ Combinatorics -/
noncomputable def vcDim {n : ℕ} (H : FinHypClass n) : ℕ :=
Finset.sup (Finset.univ.filter (fun S : Finset (Fin n) =>
growthFn H S = 2 ^ S.card)) Finset.card
/-! ## Section 9: Grand Bridge Theorems -/
end StoneDualityMLAdv