Uniqueness of the recognition density attaining the bound
ProvedFreeEnergyPrinciple.variational_free_energy_eq_surprisal_iffUniqueness of the recognition density attaining the variational bound.
In the setting of the goal theorem, equality in the bound characterizes exact Bayesian recognition:
Role: the equality case of the free energy principle's core inequality. A recognition density minimizes the variational free energy exactly when it is the exact Bayesian posterior implied by the model — the formal statement of "perception as Bayesian inference" behind the variational free energy. No full-support assumption is needed: at zero-mass reference atoms, normalization forces the recognition law's mass to zero as well, so the characterization covers degenerate posteriors exactly as the source proves it.
Formalization Note — the proof rests on the separation lemma of Def_fep_finite_information, which is the technically nontrivial ingredient at zero-mass atoms. Transcribed from the proved theorem variationalFreeEnergy_eq_surprisal_iff of FepSketches.active_inference in the fep_lean formalization; compiled against the platform environment.
import Definitions.Def_fep_finite_laws import Definitions.Def_fep_finite_information import Definitions.Def_fep_generative_model
namespace FreeEnergyPrinciple
theorem variational_free_energy_eq_surprisal_iff
{Policy State Outcome : Type*} [Fintype Policy] [Fintype State]
[Fintype Outcome]
(model : GenerativeModel Policy State Outcome) (policy : Policy)
(outcome : Outcome) (h : 0 < predictedOutcome model policy outcome)
(recognition : FiniteLaw State) :
variationalFreeEnergy model policy outcome h recognition =
outcomeSurprisal model policy outcome ↔
recognition = posteriorState model policy outcome h := by sorry
end FreeEnergyPrincipleRead-back
What the Lean code literally says, in plain math · glm-flash-latest
Theorem variational_free_energy_eq_surprisal_iff (read-back).
Let , , be types, each of which is finite (i.e., admits a finite enumeration of its elements). Let model be a generative model over policies in , states in , and outcomes in . Fix a policy and an outcome , and suppose the hypothesis
that is, the model's predicted probability (or density) of the outcome under policy is strictly positive. Let recognition be a finite law on states , i.e., a probability distribution over the finite set of states.
The theorem asserts that the following two statements are equivalent (an if-and-only-if):
- The variational free energy of the recognition distribution, evaluated for the model, the policy , the outcome , and the hypothesis , equals the outcome surprisal of the model — namely the negative logarithm (or the model-defined surprisal measure) of the predicted probability of under :
- The recognition distribution is exactly the posterior distribution over states of the model given the outcome and the policy:
In other words, the free-energy functional coincides with the outcome surprisal precisely at the recognition distribution that is the model's posterior over states; at every other recognition distribution the equality fails (and by the iff, equality can hold only at the posterior).
Notes on scope: no side conditions are imposed on the types beyond finiteness; the positivity hypothesis appears both as an assumption and as an argument to the free-energy and posterior constructions, so the statement applies only when the predicted probability of the outcome is strictly positive (avoiding degenerate/singular cases).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.