Theorem: Pi.linearIndependent_stdBasis
File: Mathlib/LinearAlgebra/StdBasis.lean

tactic: have hs' : ∀ j : η, LinearIndependent R fun i : ιs j => stdBasis R Ms j (v j i) := by
  intro j
  exact (hs j).map' _ (ker_stdBasis _ _ _)
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
⊢ LinearIndependent R fun ji => ↑(stdBasis R Ms ji.fst) (v ji.fst ji.snd)

tactic: apply linearIndependent_iUnion_finite hs'
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
⊢ LinearIndependent R fun ji => ↑(stdBasis R Ms ji.fst) (v ji.fst ji.snd)

tactic: intro j
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
⊢ ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)

tactic: exact (hs j).map' _ (ker_stdBasis _ _ _)
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
j : η
⊢ LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)

tactic: intro j J _ hiJ
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
⊢ ∀ (i : η) (t : Set η),
    Set.Finite t →
      ¬i ∈ t →
        Disjoint (span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))
          (⨆ (i : η) (_ : i ∈ t), span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))

tactic: simp only
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
⊢ Disjoint (span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)))
    (⨆ (i : η) (_ : i ∈ J), span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))

tactic: have h₀ :
  ∀ j, span R (range fun i : ιs j => stdBasis R Ms j (v j i)) ≤
    LinearMap.range (stdBasis R Ms j) := by
  intro j
  rw [span_le, LinearMap.range_coe]
  apply range_comp_subset_range
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
⊢ Disjoint (span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)))
    (⨆ (i : η) (_ : i ∈ J), span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))

tactic: have h₁ :
  span R (range fun i : ιs j => stdBasis R Ms j (v j i)) ≤
    ⨆ i ∈ ({j} : Set _), LinearMap.range (stdBasis R Ms i) := by
  rw [@iSup_singleton _ _ _ fun i => LinearMap.range (stdBasis R (Ms) i)]
  apply h₀
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
h₀ : ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)
⊢ Disjoint (span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)))
    (⨆ (i : η) (_ : i ∈ J), span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))

tactic: have h₂ :
  (⨆ j ∈ J, span R (range fun i : ιs j => stdBasis R Ms j (v j i))) ≤
    ⨆ j ∈ J, LinearMap.range (stdBasis R (fun j : η => Ms j) j) :=
  iSup₂_mono fun i _ => h₀ i
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
h₀ : ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)
h₁ : span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ ⨆ (i : η) (_ : i ∈ {j}), LinearMap.range (stdBasis R Ms i)
⊢ Disjoint (span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)))
    (⨆ (i : η) (_ : i ∈ J), span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))

tactic: have h₃ : Disjoint (fun i : η => i ∈ ({j} : Set _)) J := by
  convert Set.disjoint_singleton_left.2 hiJ using 0
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
h₀ : ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)
h₁ : span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ ⨆ (i : η) (_ : i ∈ {j}), LinearMap.range (stdBasis R Ms i)
h₂ :
  (⨆ (j : η) (_ : j ∈ J), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i))) ≤
    ⨆ (j : η) (_ : j ∈ J), LinearMap.range (stdBasis R (fun j => Ms j) j)
⊢ Disjoint (span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)))
    (⨆ (i : η) (_ : i ∈ J), span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))

tactic: exact (disjoint_stdBasis_stdBasis _ _ _ _ h₃).mono h₁ h₂
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
h₀ : ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)
h₁ : span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ ⨆ (i : η) (_ : i ∈ {j}), LinearMap.range (stdBasis R Ms i)
h₂ :
  (⨆ (j : η) (_ : j ∈ J), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i))) ≤
    ⨆ (j : η) (_ : j ∈ J), LinearMap.range (stdBasis R (fun j => Ms j) j)
h₃ : Disjoint (fun i => i ∈ {j}) J
⊢ Disjoint (span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)))
    (⨆ (i : η) (_ : i ∈ J), span R (Set.range fun i_1 => ↑(stdBasis R Ms i) (v i i_1)))

tactic: intro j
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
⊢ ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)

tactic: rw [span_le, LinearMap.range_coe]
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j✝ : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j✝ ∈ J
j : η
⊢ span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)

tactic: apply range_comp_subset_range
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j✝ : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j✝ ∈ J
j : η
⊢ (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ⊆ Set.range ↑(stdBasis R Ms j)

tactic: rw [@iSup_singleton _ _ _ fun i => LinearMap.range (stdBasis R (Ms) i)]
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
h₀ : ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)
⊢ span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ ⨆ (i : η) (_ : i ∈ {j}), LinearMap.range (stdBasis R Ms i)

tactic: apply h₀
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
h₀ : ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)
⊢ span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)

tactic: convert Set.disjoint_singleton_left.2 hiJ using 0
state_before: R : Type u_1
η : Type u_3
ιs : η → Type u_4
Ms : η → Type u_2
inst✝³ : Ring R
inst✝² : (i : η) → AddCommGroup (Ms i)
inst✝¹ : (i : η) → Module R (Ms i)
inst✝ : DecidableEq η
v : (j : η) → ιs j → Ms j
hs : ∀ (i : η), LinearIndependent R (v i)
hs' : ∀ (j : η), LinearIndependent R fun i => ↑(stdBasis R Ms j) (v j i)
j : η
J : Set η
a✝ : Set.Finite J
hiJ : ¬j ∈ J
h₀ : ∀ (j : η), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ LinearMap.range (stdBasis R Ms j)
h₁ : span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i)) ≤ ⨆ (i : η) (_ : i ∈ {j}), LinearMap.range (stdBasis R Ms i)
h₂ :
  (⨆ (j : η) (_ : j ∈ J), span R (Set.range fun i => ↑(stdBasis R Ms j) (v j i))) ≤
    ⨆ (j : η) (_ : j ∈ J), LinearMap.range (stdBasis R (fun j => Ms j) j)
⊢ Disjoint (fun i => i ∈ {j}) J