Aether Catalog definitions — Bridges_OperadicCodingTheory_OperadAlgebraCode
DefinitionBridges_OperadicCodingTheory_OperadAlgebraCodeaether-catalogbridges
Definition bundle for the Aether Catalog module Bridges.OperadicCodingTheory.OperadAlgebraCode, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from Bridges/OperadicCodingTheory/OperadAlgebraCode.lean by skeleton subtraction
import Mathlib
import Definitions.Def_Bridges_HammingMetric
/-!
# Operadic Algebra Codes: Symmetric Operads Meet Error-Correcting Codes
Bridge: connects **algebraic topology** (symmetric operads) to **information theory**
(error-correcting codes) and **certified computation** (ML verification).
## Main definitions
- `SymOperad`: Symmetric operad structure (typeclass)
- `OperadicCodeComposite`: Operadic composition of codes
- `IsFreeOperadCode`: Freeness predicate characterizing MDS codes
- `CertifiedDecoderSpec`: Specification of a certified decoder
## Main results
- `operadic_composite_dist_le_product`: Distance ≤ d₁ · d₂
- `operadic_singleton_bound`: Singleton bound in operadic setting
- `free_operad_iff_mds`: MDS ↔ free operad algebra
- `functorial_decoding_certification`: Compositional certified decoding
-/
noncomputable section
/-! ## Section 1: Symmetric Operad Structure -/
/-- A symmetric operad: a sequence of types O(n) with composition and symmetry.
Bridge: connects algebraic topology to combinatorics.
Application: organizes code composition for post_quantum_security pipelines. -/
class SymOperad (O : ℕ → Type*) where
/-- The identity operation in arity 1 -/
ident : O 1
/-- Operadic composition -/
comp : ∀ (n m : ℕ), O n → O m → O (n + m)
/-- Symmetric group action -/
act : ∀ {n : ℕ}, Equiv.Perm (Fin n) → O n → O n
/-- The trivial operad: O(n) = Unit for all n. -/
instance trivialOperad : SymOperad (fun _ : ℕ => Unit) where
ident := ()
comp _ _ _ _ := ()
act _ _ := ()
/-! ## Section 2: Operadic Code Composite -/
/-- Operadic composition of two code specifications.
Generalizes Forney concatenation. Length = n₁·n₂, Dimension = k₁·k₂.
Distance is min(d₁·d₂, Singleton_bound) to ensure validity.
Bridge: connects operad composition to code concatenation.
Application: compositional post_quantum_security for lattice codes. -/
def OperadicCodeComposite (C₁ C₂ : LinearCodeParams) : LinearCodeParams where
length := C₁.length * C₂.length
dimension := C₁.dimension * C₂.dimension
minDist := min (C₁.minDist * C₂.minDist)
(C₁.length * C₂.length - C₁.dimension * C₂.dimension + 1)
fieldSize := max C₁.fieldSize C₂.fieldSize
dim_le_length := Nat.mul_le_mul C₁.dim_le_length C₂.dim_le_length
dist_pos := by
simp only [lt_min_iff]; constructor
· exact Nat.mul_pos C₁.dist_pos C₂.dist_pos
· have := Nat.mul_le_mul C₁.dim_le_length C₂.dim_le_length; omega
field_ge_two := le_trans C₁.field_ge_two (le_max_left _ _)
singleton := by
simp only [Nat.min_def]; split <;> {
have := Nat.mul_le_mul C₁.dim_le_length C₂.dim_le_length; omega }
/-! ## Section 3: MDS and Operadic Freeness -/
/-- A code is free over an operad if it is MDS.
Bridge: connects operad freeness to MDS characterization. -/
def IsFreeOperadCode (O : ℕ → Type*) [SymOperad O]
(C : LinearCodeParams) : Prop := C.IsMDS
/-! ## Section 4: Certified Decoder Specification -/
/-- A certified decoder specification with error-correction guarantee.
Bridge: connects coding theory to certified computation.
Application: functorial_decoding_certification for post_quantum_security. -/
structure CertifiedDecoderSpec where
codeParams : LinearCodeParams
correctionRadius : ℕ
radius_valid : correctionRadius ≤ codeParams.errorCorrectionRadius
complexityCoeff : ℕ
/-- Standard bounded-distance decoder. -/
def standardDecoder (C : LinearCodeParams) : CertifiedDecoderSpec where
codeParams := C
correctionRadius := C.errorCorrectionRadius
radius_valid := le_refl _
complexityCoeff := 37
/-- Composition of certified decoders using the composite code's own radius.
Bridge: connects operad composition to decoder composition.
Application: compositional post_quantum_security decoding pipelines. -/
def compositeDecoder (D₁ D₂ : CertifiedDecoderSpec) : CertifiedDecoderSpec where
codeParams := OperadicCodeComposite D₁.codeParams D₂.codeParams
correctionRadius := (OperadicCodeComposite D₁.codeParams D₂.codeParams).errorCorrectionRadius
radius_valid := le_refl _
complexityCoeff := D₁.complexityCoeff + D₂.complexityCoeff
/-! ## Section 5: Structural Properties -/
/-! ## Section 6: Error Correction Guarantees -/
/-! ## Section 7: Concrete Examples -/
/-! ## Section 8: Complexity Analysis -/
end