File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

full_name: _aux_Mathlib_Combinatorics_SimpleGraph_Basic___macroRules_aesop_graph_1
code: macro (name := aesop_graph) "aesop_graph" c:Aesop.tactic_clause* : tactic =>
  `(tactic|
    aesop $c*
      (config := { introsTransparency? := some .default, terminal := true })
      (rule_sets := [$(Lean.mkIdent `SimpleGraph):ident]))
goal: Lean.Macro

full_name: aesop_graph
code: macro (name := aesop_graph) "aesop_graph" c:Aesop.tactic_clause* : tactic =>
  `(tactic|
    aesop $c*
      (config := { introsTransparency? := some .default, terminal := true })
      (rule_sets := [$(Lean.mkIdent `SimpleGraph):ident]))
goal: Lean.ParserDescr

full_name: aesop_graph?
code: macro (name := aesop_graph?) "aesop_graph?" c:Aesop.tactic_clause* : tactic =>
  `(tactic|
    aesop? $c*
      (config := { introsTransparency? := some .default, terminal := true })
      (rule_sets := [$(Lean.mkIdent `SimpleGraph):ident]))
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Combinatorics_SimpleGraph_Basic___macroRules_aesop_graph?_1
code: macro (name := aesop_graph?) "aesop_graph?" c:Aesop.tactic_clause* : tactic =>
  `(tactic|
    aesop? $c*
      (config := { introsTransparency? := some .default, terminal := true })
      (rule_sets := [$(Lean.mkIdent `SimpleGraph):ident]))
goal: Lean.Macro

full_name: aesop_graph_nonterminal
code: macro (name := aesop_graph_nonterminal) "aesop_graph_nonterminal" c:Aesop.tactic_clause* : tactic =>
  `(tactic|
    aesop $c*
      (config := { introsTransparency? := some .default, warnOnNonterminal := false })
      (rule_sets := [$(Lean.mkIdent `SimpleGraph):ident]))
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Combinatorics_SimpleGraph_Basic___macroRules_aesop_graph_nonterminal_1
code: macro (name := aesop_graph_nonterminal) "aesop_graph_nonterminal" c:Aesop.tactic_clause* : tactic =>
  `(tactic|
    aesop $c*
      (config := { introsTransparency? := some .default, warnOnNonterminal := false })
      (rule_sets := [$(Lean.mkIdent `SimpleGraph):ident]))
goal: Lean.Macro

full_name: SimpleGraph.symm
code: /-- A simple graph is an irreflexive symmetric relation `Adj` on a vertex type `V`.
The relation describes which pairs of vertices are adjacent.
There is exactly one edge for every pair of adjacent vertices;
see `SimpleGraph.edgeSet` for the corresponding edge set.
-/
@[ext, aesop safe constructors (rule_sets := [SimpleGraph])]
structure SimpleGraph (V : Type u) where
  /-- The adjacency relation of a simple graph. -/
  Adj : V → V → Prop
  symm : Symmetric Adj := by aesop_graph
  loopless : Irreflexive Adj := by aesop_graph
goal: Symmetric self.Adj

full_name: SimpleGraph
code: /-- A simple graph is an irreflexive symmetric relation `Adj` on a vertex type `V`.
The relation describes which pairs of vertices are adjacent.
There is exactly one edge for every pair of adjacent vertices;
see `SimpleGraph.edgeSet` for the corresponding edge set.
-/
@[ext, aesop safe constructors (rule_sets := [SimpleGraph])]
structure SimpleGraph (V : Type u) where
  /-- The adjacency relation of a simple graph. -/
  Adj : V → V → Prop
  symm : Symmetric Adj := by aesop_graph
  loopless : Irreflexive Adj := by aesop_graph
goal: Type u

full_name: SimpleGraph.Adj
code: /-- A simple graph is an irreflexive symmetric relation `Adj` on a vertex type `V`.
The relation describes which pairs of vertices are adjacent.
There is exactly one edge for every pair of adjacent vertices;
see `SimpleGraph.edgeSet` for the corresponding edge set.
-/
@[ext, aesop safe constructors (rule_sets := [SimpleGraph])]
structure SimpleGraph (V : Type u) where
  /-- The adjacency relation of a simple graph. -/
  Adj : V → V → Prop
  symm : Symmetric Adj := by aesop_graph
  loopless : Irreflexive Adj := by aesop_graph
goal: V → V → Prop

full_name: SimpleGraph.loopless
code: /-- A simple graph is an irreflexive symmetric relation `Adj` on a vertex type `V`.
The relation describes which pairs of vertices are adjacent.
There is exactly one edge for every pair of adjacent vertices;
see `SimpleGraph.edgeSet` for the corresponding edge set.
-/
@[ext, aesop safe constructors (rule_sets := [SimpleGraph])]
structure SimpleGraph (V : Type u) where
  /-- The adjacency relation of a simple graph. -/
  Adj : V → V → Prop
  symm : Symmetric Adj := by aesop_graph
  loopless : Irreflexive Adj := by aesop_graph
goal: Irreflexive self.Adj

full_name: SimpleGraph.mk'
code: /-- Constructor for simple graphs using a symmetric irreflexive boolean function. -/
@[simps]
def SimpleGraph.mk' {V : Type u} :
    {adj : V → V → Bool // (∀ x y, adj x y = adj y x) ∧ (∀ x, ¬ adj x x)} ↪ SimpleGraph V 
goal: { adj // (∀ (x y : V), adj x y = adj y x) ∧ ∀ (x : V), ¬adj x x = true } ↪ SimpleGraph V

full_name: SimpleGraph.mk'_apply_adj
code: /-- Constructor for simple graphs using a symmetric irreflexive boolean function. -/
@[simps]
def SimpleGraph.mk' {V : Type u} :
    {adj : V → V → Bool // (∀ x y, adj x y = adj y x) ∧ (∀ x, ¬ adj x x)} ↪ SimpleGraph V 
goal: (SimpleGraph.mk' x).Adj v w = (↑x v w = true)

full_name: instFintypeSimpleGraphOfDecidableEq
code: /-- We can enumerate simple graphs by enumerating all functions `V → V → Bool`
and filtering on whether they are symmetric and irreflexive. -/
instance {V : Type u} [Fintype V] [DecidableEq V] : Fintype (SimpleGraph V) 
goal: Fintype (SimpleGraph V)

full_name: SimpleGraph.fromRel
code: /-- Construct the simple graph induced by the given relation. It
symmetrizes the relation and makes it irreflexive. -/
def SimpleGraph.fromRel {V : Type u} (r : V → V → Prop) : SimpleGraph V 
goal: SimpleGraph V

full_name: SimpleGraph.fromRel_adj
code: @[simp]
theorem SimpleGraph.fromRel_adj {V : Type u} (r : V → V → Prop) (v w : V) :
    (SimpleGraph.fromRel r).Adj v w ↔ v ≠ w ∧ (r v w ∨ r w v) 
goal: (SimpleGraph.fromRel r).Adj v w ↔ v ≠ w ∧ (r v w ∨ r w v)

full_name: completeGraph
code: /-- The complete graph on a type `V` is the simple graph with all pairs of distinct vertices
adjacent. In `Mathlib`, this is usually referred to as `⊤`. -/
def completeGraph (V : Type u) : SimpleGraph V 
goal: SimpleGraph V

full_name: emptyGraph
code: /-- The graph with no edges on a given vertex type `V`. `Mathlib` prefers the notation `⊥`. -/
def emptyGraph (V : Type u) : SimpleGraph V 
goal: SimpleGraph V

full_name: completeBipartiteGraph
code: /-- Two vertices are adjacent in the complete bipartite graph on two vertex types
if and only if they are not from the same side.
Any bipartite graph may be regarded as a subgraph of one of these. -/
@[simps]
def completeBipartiteGraph (V W : Type*) : SimpleGraph (V ⊕ W) 
goal: SimpleGraph (V ⊕ W)

full_name: completeBipartiteGraph_adj
code: /-- Two vertices are adjacent in the complete bipartite graph on two vertex types
if and only if they are not from the same side.
Any bipartite graph may be regarded as a subgraph of one of these. -/
@[simps]
def completeBipartiteGraph (V W : Type*) : SimpleGraph (V ⊕ W) 
goal: (completeBipartiteGraph V W).Adj v w = (v.isLeft = true ∧ w.isRight = true ∨ v.isRight = true ∧ w.isLeft = true)

full_name: SimpleGraph.irrefl
code: @[simp]
protected theorem irrefl {v : V} : ¬G.Adj v v 
goal: ¬G.Adj v v

full_name: SimpleGraph.adj_comm
code: theorem adj_comm (u v : V) : G.Adj u v ↔ G.Adj v u 
goal: G.Adj u v ↔ G.Adj v u

full_name: SimpleGraph.adj_symm
code: @[symm]
theorem adj_symm (h : G.Adj u v) : G.Adj v u 
goal: G.Adj v u

full_name: SimpleGraph.Adj.symm
code: theorem Adj.symm {G : SimpleGraph V} {u v : V} (h : G.Adj u v) : G.Adj v u 
goal: G.Adj v u

full_name: SimpleGraph.ne_of_adj
code: theorem ne_of_adj (h : G.Adj a b) : a ≠ b 
goal: a ≠ b

full_name: SimpleGraph.Adj.ne
code: protected theorem Adj.ne {G : SimpleGraph V} {a b : V} (h : G.Adj a b) : a ≠ b 
goal: a ≠ b

full_name: SimpleGraph.Adj.ne'
code: protected theorem Adj.ne' {G : SimpleGraph V} {a b : V} (h : G.Adj a b) : b ≠ a 
goal: b ≠ a

full_name: SimpleGraph.ne_of_adj_of_not_adj
code: theorem ne_of_adj_of_not_adj {v w x : V} (h : G.Adj v x) (hn : ¬G.Adj w x) : v ≠ w 
goal: v ≠ w

full_name: SimpleGraph.adj_injective
code: theorem adj_injective : Injective (Adj : SimpleGraph V → V → V → Prop) 
goal: Function.Injective SimpleGraph.Adj

full_name: SimpleGraph.adj_inj
code: @[simp]
theorem adj_inj {G H : SimpleGraph V} : G.Adj = H.Adj ↔ G = H 
goal: G.Adj = H.Adj ↔ G = H

full_name: SimpleGraph.IsSubgraph
code: /-- The relation that one `SimpleGraph` is a subgraph of another.
Note that this should be spelled `≤`. -/
def IsSubgraph (x y : SimpleGraph V) : Prop 
goal: Prop

full_name: SimpleGraph.instLE
code: instance : LE (SimpleGraph V) 
goal: LE (SimpleGraph V)

full_name: SimpleGraph.isSubgraph_eq_le
code: @[simp]
theorem isSubgraph_eq_le : (IsSubgraph : SimpleGraph V → SimpleGraph V → Prop) = (· ≤ ·) 
goal: SimpleGraph.IsSubgraph = fun x x_1 => x ≤ x_1

full_name: SimpleGraph.instSup
code: /-- The supremum of two graphs `x ⊔ y` has edges where either `x` or `y` have edges. -/
instance : Sup (SimpleGraph V) 
goal: Sup (SimpleGraph V)

full_name: SimpleGraph.sup_adj
code: @[simp]
theorem sup_adj (x y : SimpleGraph V) (v w : V) : (x ⊔ y).Adj v w ↔ x.Adj v w ∨ y.Adj v w 
goal: (x ⊔ y).Adj v w ↔ x.Adj v w ∨ y.Adj v w

full_name: SimpleGraph.instInf
code: /-- The infimum of two graphs `x ⊓ y` has edges where both `x` and `y` have edges. -/
instance : Inf (SimpleGraph V) 
goal: Inf (SimpleGraph V)

full_name: SimpleGraph.inf_adj
code: @[simp]
theorem inf_adj (x y : SimpleGraph V) (v w : V) : (x ⊓ y).Adj v w ↔ x.Adj v w ∧ y.Adj v w 
goal: (x ⊓ y).Adj v w ↔ x.Adj v w ∧ y.Adj v w

full_name: SimpleGraph.hasCompl
code: /-- We define `Gᶜ` to be the `SimpleGraph V` such that no two adjacent vertices in `G`
are adjacent in the complement, and every nonadjacent pair of vertices is adjacent
(still ensuring that vertices are not adjacent to themselves). -/
instance hasCompl : HasCompl (SimpleGraph V) 
goal: HasCompl (SimpleGraph V)

full_name: SimpleGraph.compl_adj
code: @[simp]
theorem compl_adj (G : SimpleGraph V) (v w : V) : Gᶜ.Adj v w ↔ v ≠ w ∧ ¬G.Adj v w 
goal: Gᶜ.Adj v w ↔ v ≠ w ∧ ¬G.Adj v w

full_name: SimpleGraph.sdiff
code: /-- The difference of two graphs `x \ y` has the edges of `x` with the edges of `y` removed. -/
instance sdiff : SDiff (SimpleGraph V) 
goal: SDiff (SimpleGraph V)

full_name: SimpleGraph.sdiff_adj
code: @[simp]
theorem sdiff_adj (x y : SimpleGraph V) (v w : V) : (x \ y).Adj v w ↔ x.Adj v w ∧ ¬y.Adj v w 
goal: (x \ y).Adj v w ↔ x.Adj v w ∧ ¬y.Adj v w

full_name: SimpleGraph.supSet
code: instance supSet : SupSet (SimpleGraph V) 
goal: SupSet (SimpleGraph V)

full_name: SimpleGraph.infSet
code: instance infSet : InfSet (SimpleGraph V) 
goal: InfSet (SimpleGraph V)

full_name: SimpleGraph.sSup_adj
code: @[simp]
theorem sSup_adj {s : Set (SimpleGraph V)} {a b : V} : (sSup s).Adj a b ↔ ∃ G ∈ s, Adj G a b 
goal: (sSup s).Adj a b ↔ ∃ G ∈ s, G.Adj a b

full_name: SimpleGraph.sInf_adj
code: @[simp]
theorem sInf_adj {s : Set (SimpleGraph V)} : (sInf s).Adj a b ↔ (∀ G ∈ s, Adj G a b) ∧ a ≠ b 
goal: (sInf s).Adj a b ↔ (∀ G ∈ s, G.Adj a b) ∧ a ≠ b

full_name: SimpleGraph.iSup_adj
code: @[simp]
theorem iSup_adj {f : ι → SimpleGraph V} : (⨆ i, f i).Adj a b ↔ ∃ i, (f i).Adj a b 
goal: (⨆ i, f i).Adj a b ↔ ∃ i, (f i).Adj a b

full_name: SimpleGraph.iInf_adj
code: @[simp]
theorem iInf_adj {f : ι → SimpleGraph V} : (⨅ i, f i).Adj a b ↔ (∀ i, (f i).Adj a b) ∧ a ≠ b 
goal: (⨅ i, f i).Adj a b ↔ (∀ (i : ι), (f i).Adj a b) ∧ a ≠ b

full_name: SimpleGraph.sInf_adj_of_nonempty
code: theorem sInf_adj_of_nonempty {s : Set (SimpleGraph V)} (hs : s.Nonempty) :
    (sInf s).Adj a b ↔ ∀ G ∈ s, Adj G a b 
goal: (sInf s).Adj a b ↔ ∀ G ∈ s, G.Adj a b

full_name: SimpleGraph.iInf_adj_of_nonempty
code: theorem iInf_adj_of_nonempty [Nonempty ι] {f : ι → SimpleGraph V} :
    (⨅ i, f i).Adj a b ↔ ∀ i, (f i).Adj a b 
goal: (⨅ i, f i).Adj a b ↔ ∀ (i : ι), (f i).Adj a b

full_name: SimpleGraph.distribLattice
code: /-- For graphs `G`, `H`, `G ≤ H` iff `∀ a b, G.Adj a b → H.Adj a b`. -/
instance distribLattice : DistribLattice (SimpleGraph V) 
goal: DistribLattice (SimpleGraph V)

full_name: SimpleGraph.completeAtomicBooleanAlgebra
code: instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra (SimpleGraph V) 
goal: CompleteAtomicBooleanAlgebra (SimpleGraph V)

full_name: SimpleGraph.top_adj
code: @[simp]
theorem top_adj (v w : V) : (⊤ : SimpleGraph V).Adj v w ↔ v ≠ w 
goal: ⊤.Adj v w ↔ v ≠ w

full_name: SimpleGraph.bot_adj
code: @[simp]
theorem bot_adj (v w : V) : (⊥ : SimpleGraph V).Adj v w ↔ False 
goal: ⊥.Adj v w ↔ False

full_name: SimpleGraph.completeGraph_eq_top
code: @[simp]
theorem completeGraph_eq_top (V : Type u) : completeGraph V = ⊤ 
goal: completeGraph V = ⊤

full_name: SimpleGraph.emptyGraph_eq_bot
code: @[simp]
theorem emptyGraph_eq_bot (V : Type u) : emptyGraph V = ⊥ 
goal: emptyGraph V = ⊥

full_name: SimpleGraph.instInhabited_default
code: @[simps]
instance (V : Type u) : Inhabited (SimpleGraph V) 
goal: default = ⊥

full_name: SimpleGraph.instInhabited
code: @[simps]
instance (V : Type u) : Inhabited (SimpleGraph V) 
goal: Inhabited (SimpleGraph V)

full_name: SimpleGraph.instUniqueOfSubsingleton
code: instance [Subsingleton V] : Unique (SimpleGraph V) 
goal: Unique (SimpleGraph V)

full_name: SimpleGraph.instNontrivial
code: instance [Nontrivial V] : Nontrivial (SimpleGraph V) 
goal: Nontrivial (SimpleGraph V)

full_name: SimpleGraph.Bot.adjDecidable
code: instance Bot.adjDecidable : DecidableRel (⊥ : SimpleGraph V).Adj 
goal: DecidableRel ⊥.Adj

full_name: SimpleGraph.Sup.adjDecidable
code: instance Sup.adjDecidable : DecidableRel (G ⊔ H).Adj 
goal: DecidableRel (G ⊔ H).Adj

full_name: SimpleGraph.Inf.adjDecidable
code: instance Inf.adjDecidable : DecidableRel (G ⊓ H).Adj 
goal: DecidableRel (G ⊓ H).Adj

full_name: SimpleGraph.Sdiff.adjDecidable
code: instance Sdiff.adjDecidable : DecidableRel (G \ H).Adj 
goal: DecidableRel (G \ H).Adj

full_name: SimpleGraph.Top.adjDecidable
code: instance Top.adjDecidable : DecidableRel (⊤ : SimpleGraph V).Adj 
goal: DecidableRel ⊤.Adj

full_name: SimpleGraph.Compl.adjDecidable
code: instance Compl.adjDecidable : DecidableRel (Gᶜ.Adj) 
goal: DecidableRel Gᶜ.Adj

full_name: SimpleGraph.support
code: /-- `G.support` is the set of vertices that form edges in `G`. -/
def support : Set V 
goal: Set V

full_name: SimpleGraph.mem_support
code: theorem mem_support {v : V} : v ∈ G.support ↔ ∃ w, G.Adj v w 
goal: v ∈ G.support ↔ ∃ w, G.Adj v w

full_name: SimpleGraph.support_mono
code: theorem support_mono {G G' : SimpleGraph V} (h : G ≤ G') : G.support ⊆ G'.support 
goal: G.support ⊆ G'.support

full_name: SimpleGraph.neighborSet
code: /-- `G.neighborSet v` is the set of vertices adjacent to `v` in `G`. -/
def neighborSet (v : V) : Set V 
goal: Set V

full_name: SimpleGraph.neighborSet.memDecidable
code: instance neighborSet.memDecidable (v : V) [DecidableRel G.Adj] :
    DecidablePred (· ∈ G.neighborSet v) 
goal: DecidablePred fun x => x ∈ G.neighborSet v

full_name: SimpleGraph.edgeSetEmbedding
code: /-- The edges of G consist of the unordered pairs of vertices related by
`G.Adj`. This is the order embedding; for the edge set of a particular graph, see
`SimpleGraph.edgeSet`.

The way `edgeSet` is defined is such that `mem_edgeSet` is proved by `Iff.rfl`.
(That is, `s(v, w) ∈ G.edgeSet` is definitionally equal to `G.Adj v w`.)
-/
-- Porting note: We need a separate definition so that dot notation works.
def edgeSetEmbedding (V : Type*) : SimpleGraph V ↪o Set (Sym2 V) 
goal: SimpleGraph V ↪o Set (Sym2 V)

full_name: SimpleGraph.edgeSet
code: /-- `G.edgeSet` is the edge set for `G`.
This is an abbreviation for `edgeSetEmbedding G` that permits dot notation. -/
abbrev edgeSet (G : SimpleGraph V) : Set (Sym2 V) 
goal: Set (Sym2 V)

full_name: SimpleGraph.mem_edgeSet
code: @[simp]
theorem mem_edgeSet : s(v, w) ∈ G.edgeSet ↔ G.Adj v w 
goal: s(v, w) ∈ G.edgeSet ↔ G.Adj v w

full_name: SimpleGraph.not_isDiag_of_mem_edgeSet
code: theorem not_isDiag_of_mem_edgeSet : e ∈ edgeSet G → ¬e.IsDiag 
goal: e ∈ G.edgeSet → ¬e.IsDiag

full_name: SimpleGraph.edgeSet_inj
code: theorem edgeSet_inj : G₁.edgeSet = G₂.edgeSet ↔ G₁ = G₂ 
goal: G₁.edgeSet = G₂.edgeSet ↔ G₁ = G₂

full_name: SimpleGraph.edgeSet_subset_edgeSet
code: @[simp]
theorem edgeSet_subset_edgeSet : edgeSet G₁ ⊆ edgeSet G₂ ↔ G₁ ≤ G₂ 
goal: G₁.edgeSet ⊆ G₂.edgeSet ↔ G₁ ≤ G₂

full_name: SimpleGraph.edgeSet_ssubset_edgeSet
code: @[simp]
theorem edgeSet_ssubset_edgeSet : edgeSet G₁ ⊂ edgeSet G₂ ↔ G₁ < G₂ 
goal: G₁.edgeSet ⊂ G₂.edgeSet ↔ G₁ < G₂

full_name: SimpleGraph.edgeSet_injective
code: theorem edgeSet_injective : Injective (edgeSet : SimpleGraph V → Set (Sym2 V)) 
goal: Function.Injective SimpleGraph.edgeSet

full_name: SimpleGraph.edgeSet_bot
code: @[simp]
theorem edgeSet_bot : (⊥ : SimpleGraph V).edgeSet = ∅ 
goal: ⊥.edgeSet = ∅

full_name: SimpleGraph.edgeSet_top
code: @[simp]
theorem edgeSet_top : (⊤ : SimpleGraph V).edgeSet = {e | ¬e.IsDiag} 
goal: ⊤.edgeSet = {e | ¬e.IsDiag}

full_name: SimpleGraph.edgeSet_subset_setOf_not_isDiag
code: @[simp]
theorem edgeSet_subset_setOf_not_isDiag : G.edgeSet ⊆ {e | ¬e.IsDiag} 
goal: G.edgeSet ⊆ {e | ¬e.IsDiag}

full_name: SimpleGraph.edgeSet_sup
code: @[simp]
theorem edgeSet_sup : (G₁ ⊔ G₂).edgeSet = G₁.edgeSet ∪ G₂.edgeSet 
goal: (G₁ ⊔ G₂).edgeSet = G₁.edgeSet ∪ G₂.edgeSet

full_name: SimpleGraph.edgeSet_inf
code: @[simp]
theorem edgeSet_inf : (G₁ ⊓ G₂).edgeSet = G₁.edgeSet ∩ G₂.edgeSet 
goal: (G₁ ⊓ G₂).edgeSet = G₁.edgeSet ∩ G₂.edgeSet

full_name: SimpleGraph.edgeSet_sdiff
code: @[simp]
theorem edgeSet_sdiff : (G₁ \ G₂).edgeSet = G₁.edgeSet \ G₂.edgeSet 
goal: (G₁ \ G₂).edgeSet = G₁.edgeSet \ G₂.edgeSet

full_name: SimpleGraph.disjoint_edgeSet
code: @[simp] lemma disjoint_edgeSet : Disjoint G₁.edgeSet G₂.edgeSet ↔ Disjoint G₁ G₂ 
goal: Disjoint G₁.edgeSet G₂.edgeSet ↔ Disjoint G₁ G₂

full_name: SimpleGraph.edgeSet_eq_empty
code: @[simp] lemma edgeSet_eq_empty : G.edgeSet = ∅ ↔ G = ⊥ 
goal: G.edgeSet = ∅ ↔ G = ⊥

full_name: SimpleGraph.edgeSet_nonempty
code: @[simp] lemma edgeSet_nonempty : G.edgeSet.Nonempty ↔ G ≠ ⊥ 
goal: G.edgeSet.Nonempty ↔ G ≠ ⊥

full_name: SimpleGraph.edgeSet_sdiff_sdiff_isDiag
code: /-- This lemma, combined with `edgeSet_sdiff` and `edgeSet_from_edgeSet`,
allows proving `(G \ from_edgeSet s).edge_set = G.edgeSet \ s` by `simp`. -/
@[simp]
theorem edgeSet_sdiff_sdiff_isDiag (G : SimpleGraph V) (s : Set (Sym2 V)) :
    G.edgeSet \ (s \ { e | e.IsDiag }) = G.edgeSet \ s 
goal: G.edgeSet \ (s \ {e | e.IsDiag}) = G.edgeSet \ s

full_name: SimpleGraph.adj_iff_exists_edge
code: /-- Two vertices are adjacent iff there is an edge between them. The
condition `v ≠ w` ensures they are different endpoints of the edge,
which is necessary since when `v = w` the existential
`∃ (e ∈ G.edgeSet), v ∈ e ∧ w ∈ e` is satisfied by every edge
incident to `v`. -/
theorem adj_iff_exists_edge {v w : V} : G.Adj v w ↔ v ≠ w ∧ ∃ e ∈ G.edgeSet, v ∈ e ∧ w ∈ e 
goal: G.Adj v w ↔ v ≠ w ∧ ∃ e ∈ G.edgeSet, v ∈ e ∧ w ∈ e

full_name: SimpleGraph.adj_iff_exists_edge_coe
code: theorem adj_iff_exists_edge_coe : G.Adj a b ↔ ∃ e : G.edgeSet, e.val = s(a, b) 
goal: G.Adj a b ↔ ∃ e, ↑e = s(a, b)

full_name: SimpleGraph.edge_other_ne
code: theorem edge_other_ne {e : Sym2 V} (he : e ∈ G.edgeSet) {v : V} (h : v ∈ e) :
    Sym2.Mem.other h ≠ v 
goal: Sym2.Mem.other h ≠ v

full_name: SimpleGraph.decidableMemEdgeSet
code: instance decidableMemEdgeSet [DecidableRel G.Adj] : DecidablePred (· ∈ G.edgeSet) 
goal: DecidablePred fun x => x ∈ G.edgeSet

full_name: SimpleGraph.fintypeEdgeSet
code: instance fintypeEdgeSet [Fintype (Sym2 V)] [DecidableRel G.Adj] : Fintype G.edgeSet 
goal: Fintype ↑G.edgeSet

full_name: SimpleGraph.fintypeEdgeSetBot
code: instance fintypeEdgeSetBot : Fintype (⊥ : SimpleGraph V).edgeSet 
goal: Fintype ↑⊥.edgeSet

full_name: SimpleGraph.fintypeEdgeSetSup
code: instance fintypeEdgeSetSup [DecidableEq V] [Fintype G₁.edgeSet] [Fintype G₂.edgeSet] :
    Fintype (G₁ ⊔ G₂).edgeSet 
goal: Fintype ↑(G₁ ⊔ G₂).edgeSet

full_name: SimpleGraph.fintypeEdgeSetInf
code: instance fintypeEdgeSetInf [DecidableEq V] [Fintype G₁.edgeSet] [Fintype G₂.edgeSet] :
    Fintype (G₁ ⊓ G₂).edgeSet 
goal: Fintype ↑(G₁ ⊓ G₂).edgeSet

full_name: SimpleGraph.fintypeEdgeSetSdiff
code: instance fintypeEdgeSetSdiff [DecidableEq V] [Fintype G₁.edgeSet] [Fintype G₂.edgeSet] :
    Fintype (G₁ \ G₂).edgeSet 
goal: Fintype ↑(G₁ \ G₂).edgeSet

full_name: SimpleGraph.fromEdgeSet
code: /-- `fromEdgeSet` constructs a `SimpleGraph` from a set of edges, without loops. -/
def fromEdgeSet : SimpleGraph V 
goal: SimpleGraph V

full_name: SimpleGraph.fromEdgeSet_adj
code: @[simp]
theorem fromEdgeSet_adj : (fromEdgeSet s).Adj v w ↔ s(v, w) ∈ s ∧ v ≠ w 
goal: (SimpleGraph.fromEdgeSet s).Adj v w ↔ s(v, w) ∈ s ∧ v ≠ w

full_name: SimpleGraph.edgeSet_fromEdgeSet
code: @[simp]
theorem edgeSet_fromEdgeSet : (fromEdgeSet s).edgeSet = s \ { e | e.IsDiag } 
goal: (SimpleGraph.fromEdgeSet s).edgeSet = s \ {e | e.IsDiag}

full_name: SimpleGraph.fromEdgeSet_edgeSet
code: @[simp]
theorem fromEdgeSet_edgeSet : fromEdgeSet G.edgeSet = G 
goal: SimpleGraph.fromEdgeSet G.edgeSet = G

full_name: SimpleGraph.fromEdgeSet_empty
code: @[simp]
theorem fromEdgeSet_empty : fromEdgeSet (∅ : Set (Sym2 V)) = ⊥ 
goal: SimpleGraph.fromEdgeSet ∅ = ⊥

full_name: SimpleGraph.fromEdgeSet_univ
code: @[simp]
theorem fromEdgeSet_univ : fromEdgeSet (Set.univ : Set (Sym2 V)) = ⊤ 
goal: SimpleGraph.fromEdgeSet Set.univ = ⊤

full_name: SimpleGraph.fromEdgeSet_inter
code: @[simp]
theorem fromEdgeSet_inter (s t : Set (Sym2 V)) :
    fromEdgeSet (s ∩ t) = fromEdgeSet s ⊓ fromEdgeSet t 
goal: SimpleGraph.fromEdgeSet (s ∩ t) = SimpleGraph.fromEdgeSet s ⊓ SimpleGraph.fromEdgeSet t

full_name: SimpleGraph.fromEdgeSet_union
code: @[simp]
theorem fromEdgeSet_union (s t : Set (Sym2 V)) :
    fromEdgeSet (s ∪ t) = fromEdgeSet s ⊔ fromEdgeSet t 
goal: SimpleGraph.fromEdgeSet (s ∪ t) = SimpleGraph.fromEdgeSet s ⊔ SimpleGraph.fromEdgeSet t

full_name: SimpleGraph.fromEdgeSet_sdiff
code: @[simp]
theorem fromEdgeSet_sdiff (s t : Set (Sym2 V)) :
    fromEdgeSet (s \ t) = fromEdgeSet s \ fromEdgeSet t 
goal: SimpleGraph.fromEdgeSet (s \ t) = SimpleGraph.fromEdgeSet s \ SimpleGraph.fromEdgeSet t

full_name: SimpleGraph.fromEdgeSet_mono
code: @[mono]
theorem fromEdgeSet_mono {s t : Set (Sym2 V)} (h : s ⊆ t) : fromEdgeSet s ≤ fromEdgeSet t 
goal: SimpleGraph.fromEdgeSet s ≤ SimpleGraph.fromEdgeSet t

full_name: SimpleGraph.disjoint_fromEdgeSet
code: @[simp] lemma disjoint_fromEdgeSet : Disjoint G (fromEdgeSet s) ↔ Disjoint G.edgeSet s 
goal: Disjoint G (SimpleGraph.fromEdgeSet s) ↔ Disjoint G.edgeSet s

full_name: SimpleGraph.fromEdgeSet_disjoint
code: @[simp] lemma fromEdgeSet_disjoint : Disjoint (fromEdgeSet s) G ↔ Disjoint s G.edgeSet 
goal: Disjoint (SimpleGraph.fromEdgeSet s) G ↔ Disjoint s G.edgeSet

full_name: SimpleGraph.instFintypeElemSym2EdgeSetFromEdgeSetOfDecidableEq
code: instance [DecidableEq V] [Fintype s] : Fintype (fromEdgeSet s).edgeSet 
goal: Fintype ↑(SimpleGraph.fromEdgeSet s).edgeSet

full_name: SimpleGraph.incidenceSet
code: /-- Set of edges incident to a given vertex, aka incidence set. -/
def incidenceSet (v : V) : Set (Sym2 V) 
goal: Set (Sym2 V)

full_name: SimpleGraph.incidenceSet_subset
code: theorem incidenceSet_subset (v : V) : G.incidenceSet v ⊆ G.edgeSet 
goal: G.incidenceSet v ⊆ G.edgeSet

full_name: SimpleGraph.mk'_mem_incidenceSet_iff
code: theorem mk'_mem_incidenceSet_iff : s(b, c) ∈ G.incidenceSet a ↔ G.Adj b c ∧ (a = b ∨ a = c) 
goal: s(b, c) ∈ G.incidenceSet a ↔ G.Adj b c ∧ (a = b ∨ a = c)

full_name: SimpleGraph.mk'_mem_incidenceSet_left_iff
code: theorem mk'_mem_incidenceSet_left_iff : s(a, b) ∈ G.incidenceSet a ↔ G.Adj a b 
goal: s(a, b) ∈ G.incidenceSet a ↔ G.Adj a b

full_name: SimpleGraph.mk'_mem_incidenceSet_right_iff
code: theorem mk'_mem_incidenceSet_right_iff : s(a, b) ∈ G.incidenceSet b ↔ G.Adj a b 
goal: s(a, b) ∈ G.incidenceSet b ↔ G.Adj a b

full_name: SimpleGraph.edge_mem_incidenceSet_iff
code: theorem edge_mem_incidenceSet_iff {e : G.edgeSet} : ↑e ∈ G.incidenceSet a ↔ a ∈ (e : Sym2 V) 
goal: ↑e ∈ G.incidenceSet a ↔ a ∈ ↑e

full_name: SimpleGraph.incidenceSet_inter_incidenceSet_subset
code: theorem incidenceSet_inter_incidenceSet_subset (h : a ≠ b) :
    G.incidenceSet a ∩ G.incidenceSet b ⊆ {s(a, b)} 
goal: G.incidenceSet a ∩ G.incidenceSet b ⊆ {s(a, b)}

full_name: SimpleGraph.incidenceSet_inter_incidenceSet_of_adj
code: theorem incidenceSet_inter_incidenceSet_of_adj (h : G.Adj a b) :
    G.incidenceSet a ∩ G.incidenceSet b = {s(a, b)} 
goal: G.incidenceSet a ∩ G.incidenceSet b = {s(a, b)}

full_name: SimpleGraph.adj_of_mem_incidenceSet
code: theorem adj_of_mem_incidenceSet (h : a ≠ b) (ha : e ∈ G.incidenceSet a)
    (hb : e ∈ G.incidenceSet b) : G.Adj a b 
goal: G.Adj a b

full_name: SimpleGraph.incidenceSet_inter_incidenceSet_of_not_adj
code: theorem incidenceSet_inter_incidenceSet_of_not_adj (h : ¬G.Adj a b) (hn : a ≠ b) :
    G.incidenceSet a ∩ G.incidenceSet b = ∅ 
goal: G.incidenceSet a ∩ G.incidenceSet b = ∅

full_name: SimpleGraph.decidableMemIncidenceSet
code: instance decidableMemIncidenceSet [DecidableEq V] [DecidableRel G.Adj] (v : V) :
    DecidablePred (· ∈ G.incidenceSet v) 
goal: DecidablePred fun x => x ∈ G.incidenceSet v

full_name: SimpleGraph.mem_neighborSet
code: @[simp]
theorem mem_neighborSet (v w : V) : w ∈ G.neighborSet v ↔ G.Adj v w 
goal: w ∈ G.neighborSet v ↔ G.Adj v w

full_name: SimpleGraph.not_mem_neighborSet_self
code: lemma not_mem_neighborSet_self : a ∉ G.neighborSet a 
goal: a ∉ G.neighborSet a

full_name: SimpleGraph.mem_incidenceSet
code: @[simp]
theorem mem_incidenceSet (v w : V) : s(v, w) ∈ G.incidenceSet v ↔ G.Adj v w 
goal: s(v, w) ∈ G.incidenceSet v ↔ G.Adj v w

full_name: SimpleGraph.mem_incidence_iff_neighbor
code: theorem mem_incidence_iff_neighbor {v w : V} :
    s(v, w) ∈ G.incidenceSet v ↔ w ∈ G.neighborSet v 
goal: s(v, w) ∈ G.incidenceSet v ↔ w ∈ G.neighborSet v

full_name: SimpleGraph.adj_incidenceSet_inter
code: theorem adj_incidenceSet_inter {v : V} {e : Sym2 V} (he : e ∈ G.edgeSet) (h : v ∈ e) :
    G.incidenceSet v ∩ G.incidenceSet (Sym2.Mem.other h) = {e} 
goal: G.incidenceSet v ∩ G.incidenceSet (Sym2.Mem.other h) = {e}

full_name: SimpleGraph.compl_neighborSet_disjoint
code: theorem compl_neighborSet_disjoint (G : SimpleGraph V) (v : V) :
    Disjoint (G.neighborSet v) (Gᶜ.neighborSet v) 
goal: Disjoint (G.neighborSet v) (Gᶜ.neighborSet v)

full_name: SimpleGraph.neighborSet_union_compl_neighborSet_eq
code: theorem neighborSet_union_compl_neighborSet_eq (G : SimpleGraph V) (v : V) :
    G.neighborSet v ∪ Gᶜ.neighborSet v = {v}ᶜ 
goal: G.neighborSet v ∪ Gᶜ.neighborSet v = {v}ᶜ

full_name: SimpleGraph.card_neighborSet_union_compl_neighborSet
code: theorem card_neighborSet_union_compl_neighborSet [Fintype V] (G : SimpleGraph V) (v : V)
    [Fintype (G.neighborSet v ∪ Gᶜ.neighborSet v : Set V)] :
    (Set.toFinset (G.neighborSet v ∪ Gᶜ.neighborSet v)).card = Fintype.card V - 1 
goal: (G.neighborSet v ∪ Gᶜ.neighborSet v).toFinset.card = Fintype.card V - 1

full_name: SimpleGraph.neighborSet_compl
code: theorem neighborSet_compl (G : SimpleGraph V) (v : V) :
    Gᶜ.neighborSet v = (G.neighborSet v)ᶜ \ {v} 
goal: Gᶜ.neighborSet v = (G.neighborSet v)ᶜ \ {v}

full_name: SimpleGraph.commonNeighbors
code: /-- The set of common neighbors between two vertices `v` and `w` in a graph `G` is the
intersection of the neighbor sets of `v` and `w`. -/
def commonNeighbors (v w : V) : Set V 
goal: Set V

full_name: SimpleGraph.commonNeighbors_eq
code: theorem commonNeighbors_eq (v w : V) : G.commonNeighbors v w = G.neighborSet v ∩ G.neighborSet w 
goal: G.commonNeighbors v w = G.neighborSet v ∩ G.neighborSet w

full_name: SimpleGraph.mem_commonNeighbors
code: theorem mem_commonNeighbors {u v w : V} : u ∈ G.commonNeighbors v w ↔ G.Adj v u ∧ G.Adj w u 
goal: u ∈ G.commonNeighbors v w ↔ G.Adj v u ∧ G.Adj w u

full_name: SimpleGraph.commonNeighbors_symm
code: theorem commonNeighbors_symm (v w : V) : G.commonNeighbors v w = G.commonNeighbors w v 
goal: G.commonNeighbors v w = G.commonNeighbors w v

full_name: SimpleGraph.not_mem_commonNeighbors_left
code: theorem not_mem_commonNeighbors_left (v w : V) : v ∉ G.commonNeighbors v w 
goal: v ∉ G.commonNeighbors v w

full_name: SimpleGraph.not_mem_commonNeighbors_right
code: theorem not_mem_commonNeighbors_right (v w : V) : w ∉ G.commonNeighbors v w 
goal: w ∉ G.commonNeighbors v w

full_name: SimpleGraph.commonNeighbors_subset_neighborSet_left
code: theorem commonNeighbors_subset_neighborSet_left (v w : V) :
    G.commonNeighbors v w ⊆ G.neighborSet v 
goal: G.commonNeighbors v w ⊆ G.neighborSet v

full_name: SimpleGraph.commonNeighbors_subset_neighborSet_right
code: theorem commonNeighbors_subset_neighborSet_right (v w : V) :
    G.commonNeighbors v w ⊆ G.neighborSet w 
goal: G.commonNeighbors v w ⊆ G.neighborSet w

full_name: SimpleGraph.decidableMemCommonNeighbors
code: instance decidableMemCommonNeighbors [DecidableRel G.Adj] (v w : V) :
    DecidablePred (· ∈ G.commonNeighbors v w) 
goal: DecidablePred fun x => x ∈ G.commonNeighbors v w

full_name: SimpleGraph.commonNeighbors_top_eq
code: theorem commonNeighbors_top_eq {v w : V} :
    (⊤ : SimpleGraph V).commonNeighbors v w = Set.univ \ {v, w} 
goal: ⊤.commonNeighbors v w = Set.univ \ {v, w}

full_name: SimpleGraph.otherVertexOfIncident
code: /-- Given an edge incident to a particular vertex, get the other vertex on the edge. -/
def otherVertexOfIncident {v : V} {e : Sym2 V} (h : e ∈ G.incidenceSet v) : V 
goal: V

full_name: SimpleGraph.edge_other_incident_set
code: theorem edge_other_incident_set {v : V} {e : Sym2 V} (h : e ∈ G.incidenceSet v) :
    e ∈ G.incidenceSet (G.otherVertexOfIncident h) 
goal: e ∈ G.incidenceSet (G.otherVertexOfIncident h)

full_name: SimpleGraph.incidence_other_prop
code: theorem incidence_other_prop {v : V} {e : Sym2 V} (h : e ∈ G.incidenceSet v) :
    G.otherVertexOfIncident h ∈ G.neighborSet v 
goal: G.otherVertexOfIncident h ∈ G.neighborSet v

full_name: SimpleGraph.incidence_other_neighbor_edge
code: theorem incidence_other_neighbor_edge {v w : V} (h : w ∈ G.neighborSet v) :
    G.otherVertexOfIncident (G.mem_incidence_iff_neighbor.mpr h) = w 
goal: G.otherVertexOfIncident ⋯ = w

full_name: SimpleGraph.incidenceSetEquivNeighborSet_symm_apply_coe
code: /-- There is an equivalence between the set of edges incident to a given
vertex and the set of vertices adjacent to the vertex. -/
@[simps]
def incidenceSetEquivNeighborSet (v : V) : G.incidenceSet v ≃ G.neighborSet v 
goal: ↑((G.incidenceSetEquivNeighborSet v).symm w) = s(v, ↑w)

full_name: SimpleGraph.incidenceSetEquivNeighborSet_apply_coe
code: /-- There is an equivalence between the set of edges incident to a given
vertex and the set of vertices adjacent to the vertex. -/
@[simps]
def incidenceSetEquivNeighborSet (v : V) : G.incidenceSet v ≃ G.neighborSet v 
goal: ↑((G.incidenceSetEquivNeighborSet v) e) = G.otherVertexOfIncident ⋯

full_name: SimpleGraph.incidenceSetEquivNeighborSet
code: /-- There is an equivalence between the set of edges incident to a given
vertex and the set of vertices adjacent to the vertex. -/
@[simps]
def incidenceSetEquivNeighborSet (v : V) : G.incidenceSet v ≃ G.neighborSet v 
goal: ↑(G.incidenceSet v) ≃ ↑(G.neighborSet v)

full_name: SimpleGraph.deleteEdges
code: /-- Given a set of vertex pairs, remove all of the corresponding edges from the
graph's edge set, if present.

See also: `SimpleGraph.Subgraph.deleteEdges`. -/
def deleteEdges (s : Set (Sym2 V)) : SimpleGraph V 
goal: SimpleGraph V

full_name: SimpleGraph.deleteEdges_adj
code: @[simp] lemma deleteEdges_adj : (G.deleteEdges s).Adj v w ↔ G.Adj v w ∧ ¬s(v, w) ∈ s 
goal: (G.deleteEdges s).Adj v w ↔ G.Adj v w ∧ s(v, w) ∉ s

full_name: SimpleGraph.deleteEdges_edgeSet
code: @[simp] lemma deleteEdges_edgeSet (G G' : SimpleGraph V) : G.deleteEdges G'.edgeSet = G \ G' 
goal: G.deleteEdges G'.edgeSet = G \ G'

full_name: SimpleGraph.deleteEdges_deleteEdges
code: @[simp]
theorem deleteEdges_deleteEdges (s s' : Set (Sym2 V)) :
    (G.deleteEdges s).deleteEdges s' = G.deleteEdges (s ∪ s') 
goal: (G.deleteEdges s).deleteEdges s' = G.deleteEdges (s ∪ s')

full_name: SimpleGraph.deleteEdges_empty
code: @[simp] lemma deleteEdges_empty : G.deleteEdges ∅ = G 
goal: G.deleteEdges ∅ = G

full_name: SimpleGraph.deleteEdges_univ
code: @[simp] lemma deleteEdges_univ : G.deleteEdges Set.univ = ⊥ 
goal: G.deleteEdges Set.univ = ⊥

full_name: SimpleGraph.deleteEdges_le
code: lemma deleteEdges_le (s : Set (Sym2 V)) : G.deleteEdges s ≤ G 
goal: G.deleteEdges s ≤ G

full_name: SimpleGraph.deleteEdges_anti
code: lemma deleteEdges_anti (h : s₁ ⊆ s₂) : G.deleteEdges s₂ ≤ G.deleteEdges s₁ 
goal: G.deleteEdges s₂ ≤ G.deleteEdges s₁

full_name: SimpleGraph.deleteEdges_mono
code: lemma deleteEdges_mono (h : G ≤ H) : G.deleteEdges s ≤ H.deleteEdges s 
goal: G.deleteEdges s ≤ H.deleteEdges s

full_name: SimpleGraph.deleteEdges_eq_self
code: @[simp] lemma deleteEdges_eq_self : G.deleteEdges s = G ↔ Disjoint G.edgeSet s 
goal: G.deleteEdges s = G ↔ Disjoint G.edgeSet s

full_name: SimpleGraph.deleteEdges_eq_inter_edgeSet
code: theorem deleteEdges_eq_inter_edgeSet (s : Set (Sym2 V)) :
    G.deleteEdges s = G.deleteEdges (s ∩ G.edgeSet) 
goal: G.deleteEdges s = G.deleteEdges (s ∩ G.edgeSet)

full_name: SimpleGraph.deleteEdges_sdiff_eq_of_le
code: theorem deleteEdges_sdiff_eq_of_le {H : SimpleGraph V} (h : H ≤ G) :
    G.deleteEdges (G.edgeSet \ H.edgeSet) = H 
goal: G.deleteEdges (G.edgeSet \ H.edgeSet) = H

full_name: SimpleGraph.edgeSet_deleteEdges
code: theorem edgeSet_deleteEdges (s : Set (Sym2 V)) : (G.deleteEdges s).edgeSet = G.edgeSet \ s 
goal: (G.deleteEdges s).edgeSet = G.edgeSet \ s