Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit a150b69

Browse files
committed
chore(probability/*): change to probability notation in the probability folder (#15933)
This PR makes two notational changes in the probability folder: `α` changed to `Ω` and `x` of type `α` to `ω`.
1 parent d4b5619 commit a150b69

10 files changed

+580
-580
lines changed

src/probability/cond_count.lean

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,31 @@ open measure_theory measurable_space
4040

4141
namespace probability_theory
4242

43-
variables {α : Type*} [measurable_space α]
43+
variables {Ω : Type*} [measurable_space Ω]
4444

4545
/-- Given a set `s`, `cond_count s` is the counting measure conditioned on `s`. In particular,
4646
`cond_count s t` is the proportion of `s` that is contained in `t`.
4747
4848
This is a probability measure when `s` is finite and nonempty and is given by
4949
`probability_theory.cond_count_is_probability_measure`. -/
50-
def cond_count (s : set α) : measure α := measure.count[|s]
50+
def cond_count (s : set Ω) : measure Ω := measure.count[|s]
5151

52-
@[simp] lemma cond_count_empty_meas : (cond_count ∅ : measure α) = 0 :=
52+
@[simp] lemma cond_count_empty_meas : (cond_count ∅ : measure Ω) = 0 :=
5353
by simp [cond_count]
5454

55-
lemma cond_count_empty {s : set α} : cond_count s ∅ = 0 :=
55+
lemma cond_count_empty {s : set Ω} : cond_count s ∅ = 0 :=
5656
by simp
5757

58-
lemma finite_of_cond_count_ne_zero {s t : set α} (h : cond_count s t ≠ 0) :
58+
lemma finite_of_cond_count_ne_zero {s t : set Ω} (h : cond_count s t ≠ 0) :
5959
s.finite :=
6060
begin
6161
by_contra hs',
6262
simpa [cond_count, cond, measure.count_apply_infinite hs'] using h,
6363
end
6464

65-
variables [measurable_singleton_class α]
65+
variables [measurable_singleton_class Ω]
6666

67-
lemma cond_count_is_probability_measure {s : set α} (hs : s.finite) (hs' : s.nonempty) :
67+
lemma cond_count_is_probability_measure {s : set Ω} (hs : s.finite) (hs' : s.nonempty) :
6868
is_probability_measure (cond_count s) :=
6969
{ measure_univ :=
7070
begin
@@ -73,17 +73,17 @@ lemma cond_count_is_probability_measure {s : set α} (hs : s.finite) (hs' : s.no
7373
{ exact (measure.count_apply_lt_top.2 hs).ne }
7474
end }
7575

76-
lemma cond_count_singleton (a : α) (t : set α) [decidable (a ∈ t)] :
77-
cond_count {a} t = if a ∈ t then 1 else 0 :=
76+
lemma cond_count_singleton (ω : Ω) (t : set Ω) [decidable (ω ∈ t)] :
77+
cond_count {ω} t = if ω ∈ t then 1 else 0 :=
7878
begin
79-
rw [cond_count, cond_apply _ (measurable_set_singleton a), measure.count_singleton,
79+
rw [cond_count, cond_apply _ (measurable_set_singleton ω), measure.count_singleton,
8080
ennreal.inv_one, one_mul],
8181
split_ifs,
82-
{ rw [(by simpa : ({a} : set α) ∩ t = {a}), measure.count_singleton] },
83-
{ rw [(by simpa : ({a} : set α) ∩ t = ∅), measure.count_empty] },
82+
{ rw [(by simpa : ({ω} : set Ω) ∩ t = {ω}), measure.count_singleton] },
83+
{ rw [(by simpa : ({ω} : set Ω) ∩ t = ∅), measure.count_empty] },
8484
end
8585

86-
variables {s t u : set α}
86+
variables {s t u : set Ω}
8787

8888
lemma cond_count_inter_self (hs : s.finite):
8989
cond_count s (s ∩ t) = cond_count s t :=
@@ -159,7 +159,7 @@ begin
159159
exacts [htu.mono inf_le_right inf_le_right, (hs.inter_of_left _).measurable_set],
160160
end
161161

162-
lemma cond_count_compl (t : set α) (hs : s.finite) (hs' : s.nonempty) :
162+
lemma cond_count_compl (t : set Ω) (hs : s.finite) (hs' : s.nonempty) :
163163
cond_count s t + cond_count s tᶜ = 1 :=
164164
begin
165165
rw [← cond_count_union hs disjoint_compl_right, set.union_compl_self,
@@ -190,7 +190,7 @@ begin
190190
end
191191

192192
/-- A version of the law of total probability for counting probabilites. -/
193-
lemma cond_count_add_compl_eq (u t : set α) (hs : s.finite) :
193+
lemma cond_count_add_compl_eq (u t : set Ω) (hs : s.finite) :
194194
cond_count (s ∩ u) t * cond_count s u + cond_count (s ∩ uᶜ) t * cond_count s uᶜ =
195195
cond_count s t :=
196196
begin

src/probability/conditional_expectation.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ namespace measure_theory
2727

2828
open probability_theory
2929

30-
variables {α E : Type*} [normed_add_comm_group E] [normed_space ℝ E] [complete_space E]
31-
{m₁ m₂ m : measurable_space α} {μ : measure α} {f : α → E}
30+
variables {Ω E : Type*} [normed_add_comm_group E] [normed_space ℝ E] [complete_space E]
31+
{m₁ m₂ m : measurable_space Ω} {μ : measure Ω} {f : Ω → E}
3232

3333
/-- If `m₁, m₂` are independent σ-algebras and `f` is `m₁`-measurable, then `𝔼[f | m₂] = 𝔼[f]`
3434
almost everywhere. -/

src/probability/conditional_probability.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import probability.independence
1010
1111
This file defines conditional probability and includes basic results relating to it.
1212
13-
Given some measure `μ` defined on a measure space on some type `α` and some `s : set α`,
13+
Given some measure `μ` defined on a measure space on some type `Ω` and some `s : set Ω`,
1414
we define the measure of `μ` conditioned on `s` as the restricted measure scaled by
1515
the inverse of the measure of `s`: `cond μ s = (μ s)⁻¹ • μ.restrict s`. The scaling
1616
ensures that this is a probability measure (when `μ` is a finite measure).
1717
1818
From this definition, we derive the "axiomatic" definition of conditional probability
19-
based on application: for any `s t : set α`, we have `μ[t|s] = (μ s)⁻¹ * μ (s ∩ t)`.
19+
based on application: for any `s t : set Ω`, we have `μ[t|s] = (μ s)⁻¹ * μ (s ∩ t)`.
2020
2121
## Main Statements
2222
@@ -59,7 +59,7 @@ open_locale ennreal
5959

6060
open measure_theory measurable_space
6161

62-
variables {α : Type*} {m : measurable_space α} (μ : measure α) {s t : set α}
62+
variables {Ω : Type*} {m : measurable_space Ω} (μ : measure Ω) {s t : set Ω}
6363

6464
namespace probability_theory
6565

@@ -68,7 +68,7 @@ section definitions
6868
/-- The conditional probability measure of measure `μ` on set `s` is `μ` restricted to `s`
6969
and scaled by the inverse of `μ s` (to make it a probability measure):
7070
`(μ s)⁻¹ • μ.restrict s`. -/
71-
def cond (s : set α) : measure α :=
71+
def cond (s : set Ω) : measure Ω :=
7272
(μ s)⁻¹ • μ.restrict s
7373

7474
end definitions
@@ -93,11 +93,11 @@ by simp [cond]
9393
by simp [cond, measure_univ, measure.restrict_univ]
9494

9595
/-- The axiomatic definition of conditional probability derived from a measure-theoretic one. -/
96-
lemma cond_apply (hms : measurable_set s) (t : set α) :
96+
lemma cond_apply (hms : measurable_set s) (t : set Ω) :
9797
μ[t|s] = (μ s)⁻¹ * μ (s ∩ t) :=
9898
by { rw [cond, measure.smul_apply, measure.restrict_apply' hms, set.inter_comm], refl }
9999

100-
lemma cond_inter_self (hms : measurable_set s) (t : set α) :
100+
lemma cond_inter_self (hms : measurable_set s) (t : set Ω) :
101101
μ[s ∩ t|s] = μ[t|s] :=
102102
by rw [cond_apply _ hms, ← set.inter_assoc, set.inter_self, ← cond_apply _ hms]
103103

@@ -138,13 +138,13 @@ lemma cond_cond_eq_cond_inter [is_finite_measure μ]
138138
cond_cond_eq_cond_inter' μ hms hmt (measure_ne_top μ s) hci
139139

140140
lemma cond_mul_eq_inter'
141-
(hms : measurable_set s) (hcs : μ s ≠ 0) (hcs' : μ s ≠ ∞) (t : set α) :
141+
(hms : measurable_set s) (hcs : μ s ≠ 0) (hcs' : μ s ≠ ∞) (t : set Ω) :
142142
μ[t|s] * μ s = μ (s ∩ t) :=
143143
by rw [cond_apply μ hms t, mul_comm, ←mul_assoc,
144144
ennreal.mul_inv_cancel hcs hcs', one_mul]
145145

146146
lemma cond_mul_eq_inter [is_finite_measure μ]
147-
(hms : measurable_set s) (hcs : μ s ≠ 0) (t : set α) :
147+
(hms : measurable_set s) (hcs : μ s ≠ 0) (t : set Ω) :
148148
μ[t|s] * μ s = μ (s ∩ t) :=
149149
cond_mul_eq_inter' μ hms hcs (measure_ne_top _ s) t
150150

0 commit comments

Comments
 (0)