l3lab/ntp-mathlib huggingface dataset:
/-- 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 := by
  cases n
  · classical
      have : o = positiveOrientation := hb.symm.trans b.toBasis.orientation_isEmpty
      

Proof state:
case zero
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) = o
this : o = positiveOrientation
⊢ volumeForm o = Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
simp_rw [volumeForm, Or.by_cases, dif_pos this, Basis.det_isEmpty]
/-- 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 := by
  cases n
  · classical
      have : o = positiveOrientation := hb.symm.trans b.toBasis.orientation_isEmpty
      simp_rw [volumeForm, Or.by_cases, dif_pos this, Basis.det_isEmpty]
  · 

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n✝ : ℕ
_i : Fact (finrank ℝ E = Nat.succ n✝)
o : Orientation ℝ E (Fin (Nat.succ n✝))
b : OrthonormalBasis (Fin (Nat.succ n✝)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) = o
⊢ volumeForm o = Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
simp_rw [volumeForm]
/-- 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 := by
  cases n
  · classical
      have : o = positiveOrientation := hb.symm.trans b.toBasis.orientation_isEmpty
      simp_rw [volumeForm, Or.by_cases, dif_pos this, Basis.det_isEmpty]
  · simp_rw [volumeForm]
    

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n✝ : ℕ
_i : Fact (finrank ℝ E = Nat.succ n✝)
o : Orientation ℝ E (Fin (Nat.succ n✝))
b : OrthonormalBasis (Fin (Nat.succ n✝)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) = o
⊢ Basis.det
      (OrthonormalBasis.toBasis
        (Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n✝) (_ : finrank ℝ E = Nat.succ n✝) o)) =
    Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
rw [same_orientation_iff_det_eq_det, hb]
/-- 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 := by
  cases n
  · classical
      have : o = positiveOrientation := hb.symm.trans b.toBasis.orientation_isEmpty
      simp_rw [volumeForm, Or.by_cases, dif_pos this, Basis.det_isEmpty]
  · simp_rw [volumeForm]
    rw [same_orientation_iff_det_eq_det, hb]
    

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n✝ : ℕ
_i : Fact (finrank ℝ E = Nat.succ n✝)
o : Orientation ℝ E (Fin (Nat.succ n✝))
b : OrthonormalBasis (Fin (Nat.succ n✝)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) = o
⊢ Basis.orientation
      (OrthonormalBasis.toBasis
        (Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n✝) (_ : finrank ℝ E = Nat.succ n✝) o)) =
    o

Next tactic:
exact o.finOrthonormalBasis_orientation _ _
/-- 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 := by
  

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = n)
o : Orientation ℝ E (Fin n)
b : OrthonormalBasis (Fin n) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
⊢ volumeForm o = -Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
cases' n with n
/-- 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 := by
  cases' n with n
  · 

Proof state:
case zero
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
⊢ volumeForm o = -Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
classical
      have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
      simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
/-- 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 := by
  cases' n with n
  · classical
      

Proof state:
case zero
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
⊢ volumeForm o = -Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
/-- 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 := by
  cases' n with n
  · classical
      have : positiveOrientation ≠ o := by 

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
⊢ positiveOrientation ≠ o

Next tactic:
rwa [b.toBasis.orientation_isEmpty] at hb
/-- 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 := by
  cases' n with n
  · classical
      have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
      

Proof state:
case zero
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
this : positiveOrientation ≠ o
⊢ volumeForm o = -Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
/-- 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 := by
  cases' n with n
  · classical
      have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
      simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
b : OrthonormalBasis (Fin (Nat.succ n)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
⊢ volumeForm o = -Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
/-- 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 := by
  cases' n with n
  · classical
      have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
      simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
b : OrthonormalBasis (Fin (Nat.succ n)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
⊢ volumeForm o = -Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
simp_rw [volumeForm]
/-- 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 := by
  cases' n with n
  · classical
      have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
      simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  simp_rw [volumeForm]
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
b : OrthonormalBasis (Fin (Nat.succ n)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
⊢ Basis.det
      (OrthonormalBasis.toBasis
        (Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o)) =
    -Basis.det (OrthonormalBasis.toBasis b)

Next tactic:
apply e.det_eq_neg_det_of_opposite_orientation b
/-- 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 := by
  cases' n with n
  · classical
      have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
      simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  simp_rw [volumeForm]
  apply e.det_eq_neg_det_of_opposite_orientation b
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
b : OrthonormalBasis (Fin (Nat.succ n)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
⊢ Basis.orientation (OrthonormalBasis.toBasis e) ≠ Basis.orientation (OrthonormalBasis.toBasis b)

Next tactic:
convert hb.symm
/-- 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 := by
  cases' n with n
  · classical
      have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
      simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  simp_rw [volumeForm]
  apply e.det_eq_neg_det_of_opposite_orientation b
  convert hb.symm
  

Proof state:
case h.e'_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
b : OrthonormalBasis (Fin (Nat.succ n)) ℝ E
hb : Basis.orientation (OrthonormalBasis.toBasis b) ≠ o
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
⊢ Basis.orientation (OrthonormalBasis.toBasis e) = o

Next tactic:
exact o.finOrthonormalBasis_orientation _ _
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = n)
o : Orientation ℝ E (Fin n)
⊢ volumeForm (-o) = -volumeForm o

Next tactic:
cases' n with n
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · 

Proof state:
case zero
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
⊢ volumeForm (-o) = -volumeForm o

Next tactic:
refine' o.eq_or_eq_neg_of_isEmpty.elim _ _
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> 

Proof state:
case zero.refine'_1
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
⊢ o = positiveOrientation → volumeForm (-o) = -volumeForm o

Next tactic:
rintro rfl
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> 

Proof state:
case zero.refine'_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
⊢ o = -positiveOrientation → volumeForm (-o) = -volumeForm o

Next tactic:
rintro rfl
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · 

Proof state:
case zero.refine'_1
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
⊢ volumeForm (-positiveOrientation) = -volumeForm positiveOrientation

Next tactic:
simp [volumeForm_zero_neg]
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · 

Proof state:
case zero.refine'_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
⊢ volumeForm (- -positiveOrientation) = -volumeForm (-positiveOrientation)

Next tactic:
rw [neg_neg (positiveOrientation (R := ℝ))]
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · rw [neg_neg (positiveOrientation (R := ℝ))] -- Porting note: added
      

Proof state:
case zero.refine'_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
⊢ volumeForm positiveOrientation = -volumeForm (-positiveOrientation)

Next tactic:
simp [volumeForm_zero_neg]
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · rw [neg_neg (positiveOrientation (R := ℝ))] -- Porting note: added
      simp [volumeForm_zero_neg]
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
⊢ volumeForm (-o) = -volumeForm o

Next tactic:
let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · rw [neg_neg (positiveOrientation (R := ℝ))] -- Porting note: added
      simp [volumeForm_zero_neg]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
⊢ volumeForm (-o) = -volumeForm o

Next tactic:
have h₁ : e.toBasis.orientation = o := o.finOrthonormalBasis_orientation _ _
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · rw [neg_neg (positiveOrientation (R := ℝ))] -- Porting note: added
      simp [volumeForm_zero_neg]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  have h₁ : e.toBasis.orientation = o := o.finOrthonormalBasis_orientation _ _
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
h₁ : Basis.orientation (OrthonormalBasis.toBasis e) = o
⊢ volumeForm (-o) = -volumeForm o

Next tactic:
have h₂ : e.toBasis.orientation ≠ -o := by
    symm
    rw [e.toBasis.orientation_ne_iff_eq_neg, h₁]
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · rw [neg_neg (positiveOrientation (R := ℝ))] -- Porting note: added
      simp [volumeForm_zero_neg]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  have h₁ : e.toBasis.orientation = o := o.finOrthonormalBasis_orientation _ _
  have h₂ : e.toBasis.orientation ≠ -o := by
    

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
h₁ : Basis.orientation (OrthonormalBasis.toBasis e) = o
⊢ Basis.orientation (OrthonormalBasis.toBasis e) ≠ -o

Next tactic:
symm
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · rw [neg_neg (positiveOrientation (R := ℝ))] -- Porting note: added
      simp [volumeForm_zero_neg]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  have h₁ : e.toBasis.orientation = o := o.finOrthonormalBasis_orientation _ _
  have h₂ : e.toBasis.orientation ≠ -o := by
    symm
    

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
h₁ : Basis.orientation (OrthonormalBasis.toBasis e) = o
⊢ -o ≠ Basis.orientation (OrthonormalBasis.toBasis e)

Next tactic:
rw [e.toBasis.orientation_ne_iff_eq_neg, h₁]
@[simp]
theorem volumeForm_neg_orientation : (-o).volumeForm = -o.volumeForm := by
  cases' n with n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> rintro rfl
    · simp [volumeForm_zero_neg]
    · rw [neg_neg (positiveOrientation (R := ℝ))] -- Porting note: added
      simp [volumeForm_zero_neg]
  let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
  have h₁ : e.toBasis.orientation = o := o.finOrthonormalBasis_orientation _ _
  have h₂ : e.toBasis.orientation ≠ -o := by
    symm
    rw [e.toBasis.orientation_ne_iff_eq_neg, h₁]
  

Proof state:
case succ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = Nat.succ n)
o : Orientation ℝ E (Fin (Nat.succ n))
e : OrthonormalBasis (Fin (Nat.succ n)) ℝ E :=
  Orientation.finOrthonormalBasis (_ : 0 < Nat.succ n) (_ : finrank ℝ E = Nat.succ n) o
h₁ : Basis.orientation (OrthonormalBasis.toBasis e) = o
h₂ : Basis.orientation (OrthonormalBasis.toBasis e) ≠ -o
⊢ volumeForm (-o) = -volumeForm o

Next tactic:
rw [o.volumeForm_robust e h₁, (-o).volumeForm_robust_neg e h₂]
theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E) :
    |o.volumeForm v| = |b.toBasis.det v| := by
  

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
n : ℕ
_i : Fact (finrank ℝ E = n)
o : Orientation ℝ E (Fin n)
b : OrthonormalBasis (Fin n) ℝ E
v : Fin n → E
⊢ |(volumeForm o) v| = |(Basis.det (OrthonormalBasis.toBasis b)) v|

Next tactic:
cases n
theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E) :
    |o.volumeForm v| = |b.toBasis.det v| := by
  cases n
  · 

Proof state:
case zero
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
v : Fin Nat.zero → E
⊢ |(volumeForm o) v| = |(Basis.det (OrthonormalBasis.toBasis b)) v|

Next tactic:
refine' o.eq_or_eq_neg_of_isEmpty.elim _ _
theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E) :
    |o.volumeForm v| = |b.toBasis.det v| := by
  cases n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> 

Proof state:
case zero.refine'_1
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
v : Fin Nat.zero → E
⊢ o = positiveOrientation → |(volumeForm o) v| = |(Basis.det (OrthonormalBasis.toBasis b)) v|

Next tactic:
rintro rfl
theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E) :
    |o.volumeForm v| = |b.toBasis.det v| := by
  cases n
  · refine' o.eq_or_eq_neg_of_isEmpty.elim _ _ <;> 

Proof state:
case zero.refine'_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
_i : Fact (finrank ℝ E = Nat.zero)
o : Orientation ℝ E (Fin Nat.zero)
b : OrthonormalBasis (Fin Nat.zero) ℝ E
v : Fin Nat.zero → E
⊢ o = -positiveOrientation → |(volumeForm o) v| = |(Basis.det (OrthonormalBasis.toBasis b)) v|

Next tactic:
rintro rfl