analysis.inner_product_space.orientationMathlib.Analysis.InnerProductSpace.Orientation

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -357,7 +357,7 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
   congr
   ext i
   have hb : b i = ‖v i‖⁻¹ • v i := gramSchmidtOrthonormalBasis_apply_of_orthogonal hdim hv (h i)
-  simp only [hb, inner_smul_left, real_inner_self_eq_norm_mul_norm, IsROrC.conj_to_real]
+  simp only [hb, inner_smul_left, real_inner_self_eq_norm_mul_norm, RCLike.conj_to_real]
   rw [abs_of_nonneg]
   · have : ‖v i‖ ≠ 0 := by simpa using h i
     field_simp
Diff
@@ -61,7 +61,7 @@ theorem det_to_matrix_orthonormalBasis_of_same_orientation
   apply (e.det_to_matrix_orthonormal_basis_real f).resolve_right
   have : 0 < e.to_basis.det f :=
     by
-    rw [e.to_basis.orientation_eq_iff_det_pos] at h 
+    rw [e.to_basis.orientation_eq_iff_det_pos] at h
     simpa using h
   linarith
 #align orthonormal_basis.det_to_matrix_orthonormal_basis_of_same_orientation OrthonormalBasis.det_to_matrix_orthonormalBasis_of_same_orientation
@@ -270,7 +270,7 @@ theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBas
   cases n
   ·
     classical
-    have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb 
+    have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb
     simp [volume_form, Or.by_cases, dif_neg this.symm]
   let e : OrthonormalBasis (Fin n.succ) ℝ E := o.fin_orthonormal_basis n.succ_pos (Fact.out _)
   dsimp [volume_form]
@@ -353,7 +353,7 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
   ·
     rw [Finset.prod_eq_zero (Finset.mem_univ i), Finset.prod_eq_zero (Finset.mem_univ i)] <;>
       simp [hi]
-  push_neg at h 
+  push_neg at h
   congr
   ext i
   have hb : b i = ‖v i‖⁻¹ • v i := gramSchmidtOrthonormalBasis_apply_of_orthogonal hdim hv (h i)
@@ -402,7 +402,7 @@ theorem volumeForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
   by
   convert o.volume_form_map φ (φ ∘ x)
   · symm
-    rwa [← o.map_eq_iff_det_pos φ.to_linear_equiv] at hφ 
+    rwa [← o.map_eq_iff_det_pos φ.to_linear_equiv] at hφ
     rw [_i.out, Fintype.card_fin]
   · ext
     simp
Diff
@@ -214,7 +214,12 @@ variable [_i : Fact (finrank ℝ E = n)] (o : Orientation ℝ E (Fin n))
 /-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
 alternating form uniquely defined by compatibility with the orientation and inner product structure.
 -/
-irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by classical
+irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by
+  classical
+  cases n
+  · let opos : AlternatingMap ℝ E ℝ (Fin 0) := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
+    exact o.eq_or_eq_neg_of_is_empty.by_cases (fun _ => opos) fun _ => -opos
+  · exact (o.fin_orthonormal_basis n.succ_pos _i.out).toBasis.det
 #align orientation.volume_form Orientation.volumeForm
 -/
 
@@ -247,7 +252,10 @@ respect to any orthonormal basis of the space compatible with the orientation. -
 theorem volumeForm_robust (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.Orientation = o) :
     o.volumeForm = b.toBasis.det := by
   cases n
-  · classical
+  ·
+    classical
+    have : o = positive_orientation := hb.symm.trans b.to_basis.orientation_is_empty
+    simp [volume_form, Or.by_cases, dif_pos this]
   · dsimp [volume_form]
     rw [same_orientation_iff_det_eq_det, hb]
     exact o.fin_orthonormal_basis_orientation _ _
@@ -260,7 +268,10 @@ respect to any orthonormal basis of the space compatible with the orientation. -
 theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.Orientation ≠ o) :
     o.volumeForm = -b.toBasis.det := by
   cases n
-  · classical
+  ·
+    classical
+    have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb 
+    simp [volume_form, Or.by_cases, dif_neg this.symm]
   let e : OrthonormalBasis (Fin n.succ) ℝ E := o.fin_orthonormal_basis n.succ_pos (Fact.out _)
   dsimp [volume_form]
   apply e.det_eq_neg_det_of_opposite_orientation b
Diff
@@ -214,12 +214,7 @@ variable [_i : Fact (finrank ℝ E = n)] (o : Orientation ℝ E (Fin n))
 /-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
 alternating form uniquely defined by compatibility with the orientation and inner product structure.
 -/
-irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by
-  classical
-  cases n
-  · let opos : AlternatingMap ℝ E ℝ (Fin 0) := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
-    exact o.eq_or_eq_neg_of_is_empty.by_cases (fun _ => opos) fun _ => -opos
-  · exact (o.fin_orthonormal_basis n.succ_pos _i.out).toBasis.det
+irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by classical
 #align orientation.volume_form Orientation.volumeForm
 -/
 
@@ -252,10 +247,7 @@ respect to any orthonormal basis of the space compatible with the orientation. -
 theorem volumeForm_robust (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.Orientation = o) :
     o.volumeForm = b.toBasis.det := by
   cases n
-  ·
-    classical
-    have : o = positive_orientation := hb.symm.trans b.to_basis.orientation_is_empty
-    simp [volume_form, Or.by_cases, dif_pos this]
+  · classical
   · dsimp [volume_form]
     rw [same_orientation_iff_det_eq_det, hb]
     exact o.fin_orthonormal_basis_orientation _ _
@@ -268,10 +260,7 @@ respect to any orthonormal basis of the space compatible with the orientation. -
 theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.Orientation ≠ o) :
     o.volumeForm = -b.toBasis.det := by
   cases n
-  ·
-    classical
-    have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb 
-    simp [volume_form, Or.by_cases, dif_neg this.symm]
+  · classical
   let e : OrthonormalBasis (Fin n.succ) ℝ E := o.fin_orthonormal_basis n.succ_pos (Fact.out _)
   dsimp [volume_form]
   apply e.det_eq_neg_det_of_opposite_orientation b
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.InnerProductSpace.GramSchmidtOrtho
-import Mathbin.LinearAlgebra.Orientation
+import Analysis.InnerProductSpace.GramSchmidtOrtho
+import LinearAlgebra.Orientation
 
 #align_import analysis.inner_product_space.orientation from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
 
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 analysis.inner_product_space.orientation
-! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.InnerProductSpace.GramSchmidtOrtho
 import Mathbin.LinearAlgebra.Orientation
 
+#align_import analysis.inner_product_space.orientation from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
+
 /-!
 # Orientations of real inner product spaces.
 
Diff
@@ -55,6 +55,7 @@ namespace OrthonormalBasis
 variable {ι : Type _} [Fintype ι] [DecidableEq ι] [ne : Nonempty ι] (e f : OrthonormalBasis ι ℝ E)
   (x : Orientation ℝ E ι)
 
+#print OrthonormalBasis.det_to_matrix_orthonormalBasis_of_same_orientation /-
 /-- The change-of-basis matrix between two orthonormal bases with the same orientation has
 determinant 1. -/
 theorem det_to_matrix_orthonormalBasis_of_same_orientation
@@ -67,7 +68,9 @@ theorem det_to_matrix_orthonormalBasis_of_same_orientation
     simpa using h
   linarith
 #align orthonormal_basis.det_to_matrix_orthonormal_basis_of_same_orientation OrthonormalBasis.det_to_matrix_orthonormalBasis_of_same_orientation
+-/
 
+#print OrthonormalBasis.det_to_matrix_orthonormalBasis_of_opposite_orientation /-
 /-- The change-of-basis matrix between two orthonormal bases with the opposite orientations has
 determinant -1. -/
 theorem det_to_matrix_orthonormalBasis_of_opposite_orientation
@@ -77,9 +80,11 @@ theorem det_to_matrix_orthonormalBasis_of_opposite_orientation
   simp [e.to_basis.orientation_eq_iff_det_pos,
     (e.det_to_matrix_orthonormal_basis_real f).resolve_right h]
 #align orthonormal_basis.det_to_matrix_orthonormal_basis_of_opposite_orientation OrthonormalBasis.det_to_matrix_orthonormalBasis_of_opposite_orientation
+-/
 
 variable {e f}
 
+#print OrthonormalBasis.same_orientation_iff_det_eq_det /-
 /-- Two orthonormal bases with the same orientation determine the same "determinant" top-dimensional
 form on `E`, and conversely. -/
 theorem same_orientation_iff_det_eq_det :
@@ -93,9 +98,11 @@ theorem same_orientation_iff_det_eq_det :
     rw [e.to_basis.det.eq_smul_basis_det f.to_basis]
     simp [e.det_to_matrix_orthonormal_basis_of_same_orientation f h]
 #align orthonormal_basis.same_orientation_iff_det_eq_det OrthonormalBasis.same_orientation_iff_det_eq_det
+-/
 
 variable (e f)
 
+#print OrthonormalBasis.det_eq_neg_det_of_opposite_orientation /-
 /-- Two orthonormal bases with opposite orientations determine opposite "determinant"
 top-dimensional forms on `E`. -/
 theorem det_eq_neg_det_of_opposite_orientation (h : e.toBasis.Orientation ≠ f.toBasis.Orientation) :
@@ -104,11 +111,11 @@ theorem det_eq_neg_det_of_opposite_orientation (h : e.toBasis.Orientation ≠ f.
   rw [e.to_basis.det.eq_smul_basis_det f.to_basis]
   simp [e.det_to_matrix_orthonormal_basis_of_opposite_orientation f h]
 #align orthonormal_basis.det_eq_neg_det_of_opposite_orientation OrthonormalBasis.det_eq_neg_det_of_opposite_orientation
+-/
 
 section AdjustToOrientation
 
-include ne
-
+#print OrthonormalBasis.orthonormal_adjustToOrientation /-
 /-- `orthonormal_basis.adjust_to_orientation`, applied to an orthonormal basis, preserves the
 property of orthonormality. -/
 theorem orthonormal_adjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) :=
@@ -116,6 +123,7 @@ theorem orthonormal_adjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOri
   apply e.orthonormal.orthonormal_of_forall_eq_or_eq_neg
   simpa using e.to_basis.adjust_to_orientation_apply_eq_or_eq_neg x
 #align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormal_adjustToOrientation
+-/
 
 #print OrthonormalBasis.adjustToOrientation /-
 /-- Given an orthonormal basis and an orientation, return an orthonormal basis giving that
@@ -126,11 +134,14 @@ def adjustToOrientation : OrthonormalBasis ι ℝ E :=
 #align orthonormal_basis.adjust_to_orientation OrthonormalBasis.adjustToOrientation
 -/
 
+#print OrthonormalBasis.toBasis_adjustToOrientation /-
 theorem toBasis_adjustToOrientation :
     (e.adjustToOrientation x).toBasis = e.toBasis.adjustToOrientation x :=
   (e.toBasis.adjustToOrientation x).toBasis_toOrthonormalBasis _
 #align orthonormal_basis.to_basis_adjust_to_orientation OrthonormalBasis.toBasis_adjustToOrientation
+-/
 
+#print OrthonormalBasis.orientation_adjustToOrientation /-
 /-- `adjust_to_orientation` gives an orthonormal basis with the required orientation. -/
 @[simp]
 theorem orientation_adjustToOrientation : (e.adjustToOrientation x).toBasis.Orientation = x :=
@@ -138,7 +149,9 @@ theorem orientation_adjustToOrientation : (e.adjustToOrientation x).toBasis.Orie
   rw [e.to_basis_adjust_to_orientation]
   exact e.to_basis.orientation_adjust_to_orientation x
 #align orthonormal_basis.orientation_adjust_to_orientation OrthonormalBasis.orientation_adjustToOrientation
+-/
 
+#print OrthonormalBasis.adjustToOrientation_apply_eq_or_eq_neg /-
 /-- Every basis vector from `adjust_to_orientation` is either that from the original basis or its
 negation. -/
 theorem adjustToOrientation_apply_eq_or_eq_neg (i : ι) :
@@ -146,17 +159,22 @@ theorem adjustToOrientation_apply_eq_or_eq_neg (i : ι) :
   simpa [← e.to_basis_adjust_to_orientation] using
     e.to_basis.adjust_to_orientation_apply_eq_or_eq_neg x i
 #align orthonormal_basis.adjust_to_orientation_apply_eq_or_eq_neg OrthonormalBasis.adjustToOrientation_apply_eq_or_eq_neg
+-/
 
+#print OrthonormalBasis.det_adjustToOrientation /-
 theorem det_adjustToOrientation :
     (e.adjustToOrientation x).toBasis.det = e.toBasis.det ∨
       (e.adjustToOrientation x).toBasis.det = -e.toBasis.det :=
   by simpa using e.to_basis.det_adjust_to_orientation x
 #align orthonormal_basis.det_adjust_to_orientation OrthonormalBasis.det_adjustToOrientation
+-/
 
+#print OrthonormalBasis.abs_det_adjustToOrientation /-
 theorem abs_det_adjustToOrientation (v : ι → E) :
     |(e.adjustToOrientation x).toBasis.det v| = |e.toBasis.det v| := by
   simp [to_basis_adjust_to_orientation]
 #align orthonormal_basis.abs_det_adjust_to_orientation OrthonormalBasis.abs_det_adjustToOrientation
+-/
 
 end AdjustToOrientation
 
@@ -179,6 +197,7 @@ protected def finOrthonormalBasis (hn : 0 < n) (h : finrank ℝ E = n) (x : Orie
 #align orientation.fin_orthonormal_basis Orientation.finOrthonormalBasis
 -/
 
+#print Orientation.finOrthonormalBasis_orientation /-
 /-- `orientation.fin_orthonormal_basis` gives a basis with the required orientation. -/
 @[simp]
 theorem finOrthonormalBasis_orientation (hn : 0 < n) (h : finrank ℝ E = n)
@@ -188,13 +207,12 @@ theorem finOrthonormalBasis_orientation (hn : 0 < n) (h : finrank ℝ E = n)
   haveI := finite_dimensional_of_finrank (h.symm ▸ hn : 0 < finrank ℝ E)
   exact ((stdOrthonormalBasis _ _).reindex <| finCongr h).orientation_adjustToOrientation x
 #align orientation.fin_orthonormal_basis_orientation Orientation.finOrthonormalBasis_orientation
+-/
 
 section VolumeForm
 
 variable [_i : Fact (finrank ℝ E = n)] (o : Orientation ℝ E (Fin n))
 
-include _i o
-
 #print Orientation.volumeForm /-
 /-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
 alternating form uniquely defined by compatibility with the orientation and inner product structure.
@@ -208,15 +226,16 @@ irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by
 #align orientation.volume_form Orientation.volumeForm
 -/
 
-omit _i o
-
+#print Orientation.volumeForm_zero_pos /-
 @[simp]
 theorem volumeForm_zero_pos [_i : Fact (finrank ℝ E = 0)] :
     Orientation.volumeForm (positiveOrientation : Orientation ℝ E (Fin 0)) =
       AlternatingMap.constLinearEquivOfIsEmpty 1 :=
   by simp [volume_form, Or.by_cases, if_pos]
 #align orientation.volume_form_zero_pos Orientation.volumeForm_zero_pos
+-/
 
+#print Orientation.volumeForm_zero_neg /-
 theorem volumeForm_zero_neg [_i : Fact (finrank ℝ E = 0)] :
     Orientation.volumeForm (-positiveOrientation : Orientation ℝ E (Fin 0)) =
       -AlternatingMap.constLinearEquivOfIsEmpty 1 :=
@@ -228,9 +247,9 @@ theorem volumeForm_zero_neg [_i : Fact (finrank ℝ E = 0)] :
   simpa using
     congr_arg alternating_map.const_linear_equiv_of_is_empty.symm (eq_zero_of_sameRay_self_neg h)
 #align orientation.volume_form_zero_neg Orientation.volumeForm_zero_neg
+-/
 
-include _i o
-
+#print Orientation.volumeForm_robust /-
 /-- The volume form on an oriented real inner product space can be evaluated as the determinant with
 respect to any orthonormal basis of the space compatible with the orientation. -/
 theorem volumeForm_robust (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.Orientation = o) :
@@ -244,7 +263,9 @@ theorem volumeForm_robust (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.O
     rw [same_orientation_iff_det_eq_det, hb]
     exact o.fin_orthonormal_basis_orientation _ _
 #align orientation.volume_form_robust Orientation.volumeForm_robust
+-/
 
+#print Orientation.volumeForm_robust_neg /-
 /-- The volume form on an oriented real inner product space can be evaluated as the determinant with
 respect to any orthonormal basis of the space compatible with the orientation. -/
 theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.Orientation ≠ o) :
@@ -260,7 +281,9 @@ theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBas
   convert hb.symm
   exact o.fin_orthonormal_basis_orientation _ _
 #align orientation.volume_form_robust_neg Orientation.volumeForm_robust_neg
+-/
 
+#print Orientation.volumeForm_neg_orientation /-
 @[simp]
 theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm :=
   by
@@ -273,7 +296,9 @@ theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm :=
     rw [e.to_basis.orientation_ne_iff_eq_neg, h₁]
   rw [o.volume_form_robust e h₁, (-o).volumeForm_robust_neg e h₂]
 #align orientation.volume_form_neg_orientation Orientation.volumeForm_neg_orientation
+-/
 
+#print Orientation.volumeForm_robust' /-
 theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E) :
     |o.volumeForm v| = |b.toBasis.det v| := by
   cases n
@@ -282,7 +307,9 @@ theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E
     rw [o.volume_form_robust (b.adjust_to_orientation o) (b.orientation_adjust_to_orientation o),
       b.abs_det_adjust_to_orientation]
 #align orientation.volume_form_robust' Orientation.volumeForm_robust'
+-/
 
+#print Orientation.abs_volumeForm_apply_le /-
 /-- Let `v` be an indexed family of `n` vectors in an oriented `n`-dimensional real inner
 product space `E`. The output of the volume form of `E` when evaluated on `v` is bounded in absolute
 value by the product of the norms of the vectors `v i`. -/
@@ -302,11 +329,15 @@ theorem abs_volumeForm_apply_le (v : Fin n → E) : |o.volumeForm v| ≤ ∏ i :
   convert abs_real_inner_le_norm (b i) (v i)
   simp [b.orthonormal.1 i]
 #align orientation.abs_volume_form_apply_le Orientation.abs_volumeForm_apply_le
+-/
 
+#print Orientation.volumeForm_apply_le /-
 theorem volumeForm_apply_le (v : Fin n → E) : o.volumeForm v ≤ ∏ i : Fin n, ‖v i‖ :=
   (le_abs_self _).trans (o.abs_volumeForm_apply_le v)
 #align orientation.volume_form_apply_le Orientation.volumeForm_apply_le
+-/
 
+#print Orientation.abs_volumeForm_apply_of_pairwise_orthogonal /-
 /-- Let `v` be an indexed family of `n` orthogonal vectors in an oriented `n`-dimensional
 real inner product space `E`. The output of the volume form of `E` when evaluated on `v` is, up to
 sign, the product of the norms of the vectors `v i`. -/
@@ -335,13 +366,16 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
     field_simp
   · positivity
 #align orientation.abs_volume_form_apply_of_pairwise_orthogonal Orientation.abs_volumeForm_apply_of_pairwise_orthogonal
+-/
 
+#print Orientation.abs_volumeForm_apply_of_orthonormal /-
 /-- The output of the volume form of an oriented real inner product space `E` when evaluated on an
 orthonormal basis is ±1. -/
 theorem abs_volumeForm_apply_of_orthonormal (v : OrthonormalBasis (Fin n) ℝ E) :
     |o.volumeForm v| = 1 := by
   simpa [o.volume_form_robust' v v] using congr_arg abs v.to_basis.det_self
 #align orientation.abs_volume_form_apply_of_orthonormal Orientation.abs_volumeForm_apply_of_orthonormal
+-/
 
 #print Orientation.volumeForm_map /-
 theorem volumeForm_map {F : Type _} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
@@ -363,6 +397,7 @@ theorem volumeForm_map {F : Type _} [NormedAddCommGroup F] [InnerProductSpace 
 #align orientation.volume_form_map Orientation.volumeForm_map
 -/
 
+#print Orientation.volumeForm_comp_linearIsometryEquiv /-
 /-- The volume form is invariant under pullback by a positively-oriented isometric automorphism. -/
 theorem volumeForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
     (hφ : 0 < (φ.toLinearEquiv : E →ₗ[ℝ] E).det) (x : Fin n → E) :
@@ -375,6 +410,7 @@ theorem volumeForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
   · ext
     simp
 #align orientation.volume_form_comp_linear_isometry_equiv Orientation.volumeForm_comp_linearIsometryEquiv
+-/
 
 end VolumeForm
 
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 analysis.inner_product_space.orientation
-! leanprover-community/mathlib commit bd65478311e4dfd41f48bf38c7e3b02fb75d0163
+! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.LinearAlgebra.Orientation
 /-!
 # Orientations of real inner product spaces.
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file provides definitions and proves lemmas about orientations of real inner product spaces.
 
 ## Main definitions
@@ -114,12 +117,14 @@ theorem orthonormal_adjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOri
   simpa using e.to_basis.adjust_to_orientation_apply_eq_or_eq_neg x
 #align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormal_adjustToOrientation
 
+#print OrthonormalBasis.adjustToOrientation /-
 /-- Given an orthonormal basis and an orientation, return an orthonormal basis giving that
 orientation: either the original basis, or one constructed by negating a single (arbitrary) basis
 vector. -/
 def adjustToOrientation : OrthonormalBasis ι ℝ E :=
   (e.toBasis.adjustToOrientation x).toOrthonormalBasis (e.orthonormal_adjustToOrientation x)
 #align orthonormal_basis.adjust_to_orientation OrthonormalBasis.adjustToOrientation
+-/
 
 theorem toBasis_adjustToOrientation :
     (e.adjustToOrientation x).toBasis = e.toBasis.adjustToOrientation x :=
@@ -163,6 +168,7 @@ variable {n : ℕ}
 
 open OrthonormalBasis
 
+#print Orientation.finOrthonormalBasis /-
 /-- An orthonormal basis, indexed by `fin n`, with the given orientation. -/
 protected def finOrthonormalBasis (hn : 0 < n) (h : finrank ℝ E = n) (x : Orientation ℝ E (Fin n)) :
     OrthonormalBasis (Fin n) ℝ E :=
@@ -171,6 +177,7 @@ protected def finOrthonormalBasis (hn : 0 < n) (h : finrank ℝ E = n) (x : Orie
   haveI := finite_dimensional_of_finrank (h.symm ▸ hn : 0 < finrank ℝ E)
   exact ((stdOrthonormalBasis _ _).reindex <| finCongr h).adjustToOrientation x
 #align orientation.fin_orthonormal_basis Orientation.finOrthonormalBasis
+-/
 
 /-- `orientation.fin_orthonormal_basis` gives a basis with the required orientation. -/
 @[simp]
@@ -188,16 +195,18 @@ variable [_i : Fact (finrank ℝ E = n)] (o : Orientation ℝ E (Fin n))
 
 include _i o
 
+#print Orientation.volumeForm /-
 /-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
 alternating form uniquely defined by compatibility with the orientation and inner product structure.
 -/
 irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by
   classical
-    cases n
-    · let opos : AlternatingMap ℝ E ℝ (Fin 0) := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
-      exact o.eq_or_eq_neg_of_is_empty.by_cases (fun _ => opos) fun _ => -opos
-    · exact (o.fin_orthonormal_basis n.succ_pos _i.out).toBasis.det
+  cases n
+  · let opos : AlternatingMap ℝ E ℝ (Fin 0) := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
+    exact o.eq_or_eq_neg_of_is_empty.by_cases (fun _ => opos) fun _ => -opos
+  · exact (o.fin_orthonormal_basis n.succ_pos _i.out).toBasis.det
 #align orientation.volume_form Orientation.volumeForm
+-/
 
 omit _i o
 
@@ -229,8 +238,8 @@ theorem volumeForm_robust (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.O
   cases n
   ·
     classical
-      have : o = positive_orientation := hb.symm.trans b.to_basis.orientation_is_empty
-      simp [volume_form, Or.by_cases, dif_pos this]
+    have : o = positive_orientation := hb.symm.trans b.to_basis.orientation_is_empty
+    simp [volume_form, Or.by_cases, dif_pos this]
   · dsimp [volume_form]
     rw [same_orientation_iff_det_eq_det, hb]
     exact o.fin_orthonormal_basis_orientation _ _
@@ -243,8 +252,8 @@ theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBas
   cases n
   ·
     classical
-      have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb 
-      simp [volume_form, Or.by_cases, dif_neg this.symm]
+    have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb 
+    simp [volume_form, Or.by_cases, dif_neg this.symm]
   let e : OrthonormalBasis (Fin n.succ) ℝ E := o.fin_orthonormal_basis n.succ_pos (Fact.out _)
   dsimp [volume_form]
   apply e.det_eq_neg_det_of_opposite_orientation b
@@ -316,7 +325,7 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
   ·
     rw [Finset.prod_eq_zero (Finset.mem_univ i), Finset.prod_eq_zero (Finset.mem_univ i)] <;>
       simp [hi]
-  push_neg  at h 
+  push_neg at h 
   congr
   ext i
   have hb : b i = ‖v i‖⁻¹ • v i := gramSchmidtOrthonormalBasis_apply_of_orthogonal hdim hv (h i)
@@ -334,6 +343,7 @@ theorem abs_volumeForm_apply_of_orthonormal (v : OrthonormalBasis (Fin n) ℝ E)
   simpa [o.volume_form_robust' v v] using congr_arg abs v.to_basis.det_self
 #align orientation.abs_volume_form_apply_of_orthonormal Orientation.abs_volumeForm_apply_of_orthonormal
 
+#print Orientation.volumeForm_map /-
 theorem volumeForm_map {F : Type _} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
     [Fact (finrank ℝ F = n)] (φ : E ≃ₗᵢ[ℝ] F) (x : Fin n → F) :
     (Orientation.map (Fin n) φ.toLinearEquiv o).volumeForm x = o.volumeForm (φ.symm ∘ x) :=
@@ -351,6 +361,7 @@ theorem volumeForm_map {F : Type _} [NormedAddCommGroup F] [InnerProductSpace 
   rw [o.volume_form_robust e he]
   simp
 #align orientation.volume_form_map Orientation.volumeForm_map
+-/
 
 /-- The volume form is invariant under pullback by a positively-oriented isometric automorphism. -/
 theorem volumeForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
Diff
@@ -60,7 +60,7 @@ theorem det_to_matrix_orthonormalBasis_of_same_orientation
   apply (e.det_to_matrix_orthonormal_basis_real f).resolve_right
   have : 0 < e.to_basis.det f :=
     by
-    rw [e.to_basis.orientation_eq_iff_det_pos] at h
+    rw [e.to_basis.orientation_eq_iff_det_pos] at h 
     simpa using h
   linarith
 #align orthonormal_basis.det_to_matrix_orthonormal_basis_of_same_orientation OrthonormalBasis.det_to_matrix_orthonormalBasis_of_same_orientation
@@ -243,7 +243,7 @@ theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBas
   cases n
   ·
     classical
-      have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb
+      have : positive_orientation ≠ o := by rwa [b.to_basis.orientation_is_empty] at hb 
       simp [volume_form, Or.by_cases, dif_neg this.symm]
   let e : OrthonormalBasis (Fin n.succ) ℝ E := o.fin_orthonormal_basis n.succ_pos (Fact.out _)
   dsimp [volume_form]
@@ -316,7 +316,7 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
   ·
     rw [Finset.prod_eq_zero (Finset.mem_univ i), Finset.prod_eq_zero (Finset.mem_univ i)] <;>
       simp [hi]
-  push_neg  at h
+  push_neg  at h 
   congr
   ext i
   have hb : b i = ‖v i‖⁻¹ • v i := gramSchmidtOrthonormalBasis_apply_of_orthogonal hdim hv (h i)
@@ -359,7 +359,7 @@ theorem volumeForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
   by
   convert o.volume_form_map φ (φ ∘ x)
   · symm
-    rwa [← o.map_eq_iff_det_pos φ.to_linear_equiv] at hφ
+    rwa [← o.map_eq_iff_det_pos φ.to_linear_equiv] at hφ 
     rw [_i.out, Fintype.card_fin]
   · ext
     simp
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 analysis.inner_product_space.orientation
-! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
+! leanprover-community/mathlib commit bd65478311e4dfd41f48bf38c7e3b02fb75d0163
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -194,7 +194,7 @@ alternating form uniquely defined by compatibility with the orientation and inne
 irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by
   classical
     cases n
-    · let opos : AlternatingMap ℝ E ℝ (Fin 0) := AlternatingMap.constOfIsEmpty ℝ E (1 : ℝ)
+    · let opos : AlternatingMap ℝ E ℝ (Fin 0) := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
       exact o.eq_or_eq_neg_of_is_empty.by_cases (fun _ => opos) fun _ => -opos
     · exact (o.fin_orthonormal_basis n.succ_pos _i.out).toBasis.det
 #align orientation.volume_form Orientation.volumeForm
Diff
@@ -45,7 +45,7 @@ variable {E : Type _} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
 
 open FiniteDimensional
 
-open BigOperators RealInnerProductSpace
+open scoped BigOperators RealInnerProductSpace
 
 namespace OrthonormalBasis
 
Diff
@@ -108,17 +108,17 @@ include ne
 
 /-- `orthonormal_basis.adjust_to_orientation`, applied to an orthonormal basis, preserves the
 property of orthonormality. -/
-theorem orthonormalAdjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) :=
+theorem orthonormal_adjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) :=
   by
   apply e.orthonormal.orthonormal_of_forall_eq_or_eq_neg
   simpa using e.to_basis.adjust_to_orientation_apply_eq_or_eq_neg x
-#align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormalAdjustToOrientation
+#align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormal_adjustToOrientation
 
 /-- Given an orthonormal basis and an orientation, return an orthonormal basis giving that
 orientation: either the original basis, or one constructed by negating a single (arbitrary) basis
 vector. -/
 def adjustToOrientation : OrthonormalBasis ι ℝ E :=
-  (e.toBasis.adjustToOrientation x).toOrthonormalBasis (e.orthonormalAdjustToOrientation x)
+  (e.toBasis.adjustToOrientation x).toOrthonormalBasis (e.orthonormal_adjustToOrientation x)
 #align orthonormal_basis.adjust_to_orientation OrthonormalBasis.adjustToOrientation
 
 theorem toBasis_adjustToOrientation :
Diff
@@ -108,17 +108,17 @@ include ne
 
 /-- `orthonormal_basis.adjust_to_orientation`, applied to an orthonormal basis, preserves the
 property of orthonormality. -/
-theorem orthonormal_adjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) :=
+theorem orthonormalAdjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) :=
   by
   apply e.orthonormal.orthonormal_of_forall_eq_or_eq_neg
   simpa using e.to_basis.adjust_to_orientation_apply_eq_or_eq_neg x
-#align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormal_adjustToOrientation
+#align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormalAdjustToOrientation
 
 /-- Given an orthonormal basis and an orientation, return an orthonormal basis giving that
 orientation: either the original basis, or one constructed by negating a single (arbitrary) basis
 vector. -/
 def adjustToOrientation : OrthonormalBasis ι ℝ E :=
-  (e.toBasis.adjustToOrientation x).toOrthonormalBasis (e.orthonormal_adjustToOrientation x)
+  (e.toBasis.adjustToOrientation x).toOrthonormalBasis (e.orthonormalAdjustToOrientation x)
 #align orthonormal_basis.adjust_to_orientation OrthonormalBasis.adjustToOrientation
 
 theorem toBasis_adjustToOrientation :
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 analysis.inner_product_space.orientation
-! leanprover-community/mathlib commit 6623e6af705e97002a9054c1c05a980180276fc1
+! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -41,7 +41,7 @@ This file provides definitions and proves lemmas about orientations of real inne
 
 noncomputable section
 
-variable {E : Type _} [InnerProductSpace ℝ E]
+variable {E : Type _} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
 
 open FiniteDimensional
 
@@ -334,8 +334,8 @@ theorem abs_volumeForm_apply_of_orthonormal (v : OrthonormalBasis (Fin n) ℝ E)
   simpa [o.volume_form_robust' v v] using congr_arg abs v.to_basis.det_self
 #align orientation.abs_volume_form_apply_of_orthonormal Orientation.abs_volumeForm_apply_of_orthonormal
 
-theorem volumeForm_map {F : Type _} [InnerProductSpace ℝ F] [Fact (finrank ℝ F = n)]
-    (φ : E ≃ₗᵢ[ℝ] F) (x : Fin n → F) :
+theorem volumeForm_map {F : Type _} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
+    [Fact (finrank ℝ F = n)] (φ : E ≃ₗᵢ[ℝ] F) (x : Fin n → F) :
     (Orientation.map (Fin n) φ.toLinearEquiv o).volumeForm x = o.volumeForm (φ.symm ∘ x) :=
   by
   cases n
Diff
@@ -108,17 +108,17 @@ include ne
 
 /-- `orthonormal_basis.adjust_to_orientation`, applied to an orthonormal basis, preserves the
 property of orthonormality. -/
-theorem orthonormalAdjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) :=
+theorem orthonormal_adjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) :=
   by
   apply e.orthonormal.orthonormal_of_forall_eq_or_eq_neg
   simpa using e.to_basis.adjust_to_orientation_apply_eq_or_eq_neg x
-#align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormalAdjustToOrientation
+#align orthonormal_basis.orthonormal_adjust_to_orientation OrthonormalBasis.orthonormal_adjustToOrientation
 
 /-- Given an orthonormal basis and an orientation, return an orthonormal basis giving that
 orientation: either the original basis, or one constructed by negating a single (arbitrary) basis
 vector. -/
 def adjustToOrientation : OrthonormalBasis ι ℝ E :=
-  (e.toBasis.adjustToOrientation x).toOrthonormalBasis (e.orthonormalAdjustToOrientation x)
+  (e.toBasis.adjustToOrientation x).toOrthonormalBasis (e.orthonormal_adjustToOrientation x)
 #align orthonormal_basis.adjust_to_orientation OrthonormalBasis.adjustToOrientation
 
 theorem toBasis_adjustToOrientation :
Diff
@@ -214,7 +214,7 @@ theorem volumeForm_zero_neg [_i : Fact (finrank ℝ E = 0)] :
   by
   dsimp [volume_form, Or.by_cases, positive_orientation]
   apply if_neg
-  rw [ray_eq_iff, sameRay_comm]
+  rw [ray_eq_iff, SameRay.sameRay_comm]
   intro h
   simpa using
     congr_arg alternating_map.const_linear_equiv_of_is_empty.symm (eq_zero_of_sameRay_self_neg h)

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 2 (#12361)

A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -292,8 +292,8 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
   have hb : b.toBasis.det v = ∏ i, ⟪b i, v i⟫ := gramSchmidtOrthonormalBasis_det hdim v
   rw [o.volumeForm_robust' b, hb, Finset.abs_prod]
   by_cases h : ∃ i, v i = 0
-  obtain ⟨i, hi⟩ := h
-  · rw [Finset.prod_eq_zero (Finset.mem_univ i), Finset.prod_eq_zero (Finset.mem_univ i)] <;>
+  · obtain ⟨i, hi⟩ := h
+    rw [Finset.prod_eq_zero (Finset.mem_univ i), Finset.prod_eq_zero (Finset.mem_univ i)] <;>
       simp [hi]
   push_neg at h
   congr
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
@@ -299,7 +299,7 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
   congr
   ext i
   have hb : b i = ‖v i‖⁻¹ • v i := gramSchmidtOrthonormalBasis_apply_of_orthogonal hdim hv (h i)
-  simp only [hb, inner_smul_left, real_inner_self_eq_norm_mul_norm, IsROrC.conj_to_real]
+  simp only [hb, inner_smul_left, real_inner_self_eq_norm_mul_norm, RCLike.conj_to_real]
   rw [abs_of_nonneg]
   · field_simp
   · positivity
fix: denote alternating map by ⋀, not Λ (#11064)

That is, \bigwedge, not \Lambda

Co-authored-by: Richard Copley <rcopley@gmail.com> Co-authored-by: Patrick Massot <patrickmassot@free.fr>

Diff
@@ -93,7 +93,7 @@ theorem det_eq_neg_det_of_opposite_orientation (h : e.toBasis.orientation ≠ f.
   rw [e.toBasis.det.eq_smul_basis_det f.toBasis]
   -- Porting note: added `neg_one_smul` with explicit type
   simp [e.det_to_matrix_orthonormalBasis_of_opposite_orientation f h,
-    neg_one_smul ℝ (M := E [Λ^ι]→ₗ[ℝ] ℝ)]
+    neg_one_smul ℝ (M := E [⋀^ι]→ₗ[ℝ] ℝ)]
 #align orthonormal_basis.det_eq_neg_det_of_opposite_orientation OrthonormalBasis.det_eq_neg_det_of_opposite_orientation
 
 section AdjustToOrientation
@@ -178,10 +178,10 @@ variable [_i : Fact (finrank ℝ E = n)] (o : Orientation ℝ E (Fin n))
 /-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
 alternating form uniquely defined by compatibility with the orientation and inner product structure.
 -/
-irreducible_def volumeForm : E [Λ^Fin n]→ₗ[ℝ] ℝ := by
+irreducible_def volumeForm : E [⋀^Fin n]→ₗ[ℝ] ℝ := by
   classical
     cases' n with n
-    · let opos : E [Λ^Fin 0]→ₗ[ℝ] ℝ := .constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
+    · let opos : E [⋀^Fin 0]→ₗ[ℝ] ℝ := .constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
       exact o.eq_or_eq_neg_of_isEmpty.by_cases (fun _ => opos) fun _ => -opos
     · exact (o.finOrthonormalBasis n.succ_pos _i.out).toBasis.det
 #align orientation.volume_form Orientation.volumeForm
chore(FiniteDimensional): rename lemmas (#10188)

Rename lemmas to enable new-style dot notation or drop repeating FiniteDimensional.finiteDimensional_*. Restore old names as deprecated aliases.

Diff
@@ -157,7 +157,7 @@ open OrthonormalBasis
 protected def finOrthonormalBasis (hn : 0 < n) (h : finrank ℝ E = n) (x : Orientation ℝ E (Fin n)) :
     OrthonormalBasis (Fin n) ℝ E := by
   haveI := Fin.pos_iff_nonempty.1 hn
-  haveI := finiteDimensional_of_finrank (h.symm ▸ hn : 0 < finrank ℝ E)
+  haveI : FiniteDimensional ℝ E := .of_finrank_pos <| h.symm ▸ hn
   exact ((@stdOrthonormalBasis _ _ _ _ _ this).reindex <| finCongr h).adjustToOrientation x
 #align orientation.fin_orthonormal_basis Orientation.finOrthonormalBasis
 
@@ -166,7 +166,7 @@ protected def finOrthonormalBasis (hn : 0 < n) (h : finrank ℝ E = n) (x : Orie
 theorem finOrthonormalBasis_orientation (hn : 0 < n) (h : finrank ℝ E = n)
     (x : Orientation ℝ E (Fin n)) : (x.finOrthonormalBasis hn h).toBasis.orientation = x := by
   haveI := Fin.pos_iff_nonempty.1 hn
-  haveI := finiteDimensional_of_finrank (h.symm ▸ hn : 0 < finrank ℝ E)
+  haveI : FiniteDimensional ℝ E := .of_finrank_pos <| h.symm ▸ hn
   exact ((@stdOrthonormalBasis _ _ _ _ _ this).reindex <|
     finCongr h).orientation_adjustToOrientation x
 #align orientation.fin_orthonormal_basis_orientation Orientation.finOrthonormalBasis_orientation
@@ -262,7 +262,7 @@ value by the product of the norms of the vectors `v i`. -/
 theorem abs_volumeForm_apply_le (v : Fin n → E) : |o.volumeForm v| ≤ ∏ i : Fin n, ‖v i‖ := by
   cases' n with n
   · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl <;> simp
-  haveI : FiniteDimensional ℝ E := fact_finiteDimensional_of_finrank_eq_succ n
+  haveI : FiniteDimensional ℝ E := .of_fact_finrank_eq_succ n
   have : finrank ℝ E = Fintype.card (Fin n.succ) := by simpa using _i.out
   let b : OrthonormalBasis (Fin n.succ) ℝ E := gramSchmidtOrthonormalBasis this v
   have hb : b.toBasis.det v = ∏ i, ⟪b i, v i⟫ := gramSchmidtOrthonormalBasis_det this v
@@ -286,7 +286,7 @@ theorem abs_volumeForm_apply_of_pairwise_orthogonal {v : Fin n → E}
     (hv : Pairwise fun i j => ⟪v i, v j⟫ = 0) : |o.volumeForm v| = ∏ i : Fin n, ‖v i‖ := by
   cases' n with n
   · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl <;> simp
-  haveI : FiniteDimensional ℝ E := fact_finiteDimensional_of_finrank_eq_succ n
+  haveI : FiniteDimensional ℝ E := .of_fact_finrank_eq_succ n
   have hdim : finrank ℝ E = Fintype.card (Fin n.succ) := by simpa using _i.out
   let b : OrthonormalBasis (Fin n.succ) ℝ E := gramSchmidtOrthonormalBasis hdim v
   have hb : b.toBasis.det v = ∏ i, ⟪b i, v i⟫ := gramSchmidtOrthonormalBasis_det hdim v
@@ -334,7 +334,7 @@ theorem volumeForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
     o.volumeForm (φ ∘ x) = o.volumeForm x := by
   cases' n with n -- Porting note: need to explicitly prove `FiniteDimensional ℝ E`
   · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl <;> simp
-  haveI : FiniteDimensional ℝ E := fact_finiteDimensional_of_finrank_eq_succ n
+  haveI : FiniteDimensional ℝ E := .of_fact_finrank_eq_succ n
   convert o.volumeForm_map φ (φ ∘ x)
   · symm
     rwa [← o.map_eq_iff_det_pos φ.toLinearEquiv] at hφ
chore: introduce notation for AlternatingMap (#8697)

Use M [Λ^ι]→ₗ[R] N for AlternatingMap R M N ι, similarly to the existing notation M [Λ^ι]→L[R] N for ContinuousAlternatingMap R M N ι.

Diff
@@ -93,7 +93,7 @@ theorem det_eq_neg_det_of_opposite_orientation (h : e.toBasis.orientation ≠ f.
   rw [e.toBasis.det.eq_smul_basis_det f.toBasis]
   -- Porting note: added `neg_one_smul` with explicit type
   simp [e.det_to_matrix_orthonormalBasis_of_opposite_orientation f h,
-    neg_one_smul ℝ (M := AlternatingMap ℝ E ℝ ι)]
+    neg_one_smul ℝ (M := E [Λ^ι]→ₗ[ℝ] ℝ)]
 #align orthonormal_basis.det_eq_neg_det_of_opposite_orientation OrthonormalBasis.det_eq_neg_det_of_opposite_orientation
 
 section AdjustToOrientation
@@ -178,10 +178,10 @@ variable [_i : Fact (finrank ℝ E = n)] (o : Orientation ℝ E (Fin n))
 /-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
 alternating form uniquely defined by compatibility with the orientation and inner product structure.
 -/
-irreducible_def volumeForm : AlternatingMap ℝ E ℝ (Fin n) := by
+irreducible_def volumeForm : E [Λ^Fin n]→ₗ[ℝ] ℝ := by
   classical
     cases' n with n
-    · let opos : AlternatingMap ℝ E ℝ (Fin 0) := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
+    · let opos : E [Λ^Fin 0]→ₗ[ℝ] ℝ := .constOfIsEmpty ℝ E (Fin 0) (1 : ℝ)
       exact o.eq_or_eq_neg_of_isEmpty.by_cases (fun _ => opos) fun _ => -opos
     · exact (o.finOrthonormalBasis n.succ_pos _i.out).toBasis.det
 #align orientation.volume_form Orientation.volumeForm
chore: tidy various files (#7009)
Diff
@@ -175,9 +175,6 @@ section VolumeForm
 
 variable [_i : Fact (finrank ℝ E = n)] (o : Orientation ℝ E (Fin n))
 
--- Porting note: added instance
-instance : IsEmpty (Fin Nat.zero) := by simp only [Nat.zero_eq]; infer_instance
-
 /-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
 alternating form uniquely defined by compatibility with the orientation and inner product structure.
 -/
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
@@ -38,7 +38,7 @@ This file provides definitions and proves lemmas about orientations of real inne
 
 noncomputable section
 
-variable {E : Type _} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
+variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
 
 open FiniteDimensional
 
@@ -46,7 +46,7 @@ open scoped BigOperators RealInnerProductSpace
 
 namespace OrthonormalBasis
 
-variable {ι : Type _} [Fintype ι] [DecidableEq ι] [ne : Nonempty ι] (e f : OrthonormalBasis ι ℝ E)
+variable {ι : Type*} [Fintype ι] [DecidableEq ι] [ne : Nonempty ι] (e f : OrthonormalBasis ι ℝ E)
   (x : Orientation ℝ E ι)
 
 /-- The change-of-basis matrix between two orthonormal bases with the same orientation has
@@ -315,7 +315,7 @@ theorem abs_volumeForm_apply_of_orthonormal (v : OrthonormalBasis (Fin n) ℝ E)
   simpa [o.volumeForm_robust' v v] using congr_arg abs v.toBasis.det_self
 #align orientation.abs_volume_form_apply_of_orthonormal Orientation.abs_volumeForm_apply_of_orthonormal
 
-theorem volumeForm_map {F : Type _} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
+theorem volumeForm_map {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
     [Fact (finrank ℝ F = n)] (φ : E ≃ₗᵢ[ℝ] F) (x : Fin n → F) :
     (Orientation.map (Fin n) φ.toLinearEquiv o).volumeForm x = o.volumeForm (φ.symm ∘ x) := by
   cases' n with n
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 analysis.inner_product_space.orientation
-! leanprover-community/mathlib commit bd65478311e4dfd41f48bf38c7e3b02fb75d0163
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho
 import Mathlib.LinearAlgebra.Orientation
 
+#align_import analysis.inner_product_space.orientation from "leanprover-community/mathlib"@"bd65478311e4dfd41f48bf38c7e3b02fb75d0163"
+
 /-!
 # Orientations of real inner product spaces.
 
feat: port Analysis.InnerProductSpace.Orientation (#4503)

Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Dependencies 12 + 912

913 files ported (98.7%)
404897 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