@@ -14,19 +14,19 @@ This file develops the induced analogues of the containment notions from
1414`Mathlib/Combinatorics/SimpleGraph/Copy.lean`.
1515
1616For two simple graphs `G` and `H`, an *induced copy* of `G` in `H` is an induced subgraph of `H`
17- isomorphic to `G`. Equivalently, it is a graph embedding `G ↪g H`.
17+ isomorphic to `G`. Equivalently, it is a graph embedding `Embedding G H`.
1818
1919## Main declarations
2020
2121* `SimpleGraph.IsIndContained G H`, `G ⊴ H` is the relation that `H` contains an induced copy of
22- `G`, that is, the type `G ↪g H` is nonempty. This is equivalent to the existence of an
22+ `G`, that is, the type `Embedding G H` is nonempty. This is equivalent to the existence of an
2323 isomorphism from `G` to an induced subgraph of `H`.
2424* `SimpleGraph.IndFree` is the predicate that `H` does not contain an induced copy of `G`. This
2525 is the negation of `SimpleGraph.IsIndContained` implemented for convenience.
2626* `SimpleGraph.UnlabeledEmbedding G H`: Type of induced `SimpleGraph.Subgraph`s of `H`
2727 isomorphic to `G`.
2828* `SimpleGraph.embeddingCount H G`: Number of induced labeled copies of `G` in `H`, i.e. the
29- number of graph embeddings `G ↪g H`.
29+ number of graph embeddings `Embedding G H`.
3030* `SimpleGraph.unlabeledEmbeddingCount H G`: Number of induced `SimpleGraph.Subgraph`s of `H`
3131 isomorphic to `G`.
3232
@@ -60,21 +60,21 @@ variable {V V' W W' X : Type*}
6060/-!
6161### Embedding to subgraph
6262
63- For a graph embedding `f : G ↪g H`, the image is an induced subgraph of `H` isomorphic to `G`.
64- This packages the image as a `H.Subgraph`, together with the inducedness and isomorphism
63+ For a graph embedding `f : Embedding G H`, the image is an induced subgraph of `H` isomorphic
64+ to `G`. This packages the image as a `H.Subgraph`, together with the inducedness and isomorphism
6565characterisations needed downstream.
6666-/
6767
6868namespace Embedding
6969
7070/-- The induced subgraph corresponding to an embedding. -/
71- abbrev toSubgraph (f : G ↪g H) : H.Subgraph := f.toCopy.toSubgraph
71+ abbrev toSubgraph (f : Embedding G H) : H.Subgraph := f.toCopy.toSubgraph
7272
73- @[simp] lemma toSubgraph_isInduced (f : G ↪g H) : (toSubgraph f).IsInduced := by
73+ @[simp] lemma toSubgraph_isInduced (f : Embedding G H) : (toSubgraph f).IsInduced := by
7474 simp [toSubgraph, Copy.toSubgraph, Subgraph.IsInduced, Relation.map_apply_apply, f.injective]
7575
7676@[simp] lemma range_toSubgraph :
77- Set.range (toSubgraph : (G ↪g H) → H.Subgraph) =
77+ Set.range (toSubgraph : (Embedding G H) → H.Subgraph) =
7878 {H' : H.Subgraph | H'.IsInduced ∧ Nonempty (G ≃g H'.coe)} := by
7979 ext H'
8080 simp only [Set.mem_range, Set.mem_setOf_eq]
@@ -92,7 +92,7 @@ end Embedding
9292/-!
9393### Induced containment
9494
95- A graph `H` *inducingly contains* a graph `G` if there is some graph embedding `G ↪g H`. This
95+ A graph `H` *inducingly contains* a graph `G` if there is some graph embedding `Embedding G H`. This
9696amounts to `H` having an induced subgraph isomorphic to `G`.
9797
9898We denote "`G` is inducingly contained in `H`" by `G ⊴ H` (`\trianglelefteq`).
@@ -101,14 +101,14 @@ We denote "`G` is inducingly contained in `H`" by `G ⊴ H` (`\trianglelefteq`).
101101section IsIndContained
102102
103103/-- The relation `IsIndContained G H`, `G ⊴ H` says that `H` contains an induced copy of `G`,
104- i.e. there exists a graph embedding `G ↪g H`.
104+ i.e. there exists a graph embedding `Embedding G H`.
105105
106106This is equivalent to the existence of an isomorphism from `G` to an induced subgraph of `H`. -/
107- abbrev IsIndContained (G : SimpleGraph V) (H : SimpleGraph W) : Prop := Nonempty (G ↪g H)
107+ abbrev IsIndContained (G : SimpleGraph V) (H : SimpleGraph W) : Prop := Nonempty (Embedding G H)
108108
109109@[inherit_doc] scoped infixl :50 " ⊴ " => SimpleGraph.IsIndContained
110110
111- protected lemma Embedding.isIndContained (f : G ↪g H) : G ⊴ H := ⟨f⟩
111+ protected lemma Embedding.isIndContained (f : Embedding G H) : G ⊴ H := ⟨f⟩
112112
113113protected lemma IsIndContained.isContained : G ⊴ H → G ⊑ H := fun ⟨f⟩ ↦ f.isContained
114114
@@ -225,24 +225,23 @@ copies of `G` in `H`.
225225
226226section EmbeddingCount
227227
228- /-- `H.embeddingCount G` is the number of induced labeled copies of `G` in `H`, i.e. the number of
229- graph embeddings `G ↪g H`. See `SimpleGraph.unlabeledEmbeddingCount` for the number of induced
230- unlabeled
231- copies. -/
228+ /-- `H.embeddingCount G` is the number of induced labeled copies of `G` in `H`, i.e. the number
229+ of graph embeddings `Embedding G H`. See `SimpleGraph.unlabeledEmbeddingCount` for the number of
230+ induced unlabeled copies. -/
232231noncomputable def embeddingCount (H : SimpleGraph W) (G : SimpleGraph V) : ℕ :=
233- Nat.card (G ↪g H)
232+ Nat.card (Embedding G H)
234233
235234lemma embeddingCount_eq_nat_card (H : SimpleGraph W) (G : SimpleGraph V) :
236- H.embeddingCount G = Nat.card (G ↪g H) := by rw [embeddingCount]
235+ H.embeddingCount G = Nat.card (Embedding G H) := by rw [embeddingCount]
237236
238- private instance [IsEmpty V] : Unique (G ↪g H) :=
237+ private instance [IsEmpty V] : Unique (Embedding G H) :=
239238 ⟨⟨RelEmbedding.ofIsEmpty G.Adj H.Adj⟩,
240239 fun _ => RelEmbedding.ext fun a => isEmptyElim a⟩
241240
242241@[simp] lemma embeddingCount_of_isEmpty [IsEmpty V] (H : SimpleGraph W) (G : SimpleGraph V) :
243242 H.embeddingCount G = 1 := Nat.card_unique
244243
245- instance [Finite V] [Finite W] : Finite (G ↪g H) :=
244+ instance [Finite V] [Finite W] : Finite (Embedding G H) :=
246245 Finite.of_injective _ DFunLike.coe_injective
247246
248247@[simp] lemma embeddingCount_eq_zero [Finite V] [Finite W] :
@@ -300,10 +299,10 @@ lemma unlabeledEmbeddingCount_le_embeddingCount [Finite V] [Finite W] :
300299 H.unlabeledEmbeddingCount G ≤ H.embeddingCount G := by
301300 rw [unlabeledEmbeddingCount, embeddingCount]
302301 apply Nat.card_le_card_of_surjective
303- (fun f : G ↪g H ↦ (⟨Embedding.toSubgraph f, f.toSubgraph_isInduced,
302+ (fun f : Embedding G H ↦ (⟨Embedding.toSubgraph f, f.toSubgraph_isInduced,
304303 ⟨f.toCopy.isoToSubgraph⟩⟩ : G.UnlabeledEmbedding H))
305304 rintro ⟨H', hInd, ⟨e⟩⟩
306- obtain ⟨f, hf⟩ : ∃ f : G ↪g H, Embedding.toSubgraph f = H' := by
305+ obtain ⟨f, hf⟩ : ∃ f : Embedding G H, Embedding.toSubgraph f = H' := by
307306 rw [← Set.mem_range, Embedding.range_toSubgraph]; exact ⟨hInd, ⟨e⟩⟩
308307 exact ⟨f, Subtype.ext hf⟩
309308
0 commit comments