Theorem: Matrix.det_toBlock
File: Mathlib/LinearAlgebra/Matrix/Block.lean

tactic: rw [← Matrix.det_reindex_self (Equiv.sumCompl p).symm M]
state_before: α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
⊢ det M =
    det
      (fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
        (toBlock M (fun j => ¬p j) fun j => ¬p j))

tactic: rw [det_apply', det_apply']
state_before: α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
⊢ det (↑(reindex (Equiv.sumCompl p).symm (Equiv.sumCompl p).symm) M) =
    det
      (fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
        (toBlock M (fun j => ¬p j) fun j => ¬p j))

tactic: congr
state_before: α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
⊢ ∑ σ : Equiv.Perm ({ a // p a } ⊕ { a // ¬p a }),
      ↑↑(↑Equiv.Perm.sign σ) *
        ∏ i : { a // p a } ⊕ { a // ¬p a }, ↑(reindex (Equiv.sumCompl p).symm (Equiv.sumCompl p).symm) M (↑σ i) i =
    ∑ σ : Equiv.Perm ({ a // p a } ⊕ { a // ¬p a }),
      ↑↑(↑Equiv.Perm.sign σ) *
        ∏ i : { a // p a } ⊕ { a // ¬p a },
          fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
            (toBlock M (fun j => ¬p j) fun j => ¬p j) (↑σ i) i

tactic: ext σ
state_before: case e_f
α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
⊢ (fun σ =>
      ↑↑(↑Equiv.Perm.sign σ) *
        ∏ i : { a // p a } ⊕ { a // ¬p a }, ↑(reindex (Equiv.sumCompl p).symm (Equiv.sumCompl p).symm) M (↑σ i) i) =
    fun σ =>
    ↑↑(↑Equiv.Perm.sign σ) *
      ∏ i : { a // p a } ⊕ { a // ¬p a },
        fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
          (toBlock M (fun j => ¬p j) fun j => ¬p j) (↑σ i) i

tactic: congr
state_before: case e_f.h
α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
σ : Equiv.Perm ({ a // p a } ⊕ { a // ¬p a })
⊢ ↑↑(↑Equiv.Perm.sign σ) *
      ∏ i : { a // p a } ⊕ { a // ¬p a }, ↑(reindex (Equiv.sumCompl p).symm (Equiv.sumCompl p).symm) M (↑σ i) i =
    ↑↑(↑Equiv.Perm.sign σ) *
      ∏ i : { a // p a } ⊕ { a // ¬p a },
        fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
          (toBlock M (fun j => ¬p j) fun j => ¬p j) (↑σ i) i

tactic: ext x
state_before: case e_f.h.e_a.e_f
α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
σ : Equiv.Perm ({ a // p a } ⊕ { a // ¬p a })
⊢ (fun i => ↑(reindex (Equiv.sumCompl p).symm (Equiv.sumCompl p).symm) M (↑σ i) i) = fun i =>
    fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
      (toBlock M (fun j => ¬p j) fun j => ¬p j) (↑σ i) i

tactic: generalize hy : σ x = y
state_before: case e_f.h.e_a.e_f.h
α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
σ : Equiv.Perm ({ a // p a } ⊕ { a // ¬p a })
x : { a // p a } ⊕ { a // ¬p a }
⊢ ↑(reindex (Equiv.sumCompl p).symm (Equiv.sumCompl p).symm) M (↑σ x) x =
    fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
      (toBlock M (fun j => ¬p j) fun j => ¬p j) (↑σ x) x

tactic: cases x <;> cases y <;>
  simp only [Matrix.reindex_apply, toBlock_apply, Equiv.symm_symm, Equiv.sumCompl_apply_inr,
    Equiv.sumCompl_apply_inl, fromBlocks_apply₁₁, fromBlocks_apply₁₂, fromBlocks_apply₂₁,
    fromBlocks_apply₂₂, Matrix.submatrix_apply]
state_before: case e_f.h.e_a.e_f.h
α : Type ?u.52561
β : Type ?u.52564
m : Type u_1
n : Type ?u.52570
o : Type ?u.52573
m' : α → Type ?u.52578
n' : α → Type ?u.52583
R : Type v
inst✝⁵ : CommRing R
M✝ N : Matrix m m R
b : m → α
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : DecidableEq n
inst✝¹ : Fintype n
M : Matrix m m R
p : m → Prop
inst✝ : DecidablePred p
σ : Equiv.Perm ({ a // p a } ⊕ { a // ¬p a })
x y : { a // p a } ⊕ { a // ¬p a }
hy : ↑σ x = y
⊢ ↑(reindex (Equiv.sumCompl p).symm (Equiv.sumCompl p).symm) M y x =
    fromBlocks (toBlock M p p) (toBlock M p fun j => ¬p j) (toBlock M (fun j => ¬p j) p)
      (toBlock M (fun j => ¬p j) fun j => ¬p j) y x