Lemma C.1: the dot product of two independent uniform unit vectors is Beta distributed
ProvedContrastiveDuality.sphere_inner_betaLet , and let be independent random vectors on a probability space, each uniformly distributed on the unit sphere . Then
Formalization Note The conclusion is stated as equality of the law of with Mathlib's Beta distribution. The paper states the lemma for every ; the hypothesis is added because for the shape parameters are , no Beta distribution exists, and with probability each. and are assumed measurable.
import Mathlib import Definitions.Def_ContrastiveDuality_Basic open MeasureTheory ProbabilityTheory Matrix
namespace ContrastiveDuality
theorem sphere_inner_beta {D : ℕ} (hD : 2 ≤ D) {Ω : Type*} [MeasurableSpace Ω]
(P : Measure Ω) [IsProbabilityMeasure P] (X Y : Ω → EuclideanSpace ℝ (Fin D))
(hX : Measurable X) (hY : Measurable Y)
(hXlaw : P.map X = uniformSphere D) (hYlaw : P.map Y = uniformSphere D)
(hXY : IndepFun X Y P) :
P.map (fun ω => (inner ℝ (X ω) (Y ω) + 1) / 2) =
betaMeasure (((D : ℝ) - 1) / 2) (((D : ℝ) - 1) / 2) := by sorry
end ContrastiveDualityRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix a natural number with . The theorem works with:
- an arbitrary measurable space and a probability measure on it;
- two measurable maps , where is Euclidean space with the standard inner product and its Borel -algebra.
The measure . Here denotes the measure on built as follows:
- Take the surface measure on the unit sphere that Mathlib derives from Lebesgue measure on . It assigns to a set the mass , the cone-volume construction.
- Push it forward into along the inclusion . Call the result .
- Multiply by the reciprocal of its total mass:
For the total mass is finite and positive. So is a probability measure on concentrated on .
Hypotheses.
- The law of under is exactly , that is, .
- The law of under is exactly , that is, .
- and are independent under , with respect to the Borel -algebra on .
Conclusion. The law under of the real random variable
equals the Beta distribution with both parameters . Here is read as a real number, so for the parameters are .
This is an equality of measures on : for every Borel set ,
where the density is
and is the Euler Beta function.
In particular, the case gives the arcsine law , and gives the uniform law on . Measurability of the composite map is not stated as a separate hypothesis. The conclusion is asserted for every ; the case is excluded by hypothesis.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.