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

Commit cc59673

Browse files
committed
chore(*complex*): add a few simp lemmas (#10187)
1 parent a71bfdc commit cc59673

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/analysis/special_functions/trigonometric/basic.lean

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,16 +1059,22 @@ by simpa only [mul_inv_cancel_right₀ I_ne_zero] using exp_antiperiodic.mul_con
10591059
lemma exp_mul_I_periodic : function.periodic (λ x, exp (x * I)) (2 * π) :=
10601060
exp_mul_I_antiperiodic.periodic
10611061

1062-
lemma exp_pi_mul_I : exp (π * I) = -1 :=
1062+
@[simp] lemma exp_pi_mul_I : exp (π * I) = -1 :=
10631063
exp_zero ▸ exp_antiperiodic.eq
10641064

1065-
lemma exp_two_pi_mul_I : exp (2 * π * I) = 1 :=
1065+
@[simp] lemma exp_two_pi_mul_I : exp (2 * π * I) = 1 :=
10661066
exp_periodic.eq.trans exp_zero
10671067

1068-
lemma exp_nat_mul_two_pi_mul_I (n : ℕ) : exp (n * (2 * π * I)) = 1 :=
1068+
@[simp] lemma exp_nat_mul_two_pi_mul_I (n : ℕ) : exp (n * (2 * π * I)) = 1 :=
10691069
(exp_periodic.nat_mul_eq n).trans exp_zero
10701070

1071-
lemma exp_int_mul_two_pi_mul_I (n : ℤ) : exp (n * (2 * π * I)) = 1 :=
1071+
@[simp] lemma exp_int_mul_two_pi_mul_I (n : ℤ) : exp (n * (2 * π * I)) = 1 :=
10721072
(exp_periodic.int_mul_eq n).trans exp_zero
10731073

1074+
@[simp] lemma exp_add_pi_mul_I (z : ℂ) : exp (z + π * I) = -exp z :=
1075+
exp_antiperiodic z
1076+
1077+
@[simp] lemma exp_sub_pi_mul_I (z : ℂ) : exp (z - π * I) = -exp z :=
1078+
exp_antiperiodic.sub_eq z
1079+
10741080
end complex

src/data/complex/basic.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ lemma norm_sq_apply (z : ℂ) : norm_sq z = z.re * z.re + z.im * z.im := rfl
234234
@[simp] lemma norm_sq_of_real (r : ℝ) : norm_sq r = r * r :=
235235
by simp [norm_sq]
236236

237+
@[simp] lemma norm_sq_mk (x y : ℝ) : norm_sq ⟨x, y⟩ = x * x + y * y := rfl
238+
237239
lemma norm_sq_eq_conj_mul_self {z : ℂ} : (norm_sq z : ℂ) = conj z * z :=
238240
by { ext; simp [norm_sq, mul_comm], }
239241

src/data/complex/exponential.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,12 @@ by { rw [exp_eq_exp_re_mul_sin_add_cos], simp [exp_of_real_re, cos_of_real_re] }
879879
lemma exp_im : (exp x).im = real.exp x.re * real.sin x.im :=
880880
by { rw [exp_eq_exp_re_mul_sin_add_cos], simp [exp_of_real_re, sin_of_real_re] }
881881

882+
@[simp] lemma exp_of_real_mul_I_re (x : ℝ) : (exp (x * I)).re = real.cos x :=
883+
by simp [exp_mul_I, cos_of_real_re]
884+
885+
@[simp] lemma exp_of_real_mul_I_im (x : ℝ) : (exp (x * I)).im = real.sin x :=
886+
by simp [exp_mul_I, sin_of_real_re]
887+
882888
/-- **De Moivre's formula** -/
883889
theorem cos_add_sin_mul_I_pow (n : ℕ) (z : ℂ) :
884890
(cos z + sin z * I) ^ n = cos (↑n * z) + sin (↑n * z) * I :=

0 commit comments

Comments
 (0)