Aether Catalog definitions — MachineLearning_QuantumTransformer_BiologicalCrystallization
DefinitionMachineLearning_QuantumTransformer_BiologicalCrystallizationaether-catalogmachinelearning
Definition bundle for the Aether Catalog module MachineLearning.QuantumTransformer.BiologicalCrystallization, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from MachineLearning/QuantumTransformer/BiologicalCrystallization.lean by skeleton subtraction
import Mathlib
/-! # CatalogBuild.MachineLearning.QuantumTransformer.BiologicalCrystallization
Auto-generated from theorem catalog database.
Domain: MachineLearning/QuantumTransformer
Declarations: 13
-/
noncomputable section
/-- [Section: # CatalogBuild.MachineLearning.QuantumTransformer.BiologicalCrystallization
Auto-generated from theorem catalog database.
Domain: MachineLearning/QuantumTransformer
Declarations: 13] -/
def is_one_hot {n : ℕ} (v : Fin n → ℝ) : Prop :=
∃ k, v k = 1 ∧ ∀ j, j ≠ k → v j = 0
def is_k_sparse {n : ℕ} (k : ℕ) (v : Fin n → ℝ) : Prop :=
(Finset.univ.filter (fun i => v i ≠ 0)).card ≤ k
/-- The order parameter for crystallization. -/
def order_parameter {n : ℕ} (w : Fin n → ℝ) : ℝ :=
(1 / ↑n) * ∑ i, w i * (1 - w i)
end