Native conditional independence of internal and external states given the blanket
ProvedFreeEnergyPrinciple.staticJoint_condIndepFunThe defining conditional-independence property of a Markov blanket, in Mathlib's native measure-theoretic predicate.
A static blanket model factorizes a finite joint over blanket (the sensory-active pair), internal states , and external states :
Finite laws embed as weighted sums of Dirac masses, so the authored factorization becomes a genuine probability measure on the discrete state space, and the blanket/internal/external coordinates become genuine random variables on it.
The target: the embedded static joint satisfies Mathlib's CondIndepFun predicate — internal and external coordinates are conditionally independent given the blanket coordinate,
The proof does not pass through finite mutual information: it identifies the two authored conditional kernels with Mathlib's native conditional distributions (condDistrib) almost everywhere under the blanket marginal — the native blanket marginal is exactly the authored blanket law, and the blanket-internal and blanket-external marginals are the authored kernels composed with it — and then applies Mathlib's native characterization of conditional independence by the factorization of the -joint.
Two honesty constraints carry over from the source: internal and external carriers must be nonempty (so the conditional distributions exist), and the claim is exactly conditional independence — nonvacuity is witnessed by a Boolean model with two positively weighted, perfectly correlated blanket regimes, where internal and external states both copy the sensory coordinate (their unconditional association is nontrivial) while their conditional law at each blanket value is a product of point masses.
import Mathlib.Probability.Independence.Conditional import Definitions.Def_fep2_native_blanket
namespace FreeEnergyPrinciple
open MeasureTheory ProbabilityTheory
theorem staticJoint_condIndepFun
{Internal Sensory Active External : Type*}
[Fintype Internal] [Fintype Sensory] [Fintype Active] [Fintype External]
[MeasurableSpace Internal] [MeasurableSpace Sensory]
[MeasurableSpace Active] [MeasurableSpace External]
[DiscreteMeasurableSpace Internal] [DiscreteMeasurableSpace Sensory]
[DiscreteMeasurableSpace Active] [DiscreteMeasurableSpace External]
[Nonempty Internal] [Nonempty External]
(model : StaticModel Internal Sensory Active External) :
ProbabilityTheory.CondIndepFun
(MeasurableSpace.comap blanketCoordinate inferInstance)
blanketCoordinate_measurable.comap_le
internalCoordinate externalCoordinate
(embeddedLaw (staticJoint model)) := by sorry
end FreeEnergyPrincipleRead-back
What the Lean code literally says, in plain math · glm-flash-latest
Theorem staticJoint_condIndepFun — literal statement. Let Internal, Sensory, Active, External be finite types, each with a discrete measurable space structure, with Internal and External nonempty. A model is exactly a triple where : a law on , and conditionals on Internal and on External (each summing to 1). Existence of a model forces nonempty, since must sum to 1. Let the state space be the nested-pair carrier , and let be the probability measure assigning each state the mass , built as a weighted sum of Dirac masses.
The theorem asserts: under , the random variables (state's Internal component) and (state's External component) are conditionally independent given the -algebra generated by the blanket projection alone (the pullback of the blanket's measurable structure, assumed measurable). Unfolded, this means: for every subset and (all subsets qualify — every carrier is discrete), as functions on the state space,
holding -almost everywhere — equivalently, at every blanket value with . No additional hypotheses; the conclusion is exactly Mathlib's conditional-independence predicate and nothing more.
AUDITOR-FLAG: the proof body is sorry — this artifact carries only the statement, unproven. AUDITOR-FLAG: Nonempty Internal/Nonempty External are stated but not Nonempty Sensory/Active; an empty Sensory or Active yields no model at all ( cannot sum to 1), so no vacuous instance arises.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.