geometry.euclidean.angle.oriented.rotationMathlib.Geometry.Euclidean.Angle.Oriented.Rotation

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -52,7 +52,7 @@ def rotationAux (θ : Real.Angle) : V →ₗᵢ[ℝ] V :=
     (Real.Angle.cos θ • LinearMap.id + Real.Angle.sin θ • ↑(LinearIsometryEquiv.toLinearEquiv J))
     (by
       intro x y
-      simp only [IsROrC.conj_to_real, id.def, LinearMap.smul_apply, LinearMap.add_apply,
+      simp only [RCLike.conj_to_real, id.def, LinearMap.smul_apply, LinearMap.add_apply,
         LinearMap.id_coe, LinearEquiv.coe_coe, LinearIsometryEquiv.coe_toLinearEquiv,
         Orientation.areaForm_rightAngleRotation_left, Orientation.inner_rightAngleRotation_left,
         Orientation.inner_rightAngleRotation_right, inner_add_left, inner_smul_left,
@@ -219,7 +219,7 @@ theorem kahler_rotation_left (x y : V) (θ : Real.Angle) :
   by
   simp only [o.rotation_apply, map_add, map_mul, LinearMap.map_smulₛₗ, RingHom.id_apply,
     LinearMap.add_apply, LinearMap.smul_apply, real_smul, kahler_right_angle_rotation_left,
-    Real.Angle.coe_expMapCircle, IsROrC.conj_ofReal, conj_I]
+    Real.Angle.coe_expMapCircle, RCLike.conj_ofReal, conj_I]
   ring
 #align orientation.kahler_rotation_left Orientation.kahler_rotation_left
 -/
@@ -406,7 +406,7 @@ theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero {x y : V} (hx :
   · rintro rfl
     rw [← LinearIsometryEquiv.map_smul, ← o.oangle_smul_left_of_pos x y hp, eq_comm,
       rotation_oangle_eq_iff_norm_eq, norm_smul, Real.norm_of_nonneg hp.le,
-      div_mul_cancel _ (norm_ne_zero_iff.2 hx)]
+      div_mul_cancel₀ _ (norm_ne_zero_iff.2 hx)]
   · intro hye
     rw [hye, o.oangle_smul_right_of_pos _ _ hp, o.oangle_rotation_self_right hx]
 #align orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero
Diff
@@ -420,7 +420,7 @@ theorem oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero {x y : V} (hx : x ≠ 0) (
   by
   constructor
   · intro h
-    rw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy] at h 
+    rw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy] at h
     exact ⟨‖y‖ / ‖x‖, div_pos (norm_pos_iff.2 hy) (norm_pos_iff.2 hx), h⟩
   · rintro ⟨r, hr, rfl⟩
     rw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Joseph Myers. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers, Heather Macbeth
 -/
-import Mathbin.Analysis.SpecialFunctions.Complex.Circle
-import Mathbin.Geometry.Euclidean.Angle.Oriented.Basic
+import Analysis.SpecialFunctions.Complex.Circle
+import Geometry.Euclidean.Angle.Oriented.Basic
 
 #align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"8af7091a43227e179939ba132e54e54e9f3b089a"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Joseph Myers. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers, Heather Macbeth
-
-! This file was ported from Lean 3 source module geometry.euclidean.angle.oriented.rotation
-! leanprover-community/mathlib commit 8af7091a43227e179939ba132e54e54e9f3b089a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecialFunctions.Complex.Circle
 import Mathbin.Geometry.Euclidean.Angle.Oriented.Basic
 
+#align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"8af7091a43227e179939ba132e54e54e9f3b089a"
+
 /-!
 # Rotations by oriented angles.
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.euclidean.angle.oriented.rotation
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit 8af7091a43227e179939ba132e54e54e9f3b089a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Geometry.Euclidean.Angle.Oriented.Basic
 /-!
 # Rotations by oriented angles.
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file defines rotations by oriented angles in real inner product spaces.
 
 ## Main definitions
Diff
@@ -45,6 +45,7 @@ variable [Fact (finrank ℝ V = 2)] [Fact (finrank ℝ V' = 2)] (o : Orientation
 
 local notation "J" => o.rightAngleRotation
 
+#print Orientation.rotationAux /-
 /-- Auxiliary construction to build a rotation by the oriented angle `θ`. -/
 def rotationAux (θ : Real.Angle) : V →ₗᵢ[ℝ] V :=
   LinearMap.isometryOfInner
@@ -58,13 +59,17 @@ def rotationAux (θ : Real.Angle) : V →ₗᵢ[ℝ] V :=
         inner_add_right, inner_smul_right]
       linear_combination inner x y * θ.cos_sq_add_sin_sq)
 #align orientation.rotation_aux Orientation.rotationAux
+-/
 
+#print Orientation.rotationAux_apply /-
 @[simp]
 theorem rotationAux_apply (θ : Real.Angle) (x : V) :
     o.rotationAux θ x = Real.Angle.cos θ • x + Real.Angle.sin θ • J x :=
   rfl
 #align orientation.rotation_aux_apply Orientation.rotationAux_apply
+-/
 
+#print Orientation.rotation /-
 /-- A rotation by the oriented angle `θ`. -/
 def rotation (θ : Real.Angle) : V ≃ₗᵢ[ℝ] V :=
   LinearIsometryEquiv.ofLinearIsometry (o.rotationAux θ)
@@ -90,17 +95,23 @@ def rotation (θ : Real.Angle) : V ≃ₗᵢ[ℝ] V :=
         abel
       · simp)
 #align orientation.rotation Orientation.rotation
+-/
 
+#print Orientation.rotation_apply /-
 theorem rotation_apply (θ : Real.Angle) (x : V) :
     o.rotation θ x = Real.Angle.cos θ • x + Real.Angle.sin θ • J x :=
   rfl
 #align orientation.rotation_apply Orientation.rotation_apply
+-/
 
+#print Orientation.rotation_symm_apply /-
 theorem rotation_symm_apply (θ : Real.Angle) (x : V) :
     (o.rotation θ).symm x = Real.Angle.cos θ • x - Real.Angle.sin θ • J x :=
   rfl
 #align orientation.rotation_symm_apply Orientation.rotation_symm_apply
+-/
 
+#print Orientation.rotation_eq_matrix_toLin /-
 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)
@@ -114,7 +125,9 @@ theorem rotation_eq_matrix_toLin (θ : Real.Angle) {x : V} (hx : x ≠ 0) :
   · rw [Matrix.toLin_self]
     simp [rotation_apply, Fin.sum_univ_succ, add_comm]
 #align orientation.rotation_eq_matrix_to_lin Orientation.rotation_eq_matrix_toLin
+-/
 
+#print Orientation.det_rotation /-
 /-- The determinant of `rotation` (as a linear map) is equal to `1`. -/
 @[simp]
 theorem det_rotation (θ : Real.Angle) : (o.rotation θ).toLinearMap.det = 1 :=
@@ -125,24 +138,32 @@ theorem det_rotation (θ : Real.Angle) : (o.rotation θ).toLinearMap.det = 1 :=
   rw [o.rotation_eq_matrix_to_lin θ hx]
   simpa [sq] using θ.cos_sq_add_sin_sq
 #align orientation.det_rotation Orientation.det_rotation
+-/
 
+#print Orientation.linearEquiv_det_rotation /-
 /-- The determinant of `rotation` (as a linear equiv) is equal to `1`. -/
 @[simp]
 theorem linearEquiv_det_rotation (θ : Real.Angle) : (o.rotation θ).toLinearEquiv.det = 1 :=
   Units.ext <| o.det_rotation θ
 #align orientation.linear_equiv_det_rotation Orientation.linearEquiv_det_rotation
+-/
 
+#print Orientation.rotation_symm /-
 /-- The inverse of `rotation` is rotation by the negation of the angle. -/
 @[simp]
 theorem rotation_symm (θ : Real.Angle) : (o.rotation θ).symm = o.rotation (-θ) := by
   ext <;> simp [o.rotation_apply, o.rotation_symm_apply, sub_eq_add_neg]
 #align orientation.rotation_symm Orientation.rotation_symm
+-/
 
+#print Orientation.rotation_zero /-
 /-- Rotation by 0 is the identity. -/
 @[simp]
 theorem rotation_zero : o.rotation 0 = LinearIsometryEquiv.refl ℝ V := by ext <;> simp [rotation]
 #align orientation.rotation_zero Orientation.rotation_zero
+-/
 
+#print Orientation.rotation_pi /-
 /-- Rotation by π is negation. -/
 @[simp]
 theorem rotation_pi : o.rotation π = LinearIsometryEquiv.neg ℝ :=
@@ -150,18 +171,24 @@ theorem rotation_pi : o.rotation π = LinearIsometryEquiv.neg ℝ :=
   ext x
   simp [rotation]
 #align orientation.rotation_pi Orientation.rotation_pi
+-/
 
+#print Orientation.rotation_pi_apply /-
 /-- Rotation by π is negation. -/
 theorem rotation_pi_apply (x : V) : o.rotation π x = -x := by simp
 #align orientation.rotation_pi_apply Orientation.rotation_pi_apply
+-/
 
+#print Orientation.rotation_pi_div_two /-
 /-- Rotation by π / 2 is the "right-angle-rotation" map `J`. -/
 theorem rotation_pi_div_two : o.rotation (π / 2 : ℝ) = J :=
   by
   ext x
   simp [rotation]
 #align orientation.rotation_pi_div_two Orientation.rotation_pi_div_two
+-/
 
+#print Orientation.rotation_rotation /-
 /-- Rotating twice is equivalent to rotating by the sum of the angles. -/
 @[simp]
 theorem rotation_rotation (θ₁ θ₂ : Real.Angle) (x : V) :
@@ -173,14 +200,18 @@ theorem rotation_rotation (θ₁ θ₂ : Real.Angle) (x : V) :
   ring_nf
   abel
 #align orientation.rotation_rotation Orientation.rotation_rotation
+-/
 
+#print Orientation.rotation_trans /-
 /-- 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 (θ₂ + θ₁) :=
   LinearIsometryEquiv.ext fun _ => by rw [← rotation_rotation, LinearIsometryEquiv.trans_apply]
 #align orientation.rotation_trans Orientation.rotation_trans
+-/
 
+#print Orientation.kahler_rotation_left /-
 /-- 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) :
@@ -191,31 +222,41 @@ theorem kahler_rotation_left (x y : V) (θ : Real.Angle) :
     Real.Angle.coe_expMapCircle, IsROrC.conj_ofReal, conj_I]
   ring
 #align orientation.kahler_rotation_left Orientation.kahler_rotation_left
+-/
 
+#print Orientation.neg_rotation /-
 /-- Negating a rotation is equivalent to rotation by π plus the angle. -/
 theorem neg_rotation (θ : Real.Angle) (x : V) : -o.rotation θ x = o.rotation (π + θ) x := by
   rw [← o.rotation_pi_apply, rotation_rotation]
 #align orientation.neg_rotation Orientation.neg_rotation
+-/
 
+#print Orientation.neg_rotation_neg_pi_div_two /-
 /-- 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 := by
   rw [neg_rotation, ← Real.Angle.coe_add, neg_div, ← sub_eq_add_neg, sub_half]
 #align orientation.neg_rotation_neg_pi_div_two Orientation.neg_rotation_neg_pi_div_two
+-/
 
+#print Orientation.neg_rotation_pi_div_two /-
 /-- 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 :=
   (neg_eq_iff_eq_neg.mp <| o.neg_rotation_neg_pi_div_two _).symm
 #align orientation.neg_rotation_pi_div_two Orientation.neg_rotation_pi_div_two
+-/
 
+#print Orientation.kahler_rotation_left' /-
 /-- 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 := by
   simpa [coe_inv_circle_eq_conj, -kahler_rotation_left] using o.kahler_rotation_left x y θ
 #align orientation.kahler_rotation_left' Orientation.kahler_rotation_left'
+-/
 
+#print Orientation.kahler_rotation_right /-
 /-- 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) :
@@ -225,7 +266,9 @@ theorem kahler_rotation_right (x y : V) (θ : Real.Angle) :
     kahler_right_angle_rotation_right, Real.Angle.coe_expMapCircle]
   ring
 #align orientation.kahler_rotation_right Orientation.kahler_rotation_right
+-/
 
+#print Orientation.oangle_rotation_left /-
 /-- 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) :
@@ -237,7 +280,9 @@ theorem oangle_rotation_left {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) (θ : Real.
   · exact ne_zero_of_mem_circle _
   · exact o.kahler_ne_zero hx hy
 #align orientation.oangle_rotation_left Orientation.oangle_rotation_left
+-/
 
+#print Orientation.oangle_rotation_right /-
 /-- 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) :
@@ -249,19 +294,25 @@ theorem oangle_rotation_right {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) (θ : Real
   · exact ne_zero_of_mem_circle _
   · exact o.kahler_ne_zero hx hy
 #align orientation.oangle_rotation_right Orientation.oangle_rotation_right
+-/
 
+#print Orientation.oangle_rotation_self_left /-
 /-- 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 = -θ := by simp [hx]
 #align orientation.oangle_rotation_self_left Orientation.oangle_rotation_self_left
+-/
 
+#print Orientation.oangle_rotation_self_right /-
 /-- 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) = θ := by simp [hx]
 #align orientation.oangle_rotation_self_right Orientation.oangle_rotation_self_right
+-/
 
+#print Orientation.oangle_rotation_oangle_left /-
 /-- Rotating the first vector by the angle between the two vectors results an an angle of 0. -/
 @[simp]
 theorem oangle_rotation_oangle_left (x y : V) : o.oangle (o.rotation (o.oangle x y) x) y = 0 :=
@@ -272,7 +323,9 @@ theorem oangle_rotation_oangle_left (x y : V) : o.oangle (o.rotation (o.oangle x
     · simp [hy]
     · simp [hx, hy]
 #align orientation.oangle_rotation_oangle_left Orientation.oangle_rotation_oangle_left
+-/
 
+#print Orientation.oangle_rotation_oangle_right /-
 /-- Rotating the first vector by the angle between the two vectors and swapping the vectors
 results an an angle of 0. -/
 @[simp]
@@ -281,14 +334,18 @@ theorem oangle_rotation_oangle_right (x y : V) : o.oangle y (o.rotation (o.oangl
   rw [oangle_rev]
   simp
 #align orientation.oangle_rotation_oangle_right Orientation.oangle_rotation_oangle_right
+-/
 
+#print Orientation.oangle_rotation /-
 /-- 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 := by
   by_cases hx : x = 0 <;> by_cases hy : y = 0 <;> simp [hx, hy]
 #align orientation.oangle_rotation Orientation.oangle_rotation
+-/
 
+#print Orientation.rotation_eq_self_iff_angle_eq_zero /-
 /-- 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) :
@@ -300,23 +357,31 @@ theorem rotation_eq_self_iff_angle_eq_zero {x : V} (hx : x ≠ 0) (θ : Real.Ang
   · intro h
     simp [h]
 #align orientation.rotation_eq_self_iff_angle_eq_zero Orientation.rotation_eq_self_iff_angle_eq_zero
+-/
 
+#print Orientation.eq_rotation_self_iff_angle_eq_zero /-
 /-- 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 := by rw [← o.rotation_eq_self_iff_angle_eq_zero hx, eq_comm]
 #align orientation.eq_rotation_self_iff_angle_eq_zero Orientation.eq_rotation_self_iff_angle_eq_zero
+-/
 
+#print Orientation.rotation_eq_self_iff /-
 /-- 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 := by
   by_cases h : x = 0 <;> simp [h]
 #align orientation.rotation_eq_self_iff Orientation.rotation_eq_self_iff
+-/
 
+#print Orientation.eq_rotation_self_iff /-
 /-- 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 := by
   rw [← rotation_eq_self_iff, eq_comm]
 #align orientation.eq_rotation_self_iff Orientation.eq_rotation_self_iff
+-/
 
+#print Orientation.rotation_oangle_eq_iff_norm_eq /-
 /-- Rotating a vector by the angle to another vector gives the second vector if and only if the
 norms are equal. -/
 @[simp]
@@ -328,7 +393,9 @@ theorem rotation_oangle_eq_iff_norm_eq (x y : V) : o.rotation (o.oangle x y) x =
   · intro h
     rw [o.eq_iff_oangle_eq_zero_of_norm_eq] <;> simp [h]
 #align orientation.rotation_oangle_eq_iff_norm_eq Orientation.rotation_oangle_eq_iff_norm_eq
+-/
 
+#print Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero /-
 /-- 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)
@@ -343,7 +410,9 @@ theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero {x y : V} (hx :
   · intro hye
     rw [hye, o.oangle_smul_right_of_pos _ _ hp, o.oangle_rotation_self_right hx]
 #align orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero
+-/
 
+#print Orientation.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero /-
 /-- 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)
@@ -356,7 +425,9 @@ theorem oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero {x y : V} (hx : x ≠ 0) (
   · rintro ⟨r, hr, rfl⟩
     rw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]
 #align orientation.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero Orientation.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero
+-/
 
+#print Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_or_eq_zero /-
 /-- 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. -/
@@ -370,7 +441,9 @@ theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_or_eq_zero {x y : V} (θ :
     · rw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy]
       simp [hx, hy]
 #align orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_or_eq_zero Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_or_eq_zero
+-/
 
+#print Orientation.oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero /-
 /-- 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. -/
@@ -385,7 +458,9 @@ theorem oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero {x y : V} (θ : Real.Angle
     · rw [o.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero hx hy]
       simp [hx, hy]
 #align orientation.oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero Orientation.oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero
+-/
 
+#print Orientation.exists_linearIsometryEquiv_eq_of_det_pos /-
 /-- Any linear isometric equivalence in `V` with positive determinant is `rotation`. -/
 theorem exists_linearIsometryEquiv_eq_of_det_pos {f : V ≃ₗᵢ[ℝ] V}
     (hd : 0 < (f.toLinearEquiv : V →ₗ[ℝ] V).det) : ∃ θ : Real.Angle, f = o.rotation θ :=
@@ -406,12 +481,16 @@ theorem exists_linearIsometryEquiv_eq_of_det_pos {f : V ≃ₗᵢ[ℝ] V}
       o.kahler_comp_right_angle_rotation]
   simp [← this]
 #align orientation.exists_linear_isometry_equiv_eq_of_det_pos Orientation.exists_linearIsometryEquiv_eq_of_det_pos
+-/
 
+#print Orientation.rotation_map /-
 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)) := by
   simp [rotation_apply, o.right_angle_rotation_map]
 #align orientation.rotation_map Orientation.rotation_map
+-/
 
+#print Complex.rotation /-
 @[simp]
 protected theorem Complex.rotation (θ : Real.Angle) (z : ℂ) :
     Complex.orientation.rotation θ z = θ.expMapCircle * z :=
@@ -419,7 +498,9 @@ protected theorem Complex.rotation (θ : Real.Angle) (z : ℂ) :
   simp only [rotation_apply, Complex.rightAngleRotation, Real.Angle.coe_expMapCircle, real_smul]
   ring
 #align complex.rotation Complex.rotation
+-/
 
+#print Orientation.rotation_map_complex /-
 /-- 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 ≃ₗᵢ[ℝ] ℂ)
@@ -429,24 +510,32 @@ theorem rotation_map_complex (θ : Real.Angle) (f : V ≃ₗᵢ[ℝ] ℂ)
   rw [← Complex.rotation, ← hf, o.rotation_map]
   simp
 #align orientation.rotation_map_complex Orientation.rotation_map_complex
+-/
 
+#print Orientation.rotation_neg_orientation_eq_neg /-
 /-- Negating the orientation negates the angle in `rotation`. -/
 theorem rotation_neg_orientation_eq_neg (θ : Real.Angle) : (-o).rotation θ = o.rotation (-θ) :=
   LinearIsometryEquiv.ext <| by simp [rotation_apply]
 #align orientation.rotation_neg_orientation_eq_neg Orientation.rotation_neg_orientation_eq_neg
+-/
 
+#print Orientation.inner_rotation_pi_div_two_left /-
 /-- 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 := by
   rw [rotation_pi_div_two, inner_right_angle_rotation_self]
 #align orientation.inner_rotation_pi_div_two_left Orientation.inner_rotation_pi_div_two_left
+-/
 
+#print Orientation.inner_rotation_pi_div_two_right /-
 /-- 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 := by
   rw [real_inner_comm, inner_rotation_pi_div_two_left]
 #align orientation.inner_rotation_pi_div_two_right Orientation.inner_rotation_pi_div_two_right
+-/
 
+#print Orientation.inner_smul_rotation_pi_div_two_left /-
 /-- The inner product between a multiple of a `π / 2` rotation of a vector and that vector is
 zero. -/
 @[simp]
@@ -454,7 +543,9 @@ theorem inner_smul_rotation_pi_div_two_left (x : V) (r : ℝ) :
     ⟪r • o.rotation (π / 2 : ℝ) x, x⟫ = 0 := by
   rw [inner_smul_left, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero]
 #align orientation.inner_smul_rotation_pi_div_two_left Orientation.inner_smul_rotation_pi_div_two_left
+-/
 
+#print Orientation.inner_smul_rotation_pi_div_two_right /-
 /-- The inner product between a vector and a multiple of a `π / 2` rotation of that vector is
 zero. -/
 @[simp]
@@ -462,7 +553,9 @@ theorem inner_smul_rotation_pi_div_two_right (x : V) (r : ℝ) :
     ⟪x, r • o.rotation (π / 2 : ℝ) x⟫ = 0 := by
   rw [real_inner_comm, inner_smul_rotation_pi_div_two_left]
 #align orientation.inner_smul_rotation_pi_div_two_right Orientation.inner_smul_rotation_pi_div_two_right
+-/
 
+#print Orientation.inner_rotation_pi_div_two_left_smul /-
 /-- The inner product between a `π / 2` rotation of a vector and a multiple of that vector is
 zero. -/
 @[simp]
@@ -470,7 +563,9 @@ theorem inner_rotation_pi_div_two_left_smul (x : V) (r : ℝ) :
     ⟪o.rotation (π / 2 : ℝ) x, r • x⟫ = 0 := by
   rw [inner_smul_right, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero]
 #align orientation.inner_rotation_pi_div_two_left_smul Orientation.inner_rotation_pi_div_two_left_smul
+-/
 
+#print Orientation.inner_rotation_pi_div_two_right_smul /-
 /-- The inner product between a multiple of a vector and a `π / 2` rotation of that vector is
 zero. -/
 @[simp]
@@ -478,7 +573,9 @@ theorem inner_rotation_pi_div_two_right_smul (x : V) (r : ℝ) :
     ⟪r • x, o.rotation (π / 2 : ℝ) x⟫ = 0 := by
   rw [real_inner_comm, inner_rotation_pi_div_two_left_smul]
 #align orientation.inner_rotation_pi_div_two_right_smul Orientation.inner_rotation_pi_div_two_right_smul
+-/
 
+#print Orientation.inner_smul_rotation_pi_div_two_smul_left /-
 /-- The inner product between a multiple of a `π / 2` rotation of a vector and a multiple of
 that vector is zero. -/
 @[simp]
@@ -486,7 +583,9 @@ theorem inner_smul_rotation_pi_div_two_smul_left (x : V) (r₁ r₂ : ℝ) :
     ⟪r₁ • o.rotation (π / 2 : ℝ) x, r₂ • x⟫ = 0 := by
   rw [inner_smul_right, inner_smul_rotation_pi_div_two_left, MulZeroClass.mul_zero]
 #align orientation.inner_smul_rotation_pi_div_two_smul_left Orientation.inner_smul_rotation_pi_div_two_smul_left
+-/
 
+#print Orientation.inner_smul_rotation_pi_div_two_smul_right /-
 /-- The inner product between a multiple of a vector and a multiple of a `π / 2` rotation of
 that vector is zero. -/
 @[simp]
@@ -494,7 +593,9 @@ theorem inner_smul_rotation_pi_div_two_smul_right (x : V) (r₁ r₂ : ℝ) :
     ⟪r₂ • x, r₁ • o.rotation (π / 2 : ℝ) x⟫ = 0 := by
   rw [real_inner_comm, inner_smul_rotation_pi_div_two_smul_left]
 #align orientation.inner_smul_rotation_pi_div_two_smul_right Orientation.inner_smul_rotation_pi_div_two_smul_right
+-/
 
+#print Orientation.inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two /-
 /-- 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} :
@@ -528,6 +629,7 @@ theorem inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two {x y : V} :
       · refine' Or.inr (Or.inr (Or.inl _))
         rw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]
 #align orientation.inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two Orientation.inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two
+-/
 
 end Orientation
 
Diff
@@ -43,7 +43,6 @@ variable [InnerProductSpace ℝ V] [InnerProductSpace ℝ V']
 
 variable [Fact (finrank ℝ V = 2)] [Fact (finrank ℝ V' = 2)] (o : Orientation ℝ V (Fin 2))
 
--- mathport name: exprJ
 local notation "J" => o.rightAngleRotation
 
 /-- Auxiliary construction to build a rotation by the oriented angle `θ`. -/
Diff
@@ -352,7 +352,7 @@ theorem oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero {x y : V} (hx : x ≠ 0) (
   by
   constructor
   · intro h
-    rw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy] at h
+    rw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy] at h 
     exact ⟨‖y‖ / ‖x‖, div_pos (norm_pos_iff.2 hy) (norm_pos_iff.2 hx), h⟩
   · rintro ⟨r, hr, rfl⟩
     rw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]
Diff
@@ -27,7 +27,7 @@ noncomputable section
 
 open FiniteDimensional Complex
 
-open Real RealInnerProductSpace ComplexConjugate
+open scoped Real RealInnerProductSpace ComplexConjugate
 
 namespace Orientation
 
Diff
@@ -520,8 +520,7 @@ theorem inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two {x y : V} :
       rw [neg_smul, ← smul_neg, o.neg_rotation_pi_div_two]
   · rcases h with (rfl | ⟨r, rfl⟩)
     · exact Or.inl rfl
-    · by_cases hx : x = 0
-      · exact Or.inl hx
+    · by_cases hx : x = 0; · exact Or.inl hx
       rcases lt_trichotomy r 0 with (hr | rfl | hr)
       · refine' Or.inr (Or.inr (Or.inr _))
         rw [o.oangle_smul_right_of_neg _ _ hr, o.neg_rotation_pi_div_two,
Diff
@@ -189,7 +189,7 @@ theorem kahler_rotation_left (x y : V) (θ : Real.Angle) :
   by
   simp only [o.rotation_apply, map_add, map_mul, LinearMap.map_smulₛₗ, RingHom.id_apply,
     LinearMap.add_apply, LinearMap.smul_apply, real_smul, kahler_right_angle_rotation_left,
-    Real.Angle.coe_expMapCircle, IsROrC.conj_of_real, conj_I]
+    Real.Angle.coe_expMapCircle, IsROrC.conj_ofReal, conj_I]
   ring
 #align orientation.kahler_rotation_left Orientation.kahler_rotation_left
 
Diff
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.euclidean.angle.oriented.rotation
-! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
+import Mathbin.Analysis.SpecialFunctions.Complex.Circle
 import Mathbin.Geometry.Euclidean.Angle.Oriented.Basic
 
 /-!
Diff
@@ -101,7 +101,6 @@ theorem rotation_symm_apply (θ : Real.Angle) (x : V) :
   rfl
 #align orientation.rotation_symm_apply Orientation.rotation_symm_apply
 
-/- ./././Mathport/Syntax/Translate/Tactic/Basic.lean:31:4: unsupported: too many args: matrix.notation ... #[[]] -/
 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)
Diff
@@ -101,13 +101,11 @@ theorem rotation_symm_apply (θ : Real.Angle) (x : V) :
   rfl
 #align orientation.rotation_symm_apply Orientation.rotation_symm_apply
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:207:4: warning: unsupported notation `«expr!![ » -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:387:14: unsupported user notation matrix.notation -/
+/- ./././Mathport/Syntax/Translate/Tactic/Basic.lean:31:4: unsupported: too many args: matrix.notation ... #[[]] -/
 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)
-        («expr!![ »
-          "./././Mathport/Syntax/Translate/Expr.lean:387:14: unsupported user notation matrix.notation") :=
+        !![θ.cos, -θ.sin; θ.sin, θ.cos] :=
   by
   apply (o.basis_right_angle_rotation x hx).ext
   intro i
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.euclidean.angle.oriented.rotation
-! leanprover-community/mathlib commit 2196ab363eb097c008d4497125e0dde23fb36db2
+! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -34,7 +34,11 @@ attribute [local instance] fact_finite_dimensional_of_finrank_eq_succ
 
 attribute [local instance] Complex.finrank_real_complex_fact
 
-variable {V V' : Type _} [InnerProductSpace ℝ V] [InnerProductSpace ℝ V']
+variable {V V' : Type _}
+
+variable [NormedAddCommGroup V] [NormedAddCommGroup V']
+
+variable [InnerProductSpace ℝ V] [InnerProductSpace ℝ V']
 
 variable [Fact (finrank ℝ V = 2)] [Fact (finrank ℝ V' = 2)] (o : Orientation ℝ V (Fin 2))
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.euclidean.angle.oriented.rotation
-! leanprover-community/mathlib commit fb319896dcaa409bd4a3cc0f8484297ef9dae2c3
+! leanprover-community/mathlib commit 2196ab363eb097c008d4497125e0dde23fb36db2
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -205,7 +205,7 @@ theorem neg_rotation_neg_pi_div_two (x : V) :
 
 /-- 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 :=
-  neg_eq_iff_neg_eq.1 <| o.neg_rotation_neg_pi_div_two _
+  (neg_eq_iff_eq_neg.mp <| o.neg_rotation_neg_pi_div_two _).symm
 #align orientation.neg_rotation_pi_div_two Orientation.neg_rotation_pi_div_two
 
 /-- Rotating the first of two vectors by `θ` scales their Kahler form by `cos (-θ) + sin (-θ) * I`.
Diff
@@ -451,7 +451,7 @@ zero. -/
 @[simp]
 theorem inner_smul_rotation_pi_div_two_left (x : V) (r : ℝ) :
     ⟪r • o.rotation (π / 2 : ℝ) x, x⟫ = 0 := by
-  rw [inner_smul_left, inner_rotation_pi_div_two_left, mul_zero]
+  rw [inner_smul_left, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero]
 #align orientation.inner_smul_rotation_pi_div_two_left Orientation.inner_smul_rotation_pi_div_two_left
 
 /-- The inner product between a vector and a multiple of a `π / 2` rotation of that vector is
@@ -467,7 +467,7 @@ zero. -/
 @[simp]
 theorem inner_rotation_pi_div_two_left_smul (x : V) (r : ℝ) :
     ⟪o.rotation (π / 2 : ℝ) x, r • x⟫ = 0 := by
-  rw [inner_smul_right, inner_rotation_pi_div_two_left, mul_zero]
+  rw [inner_smul_right, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero]
 #align orientation.inner_rotation_pi_div_two_left_smul Orientation.inner_rotation_pi_div_two_left_smul
 
 /-- The inner product between a multiple of a vector and a `π / 2` rotation of that vector is
@@ -483,7 +483,7 @@ 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 := by
-  rw [inner_smul_right, inner_smul_rotation_pi_div_two_left, mul_zero]
+  rw [inner_smul_right, inner_smul_rotation_pi_div_two_left, MulZeroClass.mul_zero]
 #align orientation.inner_smul_rotation_pi_div_two_smul_left Orientation.inner_smul_rotation_pi_div_two_smul_left
 
 /-- The inner product between a multiple of a vector and a multiple of a `π / 2` rotation of
Diff
@@ -98,12 +98,12 @@ theorem rotation_symm_apply (θ : Real.Angle) (x : V) :
 #align orientation.rotation_symm_apply Orientation.rotation_symm_apply
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:207:4: warning: unsupported notation `«expr!![ » -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:391:14: unsupported user notation matrix.notation -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:387:14: unsupported user notation matrix.notation -/
 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)
         («expr!![ »
-          "./././Mathport/Syntax/Translate/Expr.lean:391:14: unsupported user notation matrix.notation") :=
+          "./././Mathport/Syntax/Translate/Expr.lean:387:14: unsupported user notation matrix.notation") :=
   by
   apply (o.basis_right_angle_rotation x hx).ext
   intro i

Changes in mathlib4

mathlib3
mathlib4
chore: backports from #11997, adaptations for nightly-2024-04-07 (#12176)

These are changes from #11997, the latest adaptation PR for nightly-2024-04-07, which can be made directly on master.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>

Diff
@@ -44,7 +44,7 @@ def rotationAux (θ : Real.Angle) : V →ₗᵢ[ℝ] V :=
       Real.Angle.sin θ • (LinearIsometryEquiv.toLinearEquiv J).toLinearMap)
     (by
       intro x y
-      simp only [RCLike.conj_to_real, id.def, LinearMap.smul_apply, LinearMap.add_apply,
+      simp only [RCLike.conj_to_real, id, LinearMap.smul_apply, LinearMap.add_apply,
         LinearMap.id_coe, LinearEquiv.coe_coe, LinearIsometryEquiv.coe_toLinearEquiv,
         Orientation.areaForm_rightAngleRotation_left, Orientation.inner_rightAngleRotation_left,
         Orientation.inner_rightAngleRotation_right, inner_add_left, inner_smul_left,
@@ -67,7 +67,7 @@ def rotation (θ : Real.Angle) : V ≃ₗᵢ[ℝ] V :=
       ext x
       convert congr_arg (fun t : ℝ => t • x) θ.cos_sq_add_sin_sq using 1
       · simp only [o.rightAngleRotation_rightAngleRotation, o.rotationAux_apply,
-          Function.comp_apply, id.def, LinearEquiv.coe_coe, LinearIsometry.coe_toLinearMap,
+          Function.comp_apply, id, LinearEquiv.coe_coe, LinearIsometry.coe_toLinearMap,
           LinearIsometryEquiv.coe_toLinearEquiv, map_smul, map_sub, LinearMap.coe_comp,
           LinearMap.id_coe, LinearMap.smul_apply, LinearMap.sub_apply, ← mul_smul, add_smul,
           smul_add, smul_neg, smul_sub, mul_comm, sq]
@@ -77,7 +77,7 @@ def rotation (θ : Real.Angle) : V ≃ₗᵢ[ℝ] V :=
       ext x
       convert congr_arg (fun t : ℝ => t • x) θ.cos_sq_add_sin_sq using 1
       · simp only [o.rightAngleRotation_rightAngleRotation, o.rotationAux_apply,
-          Function.comp_apply, id.def, LinearEquiv.coe_coe, LinearIsometry.coe_toLinearMap,
+          Function.comp_apply, id, LinearEquiv.coe_coe, LinearIsometry.coe_toLinearMap,
           LinearIsometryEquiv.coe_toLinearEquiv, map_add, map_smul, LinearMap.coe_comp,
           LinearMap.id_coe, LinearMap.smul_apply, LinearMap.sub_apply,
           add_smul, smul_neg, smul_sub, smul_smul]
chore: Rename IsROrC to RCLike (#10819)

IsROrC contains data, which goes against the expectation that classes prefixed with Is are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC to RCLike.

Diff
@@ -44,7 +44,7 @@ def rotationAux (θ : Real.Angle) : V →ₗᵢ[ℝ] V :=
       Real.Angle.sin θ • (LinearIsometryEquiv.toLinearEquiv J).toLinearMap)
     (by
       intro x y
-      simp only [IsROrC.conj_to_real, id.def, LinearMap.smul_apply, LinearMap.add_apply,
+      simp only [RCLike.conj_to_real, id.def, LinearMap.smul_apply, LinearMap.add_apply,
         LinearMap.id_coe, LinearEquiv.coe_coe, LinearIsometryEquiv.coe_toLinearEquiv,
         Orientation.areaForm_rightAngleRotation_left, Orientation.inner_rightAngleRotation_left,
         Orientation.inner_rightAngleRotation_right, inner_add_left, inner_smul_left,
@@ -179,7 +179,7 @@ theorem rotation_trans (θ₁ θ₂ : Real.Angle) :
 @[simp]
 theorem kahler_rotation_left (x y : V) (θ : Real.Angle) :
     o.kahler (o.rotation θ x) y = conj (θ.expMapCircle : ℂ) * o.kahler x y := by
-  -- Porting note: this needed the `Complex.conj_ofReal` instead of `IsROrC.conj_ofReal`;
+  -- Porting note: this needed the `Complex.conj_ofReal` instead of `RCLike.conj_ofReal`;
   -- I believe this is because the respective coercions are no longer defeq, and
   -- `Real.Angle.coe_expMapCircle` uses the `Complex` version.
   simp only [o.rotation_apply, map_add, map_mul, LinearMap.map_smulₛₗ, RingHom.id_apply,
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -328,7 +328,7 @@ theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero {x y : V} (hx :
   · rintro rfl
     rw [← LinearIsometryEquiv.map_smul, ← o.oangle_smul_left_of_pos x y hp, eq_comm,
       rotation_oangle_eq_iff_norm_eq, norm_smul, Real.norm_of_nonneg hp.le,
-      div_mul_cancel _ (norm_ne_zero_iff.2 hx)]
+      div_mul_cancel₀ _ (norm_ne_zero_iff.2 hx)]
   · intro hye
     rw [hye, o.oangle_smul_right_of_pos _ _ hp, o.oangle_rotation_self_right hx]
 #align orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero Orientation.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -31,11 +31,8 @@ namespace Orientation
 attribute [local instance] Complex.finrank_real_complex_fact
 
 variable {V V' : Type*}
-
 variable [NormedAddCommGroup V] [NormedAddCommGroup V']
-
 variable [InnerProductSpace ℝ V] [InnerProductSpace ℝ V']
-
 variable [Fact (finrank ℝ V = 2)] [Fact (finrank ℝ V' = 2)] (o : Orientation ℝ V (Fin 2))
 
 local notation "J" => o.rightAngleRotation
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -127,7 +127,7 @@ theorem det_rotation (θ : Real.Angle) : LinearMap.det (o.rotation θ).toLinearM
 theorem linearEquiv_det_rotation (θ : Real.Angle) :
     LinearEquiv.det (o.rotation θ).toLinearEquiv = 1 :=
   Units.ext <| by
-    -- porting note: Lean can't see through `LinearEquiv.coe_det` and needed the rewrite
+    -- Porting note: Lean can't see through `LinearEquiv.coe_det` and needed the rewrite
     -- in mathlib3 this was just `units.ext <| o.det_rotation θ`
     simpa only [LinearEquiv.coe_det, Units.val_one] using o.det_rotation θ
 #align orientation.linear_equiv_det_rotation Orientation.linearEquiv_det_rotation
@@ -182,7 +182,7 @@ theorem rotation_trans (θ₁ θ₂ : Real.Angle) :
 @[simp]
 theorem kahler_rotation_left (x y : V) (θ : Real.Angle) :
     o.kahler (o.rotation θ x) y = conj (θ.expMapCircle : ℂ) * o.kahler x y := by
-  -- porting note: this needed the `Complex.conj_ofReal` instead of `IsROrC.conj_ofReal`;
+  -- Porting note: this needed the `Complex.conj_ofReal` instead of `IsROrC.conj_ofReal`;
   -- I believe this is because the respective coercions are no longer defeq, and
   -- `Real.Angle.coe_expMapCircle` uses the `Complex` version.
   simp only [o.rotation_apply, map_add, map_mul, LinearMap.map_smulₛₗ, RingHom.id_apply,
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -128,7 +128,7 @@ theorem linearEquiv_det_rotation (θ : Real.Angle) :
     LinearEquiv.det (o.rotation θ).toLinearEquiv = 1 :=
   Units.ext <| by
     -- porting note: Lean can't see through `LinearEquiv.coe_det` and needed the rewrite
-    -- in mathlib3 this was just `units.ext $ o.det_rotation θ`
+    -- in mathlib3 this was just `units.ext <| o.det_rotation θ`
     simpa only [LinearEquiv.coe_det, Units.val_one] using o.det_rotation θ
 #align orientation.linear_equiv_det_rotation Orientation.linearEquiv_det_rotation
 
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -439,7 +439,7 @@ zero. -/
 @[simp]
 theorem inner_smul_rotation_pi_div_two_left (x : V) (r : ℝ) :
     ⟪r • o.rotation (π / 2 : ℝ) x, x⟫ = 0 := by
-  rw [inner_smul_left, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero]
+  rw [inner_smul_left, inner_rotation_pi_div_two_left, mul_zero]
 #align orientation.inner_smul_rotation_pi_div_two_left Orientation.inner_smul_rotation_pi_div_two_left
 
 /-- The inner product between a vector and a multiple of a `π / 2` rotation of that vector is
@@ -455,7 +455,7 @@ zero. -/
 @[simp]
 theorem inner_rotation_pi_div_two_left_smul (x : V) (r : ℝ) :
     ⟪o.rotation (π / 2 : ℝ) x, r • x⟫ = 0 := by
-  rw [inner_smul_right, inner_rotation_pi_div_two_left, MulZeroClass.mul_zero]
+  rw [inner_smul_right, inner_rotation_pi_div_two_left, mul_zero]
 #align orientation.inner_rotation_pi_div_two_left_smul Orientation.inner_rotation_pi_div_two_left_smul
 
 /-- The inner product between a multiple of a vector and a `π / 2` rotation of that vector is
@@ -471,7 +471,7 @@ 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 := by
-  rw [inner_smul_right, inner_smul_rotation_pi_div_two_left, MulZeroClass.mul_zero]
+  rw [inner_smul_right, inner_smul_rotation_pi_div_two_left, mul_zero]
 #align orientation.inner_smul_rotation_pi_div_two_smul_left Orientation.inner_smul_rotation_pi_div_two_smul_left
 
 /-- The inner product between a multiple of a vector and a multiple of a `π / 2` rotation of
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -30,7 +30,7 @@ namespace Orientation
 
 attribute [local instance] Complex.finrank_real_complex_fact
 
-variable {V V' : Type _}
+variable {V V' : Type*}
 
 variable [NormedAddCommGroup V] [NormedAddCommGroup V']
 
chore: fix grammar mistakes (#6121)
Diff
@@ -258,7 +258,7 @@ theorem oangle_rotation_self_right {x : V} (hx : x ≠ 0) (θ : Real.Angle) :
     o.oangle x (o.rotation θ x) = θ := by simp [hx]
 #align orientation.oangle_rotation_self_right Orientation.oangle_rotation_self_right
 
-/-- Rotating the first vector by the angle between the two vectors results an an angle of 0. -/
+/-- 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 := by
   by_cases hx : x = 0
@@ -269,7 +269,7 @@ theorem oangle_rotation_oangle_left (x y : V) : o.oangle (o.rotation (o.oangle x
 #align orientation.oangle_rotation_oangle_left Orientation.oangle_rotation_oangle_left
 
 /-- Rotating the first vector by the angle between the two vectors and swapping the vectors
-results an an angle of 0. -/
+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 := by
   rw [oangle_rev]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Joseph Myers. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers, Heather Macbeth
-
-! This file was ported from Lean 3 source module geometry.euclidean.angle.oriented.rotation
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.SpecialFunctions.Complex.Circle
 import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic
 
+#align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
+
 /-!
 # Rotations by oriented angles.
 
feat: port Geometry.Euclidean.Angle.Oriented.Rotation (#5009)

Co-authored-by: Jireh Loreaux <loreaujy@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Dependencies 12 + 928

929 files ported (98.7%)
409804 lines ported (98.6%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file