analysis.inner_product_space.orientation
⟷
Mathlib.Analysis.InnerProductSpace.Orientation
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -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"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -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.
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -45,7 +45,7 @@ variable {E : Type _} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
open FiniteDimensional
-open BigOperators RealInnerProductSpace
+open scoped BigOperators RealInnerProductSpace
namespace OrthonormalBasis
mathlib commit https://github.com/leanprover-community/mathlib/commit/ef95945cd48c932c9e034872bd25c3c220d9c946
@@ -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 :
mathlib commit https://github.com/leanprover-community/mathlib/commit/2f8347015b12b0864dfaf366ec4909eb70c78740
@@ -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 :
mathlib commit https://github.com/leanprover-community/mathlib/commit/55d771df074d0dd020139ee1cd4b95521422df9f
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/2af0836443b4cfb5feda0df0051acdb398304931
@@ -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 :
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -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
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
.
@@ -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
@@ -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
Rename lemmas to enable new-style dot notation or drop repeating FiniteDimensional.finiteDimensional_*
.
Restore old names as deprecated aliases.
@@ -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φ
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 ι
.
@@ -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
@@ -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.
-/
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -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
@@ -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.
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>
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file