Aether Catalog definitions — MachineLearning_PolicyGradient_Theorems
DefinitionMachineLearning_PolicyGradient_Theoremsaether-catalogmachinelearning
Definition bundle for the Aether Catalog module MachineLearning.PolicyGradient.Theorems, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from MachineLearning/PolicyGradient/Theorems.lean by skeleton subtraction
import Mathlib
/-
Copyright (c) 2026 Harmonic. All rights reserved.
Released under Apache 2.0 license.
# Finite policy-gradient and exploration-variance theorems
A self-contained finite-action formalization. Policies are differentiable
families of probability vectors. The score identity is represented without
logs by `∂p(a) = p(a) ψ(a)`.
-/
namespace PolicyGradient
open scoped BigOperators
variable {n d : ℕ}
/-- Finite expectation with respect to a weight vector. -/
def expect (p f : Fin n → ℝ) : ℝ := ∑ a, p a * f a
/-- The second moment of a scalar importance-weighted estimator. -/
noncomputable def importanceSecondMoment (behavior target g : Fin n → ℝ) : ℝ :=
∑ a, behavior a * (target a / behavior a * g a) ^ 2
end PolicyGradient