The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V30. Combinatorics

Mathlib.Combinatorics.SimpleGraph.Maps

202 declarations. Mathlib docs · Source

Maps between graphs

This file defines two functions and three structures relating graphs. The structures directly correspond to the classification of functions as injective, surjective and bijective, and have corresponding notation.

Main definitions

  • SimpleGraph.map: the graph obtained by pushing the adjacency relation through an injective function between vertex types.
  • SimpleGraph.comap: the graph obtained by pulling the adjacency relation behind an arbitrary function between vertex types.
  • SimpleGraph.induce: the subgraph induced by the given vertex set, a wrapper around comap.
  • SimpleGraph.spanningCoe: the supergraph without any additional edges, a wrapper around map.
  • SimpleGraph.Hom, G →g H: a graph homomorphism from G to H.
  • SimpleGraph.Embedding, G ↪g H: a graph embedding of G in H.
  • SimpleGraph.Iso, G ≃g H: a graph isomorphism between G and H.

Note that a graph embedding is a stronger notion than an injective graph homomorphism, since its image is an induced subgraph.

Implementation notes

Morphisms of graphs are abbreviations for RelHom, RelEmbedding and RelIso. To make use of pre-existing simp lemmas, definitions involving morphisms are abbreviations as well.

Map and comap

Induced graphs

Homomorphisms, embeddings and isomorphisms

theorem SimpleGraph.induceHom.congr_simp E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} {s : Set V} {t : Set W} (φ φ_1 : G →g G')
  (e_φ : φ = φ_1) (φst : Set.MapsTo (⇑φ) s t), SimpleGraph.induceHom φ φst = SimpleGraph.induceHom φ_1 ⋯

theorem SimpleGraph.equivOfBijective.congr_simp E1 #

∀ {V : Type u_1} {W : Type u_2} (f f_1 : V → W) (e_f : f = f_1) (hf : Function.Bijective f),
  SimpleGraph.equivOfBijective f hf = SimpleGraph.equivOfBijective f_1 ⋯

theorem SimpleGraph.induceHomOfLE.congr_simp E1 #

∀ {V : Type u_1} (G : SimpleGraph V) {s s' : Set V} (h : s ⊆ s'), G.induceHomOfLE h = G.induceHomOfLE h

def SimpleGraph.map E3 #

{V : Type u_1} → {W : Type u_2} → (V → W) → SimpleGraph V → SimpleGraph W

Given a function, there is a covariant induced map on graphs by pushing forward the adjacency relation.

This is injective when the function is (see SimpleGraph.map_injective).

instance SimpleGraph.instDecidableMapAdj E0 #

{V : Type u_1} →
  {W : Type u_2} →
    (G : SimpleGraph V) →
      [DecidableEq W] →
        {f : V → W} → {a b : W} → [Decidable (Relation.Map G.Adj f f a b)] → Decidable ((SimpleGraph.map f G).Adj a b)

theorem SimpleGraph.map_adj' E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V → W) (G : SimpleGraph V) (u v : W),
  (SimpleGraph.map f G).Adj u v ↔ u ≠ v ∧ ∃ u' v', G.Adj u' v' ∧ f u' = u ∧ f v' = v

theorem SimpleGraph.map_adj E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W) (G : SimpleGraph V) (u v : W),
  (SimpleGraph.map (⇑f) G).Adj u v ↔ ∃ u' v', G.Adj u' v' ∧ f u' = u ∧ f v' = v

theorem SimpleGraph.edgeSet_map E1 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W) (G : SimpleGraph V),
  (SimpleGraph.map (⇑f) G).edgeSet = ⇑f.sym2Map '' G.edgeSet

theorem SimpleGraph.neighborSet_map E0 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph V) (f : V ↪ W) (v : V),
  (SimpleGraph.map (⇑f) G).neighborSet (f v) = ⇑f '' G.neighborSet v

theorem SimpleGraph.map_adj_apply E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {f : V ↪ W} {a b : V},
  (SimpleGraph.map (⇑f) G).Adj (f a) (f b) ↔ G.Adj a b

theorem SimpleGraph.map_adj_apply' E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {u v : V} {f : V → W},
  G.Adj u v → f u ≠ f v → (SimpleGraph.map f G).Adj (f u) (f v)

theorem SimpleGraph.map_monotone E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V → W), Monotone (SimpleGraph.map f)

theorem SimpleGraph.map_id E0 #

∀ {V : Type u_1} (G : SimpleGraph V), SimpleGraph.map id G = G

theorem SimpleGraph.map_map E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} (G : SimpleGraph V) (f : V → W) (g : W → X),
  SimpleGraph.map g (SimpleGraph.map f G) = SimpleGraph.map (g ∘ f) G

theorem SimpleGraph.support_map E1 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W) (G : SimpleGraph V), (SimpleGraph.map (⇑f) G).support = ⇑f '' G.support

theorem SimpleGraph.map_top E0 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W}, Function.Surjective f → SimpleGraph.map f ⊤ = ⊤

def SimpleGraph.comap E3 #

{V : Type u_1} → {W : Type u_2} → (V → W) → SimpleGraph W → SimpleGraph V

Given a function, there is a contravariant induced map on graphs by pulling back the adjacency relation. This is one of the ways of creating induced graphs. See SimpleGraph.induce for a wrapper.

This is surjective when f is injective (see SimpleGraph.comap_surjective).

theorem SimpleGraph.comap_adj E0 #

∀ {V : Type u_1} {W : Type u_2} {u v : V} {G : SimpleGraph W} {f : V → W},
  (SimpleGraph.comap f G).Adj u v ↔ G.Adj (f u) (f v)

theorem SimpleGraph.comap_id E0 #

∀ {V : Type u_1} {G : SimpleGraph V}, SimpleGraph.comap id G = G

theorem SimpleGraph.comap_comap E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {G : SimpleGraph X} (f : V → W) (g : W → X),
  SimpleGraph.comap f (SimpleGraph.comap g G) = SimpleGraph.comap (g ∘ f) G

theorem SimpleGraph.support_comap_subset E1 #

∀ {V : Type u_1} {W : Type u_2} (f : V → W) (G : SimpleGraph W), (SimpleGraph.comap f G).support ⊆ f ⁻¹' G.support

instance SimpleGraph.instDecidableComapAdj E0 #

{V : Type u_1} →
  {W : Type u_2} → (f : V → W) → (G : SimpleGraph W) → [DecidableRel G.Adj] → DecidableRel (SimpleGraph.comap f G).Adj

theorem SimpleGraph.comap_symm E1 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph V) (e : V ≃ W),
  SimpleGraph.comap (⇑e.symm.toEmbedding) G = SimpleGraph.map (⇑e.toEmbedding) G

theorem SimpleGraph.map_symm E0 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph W) (e : V ≃ W),
  SimpleGraph.map (⇑e.symm.toEmbedding) G = SimpleGraph.comap (⇑e.toEmbedding) G

theorem SimpleGraph.comap_monotone E1 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W), Monotone (SimpleGraph.comap ⇑f)

theorem SimpleGraph.edgeSet_comap E0 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph V) (f : W → V),
  (SimpleGraph.comap f G).edgeSet = Sym2.map f ⁻¹' G.edgeSet

theorem SimpleGraph.comap_bot E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V → W), SimpleGraph.comap f (SimpleGraph.emptyGraph W) = SimpleGraph.emptyGraph V

theorem SimpleGraph.comap_top E0 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W},
  Function.Injective f → SimpleGraph.comap f (SimpleGraph.completeGraph W) = SimpleGraph.completeGraph V

theorem SimpleGraph.comap_map_eq E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W) (G : SimpleGraph V), SimpleGraph.comap (⇑f) (SimpleGraph.map (⇑f) G) = G

theorem SimpleGraph.leftInverse_comap_map E1 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W), Function.LeftInverse (SimpleGraph.comap ⇑f) (SimpleGraph.map ⇑f)

theorem SimpleGraph.map_injective E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W), Function.Injective (SimpleGraph.map ⇑f)

theorem SimpleGraph.comap_surjective E1 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W), Function.Surjective (SimpleGraph.comap ⇑f)

theorem SimpleGraph.map_le_of_le_comap E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} {f : V → W},
  G ≤ SimpleGraph.comap f G' → SimpleGraph.map f G ≤ G'

theorem SimpleGraph.map_le_iff_le_comap E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} {f : V ↪ W},
  SimpleGraph.map (⇑f) G ≤ G' ↔ G ≤ SimpleGraph.comap (⇑f) G'

theorem SimpleGraph.comap_le_of_le_map E1 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W) {G : SimpleGraph V} {G' : SimpleGraph W},
  G' ≤ SimpleGraph.map (⇑f) G → SimpleGraph.comap (⇑f) G' ≤ G

theorem SimpleGraph.le_map_of_comap_le E1 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W},
  Function.Surjective f →
    ∀ {G : SimpleGraph V} {G' : SimpleGraph W}, SimpleGraph.comap f G' ≤ G → G' ≤ SimpleGraph.map f G

theorem SimpleGraph.le_map_iff_comap_le E1 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W},
  Function.Bijective f →
    ∀ {G : SimpleGraph V} {G' : SimpleGraph W}, SimpleGraph.comap f G' ≤ G ↔ G' ≤ SimpleGraph.map f G

theorem SimpleGraph.map_comap_le E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V → W) (G : SimpleGraph W), SimpleGraph.map f (SimpleGraph.comap f G) ≤ G

theorem SimpleGraph.map_comap_eq_inf E0 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph V) (f : W → V),
  SimpleGraph.map f (SimpleGraph.comap f G) = G ⊓ SimpleGraph.map f ⊤

theorem SimpleGraph.map_comap_eq E0 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W},
  Function.Surjective f → ∀ (G : SimpleGraph W), SimpleGraph.map f (SimpleGraph.comap f G) = G

theorem SimpleGraph.leftInverse_map_comap E1 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W},
  Function.Surjective f → Function.LeftInverse (SimpleGraph.map f) (SimpleGraph.comap f)

theorem SimpleGraph.comap_injective E1 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W}, Function.Surjective f → Function.Injective (SimpleGraph.comap f)

theorem SimpleGraph.map_surjective E0 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W}, Function.Surjective f → Function.Surjective (SimpleGraph.map f)

theorem SimpleGraph.comap_bijective E1 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W}, Function.Bijective f → Function.Bijective (SimpleGraph.comap f)

theorem SimpleGraph.map_bijective E0 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W}, Function.Bijective f → Function.Bijective (SimpleGraph.map f)

theorem SimpleGraph.le_comap_of_subsingleton E1 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph V) (G' : SimpleGraph W) (f : V → W) [Subsingleton V],
  G ≤ SimpleGraph.comap f G'

theorem SimpleGraph.map_le_of_subsingleton E0 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph V) (G' : SimpleGraph W) (f : V ↪ W) [Subsingleton V],
  SimpleGraph.map (⇑f) G ≤ G'

abbrev SimpleGraph.completeMultipartiteGraph E1 #

{ι : Type u_5} → (V : ι → Type u_6) → SimpleGraph ((i : ι) × V i)

Given a family of vertex types indexed by ι, pulling back from ⊤ : SimpleGraph ι yields the complete multipartite graph on the family. Two vertices are adjacent if and only if their indices are not equal.

def Equiv.simpleGraph E1 #

{V : Type u_1} → {W : Type u_2} → V ≃ W → SimpleGraph V ≃ SimpleGraph W

Equivalent types have equivalent simple graphs.

See equivOfBijective to lift a bijection instead of an Equiv.

theorem Equiv.simpleGraph_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (e : V ≃ W) (G : SimpleGraph V), e.simpleGraph G = SimpleGraph.comap (⇑e.symm) G

theorem Equiv.simpleGraph_refl E0 #

∀ {V : Type u_1}, (Equiv.refl V).simpleGraph = Equiv.refl (SimpleGraph V)

theorem Equiv.simpleGraph_trans E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} (e₁ : V ≃ W) (e₂ : W ≃ X),
  (e₁.trans e₂).simpleGraph = e₁.simpleGraph.trans e₂.simpleGraph

theorem Equiv.symm_simpleGraph E0 #

∀ {V : Type u_1} {W : Type u_2} (e : V ≃ W), e.simpleGraph.symm = e.symm.simpleGraph

def SimpleGraph.equivOfBijective E1 #

{V : Type u_1} → {W : Type u_2} → (f : V → W) → Function.Bijective f → SimpleGraph V ≃ SimpleGraph W

A bijective function between vertex types induces an equivalence between simple graphs on them.

See Equiv.simpleGraph to lift an Equiv instead of a bijective function.

theorem SimpleGraph.coe_equivOfBijective E0 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W} (hf : Function.Bijective f),
  ⇑(SimpleGraph.equivOfBijective f hf) = SimpleGraph.map f

theorem SimpleGraph.coe_symm_equivOfBijective E0 #

∀ {V : Type u_1} {W : Type u_2} {f : V → W} (hf : Function.Bijective f),
  ⇑(SimpleGraph.equivOfBijective f hf).symm = SimpleGraph.comap f

theorem SimpleGraph.equivOfBijective_id E0 #

∀ {V : Type u_1}, SimpleGraph.equivOfBijective id ⋯ = Equiv.refl (SimpleGraph V)

theorem SimpleGraph.equivOfBijective_trans E0 #

∀ {U : Type u_5} {V : Type u_6} {W : Type u_7} {g : U → V} {f : V → W} (hg : Function.Bijective g)
  (hf : Function.Bijective f),
  SimpleGraph.equivOfBijective (f ∘ g) ⋯ = (SimpleGraph.equivOfBijective g hg).trans (SimpleGraph.equivOfBijective f hf)

abbrev SimpleGraph.induce E3 #

{V : Type u_1} → (s : Set V) → SimpleGraph V → SimpleGraph ↑s

Restrict a graph to the vertices in the set s, deleting all edges incident to vertices outside the set. This is a wrapper around SimpleGraph.comap.

theorem SimpleGraph.induce_adj E1 #

∀ {V : Type u_1} {G : SimpleGraph V} {s : Set V} {u v : ↑s}, (SimpleGraph.induce s G).Adj u v ↔ G.Adj ↑u ↑v

theorem SimpleGraph.induce_top E0 #

∀ {V : Type u_1} (s : Set V), SimpleGraph.induce s (SimpleGraph.completeGraph V) = SimpleGraph.completeGraph ↑s

theorem SimpleGraph.induce_bot E1 #

∀ {V : Type u_1} (s : Set V), SimpleGraph.induce s ⊥ = ⊥

theorem SimpleGraph.support_induce_subset_coe_preimage E1 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V), (SimpleGraph.induce s G).support ⊆ Subtype.val ⁻¹' s

theorem SimpleGraph.support_induce_subset_coe_preimage_support E1 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V), (SimpleGraph.induce s G).support ⊆ Subtype.val ⁻¹' G.support

theorem SimpleGraph.edgeSet_induce E1 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V), (SimpleGraph.induce s G).edgeSet = Sym2.map Subtype.val ⁻¹' G.edgeSet

theorem SimpleGraph.induce_singleton_eq_top E0 #

∀ {V : Type u_1} (G : SimpleGraph V) (v : V), SimpleGraph.induce {v} G = ⊤

abbrev SimpleGraph.spanningCoe E3 #

{V : Type u_1} → {s : Set V} → SimpleGraph ↑s → SimpleGraph V

Given a graph on a set of vertices, we can make it be a SimpleGraph V by adding in the remaining vertices without adding in any additional edges. This is a wrapper around SimpleGraph.map.

theorem SimpleGraph.support_spanningCoe E0 #

∀ {V : Type u_1} {s : Set V} (G : SimpleGraph ↑s), G.spanningCoe.support = Subtype.val '' G.support

theorem SimpleGraph.induce_spanningCoe E1 #

∀ {V : Type u_1} {s : Set V} {G : SimpleGraph ↑s}, SimpleGraph.induce s G.spanningCoe = G

theorem SimpleGraph.spanningCoe_induce_le E1 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V), (SimpleGraph.induce s G).spanningCoe ≤ G

theorem SimpleGraph.le_spanningCoe_top_coe E0 #

∀ {V : Type u_1} {G : SimpleGraph V} {s : Set V}, G ≤ ⊤.spanningCoe ↔ G.support ⊆ s

theorem SimpleGraph.spanningCoe_induce_eq_self E0 #

∀ {V : Type u_1} {G : SimpleGraph V} {s : Set V}, (SimpleGraph.induce s G).spanningCoe = G ↔ G.support ⊆ s

theorem SimpleGraph.spanningCoe_induce_support E0 #

∀ {V : Type u_1} (G : SimpleGraph V), (SimpleGraph.induce G.support G).spanningCoe = G

theorem SimpleGraph.spanningCoe_induce_univ E0 #

∀ {V : Type u_1} (G : SimpleGraph V), (SimpleGraph.induce Set.univ G).spanningCoe = G

theorem SimpleGraph.spanningCoe_induce_eq_inf E1 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V), (SimpleGraph.induce s G).spanningCoe = G ⊓ ⊤.spanningCoe

theorem SimpleGraph.IsCompleteBetween.induce E1 #

∀ {V : Type u_1} (G : SimpleGraph V) {s t : Set V},
  G.IsCompleteBetween s t →
    ∀ (u : Set V), (SimpleGraph.induce u G).IsCompleteBetween (Subtype.val ⁻¹' s) (Subtype.val ⁻¹' t)

abbrev SimpleGraph.Hom E3 #

{V : Type u_1} → {W : Type u_2} → SimpleGraph V → SimpleGraph W → Type (max u_1 u_2)

A graph homomorphism is a map on vertex sets that respects adjacency relations.

The notation G →g G' represents the type of graph homomorphisms.

abbrev SimpleGraph.Embedding E3 #

{V : Type u_1} → {W : Type u_2} → SimpleGraph V → SimpleGraph W → Type (max u_1 u_2)

A graph embedding is an embedding f such that for vertices v w : V, G'.Adj (f v) (f w) ↔ G.Adj v w. Its image is an induced subgraph of G'.

The notation G ↪g G' represents the type of graph embeddings.

abbrev SimpleGraph.Iso E3 #

{V : Type u_1} → {W : Type u_2} → SimpleGraph V → SimpleGraph W → Type (max u_1 u_2)

A graph isomorphism is a bijective map on vertex sets that respects adjacency relations.

The notation G ≃g G' represents the type of graph isomorphisms.

def SimpleGraph.«term_→g_» E1 #

Lean.TrailingParserDescr

A graph homomorphism is a map on vertex sets that respects adjacency relations.

The notation G →g G' represents the type of graph homomorphisms.

def SimpleGraph.«term_↪g_» E1 #

Lean.TrailingParserDescr

A graph embedding is an embedding f such that for vertices v w : V, G'.Adj (f v) (f w) ↔ G.Adj v w. Its image is an induced subgraph of G'.

The notation G ↪g G' represents the type of graph embeddings.

def SimpleGraph.«term_≃g_» E1 #

Lean.TrailingParserDescr

A graph isomorphism is a bijective map on vertex sets that respects adjacency relations.

The notation G ≃g G' represents the type of graph isomorphisms.

abbrev SimpleGraph.HomClass E1 #

{V : Type u_1} → {W : Type u_2} → (F : Type u_5) → SimpleGraph V → SimpleGraph W → [FunLike F V W] → Prop

HomClass F G H asserts that F is a type of adjacency-preserving morphism.

abbrev SimpleGraph.Hom.id E1 #

{V : Type u_1} → {G : SimpleGraph V} → G →g G

The identity homomorphism from a graph to itself.

theorem SimpleGraph.Hom.coe_id E0 #

∀ {V : Type u_1} {G : SimpleGraph V}, ⇑SimpleGraph.Hom.id = id

instance SimpleGraph.Hom.instIsEmptyOfForall E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} [IsEmpty (V → W)], IsEmpty (G →g H)

instance SimpleGraph.Hom.instSubsingletonOfForall E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} [Subsingleton (V → W)], Subsingleton (G →g H)

instance SimpleGraph.Hom.instUniqueOfIsEmpty E0 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {H : SimpleGraph W} → [IsEmpty V] → Unique (G →g H)

instance SimpleGraph.Hom.instFinite E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} [Finite V] [Finite W], Finite (G →g H)

theorem SimpleGraph.Hom.map_adj E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {v w : V},
  G.Adj v w → G'.Adj (f v) (f w)

theorem SimpleGraph.Hom.map_mem_edgeSet E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {e : Sym2 V},
  e ∈ G.edgeSet → Sym2.map (⇑f) e ∈ G'.edgeSet

theorem SimpleGraph.Hom.subset_preimage_edgeSet E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G'),
  G.edgeSet ⊆ Sym2.map ⇑f ⁻¹' G'.edgeSet

theorem SimpleGraph.Hom.image_edgeSet_subset E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G'),
  Sym2.map ⇑f '' G.edgeSet ⊆ G'.edgeSet

theorem SimpleGraph.Hom.apply_mem_neighborSet E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') {v w : V},
  w ∈ G.neighborSet v → f w ∈ G'.neighborSet (f v)

theorem SimpleGraph.Hom.subset_preimage_neighborSet E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (v : V) (f : G →g G'),
  G.neighborSet v ⊆ ⇑f ⁻¹' G'.neighborSet (f v)

theorem SimpleGraph.Hom.image_neighborSet_subset E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (v : V) (f : G →g G'),
  ⇑f '' G.neighborSet v ⊆ G'.neighborSet (f v)

def SimpleGraph.Hom.mapEdgeSet E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G →g G' → ↑G.edgeSet → ↑G'.edgeSet

The map between edge sets induced by a homomorphism. The underlying map on edges is given by Sym2.map.

theorem SimpleGraph.Hom.mapEdgeSet_coe E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (e : ↑G.edgeSet),
  ↑(f.mapEdgeSet e) = Sym2.map ⇑f ↑e

def SimpleGraph.Hom.mapNeighborSet E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {G : SimpleGraph V} → {G' : SimpleGraph W} → (f : G →g G') → (v : V) → ↑(G.neighborSet v) → ↑(G'.neighborSet (f v))

The map between neighbor sets induced by a homomorphism.

theorem SimpleGraph.Hom.mapNeighborSet_coe E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (v : V) (w : ↑(G.neighborSet v)),
  ↑(f.mapNeighborSet v w) = f ↑w

def SimpleGraph.Hom.mapDart E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G →g G' → G.Dart → G'.Dart

The map between darts induced by a homomorphism.

theorem SimpleGraph.Hom.mapDart_apply E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G') (d : G.Dart),
  f.mapDart d = { toProd := Prod.map (⇑f) (⇑f) d.toProd, adj := ⋯ }

def SimpleGraph.Hom.ofLE E1 #

{V : Type u_1} → {G₁ G₂ : SimpleGraph V} → G₁ ≤ G₂ → G₁ →g G₂

The graph homomorphism from a smaller graph to a bigger one.

theorem SimpleGraph.Hom.coe_ofLE E0 #

∀ {V : Type u_1} {G₁ G₂ : SimpleGraph V} (h : G₁ ≤ G₂), ⇑(SimpleGraph.Hom.ofLE h) = id

theorem SimpleGraph.Hom.ofLE_apply E0 #

∀ {V : Type u_1} {G₁ G₂ : SimpleGraph V} (h : G₁ ≤ G₂) (v : V), (SimpleGraph.Hom.ofLE h) v = v

theorem SimpleGraph.Hom.mapEdgeSet.injective E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G'),
  Function.Injective ⇑f → Function.Injective f.mapEdgeSet

theorem SimpleGraph.Hom.injective_of_top_hom E1 #

∀ {V : Type u_1} {W : Type u_2} {G' : SimpleGraph W} (f : ⊤ →g G'), Function.Injective ⇑f

Every graph homomorphism from a complete graph is injective.

def SimpleGraph.Hom.map E3 #

{V : Type u_1} →
  {W : Type u_2} → (f : V → W) → (G : SimpleGraph V) → (∀ {u v : V}, G.Adj u v → f u ≠ f v) → G →g SimpleGraph.map f G

A function f that is injective on adjacent vertices in a graph G (equivalently f is a valid W-coloring of G, or G ≤ comap ⊤ f) is a homomorphism from G to the mapped graph.

theorem SimpleGraph.Hom.map_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V → W) (G : SimpleGraph V) (h : ∀ {u v : V}, G.Adj u v → f u ≠ f v) (a : V),
  (SimpleGraph.Hom.map f G h) a = f a

def SimpleGraph.Hom.comap E1 #

{V : Type u_1} → {W : Type u_2} → (f : V → W) → (G : SimpleGraph W) → SimpleGraph.comap f G →g G

There is a homomorphism to a graph from a comapped graph. When the function is injective, this is an embedding (see SimpleGraph.Embedding.comap).

theorem SimpleGraph.Hom.comap_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V → W) (G : SimpleGraph W) (a : V), (SimpleGraph.Hom.comap f G) a = f a

theorem SimpleGraph.Hom.le_comap E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (f : H →g G), H ≤ SimpleGraph.comap (⇑f) G

theorem SimpleGraph.Hom.map_le E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (f : H →g G), SimpleGraph.map (⇑f) H ≤ G

theorem SimpleGraph.Hom.nonempty_hom_iff_exists_le_comap E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W},
  Nonempty (H →g G) ↔ ∃ f, H ≤ SimpleGraph.comap f G

abbrev SimpleGraph.Hom.comp E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {X : Type u_3} → {G : SimpleGraph V} → {G' : SimpleGraph W} → {G'' : SimpleGraph X} → G' →g G'' → G →g G' → G →g G''

Composition of graph homomorphisms.

theorem SimpleGraph.Hom.coe_comp E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {G : SimpleGraph V} {G' : SimpleGraph W} {G'' : SimpleGraph X}
  (f' : G' →g G'') (f : G →g G'), ⇑(f'.comp f) = ⇑f' ∘ ⇑f

theorem SimpleGraph.Hom.comp_assoc E1 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {Y : Type u_4} {G : SimpleGraph V} {G' : SimpleGraph W}
  {G'' : SimpleGraph X} {G''' : SimpleGraph Y} (f : G'' →g G''') (g : G' →g G'') (h : G →g G'),
  f.comp (g.comp h) = (f.comp g).comp h

theorem SimpleGraph.Hom.comp_id E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G'), f.comp SimpleGraph.Hom.id = f

theorem SimpleGraph.Hom.id_comp E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G →g G'), SimpleGraph.Hom.id.comp f = f

theorem SimpleGraph.Hom.comp_comap_ofLE E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (f : H →g G),
  (SimpleGraph.Hom.comap (⇑f) G).comp (SimpleGraph.Hom.ofLE ⋯) = f

abbrev SimpleGraph.Embedding.refl E1 #

{V : Type u_1} → {G : SimpleGraph V} → G ↪g G

The identity embedding from a graph to itself.

abbrev SimpleGraph.Embedding.toHom E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G ↪g G' → G →g G'

An embedding of graphs gives rise to a homomorphism of graphs.

theorem SimpleGraph.Embedding.coe_toHom E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (f : G ↪g H), ⇑f.toHom = ⇑f

theorem SimpleGraph.Embedding.map_adj_iff E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G') {v w : V},
  G'.Adj (f v) (f w) ↔ G.Adj v w

theorem SimpleGraph.Embedding.map_mem_edgeSet_iff E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G') {e : Sym2 V},
  Sym2.map (⇑f) e ∈ G'.edgeSet ↔ e ∈ G.edgeSet

theorem SimpleGraph.Embedding.preimage_edgeSet E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G'),
  Sym2.map ⇑f ⁻¹' G'.edgeSet = G.edgeSet

theorem SimpleGraph.Embedding.apply_mem_neighborSet_iff E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G') {v w : V},
  f w ∈ G'.neighborSet (f v) ↔ w ∈ G.neighborSet v

theorem SimpleGraph.Embedding.preimage_neighborSet E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (v : V) (f : G ↪g G'),
  ⇑f ⁻¹' G'.neighborSet (f v) = G.neighborSet v

def SimpleGraph.Embedding.mapEdgeSet E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G ↪g G' → ↑G.edgeSet ↪ ↑G'.edgeSet

A graph embedding induces an embedding of edge sets.

theorem SimpleGraph.Embedding.mapEdgeSet_apply E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G') (e : ↑G.edgeSet),
  f.mapEdgeSet e = SimpleGraph.Hom.mapEdgeSet (RelEmbedding.toRelHom f) e

def SimpleGraph.Embedding.mapNeighborSet E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {G : SimpleGraph V} → {G' : SimpleGraph W} → (f : G ↪g G') → (v : V) → ↑(G.neighborSet v) ↪ ↑(G'.neighborSet (f v))

A graph embedding induces an embedding of neighbor sets.

theorem SimpleGraph.Embedding.mapNeighborSet_apply_coe E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G') (v : V) (w : ↑(G.neighborSet v)),
  ↑((f.mapNeighborSet v) w) = f ↑w

def SimpleGraph.Embedding.isoInduceRange E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {G : SimpleGraph V} → {G' : SimpleGraph W} → (f : G ↪g G') → G ≃g SimpleGraph.induce (Set.range ⇑f) G'

A graph embedding induces a graph isomorphism between its domain and its range

def SimpleGraph.Embedding.comap E1 #

{V : Type u_1} → {W : Type u_2} → (f : V ↪ W) → (G : SimpleGraph W) → SimpleGraph.comap (⇑f) G ↪g G

Given an injective function, there is an embedding from the comapped graph into the original graph.

theorem SimpleGraph.Embedding.comap_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W) (G : SimpleGraph W) (v : V), (SimpleGraph.Embedding.comap f G) v = f v

theorem SimpleGraph.Embedding.comap_eq E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (f : H ↪g G), SimpleGraph.comap (⇑f) G = H

def SimpleGraph.Embedding.map E3 #

{V : Type u_1} → {W : Type u_2} → (f : V ↪ W) → (G : SimpleGraph V) → G ↪g SimpleGraph.map (⇑f) G

Given an injective function, there is an embedding from a graph into the mapped graph.

theorem SimpleGraph.Embedding.map_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ↪ W) (G : SimpleGraph V) (v : V), (SimpleGraph.Embedding.map f G) v = f v

abbrev SimpleGraph.Embedding.induce E1 #

{V : Type u_1} → {G : SimpleGraph V} → (s : Set V) → SimpleGraph.induce s G ↪g G

Induced graphs embed in the original graph.

Note that if G.induce s = ⊤ (i.e., if s is a clique) then this gives the embedding of a complete graph.

abbrev SimpleGraph.Embedding.spanningCoe E1 #

{V : Type u_1} → {s : Set V} → (G : SimpleGraph ↑s) → G ↪g G.spanningCoe

Graphs on a set of vertices embed in their spanningCoe.

def SimpleGraph.Embedding.completeGraph E1 #

{α : Type u_5} → {β : Type u_6} → (α ↪ β) → SimpleGraph.completeGraph α ↪g SimpleGraph.completeGraph β

Embeddings of types induce embeddings of complete graphs on those types.

theorem SimpleGraph.Embedding.coe_completeGraph E0 #

∀ {α : Type u_5} {β : Type u_6} (f : α ↪ β), ⇑(SimpleGraph.Embedding.completeGraph f) = ⇑f

abbrev SimpleGraph.Embedding.comp E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {X : Type u_3} → {G : SimpleGraph V} → {G' : SimpleGraph W} → {G'' : SimpleGraph X} → G' ↪g G'' → G ↪g G' → G ↪g G''

Composition of graph embeddings.

theorem SimpleGraph.Embedding.coe_comp E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {G : SimpleGraph V} {G' : SimpleGraph W} {G'' : SimpleGraph X}
  (f' : G' ↪g G'') (f : G ↪g G'), ⇑(f'.comp f) = ⇑f' ∘ ⇑f

theorem SimpleGraph.Embedding.comp_assoc E1 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {Y : Type u_4} {G : SimpleGraph V} {G' : SimpleGraph W}
  {G'' : SimpleGraph X} {G''' : SimpleGraph Y} (f : G'' ↪g G''') (g : G' ↪g G'') (h : G ↪g G'),
  f.comp (g.comp h) = (f.comp g).comp h

theorem SimpleGraph.Embedding.comp_refl E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G'),
  f.comp SimpleGraph.Embedding.refl = f

theorem SimpleGraph.Embedding.refl_comp E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ↪g G'),
  SimpleGraph.Embedding.refl.comp f = f

def SimpleGraph.Embedding.complEquiv E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {H : SimpleGraph W} → G ↪g H ≃ Gᶜ ↪g Hᶜ

Graph embeddings from G to H are the same thing as graph embeddings from Gᶜ to Hᶜ.

def SimpleGraph.induceHom E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {G : SimpleGraph V} →
      {G' : SimpleGraph W} →
        {s : Set V} →
          {t : Set W} → (φ : G →g G') → Set.MapsTo (⇑φ) s t → SimpleGraph.induce s G →g SimpleGraph.induce t G'

The restriction of a morphism of graphs to induced subgraphs.

theorem SimpleGraph.coe_induceHom E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} {s : Set V} {t : Set W} (φ : G →g G')
  (φst : Set.MapsTo (⇑φ) s t), ⇑(SimpleGraph.induceHom φ φst) = Set.MapsTo.restrict (⇑φ) s t φst

theorem SimpleGraph.induceHom_id E0 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V), SimpleGraph.induceHom SimpleGraph.Hom.id ⋯ = SimpleGraph.Hom.id

theorem SimpleGraph.induceHom_comp E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {G : SimpleGraph V} {G' : SimpleGraph W} {G'' : SimpleGraph X}
  {s : Set V} {t : Set W} {r : Set X} (φ : G →g G') (φst : Set.MapsTo (⇑φ) s t) (ψ : G' →g G'')
  (ψtr : Set.MapsTo (⇑ψ) t r),
  (SimpleGraph.induceHom ψ ψtr).comp (SimpleGraph.induceHom φ φst) = SimpleGraph.induceHom (ψ.comp φ) ⋯

theorem SimpleGraph.induceHom_injective E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} {s : Set V} {t : Set W} (φ : G →g G')
  (φst : Set.MapsTo (⇑φ) s t), Set.InjOn (⇑φ) s → Function.Injective ⇑(SimpleGraph.induceHom φ φst)

def SimpleGraph.induceHomOfLE E1 #

{V : Type u_1} → (G : SimpleGraph V) → {s s' : Set V} → s ⊆ s' → SimpleGraph.induce s G ↪g SimpleGraph.induce s' G

Given an inclusion of vertex subsets, the induced embedding on induced graphs. This is not an abbreviation for induceHom since we get an embedding in this case.

theorem SimpleGraph.induceHomOfLE_apply E0 #

∀ {V : Type u_1} (G : SimpleGraph V) {s s' : Set V} (h : s ⊆ s') (v : ↑s), (G.induceHomOfLE h) v = Set.inclusion h v

theorem SimpleGraph.induceHomOfLE_toHom E0 #

∀ {V : Type u_1} (G : SimpleGraph V) {s s' : Set V} (h : s ⊆ s'),
  (G.induceHomOfLE h).toHom = SimpleGraph.induceHom SimpleGraph.Hom.id ⋯

abbrev SimpleGraph.Iso.refl E1 #

{V : Type u_1} → {G : SimpleGraph V} → G ≃g G

The identity isomorphism of a graph with itself.

abbrev SimpleGraph.Iso.toEmbedding E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G ≃g G' → G ↪g G'

An isomorphism of graphs gives rise to an embedding of graphs.

abbrev SimpleGraph.Iso.toHom E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G ≃g G' → G →g G'

An isomorphism of graphs gives rise to a homomorphism of graphs.

abbrev SimpleGraph.Iso.symm E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G ≃g G' → G' ≃g G

The inverse of a graph isomorphism.

theorem SimpleGraph.Iso.map_adj_iff E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') {v w : V},
  G'.Adj (f v) (f w) ↔ G.Adj v w

theorem SimpleGraph.Iso.map_mem_edgeSet_iff E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') {e : Sym2 V},
  Sym2.map (⇑f) e ∈ G'.edgeSet ↔ e ∈ G.edgeSet

theorem SimpleGraph.Iso.apply_mem_neighborSet_iff E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') {v w : V},
  f w ∈ G'.neighborSet (f v) ↔ w ∈ G.neighborSet v

theorem SimpleGraph.Iso.image_neighborSet E1 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} {v : V} (f : G ≃g G'),
  ⇑f '' G.neighborSet v = G'.neighborSet (f v)

theorem SimpleGraph.Iso.symm_toHom_comp_toHom E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G'),
  f.symm.toHom.comp f.toHom = SimpleGraph.Hom.id

theorem SimpleGraph.Iso.toHom_comp_symm_toHom E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G'),
  f.toHom.comp f.symm.toHom = SimpleGraph.Hom.id

def SimpleGraph.Iso.mapEdgeSet E1 #

{V : Type u_1} → {W : Type u_2} → {G : SimpleGraph V} → {G' : SimpleGraph W} → G ≃g G' → ↑G.edgeSet ≃ ↑G'.edgeSet

An isomorphism of graphs induces an equivalence of edge sets.

theorem SimpleGraph.Iso.mapEdgeSet_apply E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') (e : ↑G.edgeSet),
  f.mapEdgeSet e = SimpleGraph.Hom.mapEdgeSet (RelIso.toRelEmbedding f).toRelHom e

theorem SimpleGraph.Iso.mapEdgeSet_symm_apply E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') (e : ↑G'.edgeSet),
  f.mapEdgeSet.symm e = SimpleGraph.Hom.mapEdgeSet (RelIso.toRelEmbedding f.symm).toRelHom e

def SimpleGraph.Iso.mapNeighborSet E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {G : SimpleGraph V} → {G' : SimpleGraph W} → (f : G ≃g G') → (v : V) → ↑(G.neighborSet v) ≃ ↑(G'.neighborSet (f v))

A graph isomorphism induces an equivalence of neighbor sets.

theorem SimpleGraph.Iso.mapNeighborSet_apply_coe E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') (v : V) (w : ↑(G.neighborSet v)),
  ↑((f.mapNeighborSet v) w) = f ↑w

theorem SimpleGraph.Iso.mapNeighborSet_symm_apply_coe E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') (v : V)
  (w : ↑(G'.neighborSet (f v))), ↑((f.mapNeighborSet v).symm w) = f.symm ↑w

theorem SimpleGraph.Iso.card_eq E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G') [inst : Fintype V]
  [inst_1 : Fintype W], Fintype.card V = Fintype.card W

def SimpleGraph.Iso.comap E1 #

{V : Type u_1} → {W : Type u_2} → (f : V ≃ W) → (G : SimpleGraph W) → SimpleGraph.comap (⇑f) G ≃g G

Given a bijection, there is an embedding from the comapped graph into the original graph.

theorem SimpleGraph.Iso.comap_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ≃ W) (G : SimpleGraph W) (v : V), (SimpleGraph.Iso.comap f G) v = f v

theorem SimpleGraph.Iso.comap_symm_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ≃ W) (G : SimpleGraph W) (w : W), (SimpleGraph.Iso.comap f G).symm w = f.symm w

def SimpleGraph.Iso.map E3 #

{V : Type u_1} → {W : Type u_2} → (f : V ≃ W) → (G : SimpleGraph V) → G ≃g SimpleGraph.map (⇑f) G

Given a bijective function, there is an isomorphism from a graph into the mapped graph.

theorem SimpleGraph.Iso.map_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ≃ W) (G : SimpleGraph V) (v : V), (SimpleGraph.Iso.map f G) v = f v

theorem SimpleGraph.Iso.map_symm_apply E0 #

∀ {V : Type u_1} {W : Type u_2} (f : V ≃ W) (G : SimpleGraph V) (w : W), (SimpleGraph.Iso.map f G).symm w = f.symm w

def SimpleGraph.Iso.completeGraph E1 #

{α : Type u_5} → {β : Type u_6} → α ≃ β → SimpleGraph.completeGraph α ≃g SimpleGraph.completeGraph β

Equivalences of types induce isomorphisms of complete graphs on those types.

theorem SimpleGraph.Iso.toEmbedding_completeGraph E1 #

∀ {α : Type u_5} {β : Type u_6} (f : α ≃ β),
  (SimpleGraph.Iso.completeGraph f).toEmbedding = SimpleGraph.Embedding.completeGraph f.toEmbedding

abbrev SimpleGraph.Iso.homCongr E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {X : Type u_3} →
      {Y : Type u_4} →
        {G : SimpleGraph V} →
          {G' : SimpleGraph W} →
            G ≃g G' → {G'' : SimpleGraph X} → {G''' : SimpleGraph Y} → G'' ≃g G''' → G →g G'' ≃ G' →g G'''

Equivalence of homomorphisms induced by isomorphisms of graphs.

abbrev SimpleGraph.Iso.comp E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {X : Type u_3} → {G : SimpleGraph V} → {G' : SimpleGraph W} → {G'' : SimpleGraph X} → G' ≃g G'' → G ≃g G' → G ≃g G''

Composition of graph isomorphisms.

theorem SimpleGraph.Iso.coe_comp E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {G : SimpleGraph V} {G' : SimpleGraph W} {G'' : SimpleGraph X}
  (f' : G' ≃g G'') (f : G ≃g G'), ⇑(f'.comp f) = ⇑f' ∘ ⇑f

theorem SimpleGraph.Iso.comp_assoc E1 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {Y : Type u_4} {G : SimpleGraph V} {G' : SimpleGraph W}
  {G'' : SimpleGraph X} {G''' : SimpleGraph Y} (f : G'' ≃g G''') (g : G' ≃g G'') (h : G ≃g G'),
  f.comp (g.comp h) = (f.comp g).comp h

theorem SimpleGraph.Iso.comp_refl E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G'), f.comp SimpleGraph.Iso.refl = f

theorem SimpleGraph.Iso.refl_comp E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} (f : G ≃g G'), SimpleGraph.Iso.refl.comp f = f

def SimpleGraph.Iso.induce E1 #

{V : Type u_1} →
  {W : Type u_2} →
    {G : SimpleGraph V} →
      {G' : SimpleGraph W} →
        {s : Set V} →
          {t : Set W} → (φ : G ≃g G') → Set.BijOn (⇑φ) s t → SimpleGraph.induce s G ≃g SimpleGraph.induce t G'

The restriction of an isomorphism of graphs to induced subgraphs.

theorem SimpleGraph.Iso.coe_induce E0 #

∀ {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph W} {s : Set V} {t : Set W} (φ : G ≃g G')
  (φst : Set.BijOn (⇑φ) s t), ⇑(φ.induce φst) = Set.MapsTo.restrict (⇑φ) s t ⋯

theorem SimpleGraph.Iso.induce_refl E0 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V), SimpleGraph.Iso.refl.induce ⋯ = SimpleGraph.Iso.refl

theorem SimpleGraph.Iso.induce_comp_induce E0 #

∀ {V : Type u_1} {W : Type u_2} {X : Type u_3} {G : SimpleGraph V} {G' : SimpleGraph W} {G'' : SimpleGraph X}
  {s : Set V} {t : Set W} {r : Set X} (φ : G ≃g G') (φst : Set.BijOn (⇑φ) s t) (ψ : G' ≃g G'')
  (ψtr : Set.BijOn (⇑ψ) t r), (ψ.induce ψtr).comp (φ.induce φst) = (ψ.comp φ).induce ⋯

theorem SimpleGraph.neighborSet_comap E1 #

∀ {V : Type u_1} {W : Type u_2} (G' : SimpleGraph W) (f : V → W) (v : V),
  (SimpleGraph.comap f G').neighborSet v = f ⁻¹' G'.neighborSet (f v)

theorem SimpleGraph.neighborSet_induce E1 #

∀ {V : Type u_1} (G : SimpleGraph V) (s : Set V) (v : ↑s),
  (SimpleGraph.induce s G).neighborSet v = Subtype.val ⁻¹' G.neighborSet ↑v

theorem SimpleGraph.neighborSet_map_equiv E1 #

∀ {V : Type u_1} {W : Type u_2} (G : SimpleGraph V) (e : V ≃ W) (w : W),
  (SimpleGraph.map (⇑e) G).neighborSet w = ⇑e.symm ⁻¹' G.neighborSet (e.symm w)

def SimpleGraph.induceUnivIso E1 #

{V : Type u_1} → (G : SimpleGraph V) → SimpleGraph.induce Set.univ G ≃g G

The graph induced on Set.univ is isomorphic to the original graph.

theorem SimpleGraph.induceUnivIso_apply E0 #

∀ {V : Type u_1} (G : SimpleGraph V) (self : { x // x ∈ Set.univ }), G.induceUnivIso self = ↑self

theorem SimpleGraph.induceUnivIso_symm_apply_coe E0 #

∀ {V : Type u_1} (G : SimpleGraph V) (a : V), ↑((RelIso.symm G.induceUnivIso) a) = a

def SimpleGraph.completeBipartiteGraphCongr E1 #

{V₁ : Type u_5} →
  {V₂ : Type u_6} →
    {W₁ : Type u_7} → {W₂ : Type u_8} → V₁ ≃ V₂ → W₁ ≃ W₂ → completeBipartiteGraph V₁ W₁ ≃g completeBipartiteGraph V₂ W₂

The isomorphism between completeBipartiteGraph V₁ W₁ and completeBipartiteGraph V₂ W₂ where V₁ ≃ V₂ and W₁ ≃ W₂.

theorem SimpleGraph.completeBipartiteGraphCongr_symm_apply E0 #

∀ {V₁ : Type u_5} {V₂ : Type u_6} {W₁ : Type u_7} {W₂ : Type u_8} (hV : V₁ ≃ V₂) (hW : W₁ ≃ W₂) (a : V₂ ⊕ W₂),
  (RelIso.symm (SimpleGraph.completeBipartiteGraphCongr hV hW)) a = Sum.map (⇑hV.symm) (⇑hW.symm) a

theorem SimpleGraph.completeBipartiteGraphCongr_apply E0 #

∀ {V₁ : Type u_5} {V₂ : Type u_6} {W₁ : Type u_7} {W₂ : Type u_8} (hV : V₁ ≃ V₂) (hW : W₁ ≃ W₂) (a : V₁ ⊕ W₁),
  (SimpleGraph.completeBipartiteGraphCongr hV hW) a = Sum.map (⇑hV) (⇑hW) a

def SimpleGraph.overFin E1 #

{V : Type u_1} → SimpleGraph V → [inst : Fintype V] → {n : ℕ} → Fintype.card V = n → SimpleGraph (Fin n)

Given a graph over a finite vertex type V and a proof hc that Fintype.card V = n, G.overFin n is an isomorphic (as shown in overFinIso) graph over Fin n.

def SimpleGraph.overFinIso E1 #

{V : Type u_1} → (G : SimpleGraph V) → [inst : Fintype V] → {n : ℕ} → (hc : Fintype.card V = n) → G ≃g G.overFin hc

The isomorphism between G and G.overFin hc.