File: Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean

full_name: Orientation._aux_Mathlib_Geometry_Euclidean_Angle_Oriented_Rotation___macroRules_Orientation_termJ_1
code: local notation "J" => o.rightAngleRotation
goal: Lean.Macro

full_name: Orientation.rotationAux
code: /-- Auxiliary construction to build a rotation by the oriented angle `θ`. -/
def rotationAux (θ : Real.Angle) : V →ₗᵢ[ℝ] V 
goal: V →ₗᵢ[ℝ] V

full_name: Orientation.rotationAux_apply
code: @[simp]
theorem rotationAux_apply (θ : Real.Angle) (x : V) :
    o.rotationAux θ x = Real.Angle.cos θ • x + Real.Angle.sin θ • J x 
goal: (o.rotationAux θ) x = θ.cos • x + θ.sin • o.rightAngleRotation x

full_name: Orientation.rotation
code: /-- A rotation by the oriented angle `θ`. -/
def rotation (θ : Real.Angle) : V ≃ₗᵢ[ℝ] V 
goal: V ≃ₗᵢ[ℝ] V

full_name: Orientation.rotation_apply
code: theorem rotation_apply (θ : Real.Angle) (x : V) :
    o.rotation θ x = Real.Angle.cos θ • x + Real.Angle.sin θ • J x 
goal: (o.rotation θ) x = θ.cos • x + θ.sin • o.rightAngleRotation x

full_name: Orientation.rotation_symm_apply
code: theorem rotation_symm_apply (θ : Real.Angle) (x : V) :
    (o.rotation θ).symm x = Real.Angle.cos θ • x - Real.Angle.sin θ • J x 
goal: (o.rotation θ).symm x = θ.cos • x - θ.sin • o.rightAngleRotation x

full_name: Orientation.rotation_eq_matrix_toLin
code: theorem rotation_eq_matrix_toLin (θ : Real.Angle) {x : V} (hx : x ≠ 0) :
    (o.rotation θ).toLinearMap =
      Matrix.toLin (o.basisRightAngleRotation x hx) (o.basisRightAngleRotation x hx)
        !![θ.cos, -θ.sin; θ.sin, θ.cos] 
goal: ↑(o.rotation θ).toLinearEquiv =
  (Matrix.toLin (o.basisRightAngleRotation x hx) (o.basisRightAngleRotation x hx)) !![θ.cos, -θ.sin; θ.sin, θ.cos]

full_name: Orientation.det_rotation
code: /-- The determinant of `rotation` (as a linear map) is equal to `1`. -/
@[simp]
theorem det_rotation (θ : Real.Angle) : LinearMap.det (o.rotation θ).toLinearMap = 1 
goal: LinearMap.det ↑(o.rotation θ).toLinearEquiv = 1

full_name: Orientation.linearEquiv_det_rotation
code: /-- The determinant of `rotation` (as a linear equiv) is equal to `1`. -/
@[simp]
theorem linearEquiv_det_rotation (θ : Real.Angle) :
    LinearEquiv.det (o.rotation θ).toLinearEquiv = 1 
goal: LinearEquiv.det (o.rotation θ).toLinearEquiv = 1

full_name: Orientation.rotation_symm
code: /-- The inverse of `rotation` is rotation by the negation of the angle. -/
@[simp]
theorem rotation_symm (θ : Real.Angle) : (o.rotation θ).symm = o.rotation (-θ) 
goal: (o.rotation θ).symm = o.rotation (-θ)

full_name: Orientation.rotation_zero
code: /-- Rotation by 0 is the identity. -/
@[simp]
theorem rotation_zero : o.rotation 0 = LinearIsometryEquiv.refl ℝ V 
goal: o.rotation 0 = LinearIsometryEquiv.refl ℝ V

full_name: Orientation.rotation_pi
code: /-- Rotation by π is negation. -/
@[simp]
theorem rotation_pi : o.rotation π = LinearIsometryEquiv.neg ℝ 
goal: o.rotation ↑π = LinearIsometryEquiv.neg ℝ

full_name: Orientation.rotation_pi_apply
code: /-- Rotation by π is negation. -/
theorem rotation_pi_apply (x : V) : o.rotation π x = -x 
goal: (o.rotation ↑π) x = -x

full_name: Orientation.rotation_pi_div_two
code: /-- Rotation by π / 2 is the "right-angle-rotation" map `J`. -/
theorem rotation_pi_div_two : o.rotation (π / 2 : ℝ) = J 
goal: o.rotation ↑(π / 2) = o.rightAngleRotation

full_name: Orientation.rotation_rotation
code: /-- Rotating twice is equivalent to rotating by the sum of the angles. -/
@[simp]
theorem rotation_rotation (θ₁ θ₂ : Real.Angle) (x : V) :
    o.rotation θ₁ (o.rotation θ₂ x) = o.rotation (θ₁ + θ₂) x 
goal: (o.rotation θ₁) ((o.rotation θ₂) x) = (o.rotation (θ₁ + θ₂)) x

full_name: Orientation.rotation_trans
code: /-- Rotating twice is equivalent to rotating by the sum of the angles. -/
@[simp]
theorem rotation_trans (θ₁ θ₂ : Real.Angle) :
    (o.rotation θ₁).trans (o.rotation θ₂) = o.rotation (θ₂ + θ₁) 
goal: (o.rotation θ₁).trans (o.rotation θ₂) = o.rotation (θ₂ + θ₁)

full_name: Orientation.kahler_rotation_left
code: /-- Rotating the first of two vectors by `θ` scales their Kahler form by `cos θ - sin θ * I`. -/
@[simp]
theorem kahler_rotation_left (x y : V) (θ : Real.Angle) :
    o.kahler (o.rotation θ x) y = conj (θ.expMapCircle : ℂ) * o.kahler x y 
goal: (o.kahler ((o.rotation θ) x)) y = (starRingEnd ℂ) ↑θ.expMapCircle * (o.kahler x) y

full_name: Orientation.neg_rotation
code: /-- Negating a rotation is equivalent to rotation by π plus the angle. -/
theorem neg_rotation (θ : Real.Angle) (x : V) : -o.rotation θ x = o.rotation (π + θ) x 
goal: -(o.rotation θ) x = (o.rotation (↑π + θ)) x

full_name: Orientation.neg_rotation_neg_pi_div_two
code: /-- Negating a rotation by -π / 2 is equivalent to rotation by π / 2. -/
@[simp]
theorem neg_rotation_neg_pi_div_two (x : V) :
    -o.rotation (-π / 2 : ℝ) x = o.rotation (π / 2 : ℝ) x 
goal: -(o.rotation ↑(-π / 2)) x = (o.rotation ↑(π / 2)) x

full_name: Orientation.neg_rotation_pi_div_two
code: /-- Negating a rotation by π / 2 is equivalent to rotation by -π / 2. -/
theorem neg_rotation_pi_div_two (x : V) : -o.rotation (π / 2 : ℝ) x = o.rotation (-π / 2 : ℝ) x 
goal: -(o.rotation ↑(π / 2)) x = (o.rotation ↑(-π / 2)) x

full_name: Orientation.kahler_rotation_left'
code: /-- Rotating the first of two vectors by `θ` scales their Kahler form by `cos (-θ) + sin (-θ) * I`.
-/
theorem kahler_rotation_left' (x y : V) (θ : Real.Angle) :
    o.kahler (o.rotation θ x) y = (-θ).expMapCircle * o.kahler x y 
goal: (o.kahler ((o.rotation θ) x)) y = ↑(-θ).expMapCircle * (o.kahler x) y

full_name: Orientation.kahler_rotation_right
code: /-- Rotating the second of two vectors by `θ` scales their Kahler form by `cos θ + sin θ * I`. -/
@[simp]
theorem kahler_rotation_right (x y : V) (θ : Real.Angle) :
    o.kahler x (o.rotation θ y) = θ.expMapCircle * o.kahler x y 
goal: (o.kahler x) ((o.rotation θ) y) = ↑θ.expMapCircle * (o.kahler x) y

full_name: Orientation.oangle_rotation_left
code: /-- Rotating the first vector by `θ` subtracts `θ` from the angle between two vectors. -/
@[simp]
theorem oangle_rotation_left {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) (θ : Real.Angle) :
    o.oangle (o.rotation θ x) y = o.oangle x y - θ 
goal: o.oangle ((o.rotation θ) x) y = o.oangle x y - θ

full_name: Orientation.oangle_rotation_right
code: /-- Rotating the second vector by `θ` adds `θ` to the angle between two vectors. -/
@[simp]
theorem oangle_rotation_right {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) (θ : Real.Angle) :
    o.oangle x (o.rotation θ y) = o.oangle x y + θ 
goal: o.oangle x ((o.rotation θ) y) = o.oangle x y + θ

full_name: Orientation.oangle_rotation_self_left
code: /-- The rotation of a vector by `θ` has an angle of `-θ` from that vector. -/
@[simp]
theorem oangle_rotation_self_left {x : V} (hx : x ≠ 0) (θ : Real.Angle) :
    o.oangle (o.rotation θ x) x = -θ 
goal: o.oangle ((o.rotation θ) x) x = -θ

full_name: Orientation.oangle_rotation_self_right
code: /-- A vector has an angle of `θ` from the rotation of that vector by `θ`. -/
@[simp]
theorem oangle_rotation_self_right {x : V} (hx : x ≠ 0) (θ : Real.Angle) :
    o.oangle x (o.rotation θ x) = θ 
goal: o.oangle x ((o.rotation θ) x) = θ

full_name: Orientation.oangle_rotation_oangle_left
code: /-- Rotating the first vector by the angle between the two vectors results in an angle of 0. -/
@[simp]
theorem oangle_rotation_oangle_left (x y : V) : o.oangle (o.rotation (o.oangle x y) x) y = 0 
goal: o.oangle ((o.rotation (o.oangle x y)) x) y = 0

full_name: Orientation.oangle_rotation_oangle_right
code: /-- Rotating the first vector by the angle between the two vectors and swapping the vectors
results in an angle of 0. -/
@[simp]
theorem oangle_rotation_oangle_right (x y : V) : o.oangle y (o.rotation (o.oangle x y) x) = 0 
goal: o.oangle y ((o.rotation (o.oangle x y)) x) = 0

full_name: Orientation.oangle_rotation
code: /-- Rotating both vectors by the same angle does not change the angle between those vectors. -/
@[simp]
theorem oangle_rotation (x y : V) (θ : Real.Angle) :
    o.oangle (o.rotation θ x) (o.rotation θ y) = o.oangle x y 
goal: o.oangle ((o.rotation θ) x) ((o.rotation θ) y) = o.oangle x y

full_name: Orientation.rotation_eq_self_iff_angle_eq_zero
code: /-- A rotation of a nonzero vector equals that vector if and only if the angle is zero. -/
@[simp]
theorem rotation_eq_self_iff_angle_eq_zero {x : V} (hx : x ≠ 0) (θ : Real.Angle) :
    o.rotation θ x = x ↔ θ = 0 
goal: (o.rotation θ) x = x ↔ θ = 0

full_name: Orientation.eq_rotation_self_iff_angle_eq_zero
code: /-- A nonzero vector equals a rotation of that vector if and only if the angle is zero. -/
@[simp]
theorem eq_rotation_self_iff_angle_eq_zero {x : V} (hx : x ≠ 0) (θ : Real.Angle) :
    x = o.rotation θ x ↔ θ = 0 
goal: x = (o.rotation θ) x ↔ θ = 0

full_name: Orientation.rotation_eq_self_iff
code: /-- A rotation of a vector equals that vector if and only if the vector or the angle is zero. -/
theorem rotation_eq_self_iff (x : V) (θ : Real.Angle) : o.rotation θ x = x ↔ x = 0 ∨ θ = 0 
goal: (o.rotation θ) x = x ↔ x = 0 ∨ θ = 0

full_name: Orientation.eq_rotation_self_iff
code: /-- A vector equals a rotation of that vector if and only if the vector or the angle is zero. -/
theorem eq_rotation_self_iff (x : V) (θ : Real.Angle) : x = o.rotation θ x ↔ x = 0 ∨ θ = 0 
goal: x = (o.rotation θ) x ↔ x = 0 ∨ θ = 0

full_name: Orientation.rotation_oangle_eq_iff_norm_eq
code: /-- Rotating a vector by the angle to another vector gives the second vector if and only if the
norms are equal. -/
@[simp]
theorem rotation_oangle_eq_iff_norm_eq (x y : V) : o.rotation (o.oangle x y) x = y ↔ ‖x‖ = ‖y‖ 
goal: (o.rotation (o.oangle x y)) x = y ↔ ‖x‖ = ‖y‖

full_name: Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero
code: /-- The angle between two nonzero vectors is `θ` if and only if the second vector is the first
rotated by `θ` and scaled by the ratio of the norms. -/
theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero {x y : V} (hx : x ≠ 0) (hy : y ≠ 0)
    (θ : Real.Angle) : o.oangle x y = θ ↔ y = (‖y‖ / ‖x‖) • o.rotation θ x 
goal: o.oangle x y = θ ↔ y = (‖y‖ / ‖x‖) • (o.rotation θ) x

full_name: Orientation.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero
code: /-- The angle between two nonzero vectors is `θ` if and only if the second vector is the first
rotated by `θ` and scaled by a positive real. -/
theorem oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero {x y : V} (hx : x ≠ 0) (hy : y ≠ 0)
    (θ : Real.Angle) : o.oangle x y = θ ↔ ∃ r : ℝ, 0 < r ∧ y = r • o.rotation θ x 
goal: o.oangle x y = θ ↔ ∃ r, 0 < r ∧ y = r • (o.rotation θ) x

full_name: Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_or_eq_zero
code: /-- The angle between two vectors is `θ` if and only if they are nonzero and the second vector
is the first rotated by `θ` and scaled by the ratio of the norms, or `θ` and at least one of the
vectors are zero. -/
theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_or_eq_zero {x y : V} (θ : Real.Angle) :
    o.oangle x y = θ ↔
      x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • o.rotation θ x ∨ θ = 0 ∧ (x = 0 ∨ y = 0) 
goal: o.oangle x y = θ ↔ x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • (o.rotation θ) x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)

full_name: Orientation.oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero
code: /-- The angle between two vectors is `θ` if and only if they are nonzero and the second vector
is the first rotated by `θ` and scaled by a positive real, or `θ` and at least one of the
vectors are zero. -/
theorem oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero {x y : V} (θ : Real.Angle) :
    o.oangle x y = θ ↔
      (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r : ℝ, 0 < r ∧ y = r • o.rotation θ x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0) 
goal: o.oangle x y = θ ↔ (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • (o.rotation θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)

full_name: Orientation.exists_linearIsometryEquiv_eq_of_det_pos
code: /-- Any linear isometric equivalence in `V` with positive determinant is `rotation`. -/
theorem exists_linearIsometryEquiv_eq_of_det_pos {f : V ≃ₗᵢ[ℝ] V}
    (hd : 0 < LinearMap.det (f.toLinearEquiv : V →ₗ[ℝ] V)) :
    ∃ θ : Real.Angle, f = o.rotation θ 
goal: ∃ θ, f = o.rotation θ

full_name: Orientation.rotation_map
code: theorem rotation_map (θ : Real.Angle) (f : V ≃ₗᵢ[ℝ] V') (x : V') :
    (Orientation.map (Fin 2) f.toLinearEquiv o).rotation θ x = f (o.rotation θ (f.symm x)) 
goal: (((Orientation.map (Fin 2) f.toLinearEquiv) o).rotation θ) x = f ((o.rotation θ) (f.symm x))

full_name: Complex.rotation
code: @[simp]
protected theorem _root_.Complex.rotation (θ : Real.Angle) (z : ℂ) :
    Complex.orientation.rotation θ z = θ.expMapCircle * z 
goal: (Complex.orientation.rotation θ) z = ↑θ.expMapCircle * z

full_name: Orientation.rotation_map_complex
code: /-- Rotation in an oriented real inner product space of dimension 2 can be evaluated in terms of a
complex-number representation of the space. -/
theorem rotation_map_complex (θ : Real.Angle) (f : V ≃ₗᵢ[ℝ] ℂ)
    (hf : Orientation.map (Fin 2) f.toLinearEquiv o = Complex.orientation) (x : V) :
    f (o.rotation θ x) = θ.expMapCircle * f x 
goal: f ((o.rotation θ) x) = ↑θ.expMapCircle * f x

full_name: Orientation.rotation_neg_orientation_eq_neg
code: /-- Negating the orientation negates the angle in `rotation`. -/
theorem rotation_neg_orientation_eq_neg (θ : Real.Angle) : (-o).rotation θ = o.rotation (-θ) 
goal: (-o).rotation θ = o.rotation (-θ)

full_name: Orientation.inner_rotation_pi_div_two_left
code: /-- The inner product between a `π / 2` rotation of a vector and that vector is zero. -/
@[simp]
theorem inner_rotation_pi_div_two_left (x : V) : ⟪o.rotation (π / 2 : ℝ) x, x⟫ = 0 
goal: ⟪(o.rotation ↑(π / 2)) x, x⟫_ℝ = 0

full_name: Orientation.inner_rotation_pi_div_two_right
code: /-- The inner product between a vector and a `π / 2` rotation of that vector is zero. -/
@[simp]
theorem inner_rotation_pi_div_two_right (x : V) : ⟪x, o.rotation (π / 2 : ℝ) x⟫ = 0 
goal: ⟪x, (o.rotation ↑(π / 2)) x⟫_ℝ = 0

full_name: Orientation.inner_smul_rotation_pi_div_two_left
code: /-- The inner product between a multiple of a `π / 2` rotation of a vector and that vector is
zero. -/
@[simp]
theorem inner_smul_rotation_pi_div_two_left (x : V) (r : ℝ) :
    ⟪r • o.rotation (π / 2 : ℝ) x, x⟫ = 0 
goal: ⟪r • (o.rotation ↑(π / 2)) x, x⟫_ℝ = 0

full_name: Orientation.inner_smul_rotation_pi_div_two_right
code: /-- The inner product between a vector and a multiple of a `π / 2` rotation of that vector is
zero. -/
@[simp]
theorem inner_smul_rotation_pi_div_two_right (x : V) (r : ℝ) :
    ⟪x, r • o.rotation (π / 2 : ℝ) x⟫ = 0 
goal: ⟪x, r • (o.rotation ↑(π / 2)) x⟫_ℝ = 0

full_name: Orientation.inner_rotation_pi_div_two_left_smul
code: /-- The inner product between a `π / 2` rotation of a vector and a multiple of that vector is
zero. -/
@[simp]
theorem inner_rotation_pi_div_two_left_smul (x : V) (r : ℝ) :
    ⟪o.rotation (π / 2 : ℝ) x, r • x⟫ = 0 
goal: ⟪(o.rotation ↑(π / 2)) x, r • x⟫_ℝ = 0

full_name: Orientation.inner_rotation_pi_div_two_right_smul
code: /-- The inner product between a multiple of a vector and a `π / 2` rotation of that vector is
zero. -/
@[simp]
theorem inner_rotation_pi_div_two_right_smul (x : V) (r : ℝ) :
    ⟪r • x, o.rotation (π / 2 : ℝ) x⟫ = 0 
goal: ⟪r • x, (o.rotation ↑(π / 2)) x⟫_ℝ = 0

full_name: Orientation.inner_smul_rotation_pi_div_two_smul_left
code: /-- The inner product between a multiple of a `π / 2` rotation of a vector and a multiple of
that vector is zero. -/
@[simp]
theorem inner_smul_rotation_pi_div_two_smul_left (x : V) (r₁ r₂ : ℝ) :
    ⟪r₁ • o.rotation (π / 2 : ℝ) x, r₂ • x⟫ = 0 
goal: ⟪r₁ • (o.rotation ↑(π / 2)) x, r₂ • x⟫_ℝ = 0

full_name: Orientation.inner_smul_rotation_pi_div_two_smul_right
code: /-- The inner product between a multiple of a vector and a multiple of a `π / 2` rotation of
that vector is zero. -/
@[simp]
theorem inner_smul_rotation_pi_div_two_smul_right (x : V) (r₁ r₂ : ℝ) :
    ⟪r₂ • x, r₁ • o.rotation (π / 2 : ℝ) x⟫ = 0 
goal: ⟪r₂ • x, r₁ • (o.rotation ↑(π / 2)) x⟫_ℝ = 0

full_name: Orientation.inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two
code: /-- The inner product between two vectors is zero if and only if the first vector is zero or
the second is a multiple of a `π / 2` rotation of that vector. -/
theorem inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two {x y : V} :
    ⟪x, y⟫ = 0 ↔ x = 0 ∨ ∃ r : ℝ, r • o.rotation (π / 2 : ℝ) x = y 
goal: ⟪x, y⟫_ℝ = 0 ↔ x = 0 ∨ ∃ r, r • (o.rotation ↑(π / 2)) x = y