Proposition 4 (as proved): continuous minimizers of the cross-entropy are isometries,
ProvedContrastiveInverts.body_ce_minimizers_are_isometriesLet and be convex bodies in , and . Let be a metric induced by a norm, or a semi-metric of such a metric. Let and , where .
Let be a class of measurable maps that is flexible enough to match: some has for all . Let be continuous on and minimise the cross-entropy over at every anchor . Then
Formalization Note The printed proposition does not assume continuity, and without it the statement is false. Take , , , and , and let for and . Then almost everywhere for every anchor , so minimises every conditional cross-entropy, yet . The proof's claim that is continuous needs continuous, which the paper's Theorems 4–6 supply through differentiability of and . The displayed conditional in the printed proposition reads , but the printed conclusion and Appendix A.2.1 use , which is the form stated here.
import Mathlib import Definitions.Def_ContrastiveInverts_Basic open MeasureTheory Filter Topology
namespace ContrastiveInverts
theorem body_ce_minimizers_are_isometries {N : ℕ} (Z Z' : Set (Vec N))
(hZ : IsConvexBody Z) (hZ' : IsConvexBody Z') (lam τ : ℝ) (hlam : 0 < lam) (hτ : 0 < τ)
(δ : Vec N → Vec N → ℝ) (hδ : IsNormSemimetric δ) (H : Set (Vec N → Vec N))
(hH : ∀ h' ∈ H, (∀ z ∈ Z, h' z ∈ Z') ∧ AEMeasurable h' (volume.restrict Z))
(hflex : ∃ h₀ ∈ H, ∀ z ∈ Z, ∀ z' ∈ Z, bodyModelCond τ δ Z h₀ z z' = expCond lam δ Z z z')
(h : Vec N → Vec N) (hh : h ∈ H) (hcont : ContinuousOn h Z)
(hmin : ∀ z ∈ Z, ∀ h' ∈ H,
bodyCondCrossEntropy lam δ τ δ Z h z ≤ bodyCondCrossEntropy lam δ τ δ Z h' z) :
∀ z ∈ Z, ∀ z' ∈ Z, lam * τ * δ z z' = δ (h z) (h z') := by sorry
end ContrastiveInvertsRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
For a natural number , work in with its Euclidean structure and Lebesgue measure, written . is allowed; is a single point, and the singleton counts as a convex body there. The statement takes the following data.
- Convex bodies . Each is convex, compact and has nonempty interior. appears only in the assumption on below.
- Real numbers and .
- A function for which there exist a norm and a function with
- satisfies: , , and . It need not be the Euclidean norm.
- maps bijectively onto , is continuous on , and has .
- A set of functions . Every maps into and is almost-everywhere measurable with respect to Lebesgue measure restricted to .
Several quantities are defined for and a function . Here denotes the Lebesgue integral over , which is taken to be when the integrand is not integrable. A division by yields .
- Ground-truth normalizer:
- Ground-truth conditional:
- Model normalizer:
- Model conditional:
- Anchor-wise cross-entropy:
Here and for .
Note that the same is used both in the ground-truth conditional (scaled by ) and in the model conditional (divided by ).
The theorem makes three further assumptions.
- Realizability. There exists such that
- Regularity of . The function is continuous on .
- Minimality of . For every anchor and every ,
So minimizes the cross-entropy simultaneously at each fixed anchor. This is not a statement about the averaged cross-entropy.
No integrability of any of the integrands is assumed.
The theorem concludes that for all ,
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.