Zulip Chat Archive

Stream: Is there code for X?

Topic: Euler's Formula


Mark Gerads (Jul 10 2022 at 20:41):

I did not find this with library_search. Help would be appreciated, and this probably belongs in mathlib somewhere.

import all

open complex real

lemma EulersFormula : exp (I * real.pi) = -1 :=
begin
  sorry,
end

Hanting Zhang (Jul 10 2022 at 20:47):

I don't think it exists, but you are very close after docs#complex.exp_mul_I and docs#complex, docs#complex.sin_pi

Adam Topaz (Jul 10 2022 at 20:47):

import data.complex.exponential
import analysis.special_functions.trigonometric.basic

example : complex.exp (real.pi * complex.I) = -1 := by simp

Adam Topaz (Jul 10 2022 at 20:48):

Now you can copy that code, and replace simp with squeeze_simp to see what lemmas were used :)


Last updated: Dec 20 2023 at 11:08 UTC