V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
n : ℕ
u v : V
⊢ (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
n : ℕ
u v : V
⊢ (adjMatrix α G ^ n) u v = ↑(Fintype.card ↑{p | Walk.length p = n})
rw [card_set_walk_length_eq]
case zero
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ u v : V
⊢ (adjMatrix α G ^ Nat.zero) u v = ↑(card (finsetWalkLength G Nat.zero u v))

case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ (adjMatrix α G ^ Nat.succ n) u v = ↑(card (finsetWalkLength G (Nat.succ n) u v))
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
n : ℕ
u v : V
⊢ (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
induction' n with n ih generalizing u v
no goals
case zero
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ u v : V
⊢ (adjMatrix α G ^ Nat.zero) u v = ↑(card (finsetWalkLength G Nat.zero u v))
obtain rfl | h := eq_or_ne u v <;> simp [finsetWalkLength, *]
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ (adjMatrix α G ^ (1 + n)) u v = ↑(card (finsetWalkLength G (Nat.succ n) u v))
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ (adjMatrix α G ^ Nat.succ n) u v = ↑(card (finsetWalkLength G (Nat.succ n) u v))
nth_rw 1 [Nat.succ_eq_one_add]
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∑ x in neighborFinset G u, ↑(card (finsetWalkLength G n x v)) =
    ↑(card
        (Finset.biUnion univ fun w =>
          Finset.map
            { toFun := fun p => Walk.cons (_ : ↑w ∈ neighborSet G u) p,
              inj' :=
                (_ :
                  ∀ (x x_1 : Walk G (↑w) v),
                    Walk.cons (_ : ↑w ∈ neighborSet G u) x = Walk.cons (_ : ↑w ∈ neighborSet G u) x_1 → x = x_1) }
            (finsetWalkLength G n (↑w) v)))
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ (adjMatrix α G ^ (1 + n)) u v = ↑(card (finsetWalkLength G (Nat.succ n) u v))
simp only [pow_add, pow_one, finsetWalkLength, ih, mul_eq_mul, adjMatrix_mul_apply]
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∑ x in neighborFinset G u, ↑(card (finsetWalkLength G n x v)) =
    ↑(∑ u_1 : ↑(neighborSet G u),
        card
          (Finset.map
            { toFun := fun p => Walk.cons (_ : ↑u_1 ∈ neighborSet G u) p,
              inj' :=
                (_ :
                  ∀ (x x_1 : Walk G (↑u_1) v),
                    Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x = Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x_1 → x = x_1) }
            (finsetWalkLength G n (↑u_1) v)))

case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∀ (x : ↑(neighborSet G u)),
    x ∈ univ →
      ∀ (y : ↑(neighborSet G u)),
        y ∈ univ →
          x ≠ y →
            Disjoint
              (Finset.map
                { toFun := fun p => Walk.cons (_ : ↑x ∈ neighborSet G u) p,
                  inj' :=
                    (_ :
                      ∀ (x_1 x_2 : Walk G (↑x) v),
                        Walk.cons (_ : ↑x ∈ neighborSet G u) x_1 = Walk.cons (_ : ↑x ∈ neighborSet G u) x_2 →
                          x_1 = x_2) }
                (finsetWalkLength G n (↑x) v))
              (Finset.map
                { toFun := fun p => Walk.cons (_ : ↑y ∈ neighborSet G u) p,
                  inj' :=
                    (_ :
                      ∀ (x x_1 : Walk G (↑y) v),
                        Walk.cons (_ : ↑y ∈ neighborSet G u) x = Walk.cons (_ : ↑y ∈ neighborSet G u) x_1 → x = x_1) }
                (finsetWalkLength G n (↑y) v))
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∑ x in neighborFinset G u, ↑(card (finsetWalkLength G n x v)) =
    ↑(card
        (Finset.biUnion univ fun w =>
          Finset.map
            { toFun := fun p => Walk.cons (_ : ↑w ∈ neighborSet G u) p,
              inj' :=
                (_ :
                  ∀ (x x_1 : Walk G (↑w) v),
                    Walk.cons (_ : ↑w ∈ neighborSet G u) x = Walk.cons (_ : ↑w ∈ neighborSet G u) x_1 → x = x_1) }
            (finsetWalkLength G n (↑w) v)))
rw [Finset.card_biUnion]
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ↑(∑ x in neighborFinset G u, card (finsetWalkLength G n x v)) =
    ↑(∑ u_1 : ↑(neighborSet G u),
        card
          (Finset.map
            { toFun := fun p => Walk.cons (_ : ↑u_1 ∈ neighborSet G u) p,
              inj' :=
                (_ :
                  ∀ (x x_1 : Walk G (↑u_1) v),
                    Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x = Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x_1 → x = x_1) }
            (finsetWalkLength G n (↑u_1) v)))
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∑ x in neighborFinset G u, ↑(card (finsetWalkLength G n x v)) =
    ↑(∑ u_1 : ↑(neighborSet G u),
        card
          (Finset.map
            { toFun := fun p => Walk.cons (_ : ↑u_1 ∈ neighborSet G u) p,
              inj' :=
                (_ :
                  ∀ (x x_1 : Walk G (↑u_1) v),
                    Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x = Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x_1 → x = x_1) }
            (finsetWalkLength G n (↑u_1) v)))
norm_cast
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∑ x in Set.toFinset (neighborSet G u), ↑(card (finsetWalkLength G n x v)) =
    ∑ x : ↑(neighborSet G u), ↑(card (finsetWalkLength G n (↑x) v))
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ↑(∑ x in neighborFinset G u, card (finsetWalkLength G n x v)) =
    ↑(∑ u_1 : ↑(neighborSet G u),
        card
          (Finset.map
            { toFun := fun p => Walk.cons (_ : ↑u_1 ∈ neighborSet G u) p,
              inj' :=
                (_ :
                  ∀ (x x_1 : Walk G (↑u_1) v),
                    Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x = Walk.cons (_ : ↑u_1 ∈ neighborSet G u) x_1 → x = x_1) }
            (finsetWalkLength G n (↑u_1) v)))
simp only [Nat.cast_sum, card_map, neighborFinset_def]
no goals
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∑ x in Set.toFinset (neighborSet G u), ↑(card (finsetWalkLength G n x v)) =
    ∑ x : ↑(neighborSet G u), ↑(card (finsetWalkLength G n (↑x) v))
apply Finset.sum_toFinset_eq_subtype
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
⊢ Disjoint
    (Finset.map
      { toFun := fun p => Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) p,
        inj' :=
          (_ :
            ∀ (x_1 x_2 : Walk G (↑{ val := x, property := hx }) v),
              Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_1 =
                  Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_2 →
                x_1 = x_2) }
      (finsetWalkLength G n (↑{ val := x, property := hx }) v))
    (Finset.map
      { toFun := fun p => Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) p,
        inj' :=
          (_ :
            ∀ (x x_1 : Walk G (↑{ val := y, property := hy }) v),
              Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x =
                  Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x_1 →
                x = x_1) }
      (finsetWalkLength G n (↑{ val := y, property := hy }) v))
case succ
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v : V
⊢ ∀ (x : ↑(neighborSet G u)),
    x ∈ univ →
      ∀ (y : ↑(neighborSet G u)),
        y ∈ univ →
          x ≠ y →
            Disjoint
              (Finset.map
                { toFun := fun p => Walk.cons (_ : ↑x ∈ neighborSet G u) p,
                  inj' :=
                    (_ :
                      ∀ (x_1 x_2 : Walk G (↑x) v),
                        Walk.cons (_ : ↑x ∈ neighborSet G u) x_1 = Walk.cons (_ : ↑x ∈ neighborSet G u) x_2 →
                          x_1 = x_2) }
                (finsetWalkLength G n (↑x) v))
              (Finset.map
                { toFun := fun p => Walk.cons (_ : ↑y ∈ neighborSet G u) p,
                  inj' :=
                    (_ :
                      ∀ (x x_1 : Walk G (↑y) v),
                        Walk.cons (_ : ↑y ∈ neighborSet G u) x = Walk.cons (_ : ↑y ∈ neighborSet G u) x_1 → x = x_1) }
                (finsetWalkLength G n (↑y) v))
rintro ⟨x, hx⟩ - ⟨y, hy⟩ - hxy
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
⊢ Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x_1 x_2 : Walk G (↑{ val := x, property := hx }) v),
                Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_1 =
                    Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_2 →
                  x_1 = x_2) }
        (finsetWalkLength G n (↑{ val := x, property := hx }) v) ⊓
      Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x x_1 : Walk G (↑{ val := y, property := hy }) v),
                Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x =
                    Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x_1 →
                  x = x_1) }
        (finsetWalkLength G n (↑{ val := y, property := hy }) v) ≤
    ⊥
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
⊢ Disjoint
    (Finset.map
      { toFun := fun p => Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) p,
        inj' :=
          (_ :
            ∀ (x_1 x_2 : Walk G (↑{ val := x, property := hx }) v),
              Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_1 =
                  Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_2 →
                x_1 = x_2) }
      (finsetWalkLength G n (↑{ val := x, property := hx }) v))
    (Finset.map
      { toFun := fun p => Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) p,
        inj' :=
          (_ :
            ∀ (x x_1 : Walk G (↑{ val := y, property := hy }) v),
              Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x =
                  Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x_1 →
                x = x_1) }
      (finsetWalkLength G n (↑{ val := y, property := hy }) v))
rw [disjoint_iff_inf_le]
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
p : Walk G u v
hp :
  p ∈
    Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x_1 x_2 : Walk G (↑{ val := x, property := hx }) v),
                Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_1 =
                    Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_2 →
                  x_1 = x_2) }
        (finsetWalkLength G n (↑{ val := x, property := hx }) v) ⊓
      Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x x_1 : Walk G (↑{ val := y, property := hy }) v),
                Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x =
                    Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x_1 →
                  x = x_1) }
        (finsetWalkLength G n (↑{ val := y, property := hy }) v)
⊢ p ∈ ⊥
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
⊢ Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x_1 x_2 : Walk G (↑{ val := x, property := hx }) v),
                Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_1 =
                    Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_2 →
                  x_1 = x_2) }
        (finsetWalkLength G n (↑{ val := x, property := hx }) v) ⊓
      Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x x_1 : Walk G (↑{ val := y, property := hy }) v),
                Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x =
                    Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x_1 →
                  x = x_1) }
        (finsetWalkLength G n (↑{ val := y, property := hy }) v) ≤
    ⊥
intro p hp
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
p : Walk G u v
hp :
  (∃ a, a ∈ finsetWalkLength G n x v ∧ Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) a = p) ∧
    ∃ a, a ∈ finsetWalkLength G n y v ∧ Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) a = p
⊢ p ∈ ⊥
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
p : Walk G u v
hp :
  p ∈
    Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x_1 x_2 : Walk G (↑{ val := x, property := hx }) v),
                Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_1 =
                    Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) x_2 →
                  x_1 = x_2) }
        (finsetWalkLength G n (↑{ val := x, property := hx }) v) ⊓
      Finset.map
        { toFun := fun p => Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) p,
          inj' :=
            (_ :
              ∀ (x x_1 : Walk G (↑{ val := y, property := hy }) v),
                Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x =
                    Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) x_1 →
                  x = x_1) }
        (finsetWalkLength G n (↑{ val := y, property := hy }) v)
⊢ p ∈ ⊥
simp only [inf_eq_inter, mem_inter, mem_map, Function.Embedding.coeFn_mk, exists_prop] at hp
case succ.mk.mk.intro.intro.intro.intro.intro
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
px : Walk G x v
left✝ : px ∈ finsetWalkLength G n x v
py : Walk G y v
hpy : py ∈ finsetWalkLength G n y v
hp :
  Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) py =
    Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) px
⊢ Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) px ∈ ⊥
case succ.mk.mk
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
p : Walk G u v
hp :
  (∃ a, a ∈ finsetWalkLength G n x v ∧ Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) a = p) ∧
    ∃ a, a ∈ finsetWalkLength G n y v ∧ Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) a = p
⊢ p ∈ ⊥
obtain ⟨⟨px, _, rfl⟩, ⟨py, hpy, hp⟩⟩ := hp
case succ.mk.mk.intro.intro.intro.intro.intro.refl
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
px : Walk G x v
left✝ : px ∈ finsetWalkLength G n x v
hy : x ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := x, property := hy }
hpy : px ∈ finsetWalkLength G n x v
⊢ Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) px ∈ ⊥
case succ.mk.mk.intro.intro.intro.intro.intro
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
y : V
hy : y ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := y, property := hy }
px : Walk G x v
left✝ : px ∈ finsetWalkLength G n x v
py : Walk G y v
hpy : py ∈ finsetWalkLength G n y v
hp :
  Walk.cons (_ : ↑{ val := y, property := hy } ∈ neighborSet G u) py =
    Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) px
⊢ Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) px ∈ ⊥
cases hp
no goals
case succ.mk.mk.intro.intro.intro.intro.intro.refl
V : Type u_1
α : Type u_2
β : Type ?u.68771
G : SimpleGraph V
inst✝³ : DecidableRel G.Adj
inst✝² : Fintype V
inst✝¹ : DecidableEq V
inst✝ : Semiring α
u✝ v✝ : V
n : ℕ
ih : ∀ (u v : V), (adjMatrix α G ^ n) u v = ↑(card (finsetWalkLength G n u v))
u v x : V
hx : x ∈ neighborSet G u
px : Walk G x v
left✝ : px ∈ finsetWalkLength G n x v
hy : x ∈ neighborSet G u
hxy : { val := x, property := hx } ≠ { val := x, property := hy }
hpy : px ∈ finsetWalkLength G n x v
⊢ Walk.cons (_ : ↑{ val := x, property := hx } ∈ neighborSet G u) px ∈ ⊥
simp at hxy