Theorem: SimpleGraph.IsSRGWith.card_commonNeighbors_eq_of_adj_compl
File: Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean

tactic: simp only [← Set.toFinset_card, commonNeighbors, Set.toFinset_inter, neighborSet_compl,
  Set.toFinset_diff, Set.toFinset_singleton, Set.toFinset_compl, ← neighborFinset_def]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : Adj (Gᶜ) v w
⊢ Fintype.card ↑(commonNeighbors (Gᶜ) v w) = n - (2 * k - μ) - 2

tactic: simp_rw [compl_neighborFinset_sdiff_inter_eq]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : Adj (Gᶜ) v w
⊢ Finset.card (neighborFinset G vᶜ \ {v} ∩ (neighborFinset G wᶜ \ {w})) = n - (2 * k - μ) - 2

tactic: have hne : v ≠ w := ne_of_adj _ ha
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : Adj (Gᶜ) v w
⊢ Finset.card ((neighborFinset G vᶜ ∩ neighborFinset G wᶜ) \ ({w} ∪ {v})) = n - (2 * k - μ) - 2

tactic: rw [compl_adj] at ha
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : Adj (Gᶜ) v w
hne : v ≠ w
⊢ Finset.card ((neighborFinset G vᶜ ∩ neighborFinset G wᶜ) \ ({w} ∪ {v})) = n - (2 * k - μ) - 2

tactic: rw [card_sdiff, ← insert_eq, card_insert_of_not_mem, card_singleton, ← Finset.compl_union]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : v ≠ w ∧ ¬Adj G v w
hne : v ≠ w
⊢ Finset.card ((neighborFinset G vᶜ ∩ neighborFinset G wᶜ) \ ({w} ∪ {v})) = n - (2 * k - μ) - 2

tactic: rw [card_compl, h.card_neighborFinset_union_of_not_adj hne ha.2, ← h.card]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : v ≠ w ∧ ¬Adj G v w
hne : v ≠ w
⊢ Finset.card ((neighborFinset G v ∪ neighborFinset G w)ᶜ) - (1 + 1) = n - (2 * k - μ) - 2

tactic: simp only [hne.symm, not_false_iff, mem_singleton]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : v ≠ w ∧ ¬Adj G v w
hne : v ≠ w
⊢ ¬w ∈ {v}

tactic: intro u
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : v ≠ w ∧ ¬Adj G v w
hne : v ≠ w
⊢ {w} ∪ {v} ⊆ neighborFinset G vᶜ ∩ neighborFinset G wᶜ

tactic: simp only [mem_union, mem_compl, mem_neighborFinset, mem_inter, mem_singleton]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : v ≠ w ∧ ¬Adj G v w
hne : v ≠ w
u : V
⊢ u ∈ {w} ∪ {v} → u ∈ neighborFinset G vᶜ ∩ neighborFinset G wᶜ

tactic: rintro (rfl | rfl) <;> simpa [adj_comm] using ha.2
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
h : IsSRGWith G n k ℓ μ
v w : V
ha : v ≠ w ∧ ¬Adj G v w
hne : v ≠ w
u : V
⊢ u = w ∨ u = v → ¬Adj G v u ∧ ¬Adj G w u