l3lab/ntp-mathlib huggingface dataset:
theorem range_eq_top : f.range = ⊤ ↔ Function.Surjective f := by
  

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
f : M →ₗ⁅R,L⁆ N
⊢ range f = ⊤ ↔ Function.Surjective ⇑f

Next tactic:
rw [SetLike.ext'_iff, coe_range, LieSubmodule.top_coe, Set.range_iff_surjective]
@[simp]
theorem ker_incl : N.incl.ker = ⊥ := by 

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
⊢ LieModuleHom.ker (incl N) = ⊥

Next tactic:
simp [← LieSubmodule.coe_toSubmodule_eq_iff]
@[simp]
theorem range_incl : N.incl.range = N := by 

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
⊢ LieModuleHom.range (incl N) = N

Next tactic:
simp [← LieSubmodule.coe_toSubmodule_eq_iff]
@[simp]
theorem comap_incl_self : comap N.incl N = ⊤ := by 

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
⊢ comap (incl N) N = ⊤

Next tactic:
simp [← LieSubmodule.coe_toSubmodule_eq_iff]
theorem map_incl_top : (⊤ : LieSubmodule R L N).map N.incl = N := by 

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
⊢ map (incl N) ⊤ = N

Next tactic:
simp
@[simp]
lemma map_le_range {M' : Type*}
    [AddCommGroup M'] [Module R M'] [LieRingModule L M'] (f : M →ₗ⁅R,L⁆ M') :
    N.map f ≤ f.range := by
  

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : LieRingModule L M
inst✝³ : LieModule R L M
N : LieSubmodule R L M
M' : Type u_1
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
inst✝ : LieRingModule L M'
f : M →ₗ⁅R,L⁆ M'
⊢ map f N ≤ LieModuleHom.range f

Next tactic:
rw [← LieModuleHom.map_top]
@[simp]
lemma map_le_range {M' : Type*}
    [AddCommGroup M'] [Module R M'] [LieRingModule L M'] (f : M →ₗ⁅R,L⁆ M') :
    N.map f ≤ f.range := by
  rw [← LieModuleHom.map_top]
  

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : LieRingModule L M
inst✝³ : LieModule R L M
N : LieSubmodule R L M
M' : Type u_1
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
inst✝ : LieRingModule L M'
f : M →ₗ⁅R,L⁆ M'
⊢ map f N ≤ map f ⊤

Next tactic:
exact LieSubmodule.map_mono le_top
@[simp]
lemma map_incl_lt_iff_lt_top {N' : LieSubmodule R L N} :
    N'.map (LieSubmodule.incl N) < N ↔ N' < ⊤ := by
  

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
N' : LieSubmodule R L ↥↑N
⊢ map (incl N) N' < N ↔ N' < ⊤

Next tactic:
convert (LieSubmodule.mapOrderEmbedding (f := N.incl) Subtype.coe_injective).lt_iff_lt
@[simp]
lemma map_incl_lt_iff_lt_top {N' : LieSubmodule R L N} :
    N'.map (LieSubmodule.incl N) < N ↔ N' < ⊤ := by
  convert (LieSubmodule.mapOrderEmbedding (f := N.incl) Subtype.coe_injective).lt_iff_lt
  

Proof state:
case h.e'_1.h.e'_4
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
N' : LieSubmodule R L ↥↑N
⊢ N = (mapOrderEmbedding (_ : Function.Injective fun a => ↑a)) ⊤

Next tactic:
simp
@[simp]
lemma map_incl_le {N' : LieSubmodule R L N} :
    N'.map N.incl ≤ N := by
  

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
N' : LieSubmodule R L ↥↑N
⊢ map (incl N) N' ≤ N

Next tactic:
conv_rhs => rw [← N.map_incl_top]
@[simp]
lemma map_incl_le {N' : LieSubmodule R L N} :
    N'.map N.incl ≤ N := by
  conv_rhs => 

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
N' : LieSubmodule R L ↥↑N
| N

Next tactic:
rw [← N.map_incl_top]
@[simp]
lemma map_incl_le {N' : LieSubmodule R L N} :
    N'.map N.incl ≤ N := by
  conv_rhs => rw [← N.map_incl_top]
  

Proof state:
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N : LieSubmodule R L M
N' : LieSubmodule R L ↥↑N
⊢ map (incl N) N' ≤ map (incl N) ⊤

Next tactic:
exact LieSubmodule.map_mono le_top
/-- The natural equivalence between the 'top' Lie subalgebra and the enclosing Lie algebra.

This is the Lie subalgebra version of `Submodule.topEquiv`. -/
def LieSubalgebra.topEquiv : (⊤ : LieSubalgebra R L) ≃ₗ⁅R⁆ L :=
  { (⊤ : LieSubalgebra R L).incl with
    invFun := fun x ↦ ⟨x, Set.mem_univ x⟩
    left_inv := fun x ↦ by 

Proof state:
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
src✝ : ↥⊤ →ₗ⁅R⁆ L := incl ⊤
x : ↥⊤
⊢ (fun x => { val := x, property := (_ : x ∈ Set.univ) })
      (AddHom.toFun
        (↑{ toLinearMap := ↑src✝,
              map_lie' :=
                (_ :
                  ∀ {x y : ↥⊤},
                    AddHom.toFun src✝.toAddHom ⁅x, y⁆ =
                      ⁅AddHom.toFun src✝.toAddHom x, AddHom.toFun src✝.toAddHom y⁆) }).toAddHom
        x) =
    x

Next tactic:
ext
/-- The natural equivalence between the 'top' Lie subalgebra and the enclosing Lie algebra.

This is the Lie subalgebra version of `Submodule.topEquiv`. -/
def LieSubalgebra.topEquiv : (⊤ : LieSubalgebra R L) ≃ₗ⁅R⁆ L :=
  { (⊤ : LieSubalgebra R L).incl with
    invFun := fun x ↦ ⟨x, Set.mem_univ x⟩
    left_inv := fun x ↦ by ext; 

Proof state:
case a
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
src✝ : ↥⊤ →ₗ⁅R⁆ L := incl ⊤
x : ↥⊤
⊢ ↑((fun x => { val := x, property := (_ : x ∈ Set.univ) })
        (AddHom.toFun
          (↑{ toLinearMap := ↑src✝,
                map_lie' :=
                  (_ :
                    ∀ {x y : ↥⊤},
                      AddHom.toFun src✝.toAddHom ⁅x, y⁆ =
                        ⁅AddHom.toFun src✝.toAddHom x, AddHom.toFun src✝.toAddHom y⁆) }).toAddHom
          x)) =
    ↑x

Next tactic:
rfl
@[simp] lemma LieModuleEquiv.range_coe {M' : Type*}
    [AddCommGroup M'] [Module R M'] [LieRingModule L M'] (e : M ≃ₗ⁅R,L⁆ M') :
    LieModuleHom.range (e : M →ₗ⁅R,L⁆ M') = ⊤ := by
  

Proof state:
R : Type u
L : Type v
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
M : Type u_1
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : LieRingModule L M
inst✝³ : LieModule R L M
M' : Type u_2
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
inst✝ : LieRingModule L M'
e : M ≃ₗ⁅R,L⁆ M'
⊢ LieModuleHom.range e.toLieModuleHom = ⊤

Next tactic:
rw [LieModuleHom.range_eq_top]
@[simp] lemma LieModuleEquiv.range_coe {M' : Type*}
    [AddCommGroup M'] [Module R M'] [LieRingModule L M'] (e : M ≃ₗ⁅R,L⁆ M') :
    LieModuleHom.range (e : M →ₗ⁅R,L⁆ M') = ⊤ := by
  rw [LieModuleHom.range_eq_top]
  

Proof state:
R : Type u
L : Type v
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
M : Type u_1
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : LieRingModule L M
inst✝³ : LieModule R L M
M' : Type u_2
inst✝² : AddCommGroup M'
inst✝¹ : Module R M'
inst✝ : LieRingModule L M'
e : M ≃ₗ⁅R,L⁆ M'
⊢ Function.Surjective ⇑e.toLieModuleHom

Next tactic:
exact e.surjective
@[simp]
theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by
  

Proof state:
a : ℝ
⊢ interior {z | z.re ≤ a} = {z | z.re < a}

Next tactic:
simpa only [interior_Iic] using interior_preimage_re (Iic a)
@[simp]
theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by
  

Proof state:
a : ℝ
⊢ interior {z | z.im ≤ a} = {z | z.im < a}

Next tactic:
simpa only [interior_Iic] using interior_preimage_im (Iic a)
@[simp]
theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by
  

Proof state:
a : ℝ
⊢ interior {z | a ≤ z.re} = {z | a < z.re}

Next tactic:
simpa only [interior_Ici] using interior_preimage_re (Ici a)
@[simp]
theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by
  

Proof state:
a : ℝ
⊢ interior {z | a ≤ z.im} = {z | a < z.im}

Next tactic:
simpa only [interior_Ici] using interior_preimage_im (Ici a)
@[simp]
theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by
  

Proof state:
a : ℝ
⊢ closure {z | z.re < a} = {z | z.re ≤ a}

Next tactic:
simpa only [closure_Iio] using closure_preimage_re (Iio a)
@[simp]
theorem closure_setOf_im_lt (a : ℝ) : closure { z : ℂ | z.im < a } = { z | z.im ≤ a } := by
  

Proof state:
a : ℝ
⊢ closure {z | z.im < a} = {z | z.im ≤ a}

Next tactic:
simpa only [closure_Iio] using closure_preimage_im (Iio a)
@[simp]
theorem closure_setOf_lt_re (a : ℝ) : closure { z : ℂ | a < z.re } = { z | a ≤ z.re } := by
  

Proof state:
a : ℝ
⊢ closure {z | a < z.re} = {z | a ≤ z.re}

Next tactic:
simpa only [closure_Ioi] using closure_preimage_re (Ioi a)
@[simp]
theorem closure_setOf_lt_im (a : ℝ) : closure { z : ℂ | a < z.im } = { z | a ≤ z.im } := by
  

Proof state:
a : ℝ
⊢ closure {z | a < z.im} = {z | a ≤ z.im}

Next tactic:
simpa only [closure_Ioi] using closure_preimage_im (Ioi a)
@[simp]
theorem frontier_setOf_re_le (a : ℝ) : frontier { z : ℂ | z.re ≤ a } = { z | z.re = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | z.re ≤ a} = {z | z.re = a}

Next tactic:
simpa only [frontier_Iic] using frontier_preimage_re (Iic a)
@[simp]
theorem frontier_setOf_im_le (a : ℝ) : frontier { z : ℂ | z.im ≤ a } = { z | z.im = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | z.im ≤ a} = {z | z.im = a}

Next tactic:
simpa only [frontier_Iic] using frontier_preimage_im (Iic a)
@[simp]
theorem frontier_setOf_le_re (a : ℝ) : frontier { z : ℂ | a ≤ z.re } = { z | z.re = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | a ≤ z.re} = {z | z.re = a}

Next tactic:
simpa only [frontier_Ici] using frontier_preimage_re (Ici a)
@[simp]
theorem frontier_setOf_le_im (a : ℝ) : frontier { z : ℂ | a ≤ z.im } = { z | z.im = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | a ≤ z.im} = {z | z.im = a}

Next tactic:
simpa only [frontier_Ici] using frontier_preimage_im (Ici a)
@[simp]
theorem frontier_setOf_re_lt (a : ℝ) : frontier { z : ℂ | z.re < a } = { z | z.re = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | z.re < a} = {z | z.re = a}

Next tactic:
simpa only [frontier_Iio] using frontier_preimage_re (Iio a)
@[simp]
theorem frontier_setOf_im_lt (a : ℝ) : frontier { z : ℂ | z.im < a } = { z | z.im = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | z.im < a} = {z | z.im = a}

Next tactic:
simpa only [frontier_Iio] using frontier_preimage_im (Iio a)
@[simp]
theorem frontier_setOf_lt_re (a : ℝ) : frontier { z : ℂ | a < z.re } = { z | z.re = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | a < z.re} = {z | z.re = a}

Next tactic:
simpa only [frontier_Ioi] using frontier_preimage_re (Ioi a)
@[simp]
theorem frontier_setOf_lt_im (a : ℝ) : frontier { z : ℂ | a < z.im } = { z | z.im = a } := by
  

Proof state:
a : ℝ
⊢ frontier {z | a < z.im} = {z | z.im = a}

Next tactic:
simpa only [frontier_Ioi] using frontier_preimage_im (Ioi a)
theorem closure_reProdIm (s t : Set ℝ) : closure (s ×ℂ t) = closure s ×ℂ closure t := by
  

Proof state:
s t : Set ℝ
⊢ closure (s ×ℂ t) = closure s ×ℂ closure t

Next tactic:
simpa only [← preimage_eq_preimage equivRealProdClm.symm.toHomeomorph.surjective,
    equivRealProdClm.symm.toHomeomorph.preimage_closure] using @closure_prod_eq _ _ _ _ s t
theorem interior_reProdIm (s t : Set ℝ) : interior (s ×ℂ t) = interior s ×ℂ interior t := by
  

Proof state:
s t : Set ℝ
⊢ interior (s ×ℂ t) = interior s ×ℂ interior t

Next tactic:
rw [Set.reProdIm, Set.reProdIm, interior_inter, interior_preimage_re, interior_preimage_im]
theorem frontier_reProdIm (s t : Set ℝ) :
    frontier (s ×ℂ t) = closure s ×ℂ frontier t ∪ frontier s ×ℂ closure t := by
  

Proof state:
s t : Set ℝ
⊢ frontier (s ×ℂ t) = closure s ×ℂ frontier t ∪ frontier s ×ℂ closure t

Next tactic:
simpa only [← preimage_eq_preimage equivRealProdClm.symm.toHomeomorph.surjective,
    equivRealProdClm.symm.toHomeomorph.preimage_frontier] using frontier_prod_eq s t
theorem frontier_setOf_le_re_and_le_im (a b : ℝ) :
    frontier { z | a ≤ re z ∧ b ≤ im z } = { z | a ≤ re z ∧ im z = b ∨ re z = a ∧ b ≤ im z } := by
  

Proof state:
a b : ℝ
⊢ frontier {z | a ≤ z.re ∧ b ≤ z.im} = {z | a ≤ z.re ∧ z.im = b ∨ z.re = a ∧ b ≤ z.im}

Next tactic:
simpa only [closure_Ici, frontier_Ici] using frontier_reProdIm (Ici a) (Ici b)
theorem frontier_setOf_le_re_and_im_le (a b : ℝ) :
    frontier { z | a ≤ re z ∧ im z ≤ b } = { z | a ≤ re z ∧ im z = b ∨ re z = a ∧ im z ≤ b } := by
  

Proof state:
a b : ℝ
⊢ frontier {z | a ≤ z.re ∧ z.im ≤ b} = {z | a ≤ z.re ∧ z.im = b ∨ z.re = a ∧ z.im ≤ b}

Next tactic:
simpa only [closure_Ici, closure_Iic, frontier_Ici, frontier_Iic] using
    frontier_reProdIm (Ici a) (Iic b)
protected lemma connected_iff {H : G.Subgraph} :
    H.Connected ↔ H.Preconnected ∧ H.verts.Nonempty := by
  

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
H : Subgraph G
⊢ Subgraph.Connected H ↔ Subgraph.Preconnected H ∧ Set.Nonempty H.verts

Next tactic:
rw [H.connected_iff', connected_iff, H.preconnected_iff, Set.nonempty_coe_sort]
protected lemma Connected.preconnected {H : G.Subgraph} (h : H.Connected) : H.Preconnected := by
  

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
H : Subgraph G
h : Subgraph.Connected H
⊢ Subgraph.Preconnected H

Next tactic:
rw [H.connected_iff] at h
protected lemma Connected.preconnected {H : G.Subgraph} (h : H.Connected) : H.Preconnected := by
  rw [H.connected_iff] at h; 

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
H : Subgraph G
h : Subgraph.Preconnected H ∧ Set.Nonempty H.verts
⊢ Subgraph.Preconnected H

Next tactic:
exact h.1
protected lemma Connected.nonempty {H : G.Subgraph} (h : H.Connected) : H.verts.Nonempty := by
  

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
H : Subgraph G
h : Subgraph.Connected H
⊢ Set.Nonempty H.verts

Next tactic:
rw [H.connected_iff] at h
protected lemma Connected.nonempty {H : G.Subgraph} (h : H.Connected) : H.verts.Nonempty := by
  rw [H.connected_iff] at h; 

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
H : Subgraph G
h : Subgraph.Preconnected H ∧ Set.Nonempty H.verts
⊢ Set.Nonempty H.verts

Next tactic:
exact h.2
theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected := by
  

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v : V
⊢ Subgraph.Connected (SimpleGraph.singletonSubgraph G v)

Next tactic:
refine ⟨⟨?_⟩⟩
theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected := by
  refine ⟨⟨?_⟩⟩
  

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v : V
⊢ Preconnected (Subgraph.coe (SimpleGraph.singletonSubgraph G v))

Next tactic:
rintro ⟨a, ha⟩ ⟨b, hb⟩
theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  

Proof state:
case mk.mk
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v a : V
ha : a ∈ (SimpleGraph.singletonSubgraph G v).verts
b : V
hb : b ∈ (SimpleGraph.singletonSubgraph G v).verts
⊢ Reachable (Subgraph.coe (SimpleGraph.singletonSubgraph G v)) { val := a, property := ha } { val := b, property := hb }

Next tactic:
simp only [singletonSubgraph_verts, Set.mem_singleton_iff] at ha hb
theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [singletonSubgraph_verts, Set.mem_singleton_iff] at ha hb
  

Proof state:
case mk.mk
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v a : V
ha✝ : a ∈ (SimpleGraph.singletonSubgraph G v).verts
b : V
hb✝ : b ∈ (SimpleGraph.singletonSubgraph G v).verts
ha : a = v
hb : b = v
⊢ Reachable (Subgraph.coe (SimpleGraph.singletonSubgraph G v)) { val := a, property := ha✝ }
    { val := b, property := hb✝ }

Next tactic:
subst_vars
theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [singletonSubgraph_verts, Set.mem_singleton_iff] at ha hb
  subst_vars
  

Proof state:
case mk.mk
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
b : V
ha hb : b = b
⊢ Reachable (Subgraph.coe (SimpleGraph.singletonSubgraph G b)) { val := b, property := (_ : b = b) }
    { val := b, property := (_ : b = b) }

Next tactic:
rfl
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
hvw : SimpleGraph.Adj G v w
⊢ Subgraph.Connected (subgraphOfAdj G hvw)

Next tactic:
refine ⟨⟨?_⟩⟩
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  

Proof state:
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
hvw : SimpleGraph.Adj G v w
⊢ Preconnected (Subgraph.coe (subgraphOfAdj G hvw))

Next tactic:
rintro ⟨a, ha⟩ ⟨b, hb⟩
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  

Proof state:
case mk.mk
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
hvw : SimpleGraph.Adj G v w
a : V
ha : a ∈ (subgraphOfAdj G hvw).verts
b : V
hb : b ∈ (subgraphOfAdj G hvw).verts
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }

Next tactic:
simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  

Proof state:
case mk.mk
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
hvw : SimpleGraph.Adj G v w
a : V
ha✝ : a ∈ (subgraphOfAdj G hvw).verts
b : V
hb✝ : b ∈ (subgraphOfAdj G hvw).verts
ha : a = v ∨ a = w
hb : b = v ∨ b = w
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha✝ } { val := b, property := hb✝ }

Next tactic:
obtain rfl | rfl := ha
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  obtain rfl | rfl := ha <;> 

Proof state:
case mk.mk.inl
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
w a b : V
hvw : SimpleGraph.Adj G a w
ha : a ∈ (subgraphOfAdj G hvw).verts
hb✝ : b ∈ (subgraphOfAdj G hvw).verts
hb : b = a ∨ b = w
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb✝ }

Next tactic:
obtain rfl | rfl := hb
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  obtain rfl | rfl := ha <;> 

Proof state:
case mk.mk.inr
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v a b : V
hvw : SimpleGraph.Adj G v a
ha : a ∈ (subgraphOfAdj G hvw).verts
hb✝ : b ∈ (subgraphOfAdj G hvw).verts
hb : b = v ∨ b = a
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb✝ }

Next tactic:
obtain rfl | rfl := hb
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
    

Proof state:
case mk.mk.inl.inl
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
w b : V
hvw : SimpleGraph.Adj G b w
ha hb : b ∈ (subgraphOfAdj G hvw).verts
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := b, property := ha } { val := b, property := hb }

Next tactic:
first | rfl | (apply Adj.reachable; simp)
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
    first | 

Proof state:
case mk.mk.inl.inl
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
w b : V
hvw : SimpleGraph.Adj G b w
ha hb : b ∈ (subgraphOfAdj G hvw).verts
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := b, property := ha } { val := b, property := hb }

Next tactic:
rfl
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
    

Proof state:
case mk.mk.inl.inr
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
a b : V
hvw : SimpleGraph.Adj G a b
ha : a ∈ (subgraphOfAdj G hvw).verts
hb : b ∈ (subgraphOfAdj G hvw).verts
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }

Next tactic:
first | rfl | (apply Adj.reachable; simp)
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
    first | 

Proof state:
case mk.mk.inl.inr
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
a b : V
hvw : SimpleGraph.Adj G a b
ha : a ∈ (subgraphOfAdj G hvw).verts
hb : b ∈ (subgraphOfAdj G hvw).verts
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }

Next tactic:
rfl
@[simp]
theorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected := by
  refine ⟨⟨?_⟩⟩
  rintro ⟨a, ha⟩ ⟨b, hb⟩
  simp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb
  obtain rfl | rfl := ha <;> obtain rfl | rfl := hb <;>
    first | rfl | (

Proof state:
case mk.mk.inl.inr
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
a b : V
hvw : SimpleGraph.Adj G a b
ha : a ∈ (subgraphOfAdj G hvw).verts
hb : b ∈ (subgraphOfAdj G hvw).verts
⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }

Next tactic:
apply Adj.reachable