Skip to content

Commit 14ca2a2

Browse files
authored
Merge pull request #293 from teorth/restore-9a304a6
Restore repository content to last working snapshot (9a304a6)
2 parents 7ea5f3f + 8c39812 commit 14ca2a2

42 files changed

Lines changed: 114 additions & 450 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

analysis/Analysis/MeasureTheory/Notation.lean

Lines changed: 10 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ import Mathlib.Tactic
44
# Introduction to Measure Theory, Chapter 0: Notation
55
66
A companion to Chapter 0 of the book "An introduction to Measure Theory".
7-
8-
We use existing Mathlib constructions, such as `Set.indicator`, `EuclideanSpace`, `ENNReal`,
9-
and `tsum` to describe the concepts defined in Chapter 0.
10-
117
-/
128

139
/-- A version of `Set.indicator` suitable for this text. -/
@@ -40,15 +36,13 @@ theorem EuclideanSpace'.dot_apply {n:ℕ} (x y: EuclideanSpace' n) : x ⬝ y =
4036
#check ENNReal.mul_top
4137
#check lt_top_iff_ne_top
4238

43-
open Filter
44-
39+
open Filter in
4540
theorem ENNReal.upward_continuous {x y:ℕ → ENNReal} (hx: Monotone x) (hy: Monotone y)
4641
{x₀ y₀ : ENNReal} (hx_lim: atTop.Tendsto x (nhds x₀))
4742
(hy_lim: atTop.Tendsto y (nhds y₀)) :
4843
atTop.Tendsto (fun n ↦ x n * y n) (nhds (x₀ * y₀)) := by
49-
-- This proof is written to follow the structure of the original text.
50-
have hx_lt (n:ℕ): x n ≤ x₀ := hx.ge_of_tendsto hx_lim n
51-
have hy_lt (n:ℕ): y n ≤ y₀ := hy.ge_of_tendsto hy_lim n
44+
have hx_lt (n:ℕ): x n ≤ x₀ := Monotone.ge_of_tendsto hx hx_lim n
45+
have hy_lt (n:ℕ): y n ≤ y₀ := Monotone.ge_of_tendsto hy hy_lim n
5246
have zero_conv : atTop.Tendsto (fun n:ℕ ↦ (0:ENNReal)) (nhds 0) := tendsto_const_nhds
5347
have top_conv : atTop.Tendsto (fun n:ℕ ↦ (⊤:ENNReal)) (nhds ⊤) := tendsto_const_nhds
5448
obtain rfl | hx₀ := eq_zero_or_pos x₀
@@ -85,7 +79,7 @@ theorem ENNReal.upward_continuous {x y:ℕ → ENNReal} (hx: Monotone x) (hy: Mo
8579
have : atTop.Tendsto (fun n ↦ x n * y ny) (nhds ⊤) := by
8680
convert Tendsto.comp (g := fun z ↦ z * y ny) _ hx_lim
8781
convert (ENNReal.continuous_mul_const hyn').tendsto ⊤
88-
rw [top_mul (by order)]
82+
rw [ENNReal.top_mul (by order)]
8983
apply tendsto_nhds_top_mono this
9084
simp [EventuallyLE, eventually_atTop]
9185
use ny; intro n hn
@@ -106,82 +100,11 @@ theorem ENNReal.upward_continuous {x y:ℕ → ENNReal} (hx: Monotone x) (hy: Mo
106100
set y' : ℕ → NNReal := fun n ↦ (y n).toNNReal
107101
set x₀' : NNReal := x₀.toNNReal
108102
set y₀' : NNReal := y₀.toNNReal
109-
have hxx₀' : x₀ = x₀' := by rw [coe_toNNReal]; order
110-
have hyy₀' : y₀ = y₀' := by rw [coe_toNNReal]; order
111-
have hxx' (n:ℕ) : x n = x' n := by rw [coe_toNNReal]; specialize hx_lt n; order
112-
have hyy' (n:ℕ) : y n = y' n := by rw [coe_toNNReal]; specialize hy_lt n; order
103+
have hxx₀' : x₀ = x₀' := by rw [ENNReal.coe_toNNReal]; order
104+
have hyy₀' : y₀ = y₀' := by rw [ENNReal.coe_toNNReal]; order
105+
have hxx' (n:ℕ) : x n = x' n := by rw [ENNReal.coe_toNNReal]; specialize hx_lt n; order
106+
have hyy' (n:ℕ) : y n = y' n := by rw [ENNReal.coe_toNNReal]; specialize hy_lt n; order
113107
change atTop.Tendsto (fun n ↦ x n) (nhds x₀) at hx_lim
114108
change atTop.Tendsto (fun n ↦ y n) (nhds y₀) at hy_lim
115-
simp [hxx', hyy', hxx₀', hyy₀',←coe_mul] at *
116-
solve_by_elim [Filter.Tendsto.mul]
117-
118-
example : ∃ (x y:ℕ → ENNReal) (hx: Antitone x) (hy: Antitone y)
119-
(x₀ y₀:ENNReal) (hx_lim: atTop.Tendsto x (nhds x₀))
120-
(hy_lim: atTop.Tendsto y (nhds y₀)), ¬ atTop.Tendsto (fun n ↦ x n * y n) (nhds (x₀ * y₀)) := by
121-
sorry
122-
123-
#check ENNReal.tendsto_nat_tsum
124-
125-
#check ENNReal.tsum_eq_iSup_sum
126-
127-
#check Equiv.tsum_eq
128-
129-
/-- Exercise 0.0.1 -/
130-
example {A:Type} {x : A → ENNReal} (hx: ∑' α, x α < ⊤) :
131-
∃ E: Set A, Countable E ∧ ∀ α ∉ E, x α = 0 := by
132-
sorry
133-
134-
/-- Theorem 0.0.2 (Tonelli's theorem for series) -/
135-
theorem ENNReal.tsum_of_tsum (x: ℕ → ℕ → ENNReal) : ∑' p:ℕ × ℕ, x p.1 p.2 = ∑' n, ∑' m, x n m := by
136-
-- This proof is written to largely follow the structure of the original text.
137-
refine' le_antisymm _ _
138-
. rw [ENNReal.tsum_eq_iSup_sum]; apply iSup_le; intro F
139-
have : ∃ N, F ⊆ .range N ×ˢ .range N := by
140-
have _ : IsOrderBornology ℕ := {
141-
isBounded_iff_bddBelow_bddAbove s := by
142-
constructor
143-
. intro h; simp
144-
rw [Metric.isBounded_iff_subset_closedBall 0] at h
145-
choose N hN using h
146-
rw [bddAbove_def]; use ⌊ N ⌋₊
147-
intro n hn; specialize hN hn; simp [dist] at hN; exact Nat.le_floor hN
148-
intro ⟨ h1, h2 ⟩; exact Metric.isBounded_of_bddAbove_of_bddBelow h2 h1
149-
}
150-
choose N₁ hN₁ using bddAbove_def.mp F.finite_toSet.isBounded.image_fst.bddAbove
151-
choose N₂ hN₂ using bddAbove_def.mp F.finite_toSet.isBounded.image_snd.bddAbove
152-
use N₁ ⊔ N₂ + 1; intro ⟨ n, m ⟩ hnm; simp_all
153-
specialize hN₁ _ _ hnm; specialize hN₂ _ _ hnm; omega
154-
choose N hN using this
155-
calc
156-
_ ≤ ∑ p ∈ .range N ×ˢ .range N, x p.1 p.2 := Finset.sum_le_sum_of_subset hN
157-
_ = ∑ n ∈ .range N, ∑ m ∈ .range N, x n m := Finset.sum_product' _ _ _
158-
_ ≤ ∑' n, ∑ m ∈ .range N, x n m := ENNReal.sum_le_tsum _
159-
_ ≤ _ := by apply ENNReal.tsum_le_tsum; intro n; apply ENNReal.sum_le_tsum
160-
apply le_of_tendsto' (tendsto_nat_tsum _); intro N
161-
apply le_of_tendsto' (f := fun M ↦ ∑ n ∈ .range N, ∑ m ∈ .range M, x n m) (x := atTop)
162-
. apply tendsto_finset_sum; intro n _; apply tendsto_nat_tsum
163-
intro M
164-
calc
165-
_ = ∑ p ∈ .range N ×ˢ .range M, x p.1 p.2 := by symm; apply Finset.sum_product
166-
_ ≤ _ := ENNReal.sum_le_tsum _
167-
168-
/-- Theorem 0.0.2 -/
169-
theorem ENNReal.tsum_of_tsum' (x: ℕ → ℕ → ENNReal) : ∑' p:ℕ × ℕ, x p.1 p.2 = ∑' m, ∑' n, x n m := by
170-
sorry
171-
172-
#check ENNReal.tsum_comm
173-
174-
/-- Exercise 0.0.2 (Tonelli's theorem for series over arbitrary sets)-/
175-
example {A B:Type*} (x: A → B → ENNReal) : ∑' p:A × B, x p.1 p.2 = ∑' a, ∑' b, x a b := by
176-
sorry
177-
178-
example {A B:Type*} (x: A → B → ENNReal) : ∑' p:A × B, x p.1 p.2 = ∑' b, ∑' a, x a b := by
179-
sorry
180-
181-
/-- Axiom 0.0.4 (Axiom of choice)-/
182-
noncomputable def Set.choose {A: Type*} {E: A → Type*} (hE: ∀ n, Nonempty (E n)) :
183-
∀ n, E n := fun n ↦ (hE n).some
184-
185-
/-- Corollary 0.0.5 (Axiom of countable choice) -/
186-
noncomputable def Countable.choose {E: ℕ → Type*} (hE: ∀ n, Nonempty (E n)) :
187-
∀ n, E n := Set.choose hE
109+
simp [hxx', hyy', hxx₀', hyy₀',←ENNReal.coe_mul] at hx_lim hy_lim ⊢
110+
exact Filter.Tendsto.mul hx_lim hy_lim

analysis/Analysis/MeasureTheory/Section_1_1_1.lean

Lines changed: 0 additions & 147 deletions
This file was deleted.

analysis/Analysis/Misc/FiniteChoice.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def finite_choice_trunc {X:Type*} {f:X → ℕ} {N:ℕ} (h: ∀ n < N, Trunc {x
3939
Trunc {g: Fin N → X // ∀ n, f (g n) = n} := by
4040
induction' N with N ih
4141
. apply Trunc.mk
42-
refine' ⟨ Fin.elim0, _ ⟩
42+
refine ⟨ Fin.elim0, ?_ ⟩
4343
simp only [IsEmpty.forall_iff, exists_const]
4444
specialize ih ?_
4545
. intro n hn; exact h n (Nat.lt_add_right 1 hn)

analysis/Analysis/Misc/Probability.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import Mathlib.Tactic
44

55
namespace ProbabilityTheory
66

7-
/-- Todo: separate out the `prob_top` hypothesis, to allow for the zero finitely additive
8-
measure (useful as a junk value for conditional expectation) -/
97
class FinitelyAdditive (A:Type*) [BooleanAlgebra A] where
108
prob : A → ℝ
119
prob_top : prob ⊤ = 1

analysis/Analysis/Section_10_4.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ theorem inverse_function_theorem {X Y: Set ℝ} {f: ℝ → ℝ} {g:ℝ → ℝ}
6666
simp [←AdherentPt_def, limit_of_AdherentPt] at hcluster ⊢
6767
choose x hx hconv using hcluster; use f ∘ x
6868
constructor
69-
. intro n; refine'by aesop, _ ⟩
69+
. intro n; refine ⟨ by aesop, ?_ ⟩
7070
have hx2 := (hx n).2; contrapose! hx2; apply_fun g at hx2
7171
simpa [←hfx₀, hgf _ hx₀, hgf _ (hx n).1] using hx2
7272
rw [←hfx₀]

analysis/Analysis/Section_10_5.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ theorem _root_.Filter.Tendsto.of_div' {a b L:ℝ} (hab: a < b) {f g f' g': ℝ
5757
intro _; simp; intros; split_ands <;> linarith
5858
. intro _; simp; intro _ _; split_ands <;> linarith
5959
intro _; simp; intros; split_ands <;> linarith
60-
refine' ⟨ this, _ ⟩
60+
refine ⟨ this, ?_ ⟩
6161
rw [nhdsWithin.eq_1] at hderiv ⊢
62-
rw [←Convergesto.iff, Convergesto.iff_conv]
62+
rw [←Convergesto.iff, Convergesto.iff_conv _ _ _]
6363
. intro x hx hconv
6464
have hxy (n:ℕ) : ∃ yn ∈ Set.Ioo a (x n), (f (x n))/(g (x n)) = f' yn / (g' yn) := by
6565
set h : ℝ → ℝ := fun x' ↦ (f x') * (g (x n)) - (g x') * (f (x n))

analysis/Analysis/Section_11_1.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ noncomputable instance BoundedInterval.instInter : Inter BoundedInterval where
9090

9191
@[simp]
9292
theorem BoundedInterval.inter_eq (I J: BoundedInterval) : (I ∩ J : BoundedInterval) = (I:Set ℝ) ∩ (J:Set ℝ) :=
93-
(inter I J).choose_spec.symm
93+
(BoundedInterval.inter I J).choose_spec.symm
9494

9595
example :
9696
(Ioo 2 4 ∩ Icc 4 6) = (Icc 4 4 : Set ℝ) := by

analysis/Analysis/Section_11_10.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ theorem PiecewiseConstantOn.RS_integ_eq_integ_of_mul_deriv
4343
set α' := derivWithin α (Icc a b)
4444
have hf_integ: IntegrableOn f (Icc a b) := (integ_of_piecewise_const hf).1
4545
observe hfα'_integ: IntegrableOn (f * α') (Icc a b)
46-
refine' ⟨ hfα'_integ, _ ⟩
46+
refine ⟨ hfα'_integ, ?_ ⟩
4747
choose P hP using hf
4848
rw [PiecewiseConstantOn.RS_integ_def hP α, hfα'_integ.split P]
4949
apply Finset.sum_congr rfl; intro J hJ
@@ -125,7 +125,7 @@ theorem RS_integ_eq_integ_of_mul_deriv
125125
linarith
126126
have h3 : lower_integral (f * α') (Icc a b) ≤
127127
upper_integral (f * α') (Icc a b) := lower_integral_le_upper hfα'_bound
128-
refine' ⟨ ⟨ hfα'_bound, _ ⟩, _ ⟩ <;> linarith
128+
refine ⟨ ⟨ hfα'_bound, ?_ ⟩, ?_ ⟩ <;> linarith
129129

130130
/-- Lemma 11.10.5 / Exercise 11.10.2-/
131131
theorem PiecewiseConstantOn.RS_integ_of_comp {a b:ℝ} (hab: a < b) {φ f:ℝ → ℝ}
@@ -157,7 +157,7 @@ theorem PiecewiseConstantOn.RS_integ_of_comp {a b:ℝ} (hab: a < b) {φ f:ℝ
157157
have hfφ_piecewise : PiecewiseConstantWith (f ∘ φ) Q := by
158158
sorry
159159
have hfφ_piecewise' : PiecewiseConstantOn (f ∘ φ) (Icc a b) := ⟨ Q, hfφ_piecewise ⟩
160-
refine' ⟨ hfφ_piecewise' , _ ⟩
160+
refine ⟨ hfφ_piecewise' , ?_ ⟩
161161
rw [RS_integ_def hfφ_piecewise]
162162
unfold PiecewiseConstantWith.RS_integ
163163
rw [Finset.sum_image, ←Finset.sum_coe_sort (s := P.intervals)]
@@ -205,7 +205,7 @@ theorem RS_integ_of_comp {a b:ℝ} (hab: a < b) {φ f: ℝ → ℝ}
205205
linarith [integ_le_lower_RS_integral hfφ_bdd this hpc.1 hφ_mono]
206206
have hle : lower_RS_integral (f ∘ φ) (Icc a b) φ ≤ upper_RS_integral (f ∘ φ) (Icc a b) φ :=
207207
lower_RS_integral_le_upper hfφ_bdd hφ_mono
208-
refine' ⟨ ⟨ hfφ_bdd, _ ⟩, _ ⟩ <;> linarith
208+
refine ⟨ ⟨ hfφ_bdd, ?_ ⟩, ?_ ⟩ <;> linarith
209209

210210
/-- Proposition 11.10.7 (Change of variables formula III)-/
211211
theorem integ_of_comp {a b:ℝ} (hab: a < b) {φ f: ℝ → ℝ}
@@ -218,7 +218,7 @@ theorem integ_of_comp {a b:ℝ} (hab: a < b) {φ f: ℝ → ℝ}
218218
integ f (Icc (φ a) (φ b)) := by
219219
have h1 := RS_integ_of_comp hab hφ_cont hφ_mono hf
220220
have h2 := RS_integ_eq_integ_of_mul_deriv hab hφ_mono hφ_diff hφ_cont hφ' h1.1
221-
exact ⟨ h2.1, by aesop ⟩
221+
refine ⟨ h2.1, by aesop ⟩
222222

223223
/-- Exercise 11.10.3-/
224224
example {a b:ℝ} (hab: a < b) {f: ℝ → ℝ} (hf: IntegrableOn f (Icc a b)) :

analysis/Analysis/Section_11_3.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ theorem lower_integral_congr {f g:ℝ → ℝ} {I: BoundedInterval} (h: Set.EqOn
4444

4545
lemma integral_bound_upper_of_bounded {f:ℝ → ℝ} {M:ℝ} {I: BoundedInterval} (h: ∀ x ∈ (I:Set ℝ), |f x| ≤ M) : M * |I|ₗ ∈ (PiecewiseConstantOn.integ · I) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I} := by
4646
simp
47-
refine'fun _ ↦ M , ⟨ ⟨ _, _, ⟩, PiecewiseConstantOn.integ_const _ _ ⟩ ⟩
47+
refine ⟨ fun _ ↦ M , ⟨ ⟨ ?_, ?_, ⟩, PiecewiseConstantOn.integ_const _ _ ⟩ ⟩
4848
. peel h with _ _ _; simp_all [abs_le']
4949
exact (ConstantOn.of_const (c := M) (by simp)).piecewiseConstantOn
5050

5151
lemma integral_bound_lower_of_bounded {f:ℝ → ℝ} {M:ℝ} {I: BoundedInterval} (h: ∀ x ∈ (I:Set ℝ), |f x| ≤ M) : -M * |I|ₗ ∈ (PiecewiseConstantOn.integ · I) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I} := by
5252
simp
53-
refine'fun _ ↦ -M , ⟨ ⟨ _, _, ⟩, by convert PiecewiseConstantOn.integ_const _ _ using 1; simp ⟩ ⟩
53+
refine ⟨ fun _ ↦ -M , ⟨ ⟨ ?_, ?_, ⟩, by convert PiecewiseConstantOn.integ_const _ _ using 1; simp ⟩ ⟩
5454
. peel h with _ _ _; simp [abs_le'] at *; linarith
5555
exact (ConstantOn.of_const (c := -M) (by simp)).piecewiseConstantOn
5656

analysis/Analysis/Section_11_5.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ theorem integ_of_uniform_cts {I: BoundedInterval} {f:ℝ → ℝ} (hf: UniformCo
2727
-- This proof is written to follow the structure of the original text.
2828
have hfbound : BddOn f I := by
2929
rw [BddOn.iff']; exact hf.of_bounded subset_rfl (Bornology.IsBounded.of_boundedInterval I)
30-
refine' ⟨ hfbound, _ ⟩
30+
refine ⟨ hfbound, ?_ ⟩
3131
by_cases hsing : |I|ₗ = 0
3232
. exact (integ_on_subsingleton hsing).1.2
3333
simp [length] at hsing

0 commit comments

Comments
 (0)