Theorem: SimpleGraph.ComponentCompl.exists_adj_boundary_pair
File: Mathlib/Combinatorics/SimpleGraph/Ends/Defs.lean

tactic: refine ComponentCompl.ind fun v vnK => ?_
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
⊢ ∀ (C : G.ComponentCompl K), ∃ ck, ck.1 ∈ C ∧ ck.2 ∈ K ∧ G.Adj ck.1 ck.2
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
⊢ ∃ ck, ck.1 ∈ G.componentComplMk vnK ∧ ck.2 ∈ K ∧ G.Adj ck.1 ck.2

tactic: let C : G.ComponentCompl K := G.componentComplMk vnK
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
⊢ ∃ ck, ck.1 ∈ G.componentComplMk vnK ∧ ck.2 ∈ K ∧ G.Adj ck.1 ck.2
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
⊢ ∃ ck, ck.1 ∈ G.componentComplMk vnK ∧ ck.2 ∈ K ∧ G.Adj ck.1 ck.2

tactic: let dis := Set.disjoint_iff.mp C.disjoint_right
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
⊢ ∃ ck, ck.1 ∈ G.componentComplMk vnK ∧ ck.2 ∈ K ∧ G.Adj ck.1 ck.2
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
⊢ ∃ ck, ck.1 ∈ G.componentComplMk vnK ∧ ck.2 ∈ K ∧ G.Adj ck.1 ck.2

tactic: by_contra! h
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
⊢ ∃ ck, ck.1 ∈ G.componentComplMk vnK ∧ ck.2 ∈ K ∧ G.Adj ck.1 ck.2
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ False

tactic: suffices Set.univ = (C : Set V) by exact dis ⟨hK.choose_spec, this ▸ Set.mem_univ hK.some⟩
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ False
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ Set.univ = ↑C

tactic: symm
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ Set.univ = ↑C
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ ↑C = Set.univ

tactic: rw [Set.eq_univ_iff_forall]
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ ↑C = Set.univ
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ ∀ (x : V), x ∈ ↑C

tactic: rintro u
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
⊢ ∀ (x : V), x ∈ ↑C
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
⊢ u ∈ ↑C

tactic: by_contra unC
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
⊢ u ∈ ↑C
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
unC : u ∉ ↑C
⊢ False

tactic: obtain ⟨p⟩ := Gc v u
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
unC : u ∉ ↑C
⊢ False
state_after: case intro
V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
unC : u ∉ ↑C
p : G.Walk v u
⊢ False

tactic: obtain ⟨⟨⟨x, y⟩, xy⟩, -, xC, ynC⟩ :=
  p.exists_boundary_dart (C : Set V) (G.componentComplMk_mem vnK) unC
state_before: case intro
V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
unC : u ∉ ↑C
p : G.Walk v u
⊢ False
state_after: case intro.intro.mk.mk.intro.intro
V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
unC : u ∉ ↑C
p : G.Walk v u
x y : V
xy : G.Adj (x, y).1 (x, y).2
xC : { toProd := (x, y), adj := xy }.toProd.1 ∈ ↑C
ynC : { toProd := (x, y), adj := xy }.toProd.2 ∉ ↑C
⊢ False

tactic: exact ynC (mem_of_adj x y xC (fun yK : y ∈ K => h ⟨x, y⟩ xC yK xy) xy)
state_before: case intro.intro.mk.mk.intro.intro
V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
u : V
unC : u ∉ ↑C
p : G.Walk v u
x y : V
xy : G.Adj (x, y).1 (x, y).2
xC : { toProd := (x, y), adj := xy }.toProd.1 ∈ ↑C
ynC : { toProd := (x, y), adj := xy }.toProd.2 ∉ ↑C
⊢ False
state_after: no goals

tactic: exact dis ⟨hK.choose_spec, this ▸ Set.mem_univ hK.some⟩
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
Gc : G.Preconnected
hK : K.Nonempty
v : V
vnK : v ∉ K
C : G.ComponentCompl K := G.componentComplMk vnK
dis : K ∩ ↑C ⊆ ∅ := Set.disjoint_iff.mp (ComponentCompl.disjoint_right C)
h : ∀ (ck : V × V), ck.1 ∈ G.componentComplMk vnK → ck.2 ∈ K → ¬G.Adj ck.1 ck.2
this : Set.univ = ↑C
⊢ False
state_after: no goals