Skip to content

Commit bd166f0

Browse files
authored
Merge pull request #249 from teorth:golf
golf (using dot notation)
2 parents ca2e6e5 + c56ab64 commit bd166f0

34 files changed

Lines changed: 538 additions & 677 deletions

analysis/Analysis/Appendix_A_3.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ example {r:ℝ} (h: 0 < r) (h': r < 1) : Summable (fun n:ℕ ↦ n * r^n) := by
5353
use 1
5454
intro b hb
5555
simp [show b ≠ 0 by linarith, show r ≠ 0 by linarith]
56-
suffices hconv: Filter.Tendsto (fun n:ℕ ↦ r * ((n+1) / n)) .atTop (nhds r)
57-
. apply Filter.Tendsto.congr' _ hconv
56+
suffices hconv: Filter.atTop.Tendsto (fun n:ℕ ↦ r * ((n+1) / n)) (nhds r)
57+
. apply hconv.congr'
5858
simp [Filter.EventuallyEq, Filter.eventually_atTop]
5959
use 1
6060
intro b hb
@@ -63,18 +63,18 @@ example {r:ℝ} (h: 0 < r) (h': r < 1) : Summable (fun n:ℕ ↦ n * r^n) := by
6363
simp [abs_of_pos h, abs_of_pos hb1]
6464
field_simp
6565
ring_nf
66-
suffices hconv : Filter.Tendsto (fun n:ℕ ↦ ((n+1:ℝ) / n)) .atTop (nhds 1)
67-
. convert Filter.Tendsto.const_mul r hconv
66+
suffices hconv : Filter.atTop.Tendsto (fun n:ℕ ↦ ((n+1:ℝ) / n)) (nhds 1)
67+
. convert hconv.const_mul r
6868
simp
69-
suffices hconv : Filter.Tendsto (fun n:ℕ ↦ 1 + 1/(n:ℝ)) .atTop (nhds 1)
70-
. apply Filter.Tendsto.congr' _ hconv
69+
suffices hconv : Filter.atTop.Tendsto (fun n:ℕ ↦ 1 + 1/(n:ℝ)) (nhds 1)
70+
. apply hconv.congr'
7171
simp [Filter.EventuallyEq, Filter.eventually_atTop]
7272
use 1
7373
intro b hb
7474
have : (b:ℝ) > 0 := by norm_cast
7575
field_simp
76-
suffices hconv : Filter.Tendsto (fun n:ℕ ↦ 1/(n:ℝ)) .atTop (nhds 0)
77-
. convert Filter.Tendsto.const_add 1 hconv
76+
suffices hconv : Filter.atTop.Tendsto (fun n:ℕ ↦ 1/(n:ℝ)) (nhds 0)
77+
. convert hconv.const_add 1
7878
simp
7979
exact tendsto_one_div_atTop_nhds_zero_nat
8080

analysis/Analysis/Appendix_B_2.lean

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ theorem NNRealDecimal.toNNReal_conv (d:NNRealDecimal) :
3333
theorem NNRealDecimal.surj (x:NNReal) : ∃ d:NNRealDecimal, x = d := by
3434
-- This proof is written to follow the structure of the original text.
3535
by_cases h : x = 0
36-
. use mk 0 fun _ ↦ 0
37-
simp [h, toNNReal]
36+
. use mk 0 fun _ ↦ 0; simp [h, toNNReal]
3837
let s : ℕ → ℕ := fun n ↦ ⌊ x * 10^n ⌋₊
3938
have hs (n:ℕ) : s n ≤ x * 10^n := Nat.floor_le (by positivity)
4039
have hs' (n:ℕ) : x * 10^n < s n + 1 := Nat.lt_floor_add_one _
@@ -53,25 +52,22 @@ theorem NNRealDecimal.surj (x:NNReal) : ∃ d:NNRealDecimal, x = d := by
5352
have hd : d < 10 := by omega
5453
have : s (n+1) = 10 * s n + d := by omega
5554
use Digit.mk hd
56-
set a : ℕ → Digit := fun n ↦ (hdigit n).choose
57-
have ha (n:ℕ) : s (n+1) = 10 * s n + (a n : ℕ) := (hdigit n).choose_spec
55+
choose a ha using hdigit
5856
set d := mk (s 0) a; use d
5957
have hsum (n:ℕ) : s n * (10:NNReal)^(-n:ℝ) = s 0 + ∑ i ∈ .range n, a i * (10:NNReal)^(-i-1:ℝ) := by
60-
induction' n with n hn
61-
. simp
58+
induction' n with n hn; simp
6259
rw [ha n]; calc
6360
_ = s n * (10:NNReal)^(-n:ℝ) + a n * 10^(-n-1:ℝ) := by
6461
simp [add_mul]; congr 1 <;> ring_nf
6562
rw [mul_assoc, ←NNReal.rpow_add_one (by norm_num)]; congr; ring
6663
_ = s 0 + (∑ i ∈ .range n, a i * (10:NNReal)^(-i-1:ℝ) + a n * 10^(-n-1:ℝ)) := by
6764
rw [hn]; abel
68-
_ = _ := by congr; exact (Finset.sum_range_succ _ _).symm
69-
have := d.toNNReal_conv.tendsto_sum_tsum_nat
70-
replace := this.const_add (s 0:NNReal)
71-
convert_to Filter.Tendsto (fun n ↦ s n * (10:NNReal)^(-n:ℝ)) .atTop (nhds (d:NNReal)) at this
65+
_ = _ := by congr; symm; apply Finset.sum_range_succ
66+
have := (d.toNNReal_conv.tendsto_sum_tsum_nat).const_add (s 0:NNReal)
67+
convert_to Filter.atTop.Tendsto (fun n ↦ s n * (10:NNReal)^(-n:ℝ)) (nhds (d:NNReal)) at this
7268
. ext n; rw [hsum n]
7369
apply tendsto_nhds_unique _ this
74-
apply Filter.Tendsto.squeeze (g := fun n:ℕ ↦ x - (10:NNReal)^(-n:ℝ)) (h := fun n ↦ x)
70+
apply Filter.Tendsto.squeeze (g := fun n:ℕ ↦ x - (10:NNReal)^(-n:ℝ)) (h := fun _ ↦ x)
7571
. convert Filter.Tendsto.const_sub (c := 0) x _
7672
. simp
7773
convert NNReal.tendsto_pow_atTop_nhds_zero_of_lt_one
@@ -94,7 +90,7 @@ theorem NNRealDecimal.not_inj : (1:NNReal) = (mk 1 fun _ ↦ 0) ∧ (1:NNReal) =
9490
have := (mk 0 fun _ ↦ 9).toNNReal_conv.tendsto_sum_tsum_nat
9591
simp at this
9692
apply tendsto_nhds_unique _ this
97-
convert_to Filter.Tendsto (fun n:ℕ ↦ 1 - (10:NNReal)^(-n:ℝ)) .atTop (nhds 1) using 2 with n
93+
convert_to Filter.atTop.Tendsto (fun n:ℕ ↦ 1 - (10:NNReal)^(-n:ℝ)) (nhds 1) using 2 with n
9894
. induction' n with n hn
9995
. simp
10096
rw [Finset.sum_range_succ, hn, Nat.cast_add, Nat.cast_one, neg_add']
@@ -123,13 +119,8 @@ noncomputable instance RealDecimal.instCoeReal : Coe RealDecimal ℝ where
123119

124120
theorem RealDecimal.surj (x:ℝ) : ∃ d:RealDecimal, x = d := by
125121
rcases le_or_gt 0 x with h | h
126-
. obtain ⟨ d, hd ⟩ := NNRealDecimal.surj (x.toNNReal)
127-
use pos d
128-
simp [←hd, h]
129-
. obtain ⟨ d, hd ⟩ := NNRealDecimal.surj ((-x).toNNReal)
130-
use neg d
131-
replace h : 0 ≤ -x := by linarith
132-
simp [←hd, h]
122+
. obtain ⟨ d, hd ⟩ := NNRealDecimal.surj (x.toNNReal); use pos d; simp [←hd, h]
123+
. obtain ⟨ d, hd ⟩ := NNRealDecimal.surj ((-x).toNNReal); use neg d; simp [←hd, (show 0 ≤ -x by linarith)]
133124

134125
/-- Exercise B.2.2 -/
135126
theorem RealDecimal.not_inj_one (d: RealDecimal) : (d:ℝ) = 1 ↔ (d = pos (NNRealDecimal.mk 1 fun _ ↦ 0) ∨ d = pos (NNRealDecimal.mk 0 fun _ ↦ 9)) := by

analysis/Analysis/Section_10_1.lean

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,23 @@ variable (x₀ : ℝ)
2828
hypothesis that `x₀` is a limit point is not needed. -/
2929
theorem _root_.HasDerivWithinAt.iff (X: Set ℝ) (x₀ : ℝ) (f: ℝ → ℝ)
3030
(L:ℝ) :
31-
HasDerivWithinAt f L X x₀ ↔ Filter.Tendsto (fun x ↦ (f x - f x₀) / (x - x₀))
32-
(nhds x₀ ⊓ Filter.principal (X \ {x₀})) (nhds L) := by
31+
HasDerivWithinAt f L X x₀ ↔ (nhds x₀ ⊓ .principal (X \ {x₀})).Tendsto (fun x ↦ (f x - f x₀) / (x - x₀))
32+
(nhds L) := by
3333
rw [hasDerivWithinAt_iff_tendsto_slope, ←nhdsWithin.eq_1, iff_iff_eq, slope_fun_def_field]
3434

3535
theorem _root_.DifferentiableWithinAt.iff (X: Set ℝ) (x₀ : ℝ) (f: ℝ → ℝ) :
3636
DifferentiableWithinAt ℝ f X x₀ ↔ ∃ L, HasDerivWithinAt f L X x₀ := by
3737
constructor
38-
. intro h; use derivWithin f X x₀
39-
exact DifferentiableWithinAt.hasDerivWithinAt h
40-
intro ⟨ L, h ⟩
41-
exact HasDerivWithinAt.differentiableWithinAt h
38+
. intro h; use derivWithin f X x₀; exact h.hasDerivWithinAt
39+
intro ⟨ L, h ⟩; exact h.differentiableWithinAt
4240

4341
theorem _root_.DifferentiableWithinAt.of_hasDeriv {X: Set ℝ} {x₀ : ℝ} {f: ℝ → ℝ} {L:ℝ}
4442
(hL: HasDerivWithinAt f L X x₀) : DifferentiableWithinAt ℝ f X x₀ := by
4543
rw [DifferentiableWithinAt.iff]; use L
4644

4745

4846
theorem derivative_unique {X: Set ℝ} {x₀ : ℝ}
49-
(hx₀: ClusterPt x₀ (Filter.principal (X \ {x₀}))) {f: ℝ → ℝ} {L L':ℝ}
47+
(hx₀: ClusterPt x₀ (.principal (X \ {x₀}))) {f: ℝ → ℝ} {L L':ℝ}
5048
(hL: HasDerivWithinAt f L X x₀) (hL': HasDerivWithinAt f L' X x₀) :
5149
L = L' := by
5250
rw [_root_.HasDerivWithinAt.iff] at hL hL'
@@ -56,21 +54,21 @@ theorem derivative_unique {X: Set ℝ} {x₀ : ℝ}
5654
#check DifferentiableWithinAt.hasDerivWithinAt
5755

5856
theorem derivative_unique' (X: Set ℝ) {x₀ : ℝ}
59-
(hx₀: ClusterPt x₀ (Filter.principal (X \ {x₀}))) {f: ℝ → ℝ} {L :ℝ}
57+
(hx₀: ClusterPt x₀ (.principal (X \ {x₀}))) {f: ℝ → ℝ} {L :ℝ}
6058
(hL: HasDerivWithinAt f L X x₀)
6159
(hdiff : DifferentiableWithinAt ℝ f X x₀):
6260
L = derivWithin f X x₀ := by
6361
solve_by_elim [derivative_unique, DifferentiableWithinAt.hasDerivWithinAt]
6462

6563

6664
/-- Example 10.1.3 -/
67-
example (x₀:ℝ) : HasDerivWithinAt (fun x ↦ x^2) (2 * x₀) (Set.univ) x₀ := by
65+
example (x₀:ℝ) : HasDerivWithinAt (fun x ↦ x^2) (2 * x₀) .univ x₀ := by
6866
sorry
6967

70-
example (x₀:ℝ) : DifferentiableWithinAt ℝ (fun x ↦ x^2) (Set.univ) x₀ := by
68+
example (x₀:ℝ) : DifferentiableWithinAt ℝ (fun x ↦ x^2) .univ x₀ := by
7169
sorry
7270

73-
example (x₀:ℝ) : derivWithin (fun x ↦ x^2) (Set.univ) x₀ = 2 * x₀ := by
71+
example (x₀:ℝ) : derivWithin (fun x ↦ x^2) .univ x₀ = 2 * x₀ := by
7472
sorry
7573

7674
/-- Remark 10.1.4 -/
@@ -89,30 +87,28 @@ example : ∃ (X: Set ℝ) (x₀ :ℝ) (f g: ℝ → ℝ) (L:ℝ) (hfg: f x₀ =
8987

9088
abbrev f_10_1_6 : ℝ → ℝ := abs
9189

92-
example : Filter.Tendsto (fun x ↦ (f_10_1_6 x - f_10_1_6 0) / (x - 0))
93-
(nhds 0 ⊓ Filter.principal (Set.Ioi 0)) (nhds 1) := by
90+
example : (nhds 0 ⊓ .principal (.Ioi 0)).Tendsto (fun x ↦ (f_10_1_6 x - f_10_1_6 0) / (x - 0)) (nhds 1) := by
9491
sorry
9592

96-
example : Filter.Tendsto (fun x ↦ (f_10_1_6 x - f_10_1_6 0) / (x - 0))
97-
(nhds 0 ⊓ Filter.principal (Set.Iio 0)) (nhds (-1)) := by
93+
example : (nhds 0 ⊓ .principal (.Iio 0)).Tendsto (fun x ↦ (f_10_1_6 x - f_10_1_6 0) / (x - 0)) (nhds (-1)) := by
9894
sorry
9995

100-
example : ¬ ∃ L, Filter.Tendsto (fun x ↦ (f_10_1_6 x - f_10_1_6 0) / (x - 0))
101-
(nhds 0 ⊓ Filter.principal (Set.univ \ {0})) (nhds L) := by sorry
96+
example : ¬ ∃ L, (nhds 0 ⊓ .principal (.univ \ {0})).Tendsto (fun x ↦ (f_10_1_6 x - f_10_1_6 0) / (x - 0))
97+
(nhds L) := by sorry
10298

103-
example : ¬ DifferentiableWithinAt ℝ f_10_1_6 (Set.univ) 0 := by
99+
example : ¬ DifferentiableWithinAt ℝ f_10_1_6 (.univ) 0 := by
104100
sorry
105101

106-
example : DifferentiableWithinAt ℝ f_10_1_6 (Set.Ioi 0) 0 := by
102+
example : DifferentiableWithinAt ℝ f_10_1_6 (.Ioi 0) 0 := by
107103
sorry
108104

109-
example : derivWithin f_10_1_6 (Set.Ioi 0) 0 = 1 := by
105+
example : derivWithin f_10_1_6 (.Ioi 0) 0 = 1 := by
110106
sorry
111107

112-
example : DifferentiableWithinAt ℝ f_10_1_6 (Set.Iio 0) 0 := by
108+
example : DifferentiableWithinAt ℝ f_10_1_6 (.Iio 0) 0 := by
113109
sorry
114110

115-
example : derivWithin f_10_1_6 (Set.Iio 0) 0 = -1 := by
111+
example : derivWithin f_10_1_6 (.Iio 0) 0 = -1 := by
116112
sorry
117113

118114
/-- Proposition 10.1.7 (Newton's approximation) / Exercise 10.1.2 -/
@@ -181,7 +177,7 @@ theorem _root_.HasDerivWithinAt.of_div {X: Set ℝ} {x₀ f'x₀ g'x₀: ℝ}
181177
HasDerivWithinAt (f / g) ((f'x₀ * (g x₀) - (f x₀) * g'x₀) / (g x₀)^2) X x₀ := by
182178
sorry
183179

184-
example (x₀:ℝ) (hx₀: x₀ ≠ 1): HasDerivWithinAt (fun x ↦ (x-2)/(x-1)) (1 /(x₀-1)^2) (Set.univ \ {1}) x₀ := by
180+
example (x₀:ℝ) (hx₀: x₀ ≠ 1): HasDerivWithinAt (fun x ↦ (x-2)/(x-1)) (1 /(x₀-1)^2) (.univ \ {1}) x₀ := by
185181
sorry
186182

187183
/-- Theorem 10.1.15 (Chain rule) / Exercise 10.1.7 -/
@@ -193,12 +189,12 @@ theorem _root_.HasDerivWithinAt.of_comp {X Y: Set ℝ} {x₀ y₀ f'x₀ g'y₀:
193189

194190
/-- Exercise 10.1.5 -/
195191
theorem _root_.HasDerivWithinAt.of_pow (n:ℕ) (x₀:ℝ) : HasDerivWithinAt (fun x ↦ x^n)
196-
(n * x₀^((n:ℤ)-1)) (Set.univ) x₀ := by
192+
(n * x₀^((n:ℤ)-1)) .univ x₀ := by
197193
sorry
198194

199195
/-- Exercise 10.1.6 -/
200196
theorem _root_.HasDerivWithinAt.of_zpow (n:ℤ) (x₀:ℝ) (hx₀: x₀ ≠ 0) :
201-
HasDerivWithinAt (fun x ↦ x^n) (n * x₀^(n-1)) (Set.univ \ {0}) x₀ := by
197+
HasDerivWithinAt (fun x ↦ x^n) (n * x₀^(n-1)) (.univ \ {0}) x₀ := by
202198
sorry
203199

204200

analysis/Analysis/Section_10_2.lean

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Chapter10
2323
/-- Definition 10.2.1 (Local maxima and minima). Here we use Mathlib's `IsLocalMaxOn` type. -/
2424
theorem IsLocalMaxOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
2525
IsLocalMaxOn f X x₀ ↔
26-
∃ δ > 0, IsMaxOn f (X ∩ Set.Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
26+
∃ δ > 0, IsMaxOn f (X ∩ .Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
2727
simp [isMaxOn_iff, IsLocalMaxOn, IsMaxFilter, nhdsWithin.eq_1, Filter.eventually_inf_principal,
2828
Metric.eventually_nhds_iff, Real.dist_eq, abs_sub_lt_iff ]
2929
peel with ε hε x
@@ -33,7 +33,7 @@ theorem IsLocalMaxOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
3333

3434
theorem IsLocalMinOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
3535
IsLocalMinOn f X x₀ ↔
36-
∃ δ > 0, IsMinOn f (X ∩ Set.Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
36+
∃ δ > 0, IsMinOn f (X ∩ .Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
3737
simp [isMinOn_iff, IsLocalMinOn, IsMinFilter, nhdsWithin.eq_1, Filter.eventually_inf_principal,
3838
Metric.eventually_nhds_iff, Real.dist_eq, abs_sub_lt_iff ]
3939
peel with ε hε x
@@ -44,20 +44,20 @@ theorem IsLocalMinOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
4444
/-- Example 10.2.3 -/
4545
abbrev f_10_2_3 : ℝ → ℝ := fun x ↦ x^2 - x^4
4646

47-
example : ¬ IsMinOn f_10_2_3 Set.univ 0 := by sorry
47+
example : ¬ IsMinOn f_10_2_3 .univ 0 := by sorry
4848

49-
example : IsMinOn f_10_2_3 (Set.Ioo (-1) 1) 0 := by sorry
49+
example : IsMinOn f_10_2_3 (.Ioo (-1) 1) 0 := by sorry
5050

51-
example : IsLocalMaxOn f_10_2_3 Set.univ 0 := by sorry
51+
example : IsLocalMaxOn f_10_2_3 .univ 0 := by sorry
5252

5353
/-- Example 10.2.4 -/
54-
example : ¬ ∃ x, IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set.univ) x := by sorry
54+
example : ¬ ∃ x, IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) x := by sorry
5555

56-
example : ¬ ∃ x, IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set.univ) x := by sorry
56+
example : ¬ ∃ x, IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) x := by sorry
5757

58-
example (n:ℤ) : IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set.univ) n := by sorry
58+
example (n:ℤ) : IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) n := by sorry
5959

60-
example (n:ℤ) : IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set.univ) n := by sorry
60+
example (n:ℤ) : IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) n := by sorry
6161

6262
/-- Remark 10.2.5 -/
6363
theorem IsLocalMaxOn.of_restrict {X Y:Set ℝ} (hXY: Y ⊆ X) (f:ℝ → ℝ) (x₀:ℝ)
@@ -70,59 +70,59 @@ theorem IsLocalMinOn.of_restrict {X Y:Set ℝ} (hXY: Y ⊆ X) (f:ℝ → ℝ) (x
7070

7171
/-- Proposition 10.2.6 (Local extrema are stationary) / Exercise 10.2.1 -/
7272
theorem IsLocalMaxOn.deriv_eq_zero {a b:ℝ} (hab: a < b) {f:ℝ → ℝ} {x₀:ℝ}
73-
(hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMaxOn f (Set.Ioo a b) x₀) {L:ℝ}
74-
(hderiv: HasDerivWithinAt f L (Set.Ioo a b) x₀) : L = 0 := by
73+
(hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMaxOn f (.Ioo a b) x₀) {L:ℝ}
74+
(hderiv: HasDerivWithinAt f L (.Ioo a b) x₀) : L = 0 := by
7575
sorry
7676

7777
/-- Proposition 10.2.6 (Local extrema are stationary) / Exercise 10.2.1 -/
7878
theorem IsLocalMinOn.deriv_eq_zero {a b:ℝ} (hab: a < b) {f:ℝ → ℝ} {x₀:ℝ}
79-
(hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMinOn f (Set.Ioo a b) x₀) {L:ℝ}
80-
(hderiv: HasDerivWithinAt f L (Set.Ioo a b) x₀) : L = 0 := by
79+
(hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMinOn f (.Ioo a b) x₀) {L:ℝ}
80+
(hderiv: HasDerivWithinAt f L (.Ioo a b) x₀) : L = 0 := by
8181
sorry
8282

8383
theorem IsMaxOn.deriv_eq_zero_counter : ∃ (a b:ℝ) (hab: a < b) (f:ℝ → ℝ)
84-
(x₀:ℝ) (hx₀: x₀ ∈ Set.Icc a b) (h: IsMaxOn f (Set.Icc a b) x₀) (L:ℝ)
85-
(hderiv: HasDerivWithinAt f L (Set.Icc a b) x₀), L ≠ 0 := by
84+
(x₀:ℝ) (hx₀: x₀ ∈ Set.Icc a b) (h: IsMaxOn f (.Icc a b) x₀) (L:ℝ)
85+
(hderiv: HasDerivWithinAt f L (.Icc a b) x₀), L ≠ 0 := by
8686
sorry
8787

8888
/-- Theorem 10.2.7 (Rolle's theorem) / Exercise 10.2.4 -/
8989
theorem _root_.HasDerivWithinAt.exist_zero {a b:ℝ} (hab: a < b) {g:ℝ → ℝ}
90-
(hcont: ContinuousOn g (Set.Icc a b)) (hderiv: DifferentiableOn ℝ g (Set.Ioo a b))
91-
(hgab: g a = g b) : ∃ x ∈ Set.Ioo a b, HasDerivWithinAt g 0 (Set.Ioo a b) x := by
90+
(hcont: ContinuousOn g (.Icc a b)) (hderiv: DifferentiableOn ℝ g (.Ioo a b))
91+
(hgab: g a = g b) : ∃ x ∈ Set.Ioo a b, HasDerivWithinAt g 0 (.Ioo a b) x := by
9292
sorry
9393

9494
/-- Corollary 10.2.9 (Mean value theorem ) / Exercise 10.2.5 -/
9595
theorem _root_.HasDerivWithinAt.mean_value {a b:ℝ} (hab: a < b) {f:ℝ → ℝ}
96-
(hcont: ContinuousOn f (Set.Icc a b)) (hderiv: DifferentiableOn ℝ f (Set.Ioo a b)) :
97-
∃ x ∈ Set.Ioo a b, HasDerivWithinAt f ((f b - f a) / (b - a)) (Set.Ioo a b) x := by
96+
(hcont: ContinuousOn f (.Icc a b)) (hderiv: DifferentiableOn ℝ f (.Ioo a b)) :
97+
∃ x ∈ Set.Ioo a b, HasDerivWithinAt f ((f b - f a) / (b - a)) (.Ioo a b) x := by
9898
sorry
9999

100100
/-- Exercise 10.2.2 -/
101-
example : ∃ f:ℝ → ℝ, ContinuousOn f (Set.Icc (-1) 1) ∧
102-
IsMaxOn f (Set.Icc (-1) 1) 0 ∧ ¬ DifferentiableWithinAt ℝ f (Set.Icc (-1) 1) 0 := by
101+
example : ∃ f:ℝ → ℝ, ContinuousOn f (.Icc (-1) 1) ∧
102+
IsMaxOn f (.Icc (-1) 1) 0 ∧ ¬ DifferentiableWithinAt ℝ f (.Icc (-1) 1) 0 := by
103103
sorry
104104

105105
/-- Exercise 10.2.3 -/
106-
example : ∃ f:ℝ → ℝ, DifferentiableOn ℝ f (Set.Icc (-1) 1) ∧
107-
HasDerivWithinAt f 0 (Set.Ioo (-1) 1) 0
108-
¬ IsLocalMaxOn f (Set.Icc (-1) 1) 0 ∧ ¬ IsLocalMinOn f (Set.Icc (-1) 1) 0 := by
106+
example : ∃ f:ℝ → ℝ, DifferentiableOn ℝ f (.Icc (-1) 1) ∧
107+
HasDerivWithinAt f 0 (.Ioo (-1) 1) 0
108+
¬ IsLocalMaxOn f (.Icc (-1) 1) 0 ∧ ¬ IsLocalMinOn f (.Icc (-1) 1) 0 := by
109109
sorry
110110

111111
/-- Exercise 10.2.6 -/
112112
theorem lipschitz_bound {M a b:ℝ} (hM: M > 0) (hab: a < b) {f:ℝ → ℝ}
113-
(hcont: ContinuousOn f (Set.Icc a b))
114-
(hderiv: DifferentiableOn ℝ f (Set.Ioo a b))
115-
(hlip: ∀ x ∈ Set.Ioo a b, |derivWithin f (Set.Ioo a b) x| ≤ M)
113+
(hcont: ContinuousOn f (.Icc a b))
114+
(hderiv: DifferentiableOn ℝ f (.Ioo a b))
115+
(hlip: ∀ x ∈ Set.Ioo a b, |derivWithin f (.Ioo a b) x| ≤ M)
116116
{x y:ℝ} (hx: x ∈ Set.Ioo a b) (hy: y ∈ Set.Ioo a b) :
117117
|f x - f y| ≤ M * |x - y| := by
118118
sorry
119119

120120
/-- Exercise 10.2.7 -/
121121
theorem _root_.UniformContinuousOn.of_lipschitz {f:ℝ → ℝ}
122-
(hcont: ContinuousOn f Set.univ)
123-
(hderiv: DifferentiableOn ℝ f Set.univ)
124-
(hlip: BddOn (deriv f) Set.univ) :
125-
UniformContinuousOn f (Set.univ) := by
122+
(hcont: ContinuousOn f .univ)
123+
(hderiv: DifferentiableOn ℝ f .univ)
124+
(hlip: BddOn (deriv f) .univ) :
125+
UniformContinuousOn f (.univ) := by
126126
sorry
127127

128128

analysis/Analysis/Section_10_3.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ Main constructions and results of this section:
1717
namespace Chapter10
1818

1919
/-- Proposition 10.3.1 / Exercise 10.3.1 -/
20-
theorem derivative_of_monotone (X:Set ℝ) {x₀:ℝ} (hx₀: ClusterPt x₀ (Filter.principal (X \ {x₀})))
20+
theorem derivative_of_monotone (X:Set ℝ) {x₀:ℝ} (hx₀: ClusterPt x₀ (.principal (X \ {x₀})))
2121
{f:ℝ → ℝ} (hmono: Monotone f) (hderiv: DifferentiableWithinAt ℝ f X x₀) :
2222
derivWithin f X x₀ ≥ 0 := by
2323
sorry
2424

25-
theorem derivative_of_antitone (X:Set ℝ) {x₀:ℝ} (hx₀: ClusterPt x₀ (Filter.principal (X \ {x₀})))
25+
theorem derivative_of_antitone (X:Set ℝ) {x₀:ℝ} (hx₀: ClusterPt x₀ (.principal (X \ {x₀})))
2626
{f:ℝ → ℝ} (hmono: Antitone f) (hderiv: DifferentiableWithinAt ℝ f X x₀) :
2727
derivWithin f X x₀ ≤ 0 := by
2828
sorry
2929

3030
/-- Proposition 10.3.3 / Exercise 10.3.4 -/
3131
theorem strictMono_of_positive_derivative {a b:ℝ} (hab: a < b) {f:ℝ → ℝ}
32-
(hderiv: DifferentiableOn ℝ f (Set.Icc a b)) (hpos: ∀ x ∈ Set.Ioo a b, derivWithin f (Set.Icc a b) x > 0) :
33-
StrictMonoOn f (Set.Icc a b) := by
32+
(hderiv: DifferentiableOn ℝ f (.Icc a b)) (hpos: ∀ x ∈ Set.Ioo a b, derivWithin f (.Icc a b) x > 0) :
33+
StrictMonoOn f (.Icc a b) := by
3434
sorry
3535

3636
theorem strictAnti_of_negative_derivative {a b:ℝ} (hab: a < b) {f:ℝ → ℝ}
37-
(hderiv: DifferentiableOn ℝ f (Set.Icc a b)) (hneg: ∀ x ∈ Set.Ioo a b, derivWithin f (Set.Icc a b) x < 0) :
38-
StrictAntiOn f (Set.Icc a b) := by
37+
(hderiv: DifferentiableOn ℝ f (.Icc a b)) (hneg: ∀ x ∈ Set.Ioo a b, derivWithin f (.Icc a b) x < 0) :
38+
StrictAntiOn f (.Icc a b) := by
3939
sorry
4040

4141
/-- Example 10.3.2 -/

0 commit comments

Comments
 (0)