probability.martingale.optional_samplingMathlib.Probability.Martingale.OptionalSampling

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -38,11 +38,13 @@ open scoped MeasureTheory BigOperators ENNReal
 
 open TopologicalSpace
 
+/- warning: discrete_topology.second_countable_topology_of_countable clashes with discrete_topology.second_countable_topology_of_encodable -> DiscreteTopology.secondCountableTopology_of_countable
+Case conversion may be inaccurate. Consider using '#align discrete_topology.second_countable_topology_of_countable DiscreteTopology.secondCountableTopology_of_countableₓ'. -/
 #print DiscreteTopology.secondCountableTopology_of_countable /-
 -- TODO after the port: move to topology/instances/discrete
 instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type _}
     [TopologicalSpace α] [DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
-  @DiscreteTopology.secondCountableTopology_of_encodable _ _ _ (Encodable.ofCountable _)
+  @DiscreteTopology.secondCountableTopology_of_countable _ _ _ (Encodable.ofCountable _)
 #align discrete_topology.second_countable_topology_of_countable DiscreteTopology.secondCountableTopology_of_countable
 -/
 
@@ -103,7 +105,7 @@ theorem stoppedValue_ae_eq_restrict_eq (h : Martingale f ℱ μ) (hτ : IsStoppi
       (condexp_stopping_time_ae_eq_restrict_eq_const_of_le_const h hτ hτ_le i).symm
   rw [Filter.EventuallyEq, ae_restrict_iff' (ℱ.le _ _ (hτ.measurable_set_eq i))]
   refine' Filter.eventually_of_forall fun x hx => _
-  rw [Set.mem_setOf_eq] at hx 
+  rw [Set.mem_setOf_eq] at hx
   simp_rw [stopped_value, hx]
 #align measure_theory.martingale.stopped_value_ae_eq_restrict_eq MeasureTheory.Martingale.stoppedValue_ae_eq_restrict_eq
 -/
@@ -221,7 +223,7 @@ theorem condexp_stoppedValue_stopping_time_ae_eq_restrict_le (h : Martingale f 
         (hτ.measurable_set_le_stopping_time hσ) _ _ _
     · intro t ht
       rw [Set.inter_comm _ t] at ht ⊢
-      rw [hτ.measurable_set_inter_le_iff, is_stopping_time.measurable_set_min_iff hτ hσ] at ht 
+      rw [hτ.measurable_set_inter_le_iff, is_stopping_time.measurable_set_min_iff hτ hσ] at ht
       exact ht.2
     · refine' strongly_measurable.indicator _ (hτ.measurable_set_le_stopping_time hσ)
       refine' Measurable.stronglyMeasurable _
@@ -251,10 +253,10 @@ theorem stoppedValue_min_ae_eq_condexp [SigmaFiniteFiltration μ ℱ] (h : Marti
         μ[stopped_value f τ|hσ.measurable_space]
       by
       rw [ae_restrict_iff' (hσ.measurable_space_le _ (hσ.measurable_set_le_stopping_time hτ).compl)]
-      rw [Filter.EventuallyEq, ae_restrict_iff'] at this 
+      rw [Filter.EventuallyEq, ae_restrict_iff'] at this
       swap; · exact hτ.measurable_space_le _ (hτ.measurable_set_le_stopping_time hσ)
       filter_upwards [this] with x hx hx_mem
-      simp only [Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx_mem 
+      simp only [Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx_mem
       exact hx hx_mem.le
     refine'
       Filter.EventuallyEq.trans _ ((condexp_min_stopping_time_ae_eq_restrict_le hτ hσ).trans _)
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 -/
-import Mathbin.Order.SuccPred.LinearLocallyFinite
-import Mathbin.Probability.Martingale.Basic
+import Order.SuccPred.LinearLocallyFinite
+import Probability.Martingale.Basic
 
 #align_import probability.martingale.optional_sampling from "leanprover-community/mathlib"@"f2ad3645af9effcdb587637dc28a6074edc813f9"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module probability.martingale.optional_sampling
-! leanprover-community/mathlib commit f2ad3645af9effcdb587637dc28a6074edc813f9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Order.SuccPred.LinearLocallyFinite
 import Mathbin.Probability.Martingale.Basic
 
+#align_import probability.martingale.optional_sampling from "leanprover-community/mathlib"@"f2ad3645af9effcdb587637dc28a6074edc813f9"
+
 /-!
 # Optional sampling theorem
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 
 ! This file was ported from Lean 3 source module probability.martingale.optional_sampling
-! leanprover-community/mathlib commit ba074af83b6cf54c3104e59402b39410ddbd6dca
+! leanprover-community/mathlib commit f2ad3645af9effcdb587637dc28a6074edc813f9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Probability.Martingale.Basic
 /-!
 # Optional sampling theorem
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 If `τ` is a bounded stopping time and `σ` is another stopping time, then the value of a martingale
 `f` at the stopping time `min τ σ` is almost everywhere equal to
 `μ[stopped_value f τ | hσ.measurable_space]`.
Diff
@@ -38,11 +38,13 @@ open scoped MeasureTheory BigOperators ENNReal
 
 open TopologicalSpace
 
+#print DiscreteTopology.secondCountableTopology_of_countable /-
 -- TODO after the port: move to topology/instances/discrete
 instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type _}
     [TopologicalSpace α] [DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
   @DiscreteTopology.secondCountableTopology_of_encodable _ _ _ (Encodable.ofCountable _)
 #align discrete_topology.second_countable_topology_of_countable DiscreteTopology.secondCountableTopology_of_countable
+-/
 
 namespace MeasureTheory
 
@@ -57,6 +59,7 @@ variable {ι : Type _} [LinearOrder ι] [TopologicalSpace ι] [OrderTopology ι]
   [FirstCountableTopology ι] {ℱ : Filtration ι m} [SigmaFiniteFiltration μ ℱ] {τ σ : Ω → ι}
   {f : ι → Ω → E} {i n : ι}
 
+#print MeasureTheory.Martingale.condexp_stopping_time_ae_eq_restrict_eq_const /-
 theorem condexp_stopping_time_ae_eq_restrict_eq_const
     [(Filter.atTop : Filter ι).IsCountablyGenerated] (h : Martingale f ℱ μ)
     (hτ : IsStoppingTime ℱ τ) [SigmaFinite (μ.trim hτ.measurableSpace_le)] (hin : i ≤ n) :
@@ -68,7 +71,9 @@ theorem condexp_stopping_time_ae_eq_restrict_eq_const
       (hτ.measurable_set_eq' i) fun t => _
   rw [Set.inter_comm _ t, is_stopping_time.measurable_set_inter_eq_iff]
 #align measure_theory.martingale.condexp_stopping_time_ae_eq_restrict_eq_const MeasureTheory.Martingale.condexp_stopping_time_ae_eq_restrict_eq_const
+-/
 
+#print MeasureTheory.Martingale.condexp_stopping_time_ae_eq_restrict_eq_const_of_le_const /-
 theorem condexp_stopping_time_ae_eq_restrict_eq_const_of_le_const (h : Martingale f ℱ μ)
     (hτ : IsStoppingTime ℱ τ) (hτ_le : ∀ x, τ x ≤ n)
     [SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le))] (i : ι) :
@@ -86,7 +91,9 @@ theorem condexp_stopping_time_ae_eq_restrict_eq_const_of_le_const (h : Martingal
     rintro rfl
     exact hin (hτ_le x)
 #align measure_theory.martingale.condexp_stopping_time_ae_eq_restrict_eq_const_of_le_const MeasureTheory.Martingale.condexp_stopping_time_ae_eq_restrict_eq_const_of_le_const
+-/
 
+#print MeasureTheory.Martingale.stoppedValue_ae_eq_restrict_eq /-
 theorem stoppedValue_ae_eq_restrict_eq (h : Martingale f ℱ μ) (hτ : IsStoppingTime ℱ τ)
     (hτ_le : ∀ x, τ x ≤ n) [SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le))] (i : ι) :
     stoppedValue f τ =ᵐ[μ.restrict {x | τ x = i}] μ[f n|hτ.MeasurableSpace] :=
@@ -99,7 +106,9 @@ theorem stoppedValue_ae_eq_restrict_eq (h : Martingale f ℱ μ) (hτ : IsStoppi
   rw [Set.mem_setOf_eq] at hx 
   simp_rw [stopped_value, hx]
 #align measure_theory.martingale.stopped_value_ae_eq_restrict_eq MeasureTheory.Martingale.stoppedValue_ae_eq_restrict_eq
+-/
 
+#print MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le_const_of_countable_range /-
 /-- The value of a martingale `f` at a stopping time `τ` bounded by `n` is the conditional
 expectation of `f n` with respect to the σ-algebra generated by `τ`. -/
 theorem stoppedValue_ae_eq_condexp_of_le_const_of_countable_range (h : Martingale f ℱ μ)
@@ -116,7 +125,9 @@ theorem stoppedValue_ae_eq_condexp_of_le_const_of_countable_range (h : Martingal
   rw [this, ae_eq_restrict_bUnion_iff _ h_countable_range]
   exact fun i hi => stopped_value_ae_eq_restrict_eq h _ hτ_le i
 #align measure_theory.martingale.stopped_value_ae_eq_condexp_of_le_const_of_countable_range MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le_const_of_countable_range
+-/
 
+#print MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le_const /-
 /-- The value of a martingale `f` at a stopping time `τ` bounded by `n` is the conditional
 expectation of `f n` with respect to the σ-algebra generated by `τ`. -/
 theorem stoppedValue_ae_eq_condexp_of_le_const [Countable ι] (h : Martingale f ℱ μ)
@@ -125,7 +136,9 @@ theorem stoppedValue_ae_eq_condexp_of_le_const [Countable ι] (h : Martingale f
     stoppedValue f τ =ᵐ[μ] μ[f n|hτ.MeasurableSpace] :=
   h.stoppedValue_ae_eq_condexp_of_le_const_of_countable_range hτ hτ_le (Set.to_countable _)
 #align measure_theory.martingale.stopped_value_ae_eq_condexp_of_le_const MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le_const
+-/
 
+#print MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le_of_countable_range /-
 /-- If `τ` and `σ` are two stopping times with `σ ≤ τ` and `τ` is bounded, then the value of a
 martingale `f` at `σ` is the conditional expectation of its value at `τ` with respect to the
 σ-algebra generated by `σ`. -/
@@ -152,7 +165,9 @@ theorem stoppedValue_ae_eq_condexp_of_le_of_countable_range (h : Martingale f 
         (fun x => (hσ_le_τ x).trans (hτ_le x)) hσ_countable_range
   · exact hσ.measurable_space_mono hτ hσ_le_τ
 #align measure_theory.martingale.stopped_value_ae_eq_condexp_of_le_of_countable_range MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le_of_countable_range
+-/
 
+#print MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le /-
 /-- If `τ` and `σ` are two stopping times with `σ ≤ τ` and `τ` is bounded, then the value of a
 martingale `f` at `σ` is the conditional expectation of its value at `τ` with respect to the
 σ-algebra generated by `σ`. -/
@@ -163,6 +178,7 @@ theorem stoppedValue_ae_eq_condexp_of_le [Countable ι] (h : Martingale f ℱ μ
   h.stoppedValue_ae_eq_condexp_of_le_of_countable_range hτ hσ hσ_le_τ hτ_le (Set.to_countable _)
     (Set.to_countable _)
 #align measure_theory.martingale.stopped_value_ae_eq_condexp_of_le MeasureTheory.Martingale.stoppedValue_ae_eq_condexp_of_le
+-/
 
 end FirstCountableTopology
 
@@ -178,6 +194,7 @@ variable {ι : Type _} [LinearOrder ι] [LocallyFiniteOrder ι] [OrderBot ι] [T
   [DiscreteTopology ι] [MeasurableSpace ι] [BorelSpace ι] [MeasurableSpace E] [BorelSpace E]
   [SecondCountableTopology E] {ℱ : Filtration ι m} {τ σ : Ω → ι} {f : ι → Ω → E} {i n : ι}
 
+#print MeasureTheory.Martingale.condexp_stoppedValue_stopping_time_ae_eq_restrict_le /-
 theorem condexp_stoppedValue_stopping_time_ae_eq_restrict_le (h : Martingale f ℱ μ)
     (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) [SigmaFinite (μ.trim hσ.measurableSpace_le)]
     (hτ_le : ∀ x, τ x ≤ n) :
@@ -213,7 +230,9 @@ theorem condexp_stoppedValue_stopping_time_ae_eq_restrict_le (h : Martingale f 
       simp only [hx, Set.indicator_of_not_mem, not_false_iff]
   exact condexp_of_ae_strongly_measurable' hσ.measurable_space_le h_meas h_int
 #align measure_theory.martingale.condexp_stopped_value_stopping_time_ae_eq_restrict_le MeasureTheory.Martingale.condexp_stoppedValue_stopping_time_ae_eq_restrict_le
+-/
 
+#print MeasureTheory.Martingale.stoppedValue_min_ae_eq_condexp /-
 /-- **Optional Sampling theorem**. If `τ` is a bounded stopping time and `σ` is another stopping
 time, then the value of a martingale `f` at the stopping time `min τ σ` is almost everywhere equal
 to the conditional expectation of `f` stopped at `τ` with respect to the σ-algebra generated
@@ -250,6 +269,7 @@ theorem stoppedValue_min_ae_eq_condexp [SigmaFiniteFiltration μ ℱ] (h : Marti
       rw [h1]
       exact (condexp_stopped_value_stopping_time_ae_eq_restrict_le h hτ hσ hτ_le).symm
 #align measure_theory.martingale.stopped_value_min_ae_eq_condexp MeasureTheory.Martingale.stoppedValue_min_ae_eq_condexp
+-/
 
 end SubsetOfNat
 

Changes in mathlib4

mathlib3
mathlib4
chore: move DiscreteTopology.secondCountableTopology_of_countable (#10615)

Implement a porting note to move this instance to a much more natural file.

Diff
@@ -35,12 +35,6 @@ open scoped MeasureTheory BigOperators ENNReal
 
 open TopologicalSpace
 
--- Porting note: move to `Topology/Instances/Discrete`
-instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type*}
-    [TopologicalSpace α] [DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
-  @DiscreteTopology.secondCountableTopology_of_encodable _ _ _ (Encodable.ofCountable _)
-#align discrete_topology.second_countable_topology_of_countable DiscreteTopology.secondCountableTopology_of_countable
-
 namespace MeasureTheory
 
 namespace Martingale
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -36,7 +36,7 @@ open scoped MeasureTheory BigOperators ENNReal
 open TopologicalSpace
 
 -- Porting note: move to `Topology/Instances/Discrete`
-instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type _}
+instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type*}
     [TopologicalSpace α] [DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
   @DiscreteTopology.secondCountableTopology_of_encodable _ _ _ (Encodable.ofCountable _)
 #align discrete_topology.second_countable_topology_of_countable DiscreteTopology.secondCountableTopology_of_countable
@@ -45,12 +45,12 @@ namespace MeasureTheory
 
 namespace Martingale
 
-variable {Ω E : Type _} {m : MeasurableSpace Ω} {μ : Measure Ω} [NormedAddCommGroup E]
+variable {Ω E : Type*} {m : MeasurableSpace Ω} {μ : Measure Ω} [NormedAddCommGroup E]
   [NormedSpace ℝ E] [CompleteSpace E]
 
 section FirstCountableTopology
 
-variable {ι : Type _} [LinearOrder ι] [TopologicalSpace ι] [OrderTopology ι]
+variable {ι : Type*} [LinearOrder ι] [TopologicalSpace ι] [OrderTopology ι]
   [FirstCountableTopology ι] {ℱ : Filtration ι m} [SigmaFiniteFiltration μ ℱ] {τ σ : Ω → ι}
   {f : ι → Ω → E} {i n : ι}
 
@@ -156,7 +156,7 @@ a subset of `ℕ`. `ι` is equipped with the discrete topology, which is also th
 and is a measurable space with the Borel σ-algebra. -/
 
 
-variable {ι : Type _} [LinearOrder ι] [LocallyFiniteOrder ι] [OrderBot ι] [TopologicalSpace ι]
+variable {ι : Type*} [LinearOrder ι] [LocallyFiniteOrder ι] [OrderBot ι] [TopologicalSpace ι]
   [DiscreteTopology ι] [MeasurableSpace ι] [BorelSpace ι] [MeasurableSpace E] [BorelSpace E]
   [SecondCountableTopology E] {ℱ : Filtration ι m} {τ σ : Ω → ι} {f : ι → Ω → E} {i n : ι}
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2023 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module probability.martingale.optional_sampling
-! leanprover-community/mathlib commit ba074af83b6cf54c3104e59402b39410ddbd6dca
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Order.SuccPred.LinearLocallyFinite
 import Mathlib.Probability.Martingale.Basic
 
+#align_import probability.martingale.optional_sampling from "leanprover-community/mathlib"@"ba074af83b6cf54c3104e59402b39410ddbd6dca"
+
 /-!
 # Optional sampling theorem
 
chore: tidy various files (#5355)
Diff
@@ -38,7 +38,7 @@ open scoped MeasureTheory BigOperators ENNReal
 
 open TopologicalSpace
 
--- TODO after the port: move to `Topology/Instances/Discrete`
+-- Porting note: move to `Topology/Instances/Discrete`
 instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type _}
     [TopologicalSpace α] [DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
   @DiscreteTopology.secondCountableTopology_of_encodable _ _ _ (Encodable.ofCountable _)
feat: port Probability.Martingale.OptionalSampling (#5247)

Dependencies 12 + 1007

1008 files ported (98.8%)
460061 lines ported (98.8%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file