File: Mathlib/Analysis/InnerProductSpace/Orientation.lean

full_name: OrthonormalBasis.det_to_matrix_orthonormalBasis_of_same_orientation
code: /-- The change-of-basis matrix between two orthonormal bases with the same orientation has
determinant 1. -/
theorem det_to_matrix_orthonormalBasis_of_same_orientation
    (h : e.toBasis.orientation = f.toBasis.orientation) : e.toBasis.det f = 1 
goal: e.toBasis.det ⇑f = 1

full_name: OrthonormalBasis.det_to_matrix_orthonormalBasis_of_opposite_orientation
code: /-- The change-of-basis matrix between two orthonormal bases with the opposite orientations has
determinant -1. -/
theorem det_to_matrix_orthonormalBasis_of_opposite_orientation
    (h : e.toBasis.orientation ≠ f.toBasis.orientation) : e.toBasis.det f = -1 
goal: e.toBasis.det ⇑f = -1

full_name: OrthonormalBasis.same_orientation_iff_det_eq_det
code: /-- 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 :
    e.toBasis.det = f.toBasis.det ↔ e.toBasis.orientation = f.toBasis.orientation 
goal: e.toBasis.det = f.toBasis.det ↔ e.toBasis.orientation = f.toBasis.orientation

full_name: OrthonormalBasis.det_eq_neg_det_of_opposite_orientation
code: /-- 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) :
    e.toBasis.det = -f.toBasis.det 
goal: e.toBasis.det = -f.toBasis.det

full_name: OrthonormalBasis.orthonormal_adjustToOrientation
code: /-- `OrthonormalBasis.adjustToOrientation`, applied to an orthonormal basis, preserves the
property of orthonormality. -/
theorem orthonormal_adjustToOrientation : Orthonormal ℝ (e.toBasis.adjustToOrientation x) 
goal: Orthonormal ℝ ⇑(e.toBasis.adjustToOrientation x)

full_name: OrthonormalBasis.adjustToOrientation
code: /-- 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 
goal: OrthonormalBasis ι ℝ E

full_name: OrthonormalBasis.toBasis_adjustToOrientation
code: theorem toBasis_adjustToOrientation :
    (e.adjustToOrientation x).toBasis = e.toBasis.adjustToOrientation x 
goal: (e.adjustToOrientation x).toBasis = e.toBasis.adjustToOrientation x

full_name: OrthonormalBasis.orientation_adjustToOrientation
code: /-- `adjustToOrientation` gives an orthonormal basis with the required orientation. -/
@[simp]
theorem orientation_adjustToOrientation : (e.adjustToOrientation x).toBasis.orientation = x 
goal: (e.adjustToOrientation x).toBasis.orientation = x

full_name: OrthonormalBasis.adjustToOrientation_apply_eq_or_eq_neg
code: /-- Every basis vector from `adjustToOrientation` is either that from the original basis or its
negation. -/
theorem adjustToOrientation_apply_eq_or_eq_neg (i : ι) :
    e.adjustToOrientation x i = e i ∨ e.adjustToOrientation x i = -e i 
goal: (e.adjustToOrientation x) i = e i ∨ (e.adjustToOrientation x) i = -e i

full_name: OrthonormalBasis.det_adjustToOrientation
code: theorem det_adjustToOrientation :
    (e.adjustToOrientation x).toBasis.det = e.toBasis.det ∨
      (e.adjustToOrientation x).toBasis.det = -e.toBasis.det 
goal: (e.adjustToOrientation x).toBasis.det = e.toBasis.det ∨ (e.adjustToOrientation x).toBasis.det = -e.toBasis.det

full_name: OrthonormalBasis.abs_det_adjustToOrientation
code: theorem abs_det_adjustToOrientation (v : ι → E) :
    |(e.adjustToOrientation x).toBasis.det v| = |e.toBasis.det v| 
goal: |(e.adjustToOrientation x).toBasis.det v| = |e.toBasis.det v|

full_name: Orientation.finOrthonormalBasis
code: /-- 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 
goal: OrthonormalBasis (Fin n) ℝ E

full_name: Orientation.finOrthonormalBasis_orientation
code: /-- `Orientation.finOrthonormalBasis` gives a basis with the required orientation. -/
@[simp]
theorem finOrthonormalBasis_orientation (hn : 0 < n) (h : finrank ℝ E = n)
    (x : Orientation ℝ E (Fin n)) : (x.finOrthonormalBasis hn h).toBasis.orientation = x 
goal: (Orientation.finOrthonormalBasis hn h x).toBasis.orientation = x

full_name: Orientation.definition._@.Mathlib.Analysis.InnerProductSpace.Orientation._hyg.1333
code: /-- 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]→ₗ[ℝ] ℝ 
goal: E [⋀^Fin n]→ₗ[ℝ] ℝ

full_name: Orientation.wrapped._@.Mathlib.Analysis.InnerProductSpace.Orientation._hyg.1333
code: /-- 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]→ₗ[ℝ] ℝ 
goal: Subtype (Eq @Orientation.definition✝)

full_name: Orientation.volumeForm_def
code: /-- 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]→ₗ[ℝ] ℝ 
goal: o.volumeForm =
  Nat.casesAuxOn (motive := fun a => n = a → E [⋀^Fin n]→ₗ[ℝ] ℝ) n
    (fun h =>
      Eq.ndrec (motive := fun {n} =>
        [_i : Fact (FiniteDimensional.finrank ℝ E = n)] → Orientation ℝ E (Fin n) → E [⋀^Fin n]→ₗ[ℝ] ℝ)
        (fun [Fact (FiniteDimensional.finrank ℝ E = 0)] o =>
          let opos := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) 1;
          ⋯.by_cases (fun x => opos) fun x => -opos)
        ⋯ o)
    (fun n_1 h =>
      Eq.ndrec (motive := fun {n} =>
        [_i : Fact (FiniteDimensional.finrank ℝ E = n)] → Orientation ℝ E (Fin n) → E [⋀^Fin n]→ₗ[ℝ] ℝ)
        (fun [Fact (FiniteDimensional.finrank ℝ E = n_1 + 1)] o => (Orientation.finOrthonormalBasis ⋯ ⋯ o).toBasis.det)
        ⋯ o)
    ⋯

full_name: Orientation.volumeForm
code: /-- 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]→ₗ[ℝ] ℝ 
goal: E [⋀^Fin n]→ₗ[ℝ] ℝ

full_name: Orientation.volumeForm_zero_pos
code: @[simp]
theorem volumeForm_zero_pos [_i : Fact (finrank ℝ E = 0)] :
    Orientation.volumeForm (positiveOrientation : Orientation ℝ E (Fin 0)) =
      AlternatingMap.constLinearEquivOfIsEmpty 1 
goal: positiveOrientation.volumeForm = AlternatingMap.constLinearEquivOfIsEmpty 1

full_name: Orientation.volumeForm_zero_neg
code: theorem volumeForm_zero_neg [_i : Fact (finrank ℝ E = 0)] :
    Orientation.volumeForm (-positiveOrientation : Orientation ℝ E (Fin 0)) =
      -AlternatingMap.constLinearEquivOfIsEmpty 1 
goal: (-positiveOrientation).volumeForm = -AlternatingMap.constLinearEquivOfIsEmpty 1

full_name: Orientation.volumeForm_robust
code: /-- 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) :
    o.volumeForm = b.toBasis.det 
goal: o.volumeForm = b.toBasis.det

full_name: Orientation.volumeForm_robust_neg
code: /-- 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) :
    o.volumeForm = -b.toBasis.det 
goal: o.volumeForm = -b.toBasis.det

full_name: Orientation.volumeForm_neg_orientation
code: @[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm 
goal: (-o).volumeForm = -o.volumeForm

full_name: Orientation.volumeForm_robust'
code: theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E) :
    |o.volumeForm v| = |b.toBasis.det v| 
goal: |o.volumeForm v| = |b.toBasis.det v|

full_name: Orientation.abs_volumeForm_apply_le
code: /-- 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`. -/
theorem abs_volumeForm_apply_le (v : Fin n → E) : |o.volumeForm v| ≤ ∏ i : Fin n, ‖v i‖ 
goal: |o.volumeForm v| ≤ ∏ i : Fin n, ‖v i‖

full_name: Orientation.volumeForm_apply_le
code: theorem volumeForm_apply_le (v : Fin n → E) : o.volumeForm v ≤ ∏ i : Fin n, ‖v i‖ 
goal: o.volumeForm v ≤ ∏ i : Fin n, ‖v i‖

full_name: Orientation.abs_volumeForm_apply_of_pairwise_orthogonal
code: /-- 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`. -/
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‖ 
goal: |o.volumeForm v| = ∏ i : Fin n, ‖v i‖

full_name: Orientation.abs_volumeForm_apply_of_orthonormal
code: /-- 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 
goal: |o.volumeForm ⇑v| = 1

full_name: Orientation.volumeForm_map
code: 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) 
goal: ((Orientation.map (Fin n) φ.toLinearEquiv) o).volumeForm x = o.volumeForm (⇑φ.symm ∘ x)

full_name: Orientation.volumeForm_comp_linearIsometryEquiv
code: /-- The volume form is invariant under pullback by a positively-oriented isometric automorphism. -/
theorem volumeForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
    (hφ : 0 < LinearMap.det (φ.toLinearEquiv : E →ₗ[ℝ] E)) (x : Fin n → E) :
    o.volumeForm (φ ∘ x) = o.volumeForm x 
goal: o.volumeForm (⇑φ ∘ x) = o.volumeForm x