Theorem: Orientation.volumeForm_robust_neg
File: Mathlib/Analysis/InnerProductSpace/Orientation.lean

tactic: cases' n with n
state_before: 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)

tactic: let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out
state_before: 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)

tactic: simp_rw [volumeForm]
state_before: 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)

tactic: apply e.det_eq_neg_det_of_opposite_orientation b
state_before: 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)

tactic: convert hb.symm
state_before: 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)

tactic: exact o.finOrthonormalBasis_orientation _ _
state_before: 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

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]
state_before: 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)

tactic: have : positiveOrientation ≠ o := by rwa [b.toBasis.orientation_isEmpty] at hb
state_before: 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)

tactic: simp_rw [volumeForm, Or.by_cases, dif_neg this.symm, Basis.det_isEmpty]
state_before: 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)

tactic: rwa [b.toBasis.orientation_isEmpty] at hb
state_before: 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