Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — EML_AIResearch_EmbeddingTheory

Definition
EML_AIResearch_EmbeddingTheory

by raver1975 · Sep 13, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogeml

Definition bundle for the Aether Catalog module EML.AIResearch.EmbeddingTheory, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from EML/AIResearch/EmbeddingTheory.lean by skeleton subtraction
import Mathlib

/-! # CatalogBuild.EML.AIResearch.EmbeddingTheory

Auto-generated from theorem catalog database.
Domain: EML/AIResearch
Declarations: 24
-/

noncomputable section

/-- Standard embedding table: vocab × d_embed -/
def stdEmbeddingTableParams (vocabSize d_embed : ℕ) : ℕ := vocabSize * d_embed

/-- EML factored embedding: vocab × rank + 4 × d_embed.
Cheaper when rank is small relative to d_embed. -/
def emlFactoredEmbeddingParams (vocabSize rank d_embed : ℕ) : ℕ :=
  vocabSize * rank + 4 * d_embed


/-- Standard linear projection: d_in → d_out -/
def stdProjectionParams (d_in d_out : ℕ) : ℕ := d_in * d_out

/-- EML projection: 4 params per output dim -/
def emlProjectionParams (d_out : ℕ) : ℕ := 4 * d_out


/-- Triplet loss: max(0, d(anchor,pos) - d(anchor,neg) + margin) -/
def tripletLoss (d_pos d_neg margin : ℝ) : ℝ := max 0 (d_pos - d_neg + margin)




/-- PCA/projection: reduce d_high to d_low -/
def dimReductionParams (d_high d_low : ℕ) : ℕ := d_high * d_low

/-- EML dimensionality reduction -/
def emlDimReductionParams (d_low : ℕ) : ℕ := 4 * d_low


/-- Memory for quantized embeddings -/
def quantizedEmbeddingMemory (numEmbeddings d_embed bits : ℕ) : ℕ :=
  numEmbeddings * d_embed * bits


/-- Cost of contextual embedding layer (transformer-style) -/
def contextualEmbeddingCost (seqLen d_model : ℕ) : ℕ := seqLen * d_model * d_model

def emlContextualCost (seqLen d_model : ℕ) : ℕ := seqLen * 4 * d_model


/-- Brute-force search cost: compare against all stored embeddings -/
def nnSearchCost (numStored d_embed : ℕ) : ℕ := numStored * d_embed

/-- EML compressed search: lower dimensionality -/
def emlNNSearchCost (numStored d_compressed : ℕ) : ℕ := numStored * d_compressed


/-- Compose two embedding layers -/
def composedEmbeddingParams (d1 d_mid d2 : ℕ) : ℕ := d1 * d_mid + d_mid * d2

/-- EML composed embedding -/
def emlComposedParams (d_mid : ℕ) : ℕ := 4 * d_mid + 4 * d_mid


end

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me