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

Commit e7b2a0f

Browse files
committed
style(analysis): renames the topology directory to analysis and introduced topology and measure_theory subdirectories
1 parent afefdcb commit e7b2a0f

15 files changed

+80
-73
lines changed

topology/ennreal.lean renamed to analysis/ennreal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Author: Johannes Hölzl
55
66
Extended non-negative reals
77
-/
8-
import order.bounds algebra.ordered_monoid topology.real topology.infinite_sum
8+
import order.bounds algebra.ordered_monoid analysis.real analysis.topology.infinite_sum
99
noncomputable theory
1010
open classical set lattice filter
1111
local attribute [instance] decidable_inhabited prop_decidable

topology/limits.lean renamed to analysis/limits.lean

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,71 @@ Authors: Johannes Hölzl
55
66
A collection of limit properties.
77
-/
8-
import algebra.big_operators algebra.group_power topology.real topology.of_nat topology.infinite_sum
8+
import algebra.big_operators algebra.group_power
9+
analysis.metric_space analysis.of_nat analysis.topology.infinite_sum
910
noncomputable theory
1011
open classical set finset function filter
1112
local attribute [instance] decidable_inhabited prop_decidable
1213

1314
infix ` ^ ` := pow_nat
1415

16+
section real
17+
18+
lemma has_sum_of_absolute_convergence {f : ℕ → ℝ}
19+
(hf : ∃r, tendsto (λn, (upto n).sum (λi, abs (f i))) at_top (nhds r)) : has_sum f :=
20+
let f' := λs:finset ℕ, s.sum (λi, abs (f i)) in
21+
suffices cauchy (map (λs:finset ℕ, s.sum f) at_top),
22+
from complete_space.complete this,
23+
cauchy_iff.mpr $ and.intro (map_ne_bot at_top_ne_bot) $
24+
assume s hs,
25+
let ⟨ε, hε, hsε⟩ := mem_uniformity_dist.mp hs, ⟨r, hr⟩ := hf in
26+
have hε' : {p : ℝ × ℝ | dist p.1 p.2 < ε / 2} ∈ (@uniformity ℝ _).sets,
27+
from mem_uniformity_dist.mpr ⟨ε / 2, div_pos_of_pos_of_pos hε two_pos, assume a b h, h⟩,
28+
have cauchy (at_top.map $ λn, f' (upto n)),
29+
from cauchy_downwards cauchy_nhds (map_ne_bot at_top_ne_bot) hr,
30+
have ∃n, ∀{n'}, n ≤ n' → dist (f' (upto n)) (f' (upto n')) < ε / 2,
31+
by simp [cauchy_iff, mem_at_top_iff] at this;
32+
from let ⟨t, ht, u, hu⟩ := this _ hε' in
33+
⟨u, assume n' hn, ht $ prod_mk_mem_set_prod_eq.mpr ⟨hu _ (le_refl _), hu _ hn⟩⟩,
34+
let ⟨n, hn⟩ := this in
35+
have ∀{s}, upto n ⊆ s → abs ((s \ upto n).sum f) < ε / 2,
36+
from assume s hs,
37+
let ⟨n', hn'⟩ := @exists_nat_subset_upto s in
38+
have upto n ⊆ upto n', from subset.trans hs hn',
39+
have f'_nn : 0 ≤ f' (upto n' \ upto n), from zero_le_sum $ assume _ _, abs_nonneg _,
40+
calc abs ((s \ upto n).sum f) ≤ f' (s \ upto n) : abs_sum_le_sum_abs
41+
... ≤ f' (upto n' \ upto n) : sum_le_sum_of_subset_of_nonneg
42+
(finset.sdiff_subset_sdiff hn' (finset.subset.refl _))
43+
(assume _ _ _, abs_nonneg _)
44+
... = abs (f' (upto n' \ upto n)) : (abs_of_nonneg f'_nn).symm
45+
... = abs (f' (upto n') - f' (upto n)) :
46+
by simp [f', (sum_sdiff ‹upto n ⊆ upto n'›).symm]
47+
... = abs (f' (upto n) - f' (upto n')) : abs_sub _ _
48+
... < ε / 2 : hn $ upto_subset_upto_iff.mp this,
49+
have ∀{s t}, upto n ⊆ s → upto n ⊆ t → dist (s.sum f) (t.sum f) < ε,
50+
from assume s t hs ht,
51+
calc abs (s.sum f - t.sum f) = abs ((s \ upto n).sum f + - (t \ upto n).sum f) :
52+
by rw [←sum_sdiff hs, ←sum_sdiff ht]; simp
53+
... ≤ abs ((s \ upto n).sum f) + abs ((t \ upto n).sum f) :
54+
le_trans (abs_add_le_abs_add_abs _ _) $ by rw [abs_neg]; exact le_refl _
55+
... < ε / 2 + ε / 2 : add_lt_add (this hs) (this ht)
56+
... = ε : by rw [←add_div, add_self_div_two],
57+
⟨(λs:finset ℕ, s.sum f) '' {s | upto n ⊆ s}, image_mem_map $ mem_at_top (upto n),
58+
assume ⟨a, b⟩ ⟨⟨t, ht, ha⟩, ⟨s, hs, hb⟩⟩, by simp at ha hb; exact ha ▸ hb ▸ hsε _ _ (this ht hs)⟩
59+
60+
lemma is_sum_iff_tendsto_nat_of_nonneg {f : ℕ → ℝ} {r : ℝ} (hf : ∀n, 0 ≤ f n) :
61+
is_sum f r ↔ tendsto (λn, (upto n).sum f) at_top (nhds r) :=
62+
⟨tendsto_sum_nat_of_is_sum,
63+
assume hr,
64+
have tendsto (λn, (upto n).sum (λn, abs (f n))) at_top (nhds r),
65+
by simp [(λi, abs_of_nonneg (hf i)), hr],
66+
let ⟨p, h⟩ := has_sum_of_absolute_convergence ⟨r, thisin
67+
have hp : tendsto (λn, (upto n).sum f) at_top (nhds p), from tendsto_sum_nat_of_is_sum h,
68+
have p = r, from tendsto_nhds_unique at_top_ne_bot hp hr,
69+
this ▸ h⟩
70+
71+
end real
72+
1573
lemma mul_add_one_le_pow {r : ℝ} (hr : 0 ≤ r) : ∀{n}, (of_nat n) * r + 1 ≤ (r + 1) ^ n
1674
| 0 := by simp; exact le_refl 1
1775
| (n + 1) :=

topology/borel_space.lean renamed to analysis/measure_theory/borel_space.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We would like to have definitional equality for
1414
1515
Unfortunately, this only holds if t₁ and t₂ are second-countable topologies.
1616
-/
17-
import topology.measurable_space topology.real
17+
import analysis.measure_theory.measurable_space analysis.real
1818

1919
open classical set lattice
2020
local attribute [instance] decidable_inhabited prop_decidable

topology/lebesgue_measure.lean renamed to analysis/measure_theory/lebesgue_measure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Johannes Hölzl
55
66
Lebesgue measure on the real line
77
-/
8-
import topology.measure topology.borel_space
8+
import analysis.measure_theory.measure_space analysis.measure_theory.borel_space
99
noncomputable theory
1010
open classical set lattice filter
1111
open ennreal (of_real)
File renamed without changes.

topology/measure.lean renamed to analysis/measure_theory/measure_space.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ somehow well-behaved on non-measurable sets.
1616
This allows us for the `lebesgue` measure space to have the `borel` measurable space, but still be
1717
a complete measure.
1818
-/
19-
import data.set order.galois_connection topology.ennreal topology.outer_measure
19+
import data.set order.galois_connection analysis.ennreal
20+
analysis.measure_theory.outer_measure
2021

2122
noncomputable theory
2223

topology/outer_measure.lean renamed to analysis/measure_theory/outer_measure.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ Authors: Johannes Hölzl
66
Outer measures -- overapproximations of measures
77
-/
88

9-
import data.set order.galois_connection algebra.big_operators topology.measurable_space
10-
topology.ennreal topology.limits
9+
import data.set order.galois_connection algebra.big_operators
10+
analysis.ennreal analysis.limits
11+
analysis.measure_theory.measurable_space
12+
1113
noncomputable theory
1214

1315
open classical set lattice finset function filter

topology/metric_space.lean renamed to analysis/metric_space.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Many definitions and theorems expected on metric spaces are already introduced o
99
topological spaces. For example:
1010
open and closed sets, compactness, completeness, continuity and uniform continuity
1111
-/
12-
import topology.real
12+
import analysis.real
1313
open lattice set filter classical
1414
noncomputable theory
1515

topology/of_nat.lean renamed to analysis/of_nat.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Morphism from `nat` into a semiring with 1.
77
88
TODO: move to `data.nat` and split into the different parts for `int`, `rat`, and `real`.
99
-/
10-
import data.rat topology.real
10+
import data.rat analysis.real
1111

1212
section of_nat
1313
variables {α : Type*} [semiring α] {n : ℕ}

topology/real.lean renamed to analysis/real.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ generalizations:
2121
* Archimedean fields
2222
2323
-/
24-
import topology.uniform_space topology.topological_structures data.rat data.subtype algebra
24+
import algebra data.rat data.subtype
25+
analysis.topology.uniform_space analysis.topology.topological_structures
2526
noncomputable theory
2627
open classical set lattice filter
2728
local attribute [instance] decidable_inhabited prop_decidable

0 commit comments

Comments
 (0)