l3lab/ntp-mathlib huggingface dataset:
/-- The cosine of `π / 3` is `1 / 2`. -/
@[simp]
theorem cos_pi_div_three : cos (π / 3) = 1 / 2 := by
  have h₁ : (2 * cos (π / 3) - 1) ^ 2 * (2 * cos (π / 3) + 2) = 0 := by
    have : cos (3 * (π / 3)) = cos π := by
      congr 1
      ring
    linarith [cos_pi, cos_three_mul (π / 3)]
  cases' mul_eq_zero.mp h₁ with h h
  · linarith [pow_eq_zero h]
  · have : cos π < cos (π / 3) := by
      refine' cos_lt_cos_of_nonneg_of_le_pi _ le_rfl _ <;> 

Proof state:
case refine'_1
x : ℝ
h₁ : (2 * cos (π / 3) - 1) ^ 2 * (2 * cos (π / 3) + 2) = 0
h : 2 * cos (π / 3) + 2 = 0
⊢ 0 ≤ π / 3

Next tactic:
linarith [pi_pos]
/-- The cosine of `π / 3` is `1 / 2`. -/
@[simp]
theorem cos_pi_div_three : cos (π / 3) = 1 / 2 := by
  have h₁ : (2 * cos (π / 3) - 1) ^ 2 * (2 * cos (π / 3) + 2) = 0 := by
    have : cos (3 * (π / 3)) = cos π := by
      congr 1
      ring
    linarith [cos_pi, cos_three_mul (π / 3)]
  cases' mul_eq_zero.mp h₁ with h h
  · linarith [pow_eq_zero h]
  · have : cos π < cos (π / 3) := by
      refine' cos_lt_cos_of_nonneg_of_le_pi _ le_rfl _ <;> 

Proof state:
case refine'_2
x : ℝ
h₁ : (2 * cos (π / 3) - 1) ^ 2 * (2 * cos (π / 3) + 2) = 0
h : 2 * cos (π / 3) + 2 = 0
⊢ π / 3 < π

Next tactic:
linarith [pi_pos]
/-- The cosine of `π / 3` is `1 / 2`. -/
@[simp]
theorem cos_pi_div_three : cos (π / 3) = 1 / 2 := by
  have h₁ : (2 * cos (π / 3) - 1) ^ 2 * (2 * cos (π / 3) + 2) = 0 := by
    have : cos (3 * (π / 3)) = cos π := by
      congr 1
      ring
    linarith [cos_pi, cos_three_mul (π / 3)]
  cases' mul_eq_zero.mp h₁ with h h
  · linarith [pow_eq_zero h]
  · have : cos π < cos (π / 3) := by
      refine' cos_lt_cos_of_nonneg_of_le_pi _ le_rfl _ <;> linarith [pi_pos]
    

Proof state:
case inr
x : ℝ
h₁ : (2 * cos (π / 3) - 1) ^ 2 * (2 * cos (π / 3) + 2) = 0
h : 2 * cos (π / 3) + 2 = 0
this : cos π < cos (π / 3)
⊢ cos (π / 3) = 1 / 2

Next tactic:
linarith [cos_pi]
/-- The cosine of `π / 6` is `√3 / 2`. -/
@[simp]
theorem cos_pi_div_six : cos (π / 6) = sqrt 3 / 2 := by
  

Proof state:
x : ℝ
⊢ cos (π / 6) = sqrt 3 / 2

Next tactic:
rw [show (6 : ℝ) = 3 * 2 by norm_num, div_mul_eq_div_div, cos_half, cos_pi_div_three, one_add_div,
    ← div_mul_eq_div_div, two_add_one_eq_three, sqrt_div, sqrt_mul_self]
/-- The cosine of `π / 6` is `√3 / 2`. -/
@[simp]
theorem cos_pi_div_six : cos (π / 6) = sqrt 3 / 2 := by
  rw [show (6 : ℝ) = 3 * 2 by 

Proof state:
x : ℝ
⊢ 6 = 3 * 2

Next tactic:
norm_num
/-- The cosine of `π / 6` is `√3 / 2`. -/
@[simp]
theorem cos_pi_div_six : cos (π / 6) = sqrt 3 / 2 := by
  rw [show (6 : ℝ) = 3 * 2 by norm_num, div_mul_eq_div_div, cos_half, cos_pi_div_three, one_add_div,
    ← div_mul_eq_div_div, two_add_one_eq_three, sqrt_div, sqrt_mul_self] <;> 

Proof state:
x : ℝ
⊢ 0 ≤ 2

Next tactic:
linarith [pi_pos]
/-- The cosine of `π / 6` is `√3 / 2`. -/
@[simp]
theorem cos_pi_div_six : cos (π / 6) = sqrt 3 / 2 := by
  rw [show (6 : ℝ) = 3 * 2 by norm_num, div_mul_eq_div_div, cos_half, cos_pi_div_three, one_add_div,
    ← div_mul_eq_div_div, two_add_one_eq_three, sqrt_div, sqrt_mul_self] <;> 

Proof state:
case hx
x : ℝ
⊢ 0 ≤ 3

Next tactic:
linarith [pi_pos]
/-- The cosine of `π / 6` is `√3 / 2`. -/
@[simp]
theorem cos_pi_div_six : cos (π / 6) = sqrt 3 / 2 := by
  rw [show (6 : ℝ) = 3 * 2 by norm_num, div_mul_eq_div_div, cos_half, cos_pi_div_three, one_add_div,
    ← div_mul_eq_div_div, two_add_one_eq_three, sqrt_div, sqrt_mul_self] <;> 

Proof state:
x : ℝ
⊢ 2 ≠ 0

Next tactic:
linarith [pi_pos]
/-- The cosine of `π / 6` is `√3 / 2`. -/
@[simp]
theorem cos_pi_div_six : cos (π / 6) = sqrt 3 / 2 := by
  rw [show (6 : ℝ) = 3 * 2 by norm_num, div_mul_eq_div_div, cos_half, cos_pi_div_three, one_add_div,
    ← div_mul_eq_div_div, two_add_one_eq_three, sqrt_div, sqrt_mul_self] <;> 

Proof state:
case hl
x : ℝ
⊢ -π ≤ π / 3

Next tactic:
linarith [pi_pos]
/-- The cosine of `π / 6` is `√3 / 2`. -/
@[simp]
theorem cos_pi_div_six : cos (π / 6) = sqrt 3 / 2 := by
  rw [show (6 : ℝ) = 3 * 2 by norm_num, div_mul_eq_div_div, cos_half, cos_pi_div_three, one_add_div,
    ← div_mul_eq_div_div, two_add_one_eq_three, sqrt_div, sqrt_mul_self] <;> 

Proof state:
case hr
x : ℝ
⊢ π / 3 ≤ π

Next tactic:
linarith [pi_pos]
/-- The square of the cosine of `π / 6` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_cos_pi_div_six : cos (π / 6) ^ 2 = 3 / 4 := by
  

Proof state:
x : ℝ
⊢ cos (π / 6) ^ 2 = 3 / 4

Next tactic:
rw [cos_pi_div_six, div_pow, sq_sqrt]
/-- The square of the cosine of `π / 6` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_cos_pi_div_six : cos (π / 6) ^ 2 = 3 / 4 := by
  rw [cos_pi_div_six, div_pow, sq_sqrt] <;> 

Proof state:
x : ℝ
⊢ 3 / 2 ^ 2 = 3 / 4

Next tactic:
norm_num
/-- The square of the cosine of `π / 6` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_cos_pi_div_six : cos (π / 6) ^ 2 = 3 / 4 := by
  rw [cos_pi_div_six, div_pow, sq_sqrt] <;> 

Proof state:
x : ℝ
⊢ 0 ≤ 3

Next tactic:
norm_num
/-- The sine of `π / 6` is `1 / 2`. -/
@[simp]
theorem sin_pi_div_six : sin (π / 6) = 1 / 2 := by
  

Proof state:
x : ℝ
⊢ sin (π / 6) = 1 / 2

Next tactic:
rw [← cos_pi_div_two_sub, ← cos_pi_div_three]
/-- The sine of `π / 6` is `1 / 2`. -/
@[simp]
theorem sin_pi_div_six : sin (π / 6) = 1 / 2 := by
  rw [← cos_pi_div_two_sub, ← cos_pi_div_three]
  

Proof state:
x : ℝ
⊢ cos (π / 2 - π / 6) = cos (π / 3)

Next tactic:
congr
/-- The sine of `π / 6` is `1 / 2`. -/
@[simp]
theorem sin_pi_div_six : sin (π / 6) = 1 / 2 := by
  rw [← cos_pi_div_two_sub, ← cos_pi_div_three]
  congr
  

Proof state:
case e_x
x : ℝ
⊢ π / 2 - π / 6 = π / 3

Next tactic:
ring
/-- The square of the sine of `π / 3` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_sin_pi_div_three : sin (π / 3) ^ 2 = 3 / 4 := by
  

Proof state:
x : ℝ
⊢ sin (π / 3) ^ 2 = 3 / 4

Next tactic:
rw [← cos_pi_div_two_sub, ← sq_cos_pi_div_six]
/-- The square of the sine of `π / 3` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_sin_pi_div_three : sin (π / 3) ^ 2 = 3 / 4 := by
  rw [← cos_pi_div_two_sub, ← sq_cos_pi_div_six]
  

Proof state:
x : ℝ
⊢ cos (π / 2 - π / 3) ^ 2 = cos (π / 6) ^ 2

Next tactic:
congr
/-- The square of the sine of `π / 3` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_sin_pi_div_three : sin (π / 3) ^ 2 = 3 / 4 := by
  rw [← cos_pi_div_two_sub, ← sq_cos_pi_div_six]
  congr
  

Proof state:
case e_a.e_x
x : ℝ
⊢ π / 2 - π / 3 = π / 6

Next tactic:
ring
/-- The sine of `π / 3` is `√3 / 2`. -/
@[simp]
theorem sin_pi_div_three : sin (π / 3) = sqrt 3 / 2 := by
  

Proof state:
x : ℝ
⊢ sin (π / 3) = sqrt 3 / 2

Next tactic:
rw [← cos_pi_div_two_sub, ← cos_pi_div_six]
/-- The sine of `π / 3` is `√3 / 2`. -/
@[simp]
theorem sin_pi_div_three : sin (π / 3) = sqrt 3 / 2 := by
  rw [← cos_pi_div_two_sub, ← cos_pi_div_six]
  

Proof state:
x : ℝ
⊢ cos (π / 2 - π / 3) = cos (π / 6)

Next tactic:
congr
/-- The sine of `π / 3` is `√3 / 2`. -/
@[simp]
theorem sin_pi_div_three : sin (π / 3) = sqrt 3 / 2 := by
  rw [← cos_pi_div_two_sub, ← cos_pi_div_six]
  congr
  

Proof state:
case e_x
x : ℝ
⊢ π / 2 - π / 3 = π / 6

Next tactic:
ring
@[simp]
theorem tan_pi_div_four : tan (π / 4) = 1 := by
  

Proof state:
⊢ tan (π / 4) = 1

Next tactic:
rw [tan_eq_sin_div_cos, cos_pi_div_four, sin_pi_div_four]
@[simp]
theorem tan_pi_div_four : tan (π / 4) = 1 := by
  rw [tan_eq_sin_div_cos, cos_pi_div_four, sin_pi_div_four]
  

Proof state:
⊢ sqrt 2 / 2 / (sqrt 2 / 2) = 1

Next tactic:
have h : sqrt 2 / 2 > 0 := by cancel_denoms
@[simp]
theorem tan_pi_div_four : tan (π / 4) = 1 := by
  rw [tan_eq_sin_div_cos, cos_pi_div_four, sin_pi_div_four]
  have h : sqrt 2 / 2 > 0 := by 

Proof state:
⊢ sqrt 2 / 2 > 0

Next tactic:
cancel_denoms
@[simp]
theorem tan_pi_div_four : tan (π / 4) = 1 := by
  rw [tan_eq_sin_div_cos, cos_pi_div_four, sin_pi_div_four]
  have h : sqrt 2 / 2 > 0 := by cancel_denoms
  

Proof state:
h : sqrt 2 / 2 > 0
⊢ sqrt 2 / 2 / (sqrt 2 / 2) = 1

Next tactic:
exact div_self (ne_of_gt h)
@[simp]
theorem tan_pi_div_two : tan (π / 2) = 0 := by 

Proof state:
⊢ tan (π / 2) = 0

Next tactic:
simp [tan_eq_sin_div_cos]
theorem tan_pos_of_pos_of_lt_pi_div_two {x : ℝ} (h0x : 0 < x) (hxp : x < π / 2) : 0 < tan x := by
  

Proof state:
x : ℝ
h0x : 0 < x
hxp : x < π / 2
⊢ 0 < tan x

Next tactic:
rw [tan_eq_sin_div_cos]
theorem tan_pos_of_pos_of_lt_pi_div_two {x : ℝ} (h0x : 0 < x) (hxp : x < π / 2) : 0 < tan x := by
  rw [tan_eq_sin_div_cos]
  

Proof state:
x : ℝ
h0x : 0 < x
hxp : x < π / 2
⊢ 0 < sin x / cos x

Next tactic:
exact div_pos (sin_pos_of_pos_of_lt_pi h0x (by linarith)) (cos_pos_of_mem_Ioo ⟨by linarith, hxp⟩)
theorem tan_pos_of_pos_of_lt_pi_div_two {x : ℝ} (h0x : 0 < x) (hxp : x < π / 2) : 0 < tan x := by
  rw [tan_eq_sin_div_cos]
  exact div_pos (sin_pos_of_pos_of_lt_pi h0x (by 

Proof state:
x : ℝ
h0x : 0 < x
hxp : x < π / 2
⊢ x < π

Next tactic:
linarith
theorem tan_pos_of_pos_of_lt_pi_div_two {x : ℝ} (h0x : 0 < x) (hxp : x < π / 2) : 0 < tan x := by
  rw [tan_eq_sin_div_cos]
  exact div_pos (sin_pos_of_pos_of_lt_pi h0x (by linarith)) (cos_pos_of_mem_Ioo ⟨by 

Proof state:
x : ℝ
h0x : 0 < x
hxp : x < π / 2
⊢ -(π / 2) < x

Next tactic:
linarith
theorem tan_nonneg_of_nonneg_of_le_pi_div_two {x : ℝ} (h0x : 0 ≤ x) (hxp : x ≤ π / 2) : 0 ≤ tan x :=
  match lt_or_eq_of_le h0x, lt_or_eq_of_le hxp with
  | Or.inl hx0, Or.inl hxp => le_of_lt (tan_pos_of_pos_of_lt_pi_div_two hx0 hxp)
  | Or.inl _, Or.inr hxp => by 

Proof state:
x : ℝ
h0x : 0 ≤ x
hxp✝ : x ≤ π / 2
h✝ : 0 < x
hxp : x = π / 2
⊢ 0 ≤ tan x

Next tactic:
simp [hxp, tan_eq_sin_div_cos]
theorem tan_nonneg_of_nonneg_of_le_pi_div_two {x : ℝ} (h0x : 0 ≤ x) (hxp : x ≤ π / 2) : 0 ≤ tan x :=
  match lt_or_eq_of_le h0x, lt_or_eq_of_le hxp with
  | Or.inl hx0, Or.inl hxp => le_of_lt (tan_pos_of_pos_of_lt_pi_div_two hx0 hxp)
  | Or.inl _, Or.inr hxp => by simp [hxp, tan_eq_sin_div_cos]
  | Or.inr hx0, _ => by 

Proof state:
x : ℝ
h0x : 0 ≤ x
hxp : x ≤ π / 2
hx0 : 0 = x
x✝ : x < π / 2 ∨ x = π / 2
⊢ 0 ≤ tan x

Next tactic:
simp [hx0.symm]
theorem tan_neg_of_neg_of_pi_div_two_lt {x : ℝ} (hx0 : x < 0) (hpx : -(π / 2) < x) : tan x < 0 :=
  neg_pos.1 (tan_neg x ▸ tan_pos_of_pos_of_lt_pi_div_two (by 

Proof state:
x : ℝ
hx0 : x < 0
hpx : -(π / 2) < x
⊢ 0 < -x

Next tactic:
linarith
theorem tan_neg_of_neg_of_pi_div_two_lt {x : ℝ} (hx0 : x < 0) (hpx : -(π / 2) < x) : tan x < 0 :=
  neg_pos.1 (tan_neg x ▸ tan_pos_of_pos_of_lt_pi_div_two (by linarith) (by 

Proof state:
x : ℝ
hx0 : x < 0
hpx : -(π / 2) < x
⊢ -x < π / 2

Next tactic:
linarith [pi_pos]
theorem tan_nonpos_of_nonpos_of_neg_pi_div_two_le {x : ℝ} (hx0 : x ≤ 0) (hpx : -(π / 2) ≤ x) :
    tan x ≤ 0 :=
  neg_nonneg.1 (tan_neg x ▸ tan_nonneg_of_nonneg_of_le_pi_div_two (by 

Proof state:
x : ℝ
hx0 : x ≤ 0
hpx : -(π / 2) ≤ x
⊢ 0 ≤ -x

Next tactic:
linarith
theorem tan_nonpos_of_nonpos_of_neg_pi_div_two_le {x : ℝ} (hx0 : x ≤ 0) (hpx : -(π / 2) ≤ x) :
    tan x ≤ 0 :=
  neg_nonneg.1 (tan_neg x ▸ tan_nonneg_of_nonneg_of_le_pi_div_two (by linarith) (by 

Proof state:
x : ℝ
hx0 : x ≤ 0
hpx : -(π / 2) ≤ x
⊢ -x ≤ π / 2

Next tactic:
linarith
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y := by
  

Proof state:
x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y < π / 2
hxy : x < y
⊢ tan x < tan y

Next tactic:
rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos]
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y := by
  rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos]
  

Proof state:
x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y < π / 2
hxy : x < y
⊢ sin x / cos x < sin y / cos y

Next tactic:
exact
    div_lt_div (sin_lt_sin_of_lt_of_le_pi_div_two (by linarith) (le_of_lt hy₂) hxy)
      (cos_le_cos_of_nonneg_of_le_pi hx₁ (by linarith) (le_of_lt hxy))
      (sin_nonneg_of_nonneg_of_le_pi (by linarith) (by linarith))
      (cos_pos_of_mem_Ioo ⟨by linarith, hy₂⟩)
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y := by
  rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos]
  exact
    div_lt_div (sin_lt_sin_of_lt_of_le_pi_div_two (by 

Proof state:
x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y < π / 2
hxy : x < y
⊢ -(π / 2) ≤ x

Next tactic:
linarith
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y := by
  rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos]
  exact
    div_lt_div (sin_lt_sin_of_lt_of_le_pi_div_two (by linarith) (le_of_lt hy₂) hxy)
      (cos_le_cos_of_nonneg_of_le_pi hx₁ (by 

Proof state:
x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y < π / 2
hxy : x < y
⊢ y ≤ π

Next tactic:
linarith
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y := by
  rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos]
  exact
    div_lt_div (sin_lt_sin_of_lt_of_le_pi_div_two (by linarith) (le_of_lt hy₂) hxy)
      (cos_le_cos_of_nonneg_of_le_pi hx₁ (by linarith) (le_of_lt hxy))
      (sin_nonneg_of_nonneg_of_le_pi (by 

Proof state:
x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y < π / 2
hxy : x < y
⊢ 0 ≤ y

Next tactic:
linarith
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y := by
  rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos]
  exact
    div_lt_div (sin_lt_sin_of_lt_of_le_pi_div_two (by linarith) (le_of_lt hy₂) hxy)
      (cos_le_cos_of_nonneg_of_le_pi hx₁ (by linarith) (le_of_lt hxy))
      (sin_nonneg_of_nonneg_of_le_pi (by linarith) (by 

Proof state:
x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y < π / 2
hxy : x < y
⊢ y ≤ π

Next tactic:
linarith
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y := by
  rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos]
  exact
    div_lt_div (sin_lt_sin_of_lt_of_le_pi_div_two (by linarith) (le_of_lt hy₂) hxy)
      (cos_le_cos_of_nonneg_of_le_pi hx₁ (by linarith) (le_of_lt hxy))
      (sin_nonneg_of_nonneg_of_le_pi (by linarith) (by linarith))
      (cos_pos_of_mem_Ioo ⟨by 

Proof state:
x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y < π / 2
hxy : x < y
⊢ -(π / 2) < y

Next tactic:
linarith
theorem tan_lt_tan_of_lt_of_lt_pi_div_two {x y : ℝ} (hx₁ : -(π / 2) < x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y :=
  match le_total x 0, le_total y 0 with
  | Or.inl hx0, Or.inl hy0 =>
    neg_lt_neg_iff.1 <| by
      

Proof state:
x y : ℝ
hx₁ : -(π / 2) < x
hy₂ : y < π / 2
hxy : x < y
hx0 : x ≤ 0
hy0 : y ≤ 0
⊢ -tan y < -tan x

Next tactic:
rw [← tan_neg, ← tan_neg]
theorem tan_lt_tan_of_lt_of_lt_pi_div_two {x y : ℝ} (hx₁ : -(π / 2) < x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y :=
  match le_total x 0, le_total y 0 with
  | Or.inl hx0, Or.inl hy0 =>
    neg_lt_neg_iff.1 <| by
      rw [← tan_neg, ← tan_neg]
      

Proof state:
x y : ℝ
hx₁ : -(π / 2) < x
hy₂ : y < π / 2
hxy : x < y
hx0 : x ≤ 0
hy0 : y ≤ 0
⊢ tan (-y) < tan (-x)

Next tactic:
exact tan_lt_tan_of_nonneg_of_lt_pi_div_two (neg_nonneg.2 hy0) (neg_lt.2 hx₁) (neg_lt_neg hxy)
theorem tan_lt_tan_of_lt_of_lt_pi_div_two {x y : ℝ} (hx₁ : -(π / 2) < x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y :=
  match le_total x 0, le_total y 0 with
  | Or.inl hx0, Or.inl hy0 =>
    neg_lt_neg_iff.1 <| by
      rw [← tan_neg, ← tan_neg]
      exact tan_lt_tan_of_nonneg_of_lt_pi_div_two (neg_nonneg.2 hy0) (neg_lt.2 hx₁) (neg_lt_neg hxy)
  | Or.inl hx0, Or.inr hy0 =>
    (lt_or_eq_of_le hy0).elim
      (fun hy0 =>
        calc
          tan x ≤ 0 := tan_nonpos_of_nonpos_of_neg_pi_div_two_le hx0 (le_of_lt hx₁)
          _ < tan y := tan_pos_of_pos_of_lt_pi_div_two hy0 hy₂)
      fun hy0 => by
      

Proof state:
x y : ℝ
hx₁ : -(π / 2) < x
hy₂ : y < π / 2
hxy : x < y
hx0 : x ≤ 0
hy0✝ : 0 ≤ y
hy0 : 0 = y
⊢ tan x < tan y

Next tactic:
rw [← hy0, tan_zero]
theorem tan_lt_tan_of_lt_of_lt_pi_div_two {x y : ℝ} (hx₁ : -(π / 2) < x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y :=
  match le_total x 0, le_total y 0 with
  | Or.inl hx0, Or.inl hy0 =>
    neg_lt_neg_iff.1 <| by
      rw [← tan_neg, ← tan_neg]
      exact tan_lt_tan_of_nonneg_of_lt_pi_div_two (neg_nonneg.2 hy0) (neg_lt.2 hx₁) (neg_lt_neg hxy)
  | Or.inl hx0, Or.inr hy0 =>
    (lt_or_eq_of_le hy0).elim
      (fun hy0 =>
        calc
          tan x ≤ 0 := tan_nonpos_of_nonpos_of_neg_pi_div_two_le hx0 (le_of_lt hx₁)
          _ < tan y := tan_pos_of_pos_of_lt_pi_div_two hy0 hy₂)
      fun hy0 => by
      rw [← hy0, tan_zero]; 

Proof state:
x y : ℝ
hx₁ : -(π / 2) < x
hy₂ : y < π / 2
hxy : x < y
hx0 : x ≤ 0
hy0✝ : 0 ≤ y
hy0 : 0 = y
⊢ tan x < 0

Next tactic:
exact tan_neg_of_neg_of_pi_div_two_lt (hy0.symm ▸ hxy) hx₁
theorem tan_lt_tan_of_lt_of_lt_pi_div_two {x y : ℝ} (hx₁ : -(π / 2) < x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y :=
  match le_total x 0, le_total y 0 with
  | Or.inl hx0, Or.inl hy0 =>
    neg_lt_neg_iff.1 <| by
      rw [← tan_neg, ← tan_neg]
      exact tan_lt_tan_of_nonneg_of_lt_pi_div_two (neg_nonneg.2 hy0) (neg_lt.2 hx₁) (neg_lt_neg hxy)
  | Or.inl hx0, Or.inr hy0 =>
    (lt_or_eq_of_le hy0).elim
      (fun hy0 =>
        calc
          tan x ≤ 0 := tan_nonpos_of_nonpos_of_neg_pi_div_two_le hx0 (le_of_lt hx₁)
          _ < tan y := tan_pos_of_pos_of_lt_pi_div_two hy0 hy₂)
      fun hy0 => by
      rw [← hy0, tan_zero]; exact tan_neg_of_neg_of_pi_div_two_lt (hy0.symm ▸ hxy) hx₁
  | Or.inr hx0, Or.inl hy0 => by 

Proof state:
x y : ℝ
hx₁ : -(π / 2) < x
hy₂ : y < π / 2
hxy : x < y
hx0 : 0 ≤ x
hy0 : y ≤ 0
⊢ tan x < tan y

Next tactic:
linarith
theorem tan_periodic : Function.Periodic tan π := by
  

Proof state:
⊢ Function.Periodic tan π

Next tactic:
simpa only [Function.Periodic, tan_eq_sin_div_cos] using sin_antiperiodic.div cos_antiperiodic
@[simp]
theorem tan_pi : tan π = 0 := by 

Proof state:
⊢ tan π = 0

Next tactic:
rw [tan_periodic.eq, tan_zero]
theorem tan_pi_div_two_sub (x : ℝ) : tan (π / 2 - x) = (tan x)⁻¹ := by
  

Proof state:
x : ℝ
⊢ tan (π / 2 - x) = (tan x)⁻¹

Next tactic:
rw [tan_eq_sin_div_cos, tan_eq_sin_div_cos, inv_div, sin_pi_div_two_sub, cos_pi_div_two_sub]
theorem tendsto_sin_pi_div_two : Tendsto sin (𝓝[<] (π / 2)) (𝓝 1) := by
  

Proof state:
⊢ Tendsto sin (𝓝[<] (π / 2)) (𝓝 1)

Next tactic:
convert continuous_sin.continuousWithinAt.tendsto
theorem tendsto_sin_pi_div_two : Tendsto sin (𝓝[<] (π / 2)) (𝓝 1) := by
  convert continuous_sin.continuousWithinAt.tendsto
  

Proof state:
case h.e'_5.h.e'_3
⊢ 1 = sin (π / 2)

Next tactic:
simp
theorem tendsto_cos_pi_div_two : Tendsto cos (𝓝[<] (π / 2)) (𝓝[>] 0) := by
  

Proof state:
⊢ Tendsto cos (𝓝[<] (π / 2)) (𝓝[>] 0)

Next tactic:
apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
theorem tendsto_cos_pi_div_two : Tendsto cos (𝓝[<] (π / 2)) (𝓝[>] 0) := by
  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
  · 

Proof state:
case h1
⊢ Tendsto cos (𝓝[<] (π / 2)) (𝓝 0)

Next tactic:
convert continuous_cos.continuousWithinAt.tendsto
theorem tendsto_cos_pi_div_two : Tendsto cos (𝓝[<] (π / 2)) (𝓝[>] 0) := by
  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
  · convert continuous_cos.continuousWithinAt.tendsto
    

Proof state:
case h.e'_5.h.e'_3
⊢ 0 = cos (π / 2)

Next tactic:
simp
theorem tendsto_cos_pi_div_two : Tendsto cos (𝓝[<] (π / 2)) (𝓝[>] 0) := by
  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
  · convert continuous_cos.continuousWithinAt.tendsto
    simp
  · 

Proof state:
case h2
⊢ ∀ᶠ (x : ℝ) in 𝓝[<] (π / 2), cos x ∈ Ioi 0

Next tactic:
filter_upwards [Ioo_mem_nhdsWithin_Iio
        (right_mem_Ioc.mpr (neg_lt_self pi_div_two_pos))] with x hx using cos_pos_of_mem_Ioo hx
theorem tendsto_tan_pi_div_two : Tendsto tan (𝓝[<] (π / 2)) atTop := by
  

Proof state:
⊢ Tendsto tan (𝓝[<] (π / 2)) atTop

Next tactic:
convert tendsto_cos_pi_div_two.inv_tendsto_zero.atTop_mul zero_lt_one tendsto_sin_pi_div_two
    using 1
theorem tendsto_tan_pi_div_two : Tendsto tan (𝓝[<] (π / 2)) atTop := by
  convert tendsto_cos_pi_div_two.inv_tendsto_zero.atTop_mul zero_lt_one tendsto_sin_pi_div_two
    using 1
  

Proof state:
case h.e'_3
⊢ tan = fun x => cos⁻¹ x * sin x

Next tactic:
simp only [Pi.inv_apply, ← div_eq_inv_mul, ← tan_eq_sin_div_cos]
theorem tendsto_sin_neg_pi_div_two : Tendsto sin (𝓝[>] (-(π / 2))) (𝓝 (-1)) := by
  

Proof state:
⊢ Tendsto sin (𝓝[>] (-(π / 2))) (𝓝 (-1))

Next tactic:
convert continuous_sin.continuousWithinAt.tendsto using 2
theorem tendsto_sin_neg_pi_div_two : Tendsto sin (𝓝[>] (-(π / 2))) (𝓝 (-1)) := by
  convert continuous_sin.continuousWithinAt.tendsto using 2
  

Proof state:
case h.e'_5.h.e'_3
⊢ -1 = sin (-(π / 2))

Next tactic:
simp
theorem tendsto_cos_neg_pi_div_two : Tendsto cos (𝓝[>] (-(π / 2))) (𝓝[>] 0) := by
  

Proof state:
⊢ Tendsto cos (𝓝[>] (-(π / 2))) (𝓝[>] 0)

Next tactic:
apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
theorem tendsto_cos_neg_pi_div_two : Tendsto cos (𝓝[>] (-(π / 2))) (𝓝[>] 0) := by
  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
  · 

Proof state:
case h1
⊢ Tendsto cos (𝓝[>] (-(π / 2))) (𝓝 0)

Next tactic:
convert continuous_cos.continuousWithinAt.tendsto
theorem tendsto_cos_neg_pi_div_two : Tendsto cos (𝓝[>] (-(π / 2))) (𝓝[>] 0) := by
  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
  · convert continuous_cos.continuousWithinAt.tendsto
    

Proof state:
case h.e'_5.h.e'_3
⊢ 0 = cos (-(π / 2))

Next tactic:
simp
theorem tendsto_cos_neg_pi_div_two : Tendsto cos (𝓝[>] (-(π / 2))) (𝓝[>] 0) := by
  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
  · convert continuous_cos.continuousWithinAt.tendsto
    simp
  · 

Proof state:
case h2
⊢ ∀ᶠ (x : ℝ) in 𝓝[>] (-(π / 2)), cos x ∈ Ioi 0

Next tactic:
filter_upwards [Ioo_mem_nhdsWithin_Ioi
        (left_mem_Ico.mpr (neg_lt_self pi_div_two_pos))] with x hx using cos_pos_of_mem_Ioo hx
theorem tendsto_tan_neg_pi_div_two : Tendsto tan (𝓝[>] (-(π / 2))) atBot := by
  

Proof state:
⊢ Tendsto tan (𝓝[>] (-(π / 2))) atBot

Next tactic:
convert tendsto_cos_neg_pi_div_two.inv_tendsto_zero.atTop_mul_neg (by norm_num)
      tendsto_sin_neg_pi_div_two using 1
theorem tendsto_tan_neg_pi_div_two : Tendsto tan (𝓝[>] (-(π / 2))) atBot := by
  convert tendsto_cos_neg_pi_div_two.inv_tendsto_zero.atTop_mul_neg (by 

Proof state:
⊢ -1 < 0

Next tactic:
norm_num
theorem tendsto_tan_neg_pi_div_two : Tendsto tan (𝓝[>] (-(π / 2))) atBot := by
  convert tendsto_cos_neg_pi_div_two.inv_tendsto_zero.atTop_mul_neg (by norm_num)
      tendsto_sin_neg_pi_div_two using 1
  

Proof state:
case h.e'_3
⊢ tan = fun x => cos⁻¹ x * sin x

Next tactic:
simp only [Pi.inv_apply, ← div_eq_inv_mul, ← tan_eq_sin_div_cos]
theorem sin_eq_zero_iff_cos_eq {z : ℂ} : sin z = 0 ↔ cos z = 1 ∨ cos z = -1 := by
  

Proof state:
z : ℂ
⊢ sin z = 0 ↔ cos z = 1 ∨ cos z = -1

Next tactic:
rw [← mul_self_eq_one_iff, ← sin_sq_add_cos_sq, sq, sq, ← sub_eq_iff_eq_add, sub_self]
theorem sin_eq_zero_iff_cos_eq {z : ℂ} : sin z = 0 ↔ cos z = 1 ∨ cos z = -1 := by
  rw [← mul_self_eq_one_iff, ← sin_sq_add_cos_sq, sq, sq, ← sub_eq_iff_eq_add, sub_self]
  

Proof state:
z : ℂ
⊢ sin z = 0 ↔ 0 = sin z * sin z

Next tactic:
exact ⟨fun h => by rw [h, mul_zero], eq_zero_of_mul_self_eq_zero ∘ Eq.symm⟩
theorem sin_eq_zero_iff_cos_eq {z : ℂ} : sin z = 0 ↔ cos z = 1 ∨ cos z = -1 := by
  rw [← mul_self_eq_one_iff, ← sin_sq_add_cos_sq, sq, sq, ← sub_eq_iff_eq_add, sub_self]
  exact ⟨fun h => by 

Proof state:
z : ℂ
h : sin z = 0
⊢ 0 = sin z * sin z

Next tactic:
rw [h, mul_zero]
@[simp]
theorem cos_pi_div_two : cos (π / 2) = 0 :=
  calc
    cos (π / 2) = Real.cos (π / 2) := by 

Proof state:
⊢ cos (↑π / 2) = ↑(Real.cos (π / 2))

Next tactic:
rw [ofReal_cos]
@[simp]
theorem cos_pi_div_two : cos (π / 2) = 0 :=
  calc
    cos (π / 2) = Real.cos (π / 2) := by rw [ofReal_cos]; 

Proof state:
⊢ cos (↑π / 2) = cos ↑(π / 2)

Next tactic:
simp
@[simp]
theorem cos_pi_div_two : cos (π / 2) = 0 :=
  calc
    cos (π / 2) = Real.cos (π / 2) := by rw [ofReal_cos]; simp
    _ = 0 := by 

Proof state:
⊢ ↑(Real.cos (π / 2)) = 0

Next tactic:
simp
@[simp]
theorem sin_pi_div_two : sin (π / 2) = 1 :=
  calc
    sin (π / 2) = Real.sin (π / 2) := by 

Proof state:
⊢ sin (↑π / 2) = ↑(Real.sin (π / 2))

Next tactic:
rw [ofReal_sin]