The type of angles #
In this file we define Real.Angle
to be the quotient group ℝ/2πℤ
and prove a few simple lemmas
about trigonometric functions and angles.
Equations
Equations
- Real.Angle.instCoeRealAngle = { coe := Real.Angle.coe }
An induction principle to deduce results for Angle
from those for ℝ
, used with
induction θ using Real.Angle.induction_on
.
theorem
Real.Angle.cos_eq_iff_eq_or_eq_neg
{θ : Real.Angle}
{ψ : Real.Angle}
:
Real.Angle.cos θ = Real.Angle.cos ψ ↔ θ = ψ ∨ θ = -ψ
theorem
Real.Angle.sin_eq_iff_eq_or_add_eq_pi
{θ : Real.Angle}
{ψ : Real.Angle}
:
Real.Angle.sin θ = Real.Angle.sin ψ ↔ θ = ψ ∨ θ + ψ = ↑Real.pi
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Real.Angle.sin_add
(θ₁ : Real.Angle)
(θ₂ : Real.Angle)
:
Real.Angle.sin (θ₁ + θ₂) = Real.Angle.sin θ₁ * Real.Angle.cos θ₂ + Real.Angle.cos θ₁ * Real.Angle.sin θ₂
theorem
Real.Angle.cos_add
(θ₁ : Real.Angle)
(θ₂ : Real.Angle)
:
Real.Angle.cos (θ₁ + θ₂) = Real.Angle.cos θ₁ * Real.Angle.cos θ₂ - Real.Angle.sin θ₁ * Real.Angle.sin θ₂
@[simp]
theorem
Real.Angle.cos_sq_add_sin_sq
(θ : Real.Angle)
:
Real.Angle.cos θ ^ 2 + Real.Angle.sin θ ^ 2 = 1
theorem
Real.Angle.sin_add_pi_div_two
(θ : Real.Angle)
:
Real.Angle.sin (θ + ↑(Real.pi / 2)) = Real.Angle.cos θ
theorem
Real.Angle.sin_sub_pi_div_two
(θ : Real.Angle)
:
Real.Angle.sin (θ - ↑(Real.pi / 2)) = -Real.Angle.cos θ
theorem
Real.Angle.sin_pi_div_two_sub
(θ : Real.Angle)
:
Real.Angle.sin (↑(Real.pi / 2) - θ) = Real.Angle.cos θ
theorem
Real.Angle.cos_add_pi_div_two
(θ : Real.Angle)
:
Real.Angle.cos (θ + ↑(Real.pi / 2)) = -Real.Angle.sin θ
theorem
Real.Angle.cos_sub_pi_div_two
(θ : Real.Angle)
:
Real.Angle.cos (θ - ↑(Real.pi / 2)) = Real.Angle.sin θ
theorem
Real.Angle.cos_pi_div_two_sub
(θ : Real.Angle)
:
Real.Angle.cos (↑(Real.pi / 2) - θ) = Real.Angle.sin θ
theorem
Real.Angle.abs_sin_eq_of_two_nsmul_eq
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ = 2 • ψ)
:
|Real.Angle.sin θ| = |Real.Angle.sin ψ|
theorem
Real.Angle.abs_sin_eq_of_two_zsmul_eq
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ = 2 • ψ)
:
|Real.Angle.sin θ| = |Real.Angle.sin ψ|
theorem
Real.Angle.abs_cos_eq_of_two_nsmul_eq
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ = 2 • ψ)
:
|Real.Angle.cos θ| = |Real.Angle.cos ψ|
theorem
Real.Angle.abs_cos_eq_of_two_zsmul_eq
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ = 2 • ψ)
:
|Real.Angle.cos θ| = |Real.Angle.cos ψ|
Convert a Real.Angle
to a real number in the interval Ioc (-π) π
.
Instances For
@[simp]
theorem
Real.Angle.toReal_inj
{θ : Real.Angle}
{ψ : Real.Angle}
:
Real.Angle.toReal θ = Real.Angle.toReal ψ ↔ θ = ψ
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Real.Angle.nsmul_toReal_eq_mul
{n : ℕ}
(h : n ≠ 0)
{θ : Real.Angle}
:
Real.Angle.toReal (n • θ) = ↑n * Real.Angle.toReal θ ↔ Real.Angle.toReal θ ∈ Set.Ioc (-Real.pi / ↑n) (Real.pi / ↑n)
theorem
Real.Angle.two_nsmul_toReal_eq_two_mul
{θ : Real.Angle}
:
Real.Angle.toReal (2 • θ) = 2 * Real.Angle.toReal θ ↔ Real.Angle.toReal θ ∈ Set.Ioc (-Real.pi / 2) (Real.pi / 2)
theorem
Real.Angle.two_zsmul_toReal_eq_two_mul
{θ : Real.Angle}
:
Real.Angle.toReal (2 • θ) = 2 * Real.Angle.toReal θ ↔ Real.Angle.toReal θ ∈ Set.Ioc (-Real.pi / 2) (Real.pi / 2)
theorem
Real.Angle.two_nsmul_toReal_eq_two_mul_sub_two_pi
{θ : Real.Angle}
:
Real.Angle.toReal (2 • θ) = 2 * Real.Angle.toReal θ - 2 * Real.pi ↔ Real.pi / 2 < Real.Angle.toReal θ
theorem
Real.Angle.two_zsmul_toReal_eq_two_mul_sub_two_pi
{θ : Real.Angle}
:
Real.Angle.toReal (2 • θ) = 2 * Real.Angle.toReal θ - 2 * Real.pi ↔ Real.pi / 2 < Real.Angle.toReal θ
theorem
Real.Angle.two_nsmul_toReal_eq_two_mul_add_two_pi
{θ : Real.Angle}
:
Real.Angle.toReal (2 • θ) = 2 * Real.Angle.toReal θ + 2 * Real.pi ↔ Real.Angle.toReal θ ≤ -Real.pi / 2
theorem
Real.Angle.two_zsmul_toReal_eq_two_mul_add_two_pi
{θ : Real.Angle}
:
Real.Angle.toReal (2 • θ) = 2 * Real.Angle.toReal θ + 2 * Real.pi ↔ Real.Angle.toReal θ ≤ -Real.pi / 2
@[simp]
@[simp]
theorem
Real.Angle.cos_nonneg_iff_abs_toReal_le_pi_div_two
{θ : Real.Angle}
:
0 ≤ Real.Angle.cos θ ↔ |Real.Angle.toReal θ| ≤ Real.pi / 2
theorem
Real.Angle.cos_pos_iff_abs_toReal_lt_pi_div_two
{θ : Real.Angle}
:
0 < Real.Angle.cos θ ↔ |Real.Angle.toReal θ| < Real.pi / 2
theorem
Real.Angle.cos_neg_iff_pi_div_two_lt_abs_toReal
{θ : Real.Angle}
:
Real.Angle.cos θ < 0 ↔ Real.pi / 2 < |Real.Angle.toReal θ|
theorem
Real.Angle.abs_cos_eq_abs_sin_of_two_nsmul_add_two_nsmul_eq_pi
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ + 2 • ψ = ↑Real.pi)
:
|Real.Angle.cos θ| = |Real.Angle.sin ψ|
theorem
Real.Angle.abs_cos_eq_abs_sin_of_two_zsmul_add_two_zsmul_eq_pi
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ + 2 • ψ = ↑Real.pi)
:
|Real.Angle.cos θ| = |Real.Angle.sin ψ|
@[simp]
@[simp]
@[simp]
theorem
Real.Angle.tan_eq_inv_of_two_nsmul_add_two_nsmul_eq_pi
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ + 2 • ψ = ↑Real.pi)
:
Real.Angle.tan ψ = (Real.Angle.tan θ)⁻¹
theorem
Real.Angle.tan_eq_inv_of_two_zsmul_add_two_zsmul_eq_pi
{θ : Real.Angle}
{ψ : Real.Angle}
(h : 2 • θ + 2 • ψ = ↑Real.pi)
:
Real.Angle.tan ψ = (Real.Angle.tan θ)⁻¹
The sign of a Real.Angle
is 0
if the angle is 0
or π
, 1
if the angle is strictly
between 0
and π
and -1
is the angle is strictly between -π
and 0
. It is defined as the
sign of the sine of the angle.
Equations
- Real.Angle.sign θ = ↑SignType.sign (Real.Angle.sin θ)
Instances For
@[simp]
@[simp]
theorem
Real.Angle.sign_add_pi
(θ : Real.Angle)
:
Real.Angle.sign (θ + ↑Real.pi) = -Real.Angle.sign θ
@[simp]
theorem
Real.Angle.sign_pi_add
(θ : Real.Angle)
:
Real.Angle.sign (↑Real.pi + θ) = -Real.Angle.sign θ
@[simp]
theorem
Real.Angle.sign_sub_pi
(θ : Real.Angle)
:
Real.Angle.sign (θ - ↑Real.pi) = -Real.Angle.sign θ
@[simp]
theorem
Real.Angle.toReal_neg_iff_sign_neg
{θ : Real.Angle}
:
Real.Angle.toReal θ < 0 ↔ Real.Angle.sign θ = -1
theorem
Real.Angle.toReal_nonneg_iff_sign_nonneg
{θ : Real.Angle}
:
0 ≤ Real.Angle.toReal θ ↔ 0 ≤ Real.Angle.sign θ
@[simp]
theorem
Real.Angle.sign_toReal
{θ : Real.Angle}
(h : θ ≠ ↑Real.pi)
:
↑SignType.sign (Real.Angle.toReal θ) = Real.Angle.sign θ
theorem
Real.Angle.coe_abs_toReal_of_sign_nonneg
{θ : Real.Angle}
(h : 0 ≤ Real.Angle.sign θ)
:
↑|Real.Angle.toReal θ| = θ
theorem
Real.Angle.neg_coe_abs_toReal_of_sign_nonpos
{θ : Real.Angle}
(h : Real.Angle.sign θ ≤ 0)
:
-↑|Real.Angle.toReal θ| = θ
theorem
Real.Angle.eq_iff_sign_eq_and_abs_toReal_eq
{θ : Real.Angle}
{ψ : Real.Angle}
:
θ = ψ ↔ Real.Angle.sign θ = Real.Angle.sign ψ ∧ |Real.Angle.toReal θ| = |Real.Angle.toReal ψ|
theorem
Real.Angle.eq_iff_abs_toReal_eq_of_sign_eq
{θ : Real.Angle}
{ψ : Real.Angle}
(h : Real.Angle.sign θ = Real.Angle.sign ψ)
:
θ = ψ ↔ |Real.Angle.toReal θ| = |Real.Angle.toReal ψ|
theorem
Real.Angle.sign_coe_nonneg_of_nonneg_of_le_pi
{θ : ℝ}
(h0 : 0 ≤ θ)
(hpi : θ ≤ Real.pi)
:
0 ≤ Real.Angle.sign ↑θ
theorem
Real.Angle.sign_neg_coe_nonpos_of_nonneg_of_le_pi
{θ : ℝ}
(h0 : 0 ≤ θ)
(hpi : θ ≤ Real.pi)
:
Real.Angle.sign (-↑θ) ≤ 0
theorem
Real.Angle.sign_two_nsmul_eq_sign_iff
{θ : Real.Angle}
:
Real.Angle.sign (2 • θ) = Real.Angle.sign θ ↔ θ = ↑Real.pi ∨ |Real.Angle.toReal θ| < Real.pi / 2
theorem
Real.Angle.sign_two_zsmul_eq_sign_iff
{θ : Real.Angle}
:
Real.Angle.sign (2 • θ) = Real.Angle.sign θ ↔ θ = ↑Real.pi ∨ |Real.Angle.toReal θ| < Real.pi / 2
theorem
ContinuousOn.angle_sign_comp
{α : Type u_1}
[TopologicalSpace α]
{f : α → Real.Angle}
{s : Set α}
(hf : ContinuousOn f s)
(hs : ∀ (z : α), z ∈ s → f z ≠ 0 ∧ f z ≠ ↑Real.pi)
:
ContinuousOn (Real.Angle.sign ∘ f) s
theorem
Real.Angle.sign_eq_of_continuousOn
{α : Type u_1}
[TopologicalSpace α]
{f : α → Real.Angle}
{s : Set α}
{x : α}
{y : α}
(hc : IsConnected s)
(hf : ContinuousOn f s)
(hs : ∀ (z : α), z ∈ s → f z ≠ 0 ∧ f z ≠ ↑Real.pi)
(hx : x ∈ s)
(hy : y ∈ s)
:
Real.Angle.sign (f y) = Real.Angle.sign (f x)
Suppose a function to angles is continuous on a connected set and never takes the values 0
or π
on that set. Then the values of the function on that set all have the same sign.