l3lab/ntp-mathlib huggingface dataset:
@[continuity]
theorem Continuous.matrix_det [Fintype n] [DecidableEq n] [CommRing R] [TopologicalRing R]
    {A : X → Matrix n n R} (hA : Continuous A) : Continuous fun x => (A x).det := by
  simp_rw [Matrix.det_apply]
  refine' continuous_finset_sum _ fun l _ => Continuous.const_smul _ _
  

Proof state:
X : Type u_1
α : Type u_2
l✝ : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l✝ → Type u_9
n' : l✝ → Type u_10
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace R
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : CommRing R
inst✝ : TopologicalRing R
A : X → Matrix n n R
hA : Continuous A
l : Equiv.Perm n
x✝ : l ∈ Finset.univ
⊢ Continuous fun x => Finset.prod Finset.univ fun i => A x (l i) i

Next tactic:
refine' continuous_finset_prod _ fun l _ => hA.matrix_elem _ _
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    

Proof state:
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
⊢ ∀ (i : n ⊕ p) (j : l ⊕ m), Continuous fun a => fromBlocks (A a) (B a) (C a) (D a) i j

Next tactic:
rintro (i | i) (j | j)
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> 

Proof state:
case inl.inl
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : n
j : l
⊢ Continuous fun a => fromBlocks (A a) (B a) (C a) (D a) (Sum.inl i) (Sum.inl j)

Next tactic:
refine' Continuous.matrix_elem _ i j
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> 

Proof state:
case inl.inr
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : n
j : m
⊢ Continuous fun a => fromBlocks (A a) (B a) (C a) (D a) (Sum.inl i) (Sum.inr j)

Next tactic:
refine' Continuous.matrix_elem _ i j
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> 

Proof state:
case inr.inl
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : p
j : l
⊢ Continuous fun a => fromBlocks (A a) (B a) (C a) (D a) (Sum.inr i) (Sum.inl j)

Next tactic:
refine' Continuous.matrix_elem _ i j
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> 

Proof state:
case inr.inr
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : p
j : m
⊢ Continuous fun a => fromBlocks (A a) (B a) (C a) (D a) (Sum.inr i) (Sum.inr j)

Next tactic:
refine' Continuous.matrix_elem _ i j
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> refine' Continuous.matrix_elem _ i j <;> 

Proof state:
case inl.inl
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : n
j : l
⊢ Continuous fun a => A a

Next tactic:
assumption
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> refine' Continuous.matrix_elem _ i j <;> 

Proof state:
case inl.inr
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : n
j : m
⊢ Continuous fun a => B a

Next tactic:
assumption
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> refine' Continuous.matrix_elem _ i j <;> 

Proof state:
case inr.inl
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : p
j : l
⊢ Continuous fun a => C a

Next tactic:
assumption
@[continuity]
theorem Continuous.matrix_fromBlocks {A : X → Matrix n l R} {B : X → Matrix n m R}
    {C : X → Matrix p l R} {D : X → Matrix p m R} (hA : Continuous A) (hB : Continuous B)
    (hC : Continuous C) (hD : Continuous D) :
    Continuous fun x => Matrix.fromBlocks (A x) (B x) (C x) (D x) :=
  continuous_matrix <| by
    rintro (i | i) (j | j) <;> refine' Continuous.matrix_elem _ i j <;> 

Proof state:
case inr.inr
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace R
A : X → Matrix n l R
B : X → Matrix n m R
C : X → Matrix p l R
D : X → Matrix p m R
hA : Continuous A
hB : Continuous B
hC : Continuous C
hD : Continuous D
i : p
j : m
⊢ Continuous fun a => D a

Next tactic:
assumption
@[continuity]
theorem Continuous.matrix_blockDiagonal' [Zero R] [DecidableEq l]
    {A : X → ∀ i, Matrix (m' i) (n' i) R} (hA : Continuous A) :
    Continuous fun x => blockDiagonal' (A x) :=
  continuous_matrix fun ⟨i₁, i₂⟩ ⟨j₁, j₂⟩ => by
    

Proof state:
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace R
inst✝¹ : Zero R
inst✝ : DecidableEq l
A : X → (i : l) → Matrix (m' i) (n' i) R
hA : Continuous A
x✝¹ : (i : l) × m' i
x✝ : (i : l) × n' i
i₁ : l
i₂ : m' i₁
j₁ : l
j₂ : n' j₁
⊢ Continuous fun a => blockDiagonal' (A a) { fst := i₁, snd := i₂ } { fst := j₁, snd := j₂ }

Next tactic:
dsimp only [blockDiagonal'_apply']
@[continuity]
theorem Continuous.matrix_blockDiagonal' [Zero R] [DecidableEq l]
    {A : X → ∀ i, Matrix (m' i) (n' i) R} (hA : Continuous A) :
    Continuous fun x => blockDiagonal' (A x) :=
  continuous_matrix fun ⟨i₁, i₂⟩ ⟨j₁, j₂⟩ => by
    dsimp only [blockDiagonal'_apply']
    

Proof state:
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace R
inst✝¹ : Zero R
inst✝ : DecidableEq l
A : X → (i : l) → Matrix (m' i) (n' i) R
hA : Continuous A
x✝¹ : (i : l) × m' i
x✝ : (i : l) × n' i
i₁ : l
i₂ : m' i₁
j₁ : l
j₂ : n' j₁
⊢ Continuous fun a => if h : i₁ = j₁ then A a i₁ i₂ (cast (_ : n' j₁ = n' i₁) j₂) else 0

Next tactic:
split_ifs with h
@[continuity]
theorem Continuous.matrix_blockDiagonal' [Zero R] [DecidableEq l]
    {A : X → ∀ i, Matrix (m' i) (n' i) R} (hA : Continuous A) :
    Continuous fun x => blockDiagonal' (A x) :=
  continuous_matrix fun ⟨i₁, i₂⟩ ⟨j₁, j₂⟩ => by
    dsimp only [blockDiagonal'_apply']
    split_ifs with h
    · 

Proof state:
case pos
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace R
inst✝¹ : Zero R
inst✝ : DecidableEq l
A : X → (i : l) → Matrix (m' i) (n' i) R
hA : Continuous A
x✝¹ : (i : l) × m' i
x✝ : (i : l) × n' i
i₁ : l
i₂ : m' i₁
j₁ : l
j₂ : n' j₁
h : i₁ = j₁
⊢ Continuous fun a => A a i₁ i₂ (cast (_ : n' j₁ = n' i₁) j₂)

Next tactic:
subst h
@[continuity]
theorem Continuous.matrix_blockDiagonal' [Zero R] [DecidableEq l]
    {A : X → ∀ i, Matrix (m' i) (n' i) R} (hA : Continuous A) :
    Continuous fun x => blockDiagonal' (A x) :=
  continuous_matrix fun ⟨i₁, i₂⟩ ⟨j₁, j₂⟩ => by
    dsimp only [blockDiagonal'_apply']
    split_ifs with h
    · subst h
      

Proof state:
case pos
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace R
inst✝¹ : Zero R
inst✝ : DecidableEq l
A : X → (i : l) → Matrix (m' i) (n' i) R
hA : Continuous A
x✝¹ : (i : l) × m' i
x✝ : (i : l) × n' i
i₁ : l
i₂ : m' i₁
j₂ : n' i₁
⊢ Continuous fun a => A a i₁ i₂ (cast (_ : n' i₁ = n' i₁) j₂)

Next tactic:
exact ((continuous_apply i₁).comp hA).matrix_elem i₂ j₂
@[continuity]
theorem Continuous.matrix_blockDiagonal' [Zero R] [DecidableEq l]
    {A : X → ∀ i, Matrix (m' i) (n' i) R} (hA : Continuous A) :
    Continuous fun x => blockDiagonal' (A x) :=
  continuous_matrix fun ⟨i₁, i₂⟩ ⟨j₁, j₂⟩ => by
    dsimp only [blockDiagonal'_apply']
    split_ifs with h
    · subst h
      exact ((continuous_apply i₁).comp hA).matrix_elem i₂ j₂
    · 

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace R
inst✝¹ : Zero R
inst✝ : DecidableEq l
A : X → (i : l) → Matrix (m' i) (n' i) R
hA : Continuous A
x✝¹ : (i : l) × m' i
x✝ : (i : l) × n' i
i₁ : l
i₂ : m' i₁
j₁ : l
j₂ : n' j₁
h : ¬i₁ = j₁
⊢ Continuous fun a => 0

Next tactic:
exact continuous_const
theorem Matrix.transpose_tsum [T2Space R] {f : X → Matrix m n R} : (∑' x, f x)ᵀ = ∑' x, (f x)ᵀ := by
  

Proof state:
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁴ : Semiring α
inst✝³ : AddCommMonoid R
inst✝² : TopologicalSpace R
inst✝¹ : Module α R
inst✝ : T2Space R
f : X → Matrix m n R
⊢ (∑' (x : X), f x)ᵀ = ∑' (x : X), (f x)ᵀ

Next tactic:
by_cases hf : Summable f
theorem Matrix.transpose_tsum [T2Space R] {f : X → Matrix m n R} : (∑' x, f x)ᵀ = ∑' x, (f x)ᵀ := by
  by_cases hf : Summable f
  · 

Proof state:
case pos
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁴ : Semiring α
inst✝³ : AddCommMonoid R
inst✝² : TopologicalSpace R
inst✝¹ : Module α R
inst✝ : T2Space R
f : X → Matrix m n R
hf : Summable f
⊢ (∑' (x : X), f x)ᵀ = ∑' (x : X), (f x)ᵀ

Next tactic:
exact hf.hasSum.matrix_transpose.tsum_eq.symm
theorem Matrix.transpose_tsum [T2Space R] {f : X → Matrix m n R} : (∑' x, f x)ᵀ = ∑' x, (f x)ᵀ := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_transpose.tsum_eq.symm
  · 

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁴ : Semiring α
inst✝³ : AddCommMonoid R
inst✝² : TopologicalSpace R
inst✝¹ : Module α R
inst✝ : T2Space R
f : X → Matrix m n R
hf : ¬Summable f
⊢ (∑' (x : X), f x)ᵀ = ∑' (x : X), (f x)ᵀ

Next tactic:
have hft := summable_matrix_transpose.not.mpr hf
theorem Matrix.transpose_tsum [T2Space R] {f : X → Matrix m n R} : (∑' x, f x)ᵀ = ∑' x, (f x)ᵀ := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_transpose.tsum_eq.symm
  · have hft := summable_matrix_transpose.not.mpr hf
    

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁴ : Semiring α
inst✝³ : AddCommMonoid R
inst✝² : TopologicalSpace R
inst✝¹ : Module α R
inst✝ : T2Space R
f : X → Matrix m n R
hf : ¬Summable f
hft : ¬Summable fun x => (f x)ᵀ
⊢ (∑' (x : X), f x)ᵀ = ∑' (x : X), (f x)ᵀ

Next tactic:
rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hft, transpose_zero]
theorem Matrix.conjTranspose_tsum [StarAddMonoid R] [ContinuousStar R] [T2Space R]
    {f : X → Matrix m n R} : (∑' x, f x)ᴴ = ∑' x, (f x)ᴴ := by
  

Proof state:
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁶ : Semiring α
inst✝⁵ : AddCommMonoid R
inst✝⁴ : TopologicalSpace R
inst✝³ : Module α R
inst✝² : StarAddMonoid R
inst✝¹ : ContinuousStar R
inst✝ : T2Space R
f : X → Matrix m n R
⊢ (∑' (x : X), f x)ᴴ = ∑' (x : X), (f x)ᴴ

Next tactic:
by_cases hf : Summable f
theorem Matrix.conjTranspose_tsum [StarAddMonoid R] [ContinuousStar R] [T2Space R]
    {f : X → Matrix m n R} : (∑' x, f x)ᴴ = ∑' x, (f x)ᴴ := by
  by_cases hf : Summable f
  · 

Proof state:
case pos
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁶ : Semiring α
inst✝⁵ : AddCommMonoid R
inst✝⁴ : TopologicalSpace R
inst✝³ : Module α R
inst✝² : StarAddMonoid R
inst✝¹ : ContinuousStar R
inst✝ : T2Space R
f : X → Matrix m n R
hf : Summable f
⊢ (∑' (x : X), f x)ᴴ = ∑' (x : X), (f x)ᴴ

Next tactic:
exact hf.hasSum.matrix_conjTranspose.tsum_eq.symm
theorem Matrix.conjTranspose_tsum [StarAddMonoid R] [ContinuousStar R] [T2Space R]
    {f : X → Matrix m n R} : (∑' x, f x)ᴴ = ∑' x, (f x)ᴴ := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_conjTranspose.tsum_eq.symm
  · 

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁶ : Semiring α
inst✝⁵ : AddCommMonoid R
inst✝⁴ : TopologicalSpace R
inst✝³ : Module α R
inst✝² : StarAddMonoid R
inst✝¹ : ContinuousStar R
inst✝ : T2Space R
f : X → Matrix m n R
hf : ¬Summable f
⊢ (∑' (x : X), f x)ᴴ = ∑' (x : X), (f x)ᴴ

Next tactic:
have hft := summable_matrix_conjTranspose.not.mpr hf
theorem Matrix.conjTranspose_tsum [StarAddMonoid R] [ContinuousStar R] [T2Space R]
    {f : X → Matrix m n R} : (∑' x, f x)ᴴ = ∑' x, (f x)ᴴ := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_conjTranspose.tsum_eq.symm
  · have hft := summable_matrix_conjTranspose.not.mpr hf
    

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁶ : Semiring α
inst✝⁵ : AddCommMonoid R
inst✝⁴ : TopologicalSpace R
inst✝³ : Module α R
inst✝² : StarAddMonoid R
inst✝¹ : ContinuousStar R
inst✝ : T2Space R
f : X → Matrix m n R
hf : ¬Summable f
hft : ¬Summable fun x => (f x)ᴴ
⊢ (∑' (x : X), f x)ᴴ = ∑' (x : X), (f x)ᴴ

Next tactic:
rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hft, conjTranspose_zero]
theorem Matrix.diagonal_tsum [DecidableEq n] [T2Space R] {f : X → n → R} :
    diagonal (∑' x, f x) = ∑' x, diagonal (f x) := by
  

Proof state:
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq n
inst✝ : T2Space R
f : X → n → R
⊢ diagonal (∑' (x : X), f x) = ∑' (x : X), diagonal (f x)

Next tactic:
by_cases hf : Summable f
theorem Matrix.diagonal_tsum [DecidableEq n] [T2Space R] {f : X → n → R} :
    diagonal (∑' x, f x) = ∑' x, diagonal (f x) := by
  by_cases hf : Summable f
  · 

Proof state:
case pos
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq n
inst✝ : T2Space R
f : X → n → R
hf : Summable f
⊢ diagonal (∑' (x : X), f x) = ∑' (x : X), diagonal (f x)

Next tactic:
exact hf.hasSum.matrix_diagonal.tsum_eq.symm
theorem Matrix.diagonal_tsum [DecidableEq n] [T2Space R] {f : X → n → R} :
    diagonal (∑' x, f x) = ∑' x, diagonal (f x) := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_diagonal.tsum_eq.symm
  · 

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq n
inst✝ : T2Space R
f : X → n → R
hf : ¬Summable f
⊢ diagonal (∑' (x : X), f x) = ∑' (x : X), diagonal (f x)

Next tactic:
have hft := summable_matrix_diagonal.not.mpr hf
theorem Matrix.diagonal_tsum [DecidableEq n] [T2Space R] {f : X → n → R} :
    diagonal (∑' x, f x) = ∑' x, diagonal (f x) := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_diagonal.tsum_eq.symm
  · have hft := summable_matrix_diagonal.not.mpr hf
    

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq n
inst✝ : T2Space R
f : X → n → R
hf : ¬Summable f
hft : ¬Summable fun x => diagonal (f x)
⊢ diagonal (∑' (x : X), f x) = ∑' (x : X), diagonal (f x)

Next tactic:
rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hft]
theorem Matrix.diagonal_tsum [DecidableEq n] [T2Space R] {f : X → n → R} :
    diagonal (∑' x, f x) = ∑' x, diagonal (f x) := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_diagonal.tsum_eq.symm
  · have hft := summable_matrix_diagonal.not.mpr hf
    rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hft]
    

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq n
inst✝ : T2Space R
f : X → n → R
hf : ¬Summable f
hft : ¬Summable fun x => diagonal (f x)
⊢ diagonal 0 = 0

Next tactic:
exact diagonal_zero
theorem Matrix.blockDiagonal_tsum [DecidableEq p] [T2Space R] {f : X → p → Matrix m n R} :
    blockDiagonal (∑' x, f x) = ∑' x, blockDiagonal (f x) := by
  

Proof state:
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq p
inst✝ : T2Space R
f : X → p → Matrix m n R
⊢ blockDiagonal (∑' (x : X), f x) = ∑' (x : X), blockDiagonal (f x)

Next tactic:
by_cases hf : Summable f
theorem Matrix.blockDiagonal_tsum [DecidableEq p] [T2Space R] {f : X → p → Matrix m n R} :
    blockDiagonal (∑' x, f x) = ∑' x, blockDiagonal (f x) := by
  by_cases hf : Summable f
  · 

Proof state:
case pos
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq p
inst✝ : T2Space R
f : X → p → Matrix m n R
hf : Summable f
⊢ blockDiagonal (∑' (x : X), f x) = ∑' (x : X), blockDiagonal (f x)

Next tactic:
exact hf.hasSum.matrix_blockDiagonal.tsum_eq.symm
theorem Matrix.blockDiagonal_tsum [DecidableEq p] [T2Space R] {f : X → p → Matrix m n R} :
    blockDiagonal (∑' x, f x) = ∑' x, blockDiagonal (f x) := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_blockDiagonal.tsum_eq.symm
  · 

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq p
inst✝ : T2Space R
f : X → p → Matrix m n R
hf : ¬Summable f
⊢ blockDiagonal (∑' (x : X), f x) = ∑' (x : X), blockDiagonal (f x)

Next tactic:
have hft := summable_matrix_blockDiagonal.not.mpr hf
theorem Matrix.blockDiagonal_tsum [DecidableEq p] [T2Space R] {f : X → p → Matrix m n R} :
    blockDiagonal (∑' x, f x) = ∑' x, blockDiagonal (f x) := by
  by_cases hf : Summable f
  · exact hf.hasSum.matrix_blockDiagonal.tsum_eq.symm
  · have hft := summable_matrix_blockDiagonal.not.mpr hf
    

Proof state:
case neg
X : Type u_1
α : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
p : Type u_6
S : Type u_7
R : Type u_8
m' : l → Type u_9
n' : l → Type u_10
inst✝⁵ : Semiring α
inst✝⁴ : AddCommMonoid R
inst✝³ : TopologicalSpace R
inst✝² : Module α R
inst✝¹ : DecidableEq p
inst✝ : T2Space R
f : X → p → Matrix m n R
hf : ¬Summable f
hft : ¬Summable fun x => blockDiagonal (f x)
⊢ blockDiagonal (∑' (x : X), f x) = ∑' (x : X), blockDiagonal (f x)

Next tactic:
rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hft]