Zulip Chat Archive

Stream: general

Topic: can you take cos of both sides?


view this post on Zulip James Arthur (Jul 15 2020 at 09:32):

Hi, I have a proof where I am trying to show that you can divide a version of generalised tangent and it's the same as tangent as tanmx=sinmxcosmx=sinxf(x)cosxf(x) tan_m x = \frac{sin_m x}{cos_m x} = \frac{sin x * f(x)}{cos x * f(x)}, where f(x)f(x) is my radius function. I have got the following code thus far:

import tactic
import basic
import data.real.basic
import data.complex.exponential
import analysis.special_functions.pow

noncomputable theory
open_locale classical

open real

notation `|`x`|` := abs x


/- 002 -/
def radius (x m : ) := 1 / ( |sin x| ^ m + |cos x| ^ m ) ^ (1/m)

/- 003 -/
def sinm (θ m : ) := sin θ * radius θ m
-- trigonometric sin is defined!!

/- 004 -/
def cosm (θ m : ) := cos θ * radius θ m
-- So we can onto prove somethings!
-- actually, let us go and define a few more things

/- 005 -/
def tanm (θ m : ) := sinm θ m / cosm θ m

theorem tanm_eq_tan (x m : ) (n : ) (f : radius x m  0): tanm x m = tan x :=
begin
  unfold tanm,
  unfold sinm,
  unfold cosm,
  have H : cos x * radius x m  0,
  {simp only [ne.def, mul_eq_zero],
   intros h,
   cases h with m n,
   swap,
   {apply f, exact n,},
   { by_cases h :  n, x = (2*n+1)/2 * pi,
    {sorry},
    { rw not_exists at h,
      apply h n,
      -- bit stuck here, want to just 'cos' both sides
      --rw [mul_zero, zero_add, mul_comm, ←div_eq_mul_one_div],
      sorry
    },
   },
  }
end

I have also proved this auxillary lemma but it doesn't seem to be much use:

lemma exists_cos_pi_half_eq_zero (x m : ) (n : ) :  n, x = (2*n + 1) * pi / 2  cos x = 0  :=
begin
  use 0,
  intros f,
  rw [mul_zero, zero_add, one_mul] at f,
  rw f,
  simp,
end

view this post on Zulip Chris Hughes (Jul 15 2020 at 09:40):

There's the apply_fun tactic.

view this post on Zulip Johan Commelin (Jul 15 2020 at 09:40):

@James Arthur But sides of the goal, or both sides of a hypothesis?

view this post on Zulip Johan Commelin (Jul 15 2020 at 09:40):

(I didn't try your code yet.)

view this post on Zulip James Arthur (Jul 15 2020 at 09:41):

both sides of the goal

view this post on Zulip Chris Hughes (Jul 15 2020 at 09:41):

cosm needs to be injective for that right?

view this post on Zulip James Arthur (Jul 15 2020 at 09:41):

current state of the goal:

1 goal
x m: 
n: 
f: radius x m  0
m: cos x = 0
h:  (x_1 : ), ¬x = (2 * x_1 + 1) / 2 * pi
 x = (2 * n + 1) / 2 * pi

view this post on Zulip Chris Hughes (Jul 15 2020 at 09:42):

Is it injective on some interval and you know both sides of the goal are in that interval?

view this post on Zulip Sebastien Gouezel (Jul 15 2020 at 09:44):

Wait, your assumption h is wrong, right? (take x1=(2πx1)/2x_1 = (2 \pi x -1)/2). From this, you can deduce anything you want!

view this post on Zulip James Arthur (Jul 15 2020 at 09:44):

I believe that cosxcos x isn't injective than on 0 to π2 \frac{\pi}{2} and I haven't actually looked at cosmx cosm x but my intuition says no. I removed the problemed areas in this case, i.e. where cosm goes to infinity

view this post on Zulip James Arthur (Jul 15 2020 at 09:45):

Sebastien Gouezel said:

Wait, your assumption h is wrong, right? (take x1=(2πx1)/2x_1 = (2 \pi x -1)/2). From this, you can deduce anything you want!

Oh... yeah. it needs to be an integer XD

view this post on Zulip Shing Tak Lam (Jul 15 2020 at 09:46):

This was what I was alluding to yesterday. I didn't see your code for very long and the \exists ... may not have been the correct idea.

theorem tanm_eq_tan (x m : ) (f : radius x m  0): tanm x m = tan x :=
begin
  unfold tanm sinm cosm,
  rw tan_eq_sin_div_cos,
  by_cases h : cos x = 0,
  { rw h, simp },
  rw div_eq_div_iff,
  ring,
  exact mul_ne_zero h f,
  exact h,
end

view this post on Zulip Shing Tak Lam (Jul 15 2020 at 09:46):

Since dividing by 0 in Lean gives you 0, so it's true whether cos x is 0 or not

view this post on Zulip Shing Tak Lam (Jul 15 2020 at 09:47):

Apologies for (maybe) leading you down a wrong path

view this post on Zulip James Arthur (Jul 15 2020 at 09:47):

It's ok. I was following your message. To be perfectly honest I had no idea where I was going

view this post on Zulip James Arthur (Jul 15 2020 at 10:09):

Also thankyou all!


Last updated: May 06 2021 at 21:09 UTC