l3lab/ntp-mathlib huggingface dataset:
instance : CompletelyDistribLattice G.Subgraph :=
  { Subgraph.distribLattice with
    le := (· ≤ ·)
    sup := (· ⊔ ·)
    inf := (· ⊓ ·)
    top := ⊤
    bot := ⊥
    le_top := fun G' => ⟨Set.subset_univ _, fun a b => G'.adj_sub⟩
    bot_le := fun G' => ⟨Set.empty_subset _, fun a b => False.elim⟩
    sSup := sSup
    -- porting note: needed `apply` here to modify elaboration; previously the term itself was fine.
    le_sSup := fun s G' hG' => ⟨by apply Set.subset_iUnion₂ G' hG', fun a b hab => ⟨G', hG', hab⟩⟩
    sSup_le := fun s G' hG' =>
      ⟨Set.iUnion₂_subset fun H hH => (hG' _ hH).1, by
        rintro a b ⟨H, hH, hab⟩
        exact (hG' _ hH).2 hab⟩
    sInf := sInf
    sInf_le := fun s G' hG' => ⟨Set.iInter₂_subset G' hG', fun a b hab => hab.1 hG'⟩
    le_sInf := fun s G' hG' =>
      ⟨Set.subset_iInter₂ fun H hH => (hG' _ hH).1, fun a b hab =>
        ⟨fun H hH => (hG' _ hH).2 hab, G'.adj_sub hab⟩⟩
    iInf_iSup_eq := fun f => Subgraph.ext _ _ (by simpa using iInf_iSup_eq)
      (by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
src✝ : DistribLattice (Subgraph G) := distribLattice
ι✝ : Type u
κ✝ : ι✝ → Type u
f : (a : ι✝) → κ✝ a → Subgraph G
⊢ (⨅ a, ⨆ b, f a b).Adj = (⨆ g, ⨅ a, f a (g a)).Adj

Next tactic:
ext
instance : CompletelyDistribLattice G.Subgraph :=
  { Subgraph.distribLattice with
    le := (· ≤ ·)
    sup := (· ⊔ ·)
    inf := (· ⊓ ·)
    top := ⊤
    bot := ⊥
    le_top := fun G' => ⟨Set.subset_univ _, fun a b => G'.adj_sub⟩
    bot_le := fun G' => ⟨Set.empty_subset _, fun a b => False.elim⟩
    sSup := sSup
    -- porting note: needed `apply` here to modify elaboration; previously the term itself was fine.
    le_sSup := fun s G' hG' => ⟨by apply Set.subset_iUnion₂ G' hG', fun a b hab => ⟨G', hG', hab⟩⟩
    sSup_le := fun s G' hG' =>
      ⟨Set.iUnion₂_subset fun H hH => (hG' _ hH).1, by
        rintro a b ⟨H, hH, hab⟩
        exact (hG' _ hH).2 hab⟩
    sInf := sInf
    sInf_le := fun s G' hG' => ⟨Set.iInter₂_subset G' hG', fun a b hab => hab.1 hG'⟩
    le_sInf := fun s G' hG' =>
      ⟨Set.subset_iInter₂ fun H hH => (hG' _ hH).1, fun a b hab =>
        ⟨fun H hH => (hG' _ hH).2 hab, G'.adj_sub hab⟩⟩
    iInf_iSup_eq := fun f => Subgraph.ext _ _ (by simpa using iInf_iSup_eq)
      (by ext; 

Proof state:
case h.h.a
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
src✝ : DistribLattice (Subgraph G) := distribLattice
ι✝ : Type u
κ✝ : ι✝ → Type u
f : (a : ι✝) → κ✝ a → Subgraph G
x✝¹ x✝ : V
⊢ Adj (⨅ a, ⨆ b, f a b) x✝¹ x✝ ↔ Adj (⨆ g, ⨅ a, f a (g a)) x✝¹ x✝

Next tactic:
simp [Classical.skolem]
@[simp]
theorem neighborSet_sSup (s : Set G.Subgraph) (v : V) :
    (sSup s).neighborSet v = ⋃ G' ∈ s, neighborSet G' v := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
v : V
⊢ neighborSet (sSup s) v = ⋃ G' ∈ s, neighborSet G' v

Next tactic:
ext
@[simp]
theorem neighborSet_sSup (s : Set G.Subgraph) (v : V) :
    (sSup s).neighborSet v = ⋃ G' ∈ s, neighborSet G' v := by
  ext
  

Proof state:
case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
v x✝ : V
⊢ x✝ ∈ neighborSet (sSup s) v ↔ x✝ ∈ ⋃ G' ∈ s, neighborSet G' v

Next tactic:
simp
@[simp]
theorem neighborSet_sInf (s : Set G.Subgraph) (v : V) :
    (sInf s).neighborSet v = (⋂ G' ∈ s, neighborSet G' v) ∩ G.neighborSet v := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
v : V
⊢ neighborSet (sInf s) v = (⋂ G' ∈ s, neighborSet G' v) ∩ SimpleGraph.neighborSet G v

Next tactic:
ext
@[simp]
theorem neighborSet_sInf (s : Set G.Subgraph) (v : V) :
    (sInf s).neighborSet v = (⋂ G' ∈ s, neighborSet G' v) ∩ G.neighborSet v := by
  ext
  

Proof state:
case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
v x✝ : V
⊢ x✝ ∈ neighborSet (sInf s) v ↔ x✝ ∈ (⋂ G' ∈ s, neighborSet G' v) ∩ SimpleGraph.neighborSet G v

Next tactic:
simp
@[simp]
theorem neighborSet_iSup (f : ι → G.Subgraph) (v : V) :
    (⨆ i, f i).neighborSet v = ⋃ i, (f i).neighborSet v := by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
f : ι → Subgraph G
v : V
⊢ neighborSet (⨆ i, f i) v = ⋃ i, neighborSet (f i) v

Next tactic:
simp [iSup]
@[simp]
theorem neighborSet_iInf (f : ι → G.Subgraph) (v : V) :
    (⨅ i, f i).neighborSet v = (⋂ i, (f i).neighborSet v) ∩ G.neighborSet v := by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
f : ι → Subgraph G
v : V
⊢ neighborSet (⨅ i, f i) v = (⋂ i, neighborSet (f i) v) ∩ SimpleGraph.neighborSet G v

Next tactic:
simp [iInf]
@[simp]
theorem edgeSet_bot : (⊥ : Subgraph G).edgeSet = ∅ :=
  Set.ext <| Sym2.ind (by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
⊢ ∀ (x y : V), ⟦(x, y)⟧ ∈ edgeSet ⊥ ↔ ⟦(x, y)⟧ ∈ ∅

Next tactic:
simp
@[simp]
theorem edgeSet_inf {H₁ H₂ : Subgraph G} : (H₁ ⊓ H₂).edgeSet = H₁.edgeSet ∩ H₂.edgeSet :=
  Set.ext <| Sym2.ind (by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
H₁ H₂ : Subgraph G
⊢ ∀ (x y : V), ⟦(x, y)⟧ ∈ edgeSet (H₁ ⊓ H₂) ↔ ⟦(x, y)⟧ ∈ edgeSet H₁ ∩ edgeSet H₂

Next tactic:
simp
@[simp]
theorem edgeSet_sup {H₁ H₂ : Subgraph G} : (H₁ ⊔ H₂).edgeSet = H₁.edgeSet ∪ H₂.edgeSet :=
  Set.ext <| Sym2.ind (by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
H₁ H₂ : Subgraph G
⊢ ∀ (x y : V), ⟦(x, y)⟧ ∈ edgeSet (H₁ ⊔ H₂) ↔ ⟦(x, y)⟧ ∈ edgeSet H₁ ∪ edgeSet H₂

Next tactic:
simp
@[simp]
theorem edgeSet_sSup (s : Set G.Subgraph) : (sSup s).edgeSet = ⋃ G' ∈ s, edgeSet G' := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
⊢ edgeSet (sSup s) = ⋃ G' ∈ s, edgeSet G'

Next tactic:
ext e
@[simp]
theorem edgeSet_sSup (s : Set G.Subgraph) : (sSup s).edgeSet = ⋃ G' ∈ s, edgeSet G' := by
  ext e
  

Proof state:
case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
e : Sym2 V
⊢ e ∈ edgeSet (sSup s) ↔ e ∈ ⋃ G' ∈ s, edgeSet G'

Next tactic:
induction e using Sym2.ind
@[simp]
theorem edgeSet_sSup (s : Set G.Subgraph) : (sSup s).edgeSet = ⋃ G' ∈ s, edgeSet G' := by
  ext e
  induction e using Sym2.ind
  

Proof state:
case h.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
x✝ y✝ : V
⊢ ⟦(x✝, y✝)⟧ ∈ edgeSet (sSup s) ↔ ⟦(x✝, y✝)⟧ ∈ ⋃ G' ∈ s, edgeSet G'

Next tactic:
simp
@[simp]
theorem edgeSet_sInf (s : Set G.Subgraph) :
    (sInf s).edgeSet = (⋂ G' ∈ s, edgeSet G') ∩ G.edgeSet := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
⊢ edgeSet (sInf s) = (⋂ G' ∈ s, edgeSet G') ∩ SimpleGraph.edgeSet G

Next tactic:
ext e
@[simp]
theorem edgeSet_sInf (s : Set G.Subgraph) :
    (sInf s).edgeSet = (⋂ G' ∈ s, edgeSet G') ∩ G.edgeSet := by
  ext e
  

Proof state:
case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
e : Sym2 V
⊢ e ∈ edgeSet (sInf s) ↔ e ∈ (⋂ G' ∈ s, edgeSet G') ∩ SimpleGraph.edgeSet G

Next tactic:
induction e using Sym2.ind
@[simp]
theorem edgeSet_sInf (s : Set G.Subgraph) :
    (sInf s).edgeSet = (⋂ G' ∈ s, edgeSet G') ∩ G.edgeSet := by
  ext e
  induction e using Sym2.ind
  

Proof state:
case h.h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
s : Set (Subgraph G)
x✝ y✝ : V
⊢ ⟦(x✝, y✝)⟧ ∈ edgeSet (sInf s) ↔ ⟦(x✝, y✝)⟧ ∈ (⋂ G' ∈ s, edgeSet G') ∩ SimpleGraph.edgeSet G

Next tactic:
simp
@[simp]
theorem edgeSet_iSup (f : ι → G.Subgraph) :
    (⨆ i, f i).edgeSet = ⋃ i, (f i).edgeSet := by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
f : ι → Subgraph G
⊢ edgeSet (⨆ i, f i) = ⋃ i, edgeSet (f i)

Next tactic:
simp [iSup]
@[simp]
theorem edgeSet_iInf (f : ι → G.Subgraph) :
    (⨅ i, f i).edgeSet = (⋂ i, (f i).edgeSet) ∩ G.edgeSet := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
f : ι → Subgraph G
⊢ edgeSet (⨅ i, f i) = (⋂ i, edgeSet (f i)) ∩ SimpleGraph.edgeSet G

Next tactic:
simp [iInf]
theorem _root_.Disjoint.edgeSet {H₁ H₂ : Subgraph G} (h : Disjoint H₁ H₂) :
    Disjoint H₁.edgeSet H₂.edgeSet :=
  disjoint_iff_inf_le.mpr <| by 

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
H₁ H₂ : Subgraph G
h : Disjoint H₁ H₂
⊢ SimpleGraph.Subgraph.edgeSet H₁ ⊓ SimpleGraph.Subgraph.edgeSet H₂ ≤ ⊥

Next tactic:
simpa using edgeSet_mono h.le_bot
/-- Graph homomorphisms induce a covariant function on subgraphs. -/
@[simps]
protected def map {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) : G'.Subgraph where
  verts := f '' H.verts
  Adj := Relation.Map H.Adj f f
  adj_sub := by
    

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H : Subgraph G
⊢ ∀ {v w : W}, Relation.Map H.Adj (⇑f) (⇑f) v w → SimpleGraph.Adj G' v w

Next tactic:
rintro _ _ ⟨u, v, h, rfl, rfl⟩
/-- Graph homomorphisms induce a covariant function on subgraphs. -/
@[simps]
protected def map {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) : G'.Subgraph where
  verts := f '' H.verts
  Adj := Relation.Map H.Adj f f
  adj_sub := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    

Proof state:
case intro.intro.intro.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H : Subgraph G
u v : V
h : Adj H u v
⊢ SimpleGraph.Adj G' (f u) (f v)

Next tactic:
exact f.map_rel (H.adj_sub h)
/-- Graph homomorphisms induce a covariant function on subgraphs. -/
@[simps]
protected def map {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) : G'.Subgraph where
  verts := f '' H.verts
  Adj := Relation.Map H.Adj f f
  adj_sub := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    exact f.map_rel (H.adj_sub h)
  edge_vert := by
    

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H : Subgraph G
⊢ ∀ {v w : W}, Relation.Map H.Adj (⇑f) (⇑f) v w → v ∈ ⇑f '' H.verts

Next tactic:
rintro _ _ ⟨u, v, h, rfl, rfl⟩
/-- Graph homomorphisms induce a covariant function on subgraphs. -/
@[simps]
protected def map {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) : G'.Subgraph where
  verts := f '' H.verts
  Adj := Relation.Map H.Adj f f
  adj_sub := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    exact f.map_rel (H.adj_sub h)
  edge_vert := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    

Proof state:
case intro.intro.intro.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H : Subgraph G
u v : V
h : Adj H u v
⊢ f u ∈ ⇑f '' H.verts

Next tactic:
exact Set.mem_image_of_mem _ (H.edge_vert h)
/-- Graph homomorphisms induce a covariant function on subgraphs. -/
@[simps]
protected def map {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) : G'.Subgraph where
  verts := f '' H.verts
  Adj := Relation.Map H.Adj f f
  adj_sub := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    exact f.map_rel (H.adj_sub h)
  edge_vert := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    exact Set.mem_image_of_mem _ (H.edge_vert h)
  symm := by
    

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H : Subgraph G
⊢ Symmetric (Relation.Map H.Adj ⇑f ⇑f)

Next tactic:
rintro _ _ ⟨u, v, h, rfl, rfl⟩
/-- Graph homomorphisms induce a covariant function on subgraphs. -/
@[simps]
protected def map {G' : SimpleGraph W} (f : G →g G') (H : G.Subgraph) : G'.Subgraph where
  verts := f '' H.verts
  Adj := Relation.Map H.Adj f f
  adj_sub := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    exact f.map_rel (H.adj_sub h)
  edge_vert := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    exact Set.mem_image_of_mem _ (H.edge_vert h)
  symm := by
    rintro _ _ ⟨u, v, h, rfl, rfl⟩
    

Proof state:
case intro.intro.intro.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H : Subgraph G
u v : V
h : Adj H u v
⊢ Relation.Map H.Adj (⇑f) (⇑f) (f v) (f u)

Next tactic:
exact ⟨v, u, H.symm h, rfl, rfl⟩
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
⊢ Monotone (Subgraph.map f)

Next tactic:
intro H H' h
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  intro H H' h
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
h : H ≤ H'
⊢ Subgraph.map f H ≤ Subgraph.map f H'

Next tactic:
constructor
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  intro H H' h
  constructor
  · 

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
h : H ≤ H'
⊢ (Subgraph.map f H).verts ⊆ (Subgraph.map f H').verts

Next tactic:
intro
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  intro H H' h
  constructor
  · intro
    

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
h : H ≤ H'
a✝ : W
⊢ a✝ ∈ (Subgraph.map f H).verts → a✝ ∈ (Subgraph.map f H').verts

Next tactic:
simp only [map_verts, Set.mem_image, forall_exists_index, and_imp]
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  intro H H' h
  constructor
  · intro
    simp only [map_verts, Set.mem_image, forall_exists_index, and_imp]
    

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
h : H ≤ H'
a✝ : W
⊢ ∀ x ∈ H.verts, f x = a✝ → ∃ x ∈ H'.verts, f x = a✝

Next tactic:
rintro v hv rfl
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  intro H H' h
  constructor
  · intro
    simp only [map_verts, Set.mem_image, forall_exists_index, and_imp]
    rintro v hv rfl
    

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
h : H ≤ H'
v : V
hv : v ∈ H.verts
⊢ ∃ x ∈ H'.verts, f x = f v

Next tactic:
exact ⟨_, h.1 hv, rfl⟩
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  intro H H' h
  constructor
  · intro
    simp only [map_verts, Set.mem_image, forall_exists_index, and_imp]
    rintro v hv rfl
    exact ⟨_, h.1 hv, rfl⟩
  · 

Proof state:
case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
h : H ≤ H'
⊢ ∀ ⦃v w : W⦄, Adj (Subgraph.map f H) v w → Adj (Subgraph.map f H') v w

Next tactic:
rintro _ _ ⟨u, v, ha, rfl, rfl⟩
theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f) := by
  intro H H' h
  constructor
  · intro
    simp only [map_verts, Set.mem_image, forall_exists_index, and_imp]
    rintro v hv rfl
    exact ⟨_, h.1 hv, rfl⟩
  · rintro _ _ ⟨u, v, ha, rfl, rfl⟩
    

Proof state:
case right.intro.intro.intro.intro
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
h : H ≤ H'
u v : V
ha : Adj H u v
⊢ Adj (Subgraph.map f H') (f u) (f v)

Next tactic:
exact ⟨_, _, h.2 ha, rfl, rfl⟩
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a b : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
⊢ Subgraph.map f (H ⊔ H') = Subgraph.map f H ⊔ Subgraph.map f H'

Next tactic:
ext1
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · 

Proof state:
case verts
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a b : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
⊢ (Subgraph.map f (H ⊔ H')).verts = (Subgraph.map f H ⊔ Subgraph.map f H').verts

Next tactic:
simp only [Set.image_union, map_verts, verts_sup]
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · 

Proof state:
case Adj
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a b : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
⊢ (Subgraph.map f (H ⊔ H')).Adj = (Subgraph.map f H ⊔ Subgraph.map f H').Adj

Next tactic:
ext
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a b : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
x✝¹ x✝ : W
⊢ Adj (Subgraph.map f (H ⊔ H')) x✝¹ x✝ ↔ Adj (Subgraph.map f H ⊔ Subgraph.map f H') x✝¹ x✝

Next tactic:
simp only [Relation.Map, map_adj, sup_adj]
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    simp only [Relation.Map, map_adj, sup_adj]
    

Proof state:
case Adj.h.h.a
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a b : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
x✝¹ x✝ : W
⊢ (∃ a b, (Adj H a b ∨ Adj H' a b) ∧ f a = x✝¹ ∧ f b = x✝) ↔
    (∃ a b, Adj H a b ∧ f a = x✝¹ ∧ f b = x✝) ∨ ∃ a b, Adj H' a b ∧ f a = x✝¹ ∧ f b = x✝

Next tactic:
constructor
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    simp only [Relation.Map, map_adj, sup_adj]
    constructor
    · 

Proof state:
case Adj.h.h.a.mp
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a b : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
x✝¹ x✝ : W
⊢ (∃ a b, (Adj H a b ∨ Adj H' a b) ∧ f a = x✝¹ ∧ f b = x✝) →
    (∃ a b, Adj H a b ∧ f a = x✝¹ ∧ f b = x✝) ∨ ∃ a b, Adj H' a b ∧ f a = x✝¹ ∧ f b = x✝

Next tactic:
rintro ⟨a, b, h | h, rfl, rfl⟩
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    simp only [Relation.Map, map_adj, sup_adj]
    constructor
    · rintro ⟨a, b, h | h, rfl, rfl⟩
      · 

Proof state:
case Adj.h.h.a.mp.intro.intro.intro.inl.intro
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a✝ b✝ : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
a b : V
h : Adj H a b
⊢ (∃ a_1 b_1, Adj H a_1 b_1 ∧ f a_1 = f a ∧ f b_1 = f b) ∨ ∃ a_1 b_1, Adj H' a_1 b_1 ∧ f a_1 = f a ∧ f b_1 = f b

Next tactic:
exact Or.inl ⟨_, _, h, rfl, rfl⟩
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    simp only [Relation.Map, map_adj, sup_adj]
    constructor
    · rintro ⟨a, b, h | h, rfl, rfl⟩
      · exact Or.inl ⟨_, _, h, rfl, rfl⟩
      · 

Proof state:
case Adj.h.h.a.mp.intro.intro.intro.inr.intro
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a✝ b✝ : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
a b : V
h : Adj H' a b
⊢ (∃ a_1 b_1, Adj H a_1 b_1 ∧ f a_1 = f a ∧ f b_1 = f b) ∨ ∃ a_1 b_1, Adj H' a_1 b_1 ∧ f a_1 = f a ∧ f b_1 = f b

Next tactic:
exact Or.inr ⟨_, _, h, rfl, rfl⟩
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    simp only [Relation.Map, map_adj, sup_adj]
    constructor
    · rintro ⟨a, b, h | h, rfl, rfl⟩
      · exact Or.inl ⟨_, _, h, rfl, rfl⟩
      · exact Or.inr ⟨_, _, h, rfl, rfl⟩
    · 

Proof state:
case Adj.h.h.a.mpr
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a b : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
x✝¹ x✝ : W
⊢ ((∃ a b, Adj H a b ∧ f a = x✝¹ ∧ f b = x✝) ∨ ∃ a b, Adj H' a b ∧ f a = x✝¹ ∧ f b = x✝) →
    ∃ a b, (Adj H a b ∨ Adj H' a b) ∧ f a = x✝¹ ∧ f b = x✝

Next tactic:
rintro (⟨a, b, h, rfl, rfl⟩ | ⟨a, b, h, rfl, rfl⟩)
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    simp only [Relation.Map, map_adj, sup_adj]
    constructor
    · rintro ⟨a, b, h | h, rfl, rfl⟩
      · exact Or.inl ⟨_, _, h, rfl, rfl⟩
      · exact Or.inr ⟨_, _, h, rfl, rfl⟩
    · rintro (⟨a, b, h, rfl, rfl⟩ | ⟨a, b, h, rfl, rfl⟩)
      · 

Proof state:
case Adj.h.h.a.mpr.inl.intro.intro.intro.intro
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a✝ b✝ : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
a b : V
h : Adj H a b
⊢ ∃ a_1 b_1, (Adj H a_1 b_1 ∨ Adj H' a_1 b_1) ∧ f a_1 = f a ∧ f b_1 = f b

Next tactic:
exact ⟨_, _, Or.inl h, rfl, rfl⟩
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {H H' : G.Subgraph} :
    (H ⊔ H').map f = H.map f ⊔ H'.map f := by
  ext1
  · simp only [Set.image_union, map_verts, verts_sup]
  · ext
    simp only [Relation.Map, map_adj, sup_adj]
    constructor
    · rintro ⟨a, b, h | h, rfl, rfl⟩
      · exact Or.inl ⟨_, _, h, rfl, rfl⟩
      · exact Or.inr ⟨_, _, h, rfl, rfl⟩
    · rintro (⟨a, b, h, rfl, rfl⟩ | ⟨a, b, h, rfl, rfl⟩)
      · exact ⟨_, _, Or.inl h, rfl, rfl⟩
      · 

Proof state:
case Adj.h.h.a.mpr.inr.intro.intro.intro.intro
ι : Sort u_1
V : Type u
W : Type v
G✝ : SimpleGraph V
G₁ G₂ : Subgraph G✝
a✝ b✝ : V
G : SimpleGraph V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G
a b : V
h : Adj H' a b
⊢ ∃ a_1 b_1, (Adj H a_1 b_1 ∨ Adj H' a_1 b_1) ∧ f a_1 = f a ∧ f b_1 = f b

Next tactic:
exact ⟨_, _, Or.inr h, rfl, rfl⟩
theorem comap_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.comap f) := by
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
⊢ Monotone (Subgraph.comap f)

Next tactic:
intro H H' h
theorem comap_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.comap f) := by
  intro H H' h
  

Proof state:
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G'
h : H ≤ H'
⊢ Subgraph.comap f H ≤ Subgraph.comap f H'

Next tactic:
constructor
theorem comap_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.comap f) := by
  intro H H' h
  constructor
  · 

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G'
h : H ≤ H'
⊢ (Subgraph.comap f H).verts ⊆ (Subgraph.comap f H').verts

Next tactic:
intro
theorem comap_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.comap f) := by
  intro H H' h
  constructor
  · intro
    

Proof state:
case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
G' : SimpleGraph W
f : G →g G'
H H' : Subgraph G'
h : H ≤ H'
a✝ : V
⊢ a✝ ∈ (Subgraph.comap f H).verts → a✝ ∈ (Subgraph.comap f H').verts

Next tactic:
simp only [comap_verts, Set.mem_preimage]