Stat.CLT
Central limit theory: iid and triangular-array CLTs, Lindeberg conditions, and vector-valued versions used by the estimation layer.
AsymptoticLinearity 6 core · 3 supporting This file provides the scalar asymptotic-linearity interface used by the estimation and inference layers. ★ IsAsymLinear★ clt_normalized_sum★ tendsto_normal
Scalar Asymptotic Linearity
This file provides the scalar asymptotic-linearity interface used by the
estimation and inference layers. gaussianMeasure is the project's real-valued
Gaussian wrapper, and IsAsymLinear records a mean-zero influence function,
finite second moment, and an o_p(1) linearization remainder along a chosen
finite index family.
The namespace also exposes IsAsymLinear.normalizedSum and
IsAsymLinear.rescaledEstimator. The main limit results are
IIDSample.clt_normalized_sum, the CLT contact point for normalized i.i.d.
sums, Modes.TendstoInLaw.add_isLittleOp_one and related Slutsky/congruence
wrappers, and IsAsymLinear.tendsto_normal, which turns full-sample scalar
asymptotic linearity into asymptotic normality.
For a real-valued mean and a real-valued variance input, the Gaussian probability measure on the real line has the specified mean and variance ; thus a negative variance input is replaced by zero and yields a point mass at the mean.
Definition (Lean source)
An estimator is asymptotically linear when its scaled estimation error equals the normalized empirical average of an influence function that is mean zero and square-integrable under the population law, up to a term that is negligible in probability.
Definition (Lean source)
For a measurable sample space carrying a measure, a measurable observation space carrying a population measure, an independent and identically distributed sample from that population, a real-valued influence function, a finite index set selected for every nonnegative integer, and a nonnegative integer index, the normalized partial sum maps each sample-space outcome to .
For a sample space, a sequence of real-valued estimators on that space, a real-valued target parameter, a finite index set selected for every nonnegative integer, and a nonnegative integer index, the rescaled estimator maps each sample-space outcome to at that outcome.
Central limit theorem for normalised sample sums. Along the i.i.d. sample S, if the transform ψ of the observations is measurable, has population mean zero, and is square-integrable, then the normalised partial sum — the sum of the transformed observations over the first n indices, divided by — converges in distribution to the centred normal law with variance equal to the population second moment .
Formal statement
Proof (Lean source)
Given that θn is asymptotically linear at θ₀ with influence function ψ along the i.i.d. sample S, where ψ is measurable and the rescaled estimator is a.e. measurable at every sample size, then the rescaled estimator converges in distribution to the centred normal law with variance .
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
instIsProbabilityMeasureGaussianMeasureinstance — For every real-valued mean and real-valued variance input, the Gaussian measure on the real line is a probability measure. -
normalizedSum_deflemma — The normalised partial sum at sample size index n sends a unit to the sum of the influence-function values over the index block, rescaled by the reciprocal square root of the block size. -
const_mul_tendsto_gaussiantheorem — If a real sequence converges in distribution to a centered Gaussian law and deterministic scalar multipliers converge to a constant, then the scaled sequence converges to the centered Gaussian law with variance multiplied by the square of that constant.hypothesesΩ :Xn :ℕ → Ω → ℝa :ℕ → ℝa₀ v :ℝhX :Modes.TendstoInLaw (fun _ : ℕ => μ) Xn atTop (gaussianMeasure 0 v)conclusionModes.TendstoInLaw (fun _ : ℕ => μ) (fun n ω => a n * Xn n ω) atTop (gaussianMeasure 0 (a₀ ^ 2 * v))Proof (Lean source)
theorem Modes.TendstoInLaw.const_mul_tendsto_gaussian {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Xn : ℕ → Ω → ℝ} {a : ℕ → ℝ} {a₀ v : ℝ} (hX : Modes.TendstoInLaw (fun _ : ℕ => μ) Xn atTop (gaussianMeasure 0 v)) (ha : Tendsto a atTop (𝓝 a₀)) : Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n ω => a n * Xn n ω) atTop (gaussianMeasure 0 (a₀ ^ 2 * v)) := by have hXn : ∀ n, AEMeasurable (Xn n) μ := hX.forall_aemeasurable have hScaled : ∀ n, AEMeasurable (fun ω => a n * Xn n ω) μ := fun n => (measurable_const.mul measurable_id).aemeasurable.comp_aemeasurable (hXn n) letI : IsProbabilityMeasure ((gaussianMeasure 0 v).map (fun x : ℝ => a₀ * x)) := Measure.isProbabilityMeasure_map (by fun_prop) have hscaled_dist : Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n ω => a n * Xn n ω) atTop ((gaussianMeasure 0 v).map (fun x : ℝ => a₀ * x)) := (Tendsto_dist_iff _ _ _ hScaled).2 (Modes.TendstoInLaw.const_mul_tendsto hX ha) have hmap : (gaussianMeasure 0 v).map (fun x : ℝ => a₀ * x) = gaussianMeasure 0 (a₀ ^ 2 * v) := by simp [gaussianMeasure, gaussianReal_map_const_mul, mul_zero, Real.toNNReal_mul (sq_nonneg a₀), Real.toNNReal_of_nonneg (sq_nonneg a₀)] simpa [hmap] using hscaled_dist
AsymptoticLinearityVec 4 core · 3 supporting This file extends scalar asymptotic linearity to finite-dimensional vector-valued estimators. ★ IsAsymLinearVec★ tendsto_dist_vec_of_normalizedSum
Vector Asymptotic Linearity
This file extends scalar asymptotic linearity to finite-dimensional
vector-valued estimators. IsAsymLinearVec records the vector influence
function, finite second moment, and vector o_p(1) remainder along a finite
index family, with IsAsymLinearVec.normalizedSum and
IsAsymLinearVec.rescaledEstimator giving the associated partial sum and scaled
estimator.
The scalar bridge theorems IsAsymLinearVec.toScalar and IsAsymLinear.toVec
identify the E = ℝ specialization with the scalar predicate. The headline
result IsAsymLinearVec.tendsto_dist_vec_of_normalizedSum absorbs the vector remainder into a
caller-supplied multivariate CLT contact.
A vector-valued estimator sequence is asymptotically linear at a target value when its scaled estimation error equals the normalized empirical average of an influence function that has Bochner mean zero and finite second moment under the population law, up to a remainder that is negligible in probability, along a chosen family of finite index sets selecting which observations enter each empirical average.
Definition (Lean source)
The influence function has Bochner mean zero under P.
The vector remainder has norm o_p(1) under μ.
For a measurable sample space carrying a measure, a measurable observation space carrying a population measure, a normed real vector space, an independent and identically distributed sample from that population, a vector-valued influence function, a finite index set selected for every nonnegative integer, and a nonnegative integer index, the vector normalized partial sum maps each sample-space outcome to in that vector space.
For a sample space, a normed real vector space, a sequence of vector-valued estimators on that space, a target vector, a finite index set selected for every nonnegative integer, and a nonnegative integer index, the rescaled estimator maps each sample-space outcome to in that vector space.
Vector Slutsky absorption given a caller-supplied CLT. For a vector-valued estimator sequence θn targeting θ₀ with influence function ψ along the i.i.d. sample S, suppose the remainder between the rescaled estimator and the normalised partial sum is asymptotically negligible (little-o of 1 in norm), the rescaled estimator is a.e. measurable at every sample size, the normalised partial sum is a.e. measurable at every sample size, and the pushforward laws of the normalised partial sum converge to a target probability measure Q on E. Then the pushforward laws of the rescaled estimator likewise converge to Q.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
normalizedSum_deflemma — The vector normalised partial sum at sample size index n sends a unit to the sum of the influence-function values over the index block, rescaled by the reciprocal square root of the block size. -
toScalartheorem — When the parameter space is ℝ, the vector predicate IsAsymLinearVec unfolds to the scalar IsAsymLinear. The forward direction is a direct field-by-field rewrite using ‖x‖ = |x| on ℝ and scalar • = *.hypothesesΩ :sharedType u_1X :sharedType u_2θn :ℕ → Ω → ℝθ₀ :ℝψ :X → ℝS :IIDSample Ω X μ PI :ℕ → Finset ℕh :IsAsymLinearVec θn θ₀ ψ S IconclusionIsAsymLinear θn θ₀ ψ S IProof (Lean source)
theorem IsAsymLinearVec.toScalar {θn : ℕ → Ω → ℝ} {θ₀ : ℝ} {ψ : X → ℝ} {S : IIDSample Ω X μ P} {I : ℕ → Finset ℕ} (h : IsAsymLinearVec θn θ₀ ψ S I) : IsAsymLinear θn θ₀ ψ S I := by refine ⟨h.mean_zero, ?_, ?_⟩ · simpa [Real.norm_eq_abs, sq_abs] using h.finite_var · intro ε hε have hrem := h.remainder ε hε refine hrem.congr fun n => ?_ congr 1 ext ω simp [Real.norm_eq_abs, smul_eq_mul, abs_abs] -
toVectheorem — Conversely, scalar asymptotic linearity lifts to the vector predicate.hypothesesΩ :sharedType u_1X :sharedType u_2θn :ℕ → Ω → ℝθ₀ :ℝψ :X → ℝS :IIDSample Ω X μ PI :ℕ → Finset ℕh :IsAsymLinear θn θ₀ ψ S IconclusionIsAsymLinearVec θn θ₀ ψ S IProof (Lean source)
theorem IsAsymLinear.toVec {θn : ℕ → Ω → ℝ} {θ₀ : ℝ} {ψ : X → ℝ} {S : IIDSample Ω X μ P} {I : ℕ → Finset ℕ} (h : IsAsymLinear θn θ₀ ψ S I) : IsAsymLinearVec θn θ₀ ψ S I := by refine ⟨h.mean_zero, ?_, ?_⟩ · simpa [Real.norm_eq_abs, sq_abs] using h.finite_var · intro ε hε have hrem := h.remainder ε hε refine hrem.congr fun n => ?_ congr 1 ext ω simp [Real.norm_eq_abs, smul_eq_mul, abs_abs]
ChiSquared 2 core · 4 supporting This file defines the chi-squared distribution with $d$ degrees of freedom as the law of the squared norm of a standard $d$-dimensional Gaussian vector. ★ stdGaussian_map_normSq
Chi-Squared Distribution
This file defines the chi-squared distribution with degrees of freedom as the law of the squared norm of a standard -dimensional Gaussian vector. It establishes invariance and no-atom facts needed for Wald limit distributions.
The main declarations are chiSqDist, the probability-measure instance for
that law, stdGaussian_map_linearIsometryEquiv, the dimension-only identity
stdGaussian_map_normSq, and the no-atom theorems noAtoms_pi_normSq and
noAtoms_chiSqDist.
For a nonnegative integer number of degrees of freedom, the chi-squared distribution is the probability law on the real line of the squared Euclidean norm of a standard Gaussian vector with that many coordinates.
Definition (Lean source)
The law of the squared norm under the standard Gaussian distribution on a finite-dimensional real inner product space equals the chi-squared distribution whose degrees of freedom is the space's dimension.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
instIsProbabilityMeasureRealChiSqDistinstance — For every nonnegative integer number of degrees of freedom, the chi-squared distribution with that number of degrees of freedom is a probability law.parametersd :ℕinstancegiven byby unfold chiSqDist exact Measure.isProbabilityMeasure_map (by fun_prop) -
stdGaussian_map_linearIsometryEquivtheorem — stdGaussian is invariant under linear isometry equivalences. Pushing the standard Gaussian forward along an inner-product isometry yields the standard Gaussian on the target. Proved by matching characteristic functions: both sides are centered Gaussians whose covariance form is the inner product (preserved by the isometry).hypothesesE :sharedType u_1F :ι :E ≃ₗᵢ[ℝ] FconclusionProof (Lean source)
theorem stdGaussian_map_linearIsometryEquiv {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] [FiniteDimensional ℝ F] [MeasurableSpace F] [BorelSpace F] (ι : E ≃ₗᵢ[ℝ] F) : (stdGaussian E).map ι = stdGaussian F := by set L : E →L[ℝ] F := (ι : E →L[ℝ] F) with hL have hmapL : (stdGaussian E).map ι = (stdGaussian E).map L := rfl haveI : IsGaussian ((stdGaussian E).map L) := by rw [← hmapL]; exact isGaussian_map_equiv ι.toContinuousLinearEquiv -- mean of the pushforward is `0` have hmean_map : ∫ x, x ∂((stdGaussian E).map L) = 0 := by have hstep : ∫ x, x ∂((stdGaussian E).map L) = L (∫ x, x ∂(stdGaussian E)) := by rw [integral_map (by fun_prop) (by fun_prop)] exact ContinuousLinearMap.integral_comp_comm L IsGaussian.integrable_id rw [hstep, show ∫ x, x ∂(stdGaussian E) = 0 from integral_id_stdGaussian, map_zero] refine Measure.ext_of_charFun ?_ funext t have hmemLp : MemLp id 2 (stdGaussian E) := IsGaussian.memLp_two_id have hcoveq : covarianceBilin ((stdGaussian E).map L) t t = covarianceBilin (stdGaussian F) t t := by rw [covarianceBilin_map hmemLp, ι.adjoint_eq_symm] simp only [stdGaussian, ProbabilityTheory.covarianceBilin_stdGaussian] exact ι.symm.inner_map_map t t rw [hmapL, charFun_isGaussian_centered _ hmean_map t, charFun_isGaussian_centered _ (show ∫ x, x ∂(stdGaussian F) = 0 from integral_id_stdGaussian) t, hcoveq] -
noAtoms_pi_normSqtheorem — The law of the sum of n ≥ 1 squared independent standard normals has no atoms. The squared first coordinate already has an atomless law (its preimage under squaring is finite, and gaussianReal is atomless), and adding the independent remainder preserves atomlessness via Fubini.hypothesesn :ℕhn :1 ≤ nconclusionProof (Lean source)
theorem noAtoms_pi_normSq {n : ℕ} (hn : 1 ≤ n) : NullSingletonClass ((Measure.pi (fun _ : Fin n => gaussianReal 0 1)).map (fun w => ∑ i, (w i) ^ 2)) := by classical haveI hG : NullSingletonClass (gaussianReal 0 1) := nullSingletonClass_gaussianReal (by norm_num) refine ⟨fun c => ?_⟩ rw [Measure.map_apply (by fun_prop) (measurableSet_singleton c)] obtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (by omega : n ≠ 0) -- Split off coordinate `0` via the measure-preserving equiv. have hmp := measurePreserving_piFinSuccAbove (fun _ : Fin (m + 1) => gaussianReal 0 1) 0 -- The squared-norm level set is the preimage of a product level set. have hset : (fun w : Fin (m + 1) → ℝ => ∑ i, w i ^ 2) ⁻¹' {c} = (piFinSuccAbove (fun _ : Fin (m + 1) => ℝ) 0) ⁻¹' {p : ℝ × (Fin m → ℝ) | p.1 ^ 2 + ∑ j, (p.2 j) ^ 2 = c} := by ext w simp only [Set.mem_preimage, Set.mem_singleton_iff, Set.mem_setOf_eq, MeasurableEquiv.piFinSuccAbove_apply] rw [Fin.sum_univ_succAbove (fun i => w i ^ 2) 0] rfl rw [hset, hmp.measure_preimage_equiv] -- Integrate the atomless first coordinate; the inner fibre is finite. have hms : MeasurableSet {p : ℝ × (Fin m → ℝ) | p.1 ^ 2 + ∑ j, (p.2 j) ^ 2 = c} := by apply measurableSet_eq_fun <;> fun_prop rw [Measure.prod_apply_symm hms] -- Each fibre `{a | a^2 + s = c}` is finite, hence null under the atomless Gaussian. have hfib : ∀ y : Fin m → ℝ, (gaussianReal 0 1) ((fun a : ℝ => (a, y)) ⁻¹' {p : ℝ × (Fin m → ℝ) | p.1 ^ 2 + ∑ j, (p.2 j) ^ 2 = c}) = 0 := by intro y have hfin : {a : ℝ | a ^ 2 + ∑ j, (y j) ^ 2 = c}.Finite := by apply Set.Finite.subset ((Set.finite_singleton (-sqrt (c - ∑ j, (y j) ^ 2))).insert (sqrt (c - ∑ j, (y j) ^ 2))) intro a ha simp only [Set.mem_setOf_eq] at ha have hsq : a ^ 2 = c - ∑ j, (y j) ^ 2 := by linarith have hnn : 0 ≤ c - ∑ j, (y j) ^ 2 := by rw [← hsq]; positivity have : a = sqrt (c - ∑ j, (y j) ^ 2) ∨ a = -sqrt (c - ∑ j, (y j) ^ 2) := by rcases le_or_gt 0 a with h | h · left rw [← hsq, Real.sqrt_sq h] · right rw [← hsq, Real.sqrt_sq_eq_abs, abs_of_neg h, neg_neg] simpa [Set.mem_insert_iff] using this have hset_eq : (fun a : ℝ => (a, y)) ⁻¹' {p : ℝ × (Fin m → ℝ) | p.1 ^ 2 + ∑ j, (p.2 j) ^ 2 = c} = {a : ℝ | a ^ 2 + ∑ j, (y j) ^ 2 = c} := by ext a; simp rw [hset_eq] exact hfin.measure_zero _ simp_rw [hfib, lintegral_zero] -
noAtoms_chiSqDisttheorem — χ²_d has no atoms for d ≥ 1.Proof (Lean source)
theorem noAtoms_chiSqDist {d : ℕ} (hd : 1 ≤ d) : NullSingletonClass (chiSqDist d) := by rw [chiSqDist, stdGaussian_map_normSq_eq_pi] exact noAtoms_pi_normSq (by rwa [finrank_euclideanSpace_fin])
GaussianLimit 2 core · 4 supporting This file constructs the concrete centered Gaussian law that appears in the multivariate central limit theorem for vector-valued influence functions. ★ gaussianLimit★ clt_normalizedSum_vec
Gaussian Limit Law
This file constructs the concrete centered Gaussian law that appears in the multivariate central limit theorem for vector-valued influence functions. The covariance is the second-moment operator of the influence function, so the abstract characteristic-function target from the Cramér-Wold argument becomes an explicit probability law.
The construction is gaussianLimit, with instances showing it is Gaussian and
probabilistic. Theorems gaussianLimit_mean,
gaussianLimit_covarianceBilin, and gaussianLimit_charFun identify its mean,
covariance, and characteristic function. The final theorem
IIDSample.clt_normalizedSum_vec gives the multivariate CLT against this
concrete Gaussian limit.
Given a measurable observation space, a measure on that space, a finite-dimensional real inner-product outcome space equipped with its Borel σ-algebra, a measurable vector-valued function of an observation, and a finite integral of the squared norm of that function under the measure, the Gaussian limit law is the centered Gaussian measure on the outcome space whose covariance operator is the function's second-moment operator under the given measure.
Definition (Lean source)
Multivariate CLT against the concrete Gaussian limit. Along the i.i.d. sample S, with ψ measurable and square-integrable, if ψ has population mean zero, , then the vector normalised sum converges in distribution to gaussianLimit ψ, the centered Gaussian on E with covariance equal to the second-moment operator of ψ; no abstract target or characteristic-function hypothesis remains.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
instIsGaussianGaussianLimitinstance — Given a measurable observation space, a measure on that space, a finite-dimensional real inner-product outcome space equipped with its Borel σ-algebra, a measurable vector-valued function of an observation, and a finite integral of the squared norm of that function under the measure, the Gaussian limit law is Gaussian. -
gaussianLimit_meantheorem — The limiting Gaussian is centered.Proof (Lean source)
theorem gaussianLimit_mean : ∫ x, x ∂(gaussianLimit hψ hvar) = 0 := by have hL : ∫ x, x ∂(gaussianLimit hψ hvar) = (secondMomentLM_isPositive hψ hvar).posSqrtCLM (∫ x, x ∂(stdGaussian E)) := by rw [gaussianLimit, integral_map (by fun_prop) (by fun_prop)] exact ContinuousLinearMap.integral_comp_comm _ IsGaussian.integrable_id rw [hL, show ∫ x, x ∂(stdGaussian E) = 0 from integral_id_stdGaussian, map_zero] -
gaussianLimit_covarianceBilintheorem — The covariance form of the limiting Gaussian recovers the asymptotic-variance integral ∫⟪s,ψ⟫⟪t,ψ⟫ dP.hypothesesE :sharedType u_3X → Es t :EconclusioncovarianceBilin (gaussianLimit hψ hvar) s t = ∫ x, ⟪s, ψ x⟫ * ⟪t, ψ x⟫ ∂PProof (Lean source)
theorem gaussianLimit_covarianceBilin (s t : E) : covarianceBilin (gaussianLimit hψ hvar) s t = ∫ x, ⟪s, ψ x⟫ * ⟪t, ψ x⟫ ∂P := by set hpos := secondMomentLM_isPositive hψ hvar with hposdef -- `√Σ ∘ √Σ = Σ` at the point `t` have hcomp : hpos.posSqrtCLM (hpos.posSqrtCLM t) = secondMomentLM hψ hvar t := by have h := hpos.posSqrtCLM_comp_self calc hpos.posSqrtCLM (hpos.posSqrtCLM t) = (hpos.posSqrtCLM ∘L hpos.posSqrtCLM) t := rfl _ = ((secondMomentLM hψ hvar).toContinuousLinearMap) t := by rw [h] _ = secondMomentLM hψ hvar t := rfl -- self-adjointness turns `⟪√Σ s, √Σ t⟫` into `⟪s, Σ t⟫` have hsa : (⟪hpos.posSqrtCLM s, hpos.posSqrtCLM t⟫ : ℝ) = ⟪s, secondMomentLM hψ hvar t⟫ := by rw [(ContinuousLinearMap.adjoint_inner_right hpos.posSqrtCLM s (hpos.posSqrtCLM t)).symm, hpos.posSqrtCLM_adjoint, hcomp] rw [gaussianLimit, covarianceBilin_map IsGaussian.memLp_two_id hpos.posSqrtCLM, hpos.posSqrtCLM_adjoint, show covarianceBilin (stdGaussian E) = innerSL ℝ from ProbabilityTheory.covarianceBilin_stdGaussian, innerSL_apply_apply, hsa, show (⟪s, secondMomentLM hψ hvar t⟫ : ℝ) = ⟪secondMomentLM hψ hvar t, s⟫ from real_inner_comm _ _, secondMomentLM_inner hψ hvar t s] exact integral_congr_ae (ae_of_all _ fun x => mul_comm _ _) -
gaussianLimit_charFuntheorem — The characteristic function of the limiting Gaussian is exactly the abstract target exp(−½ ∫⟪t,ψ⟫² dP) of MultivariateCLT.hypothesesE :sharedType u_3X → Et :EconclusioncharFun (gaussianLimit hψ hvar) t= exp (-(((∫ x, (⟪t, ψ x⟫) ^ 2 ∂P : ℝ)) : ℂ) / 2)Proof (Lean source)
theorem gaussianLimit_charFun (t : E) : charFun (gaussianLimit hψ hvar) t = exp (-(((∫ x, (⟪t, ψ x⟫) ^ 2 ∂P : ℝ)) : ℂ) / 2) := by refine charFun_isGaussian_of_cov_eq (ψ := ψ) (gaussianLimit hψ hvar) (gaussianLimit_mean hψ hvar) (fun s => ?_) t rw [gaussianLimit_covarianceBilin] exact integral_congr_ae (ae_of_all _ fun x => (pow_two (⟪s, ψ x⟫)).symm)
HadamardDeriv 5 core · 19 supporting This file defines Hadamard directional differentiability for maps between normed spaces and connects it to ordinary differentiability. ★ HasHadamardDirDerivAt★ hasHadamardDirDerivAt
Hadamard Directional Derivatives
This file defines Hadamard directional differentiability for maps between normed spaces and connects it to ordinary differentiability. It also develops the directional derivatives of maximum and minimum functionals that support delta-method arguments for nonsmooth statistical targets.
The central definition is HasHadamardDirDerivAt. The theorem
HasFDerivAt.hasHadamardDirDerivAt shows that ordinary Fréchet
differentiability implies Hadamard directional differentiability with the same
linear derivative. The declarations maxDirDeriv, minDirDeriv,
continuous_maxDirDeriv, continuous_minDirDeriv,
hasHadamardDirDerivAt_max, and hasHadamardDirDerivAt_min give the lattice
derivatives used by the functional delta-method file.
Given normed real vector spaces, a map between them, a proposed directional derivative, and a point, the Hadamard directional differentiability property at that point holds exactly when, for every direction, every sequence of directions converging to it, and every strictly positive real step-size sequence converging to zero,
Definition (Lean source)
Fréchet implies Hadamard. If the map φ is Fréchet-differentiable at the point θ, with continuous linear derivative L, then φ is Hadamard directionally differentiable at θ, with the same map L serving as its Hadamard directional derivative.
Formal statement
Proof (Lean source)
Given a first real coordinate and a second real coordinate, the directional derivative of the maximum functional at their pair sends a direction to when , to when , and to when .
Definition (Lean source)
Given a first real coordinate and a second real coordinate, the directional derivative of the minimum functional at their pair sends a direction to when , to when , and to when .
Definition (Lean source)
Given normed real vector spaces, a map between them and a point, the continuous Hadamard directional differentiability property at that point holds exactly when there exists a continuous directional derivative at that point and that derivative satisfies Hadamard directional differentiability.
Definition (Lean source)
19 supporting declarations (lemmas, instances)
-
continuous_maxDirDerivtheorem — The directional derivative of the maximum functional is continuous.Proof (Lean source)
@[fun_prop] theorem continuous_maxDirDeriv (a b : ℝ) : Continuous (maxDirDeriv a b) := by unfold maxDirDeriv split_ifs · exact continuous_fst · exact continuous_snd · exact continuous_fst.max continuous_snd -
continuous_minDirDerivtheorem — The directional derivative of the minimum functional is continuous.Proof (Lean source)
@[fun_prop] theorem continuous_minDirDeriv (a b : ℝ) : Continuous (minDirDeriv a b) := by unfold minDirDeriv split_ifs · exact continuous_fst · exact continuous_snd · exact continuous_fst.min continuous_snd -
hasHadamardDirDerivAt_maxtheorem — max is Hadamard directionally differentiable. At (a, b) the derivative is maxDirDeriv a b (linear off the diagonal, sublinear at a tie).hypothesesa b :ℝconclusionProof (Lean source)
theorem hasHadamardDirDerivAt_max (a b : ℝ) : HasHadamardDirDerivAt (fun z : ℝ × ℝ => max z.1 z.2) (maxDirDeriv a b) (a, b) := by intro h hn tn hhn htn htn_pos have hh1 : Tendsto (fun n => (hn n).1) atTop (𝓝 h.1) := (continuous_fst.tendsto h).comp hhn have hh2 : Tendsto (fun n => (hn n).2) atTop (𝓝 h.2) := (continuous_snd.tendsto h).comp hhn unfold maxDirDeriv split_ifs with hba hab · -- b < a : the first coordinate eventually dominates, derivative = h.1 have hmax_ab : max a b = a := max_eq_left (le_of_lt hba) have hg : Tendsto (fun n => (a + tn n * (hn n).1) - (b + tn n * (hn n).2)) atTop (𝓝 (a - b)) := by have h0 : Tendsto (fun n => tn n * ((hn n).1 - (hn n).2)) atTop (𝓝 0) := by simpa using htn.mul (hh1.sub hh2) have hsum := (tendsto_const_nhds (x := a - b)).add h0 simp only [add_zero] at hsum refine hsum.congr ?_ intro n; ring have hev : ∀ᶠ n in atTop, b + tn n * (hn n).2 ≤ a + tn n * (hn n).1 := by filter_upwards [hg.eventually (eventually_gt_nhds (show (0:ℝ) < a - b by linarith))] with n hn_ev linarith refine hh1.congr' ?_ filter_upwards [hev] with n hge have htn_ne : tn n ≠ 0 := (htn_pos n).ne' simp only [Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, smul_eq_mul] rw [max_eq_left hge, hmax_ab, show a + tn n * (hn n).1 - a = tn n * (hn n).1 by ring, ← mul_assoc, inv_mul_cancel₀ htn_ne, one_mul] · -- a < b : the second coordinate eventually dominates, derivative = h.2 have hmax_ab : max a b = b := max_eq_right (le_of_lt hab) have hg : Tendsto (fun n => (b + tn n * (hn n).2) - (a + tn n * (hn n).1)) atTop (𝓝 (b - a)) := by have h0 : Tendsto (fun n => tn n * ((hn n).2 - (hn n).1)) atTop (𝓝 0) := by simpa using htn.mul (hh2.sub hh1) have hsum := (tendsto_const_nhds (x := b - a)).add h0 simp only [add_zero] at hsum refine hsum.congr ?_ intro n; ring have hev : ∀ᶠ n in atTop, a + tn n * (hn n).1 ≤ b + tn n * (hn n).2 := by filter_upwards [hg.eventually (eventually_gt_nhds (show (0:ℝ) < b - a by linarith))] with n hn_ev linarith refine hh2.congr' ?_ filter_upwards [hev] with n hle have htn_ne : tn n ≠ 0 := (htn_pos n).ne' simp only [Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, smul_eq_mul] rw [max_eq_right hle, hmax_ab, show b + tn n * (hn n).2 - b = tn n * (hn n).2 by ring, ← mul_assoc, inv_mul_cancel₀ htn_ne, one_mul] · -- a = b : the tie case collapses to `max (hₙ.1) (hₙ.2) → max h.1 h.2` have hab_eq : a = b := le_antisymm (not_lt.1 hba) (not_lt.1 hab) have key : ∀ n, (tn n)⁻¹ • ((fun z : ℝ × ℝ => max z.1 z.2) ((a, b) + tn n • hn n) - max a b) = max (hn n).1 (hn n).2 := by intro n have htn_ne : tn n ≠ 0 := (htn_pos n).ne' have hpos := htn_pos n simp only [Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, smul_eq_mul, hab_eq] have e1 : max (b + tn n * (hn n).1) (b + tn n * (hn n).2) = b + tn n * max (hn n).1 (hn n).2 := by rcases le_total (hn n).1 (hn n).2 with hle | hle · rw [max_eq_right hle, max_eq_right (by nlinarith [hpos])] · rw [max_eq_left hle, max_eq_left (by nlinarith [hpos])] rw [e1, max_self, show b + tn n * max (hn n).1 (hn n).2 - b = tn n * max (hn n).1 (hn n).2 by ring, ← mul_assoc, inv_mul_cancel₀ htn_ne, one_mul] simp only [key] exact hh1.max hh2 -
hasHadamardDirDerivAt_mintheorem — min is Hadamard directionally differentiable. At (a, b) the derivative is minDirDeriv a b.hypothesesa b :ℝconclusionProof (Lean source)
theorem hasHadamardDirDerivAt_min (a b : ℝ) : HasHadamardDirDerivAt (fun z : ℝ × ℝ => min z.1 z.2) (minDirDeriv a b) (a, b) := by intro h hn tn hhn htn htn_pos have hh1 : Tendsto (fun n => (hn n).1) atTop (𝓝 h.1) := (continuous_fst.tendsto h).comp hhn have hh2 : Tendsto (fun n => (hn n).2) atTop (𝓝 h.2) := (continuous_snd.tendsto h).comp hhn unfold minDirDeriv split_ifs with hab hba · -- a < b : the first coordinate eventually dominates the min, derivative = h.1 have hmin_ab : min a b = a := min_eq_left (le_of_lt hab) have hg : Tendsto (fun n => (b + tn n * (hn n).2) - (a + tn n * (hn n).1)) atTop (𝓝 (b - a)) := by have h0 : Tendsto (fun n => tn n * ((hn n).2 - (hn n).1)) atTop (𝓝 0) := by simpa using htn.mul (hh2.sub hh1) have hsum := (tendsto_const_nhds (x := b - a)).add h0 simp only [add_zero] at hsum refine hsum.congr ?_ intro n; ring have hev : ∀ᶠ n in atTop, a + tn n * (hn n).1 ≤ b + tn n * (hn n).2 := by filter_upwards [hg.eventually (eventually_gt_nhds (show (0:ℝ) < b - a by linarith))] with n hn_ev linarith refine hh1.congr' ?_ filter_upwards [hev] with n hle have htn_ne : tn n ≠ 0 := (htn_pos n).ne' simp only [Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, smul_eq_mul] rw [min_eq_left hle, hmin_ab, show a + tn n * (hn n).1 - a = tn n * (hn n).1 by ring, ← mul_assoc, inv_mul_cancel₀ htn_ne, one_mul] · -- b < a : the second coordinate eventually dominates the min, derivative = h.2 have hmin_ab : min a b = b := min_eq_right (le_of_lt hba) have hg : Tendsto (fun n => (a + tn n * (hn n).1) - (b + tn n * (hn n).2)) atTop (𝓝 (a - b)) := by have h0 : Tendsto (fun n => tn n * ((hn n).1 - (hn n).2)) atTop (𝓝 0) := by simpa using htn.mul (hh1.sub hh2) have hsum := (tendsto_const_nhds (x := a - b)).add h0 simp only [add_zero] at hsum refine hsum.congr ?_ intro n; ring have hev : ∀ᶠ n in atTop, b + tn n * (hn n).2 ≤ a + tn n * (hn n).1 := by filter_upwards [hg.eventually (eventually_gt_nhds (show (0:ℝ) < a - b by linarith))] with n hn_ev linarith refine hh2.congr' ?_ filter_upwards [hev] with n hge have htn_ne : tn n ≠ 0 := (htn_pos n).ne' simp only [Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, smul_eq_mul] rw [min_eq_right hge, hmin_ab, show b + tn n * (hn n).2 - b = tn n * (hn n).2 by ring, ← mul_assoc, inv_mul_cancel₀ htn_ne, one_mul] · -- a = b : tie case collapses to `min (hₙ.1) (hₙ.2) → min h.1 h.2` have hab_eq : a = b := le_antisymm (not_lt.1 hba) (not_lt.1 hab) have key : ∀ n, (tn n)⁻¹ • ((fun z : ℝ × ℝ => min z.1 z.2) ((a, b) + tn n • hn n) - min a b) = min (hn n).1 (hn n).2 := by intro n have htn_ne : tn n ≠ 0 := (htn_pos n).ne' have hpos := htn_pos n simp only [Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, smul_eq_mul, hab_eq] have e1 : min (b + tn n * (hn n).1) (b + tn n * (hn n).2) = b + tn n * min (hn n).1 (hn n).2 := by rcases le_total (hn n).1 (hn n).2 with hle | hle · rw [min_eq_left hle, min_eq_left (by nlinarith [hpos])] · rw [min_eq_right hle, min_eq_right (by nlinarith [hpos])] rw [e1, min_self, show b + tn n * min (hn n).1 (hn n).2 - b = tn n * min (hn n).1 (hn n).2 by ring, ← mul_assoc, inv_mul_cancel₀ htn_ne, one_mul] simp only [key] exact hh1.min hh2 -
comptheorem — If the outer map has a Hadamard directional derivative and the inner map has a Hadamard directional derivative, then their composition has the composed directional derivative.hypothesesE :sharedType u_1F :sharedType u_2G :f :E → Ff' :E → Fg :F → Gg' :F → Gx :Ehg :HasHadamardDirDerivAt g g' (f x)hf :HasHadamardDirDerivAt f f' xconclusionHasHadamardDirDerivAt (g ∘ f) (g' ∘ f') xProof (Lean source)
theorem HasHadamardDirDerivAt.comp {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] {f : E → F} {f' : E → F} {g : F → G} {g' : F → G} {x : E} (hg : HasHadamardDirDerivAt g g' (f x)) (hf : HasHadamardDirDerivAt f f' x) : HasHadamardDirDerivAt (g ∘ f) (g' ∘ f') x := by intro h hn tn hhn htn htn_pos let kn : ℕ → F := fun n => (tn n)⁻¹ • (f (x + tn n • hn n) - f x) have hkn : Tendsto kn atTop (nhds (f' h)) := hf h hn tn hhn htn htn_pos have hout := hg (f' h) kn tn hkn htn htn_pos apply hout.congr' filter_upwards [] with n have hne : tn n ≠ 0 := (htn_pos n).ne' have hrecover : f x + tn n • kn n = f (x + tn n • hn n) := by simp only [kn, smul_smul, mul_inv_cancel₀ hne, one_smul, add_sub_cancel] simp only [Function.comp_apply, hrecover, kn] -
comptheorem — If the outer map and the inner map are continuously Hadamard directionally differentiable, then their composition is too.hypothesesE :sharedType u_1F :sharedType u_2G :f :E → Fg :F → Gx :Ehg :HasContinuousHadamardDirDerivAt g (f x)hf :conclusionHasContinuousHadamardDirDerivAt (g ∘ f) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.comp {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] {f : E → F} {g : F → G} {x : E} (hg : HasContinuousHadamardDirDerivAt g (f x)) (hf : HasContinuousHadamardDirDerivAt f x) : HasContinuousHadamardDirDerivAt (g ∘ f) x := by rcases hg with ⟨g', hg'c, hg'⟩ rcases hf with ⟨f', hf'c, hf'⟩ exact ⟨g' ∘ f', hg'c.comp hf'c, HasHadamardDirDerivAt.comp hg' hf'⟩ -
of_hasFDerivAttheorem — If a map has a Fréchet derivative, then it is continuously Hadamard directionally differentiable.hypothesesconclusionProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.of_hasFDerivAt {f : E → F} {L : E →L[ℝ] F} {x : E} (hf : HasFDerivAt f L x) : HasContinuousHadamardDirDerivAt f x := ⟨fun h => L h, L.continuous, HasFDerivAt.hasHadamardDirDerivAt hf⟩ -
of_differentiableAttheorem — If a map is differentiable at a point, then it is continuously Hadamard directionally differentiable there.hypothesesconclusionProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.of_differentiableAt {f : E → F} {x : E} (hf : DifferentiableAt ℝ f x) : HasContinuousHadamardDirDerivAt f x := .of_hasFDerivAt hf.hasFDerivAt -
congr_of_eventuallyEqtheorem — If two maps agree near a point and one is continuously Hadamard directionally differentiable there, then the other has the same property.hypothesesconclusionProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.congr_of_eventuallyEq {f g : E → F} {x : E} (hfg : EventuallyEq (nhds x) f g) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt f x := by rcases hg with ⟨g', hg'c, hg'⟩ refine ⟨g', hg'c, ?_⟩ intro h hn tn hhn htn htn_pos have hxlim : Tendsto (fun n => x + tn n • hn n) atTop (nhds x) := by simpa using (tendsto_const_nhds (x := x)).add (htn.smul hhn) have hev := hxlim.eventually hfg have hfx : f x = g x := hfg.self_of_nhds apply (hg' h hn tn hhn htn htn_pos).congr' filter_upwards [hev] with n hnfg rw [hnfg, hfx] -
prodtheorem — If each component map is continuously Hadamard directionally differentiable, then their product-valued pairing has the same property.hypothesesE :sharedType u_1F :sharedType u_2G :f :E → Fg :E → Gx :Ehf :hg :conclusionHasContinuousHadamardDirDerivAt (fun y => (f y, g y)) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.prod {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] {f : E → F} {g : E → G} {x : E} (hf : HasContinuousHadamardDirDerivAt f x) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt (fun y => (f y, g y)) x := by rcases hf with ⟨f', hf'c, hf'⟩ rcases hg with ⟨g', hg'c, hg'⟩ refine ⟨fun h => (f' h, g' h), hf'c.prodMk hg'c, ?_⟩ intro h hn tn hhn htn htn_pos have hf_lim := hf' h hn tn hhn htn htn_pos have hg_lim := hg' h hn tn hhn htn htn_pos change Tendsto (fun n => ((tn n)⁻¹ • (f (x + tn n • hn n) - f x), (tn n)⁻¹ • (g (x + tn n • hn n) - g x))) atTop (nhds (f' h, g' h)) exact hf_lim.prodMk_nhds hg_lim -
addtheorem — If two real-valued maps are continuously Hadamard directionally differentiable, then their pointwise sum has the same property.hypothesesE :sharedType u_1E → ℝEhf :hg :conclusionHasContinuousHadamardDirDerivAt (fun y => f y + g y) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.add {f g : E → ℝ} {x : E} (hf : HasContinuousHadamardDirDerivAt f x) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt (fun y => f y + g y) x := by have ho : HasContinuousHadamardDirDerivAt (fun z : ℝ × ℝ => z.1 + z.2) (f x, g x) := .of_differentiableAt (differentiableAt_fst.add differentiableAt_snd) change HasContinuousHadamardDirDerivAt ((fun z : ℝ × ℝ => z.1 + z.2) ∘ fun y => (f y, g y)) x exact HasContinuousHadamardDirDerivAt.comp (f := fun y => (f y, g y)) (g := fun z : ℝ × ℝ => z.1 + z.2) ho (hf.prod hg) -
subtheorem — If two real-valued maps are continuously Hadamard directionally differentiable, then their pointwise difference has the same property.hypothesesE :sharedType u_1E → ℝEhf :hg :conclusionHasContinuousHadamardDirDerivAt (fun y => f y - g y) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.sub {f g : E → ℝ} {x : E} (hf : HasContinuousHadamardDirDerivAt f x) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt (fun y => f y - g y) x := by have ho : HasContinuousHadamardDirDerivAt (fun z : ℝ × ℝ => z.1 - z.2) (f x, g x) := .of_differentiableAt (differentiableAt_fst.sub differentiableAt_snd) change HasContinuousHadamardDirDerivAt ((fun z : ℝ × ℝ => z.1 - z.2) ∘ fun y => (f y, g y)) x exact HasContinuousHadamardDirDerivAt.comp (f := fun y => (f y, g y)) (g := fun z : ℝ × ℝ => z.1 - z.2) ho (hf.prod hg) -
multheorem — If two real-valued maps are continuously Hadamard directionally differentiable, then their pointwise product has the same property.hypothesesE :sharedType u_1E → ℝEhf :hg :conclusionHasContinuousHadamardDirDerivAt (fun y => f y * g y) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.mul {f g : E → ℝ} {x : E} (hf : HasContinuousHadamardDirDerivAt f x) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt (fun y => f y * g y) x := by have ho : HasContinuousHadamardDirDerivAt (fun z : ℝ × ℝ => z.1 * z.2) (f x, g x) := .of_differentiableAt (differentiableAt_fst.mul differentiableAt_snd) change HasContinuousHadamardDirDerivAt ((fun z : ℝ × ℝ => z.1 * z.2) ∘ fun y => (f y, g y)) x exact HasContinuousHadamardDirDerivAt.comp (f := fun y => (f y, g y)) (g := fun z : ℝ × ℝ => z.1 * z.2) ho (hf.prod hg) -
divtheorem — If the denominator is nonzero and the numerator and denominator maps are continuously Hadamard directionally differentiable, then their pointwise quotient has the same property.hypothesesE :sharedType u_1E → ℝEhg0 :g x ≠ 0hf :hg :conclusionHasContinuousHadamardDirDerivAt (fun y => f y / g y) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.div {f g : E → ℝ} {x : E} (hg0 : g x ≠ 0) (hf : HasContinuousHadamardDirDerivAt f x) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt (fun y => f y / g y) x := by have ho : HasContinuousHadamardDirDerivAt (fun z : ℝ × ℝ => z.1 / z.2) (f x, g x) := .of_differentiableAt (differentiableAt_fst.mul (differentiableAt_snd.inv hg0)) change HasContinuousHadamardDirDerivAt ((fun z : ℝ × ℝ => z.1 / z.2) ∘ fun y => (f y, g y)) x exact HasContinuousHadamardDirDerivAt.comp (f := fun y => (f y, g y)) (g := fun z : ℝ × ℝ => z.1 / z.2) ho (hf.prod hg) -
finset_sumtheorem — If every map indexed by a finite set is continuously Hadamard directionally differentiable, then their pointwise finite sum has the same property.hypothesesE :sharedType u_1I :Type*s :Finset If :I → E → ℝx :Ehf :∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) xconclusionHasContinuousHadamardDirDerivAt (fun y => ∑ i ∈ s, f i y) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.finset_sum {I : Type*} (s : Finset I) {f : I → E → ℝ} {x : E} (hf : ∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) x) : HasContinuousHadamardDirDerivAt (fun y => ∑ i ∈ s, f i y) x := by classical induction s using Finset.induction_on with | empty => simp only [Finset.sum_empty] exact .of_differentiableAt (differentiableAt_const (c := (0 : ℝ))) | @insert a s ha ih => simp_rw [Finset.sum_insert ha] exact (hf a (Finset.mem_insert_self a s)).add (ih fun i hi => hf i (Finset.mem_insert_of_mem hi)) -
maxtheorem — If two real-valued maps are continuously Hadamard directionally differentiable, then their pointwise maximum has the same property.hypothesesE :sharedType u_1E → ℝEhf :hg :conclusionHasContinuousHadamardDirDerivAt (fun y => max (f y) (g y)) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.max {f g : E → ℝ} {x : E} (hf : HasContinuousHadamardDirDerivAt f x) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt (fun y => max (f y) (g y)) x := by have ho : HasContinuousHadamardDirDerivAt (fun z : ℝ × ℝ => max z.1 z.2) (f x, g x) := ⟨maxDirDeriv (f x) (g x), continuous_maxDirDeriv _ _, hasHadamardDirDerivAt_max _ _⟩ change HasContinuousHadamardDirDerivAt ((fun z : ℝ × ℝ => max z.1 z.2) ∘ fun y => (f y, g y)) x exact HasContinuousHadamardDirDerivAt.comp ho (hf.prod hg) -
mintheorem — If two real-valued maps are continuously Hadamard directionally differentiable, then their pointwise minimum has the same property.hypothesesE :sharedType u_1E → ℝEhf :hg :conclusionHasContinuousHadamardDirDerivAt (fun y => min (f y) (g y)) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.min {f g : E → ℝ} {x : E} (hf : HasContinuousHadamardDirDerivAt f x) (hg : HasContinuousHadamardDirDerivAt g x) : HasContinuousHadamardDirDerivAt (fun y => min (f y) (g y)) x := by have ho : HasContinuousHadamardDirDerivAt (fun z : ℝ × ℝ => min z.1 z.2) (f x, g x) := ⟨minDirDeriv (f x) (g x), continuous_minDirDeriv _ _, hasHadamardDirDerivAt_min _ _⟩ change HasContinuousHadamardDirDerivAt ((fun z : ℝ × ℝ => min z.1 z.2) ∘ fun y => (f y, g y)) x exact HasContinuousHadamardDirDerivAt.comp ho (hf.prod hg) -
finset_sup'theorem — If a finite index set is nonempty and every indexed map is continuously Hadamard directionally differentiable, then their pointwise finite supremum has the same property.hypothesesE :sharedType u_1I :Type*s :Finset Ihs :s.Nonemptyf :I → E → ℝx :Ehf :∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) xconclusionHasContinuousHadamardDirDerivAt (fun y => s.sup' hs (fun i => f i y)) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.finset_sup' {I : Type*} (s : Finset I) (hs : s.Nonempty) {f : I → E → ℝ} {x : E} (hf : ∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) x) : HasContinuousHadamardDirDerivAt (fun y => s.sup' hs (fun i => f i y)) x := by classical induction s using Finset.induction_on with | empty => simp at hs | @insert a s ha ih => by_cases hse : s.Nonempty · have ha' := hf a (Finset.mem_insert_self a s) have hs' : ∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) x := fun i hi => hf i (Finset.mem_insert_of_mem hi) have hi := ih hse hs' simpa only [Finset.sup'_insert hse] using HasContinuousHadamardDirDerivAt.max ha' hi · have hsempty : s = ∅ := Finset.not_nonempty_iff_eq_empty.mp hse subst s change HasContinuousHadamardDirDerivAt (fun y => ({a} : Finset I).sup' hs (fun i => f i y)) x simpa only [Finset.sup'_singleton] using hf a (mem_singleton_self a) -
finset_inf'theorem — If a finite index set is nonempty and every indexed map is continuously Hadamard directionally differentiable, then their pointwise finite infimum has the same property.hypothesesE :sharedType u_1I :Type*s :Finset Ihs :s.Nonemptyf :I → E → ℝx :Ehf :∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) xconclusionHasContinuousHadamardDirDerivAt (fun y => s.inf' hs (fun i => f i y)) xProof (Lean source)
theorem HasContinuousHadamardDirDerivAt.finset_inf' {I : Type*} (s : Finset I) (hs : s.Nonempty) {f : I → E → ℝ} {x : E} (hf : ∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) x) : HasContinuousHadamardDirDerivAt (fun y => s.inf' hs (fun i => f i y)) x := by classical induction s using Finset.induction_on with | empty => simp at hs | @insert a s ha ih => by_cases hse : s.Nonempty · have ha' := hf a (Finset.mem_insert_self a s) have hs' : ∀ i ∈ s, HasContinuousHadamardDirDerivAt (f i) x := fun i hi => hf i (Finset.mem_insert_of_mem hi) have hi := ih hse hs' simpa only [Finset.inf'_insert hse] using HasContinuousHadamardDirDerivAt.min ha' hi · have hsempty : s = ∅ := Finset.not_nonempty_iff_eq_empty.mp hse subst s change HasContinuousHadamardDirDerivAt (fun y => ({a} : Finset I).inf' hs (fun i => f i y)) x simpa only [Finset.inf'_singleton] using hf a (mem_singleton_self a)
ChiSquaredProjection 1 core · 0 supporting This file proves that the squared norm of an orthogonal projection of a standard finite-dimensional Gaussian vector has a chi-squared distribution. ★ stdGaussian_map_normSq_orthogonalProjection
Chi-Squared Law for Projected Gaussians
This file proves that the squared norm of an orthogonal projection of a standard finite-dimensional Gaussian vector has a chi-squared distribution. The degrees of freedom are the dimension of the projection range.
The public theorem is stdGaussian_map_normSq_orthogonalProjection: if a
continuous linear map P is self-adjoint and idempotent, then the law of
‖P z‖² under stdGaussian is chiSqDist with degrees of freedom
finrank ℝ (range P).
For a continuous linear self-map P of a finite-dimensional real inner-product space that is self-adjoint and idempotent, i.e. P composed with itself equals P — so that P is an orthogonal projection — the law of under the standard Gaussian on the space equals the chi-squared distribution with degrees of freedom equal to the dimension of the range of P.
Formal statement
Proof (Lean source)
FiniteDesignConditioning 5 core · 1 supporting This module identifies the explicit fiber average of a statistic under an arbitrary finite design with measure-theoretic conditional expectation given a finite-valued coarsening. ★ finiteConditionalMean_comp_ae_eq_condExp★ doobMartingaleDifferenceArray_rowSum★ conditionalLindeberg_tendstoInProbability_of_eventually_uniformly_small
Conditional expectation for finite randomization designs
This module identifies the explicit fiber average of a statistic under an arbitrary finite design with measure-theoretic conditional expectation given a finite-valued coarsening. It is the bridge needed to turn combinatorial conditional-moment calculations into martingale-array hypotheses.
Given a finite design, a finite-valued coarsening, a real statistic, and a coarsened value, the finite conditional mean is the design-weighted average of the statistic over that fiber, totalized to zero on a zero-mass fiber.
Definition (Lean source)
For a finite design, a finite-valued coarsening, and a real statistic, composing its explicit fiber conditional mean with the coarsening equals the measure-theoretic conditional expectation given that coarsening, almost everywhere under the design measure.
Formal statement
Proof (Lean source)
Given row probability spaces, finite row lengths, one filtration per row, and square-integrable terminal statistics, the Doob martingale-difference array has increment k equal to the difference between the terminal statistic's conditional expectations after and before reveal k.
Definition (Lean source)
For a Doob martingale-difference array and a row, the sum of its active increments is the terminal conditional expectation at the row endpoint minus its initial conditional expectation.
Formal statement
Proof (Lean source)
For a martingale-difference array, if its active increments are eventually uniformly smaller than every positive threshold, then its conditional Lindeberg condition holds.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
conditionalLindeberg_ae_eq_zero_of_increment_letheorem — For a martingale-difference array, a truncation threshold, and a row, if every active increment is at most that threshold in absolute value, then the row's conditional Lindeberg sum vanishes almost everywhere.hypothesesA :ε :ℝn :ℕhbound :∀ kifk < A.rowLength nthen∀ ω, |A.increment n k ω| ≤ εconclusionA.conditionalLindeberg ε n =ᵐ[μ n] 0Proof (Lean source)
theorem conditionalLindeberg_ae_eq_zero_of_increment_le (A : MartingaleDifferenceArray Ωr μ) (ε : ℝ) (n : ℕ) (hbound : ∀ k, k < A.rowLength n → ∀ ω, |A.increment n k ω| ≤ ε) : A.conditionalLindeberg ε n =ᵐ[μ n] 0 := by have hterm : ∀ k, k < A.rowLength n → A.lindebergTerm ε n k =ᵐ[μ n] 0 := by intro k hk have hzero : (fun ω => if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) = 0 := by funext ω simp [not_lt.mpr (hbound k hk ω)] unfold MartingaleDifferenceArray.lindebergTerm rw [hzero] simp have hall : ∀ᵐ ω ∂(μ n), ∀ k ∈ range (A.rowLength n), A.lindebergTerm ε n k ω = 0 := (Finset.eventually_all _).mpr fun k hk => hterm k (Finset.mem_range.mp hk) filter_upwards [hall] with ω hω unfold MartingaleDifferenceArray.conditionalLindeberg simp only [Finset.sum_apply, Pi.zero_apply] exact Finset.sum_eq_zero fun k hk => hω k hk
FunctionalDelta 3 core · 5 supporting This file proves the finite-dimensional functional delta method for the library's sequential HasHadamardDirDerivAt predicate. ★ functionalDeltaMethod★ deltaMethod_max★ deltaMethod_min
Functional delta method for Hadamard directional derivatives
This file proves the finite-dimensional functional delta method for the
library's sequential HasHadamardDirDerivAt predicate. The deterministic core
upgrades its pointwise sequential expansion to uniform approximation on
bounded sets. The extended continuous mapping theorem then transports an input
weak limit through the continuous, possibly nonlinear directional derivative.
The max/min corollaries apply at every base point, including ties, and therefore cover intersection-bound endpoints without restricting attention to the binding case.
The nonlinear directional theorem formalized here is a finite-dimensional, whole-space specialization of Shapiro (1991), Theorem 2.1, and Fang and Santos (2019), Theorem 2.1, with continuity of the directional derivative required explicitly. Van der Vaart (1998), Theorem 20.8 is the fully Hadamard- differentiable linear special case and supplies the classical proof template.
Given a finite-dimensional estimator sequence and target, a diverging rate, measurable rescaled input and transformed deviations, a continuous Hadamard directional derivative φ' of φ at θ, and weak convergence of the rescaled input deviations to Q, the rescaled transformed deviations converge weakly to the pushforward of Q under φ'.
Formal statement
Proof (Lean source)
Given two estimator sequences and their target coordinates, measurable square-root-rescaled input and maximum deviations, and weak convergence of the rescaled input pair to Q, the square-root-rescaled maximum converges to the pushforward of Q under the maximum's directional derivative at (a,b).
Formal statement
Proof (Lean source)
Given two estimator sequences and their target coordinates, measurable square-root-rescaled input and minimum deviations, and weak convergence of the rescaled input pair to Q, the square-root-rescaled minimum converges to the pushforward of Q under the minimum's directional derivative at (a,b).
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
uniform_on_boundedtheorem — If a map has Hadamard directional derivative φ' at θ, that derivative is continuous, and a rate r diverges, then the corresponding rescaled increment maps converge to φ' uniformly on every norm-bounded set.hypothesesE :sharedType u_1F :sharedType u_2φ :E → Fφ' :E → Fθ :Ehφ :HasHadamardDirDerivAt φ φ' θhφ' :Continuous φ'r :ℕ → ℝM :ℝepsilon :ℝ0 < epsilonconclusion∀ᶠ n in atTop, ∀ h : E, ‖h‖ ≤ M → ‖r n • (φ (θ + (r n)⁻¹ • h) - φ θ) - φ' h‖ < epsilonProof (Lean source)
theorem HasHadamardDirDerivAt.uniform_on_bounded [FiniteDimensional ℝ E] {φ : E → F} {φ' : E → F} {θ : E} (hφ : HasHadamardDirDerivAt φ φ' θ) (hφ' : Continuous φ') (r : ℕ → ℝ) (hr : Tendsto r atTop atTop) : ∀ (M : ℝ) (epsilon : ℝ), 0 < epsilon → ∀ᶠ n in atTop, ∀ h : E, ‖h‖ ≤ M → ‖r n • (φ (θ + (r n)⁻¹ • h) - φ θ) - φ' h‖ < epsilon := by intro M epsilon hepsilon by_contra hfail rw [Filter.eventually_atTop] at hfail push Not at hfail obtain ⟨Npos, hNpos⟩ := Filter.eventually_atTop.mp (Filter.tendsto_atTop.mp hr 1) choose k hk x hx hbad using fun N => hfail (max Npos N) have hkN : ∀ n, n ≤ k n := fun n => (le_max_right Npos n).trans (hk n) have hkpos : ∀ n, 0 < r (k n) := fun n => lt_of_lt_of_le zero_lt_one (hNpos _ ((le_max_left Npos n).trans (hk n))) have hk_tendsto : Tendsto k atTop atTop := by rw [Filter.tendsto_atTop] intro N filter_upwards [Filter.eventually_ge_atTop N] with n hn exact hn.trans (hkN n) have hxball : ∀ n, x n ∈ closedBall (0 : E) M := by intro n simpa [Metric.mem_closedBall, dist_zero_right] using hx n obtain ⟨x0, _hx0, psi, hpsi, hxconv⟩ := (ProperSpace.isCompact_closedBall (0 : E) M).tendsto_subseq hxball have hindex : Tendsto (fun n => k (psi n)) atTop atTop := hk_tendsto.comp hpsi.tendsto_atTop have hrsub : Tendsto (fun n => r (k (psi n))) atTop atTop := hr.comp hindex have hinv : Tendsto (fun n => (r (k (psi n)))⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp hrsub have hinvpos : ∀ n, 0 < (r (k (psi n)))⁻¹ := fun n => inv_pos.mpr (hkpos _) have hquot := hφ x0 (x ∘ psi) (fun n => (r (k (psi n)))⁻¹) hxconv hinv hinvpos have hquot' : Tendsto (fun n => r (k (psi n)) • (φ (θ + (r (k (psi n)))⁻¹ • x (psi n)) - φ θ)) atTop (𝓝 (φ' x0)) := by simpa [Function.comp_def] using hquot have hderiv : Tendsto (fun n => φ' (x (psi n))) atTop (𝓝 (φ' x0)) := (hφ'.tendsto x0).comp hxconv have hdiff : Tendsto (fun n => r (k (psi n)) • (φ (θ + (r (k (psi n)))⁻¹ • x (psi n)) - φ θ) - φ' (x (psi n))) atTop (𝓝 0) := by simpa using hquot'.sub hderiv have hsmall : ∀ᶠ n in atTop, ‖r (k (psi n)) • (φ (θ + (r (k (psi n)))⁻¹ • x (psi n)) - φ θ) - φ' (x (psi n))‖ < epsilon := (NormedAddGroup.tendsto_nhds_zero.mp hdiff) epsilon hepsilon obtain ⟨n, hn⟩ := hsmall.exists exact (not_lt_of_ge (hbad (psi n))) hn -
instIsProbabilityMeasure_map_maxDirDerivinstance — Given a probability law on pairs and a base point, the pushforward under the maximum's directional derivative is a probability law.parametersQ :Measure (ℝ × ℝ)a b :ℝinstancegiven byMeasure.isProbabilityMeasure_map (continuous_maxDirDeriv a b).measurable.aemeasurable -
instIsProbabilityMeasure_map_minDirDerivinstance — Given a probability law on pairs and a base point, the pushforward under the minimum's directional derivative is a probability law.parametersQ :Measure (ℝ × ℝ)a b :ℝinstancegiven byMeasure.isProbabilityMeasure_map (continuous_minDirDeriv a b).measurable.aemeasurable -
deltaMethod_max_ratetheorem — Given two estimator sequences and their target coordinates, a diverging rate, measurable rescaled input and maximum deviations, and weak convergence of the rescaled input pair to Q, the rescaled maximum converges to the pushforward of Q under the maximum's directional derivative at (a,b).hypothesesan bn :ℕ → Ω → ℝa b :ℝr :ℕ → ℝQ :Measure (ℝ × ℝ)hSn :∀ n, AEMeasurable (fun omega => r n • ((an n omega, bn n omega) - (a, b))) μhMax :hCLT :Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n • ((an n omega, bn n omega) - (a, b))) atTop QconclusionModes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n * (max (an n omega) (bn n omega) - max a b)) atTop (Q.map (maxDirDeriv a b))Proof (Lean source)
theorem deltaMethod_max_rate (an bn : ℕ → Ω → ℝ) (a b : ℝ) (r : ℕ → ℝ) (hr : Tendsto r atTop atTop) (Q : Measure (ℝ × ℝ)) [IsProbabilityMeasure Q] (hSn : ∀ n, AEMeasurable (fun omega => r n • ((an n omega, bn n omega) - (a, b))) μ) (hMax : ∀ n, AEMeasurable (fun omega => r n * (max (an n omega) (bn n omega) - max a b)) μ) (hCLT : Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n • ((an n omega, bn n omega) - (a, b))) atTop Q) : Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n * (max (an n omega) (bn n omega) - max a b)) atTop (Q.map (maxDirDeriv a b)) := by apply (Tendsto_dist_iff _ _ _ hMax).2 simpa [smul_eq_mul] using functionalDeltaMethod (Tn := fun n omega => (an n omega, bn n omega)) (θ := (a, b)) (φ := fun z : ℝ × ℝ => max z.1 z.2) (φ' := maxDirDeriv a b) Q r hr hSn hMax (hasHadamardDirDerivAt_max a b) (continuous_maxDirDeriv a b) hCLT -
deltaMethod_min_ratetheorem — Given two estimator sequences and their target coordinates, a diverging rate, measurable rescaled input and minimum deviations, and weak convergence of the rescaled input pair to Q, the rescaled minimum converges to the pushforward of Q under the minimum's directional derivative at (a,b).hypothesesan bn :ℕ → Ω → ℝa b :ℝr :ℕ → ℝQ :Measure (ℝ × ℝ)hSn :∀ n, AEMeasurable (fun omega => r n • ((an n omega, bn n omega) - (a, b))) μhMin :hCLT :Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n • ((an n omega, bn n omega) - (a, b))) atTop QconclusionModes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n * (min (an n omega) (bn n omega) - min a b)) atTop (Q.map (minDirDeriv a b))Proof (Lean source)
theorem deltaMethod_min_rate (an bn : ℕ → Ω → ℝ) (a b : ℝ) (r : ℕ → ℝ) (hr : Tendsto r atTop atTop) (Q : Measure (ℝ × ℝ)) [IsProbabilityMeasure Q] (hSn : ∀ n, AEMeasurable (fun omega => r n • ((an n omega, bn n omega) - (a, b))) μ) (hMin : ∀ n, AEMeasurable (fun omega => r n * (min (an n omega) (bn n omega) - min a b)) μ) (hCLT : Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n • ((an n omega, bn n omega) - (a, b))) atTop Q) : Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n omega => r n * (min (an n omega) (bn n omega) - min a b)) atTop (Q.map (minDirDeriv a b)) := by apply (Tendsto_dist_iff _ _ _ hMin).2 simpa [smul_eq_mul] using functionalDeltaMethod (Tn := fun n omega => (an n omega, bn n omega)) (θ := (a, b)) (φ := fun z : ℝ × ℝ => min z.1 z.2) (φ' := minDirDeriv a b) Q r hr hSn hMin (hasHadamardDirDerivAt_min a b) (continuous_minDirDeriv a b) hCLT
GaussianCharFunBridge 2 core · 0 supporting This file connects concrete centered Gaussian measures with the characteristic function form used by the library's multivariate central-limit theorems. ★ charFun_isGaussian_centered★ charFun_isGaussian_of_cov_eq
Gaussian Characteristic-Function Bridge
This file connects concrete centered Gaussian measures with the characteristic function form used by the library's multivariate central-limit theorems. It identifies the Gaussian covariance with the second moment of an influence function so that abstract limit-law hypotheses can be discharged.
charFun_isGaussian_centered specializes the Mathlib Gaussian characteristic
function formula to centered Gaussian measures. charFun_isGaussian_of_cov_eq
then rewrites the covariance form into the influence-function integral
∫ ⟪t, ψ x⟫² ∂P, matching the abstract target used by the multivariate CLT
theorems.
Centered-Gaussian characteristic function. For a Gaussian measure Q on E with mean zero, its characteristic function at any point t equals .
Formal statement
Proof (Lean source)
Bridge to the abstract CLT target hQ. For a centered Gaussian measure Q on E with mean zero whose covariance bilinear form at every t equals the influence-function second moment , its characteristic function at t equals — the exact target shape consumed as the hypothesis hQ by IIDSample.clt_normalizedSum_vec_of_charFun and friends.
Formal statement
Proof (Lean source)
GaussianTail 1 core · 1 supporting This file proves that both one-sided tails of a centered Gaussian distribution can be made arbitrarily small by choosing a sufficiently large cutoff. ★ finite_measure_halfline_tails_small
Gaussian Tail Control
This file proves that both one-sided tails of a centered Gaussian distribution can be made arbitrarily small by choosing a sufficiently large cutoff. The result is a reusable tightness ingredient for quantile and partial-identification asymptotic arguments.
The exported lemma finite_measure_halfline_tails_small applies to every finite measure on
the real line. Its Gaussian corollary gaussian_tail_small_gaussian applies to
the project's gaussianMeasure m v, including the clipped degenerate case for
nonpositive variance parameters. Both return one positive cutoff controlling the
lower and upper half-line tails.
Finite-measure half-line tail control. For a finite measure Q on the real line and a positive tolerance ε, there is a positive cutoff R such that both the lower half-line tail and the upper half-line tail are at most ε.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
gaussian_tail_small_gaussianlemma — Both symmetric half-line tails of a Gaussian distribution can be made smaller than any positive tolerance by choosing a sufficiently large positive cutoff.hypothesesm v ε :ℝhε :0 < εconclusion∃ R : ℝ,conclusion 10 < Rconclusion 2conclusion 3Proof (Lean source)
lemma gaussian_tail_small_gaussian {m v ε : ℝ} (hε : 0 < ε) : ∃ R : ℝ, 0 < R ∧ gaussianMeasure m v (Iic (-R)) ≤ ofReal ε ∧ gaussianMeasure m v (Ici R) ≤ ofReal ε := finite_measure_halfline_tails_small (gaussianMeasure m v) hε
Lindeberg 6 core · 8 supporting This module proves the Lindeberg--Feller central limit theorem for a triangular array whose n-th row contains n independent copies of a row-dependent real law. ★ iidRowSumLaw_tendsto_gaussian★ iidRowNormalizedSumLaw_tendsto_gaussian
Lindeberg--Feller CLT for i.i.d. triangular rows
This module proves the Lindeberg--Feller central limit theorem for a triangular array whose n-th row contains n independent copies of a row-dependent real law. It supplies both a scaled-row form and the normalized-sum form used by bootstrap arguments, including a degenerate zero-variance limit.
A row length determines the sum of all real coordinates in that row.
Definition (Lean source)
A sequence of row probability laws and a row index determine the law of the sum of independent draws in that row.
Definition (Lean source)
A sequence of row probability laws and a row index determine the law of the row sum divided by the square root of its size.
Definition (Lean source)
A sequence of row laws and a row index determine the law obtained by dividing one draw by the square root of the row size. At zero, the standard reciprocal convention gives scale zero.
A sequence of row probability laws, target variance, square-integrable row draws, zero row means, convergent row variances, and vanishing Lindeberg tails ensure that the laws of the i.i.d. row sums converge weakly to the centered Gaussian law, including a zero-variance limit.
Formal statement
Proof (Lean source)
A sequence of row probability laws, target variance, square-integrable row draws, zero row means, convergent row second moments, and vanishing square-root-scale Lindeberg tails ensure that the normalized i.i.d. row-sum laws converge weakly to the centered Gaussian law with the target variance, including a zero-variance limit. The n-th row consists of n independent draws from the n-th row law, and its sum is divided by √n.
Formal statement
Proof (Lean source)
8 supporting declarations (lemmas, instances)
-
measurable_iidRowSumlemma — A row length ensures that its coordinate-sum map is measurable for the product Borel σ-algebra.Proof (Lean source)
-
charFun_iidRowSumLawlemma — A sequence of row probability laws, a row index, and a frequency ensure that the row-sum characteristic function is the corresponding power of the one-draw characteristic function.hypothesesProof (Lean source)
lemma charFun_iidRowSumLaw (Q : ℕ → Measure ℝ) [∀ n, IsProbabilityMeasure (Q n)] (n : ℕ) (t : ℝ) : charFun (iidRowSumLaw Q n : Measure ℝ) t = charFun (Q n) t ^ n := by change charFun ((Measure.pi (fun _ : Fin n => Q n)).map (fun p => ∑ i, p i)) t = _ simpa using congrFun (charFun_map_sum_pi_eq_prod (fun _ : Fin n => Q n)) t -
iidRowSumLaw_scaledRowMeasure_eq_normalizedtheorem — A sequence of row probability laws and a row index ensure that summing individually scaled draws has the same law as scaling the row sum.hypothesesR :ℕ → Measure ℝ∀ n, IsProbabilityMeasure (R n)n :ℕconclusion@iidRowSumLaw (fun n => scaledRowMeasure R n) (fun n => Measure.isProbabilityMeasure_map (by fun_prop)) n= iidRowNormalizedSumLaw R nProof (Lean source)
theorem iidRowSumLaw_scaledRowMeasure_eq_normalized (R : ℕ → Measure ℝ) [∀ n, IsProbabilityMeasure (R n)] (n : ℕ) : @iidRowSumLaw (fun n => scaledRowMeasure R n) (fun n => Measure.isProbabilityMeasure_map (by fun_prop)) n = iidRowNormalizedSumLaw R n := by /- Use `Measure.pi_map_pi` to identify the product of the coordinate pushforwards with the pushforward of the product law by coordinatewise scaling. Then use `Measure.map_map`; the sum of the scaled coordinates is pointwise the scaled sum (`Finset.mul_sum`). -/ apply Subtype.ext change (Measure.pi (fun _ : Fin n => (R n).map (fun x => (sqrt (n : ℝ))⁻¹ * x))).map (iidRowSum n) = (Measure.pi (fun _ : Fin n => R n)).map (fun y => (sqrt (n : ℝ))⁻¹ * iidRowSum n y) rw [← Measure.pi_map_pi (fun _ => (by fun_prop : AEMeasurable (fun x : ℝ => (sqrt (n : ℝ))⁻¹ * x) (R n)))] rw [Measure.map_map (measurable_iidRowSum n) (by fun_prop)] congr 1 funext y simp only [Function.comp_apply, iidRowSum] rw [← Finset.mul_sum] -
charFun_pow_tendsto_gaussiantheorem — A sequence of row probability laws, target variance, square-integrable row draws, zero row means, convergent row variances, vanishing Lindeberg tails, and a frequency ensure that the powered row characteristic functions converge to the centered Gaussian characteristic function.hypothesesQ :ℕ → Measure ℝ∀ n, IsProbabilityMeasure (Q n)σ2 :hQ2 :∀ n, MemLp id 2 (Q n)hcenter :∀ n, ∫ x, x ∂Q n = 0hlindeberg :t :ℝconclusionProof (Lean source)
theorem charFun_pow_tendsto_gaussian (Q : ℕ → Measure ℝ) [∀ n, IsProbabilityMeasure (Q n)] (σ2 : NNReal) (hQ2 : ∀ n, MemLp id 2 (Q n)) (hcenter : ∀ n, ∫ x, x ∂Q n = 0) (hsecond : Tendsto (fun n : ℕ => (n : ℝ) * ∫ x, x ^ 2 ∂Q n) atTop (𝓝 (σ2 : ℝ))) (hlindeberg : ∀ ε : ℝ, 0 < ε → Tendsto (fun n : ℕ => (n : ℝ) * ∫ x in {x | ε ≤ |x|}, x ^ 2 ∂Q n) atTop (𝓝 0)) (t : ℝ) : Tendsto (fun n : ℕ => charFun (Q n) t ^ n) atTop (𝓝 (charFun (gaussianReal 0 σ2) t)) := by /- Expand `exp (I*t*x)` to second order. After integrating, centering removes the linear term. Split the quadratic remainder at a fixed `η > 0` and apply `norm_expQuadraticRemainder_le_truncated`: the small part is bounded by `O(η)` times the total second moment, while the large part is bounded by the Lindeberg tail. Hence `n * (charFun (Q n) t - 1)` tends to `-σ²*t²/2`. Finish with `Complex.tendsto_one_add_pow_exp_of_tendsto` and `charFun_gaussianReal`. -/ let R : ℕ → ℂ := fun n => ∫ x, expQuadraticRemainder (t * x) ∂Q n have hRint (n : ℕ) : Integrable (fun x => expQuadraticRemainder (t * x)) (Q n) := by have hx1 : Integrable (fun x : ℝ => x) (Q n) := (hQ2 n).integrable (by norm_num) have hx2 : Integrable (fun x : ℝ => x ^ 2) (Q n) := (hQ2 n).integrable_sq have hexp : Integrable (fun x : ℝ => exp (I * ((t * x : ℝ) : ℂ))) (Q n) := by have hmeas : AEStronglyMeasurable (fun x : ℝ => exp (I * ((t * x : ℝ) : ℂ))) (Q n) := by fun_prop refine Integrable.mono' (integrable_const (1 : ℝ)) hmeas ?_ filter_upwards with x rw [Complex.norm_exp] simp apply (((hexp.sub (integrable_const (1 : ℂ))).sub (hx1.ofReal.const_mul (I * (t : ℂ)))).add (hx2.ofReal.const_mul (((t ^ 2 / 2 : ℝ) : ℂ)))).congr filter_upwards with x rw [expQuadraticRemainder] push_cast simp only [Pi.add_apply, Pi.sub_apply] ring_nf rfl have hchar (n : ℕ) : charFun (Q n) t = 1 - (((t ^ 2 / 2 : ℝ) : ℂ) * ((∫ x, x ^ 2 ∂Q n : ℝ) : ℂ)) + R n := by have hx1 : Integrable (fun x : ℝ => x) (Q n) := (hQ2 n).integrable (by norm_num) have hx2 : Integrable (fun x : ℝ => x ^ 2) (Q n) := (hQ2 n).integrable_sq rw [charFun_apply_real] have hpoint : (fun x : ℝ => exp ((t : ℂ) * (x : ℂ) * I)) = fun x : ℝ => (1 : ℂ) + (I * (t : ℂ)) * (x : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((x ^ 2 : ℝ) : ℂ) + expQuadraticRemainder (t * x) := by funext x rw [expQuadraticRemainder] push_cast ring_nf rw [hpoint] have hlin : Integrable (fun x : ℝ => (I * (t : ℂ)) * (x : ℂ)) (Q n) := hx1.ofReal.const_mul (I * (t : ℂ)) have hquad : Integrable (fun x : ℝ => ((t ^ 2 / 2 : ℝ) : ℂ) * ((x ^ 2 : ℝ) : ℂ)) (Q n) := hx2.ofReal.const_mul (((t ^ 2 / 2 : ℝ) : ℂ)) have hbase : Integrable (fun x : ℝ => (1 : ℂ) + (I * (t : ℂ)) * (x : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((x ^ 2 : ℝ) : ℂ)) (Q n) := ((integrable_const (1 : ℂ)).add hlin).sub hquad calc (∫ x : ℝ, (1 : ℂ) + (I * (t : ℂ)) * (x : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((x ^ 2 : ℝ) : ℂ) + expQuadraticRemainder (t * x) ∂Q n) = (∫ x : ℝ, (1 : ℂ) + (I * (t : ℂ)) * (x : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((x ^ 2 : ℝ) : ℂ) ∂Q n) + R n := by rw [integral_add hbase (hRint n)] _ = 1 - (((t ^ 2 / 2 : ℝ) : ℂ) * ((∫ x, x ^ 2 ∂Q n : ℝ) : ℂ)) + R n := by have hsplitBase : (∫ x : ℝ, (1 : ℂ) + (I * (t : ℂ)) * (x : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((x ^ 2 : ℝ) : ℂ) ∂Q n) = (∫ x : ℝ, (1 : ℂ) + (I * (t : ℂ)) * (x : ℂ) ∂Q n) - ∫ x : ℝ, ((t ^ 2 / 2 : ℝ) : ℂ) * ((x ^ 2 : ℝ) : ℂ) ∂Q n := by simpa only [Pi.add_apply, Pi.sub_apply] using integral_sub ((integrable_const (1 : ℂ)).add hlin) hquad have hsplitLin : (∫ x : ℝ, (1 : ℂ) + (I * (t : ℂ)) * (x : ℂ) ∂Q n) = (∫ _ : ℝ, (1 : ℂ) ∂Q n) + ∫ x : ℝ, (I * (t : ℂ)) * (x : ℂ) ∂Q n := by simpa only [Pi.add_apply] using integral_add (integrable_const (1 : ℂ)) hlin rw [hsplitBase, hsplitLin] rw [integral_const_mul, integral_const_mul] have hcoe1 : (∫ x : ℝ, (x : ℂ) ∂Q n) = ((∫ x : ℝ, x ∂Q n : ℝ) : ℂ) := integral_complex_ofReal have hcoe2 : (∫ x : ℝ, ((x ^ 2 : ℝ) : ℂ) ∂Q n) = ((∫ x : ℝ, x ^ 2 ∂Q n : ℝ) : ℂ) := integral_complex_ofReal rw [hcoe1, hcoe2] simp [hcenter n] have htrunc_le (n : ℕ) (η : ℝ) : (∫ x, if η < |x| then x ^ 2 else 0 ∂Q n) ≤ ∫ x in {x | η ≤ |x|}, x ^ 2 ∂Q n := by have hs : MeasurableSet {x : ℝ | η < |x|} := measurableSet_lt measurable_const (continuous_abs.measurable) have ht : MeasurableSet {x : ℝ | η ≤ |x|} := measurableSet_le measurable_const (continuous_abs.measurable) have hif : (fun x : ℝ => if η < |x| then x ^ 2 else 0) = {x : ℝ | η < |x|}.indicator (fun x => x ^ 2) := by funext x by_cases hx : η < |x| <;> simp [indicator, hx] rw [hif, integral_indicator hs] exact setIntegral_mono_set (hQ2 n).integrable_sq.integrableOn (ae_of_all _ fun x => sq_nonneg x) (ae_of_all _ fun x hx => hx.le) have hRscaled : Tendsto (fun n : ℕ => (n : ℂ) * R n) atTop (𝓝 0) := by rw [Metric.tendsto_atTop] intro ε hε let A : ℝ := |t| ^ 3 let B : ℝ := (σ2 : ℝ) + 1 let η : ℝ := min (1 / (|t| + 1)) (ε / (4 * (A * B + 1))) have hA : 0 ≤ A := by dsimp [A]; positivity have hB : 0 < B := by dsimp [B]; positivity have hAB : 0 < A * B + 1 := by positivity have hη : 0 < η := by dsimp [η] apply lt_min · positivity · positivity have htη : |t| * η ≤ 1 := by calc |t| * η ≤ |t| * (1 / (|t| + 1)) := mul_le_mul_of_nonneg_left (min_le_left _ _) (abs_nonneg t) _ = |t| / (|t| + 1) := by ring _ ≤ 1 := (div_lt_one (by positivity)).2 (by linarith [abs_nonneg t]) |>.le have hsmall : A * η * B ≤ ε / 4 := by have hηle : η ≤ ε / (4 * (A * B + 1)) := min_le_right _ _ have hABnonneg : 0 ≤ A * B := mul_nonneg hA hB.le calc A * η * B = (A * B) * η := by ring _ ≤ (A * B) * (ε / (4 * (A * B + 1))) := mul_le_mul_of_nonneg_left hηle hABnonneg _ ≤ ε / 4 := by have hfrac : A * B / (A * B + 1) ≤ 1 := (div_le_one hAB).2 (by linarith) calc A * B * (ε / (4 * (A * B + 1))) = (ε / 4) * (A * B / (A * B + 1)) := by field_simp _ ≤ (ε / 4) * 1 := mul_le_mul_of_nonneg_left hfrac (by positivity) _ = ε / 4 := by ring let C : ℝ := 2 / η ^ 2 + |t| / η + t ^ 2 / 2 have hC : 0 ≤ C := by dsimp [C]; positivity have hsecondEventually : ∀ᶠ n : ℕ in atTop, (n : ℝ) * ∫ x, x ^ 2 ∂Q n < B := (tendsto_order.1 hsecond).2 B (by dsimp [B]; linarith) have htail : Tendsto (fun n : ℕ => C * ((n : ℝ) * ∫ x in {x | η ≤ |x|}, x ^ 2 ∂Q n)) atTop (𝓝 0) := by simpa using (tendsto_const_nhds.mul (hlindeberg η hη)) have htailEventually : ∀ᶠ n : ℕ in atTop, C * ((n : ℝ) * ∫ x in {x | η ≤ |x|}, x ^ 2 ∂Q n) < ε / 2 := by have he := Metric.tendsto_nhds.mp htail (ε / 2) (by positivity) filter_upwards [he] with n hn rw [Real.dist_eq, sub_zero] at hn exact (le_abs_self _).trans_lt hn apply Filter.eventually_atTop.mp filter_upwards [hsecondEventually, htailEventually] with n hnsecond hntail rw [dist_zero_right] have hrem := integral_norm_expQuadraticRemainder_le (fun x : ℝ => x) (hQ2 n) t η hη htη have hnorm : ‖R n‖ ≤ A * η * (∫ x, x ^ 2 ∂Q n) + C * (∫ x, if η < |x| then x ^ 2 else 0 ∂Q n) := by calc ‖R n‖ ≤ ∫ x, ‖Causalean.Stat.expQuadraticRemainder (t * x)‖ ∂Q n := norm_integral_le_integral_norm _ _ ≤ A * η * (∫ x, x ^ 2 ∂Q n) + C * (∫ x, if η < |x| then x ^ 2 else 0 ∂Q n) := by simpa only [A, C] using hrem calc ‖(n : ℂ) * R n‖ = (n : ℝ) * ‖R n‖ := by simp _ ≤ (n : ℝ) * (A * η * (∫ x, x ^ 2 ∂Q n) + C * (∫ x, if η < |x| then x ^ 2 else 0 ∂Q n)) := mul_le_mul_of_nonneg_left hnorm (Nat.cast_nonneg n) _ = A * η * ((n : ℝ) * ∫ x, x ^ 2 ∂Q n) + C * ((n : ℝ) * ∫ x, if η < |x| then x ^ 2 else 0 ∂Q n) := by ring _ ≤ A * η * ((n : ℝ) * ∫ x, x ^ 2 ∂Q n) + C * ((n : ℝ) * ∫ x in {x | η ≤ |x|}, x ^ 2 ∂Q n) := by gcongr exact htrunc_le n η _ < ε := by have hfirst : A * η * ((n : ℝ) * ∫ x, x ^ 2 ∂Q n) ≤ ε / 4 := (mul_le_mul_of_nonneg_left hnsecond.le (mul_nonneg hA hη.le)).trans hsmall linarith let z : ℂ := -((((σ2 : ℝ) * t ^ 2 / 2 : ℝ) : ℂ)) have hscaledChar : Tendsto (fun n : ℕ => (n : ℂ) * (charFun (Q n) t - 1)) atTop (𝓝 z) := by have hsecondComplex : Tendsto (fun n : ℕ => (((n : ℝ) * ∫ x, x ^ 2 ∂Q n : ℝ) : ℂ)) atTop (𝓝 ((σ2 : ℝ) : ℂ)) := hsecond.ofReal have hquadratic := hsecondComplex.const_mul (-(((t ^ 2 / 2 : ℝ) : ℂ))) have hsum := hquadratic.add hRscaled have hlimit : -(((t ^ 2 / 2 : ℝ) : ℂ)) * (((σ2 : ℝ) : ℂ)) + 0 = z := by dsimp [z] push_cast ring rw [hlimit] at hsum apply hsum.congr' filter_upwards with n rw [hchar n] push_cast ring have hpow := Complex.tendsto_one_add_pow_exp_of_tendsto hscaledChar have hgaussian : charFun (gaussianReal 0 σ2) t = exp z := by rw [charFun_gaussianReal] dsimp [z] push_cast congr 1 ring rw [hgaussian] convert hpow using 1 funext n congr 1 ring -
memLp_id_scaledRowMeasurelemma — A sequence of row laws, row index, and square-integrable row draw ensure that the correspondingly scaled row draw is square-integrable.hypothesesconclusionMemLp id 2 (scaledRowMeasure R n)Proof (Lean source)
lemma memLp_id_scaledRowMeasure (R : ℕ → Measure ℝ) (n : ℕ) (hR2 : MemLp id 2 (R n)) : MemLp id 2 (scaledRowMeasure R n) := by unfold scaledRowMeasure refine (memLp_map_measure_iff aestronglyMeasurable_id (by fun_prop)).2 ?_ simpa [Function.comp_def] using hR2.const_mul ((sqrt (n : ℝ))⁻¹) -
integral_id_scaledRowMeasure_eq_zerolemma — A sequence of row laws, row index, square-integrable row draw, and zero row mean ensure that the scaled row mean is zero.hypothesesconclusion∫ x, x ∂scaledRowMeasure R n = 0Proof (Lean source)
lemma integral_id_scaledRowMeasure_eq_zero (R : ℕ → Measure ℝ) (n : ℕ) (hR2 : MemLp id 2 (R n)) (hcenter : ∫ x, x ∂R n = 0) : ∫ x, x ∂scaledRowMeasure R n = 0 := by have hident := (memLp_id_scaledRowMeasure R n hR2).aestronglyMeasurable change AEStronglyMeasurable (fun x : ℝ => x) (scaledRowMeasure R n) at hident unfold scaledRowMeasure at hident ⊢ rw [integral_map (μ := R n) (φ := fun x : ℝ => (sqrt (n : ℝ))⁻¹ * x) (f := fun x : ℝ => x) (by fun_prop) hident] rw [integral_const_mul, hcenter, mul_zero] -
integral_sq_scaledRowMeasurelemma — A sequence of row laws, positive row index, and square-integrable row draw ensure that the scaled second moment is the original second moment divided by the row size.hypothesesconclusion∫ x, x ^ 2 ∂scaledRowMeasure R n = ((n : ℝ)⁻¹ * ∫ x, x ^ 2 ∂R n)Proof (Lean source)
lemma integral_sq_scaledRowMeasure (R : ℕ → Measure ℝ) (n : ℕ) (hn : n ≠ 0) (hR2 : MemLp id 2 (R n)) : ∫ x, x ^ 2 ∂scaledRowMeasure R n = ((n : ℝ)⁻¹ * ∫ x, x ^ 2 ∂R n) := by have hident := (memLp_id_scaledRowMeasure R n hR2).aestronglyMeasurable change AEStronglyMeasurable (fun x : ℝ => x) (scaledRowMeasure R n) at hident have hsq := hident.pow 2 change AEStronglyMeasurable (fun x : ℝ => x ^ 2) (scaledRowMeasure R n) at hsq unfold scaledRowMeasure at hsq ⊢ rw [integral_map (μ := R n) (φ := fun x : ℝ => (sqrt (n : ℝ))⁻¹ * x) (f := fun x : ℝ => x ^ 2) (by fun_prop) hsq] have hnpos : 0 < (n : ℝ) := by positivity calc ∫ x, ((sqrt (n : ℝ))⁻¹ * x) ^ 2 ∂R n = ∫ x, ((sqrt (n : ℝ))⁻¹ ^ 2) * x ^ 2 ∂R n := by congr 1 funext x ring _ = (sqrt (n : ℝ))⁻¹ ^ 2 * ∫ x, x ^ 2 ∂R n := integral_const_mul _ _ _ = (n : ℝ)⁻¹ * ∫ x, x ^ 2 ∂R n := by rw [inv_pow, Real.sq_sqrt hnpos.le] -
setIntegral_sq_scaledRowMeasurelemma — A sequence of row laws, positive row index, square-integrable row draw, and threshold ensure that the scaled Lindeberg tail moment is the original tail moment above the square-root-scaled threshold, divided by the row size.hypothesesconclusion∫ x in {x | ε ≤ |x|}, x ^ 2 ∂scaledRowMeasure R n= (n : ℝ)⁻¹ * ∫ x in {x | ε * sqrt (n : ℝ) ≤ |x|}, x ^ 2 ∂R nProof (Lean source)
lemma setIntegral_sq_scaledRowMeasure (R : ℕ → Measure ℝ) (n : ℕ) (hn : n ≠ 0) (hR2 : MemLp id 2 (R n)) (ε : ℝ) : ∫ x in {x | ε ≤ |x|}, x ^ 2 ∂scaledRowMeasure R n = (n : ℝ)⁻¹ * ∫ x in {x | ε * sqrt (n : ℝ) ≤ |x|}, x ^ 2 ∂R n := by have hident := (memLp_id_scaledRowMeasure R n hR2).aestronglyMeasurable change AEStronglyMeasurable (fun x : ℝ => x) (scaledRowMeasure R n) at hident have hsq := hident.pow 2 change AEStronglyMeasurable (fun x : ℝ => x ^ 2) (scaledRowMeasure R n) at hsq unfold scaledRowMeasure at hsq ⊢ rw [setIntegral_map (s := {x : ℝ | ε ≤ |x|}) (measurableSet_le measurable_const measurable_id.abs) hsq (by fun_prop)] have hnpos : 0 < (n : ℝ) := by positivity have hsqrtpos : 0 < sqrt (n : ℝ) := Real.sqrt_pos.2 hnpos have hpre : (fun x : ℝ => (sqrt (n : ℝ))⁻¹ * x) ⁻¹' {x : ℝ | ε ≤ |x|} = {x : ℝ | ε * sqrt (n : ℝ) ≤ |x|} := by ext x change ε ≤ |(sqrt (n : ℝ))⁻¹ * x| ↔ ε * sqrt (n : ℝ) ≤ |x| rw [← div_eq_inv_mul, abs_div, abs_of_pos hsqrtpos, le_div_iff₀ hsqrtpos] rw [hpre] calc ∫ x in {x : ℝ | ε * sqrt (n : ℝ) ≤ |x|}, ((sqrt (n : ℝ))⁻¹ * x) ^ 2 ∂R n = ∫ x in {x : ℝ | ε * sqrt (n : ℝ) ≤ |x|}, ((sqrt (n : ℝ))⁻¹ ^ 2) * x ^ 2 ∂R n := by congr 1 funext x ring _ = (sqrt (n : ℝ))⁻¹ ^ 2 * ∫ x in {x : ℝ | ε * sqrt (n : ℝ) ≤ |x|}, x ^ 2 ∂R n := integral_const_mul _ _ _ = (n : ℝ)⁻¹ * ∫ x in {x : ℝ | ε * sqrt (n : ℝ) ≤ |x|}, x ^ 2 ∂R n := by rw [inv_pow, Real.sq_sqrt hnpos.le]
MultivariateCLT 4 core · 3 supporting This file proves the Cramér-Wold reduction for normalized sums of finite-dimensional vector-valued functions of an i.i.d. ★ of_charFun_tendsto★ clt_normalizedSum_vec_of_charFun★ tendsto_normal_vec_clt
Multivariate Central Limit Theorem
This file proves the Cramér-Wold reduction for normalized sums of finite-dimensional vector-valued functions of an i.i.d. sample. It provides the abstract multivariate central limit theorem used by vector asymptotic linearity and the delta method, with the concrete Gaussian law supplied in the Gaussian limit module.
Important declarations include inner_normalizedSum, which identifies each
projection of the vector normalized sum with a scalar normalized sum,
IIDSample.normalizedSum_vec_charFun_tendsto for the per-direction
characteristic-function limit, Modes.TendstoInLaw.of_charFun_tendsto for the
Cramér-Wold wrapper, IIDSample.clt_normalizedSum_vec_of_charFun for the
abstract Gaussian-target CLT, and IsAsymLinearVec.tendsto_normal_vec_clt for
end-to-end vector asymptotic normality.
Range index family (the full-sample case).
Cramér–Wold / Lévy continuity wrapper. For an E-valued sequence Xn, if each Xn n is a.e. measurable and the characteristic functions of Xn n converge pointwise, at every point t, to the characteristic function of a probability measure Q, then the sequence Xn converges in distribution to Q.
Formal statement
Proof (Lean source)
Multivariate CLT contact. Along the i.i.d. sample S, for an influence function ψ that is measurable, has population mean zero, and is square-integrable, and a target probability measure Q on E whose characteristic function is the Gaussian one at every point t, then the vector normalised sum converges in distribution to Q.
Formal statement
Proof (Lean source)
Vector asymptotic normality from asymptotic linearity (no CLT hypothesis). Given that θn is vector-asymptotically-linear at θ₀ with influence function ψ along the i.i.d. sample S, where ψ is measurable, a target probability measure Q on E whose characteristic function is the Gaussian one at every point t, and the rescaled estimator is a.e. measurable at every sample size, then the pushforward laws of the rescaled estimator converge to Q.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
inner_normalizedSumtheorem — The inner product of t with the vector normalised sum is the scalar normalised sum of the projected influence function x ↦ ⟪t, ψ x⟫.hypothesesΩ :sharedType u_1X :sharedType u_2E :sharedType u_3S :IIDSample Ω X μ Pψ :X → Et :EI :ℕ → Finset ℕn :ℕω :Ωconclusion⟪t, IsAsymLinearVec.normalizedSum S ψ I n ω⟫= IsAsymLinear.normalizedSum S (fun x => ⟪t, ψ x⟫) I n ωProof (Lean source)
theorem inner_normalizedSum (S : IIDSample Ω X μ P) (ψ : X → E) (t : E) (I : ℕ → Finset ℕ) (n : ℕ) (ω : Ω) : ⟪t, IsAsymLinearVec.normalizedSum S ψ I n ω⟫ = IsAsymLinear.normalizedSum S (fun x => ⟪t, ψ x⟫) I n ω := by simp only [IsAsymLinearVec.normalizedSum, IsAsymLinear.normalizedSum, real_inner_smul_right, inner_sum] -
normalizedSum_vec_charFun_tendsto_of_proj_integrabletheorem — Per-direction charFun limit (general core). Assuming only that the scalar projection ⟪t,ψ⟫ in the chosen direction t is square-integrable (weaker than requiring the whole vector ψ to be square-integrable) and mean-zero, the characteristic function of the vector normalised sum, evaluated at t, converges to exp(−½ ∫⟪t,ψ⟫² dP). The full-vector convenience form is normalizedSum_vec_charFun_tendsto below.hypothesesΩ :sharedType u_1X :sharedType u_2E :sharedType u_3S :IIDSample Ω X μ Pψ :X → Ehψ_meas :t :Ehvar_t :Integrable (fun x => (⟪t, ψ x⟫) ^ 2) Phmean :∫ x, ⟪t, ψ x⟫ ∂P = 0Proof (Lean source)
theorem IIDSample.normalizedSum_vec_charFun_tendsto_of_proj_integrable (S : IIDSample Ω X μ P) {ψ : X → E} (hψ_meas : Measurable ψ) (t : E) (hvar_t : Integrable (fun x => (⟪t, ψ x⟫) ^ 2) P) (hmean : ∫ x, ⟪t, ψ x⟫ ∂P = 0) : Tendsto (fun n => charFun (μ.map (IsAsymLinearVec.normalizedSum S ψ rng n)) t) atTop (𝓝 (exp (-(((∫ x, (⟪t, ψ x⟫) ^ 2 ∂P : ℝ)) : ℂ) / 2))) := by haveI : IsProbabilityMeasure μ := S.indep.isProbabilityMeasure haveI : IsProbabilityMeasure P := by rw [← S.law] exact Measure.isProbabilityMeasure_map (S.meas 0).aemeasurable -- projected influence function and its regularity set ψt : X → ℝ := fun x => ⟪t, ψ x⟫ with hψt_def have hψt_meas : Measurable ψt := by have h : Measurable (fun x => (innerSL ℝ t) (ψ x)) := (innerSL ℝ t).continuous.measurable.comp hψ_meas simpa [innerSL_apply_apply, hψt_def] using h have hψt_mean : ∫ x, ψt x ∂P = 0 := by simpa [hψt_def] using hmean have hψt_var : Integrable (fun x => (ψt x) ^ 2) P := by simpa [hψt_def] using hvar_t -- measurability of the partial sums (mirrors `IIDSample.measurable_sampleMean`) have hSumScalar_meas : ∀ n, AEMeasurable (IsAsymLinear.normalizedSum S ψt rng n) μ := by intro n unfold IsAsymLinear.normalizedSum exact ((Finset.measurable_sum _ (fun i _ => hψt_meas.comp (S.meas i))).const_mul _).aemeasurable have hSumVec_meas : ∀ n, AEMeasurable (IsAsymLinearVec.normalizedSum S ψ rng n) μ := by intro n unfold IsAsymLinearVec.normalizedSum exact ((Finset.measurable_sum _ (fun i _ => hψ_meas.comp (S.meas i))).const_smul _).aemeasurable -- scalar CLT for the projected influence function have h_scalar := S.clt_normalized_sum hψt_meas hψt_mean hψt_var replace h_scalar := (Tendsto_dist_iff _ _ _ h_scalar.forall_aemeasurable).1 h_scalar -- convert weak convergence to pointwise charFun convergence (Lévy, E = ℝ) have h_char1 : Tendsto (fun n => charFun (μ.map (IsAsymLinear.normalizedSum S ψt rng n)) (1 : ℝ)) atTop (𝓝 (charFun (gaussianMeasure 0 (∫ x, (ψt x) ^ 2 ∂P)) (1 : ℝ))) := by have h := (MeasureTheory.ProbabilityMeasure.tendsto_iff_tendsto_charFun.mp h_scalar) (1 : ℝ) simpa [ProbabilityMeasure.coe_mk] using h -- the scalar charFun limit equals the announced complex exponential have hv_nonneg : 0 ≤ ∫ x, (ψt x) ^ 2 ∂P := integral_nonneg fun x => sq_nonneg _ have h_gauss : charFun (gaussianMeasure 0 (∫ x, (ψt x) ^ 2 ∂P)) (1 : ℝ) = exp (-(((∫ x, (ψt x) ^ 2 ∂P : ℝ)) : ℂ) / 2) := by rw [gaussianMeasure, charFun_gaussianReal] push_cast [Real.coe_toNNReal _ hv_nonneg] ring_nf -- charFun of the vector sum at `t` equals the scalar charFun at `1` have h_bridge : ∀ n, charFun (μ.map (IsAsymLinearVec.normalizedSum S ψ rng n)) t = charFun (μ.map (IsAsymLinear.normalizedSum S ψt rng n)) (1 : ℝ) := by intro n rw [charFun_apply, charFun_apply_real, integral_map (hSumVec_meas n) (by fun_prop), integral_map (hSumScalar_meas n) (by fun_prop)] refine integral_congr_ae (ae_of_all _ fun ω => ?_) have hval : (⟪IsAsymLinearVec.normalizedSum S ψ rng n ω, t⟫ : ℝ) = IsAsymLinear.normalizedSum S ψt rng n ω := by rw [real_inner_comm]; exact inner_normalizedSum S ψ t rng n ω simp only [hval, Complex.ofReal_one, one_mul] -- assemble have hfun : (fun n => charFun (μ.map (IsAsymLinearVec.normalizedSum S ψ rng n)) t) = (fun n => charFun (μ.map (IsAsymLinear.normalizedSum S ψt rng n)) (1 : ℝ)) := funext h_bridge rw [hfun] rw [h_gauss] at h_char1 exact h_char1 -
normalizedSum_vec_charFun_tendstotheorem — Per-direction charFun limit (full-vector form). Convenience wrapper of normalizedSum_vec_charFun_tendsto_of_proj_integrable for the common case where the whole vector ψ is square-integrable: the projection ⟪t,ψ⟫ is then square-integrable by Cauchy–Schwarz, so callers holding the standard full-vector L² condition need not re-establish the per-direction one.hypothesesΩ :sharedType u_1X :sharedType u_2E :sharedType u_3S :IIDSample Ω X μ Pψ :X → Ehψ_meas :hvar :Integrable (fun x => ‖ψ x‖ ^ 2) Pt :Ehmean :∫ x, ⟪t, ψ x⟫ ∂P = 0Proof (Lean source)
theorem IIDSample.normalizedSum_vec_charFun_tendsto (S : IIDSample Ω X μ P) {ψ : X → E} (hψ_meas : Measurable ψ) (hvar : Integrable (fun x => ‖ψ x‖ ^ 2) P) (t : E) (hmean : ∫ x, ⟪t, ψ x⟫ ∂P = 0) : Tendsto (fun n => charFun (μ.map (IsAsymLinearVec.normalizedSum S ψ rng n)) t) atTop (𝓝 (exp (-(((∫ x, (⟪t, ψ x⟫) ^ 2 ∂P : ℝ)) : ℂ) / 2))) := by have hψt_meas : Measurable (fun x => (⟪t, ψ x⟫ : ℝ)) := by have h : Measurable (fun x => (innerSL ℝ t) (ψ x)) := (innerSL ℝ t).continuous.measurable.comp hψ_meas simpa [innerSL_apply_apply] using h have hvar_t : Integrable (fun x => (⟪t, ψ x⟫) ^ 2) P := by have hbd : Integrable (fun x => ‖t‖ ^ 2 * ‖ψ x‖ ^ 2) P := hvar.const_mul _ refine hbd.mono' (hψt_meas.pow_const 2).aestronglyMeasurable (ae_of_all _ fun x => ?_) rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] have hsq : (⟪t, ψ x⟫) ^ 2 ≤ (‖t‖ * ‖ψ x‖) ^ 2 := by nlinarith [abs_real_inner_le_norm t (ψ x), abs_nonneg (⟪t, ψ x⟫ : ℝ), sq_abs (⟪t, ψ x⟫ : ℝ), norm_nonneg t, norm_nonneg (ψ x)] calc (⟪t, ψ x⟫) ^ 2 ≤ (‖t‖ * ‖ψ x‖) ^ 2 := hsq _ = ‖t‖ ^ 2 * ‖ψ x‖ ^ 2 := by ring exact S.normalizedSum_vec_charFun_tendsto_of_proj_integrable hψ_meas t hvar_t hmean
SampleFnEstimator 2 core · 1 supporting This module bridges the ambient-probability-space formulation used by the asymptotic theory with estimators implemented as functions of the finite sample vector. ★ zEstimator_tendsto_normal_of_sampleFn
Estimators defined on finite sample vectors
This module bridges the ambient-probability-space formulation used by the
asymptotic theory with estimators implemented as functions of the finite sample
vector. It supplies the canonical Fin n sample vector of an IIDSample and
specializes the Z-estimator asymptotic-linearity and normality theorems to such
sample functions.
For an iid sample, a sample size, and an outcome, the finite sample vector sends each index below n to the corresponding observation.
Sample-function Z-estimator asymptotic normality. Under Z-estimator regularity, if an estimator on finite sample vectors, evaluated on an iid sample, is consistent, is stochastically equicontinuous, has a negligible normalized sample-score residual, and has measurable rescalings, then its rescaled laws converge to the concrete Gaussian generated by the inverse-Jacobian influence function.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
zEstimator_asymLinear_of_sampleFntheorem — Sample-function Z-estimator asymptotic linearity. Given a score, target, population law, and Z-estimator regularity, let an estimator function on every finite sample vector be evaluated on the finite vector drawn from an iid sample. If the resulting estimator is consistent, has stochastic equicontinuity, and has a normalized empirical score that is negligible in probability, then that sample-function estimator is asymptotically linear with the usual inverse-Jacobian influence function.hypothesesΩ :sharedType u_1X :sharedType u_2E :sharedType u_3ψ :E → X → Eθ₀ :EP :Measure Xreg :ZEstimatorRegularity ψ θ₀ PS :IIDSample Ω X μ Pest :(n : ℕ) → (Fin n → X) → EhStochEquicont :StochEquicontAt ψ θ₀ P μ S (fun n ω => est n (S.sampleVector n ω))hMoment :IsLittleOp (fun n ω => ‖(sqrt (n : ℝ))⁻¹ • ∑ i ∈ range n, ψ (est n (S.sampleVector n ω)) (S.Z i ω)‖) (fun _ => (1 : ℝ)) μconclusionIsAsymLinearVec (E := E) (fun n ω => est n (S.sampleVector n ω)) θ₀ (fun z => -(reg.J₀_inv (ψ θ₀ z))) S (fun n => range n)Proof (Lean source)
theorem zEstimator_asymLinear_of_sampleFn (ψ : E → X → E) (θ₀ : E) (P : Measure X) (reg : ZEstimatorRegularity ψ θ₀ P) [IsProbabilityMeasure μ] (S : IIDSample Ω X μ P) (est : (n : ℕ) → (Fin n → X) → E) (hConsistent : ∀ ε > 0, Tendsto (fun n => μ {ω | ε < ‖est n (S.sampleVector n ω) - θ₀‖}) atTop (𝓝 0)) (hStochEquicont : StochEquicontAt ψ θ₀ P μ S (fun n ω => est n (S.sampleVector n ω))) (hMoment : IsLittleOp (fun n ω => ‖(sqrt (n : ℝ))⁻¹ • ∑ i ∈ range n, ψ (est n (S.sampleVector n ω)) (S.Z i ω)‖) (fun _ => (1 : ℝ)) μ) : IsAsymLinearVec (E := E) (fun n ω => est n (S.sampleVector n ω)) θ₀ (fun z => -(reg.J₀_inv (ψ θ₀ z))) S (fun n => range n) := zEstimator_asymLinear ψ θ₀ P reg S (fun n ω => est n (S.sampleVector n ω)) hConsistent hStochEquicont hMoment
SecondMomentOperator 3 core · 1 supporting This file constructs the second-moment operator associated with a vector-valued influence function. ★ secondMomentLM_inner★ secondMomentLM_isPositive
Second-Moment Operator
This file constructs the second-moment operator associated with a vector-valued influence function. The operator supplies the covariance object whose positive square root is used in vector central limit theorems.
The helper theorem integrable_inner_smul proves integrability of the operator
integrand. The main API is secondMomentLM, the bilinear-form identity
secondMomentLM_inner, and secondMomentLM_isPositive, which supplies the
positivity needed to take the operator square root used by the concrete Gaussian
limit.
Let be a measure on a measurable sample space, and let a function take values in a second-countable real inner-product space equipped with its Borel σ-algebra and measurable scalar multiplication. Given that function is measurable and its squared norm is integrable under , the second-moment operator maps each vector to the integral of the vector-valued function that multiplies the function value by its inner product with .
Definition (Lean source)
For vectors t and s, the inner product of the second-moment operator applied to t with s equals the expectation under P of the product of the inner products ⟪t, ψ⟩ and ⟪s, ψ⟩.
Formal statement
Proof (Lean source)
The second-moment operator is a positive linear operator, hence symmetric and self-adjoint.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
integrable_inner_smultheorem — The integrand x ↦ ⟪t, ψ x⟫ • ψ x is integrable when ‖ψ‖² is, by the Cauchy–Schwarz bound ‖⟪t,ψ⟫ • ψ‖ ≤ ‖t‖ ‖ψ‖².hypothesesX :sharedType u_1E :sharedType u_2ψ :sharedX → Ehψ :hvar :Integrable (fun x => ‖ψ x‖ ^ 2) Pt :EconclusionIntegrable (fun x => ⟪t, ψ x⟫ • ψ x) PProof (Lean source)
@[fun_prop] theorem integrable_inner_smul (hψ : Measurable ψ) (hvar : Integrable (fun x => ‖ψ x‖ ^ 2) P) (t : E) : Integrable (fun x => ⟪t, ψ x⟫ • ψ x) P := by have hmeas : AEStronglyMeasurable (fun x => ⟪t, ψ x⟫ • ψ x) P := ((hψ.const_inner (c := t)).smul hψ).aestronglyMeasurable refine Integrable.mono' (hvar.const_mul ‖t‖) hmeas (ae_of_all _ fun x => ?_) rw [norm_smul, Real.norm_eq_abs] calc |⟪t, ψ x⟫| * ‖ψ x‖ ≤ (‖t‖ * ‖ψ x‖) * ‖ψ x‖ := by gcongr; exact abs_real_inner_le_norm t (ψ x) _ = ‖t‖ * ‖ψ x‖ ^ 2 := by ring
VectorWLLN 2 core · 2 supporting This module extends the scalar weak law to integrable statistics taking values in a separable Banach space. ★ sampleMeanVec_tendstoInMeasure
Banach-valued weak laws for iid sample means
This module extends the scalar weak law to integrable statistics taking values
in a separable Banach space. It packages the normalized finite sum, proves its
measurability, derives convergence in measure from the Banach-valued strong
law, and records the corresponding o_p(1) norm statement used for empirical
Jacobian averages.
For an iid sample and a Banach-valued statistic, the vector sample mean is the normalized sum over the first n observations.
Banach-valued weak law of large numbers. For an iid sample, if a Banach-valued statistic is measurable and integrable under the population law, then its vector sample mean converges in measure to its population mean.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
measurable_sampleMeanVectheorem — For an iid sample and a Banach-valued statistic with a measurability witness, at each sample size, the vector sample mean is measurable.hypothesesΩ :sharedType u_1X :sharedType u_2F :sharedType u_3S :IIDSample Ω X μ Pg :X → Fhg_meas :n :ℕconclusionMeasurable (S.sampleMeanVec g n)Proof (Lean source)
@[fun_prop] theorem measurable_sampleMeanVec (S : IIDSample Ω X μ P) {g : X → F} (hg_meas : Measurable g) (n : ℕ) : Measurable (S.sampleMeanVec g n) := by unfold sampleMeanVec exact (Finset.measurable_sum _ (fun i _ => hg_meas.comp (S.meas i))).const_smul _ -
sampleMeanVec_norm_sub_isLittleOptheorem — For an iid sample, if a Banach-valued statistic is measurable and integrable, then the norm of its vector sample mean minus its population mean is o_p(1).hypothesesΩ :sharedType u_1X :sharedType u_2F :sharedType u_3S :IIDSample Ω X μ Pg :X → Fhg_meas :hg_int :Integrable g PconclusionIsLittleOp (fun n ω => ‖S.sampleMeanVec g n ω - ∫ x, g x ∂P‖) (fun _ => (1 : ℝ)) μProof (Lean source)
theorem sampleMeanVec_norm_sub_isLittleOp (S : IIDSample Ω X μ P) {g : X → F} (hg_meas : Measurable g) (hg_int : Integrable g P) : IsLittleOp (fun n ω => ‖S.sampleMeanVec g n ω - ∫ x, g x ∂P‖) (fun _ => (1 : ℝ)) μ := by have hvec := S.sampleMeanVec_tendstoInMeasure hg_meas hg_int have hprob : Modes.TendstoInProbability (fun _ : ℕ => μ) (fun n ω => ‖S.sampleMeanVec g n ω - ∫ x, g x ∂P‖) atTop (fun _ _ => 0) := by rw [Tendsto_inProb_iff] rw [tendstoInMeasure_iff_norm] at hvec ⊢ simpa [Real.norm_eq_abs, abs_of_nonneg] using hvec exact Modes.TendstoInProbability.isLittleOp_one hprob