l3lab/ntp-mathlib huggingface dataset:
theorem sqrtTwoAddSeries_lt_two : ∀ n : ℕ, sqrtTwoAddSeries 0 n < 2
  | 0 => by norm_num
  | n + 1 => by
    refine' lt_of_lt_of_le _ (sqrt_sq zero_lt_two.le).le
    

Proof state:
x : ℝ
n : ℕ
⊢ sqrtTwoAddSeries 0 (n + 1) < sqrt (2 ^ 2)

Next tactic:
rw [sqrtTwoAddSeries, sqrt_lt_sqrt_iff, ← lt_sub_iff_add_lt']
theorem sqrtTwoAddSeries_lt_two : ∀ n : ℕ, sqrtTwoAddSeries 0 n < 2
  | 0 => by norm_num
  | n + 1 => by
    refine' lt_of_lt_of_le _ (sqrt_sq zero_lt_two.le).le
    rw [sqrtTwoAddSeries, sqrt_lt_sqrt_iff, ← lt_sub_iff_add_lt']
    · 

Proof state:
x : ℝ
n : ℕ
⊢ sqrtTwoAddSeries 0 n < 2 ^ 2 - 2

Next tactic:
refine' (sqrtTwoAddSeries_lt_two n).trans_le _
theorem sqrtTwoAddSeries_lt_two : ∀ n : ℕ, sqrtTwoAddSeries 0 n < 2
  | 0 => by norm_num
  | n + 1 => by
    refine' lt_of_lt_of_le _ (sqrt_sq zero_lt_two.le).le
    rw [sqrtTwoAddSeries, sqrt_lt_sqrt_iff, ← lt_sub_iff_add_lt']
    · refine' (sqrtTwoAddSeries_lt_two n).trans_le _
      

Proof state:
x : ℝ
n : ℕ
⊢ 2 ≤ 2 ^ 2 - 2

Next tactic:
norm_num
theorem sqrtTwoAddSeries_lt_two : ∀ n : ℕ, sqrtTwoAddSeries 0 n < 2
  | 0 => by norm_num
  | n + 1 => by
    refine' lt_of_lt_of_le _ (sqrt_sq zero_lt_two.le).le
    rw [sqrtTwoAddSeries, sqrt_lt_sqrt_iff, ← lt_sub_iff_add_lt']
    · refine' (sqrtTwoAddSeries_lt_two n).trans_le _
      norm_num
    · 

Proof state:
x : ℝ
n : ℕ
⊢ 0 ≤ 2 + sqrtTwoAddSeries 0 n

Next tactic:
exact add_nonneg zero_le_two (sqrtTwoAddSeries_zero_nonneg n)
theorem sqrtTwoAddSeries_succ (x : ℝ) :
    ∀ n : ℕ, sqrtTwoAddSeries x (n + 1) = sqrtTwoAddSeries (sqrt (2 + x)) n
  | 0 => rfl
  | n + 1 => by 

Proof state:
x✝ x : ℝ
n : ℕ
⊢ sqrtTwoAddSeries x (n + 1 + 1) = sqrtTwoAddSeries (sqrt (2 + x)) (n + 1)

Next tactic:
rw [sqrtTwoAddSeries, sqrtTwoAddSeries_succ _ _, sqrtTwoAddSeries]
theorem sqrtTwoAddSeries_monotone_left {x y : ℝ} (h : x ≤ y) :
    ∀ n : ℕ, sqrtTwoAddSeries x n ≤ sqrtTwoAddSeries y n
  | 0 => h
  | n + 1 => by
    

Proof state:
x✝ x y : ℝ
h : x ≤ y
n : ℕ
⊢ sqrtTwoAddSeries x (n + 1) ≤ sqrtTwoAddSeries y (n + 1)

Next tactic:
rw [sqrtTwoAddSeries, sqrtTwoAddSeries]
theorem sqrtTwoAddSeries_monotone_left {x y : ℝ} (h : x ≤ y) :
    ∀ n : ℕ, sqrtTwoAddSeries x n ≤ sqrtTwoAddSeries y n
  | 0 => h
  | n + 1 => by
    rw [sqrtTwoAddSeries, sqrtTwoAddSeries]
    

Proof state:
x✝ x y : ℝ
h : x ≤ y
n : ℕ
⊢ sqrt (2 + sqrtTwoAddSeries x n) ≤ sqrt (2 + sqrtTwoAddSeries y n)

Next tactic:
exact sqrt_le_sqrt (add_le_add_left (sqrtTwoAddSeries_monotone_left h _) _)
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by 

Proof state:
x : ℝ
⊢ cos (π / 2 ^ (0 + 1)) = sqrtTwoAddSeries 0 0 / 2

Next tactic:
simp
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    

Proof state:
x : ℝ
n : ℕ
⊢ cos (π / 2 ^ (n + 1 + 1)) = sqrtTwoAddSeries 0 (n + 1) / 2

Next tactic:
have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    

Proof state:
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
⊢ cos (π / 2 ^ (n + 1 + 1)) = sqrtTwoAddSeries 0 (n + 1) / 2

Next tactic:
have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    

Proof state:
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
⊢ cos (π / 2 ^ (n + 1 + 1)) = sqrtTwoAddSeries 0 (n + 1) / 2

Next tactic:
have C : 0 < π / 2 ^ (n + 1) := by positivity
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    have C : 0 < π / 2 ^ (n + 1) := by 

Proof state:
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
⊢ 0 < π / 2 ^ (n + 1)

Next tactic:
positivity
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    have C : 0 < π / 2 ^ (n + 1) := by positivity
    

Proof state:
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
C : 0 < π / 2 ^ (n + 1)
⊢ cos (π / 2 ^ (n + 1 + 1)) = sqrtTwoAddSeries 0 (n + 1) / 2

Next tactic:
rw [pow_succ', div_mul_eq_div_div, cos_half, cos_pi_over_two_pow n, sqrtTwoAddSeries,
      add_div_eq_mul_add_div, one_mul, ← div_mul_eq_div_div, sqrt_div, sqrt_mul_self]
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    have C : 0 < π / 2 ^ (n + 1) := by positivity
    rw [pow_succ', div_mul_eq_div_div, cos_half, cos_pi_over_two_pow n, sqrtTwoAddSeries,
      add_div_eq_mul_add_div, one_mul, ← div_mul_eq_div_div, sqrt_div, sqrt_mul_self] <;>
      

Proof state:
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
C : 0 < π / 2 ^ (n + 1)
⊢ 0 ≤ 2

Next tactic:
linarith [sqrtTwoAddSeries_nonneg le_rfl n]
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    have C : 0 < π / 2 ^ (n + 1) := by positivity
    rw [pow_succ', div_mul_eq_div_div, cos_half, cos_pi_over_two_pow n, sqrtTwoAddSeries,
      add_div_eq_mul_add_div, one_mul, ← div_mul_eq_div_div, sqrt_div, sqrt_mul_self] <;>
      

Proof state:
case hx
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
C : 0 < π / 2 ^ (n + 1)
⊢ 0 ≤ 2 + sqrtTwoAddSeries 0 n

Next tactic:
linarith [sqrtTwoAddSeries_nonneg le_rfl n]
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    have C : 0 < π / 2 ^ (n + 1) := by positivity
    rw [pow_succ', div_mul_eq_div_div, cos_half, cos_pi_over_two_pow n, sqrtTwoAddSeries,
      add_div_eq_mul_add_div, one_mul, ← div_mul_eq_div_div, sqrt_div, sqrt_mul_self] <;>
      

Proof state:
case hc
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
C : 0 < π / 2 ^ (n + 1)
⊢ 2 ≠ 0

Next tactic:
linarith [sqrtTwoAddSeries_nonneg le_rfl n]
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    have C : 0 < π / 2 ^ (n + 1) := by positivity
    rw [pow_succ', div_mul_eq_div_div, cos_half, cos_pi_over_two_pow n, sqrtTwoAddSeries,
      add_div_eq_mul_add_div, one_mul, ← div_mul_eq_div_div, sqrt_div, sqrt_mul_self] <;>
      

Proof state:
case hl
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
C : 0 < π / 2 ^ (n + 1)
⊢ -π ≤ π / 2 ^ (n + 1)

Next tactic:
linarith [sqrtTwoAddSeries_nonneg le_rfl n]
@[simp]
theorem cos_pi_over_two_pow : ∀ n : ℕ, cos (π / 2 ^ (n + 1)) = sqrtTwoAddSeries 0 n / 2
  | 0 => by simp
  | n + 1 => by
    have A : (1 : ℝ) < 2 ^ (n + 1) := one_lt_pow one_lt_two n.succ_ne_zero
    have B : π / 2 ^ (n + 1) < π := div_lt_self pi_pos A
    have C : 0 < π / 2 ^ (n + 1) := by positivity
    rw [pow_succ', div_mul_eq_div_div, cos_half, cos_pi_over_two_pow n, sqrtTwoAddSeries,
      add_div_eq_mul_add_div, one_mul, ← div_mul_eq_div_div, sqrt_div, sqrt_mul_self] <;>
      

Proof state:
case hr
x : ℝ
n : ℕ
A : 1 < 2 ^ (n + 1)
B : π / 2 ^ (n + 1) < π
C : 0 < π / 2 ^ (n + 1)
⊢ π / 2 ^ (n + 1) ≤ π

Next tactic:
linarith [sqrtTwoAddSeries_nonneg le_rfl n]
theorem sin_sq_pi_over_two_pow (n : ℕ) :
    sin (π / 2 ^ (n + 1)) ^ 2 = 1 - (sqrtTwoAddSeries 0 n / 2) ^ 2 := by
  

Proof state:
x : ℝ
n : ℕ
⊢ sin (π / 2 ^ (n + 1)) ^ 2 = 1 - (sqrtTwoAddSeries 0 n / 2) ^ 2

Next tactic:
rw [sin_sq, cos_pi_over_two_pow]
theorem sin_sq_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) ^ 2 = 1 / 2 - sqrtTwoAddSeries 0 n / 4 := by
  

Proof state:
x : ℝ
n : ℕ
⊢ sin (π / 2 ^ (n + 2)) ^ 2 = 1 / 2 - sqrtTwoAddSeries 0 n / 4

Next tactic:
rw [sin_sq_pi_over_two_pow, sqrtTwoAddSeries, div_pow, sq_sqrt, add_div, ← sub_sub]
theorem sin_sq_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) ^ 2 = 1 / 2 - sqrtTwoAddSeries 0 n / 4 := by
  rw [sin_sq_pi_over_two_pow, sqrtTwoAddSeries, div_pow, sq_sqrt, add_div, ← sub_sub]
  

Proof state:
x : ℝ
n : ℕ
⊢ 1 - 2 / 2 ^ 2 - sqrtTwoAddSeries 0 n / 2 ^ 2 = 1 / 2 - sqrtTwoAddSeries 0 n / 4
x : ℝ n : ℕ ⊢ 0 ≤ 2 + sqrtTwoAddSeries 0 n

Next tactic:
congr
theorem sin_sq_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) ^ 2 = 1 / 2 - sqrtTwoAddSeries 0 n / 4 := by
  rw [sin_sq_pi_over_two_pow, sqrtTwoAddSeries, div_pow, sq_sqrt, add_div, ← sub_sub]
  congr
  · 

Proof state:
case e_a
x : ℝ
n : ℕ
⊢ 1 - 2 / 2 ^ 2 = 1 / 2

Next tactic:
norm_num
theorem sin_sq_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) ^ 2 = 1 / 2 - sqrtTwoAddSeries 0 n / 4 := by
  rw [sin_sq_pi_over_two_pow, sqrtTwoAddSeries, div_pow, sq_sqrt, add_div, ← sub_sub]
  congr
  · norm_num
  · 

Proof state:
case e_a.e_a
x : ℝ
n : ℕ
⊢ 2 ^ 2 = 4

Next tactic:
norm_num
theorem sin_sq_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) ^ 2 = 1 / 2 - sqrtTwoAddSeries 0 n / 4 := by
  rw [sin_sq_pi_over_two_pow, sqrtTwoAddSeries, div_pow, sq_sqrt, add_div, ← sub_sub]
  congr
  · norm_num
  · norm_num
  · 

Proof state:
x : ℝ
n : ℕ
⊢ 0 ≤ 2 + sqrtTwoAddSeries 0 n

Next tactic:
exact add_nonneg two_pos.le (sqrtTwoAddSeries_zero_nonneg _)
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  

Proof state:
x : ℝ
n : ℕ
⊢ sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2

Next tactic:
rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · 

Proof state:
x : ℝ
n : ℕ
⊢ 1 / 2 * 2 ^ 2 - sqrtTwoAddSeries 0 n / 4 * 2 ^ 2 = 2 - sqrtTwoAddSeries 0 n

Next tactic:
congr
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · congr <;> 

Proof state:
case e_a
x : ℝ
n : ℕ
⊢ 1 / 2 * 2 ^ 2 = 2

Next tactic:
norm_num
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · congr <;> 

Proof state:
case e_a
x : ℝ
n : ℕ
⊢ sqrtTwoAddSeries 0 n / 4 * 2 ^ 2 = sqrtTwoAddSeries 0 n

Next tactic:
norm_num
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · congr <;> norm_num
  · 

Proof state:
case hx
x : ℝ
n : ℕ
⊢ 0 ≤ 2 - sqrtTwoAddSeries 0 n

Next tactic:
rw [sub_nonneg]
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · congr <;> norm_num
  · rw [sub_nonneg]
    

Proof state:
case hx
x : ℝ
n : ℕ
⊢ sqrtTwoAddSeries 0 n ≤ 2

Next tactic:
exact (sqrtTwoAddSeries_lt_two _).le
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · congr <;> norm_num
  · rw [sub_nonneg]
    exact (sqrtTwoAddSeries_lt_two _).le
  

Proof state:
case hy
x : ℝ
n : ℕ
⊢ 0 ≤ sin (π / 2 ^ (n + 2)) * 2

Next tactic:
refine mul_nonneg (sin_nonneg_of_nonneg_of_le_pi ?_ ?_) zero_le_two
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · congr <;> norm_num
  · rw [sub_nonneg]
    exact (sqrtTwoAddSeries_lt_two _).le
  refine mul_nonneg (sin_nonneg_of_nonneg_of_le_pi ?_ ?_) zero_le_two
  · 

Proof state:
case hy.refine_1
x : ℝ
n : ℕ
⊢ 0 ≤ π / 2 ^ (n + 2)

Next tactic:
positivity
@[simp]
theorem sin_pi_over_two_pow_succ (n : ℕ) :
    sin (π / 2 ^ (n + 2)) = sqrt (2 - sqrtTwoAddSeries 0 n) / 2 := by
  rw [eq_div_iff_mul_eq two_ne_zero, eq_comm, sqrt_eq_iff_sq_eq, mul_pow,
    sin_sq_pi_over_two_pow_succ, sub_mul]
  · congr <;> norm_num
  · rw [sub_nonneg]
    exact (sqrtTwoAddSeries_lt_two _).le
  refine mul_nonneg (sin_nonneg_of_nonneg_of_le_pi ?_ ?_) zero_le_two
  · positivity
  · 

Proof state:
case hy.refine_2
x : ℝ
n : ℕ
⊢ π / 2 ^ (n + 2) ≤ π

Next tactic:
exact div_le_self pi_pos.le <| one_le_pow_of_one_le one_le_two _
@[simp]
theorem cos_pi_div_four : cos (π / 4) = sqrt 2 / 2 := by
  

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

Next tactic:
trans cos (π / 2 ^ 2)
@[simp]
theorem cos_pi_div_four : cos (π / 4) = sqrt 2 / 2 := by
  trans cos (π / 2 ^ 2)
  · 

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

Next tactic:
congr
@[simp]
theorem cos_pi_div_four : cos (π / 4) = sqrt 2 / 2 := by
  trans cos (π / 2 ^ 2)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 4 = 2 ^ 2

Next tactic:
norm_num
@[simp]
theorem cos_pi_div_four : cos (π / 4) = sqrt 2 / 2 := by
  trans cos (π / 2 ^ 2)
  · congr
    norm_num
  · 

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

Next tactic:
simp
@[simp]
theorem sin_pi_div_four : sin (π / 4) = sqrt 2 / 2 := by
  

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

Next tactic:
trans sin (π / 2 ^ 2)
@[simp]
theorem sin_pi_div_four : sin (π / 4) = sqrt 2 / 2 := by
  trans sin (π / 2 ^ 2)
  · 

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

Next tactic:
congr
@[simp]
theorem sin_pi_div_four : sin (π / 4) = sqrt 2 / 2 := by
  trans sin (π / 2 ^ 2)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 4 = 2 ^ 2

Next tactic:
norm_num
@[simp]
theorem sin_pi_div_four : sin (π / 4) = sqrt 2 / 2 := by
  trans sin (π / 2 ^ 2)
  · congr
    norm_num
  · 

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

Next tactic:
simp
@[simp]
theorem cos_pi_div_eight : cos (π / 8) = sqrt (2 + sqrt 2) / 2 := by
  

Proof state:
x : ℝ
⊢ cos (π / 8) = sqrt (2 + sqrt 2) / 2

Next tactic:
trans cos (π / 2 ^ 3)
@[simp]
theorem cos_pi_div_eight : cos (π / 8) = sqrt (2 + sqrt 2) / 2 := by
  trans cos (π / 2 ^ 3)
  · 

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

Next tactic:
congr
@[simp]
theorem cos_pi_div_eight : cos (π / 8) = sqrt (2 + sqrt 2) / 2 := by
  trans cos (π / 2 ^ 3)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 8 = 2 ^ 3

Next tactic:
norm_num
@[simp]
theorem cos_pi_div_eight : cos (π / 8) = sqrt (2 + sqrt 2) / 2 := by
  trans cos (π / 2 ^ 3)
  · congr
    norm_num
  · 

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

Next tactic:
simp
@[simp]
theorem sin_pi_div_eight : sin (π / 8) = sqrt (2 - sqrt 2) / 2 := by
  

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

Next tactic:
trans sin (π / 2 ^ 3)
@[simp]
theorem sin_pi_div_eight : sin (π / 8) = sqrt (2 - sqrt 2) / 2 := by
  trans sin (π / 2 ^ 3)
  · 

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

Next tactic:
congr
@[simp]
theorem sin_pi_div_eight : sin (π / 8) = sqrt (2 - sqrt 2) / 2 := by
  trans sin (π / 2 ^ 3)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 8 = 2 ^ 3

Next tactic:
norm_num
@[simp]
theorem sin_pi_div_eight : sin (π / 8) = sqrt (2 - sqrt 2) / 2 := by
  trans sin (π / 2 ^ 3)
  · congr
    norm_num
  · 

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

Next tactic:
simp
@[simp]
theorem cos_pi_div_sixteen : cos (π / 16) = sqrt (2 + sqrt (2 + sqrt 2)) / 2 := by
  

Proof state:
x : ℝ
⊢ cos (π / 16) = sqrt (2 + sqrt (2 + sqrt 2)) / 2

Next tactic:
trans cos (π / 2 ^ 4)
@[simp]
theorem cos_pi_div_sixteen : cos (π / 16) = sqrt (2 + sqrt (2 + sqrt 2)) / 2 := by
  trans cos (π / 2 ^ 4)
  · 

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

Next tactic:
congr
@[simp]
theorem cos_pi_div_sixteen : cos (π / 16) = sqrt (2 + sqrt (2 + sqrt 2)) / 2 := by
  trans cos (π / 2 ^ 4)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 16 = 2 ^ 4

Next tactic:
norm_num
@[simp]
theorem cos_pi_div_sixteen : cos (π / 16) = sqrt (2 + sqrt (2 + sqrt 2)) / 2 := by
  trans cos (π / 2 ^ 4)
  · congr
    norm_num
  · 

Proof state:
x : ℝ
⊢ cos (π / 2 ^ 4) = sqrt (2 + sqrt (2 + sqrt 2)) / 2

Next tactic:
simp
@[simp]
theorem sin_pi_div_sixteen : sin (π / 16) = sqrt (2 - sqrt (2 + sqrt 2)) / 2 := by
  

Proof state:
x : ℝ
⊢ sin (π / 16) = sqrt (2 - sqrt (2 + sqrt 2)) / 2

Next tactic:
trans sin (π / 2 ^ 4)
@[simp]
theorem sin_pi_div_sixteen : sin (π / 16) = sqrt (2 - sqrt (2 + sqrt 2)) / 2 := by
  trans sin (π / 2 ^ 4)
  · 

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

Next tactic:
congr
@[simp]
theorem sin_pi_div_sixteen : sin (π / 16) = sqrt (2 - sqrt (2 + sqrt 2)) / 2 := by
  trans sin (π / 2 ^ 4)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 16 = 2 ^ 4

Next tactic:
norm_num
@[simp]
theorem sin_pi_div_sixteen : sin (π / 16) = sqrt (2 - sqrt (2 + sqrt 2)) / 2 := by
  trans sin (π / 2 ^ 4)
  · congr
    norm_num
  · 

Proof state:
x : ℝ
⊢ sin (π / 2 ^ 4) = sqrt (2 - sqrt (2 + sqrt 2)) / 2

Next tactic:
simp
@[simp]
theorem cos_pi_div_thirty_two : cos (π / 32) = sqrt (2 + sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  

Proof state:
x : ℝ
⊢ cos (π / 32) = sqrt (2 + sqrt (2 + sqrt (2 + sqrt 2))) / 2

Next tactic:
trans cos (π / 2 ^ 5)
@[simp]
theorem cos_pi_div_thirty_two : cos (π / 32) = sqrt (2 + sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  trans cos (π / 2 ^ 5)
  · 

Proof state:
x : ℝ
⊢ cos (π / 32) = cos (π / 2 ^ 5)

Next tactic:
congr
@[simp]
theorem cos_pi_div_thirty_two : cos (π / 32) = sqrt (2 + sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  trans cos (π / 2 ^ 5)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 32 = 2 ^ 5

Next tactic:
norm_num
@[simp]
theorem cos_pi_div_thirty_two : cos (π / 32) = sqrt (2 + sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  trans cos (π / 2 ^ 5)
  · congr
    norm_num
  · 

Proof state:
x : ℝ
⊢ cos (π / 2 ^ 5) = sqrt (2 + sqrt (2 + sqrt (2 + sqrt 2))) / 2

Next tactic:
simp
@[simp]
theorem sin_pi_div_thirty_two : sin (π / 32) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  

Proof state:
x : ℝ
⊢ sin (π / 32) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2

Next tactic:
trans sin (π / 2 ^ 5)
@[simp]
theorem sin_pi_div_thirty_two : sin (π / 32) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  trans sin (π / 2 ^ 5)
  · 

Proof state:
x : ℝ
⊢ sin (π / 32) = sin (π / 2 ^ 5)

Next tactic:
congr
@[simp]
theorem sin_pi_div_thirty_two : sin (π / 32) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  trans sin (π / 2 ^ 5)
  · congr
    

Proof state:
case e_x.e_a
x : ℝ
⊢ 32 = 2 ^ 5

Next tactic:
norm_num
@[simp]
theorem sin_pi_div_thirty_two : sin (π / 32) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2 := by
  trans sin (π / 2 ^ 5)
  · congr
    norm_num
  · 

Proof state:
x : ℝ
⊢ sin (π / 2 ^ 5) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2

Next tactic:
simp
/-- The cosine of `π / 3` is `1 / 2`. -/
@[simp]
theorem cos_pi_div_three : cos (π / 3) = 1 / 2 := by
  

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

Next tactic:
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)]
/-- 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
    

Proof state:
x : ℝ
⊢ (2 * cos (π / 3) - 1) ^ 2 * (2 * cos (π / 3) + 2) = 0

Next tactic:
have : cos (3 * (π / 3)) = cos π := by
      congr 1
      ring
/-- 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
      

Proof state:
x : ℝ
⊢ cos (3 * (π / 3)) = cos π

Next tactic:
congr 1
/-- 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
      

Proof state:
case e_x
x : ℝ
⊢ 3 * (π / 3) = π

Next tactic:
ring
/-- 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
    

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

Next tactic:
linarith [cos_pi, cos_three_mul (π / 3)]
/-- 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)]
  

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

Next tactic:
cases' mul_eq_zero.mp h₁ with h h
/-- 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
  · 

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

Next tactic:
linarith [pow_eq_zero h]
/-- 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]
  · 

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

Next tactic:
have : cos π < cos (π / 3) := by
      refine' cos_lt_cos_of_nonneg_of_le_pi _ le_rfl _ <;> 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
      

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

Next tactic:
refine' cos_lt_cos_of_nonneg_of_le_pi _ le_rfl _