Skip to content

Commit ce9386e

Browse files
committed
chore: use zero_lt_two, two_ne_zero instead of reproving (leanprover-community#29337)
For simplicity and readability. I replaced two `(show (0 : ℝ) < 2 by ...)`s with `zero_lt_two`s and five `two_ne_zero' ℝ` with `two_ne_zero`.
1 parent af67696 commit ce9386e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

  • Mathlib/Analysis/SpecialFunctions/Trigonometric

Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,23 +126,23 @@ scoped notation "π" => Real.pi
126126

127127
@[simp]
128128
theorem cos_pi_div_two : cos (π / 2) = 0 := by
129-
rw [Real.pi, mul_div_cancel_left₀ _ (two_ne_zero' ℝ)]
129+
rw [Real.pi, mul_div_cancel_left₀ _ two_ne_zero]
130130
exact (Classical.choose_spec exists_cos_eq_zero).2
131131

132132
theorem one_le_pi_div_two : (1 : ℝ) ≤ π / 2 := by
133-
rw [Real.pi, mul_div_cancel_left₀ _ (two_ne_zero' ℝ)]
133+
rw [Real.pi, mul_div_cancel_left₀ _ two_ne_zero]
134134
exact (Classical.choose_spec exists_cos_eq_zero).1.1
135135

136136
theorem pi_div_two_le_two : π / 22 := by
137-
rw [Real.pi, mul_div_cancel_left₀ _ (two_ne_zero' ℝ)]
137+
rw [Real.pi, mul_div_cancel_left₀ _ two_ne_zero]
138138
exact (Classical.choose_spec exists_cos_eq_zero).1.2
139139

140140
theorem two_le_pi : (2 : ℝ) ≤ π :=
141-
(div_le_div_iff_of_pos_right (show (0 : ℝ) < 2 by simp)).1
142-
(by rw [div_self (two_ne_zero' ℝ)]; exact one_le_pi_div_two)
141+
(div_le_div_iff_of_pos_right zero_lt_two).1
142+
(by rw [div_self two_ne_zero]; exact one_le_pi_div_two)
143143

144144
theorem pi_le_four : π ≤ 4 :=
145-
(div_le_div_iff_of_pos_right (show (0 : ℝ) < 2 by norm_num)).1
145+
(div_le_div_iff_of_pos_right zero_lt_two).1
146146
(calc
147147
π / 22 := pi_div_two_le_two
148148
_ = 4 / 2 := by norm_num)
@@ -205,11 +205,11 @@ namespace Real
205205

206206
@[simp]
207207
theorem sin_pi : sin π = 0 := by
208-
rw [← mul_div_cancel_left₀ π (two_ne_zero' ℝ), two_mul, add_div, sin_add, cos_pi_div_two]; simp
208+
rw [← mul_div_cancel_left₀ π two_ne_zero, two_mul, add_div, sin_add, cos_pi_div_two]; simp
209209

210210
@[simp]
211211
theorem cos_pi : cos π = -1 := by
212-
rw [← mul_div_cancel_left₀ π (two_ne_zero' ℝ), mul_div_assoc, cos_two_mul, cos_pi_div_two]
212+
rw [← mul_div_cancel_left₀ π two_ne_zero, mul_div_assoc, cos_two_mul, cos_pi_div_two]
213213
norm_num
214214

215215
@[simp]

0 commit comments

Comments
 (0)