Theorem 3: counterfactual error amplification
ProvedControlledWorldModels.counterfactual_error_amplificationAssume Assumptions 1–3 with and . Fix identified coordinates , , and let and . Suppose the predictor class contains
for every matrix . Then for every the class contains a continuous predictor with
A small on-policy excess risk is therefore compatible with a counterfactual error larger by the factor .
Formalization Note is the linear version of the conditional mean, as used in the paper's proof. The statement holds for every . It therefore generalizes the paper's statement, which concerns the identified by a minimizer; it is not merely equivalent to it.
import Mathlib import Definitions.Def_ControlledWorldModels_Basic open MeasureTheory ProbabilityTheory
namespace ControlledWorldModels
theorem counterfactual_error_amplification {d m : ℕ} (A : Matrix (Fin d) (Fin d) ℝ) (B : Matrix (Fin d) (Fin m) ℝ)
(μ : Measure ((Fin d → ℝ) × (Fin m → ℝ))) (ν : Measure (Fin d → ℝ))
(hpol : IsJointGaussianPolicy μ) (htr : IsStationaryTransition A B μ ν)
(Fc : Set ((Fin d → ℝ) → (Fin m → ℝ) → Fin d → ℝ)) (hFc : IsRichPredictorClass A B μ ν Fc)
(hrep : 0 < repMargin A B μ) (hexc : 0 < transMargin μ)
(Q : Matrix.orthogonalGroup (Fin d) ℝ)
(hcls : ∀ D : Matrix (Fin d) (Fin m) ℝ,
(fun y a => trueMean A B (Q : Matrix (Fin d) (Fin d) ℝ) y a +
D.mulVec (a - condMeanAct μ ((Q : Matrix (Fin d) (Fin d) ℝ).transpose.mulVec y))) ∈ Fc)
(δ : ℝ) (hδ : 0 < δ) :
∃ F ∈ Fc, Continuous (Function.uncurry F) ∧
onPolicyExcess A B μ ν (Q : Matrix (Fin d) (Fin d) ℝ) F = ENNReal.ofReal δ ∧
cfError A B μ (Q : Matrix (Fin d) (Fin d) ℝ) F = ENNReal.ofReal (δ / transMargin μ) := by sorry
end ControlledWorldModelsRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix natural numbers and real matrices and . Let be a measure on , with generic point (state, action), and let be a measure on , with generic point (noise). A sample is drawn from the product measure , so and are independent. The next state is
Throughout, , and is the product of standard real Gaussians.
Hypotheses. The theorem assumes all of the following:
-
Policy law. is a Gaussian measure in Mathlib's sense, so it is a probability measure all of whose one-dimensional linear projections are real Gaussian, possibly degenerate. Its mean is , and its first marginal (the law of ) is exactly . The action may depend on , and its covariance may be singular.
-
Transition. is Gaussian with mean , and the pushforward of under equals .
-
Predictor class. is a set of functions satisfying two conditions:
- every is jointly measurable;
- for every admissible encoder (measurable, with ), some satisfies, -almost surely,
The conditional expectation is the measure-theoretic one under . By convention it is the zero function if is not integrable.
- Representation margin. Let , with entries
These integrals are Bochner integrals, which are set to when the integrand is not integrable. The hypothesis is
Here and are defined as the supremum and infimum of the Rayleigh quotient over unit vectors . When the unit sphere is empty and both values are by convention, so this hypothesis cannot hold. The theorem is therefore vacuous for .
- Transition margin. Let have entries
where the conditional expectations are taken given under . Define , again as the infimum of the Rayleigh quotient over unit vectors of . The hypothesis is . When this infimum is by convention, so the theorem is also vacuous for .
-
Rotation. is a real orthogonal matrix, meaning .
-
Closure of the class. Let have entries , and let
For every matrix , the function
belongs to .
- Excess level. is a real number with .
Conclusion. Under these hypotheses, there exists such that:
-
(i) Continuity. is jointly continuous.
-
(ii) On-policy excess equals . With as above under ,
Both expectations are computed in . The symbol is truncated subtraction in : the result is whenever the first term does not exceed the second, including the case where both are .
- (iii) Counterfactual error equals . Let and be independent, and set . Then
with the expectation computed in .
The statement asserts existence for the single given . It says nothing about which element of attains these values, beyond continuity and membership in .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.