Theorem: SimpleGraph.top_le_span_range_lapMatrix_ker_basis_aux
File: Mathlib/Combinatorics/SimpleGraph/LapMatrix.lean

tactic: intro x _
state_before: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
⊢ ⊤ ≤ Submodule.span ℝ (Set.range G.lapMatrix_ker_basis_aux)
state_after: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
⊢ x ∈ Submodule.span ℝ (Set.range G.lapMatrix_ker_basis_aux)

tactic: rw [mem_span_range_iff_exists_fun]
state_before: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
⊢ x ∈ Submodule.span ℝ (Set.range G.lapMatrix_ker_basis_aux)
state_after: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
⊢ ∃ c, ∑ i : G.ConnectedComponent, c i • G.lapMatrix_ker_basis_aux i = x

tactic: use Quot.lift x.val (by rw [← lapMatrix_toLin'_apply_eq_zero_iff_forall_reachable G x,
  LinearMap.map_coe_ker])
state_before: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
⊢ ∃ c, ∑ i : G.ConnectedComponent, c i • G.lapMatrix_ker_basis_aux i = x
state_after: case h
V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
⊢ ∑ i : G.ConnectedComponent, Quot.lift ↑x ⋯ i • G.lapMatrix_ker_basis_aux i = x

tactic: ext j
state_before: case h
V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
⊢ ∑ i : G.ConnectedComponent, Quot.lift ↑x ⋯ i • G.lapMatrix_ker_basis_aux i = x
state_after: case h.a.h
V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
j : V
⊢ ↑(∑ i : G.ConnectedComponent, Quot.lift ↑x ⋯ i • G.lapMatrix_ker_basis_aux i) j = ↑x j

tactic: simp only [lapMatrix_ker_basis_aux, AddSubmonoid.coe_finset_sum, Submodule.coe_toAddSubmonoid,
  SetLike.val_smul, Finset.sum_apply, Pi.smul_apply, smul_eq_mul, mul_ite, mul_one, mul_zero,
  sum_ite_eq, mem_univ, ite_true]
state_before: case h.a.h
V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
j : V
⊢ ↑(∑ i : G.ConnectedComponent, Quot.lift ↑x ⋯ i • G.lapMatrix_ker_basis_aux i) j = ↑x j
state_after: case h.a.h
V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
j : V
⊢ Quot.lift ↑x ⋯ (G.connectedComponentMk j) = ↑x j

tactic: rfl
state_before: case h.a.h
V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
j : V
⊢ Quot.lift ↑x ⋯ (G.connectedComponentMk j) = ↑x j
state_after: no goals

tactic: rw [← lapMatrix_toLin'_apply_eq_zero_iff_forall_reachable G x,
LinearMap.map_coe_ker]
state_before: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
x : ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
a✝ : x ∈ ⊤
⊢ ∀ (a b : V), G.Reachable a b → ↑x a = ↑x b
state_after: no goals