File: Mathlib/Probability/Kernel/Disintegration/CondCdf.lean

full_name: MeasureTheory.Measure.IicSnd
code: /-- Measure on `α` such that for a measurable set `s`, `ρ.IicSnd r s = ρ (s ×ˢ Iic r)`. -/
noncomputable def IicSnd (r : ℝ) : Measure α 
goal: MeasureTheory.Measure α

full_name: MeasureTheory.Measure.IicSnd_apply
code: theorem IicSnd_apply (r : ℝ) {s : Set α} (hs : MeasurableSet s) :
    ρ.IicSnd r s = ρ (s ×ˢ Iic r) 
goal: (ρ.IicSnd r) s = ρ (s ×ˢ Set.Iic r)

full_name: MeasureTheory.Measure.IicSnd_univ
code: theorem IicSnd_univ (r : ℝ) : ρ.IicSnd r univ = ρ (univ ×ˢ Iic r) 
goal: (ρ.IicSnd r) Set.univ = ρ (Set.univ ×ˢ Set.Iic r)

full_name: MeasureTheory.Measure.IicSnd_mono
code: theorem IicSnd_mono {r r' : ℝ} (h_le : r ≤ r') : ρ.IicSnd r ≤ ρ.IicSnd r' 
goal: ρ.IicSnd r ≤ ρ.IicSnd r'

full_name: MeasureTheory.Measure.IicSnd_le_fst
code: theorem IicSnd_le_fst (r : ℝ) : ρ.IicSnd r ≤ ρ.fst 
goal: ρ.IicSnd r ≤ ρ.fst

full_name: MeasureTheory.Measure.IicSnd_ac_fst
code: theorem IicSnd_ac_fst (r : ℝ) : ρ.IicSnd r ≪ ρ.fst 
goal: ρ.IicSnd r ≪ ρ.fst

full_name: MeasureTheory.Measure.IsFiniteMeasure.IicSnd
code: theorem IsFiniteMeasure.IicSnd {ρ : Measure (α × ℝ)} [IsFiniteMeasure ρ] (r : ℝ) :
    IsFiniteMeasure (ρ.IicSnd r) 
goal: MeasureTheory.IsFiniteMeasure (ρ.IicSnd r)

full_name: MeasureTheory.Measure.iInf_IicSnd_gt
code: theorem iInf_IicSnd_gt (t : ℚ) {s : Set α} (hs : MeasurableSet s) [IsFiniteMeasure ρ] :
    ⨅ r : { r' : ℚ // t < r' }, ρ.IicSnd r s = ρ.IicSnd t s 
goal: ⨅ r, (ρ.IicSnd ↑↑r) s = (ρ.IicSnd ↑t) s

full_name: MeasureTheory.Measure.tendsto_IicSnd_atTop
code: theorem tendsto_IicSnd_atTop {s : Set α} (hs : MeasurableSet s) :
    Tendsto (fun r : ℚ ↦ ρ.IicSnd r s) atTop (𝓝 (ρ.fst s)) 
goal: Filter.Tendsto (fun r => (ρ.IicSnd ↑r) s) Filter.atTop (𝓝 (ρ.fst s))

full_name: MeasureTheory.Measure.tendsto_IicSnd_atBot
code: theorem tendsto_IicSnd_atBot [IsFiniteMeasure ρ] {s : Set α} (hs : MeasurableSet s) :
    Tendsto (fun r : ℚ ↦ ρ.IicSnd r s) atBot (𝓝 0) 
goal: Filter.Tendsto (fun r => (ρ.IicSnd ↑r) s) Filter.atBot (𝓝 0)

full_name: ProbabilityTheory.preCDF
code: /-- `preCDF` is the Radon-Nikodym derivative of `ρ.IicSnd` with respect to `ρ.fst` at each
`r : ℚ`. This function `ℚ → α → ℝ≥0∞` is such that for almost all `a : α`, the function `ℚ → ℝ≥0∞`
satisfies the properties of a cdf (monotone with limit 0 at -∞ and 1 at +∞, right-continuous).

We define this function on `ℚ` and not `ℝ` because `ℚ` is countable, which allows us to prove
properties of the form `∀ᵐ a ∂ρ.fst, ∀ q, P (preCDF q a)`, instead of the weaker
`∀ q, ∀ᵐ a ∂ρ.fst, P (preCDF q a)`. -/
noncomputable def preCDF (ρ : Measure (α × ℝ)) (r : ℚ) : α → ℝ≥0∞ 
goal: α → ℝ≥0∞

full_name: ProbabilityTheory.measurable_preCDF
code: theorem measurable_preCDF {ρ : Measure (α × ℝ)} {r : ℚ} : Measurable (preCDF ρ r) 
goal: Measurable (ProbabilityTheory.preCDF ρ r)

full_name: ProbabilityTheory.measurable_preCDF'
code: lemma measurable_preCDF' {ρ : Measure (α × ℝ)} :
    Measurable fun a r ↦ (preCDF ρ r a).toReal 
goal: Measurable fun a r => (ProbabilityTheory.preCDF ρ r a).toReal

full_name: ProbabilityTheory.withDensity_preCDF
code: theorem withDensity_preCDF (ρ : Measure (α × ℝ)) (r : ℚ) [IsFiniteMeasure ρ] :
    ρ.fst.withDensity (preCDF ρ r) = ρ.IicSnd r 
goal: ρ.fst.withDensity (ProbabilityTheory.preCDF ρ r) = ρ.IicSnd ↑r

full_name: ProbabilityTheory.setLIntegral_preCDF_fst
code: theorem setLIntegral_preCDF_fst (ρ : Measure (α × ℝ)) (r : ℚ) {s : Set α} (hs : MeasurableSet s)
    [IsFiniteMeasure ρ] : ∫⁻ x in s, preCDF ρ r x ∂ρ.fst = ρ.IicSnd r s 
goal: ∫⁻ (x : α) in s, ProbabilityTheory.preCDF ρ r x ∂ρ.fst = (ρ.IicSnd ↑r) s

full_name: ProbabilityTheory.lintegral_preCDF_fst
code: lemma lintegral_preCDF_fst (ρ : Measure (α × ℝ)) (r : ℚ) [IsFiniteMeasure ρ] :
    ∫⁻ x, preCDF ρ r x ∂ρ.fst = ρ.IicSnd r univ 
goal: ∫⁻ (x : α), ProbabilityTheory.preCDF ρ r x ∂ρ.fst = (ρ.IicSnd ↑r) Set.univ

full_name: ProbabilityTheory.monotone_preCDF
code: theorem monotone_preCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] :
    ∀ᵐ a ∂ρ.fst, Monotone fun r ↦ preCDF ρ r a 
goal: ∀ᵐ (a : α) ∂ρ.fst, Monotone fun r => ProbabilityTheory.preCDF ρ r a

full_name: ProbabilityTheory.preCDF_le_one
code: theorem preCDF_le_one (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] :
    ∀ᵐ a ∂ρ.fst, ∀ r, preCDF ρ r a ≤ 1 
goal: ∀ᵐ (a : α) ∂ρ.fst, ∀ (r : ℚ), ProbabilityTheory.preCDF ρ r a ≤ 1

full_name: ProbabilityTheory.setIntegral_preCDF_fst
code: lemma setIntegral_preCDF_fst (ρ : Measure (α × ℝ)) (r : ℚ) {s : Set α} (hs : MeasurableSet s)
    [IsFiniteMeasure ρ] :
    ∫ x in s, (preCDF ρ r x).toReal ∂ρ.fst = (ρ.IicSnd r s).toReal 
goal: ∫ (x : α) in s, (ProbabilityTheory.preCDF ρ r x).toReal ∂ρ.fst = ((ρ.IicSnd ↑r) s).toReal

full_name: ProbabilityTheory.integral_preCDF_fst
code: lemma integral_preCDF_fst (ρ : Measure (α × ℝ)) (r : ℚ) [IsFiniteMeasure ρ] :
    ∫ x, (preCDF ρ r x).toReal ∂ρ.fst = (ρ.IicSnd r univ).toReal 
goal: ∫ (x : α), (ProbabilityTheory.preCDF ρ r x).toReal ∂ρ.fst = ((ρ.IicSnd ↑r) Set.univ).toReal

full_name: ProbabilityTheory.integrable_preCDF
code: lemma integrable_preCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℚ) :
    Integrable (fun a ↦ (preCDF ρ x a).toReal) ρ.fst 
goal: MeasureTheory.Integrable (fun a => (ProbabilityTheory.preCDF ρ x a).toReal) ρ.fst

full_name: ProbabilityTheory.isRatCondKernelCDFAux_preCDF
code: lemma isRatCondKernelCDFAux_preCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] :
    IsRatCondKernelCDFAux (fun p r ↦ (preCDF ρ r p.2).toReal)
      (Kernel.const Unit ρ) (Kernel.const Unit ρ.fst) 
goal: ProbabilityTheory.IsRatCondKernelCDFAux (fun p r => (ProbabilityTheory.preCDF ρ r p.2).toReal)
  (ProbabilityTheory.Kernel.const Unit ρ) (ProbabilityTheory.Kernel.const Unit ρ.fst)

full_name: ProbabilityTheory.isRatCondKernelCDF_preCDF
code: lemma isRatCondKernelCDF_preCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] :
    IsRatCondKernelCDF (fun p r ↦ (preCDF ρ r p.2).toReal)
      (Kernel.const Unit ρ) (Kernel.const Unit ρ.fst) 
goal: ProbabilityTheory.IsRatCondKernelCDF (fun p r => (ProbabilityTheory.preCDF ρ r p.2).toReal)
  (ProbabilityTheory.Kernel.const Unit ρ) (ProbabilityTheory.Kernel.const Unit ρ.fst)

full_name: ProbabilityTheory.condCDF
code: /-- Conditional cdf of the measure given the value on `α`, as a Stieltjes function. -/
noncomputable def condCDF (ρ : Measure (α × ℝ)) (a : α) : StieltjesFunction 
goal: StieltjesFunction

full_name: ProbabilityTheory.condCDF_eq_stieltjesOfMeasurableRat_unit_prod
code: lemma condCDF_eq_stieltjesOfMeasurableRat_unit_prod (ρ : Measure (α × ℝ)) (a : α) :
    condCDF ρ a = stieltjesOfMeasurableRat (fun (p : Unit × α) r ↦ (preCDF ρ r p.2).toReal)
      (measurable_preCDF'.comp measurable_snd) ((), a) 
goal: ProbabilityTheory.condCDF ρ a =
  ProbabilityTheory.stieltjesOfMeasurableRat (fun p r => (ProbabilityTheory.preCDF ρ r p.2).toReal) ⋯ ((), a)

full_name: ProbabilityTheory.isCondKernelCDF_condCDF
code: lemma isCondKernelCDF_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] :
    IsCondKernelCDF (fun p : Unit × α ↦ condCDF ρ p.2) (Kernel.const Unit ρ)
      (Kernel.const Unit ρ.fst) 
goal: ProbabilityTheory.IsCondKernelCDF (fun p => ProbabilityTheory.condCDF ρ p.2) (ProbabilityTheory.Kernel.const Unit ρ)
  (ProbabilityTheory.Kernel.const Unit ρ.fst)

full_name: ProbabilityTheory.condCDF_nonneg
code: /-- The conditional cdf is non-negative for all `a : α`. -/
theorem condCDF_nonneg (ρ : Measure (α × ℝ)) (a : α) (r : ℝ) : 0 ≤ condCDF ρ a r 
goal: 0 ≤ ↑(ProbabilityTheory.condCDF ρ a) r

full_name: ProbabilityTheory.condCDF_le_one
code: /-- The conditional cdf is lower or equal to 1 for all `a : α`. -/
theorem condCDF_le_one (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) : condCDF ρ a x ≤ 1 
goal: ↑(ProbabilityTheory.condCDF ρ a) x ≤ 1

full_name: ProbabilityTheory.tendsto_condCDF_atBot
code: /-- The conditional cdf tends to 0 at -∞ for all `a : α`. -/
theorem tendsto_condCDF_atBot (ρ : Measure (α × ℝ)) (a : α) :
    Tendsto (condCDF ρ a) atBot (𝓝 0) 
goal: Filter.Tendsto (↑(ProbabilityTheory.condCDF ρ a)) Filter.atBot (𝓝 0)

full_name: ProbabilityTheory.tendsto_condCDF_atTop
code: /-- The conditional cdf tends to 1 at +∞ for all `a : α`. -/
theorem tendsto_condCDF_atTop (ρ : Measure (α × ℝ)) (a : α) :
    Tendsto (condCDF ρ a) atTop (𝓝 1) 
goal: Filter.Tendsto (↑(ProbabilityTheory.condCDF ρ a)) Filter.atTop (𝓝 1)

full_name: ProbabilityTheory.condCDF_ae_eq
code: theorem condCDF_ae_eq (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (r : ℚ) :
    (fun a ↦ condCDF ρ a r) =ᵐ[ρ.fst] fun a ↦ (preCDF ρ r a).toReal 
goal: (fun a => ↑(ProbabilityTheory.condCDF ρ a) ↑r) =ᵐ[ρ.fst] fun a => (ProbabilityTheory.preCDF ρ r a).toReal

full_name: ProbabilityTheory.ofReal_condCDF_ae_eq
code: theorem ofReal_condCDF_ae_eq (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (r : ℚ) :
    (fun a ↦ ENNReal.ofReal (condCDF ρ a r)) =ᵐ[ρ.fst] preCDF ρ r 
goal: (fun a => ENNReal.ofReal (↑(ProbabilityTheory.condCDF ρ a) ↑r)) =ᵐ[ρ.fst] ProbabilityTheory.preCDF ρ r

full_name: ProbabilityTheory.measurable_condCDF
code: /-- The conditional cdf is a measurable function of `a : α` for all `x : ℝ`. -/
theorem measurable_condCDF (ρ : Measure (α × ℝ)) (x : ℝ) : Measurable fun a ↦ condCDF ρ a x 
goal: Measurable fun a => ↑(ProbabilityTheory.condCDF ρ a) x

full_name: ProbabilityTheory.stronglyMeasurable_condCDF
code: /-- The conditional cdf is a strongly measurable function of `a : α` for all `x : ℝ`. -/
theorem stronglyMeasurable_condCDF (ρ : Measure (α × ℝ)) (x : ℝ) :
    StronglyMeasurable fun a ↦ condCDF ρ a x 
goal: MeasureTheory.StronglyMeasurable fun a => ↑(ProbabilityTheory.condCDF ρ a) x

full_name: ProbabilityTheory.setLIntegral_condCDF
code: theorem setLIntegral_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℝ) {s : Set α}
    (hs : MeasurableSet s) :
    ∫⁻ a in s, ENNReal.ofReal (condCDF ρ a x) ∂ρ.fst = ρ (s ×ˢ Iic x) 
goal: ∫⁻ (a : α) in s, ENNReal.ofReal (↑(ProbabilityTheory.condCDF ρ a) x) ∂ρ.fst = ρ (s ×ˢ Set.Iic x)

full_name: ProbabilityTheory.lintegral_condCDF
code: theorem lintegral_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℝ) :
    ∫⁻ a, ENNReal.ofReal (condCDF ρ a x) ∂ρ.fst = ρ (univ ×ˢ Iic x) 
goal: ∫⁻ (a : α), ENNReal.ofReal (↑(ProbabilityTheory.condCDF ρ a) x) ∂ρ.fst = ρ (Set.univ ×ˢ Set.Iic x)

full_name: ProbabilityTheory.integrable_condCDF
code: theorem integrable_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℝ) :
    Integrable (fun a ↦ condCDF ρ a x) ρ.fst 
goal: MeasureTheory.Integrable (fun a => ↑(ProbabilityTheory.condCDF ρ a) x) ρ.fst

full_name: ProbabilityTheory.setIntegral_condCDF
code: theorem setIntegral_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℝ) {s : Set α}
    (hs : MeasurableSet s) : ∫ a in s, condCDF ρ a x ∂ρ.fst = (ρ (s ×ˢ Iic x)).toReal 
goal: ∫ (a : α) in s, ↑(ProbabilityTheory.condCDF ρ a) x ∂ρ.fst = (ρ (s ×ˢ Set.Iic x)).toReal

full_name: ProbabilityTheory.integral_condCDF
code: theorem integral_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℝ) :
    ∫ a, condCDF ρ a x ∂ρ.fst = (ρ (univ ×ˢ Iic x)).toReal 
goal: ∫ (a : α), ↑(ProbabilityTheory.condCDF ρ a) x ∂ρ.fst = (ρ (Set.univ ×ˢ Set.Iic x)).toReal

full_name: ProbabilityTheory.measure_condCDF_Iic
code: theorem measure_condCDF_Iic (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    (condCDF ρ a).measure (Iic x) = ENNReal.ofReal (condCDF ρ a x) 
goal: (ProbabilityTheory.condCDF ρ a).measure (Set.Iic x) = ENNReal.ofReal (↑(ProbabilityTheory.condCDF ρ a) x)

full_name: ProbabilityTheory.measure_condCDF_univ
code: theorem measure_condCDF_univ (ρ : Measure (α × ℝ)) (a : α) : (condCDF ρ a).measure univ = 1 
goal: (ProbabilityTheory.condCDF ρ a).measure Set.univ = 1

full_name: ProbabilityTheory.instIsProbabilityMeasureCondCDF
code: instance instIsProbabilityMeasureCondCDF (ρ : Measure (α × ℝ)) (a : α) :
    IsProbabilityMeasure (condCDF ρ a).measure 
goal: MeasureTheory.IsProbabilityMeasure (ProbabilityTheory.condCDF ρ a).measure

full_name: ProbabilityTheory.measurable_measure_condCDF
code: /-- The function `a ↦ (condCDF ρ a).measure` is measurable. -/
theorem measurable_measure_condCDF (ρ : Measure (α × ℝ)) :
    Measurable fun a => (condCDF ρ a).measure 
goal: Measurable fun a => (ProbabilityTheory.condCDF ρ a).measure