File: Mathlib/Combinatorics/SimpleGraph/Connectivity/WalkCounting.lean

full_name: SimpleGraph.set_walk_self_length_zero_eq
code: theorem set_walk_self_length_zero_eq (u : V) : {p : G.Walk u u | p.length = 0} = {Walk.nil} 
goal: {p | p.length = 0} = {SimpleGraph.Walk.nil}

full_name: SimpleGraph.set_walk_length_zero_eq_of_ne
code: theorem set_walk_length_zero_eq_of_ne {u v : V} (h : u ≠ v) :
    {p : G.Walk u v | p.length = 0} = ∅ 
goal: {p | p.length = 0} = ∅

full_name: SimpleGraph.set_walk_length_succ_eq
code: theorem set_walk_length_succ_eq (u v : V) (n : ℕ) :
    {p : G.Walk u v | p.length = n.succ} =
      ⋃ (w : V) (h : G.Adj u w), Walk.cons h '' {p' : G.Walk w v | p'.length = n} 
goal: {p | p.length = n.succ} = ⋃ w, ⋃ (h : G.Adj u w), SimpleGraph.Walk.cons h '' {p' | p'.length = n}

full_name: SimpleGraph.walkLengthTwoEquivCommonNeighbors_apply_coe
code: /-- Walks of length two from `u` to `v` correspond bijectively to common neighbours of `u` and `v`.
Note that `u` and `v` may be the same. -/
@[simps]
def walkLengthTwoEquivCommonNeighbors (u v : V) :
    {p : G.Walk u v // p.length = 2} ≃ G.commonNeighbors u v 
goal: ↑((G.walkLengthTwoEquivCommonNeighbors u v) p) = (↑p).getVert 1

full_name: SimpleGraph.walkLengthTwoEquivCommonNeighbors_symm_apply_coe
code: /-- Walks of length two from `u` to `v` correspond bijectively to common neighbours of `u` and `v`.
Note that `u` and `v` may be the same. -/
@[simps]
def walkLengthTwoEquivCommonNeighbors (u v : V) :
    {p : G.Walk u v // p.length = 2} ≃ G.commonNeighbors u v 
goal: ↑((G.walkLengthTwoEquivCommonNeighbors u v).symm w) = (SimpleGraph.Adj.toWalk ⋯).concat ⋯

full_name: SimpleGraph.walkLengthTwoEquivCommonNeighbors
code: /-- Walks of length two from `u` to `v` correspond bijectively to common neighbours of `u` and `v`.
Note that `u` and `v` may be the same. -/
@[simps]
def walkLengthTwoEquivCommonNeighbors (u v : V) :
    {p : G.Walk u v // p.length = 2} ≃ G.commonNeighbors u v 
goal: { p // p.length = 2 } ≃ ↑(G.commonNeighbors u v)

full_name: SimpleGraph.finsetWalkLength
code: /-- The `Finset` of length-`n` walks from `u` to `v`.
This is used to give `{p : G.walk u v | p.length = n}` a `Fintype` instance, and it
can also be useful as a recursive description of this set when `V` is finite.

See `SimpleGraph.coe_finsetWalkLength_eq` for the relationship between this `Finset` and
the set of length-`n` walks. -/
def finsetWalkLength (n : ℕ) (u v : V) : Finset (G.Walk u v) 
goal: Finset (G.Walk u v)

full_name: SimpleGraph.coe_finsetWalkLength_eq
code: theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
    (G.finsetWalkLength n u v : Set (G.Walk u v)) = {p : G.Walk u v | p.length = n} 
goal: ↑(G.finsetWalkLength n u v) = {p | p.length = n}

full_name: SimpleGraph.Walk.mem_finsetWalkLength_iff_length_eq
code: theorem Walk.mem_finsetWalkLength_iff_length_eq {n : ℕ} {u v : V} (p : G.Walk u v) :
    p ∈ G.finsetWalkLength n u v ↔ p.length = n 
goal: p ∈ G.finsetWalkLength n u v ↔ p.length = n

full_name: SimpleGraph.fintypeSetWalkLength
code: instance fintypeSetWalkLength (u v : V) (n : ℕ) : Fintype {p : G.Walk u v | p.length = n} 
goal: Fintype ↑{p | p.length = n}

full_name: SimpleGraph.fintypeSubtypeWalkLength
code: instance fintypeSubtypeWalkLength (u v : V) (n : ℕ) : Fintype {p : G.Walk u v // p.length = n} 
goal: Fintype { p // p.length = n }

full_name: SimpleGraph.set_walk_length_toFinset_eq
code: theorem set_walk_length_toFinset_eq (n : ℕ) (u v : V) :
    {p : G.Walk u v | p.length = n}.toFinset = G.finsetWalkLength n u v 
goal: {p | p.length = n}.toFinset = G.finsetWalkLength n u v

full_name: SimpleGraph.card_set_walk_length_eq
code: theorem card_set_walk_length_eq (u v : V) (n : ℕ) :
    Fintype.card {p : G.Walk u v | p.length = n} = (G.finsetWalkLength n u v).card 
goal: Fintype.card ↑{p | p.length = n} = (G.finsetWalkLength n u v).card

full_name: SimpleGraph.fintypeSetPathLength
code: instance fintypeSetPathLength (u v : V) (n : ℕ) :
    Fintype {p : G.Walk u v | p.IsPath ∧ p.length = n} 
goal: Fintype ↑{p | p.IsPath ∧ p.length = n}

full_name: SimpleGraph.reachable_iff_exists_finsetWalkLength_nonempty
code: theorem reachable_iff_exists_finsetWalkLength_nonempty (u v : V) :
    G.Reachable u v ↔ ∃ n : Fin (Fintype.card V), (G.finsetWalkLength n u v).Nonempty 
goal: G.Reachable u v ↔ ∃ n, (G.finsetWalkLength (↑n) u v).Nonempty

full_name: SimpleGraph.instDecidableRelReachable
code: instance : DecidableRel G.Reachable 
goal: DecidableRel G.Reachable

full_name: SimpleGraph.instFintypeConnectedComponent
code: instance : Fintype G.ConnectedComponent 
goal: Fintype G.ConnectedComponent

full_name: SimpleGraph.instDecidablePreconnected
code: instance : Decidable G.Preconnected 
goal: Decidable G.Preconnected

full_name: SimpleGraph.instDecidableConnected
code: instance : Decidable G.Connected 
goal: Decidable G.Connected

full_name: SimpleGraph.instDecidableMemSupp
code: instance instDecidableMemSupp (c : G.ConnectedComponent) (v : V) : Decidable (v ∈ c.supp) 
goal: Decidable (v ∈ c.supp)

full_name: SimpleGraph.odd_card_iff_odd_components
code: lemma odd_card_iff_odd_components : Odd (Nat.card V) ↔
    Odd (Nat.card ({(c : ConnectedComponent G) | Odd (Nat.card c.supp)})) 
goal: Odd (Nat.card V) ↔ Odd (Nat.card ↑{c | Odd (Nat.card ↑c.supp)})