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

Commit 420fabf

Browse files
committed
chore(analysis/normed_space/exponential): replace 1/x with x⁻¹ (#13971)
Note that `one_div` makes `⁻¹` the simp-normal form.
1 parent 03f5ac9 commit 420fabf

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

src/analysis/normed_space/exponential.lean

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -71,40 +71,40 @@ variables (𝕂 𝔸 : Type*) [field 𝕂] [ring 𝔸] [algebra 𝕂 𝔸] [topo
7171
/-- `exp_series 𝕂 𝔸` is the `formal_multilinear_series` whose `n`-th term is the map
7272
`(xᵢ) : 𝔸ⁿ ↦ (1/n! : 𝕂) • ∏ xᵢ`. Its sum is the exponential map `exp 𝕂 𝔸 : 𝔸 → 𝔸`. -/
7373
def exp_series : formal_multilinear_series 𝕂 𝔸 𝔸 :=
74-
λ n, (1/n! : 𝕂) • continuous_multilinear_map.mk_pi_algebra_fin 𝕂 n 𝔸
74+
λ n, (n!⁻¹ : 𝕂) • continuous_multilinear_map.mk_pi_algebra_fin 𝕂 n 𝔸
7575

7676
/-- `exp 𝕂 𝔸 : 𝔸 → 𝔸` is the exponential map determined by the action of `𝕂` on `𝔸`.
7777
It is defined as the sum of the `formal_multilinear_series` `exp_series 𝕂 𝔸`. -/
7878
noncomputable def exp (x : 𝔸) : 𝔸 := (exp_series 𝕂 𝔸).sum x
7979

8080
variables {𝕂 𝔸}
8181

82-
lemma exp_series_apply_eq (x : 𝔸) (n : ℕ) : exp_series 𝕂 𝔸 n (λ _, x) = (1 / n! : 𝕂) • x^n :=
82+
lemma exp_series_apply_eq (x : 𝔸) (n : ℕ) : exp_series 𝕂 𝔸 n (λ _, x) = (n!⁻¹ : 𝕂) • x^n :=
8383
by simp [exp_series]
8484

8585
lemma exp_series_apply_eq' (x : 𝔸) :
86-
(λ n, exp_series 𝕂 𝔸 n (λ _, x)) = (λ n, (1 / n! : 𝕂) • x^n) :=
86+
(λ n, exp_series 𝕂 𝔸 n (λ _, x)) = (λ n, (n!⁻¹ : 𝕂) • x^n) :=
8787
funext (exp_series_apply_eq x)
8888

8989
lemma exp_series_apply_eq_field [topological_space 𝕂] [topological_ring 𝕂] (x : 𝕂) (n : ℕ) :
9090
exp_series 𝕂 𝕂 n (λ _, x) = x^n / n! :=
9191
begin
92-
rw [div_eq_inv_mul, ←smul_eq_mul, inv_eq_one_div],
92+
rw [div_eq_inv_mul, ←smul_eq_mul],
9393
exact exp_series_apply_eq x n,
9494
end
9595

9696
lemma exp_series_apply_eq_field' [topological_space 𝕂] [topological_ring 𝕂] (x : 𝕂) :
9797
(λ n, exp_series 𝕂 𝕂 n (λ _, x)) = (λ n, x^n / n!) :=
9898
funext (exp_series_apply_eq_field x)
9999

100-
lemma exp_series_sum_eq (x : 𝔸) : (exp_series 𝕂 𝔸).sum x = ∑' (n : ℕ), (1 / n! : 𝕂) • x^n :=
100+
lemma exp_series_sum_eq (x : 𝔸) : (exp_series 𝕂 𝔸).sum x = ∑' (n : ℕ), (n!⁻¹ : 𝕂) • x^n :=
101101
tsum_congr (λ n, exp_series_apply_eq x n)
102102

103103
lemma exp_series_sum_eq_field [topological_space 𝕂] [topological_ring 𝕂] (x : 𝕂) :
104104
(exp_series 𝕂 𝕂).sum x = ∑' (n : ℕ), x^n / n! :=
105105
tsum_congr (λ n, exp_series_apply_eq_field x n)
106106

107-
lemma exp_eq_tsum : exp 𝕂 𝔸 = (λ x : 𝔸, ∑' (n : ℕ), (1 / n! : 𝕂) • x^n) :=
107+
lemma exp_eq_tsum : exp 𝕂 𝔸 = (λ x : 𝔸, ∑' (n : ℕ), (n!⁻¹ : 𝕂) • x^n) :=
108108
funext exp_series_sum_eq
109109

110110
lemma exp_eq_tsum_field [topological_space 𝕂] [topological_ring 𝕂] :
@@ -113,7 +113,7 @@ funext exp_series_sum_eq_field
113113

114114
@[simp] lemma exp_zero [t2_space 𝔸] : exp 𝕂 𝔸 0 = 1 :=
115115
begin
116-
suffices : (λ x : 𝔸, ∑' (n : ℕ), (1 / n! : 𝕂) • x^n) 0 = ∑' (n : ℕ), if n = 0 then 1 else 0,
116+
suffices : (λ x : 𝔸, ∑' (n : ℕ), (n!⁻¹ : 𝕂) • x^n) 0 = ∑' (n : ℕ), if n = 0 then 1 else 0,
117117
{ have key : ∀ n ∉ ({0} : finset ℕ), (if n = 0 then (1 : 𝔸) else 0) = 0,
118118
from λ n hn, if_neg (finset.not_mem_singleton.mp hn),
119119
rw [exp_eq_tsum, this, tsum_eq_sum key, finset.sum_singleton],
@@ -153,7 +153,7 @@ lemma norm_exp_series_summable_of_mem_ball (x : 𝔸)
153153

154154
lemma norm_exp_series_summable_of_mem_ball' (x : 𝔸)
155155
(hx : x ∈ emetric.ball (0 : 𝔸) (exp_series 𝕂 𝔸).radius) :
156-
summable (λ n, ∥(1 / n! : 𝕂) • x^n∥) :=
156+
summable (λ n, ∥(n!⁻¹ : 𝕂) • x^n∥) :=
157157
begin
158158
change summable (norm ∘ _),
159159
rw ← exp_series_apply_eq',
@@ -180,7 +180,7 @@ summable_of_summable_norm (norm_exp_series_summable_of_mem_ball x hx)
180180

181181
lemma exp_series_summable_of_mem_ball' (x : 𝔸)
182182
(hx : x ∈ emetric.ball (0 : 𝔸) (exp_series 𝕂 𝔸).radius) :
183-
summable (λ n, (1 / n! : 𝕂) • x^n) :=
183+
summable (λ n, (n!⁻¹ : 𝕂) • x^n) :=
184184
summable_of_summable_norm (norm_exp_series_summable_of_mem_ball' x hx)
185185

186186
lemma exp_series_field_summable_of_mem_ball [complete_space 𝕂] (x : 𝕂)
@@ -194,7 +194,7 @@ formal_multilinear_series.has_sum (exp_series 𝕂 𝔸) hx
194194

195195
lemma exp_series_has_sum_exp_of_mem_ball' (x : 𝔸)
196196
(hx : x ∈ emetric.ball (0 : 𝔸) (exp_series 𝕂 𝔸).radius) :
197-
has_sum (λ n, (1 / n! : 𝕂) • x^n) (exp 𝕂 𝔸 x):=
197+
has_sum (λ n, (n!⁻¹ : 𝕂) • x^n) (exp 𝕂 𝔸 x):=
198198
begin
199199
rw ← exp_series_apply_eq',
200200
exact exp_series_has_sum_exp_of_mem_ball x hx
@@ -339,8 +339,8 @@ begin
339339
refine (exp_series 𝕂 𝔸).radius_eq_top_of_summable_norm (λ r, _),
340340
refine summable_of_norm_bounded_eventually _ (real.summable_pow_div_factorial r) _,
341341
filter_upwards [eventually_cofinite_ne 0] with n hn,
342-
rw [norm_mul, norm_norm (exp_series 𝕂 𝔸 n), exp_series, norm_smul, norm_div, norm_one, norm_pow,
343-
nnreal.norm_eq, norm_eq_abs, abs_cast_nat, mul_comm, ←mul_assoc, ←mul_div_assoc, mul_one],
342+
rw [norm_mul, norm_norm (exp_series 𝕂 𝔸 n), exp_series, norm_smul, norm_inv, norm_pow,
343+
nnreal.norm_eq, norm_eq_abs, abs_cast_nat, mul_comm, ←mul_assoc, ←div_eq_mul_inv],
344344
have : ∥continuous_multilinear_map.mk_pi_algebra_fin 𝕂 n 𝔸∥ ≤ 1 :=
345345
norm_mk_pi_algebra_fin_le_of_pos (nat.pos_of_ne_zero hn),
346346
exact mul_le_of_le_one_right (div_nonneg (pow_nonneg r.coe_nonneg n) n!.cast_nonneg) this
@@ -359,7 +359,7 @@ section complete_algebra
359359
lemma norm_exp_series_summable (x : 𝔸) : summable (λ n, ∥exp_series 𝕂 𝔸 n (λ _, x)∥) :=
360360
norm_exp_series_summable_of_mem_ball x ((exp_series_radius_eq_top 𝕂 𝔸).symm ▸ edist_lt_top _ _)
361361

362-
lemma norm_exp_series_summable' (x : 𝔸) : summable (λ n, ∥(1 / n! : 𝕂) • x^n∥) :=
362+
lemma norm_exp_series_summable' (x : 𝔸) : summable (λ n, ∥(n!⁻¹ : 𝕂) • x^n∥) :=
363363
norm_exp_series_summable_of_mem_ball' x ((exp_series_radius_eq_top 𝕂 𝔸).symm ▸ edist_lt_top _ _)
364364

365365
lemma norm_exp_series_field_summable (x : 𝕂) : summable (λ n, ∥x^n / n!∥) :=
@@ -371,7 +371,7 @@ variables [complete_space 𝔸]
371371
lemma exp_series_summable (x : 𝔸) : summable (λ n, exp_series 𝕂 𝔸 n (λ _, x)) :=
372372
summable_of_summable_norm (norm_exp_series_summable x)
373373

374-
lemma exp_series_summable' (x : 𝔸) : summable (λ n, (1 / n! : 𝕂) • x^n) :=
374+
lemma exp_series_summable' (x : 𝔸) : summable (λ n, (n!⁻¹ : 𝕂) • x^n) :=
375375
summable_of_summable_norm (norm_exp_series_summable' x)
376376

377377
lemma exp_series_field_summable (x : 𝕂) : summable (λ n, x^n / n!) :=
@@ -380,7 +380,7 @@ summable_of_summable_norm (norm_exp_series_field_summable x)
380380
lemma exp_series_has_sum_exp (x : 𝔸) : has_sum (λ n, exp_series 𝕂 𝔸 n (λ _, x)) (exp 𝕂 𝔸 x) :=
381381
exp_series_has_sum_exp_of_mem_ball x ((exp_series_radius_eq_top 𝕂 𝔸).symm ▸ edist_lt_top _ _)
382382

383-
lemma exp_series_has_sum_exp' (x : 𝔸) : has_sum (λ n, (1 / n! : 𝕂) • x^n) (exp 𝕂 𝔸 x):=
383+
lemma exp_series_has_sum_exp' (x : 𝔸) : has_sum (λ n, (n!⁻¹ : 𝕂) • x^n) (exp 𝕂 𝔸 x):=
384384
exp_series_has_sum_exp_of_mem_ball' x ((exp_series_radius_eq_top 𝕂 𝔸).symm ▸ edist_lt_top _ _)
385385

386386
lemma exp_series_field_has_sum_exp (x : 𝕂) : has_sum (λ n, x^n / n!) (exp 𝕂 𝕂 x):=
@@ -582,10 +582,7 @@ variables (𝕂 𝕂' 𝔸 : Type*) [field 𝕂] [field 𝕂'] [ring 𝔸] [alge
582582
`exp_series` on `𝔸`. -/
583583
lemma exp_series_eq_exp_series (n : ℕ) (x : 𝔸) :
584584
(exp_series 𝕂 𝔸 n (λ _, x)) = (exp_series 𝕂' 𝔸 n (λ _, x)) :=
585-
by rw [exp_series, exp_series,
586-
smul_apply, mk_pi_algebra_fin_apply, list.of_fn_const, list.prod_repeat,
587-
smul_apply, mk_pi_algebra_fin_apply, list.of_fn_const, list.prod_repeat,
588-
one_div, one_div, inv_nat_cast_smul_eq 𝕂 𝕂']
585+
by rw [exp_series_apply_eq, exp_series_apply_eq, inv_nat_cast_smul_eq 𝕂 𝕂']
589586

590587
/-- If a normed ring `𝔸` is a normed algebra over two fields, then they define the same
591588
exponential function on `𝔸`. -/

src/analysis/normed_space/spectrum.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,23 +378,23 @@ begin
378378
have hexpmul : exp 𝕜 A a = exp 𝕜 A (a - ↑ₐ z) * ↑ₐ (exp 𝕜 𝕜 z),
379379
{ rw [algebra_map_exp_comm z, ←exp_add_of_commute (algebra.commutes z (a - ↑ₐz)).symm,
380380
sub_add_cancel] },
381-
let b := ∑' n : ℕ, ((1 / (n + 1).factorial) : 𝕜) • (a - ↑ₐz) ^ n,
382-
have hb : summable (λ n : ℕ, ((1 / (n + 1).factorial) : 𝕜) • (a - ↑ₐz) ^ n),
381+
let b := ∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐz) ^ n,
382+
have hb : summable (λ n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐz) ^ n),
383383
{ refine summable_of_norm_bounded_eventually _ (real.summable_pow_div_factorial ∥a - ↑ₐz∥) _,
384384
filter_upwards [filter.eventually_cofinite_ne 0] with n hn,
385-
rw [norm_smul, mul_comm, norm_div, norm_one, is_R_or_C.norm_eq_abs, is_R_or_C.abs_cast_nat,
386-
div_eq_mul_one_div],
385+
rw [norm_smul, mul_comm, norm_inv, is_R_or_C.norm_eq_abs, is_R_or_C.abs_cast_nat,
386+
div_eq_mul_inv],
387387
exact div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐz) (zero_lt_iff.mpr hn))
388388
(by exact_mod_cast nat.factorial_pos n)
389389
(by exact_mod_cast nat.factorial_le (lt_add_one n).le) },
390-
have h₀ : ∑' n : ℕ, ((1 / (n + 1).factorial) : 𝕜) • (a - ↑ₐz) ^ (n + 1) = (a - ↑ₐz) * b,
390+
have h₀ : ∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐz) ^ (n + 1) = (a - ↑ₐz) * b,
391391
{ simpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐz) },
392-
have h₁ : ∑' n : ℕ, ((1 / (n + 1).factorial) : 𝕜) • (a - ↑ₐz) ^ (n + 1) = b * (a - ↑ₐz),
392+
have h₁ : ∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐz) ^ (n + 1) = b * (a - ↑ₐz),
393393
{ simpa only [pow_succ', algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐz) },
394394
have h₃ : exp 𝕜 A (a - ↑ₐz) = 1 + (a - ↑ₐz) * b,
395395
{ rw exp_eq_tsum,
396396
convert tsum_eq_zero_add (exp_series_summable' (a - ↑ₐz)),
397-
simp only [nat.factorial_zero, nat.cast_one, _root_.div_one, pow_zero, one_smul],
397+
simp only [nat.factorial_zero, nat.cast_one, inv_one, pow_zero, one_smul],
398398
exact h₀.symm },
399399
rw [spectrum.mem_iff, is_unit.sub_iff, ←one_mul (↑ₐ(exp 𝕜 𝕜 z)), hexpmul, ←_root_.sub_mul,
400400
commute.is_unit_mul_iff (algebra.commutes (exp 𝕜 𝕜 z) (exp 𝕜 A (a - ↑ₐz) - 1)).symm,

src/analysis/special_functions/exponential.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ begin
223223
← re_to_complex, ← re_clm_apply, re_clm.map_tsum (exp_series_summable' (x : ℂ))],
224224
refine tsum_congr (λ n, _),
225225
rw [re_clm.map_smul, ← complex.of_real_pow, re_clm_apply, re_to_complex, complex.of_real_re,
226-
smul_eq_mul, one_div, mul_comm, div_eq_mul_inv]
226+
smul_eq_mul, div_eq_inv_mul]
227227
end
228228

229229
end real

0 commit comments

Comments
 (0)