Theorem: stdinversions_inversions (Bruhat/Word.lean)

State before:
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
⊢ Inversions g = StdInversions g ∪ Prod.swap ⁻¹' StdInversions g
Tactic:
ext ⟨a, b⟩
State after:
case h.mk
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∪ Prod.swap ⁻¹' StdInversions g

State before:
case h.mk
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∪ Prod.swap ⁻¹' StdInversions g
Tactic:
simp only [Set.mem_union, Set.mem_preimage, Prod.swap_prod_mk]
State after:
case h.mk
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

State before:
case h.mk
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
by_cases hab : a = b
State after:
case pos
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

case neg
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : ¬a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

State before:
case pos
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

case neg
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : ¬a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
. subst b
  simp [not_mem_stdinversions_diag, not_mem_inversions_diag]
State after:
case neg
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : ¬a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

State before:
case neg
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : ¬a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
. push_neg at hab
  obtain (hab | hba) := hab.lt_or_lt
  . simp [mem_stdinversions', mem_inversions, hab, hab.not_lt]
  . rw [mem_inversions_symm]
    simp [mem_stdinversions', mem_inversions, hba, hba.not_lt]
State after:
no goals

State before:
case pos
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
subst b
State after:
case pos
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a : α
⊢ (a, a) ∈ Inversions g ↔ (a, a) ∈ StdInversions g ∨ (a, a) ∈ StdInversions g

State before:
case pos
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a : α
⊢ (a, a) ∈ Inversions g ↔ (a, a) ∈ StdInversions g ∨ (a, a) ∈ StdInversions g
Tactic:
simp [not_mem_stdinversions_diag, not_mem_inversions_diag]
State after:
no goals

State before:
case neg
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : ¬a = b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
push_neg at hab
State after:
case neg
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

State before:
case neg
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
obtain (hab | hba) := hab.lt_or_lt
State after:
case neg.inl
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab✝ : a ≠ b
hab : a < b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

case neg.inr
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
hba : b < a
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

State before:
case neg.inl
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab✝ : a ≠ b
hab : a < b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

case neg.inr
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
hba : b < a
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
. simp [mem_stdinversions', mem_inversions, hab, hab.not_lt]
State after:
case neg.inr
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
hba : b < a
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

State before:
case neg.inr
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
hba : b < a
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
. rw [mem_inversions_symm]
  simp [mem_stdinversions', mem_inversions, hba, hba.not_lt]
State after:
no goals

State before:
case neg.inl
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab✝ : a ≠ b
hab : a < b
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
simp [mem_stdinversions', mem_inversions, hab, hab.not_lt]
State after:
no goals

State before:
case neg.inr
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
hba : b < a
⊢ (a, b) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
rw [mem_inversions_symm]
State after:
case neg.inr
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
hba : b < a
⊢ (b, a) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g

State before:
case neg.inr
α : Type u_1
inst✝ : LinearOrder α
g : Equiv.Perm α
a b : α
hab : a ≠ b
hba : b < a
⊢ (b, a) ∈ Inversions g ↔ (a, b) ∈ StdInversions g ∨ (b, a) ∈ StdInversions g
Tactic:
simp [mem_stdinversions', mem_inversions, hba, hba.not_lt]
State after:
no goals