Theorem: SimpleGraph.Adj.card_commonNeighbors_lt_degree
File: Mathlib/Combinatorics/SimpleGraph/Finite.lean

tactic: erw [← Set.toFinset_card]
state_before: V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ Fintype.card ↑(G.commonNeighbors v w) < G.degree v
state_after: V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ (G.commonNeighbors v w).toFinset.card < G.degree v

tactic: apply Finset.card_lt_card
state_before: V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ (G.commonNeighbors v w).toFinset.card < G.degree v
state_after: case h
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ (G.commonNeighbors v w).toFinset ⊂ G.neighborFinset v

tactic: rw [Finset.ssubset_iff]
state_before: case h
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ (G.commonNeighbors v w).toFinset ⊂ G.neighborFinset v
state_after: case h
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ ∃ a ∉ (G.commonNeighbors v w).toFinset, insert a (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v

tactic: use w
state_before: case h
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ ∃ a ∉ (G.commonNeighbors v w).toFinset, insert a (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v
state_after: case h
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∉ (G.commonNeighbors v w).toFinset ∧ insert w (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v

tactic: constructor
state_before: case h
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∉ (G.commonNeighbors v w).toFinset ∧ insert w (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v
state_after: case h.left
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∉ (G.commonNeighbors v w).toFinset

case h.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ insert w (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v

tactic: rw [Set.mem_toFinset]
state_before: case h.left
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∉ (G.commonNeighbors v w).toFinset
state_after: case h.left
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∉ G.commonNeighbors v w

tactic: apply not_mem_commonNeighbors_right
state_before: case h.left
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∉ G.commonNeighbors v w
state_after: no goals

tactic: rw [Finset.insert_subset_iff]
state_before: case h.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ insert w (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v
state_after: case h.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∈ G.neighborFinset v ∧ (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v

tactic: constructor
state_before: case h.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∈ G.neighborFinset v ∧ (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v
state_after: case h.right.left
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∈ G.neighborFinset v

case h.right.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v

tactic: simpa
state_before: case h.right.left
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ w ∈ G.neighborFinset v
state_after: no goals

tactic: rw [neighborFinset, Set.toFinset_subset_toFinset]
state_before: case h.right.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ (G.commonNeighbors v w).toFinset ⊆ G.neighborFinset v
state_after: case h.right.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ G.commonNeighbors v w ⊆ G.neighborSet v

tactic: exact G.commonNeighbors_subset_neighborSet_left _ _
state_before: case h.right.right
V : Type u_1
G✝ : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
v w : V
h : G.Adj v w
⊢ G.commonNeighbors v w ⊆ G.neighborSet v
state_after: no goals