l3lab/ntp-mathlib huggingface dataset:
@[simp]
lemma fromRows_toRows (A : Matrix (m₁ ⊕ m₂) n R) : fromRows A.toRows₁ A.toRows₂ = A := by
  ext (i | i) j <;> 

Proof state:
case a.inl.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A : Matrix (m₁ ⊕ m₂) n R
i : m₁
j : n
⊢ fromRows (toRows₁ A) (toRows₂ A) (Sum.inl i) j = A (Sum.inl i) j

Next tactic:
simp
@[simp]
lemma fromRows_toRows (A : Matrix (m₁ ⊕ m₂) n R) : fromRows A.toRows₁ A.toRows₂ = A := by
  ext (i | i) j <;> 

Proof state:
case a.inr.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A : Matrix (m₁ ⊕ m₂) n R
i : m₂
j : n
⊢ fromRows (toRows₁ A) (toRows₂ A) (Sum.inr i) j = A (Sum.inr i) j

Next tactic:
simp
lemma fromRows_inj : Function.Injective2 (@fromRows R m₁ m₂ n) := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
⊢ Function.Injective2 fromRows

Next tactic:
intros x1 x2 y1 y2
lemma fromRows_inj : Function.Injective2 (@fromRows R m₁ m₂ n) := by
  intros x1 x2 y1 y2
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
x1 x2 : Matrix m₁ n R
y1 y2 : Matrix m₂ n R
⊢ fromRows x1 y1 = fromRows x2 y2 → x1 = x2 ∧ y1 = y2

Next tactic:
simp only [Function.funext_iff, ← Matrix.ext_iff]
lemma fromRows_inj : Function.Injective2 (@fromRows R m₁ m₂ n) := by
  intros x1 x2 y1 y2
  simp only [Function.funext_iff, ← Matrix.ext_iff]
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
x1 x2 : Matrix m₁ n R
y1 y2 : Matrix m₂ n R
⊢ (∀ (i : m₁ ⊕ m₂) (j : n), fromRows x1 y1 i j = fromRows x2 y2 i j) →
    (∀ (i : m₁) (j : n), x1 i j = x2 i j) ∧ ∀ (i : m₂) (j : n), y1 i j = y2 i j

Next tactic:
aesop
lemma fromColumns_inj : Function.Injective2 (@fromColumns R m n₁ n₂) := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
⊢ Function.Injective2 fromColumns

Next tactic:
intros x1 x2 y1 y2
lemma fromColumns_inj : Function.Injective2 (@fromColumns R m n₁ n₂) := by
  intros x1 x2 y1 y2
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
x1 x2 : Matrix m n₁ R
y1 y2 : Matrix m n₂ R
⊢ fromColumns x1 y1 = fromColumns x2 y2 → x1 = x2 ∧ y1 = y2

Next tactic:
simp only [Function.funext_iff, ← Matrix.ext_iff]
lemma fromColumns_inj : Function.Injective2 (@fromColumns R m n₁ n₂) := by
  intros x1 x2 y1 y2
  simp only [Function.funext_iff, ← Matrix.ext_iff]
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
x1 x2 : Matrix m n₁ R
y1 y2 : Matrix m n₂ R
⊢ (∀ (i : m) (j : n₁ ⊕ n₂), fromColumns x1 y1 i j = fromColumns x2 y2 i j) →
    (∀ (i : m) (j : n₁), x1 i j = x2 i j) ∧ ∀ (i : m) (j : n₂), y1 i j = y2 i j

Next tactic:
aesop
lemma transpose_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :
    transpose (fromColumns A₁ A₂) = fromRows (transpose A₁) (transpose A₂) := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A₁ : Matrix m n₁ R
A₂ : Matrix m n₂ R
⊢ (fromColumns A₁ A₂)ᵀ = fromRows A₁ᵀ A₂ᵀ

Next tactic:
ext (i | i) j
lemma transpose_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :
    transpose (fromColumns A₁ A₂) = fromRows (transpose A₁) (transpose A₂) := by
  ext (i | i) j <;> 

Proof state:
case a.inl.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A₁ : Matrix m n₁ R
A₂ : Matrix m n₂ R
i : n₁
j : m
⊢ (fromColumns A₁ A₂)ᵀ (Sum.inl i) j = fromRows A₁ᵀ A₂ᵀ (Sum.inl i) j

Next tactic:
simp
lemma transpose_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :
    transpose (fromColumns A₁ A₂) = fromRows (transpose A₁) (transpose A₂) := by
  ext (i | i) j <;> 

Proof state:
case a.inr.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A₁ : Matrix m n₁ R
A₂ : Matrix m n₂ R
i : n₂
j : m
⊢ (fromColumns A₁ A₂)ᵀ (Sum.inr i) j = fromRows A₁ᵀ A₂ᵀ (Sum.inr i) j

Next tactic:
simp
lemma transpose_fromRows (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) :
    transpose (fromRows A₁ A₂) = fromColumns (transpose A₁) (transpose A₂) := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A₁ : Matrix m₁ n R
A₂ : Matrix m₂ n R
⊢ (fromRows A₁ A₂)ᵀ = fromColumns A₁ᵀ A₂ᵀ

Next tactic:
ext i (j | j)
lemma transpose_fromRows (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) :
    transpose (fromRows A₁ A₂) = fromColumns (transpose A₁) (transpose A₂) := by
  ext i (j | j) <;> 

Proof state:
case a.h.inl
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A₁ : Matrix m₁ n R
A₂ : Matrix m₂ n R
i : n
j : m₁
⊢ (fromRows A₁ A₂)ᵀ i (Sum.inl j) = fromColumns A₁ᵀ A₂ᵀ i (Sum.inl j)

Next tactic:
simp
lemma transpose_fromRows (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) :
    transpose (fromRows A₁ A₂) = fromColumns (transpose A₁) (transpose A₂) := by
  ext i (j | j) <;> 

Proof state:
case a.h.inr
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹¹ : Fintype m
inst✝¹⁰ : Fintype m₁
inst✝⁹ : Fintype m₂
inst✝⁸ : Fintype n
inst✝⁷ : Fintype n₁
inst✝⁶ : Fintype n₂
inst✝⁵ : DecidableEq m
inst✝⁴ : DecidableEq m₁
inst✝³ : DecidableEq m₂
inst✝² : DecidableEq n
inst✝¹ : DecidableEq n₁
inst✝ : DecidableEq n₂
A₁ : Matrix m₁ n R
A₂ : Matrix m₂ n R
i : n
j : m₂
⊢ (fromRows A₁ A₂)ᵀ i (Sum.inr j) = fromColumns A₁ᵀ A₂ᵀ i (Sum.inr j)

Next tactic:
simp
@[simp]
lemma fromRows_mul (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (B : Matrix n m R) :
    (fromRows A₁ A₂) * B = fromRows (A₁ * B) (A₂ * B) := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A₁ : Matrix m₁ n R
A₂ : Matrix m₂ n R
B : Matrix n m R
⊢ fromRows A₁ A₂ * B = fromRows (A₁ * B) (A₂ * B)

Next tactic:
ext (_ | _) _
@[simp]
lemma fromRows_mul (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (B : Matrix n m R) :
    (fromRows A₁ A₂) * B = fromRows (A₁ * B) (A₂ * B) := by
  ext (_ | _) _ <;> 

Proof state:
case a.inl.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A₁ : Matrix m₁ n R
A₂ : Matrix m₂ n R
B : Matrix n m R
val✝ : m₁
x✝ : m
⊢ (fromRows A₁ A₂ * B) (Sum.inl val✝) x✝ = fromRows (A₁ * B) (A₂ * B) (Sum.inl val✝) x✝

Next tactic:
simp [mul_apply]
@[simp]
lemma fromRows_mul (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (B : Matrix n m R) :
    (fromRows A₁ A₂) * B = fromRows (A₁ * B) (A₂ * B) := by
  ext (_ | _) _ <;> 

Proof state:
case a.inr.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A₁ : Matrix m₁ n R
A₂ : Matrix m₂ n R
B : Matrix n m R
val✝ : m₂
x✝ : m
⊢ (fromRows A₁ A₂ * B) (Sum.inr val✝) x✝ = fromRows (A₁ * B) (A₂ * B) (Sum.inr val✝) x✝

Next tactic:
simp [mul_apply]
@[simp]
lemma mul_fromColumns (A : Matrix m n R) (B₁ : Matrix n n₁ R) (B₂ : Matrix n n₂ R) :
    A * (fromColumns B₁ B₂) = fromColumns (A * B₁) (A * B₂) := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A : Matrix m n R
B₁ : Matrix n n₁ R
B₂ : Matrix n n₂ R
⊢ A * fromColumns B₁ B₂ = fromColumns (A * B₁) (A * B₂)

Next tactic:
ext _ (_ | _)
@[simp]
lemma mul_fromColumns (A : Matrix m n R) (B₁ : Matrix n n₁ R) (B₂ : Matrix n n₂ R) :
    A * (fromColumns B₁ B₂) = fromColumns (A * B₁) (A * B₂) := by
  ext _ (_ | _) <;> 

Proof state:
case a.h.inl
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A : Matrix m n R
B₁ : Matrix n n₁ R
B₂ : Matrix n n₂ R
i✝ : m
val✝ : n₁
⊢ (A * fromColumns B₁ B₂) i✝ (Sum.inl val✝) = fromColumns (A * B₁) (A * B₂) i✝ (Sum.inl val✝)

Next tactic:
simp [mul_apply]
@[simp]
lemma mul_fromColumns (A : Matrix m n R) (B₁ : Matrix n n₁ R) (B₂ : Matrix n n₂ R) :
    A * (fromColumns B₁ B₂) = fromColumns (A * B₁) (A * B₂) := by
  ext _ (_ | _) <;> 

Proof state:
case a.h.inr
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A : Matrix m n R
B₁ : Matrix n n₁ R
B₂ : Matrix n n₂ R
i✝ : m
val✝ : n₂
⊢ (A * fromColumns B₁ B₂) i✝ (Sum.inr val✝) = fromColumns (A * B₁) (A * B₂) i✝ (Sum.inr val✝)

Next tactic:
simp [mul_apply]
@[simp]
lemma fromRows_zero : fromRows (0 : Matrix m₁ n R) (0 : Matrix m₂ n R) = 0 := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
⊢ fromRows 0 0 = 0

Next tactic:
ext (_ | _) _
@[simp]
lemma fromRows_zero : fromRows (0 : Matrix m₁ n R) (0 : Matrix m₂ n R) = 0 := by
  ext (_ | _) _ <;> 

Proof state:
case a.inl.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
val✝ : m₁
x✝ : n
⊢ fromRows 0 0 (Sum.inl val✝) x✝ = OfNat.ofNat 0 (Sum.inl val✝) x✝

Next tactic:
simp
@[simp]
lemma fromRows_zero : fromRows (0 : Matrix m₁ n R) (0 : Matrix m₂ n R) = 0 := by
  ext (_ | _) _ <;> 

Proof state:
case a.inr.h
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
val✝ : m₂
x✝ : n
⊢ fromRows 0 0 (Sum.inr val✝) x✝ = OfNat.ofNat 0 (Sum.inr val✝) x✝

Next tactic:
simp
@[simp]
lemma fromColumns_zero : fromColumns (0 : Matrix m n₁ R) (0 : Matrix m n₂ R) = 0 := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
⊢ fromColumns 0 0 = 0

Next tactic:
ext _ (_ | _)
@[simp]
lemma fromColumns_zero : fromColumns (0 : Matrix m n₁ R) (0 : Matrix m n₂ R) = 0 := by
  ext _ (_ | _) <;> 

Proof state:
case a.h.inl
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
i✝ : m
val✝ : n₁
⊢ fromColumns 0 0 i✝ (Sum.inl val✝) = OfNat.ofNat 0 i✝ (Sum.inl val✝)

Next tactic:
simp
@[simp]
lemma fromColumns_zero : fromColumns (0 : Matrix m n₁ R) (0 : Matrix m n₂ R) = 0 := by
  ext _ (_ | _) <;> 

Proof state:
case a.h.inr
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
i✝ : m
val✝ : n₂
⊢ fromColumns 0 0 i✝ (Sum.inr val✝) = OfNat.ofNat 0 i✝ (Sum.inr val✝)

Next tactic:
simp
@[simp]
lemma fromColumns_fromRows_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
⊢ fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂

Next tactic:
ext (_ | _) (_ | _)
@[simp]
lemma fromColumns_fromRows_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  ext (_ | _) (_ | _) <;> 

Proof state:
case a.inl.h.inl
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
val✝¹ : m₁
val✝ : n₁
⊢ fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) (Sum.inl val✝¹) (Sum.inl val✝) =
    fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ (Sum.inl val✝¹) (Sum.inl val✝)

Next tactic:
simp
@[simp]
lemma fromColumns_fromRows_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  ext (_ | _) (_ | _) <;> 

Proof state:
case a.inl.h.inr
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
val✝¹ : m₁
val✝ : n₂
⊢ fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) (Sum.inl val✝¹) (Sum.inr val✝) =
    fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ (Sum.inl val✝¹) (Sum.inr val✝)

Next tactic:
simp
@[simp]
lemma fromColumns_fromRows_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  ext (_ | _) (_ | _) <;> 

Proof state:
case a.inr.h.inl
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
val✝¹ : m₂
val✝ : n₁
⊢ fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) (Sum.inr val✝¹) (Sum.inl val✝) =
    fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ (Sum.inr val✝¹) (Sum.inl val✝)

Next tactic:
simp
@[simp]
lemma fromColumns_fromRows_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  ext (_ | _) (_ | _) <;> 

Proof state:
case a.inr.h.inr
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
val✝¹ : m₂
val✝ : n₂
⊢ fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) (Sum.inr val✝¹) (Sum.inr val✝) =
    fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ (Sum.inr val✝¹) (Sum.inr val✝)

Next tactic:
simp
@[simp]
lemma fromRows_fromColumn_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  

Proof state:
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
⊢ fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂

Next tactic:
ext (_ | _) (_ | _)
@[simp]
lemma fromRows_fromColumn_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  ext (_ | _) (_ | _) <;> 

Proof state:
case a.inl.h.inl
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
val✝¹ : m₁
val✝ : n₁
⊢ fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) (Sum.inl val✝¹) (Sum.inl val✝) =
    fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ (Sum.inl val✝¹) (Sum.inl val✝)

Next tactic:
simp
@[simp]
lemma fromRows_fromColumn_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by
  ext (_ | _) (_ | _) <;> 

Proof state:
case a.inl.h.inr
R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁₁ : Matrix m₁ n₁ R
B₁₂ : Matrix m₁ n₂ R
B₂₁ : Matrix m₂ n₁ R
B₂₂ : Matrix m₂ n₂ R
val✝¹ : m₁
val✝ : n₂
⊢ fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) (Sum.inl val✝¹) (Sum.inr val✝) =
    fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ (Sum.inl val✝¹) (Sum.inr val✝)

Next tactic:
simp