@@ -79,35 +79,25 @@ noncomputable instance instLocallyFiniteOrder [Fintype V] [DecidableEq V] :
7979
8080/-! ### Induced shape of a copy
8181
82- For a copy `f : Copy G H` with `G : SimpleGraph V` the guest, the *induced shape* of `f`
83- is the pullback `H.comap f.toEmbedding`: a graph on `V` whose adjacency records the
84- induced adjacency of `H` restricted to the image of `f`. It is always a supergraph of `G`,
85- and its fiber under `Copy.inducedShape` is canonically `Embedding G' H` for each
86- supergraph `G' ∈ Icc G ⊤`. -/
82+ The pullback `H.comap f.toEmbedding` records the induced adjacency on the image of a copy
83+ `f : Copy G H`, transported back to `V`. It is always a supergraph of `G`, and pinning it
84+ down to a specific supergraph `G'` promotes the copy to an embedding `G' ↪g H`. -/
8785
8886namespace Copy
8987
9088variable {G G' : SimpleGraph V} {H : SimpleGraph W}
9189
92- /-- The *induced shape* of a copy `f : Copy G H` is the pullback of the host graph along
93- the underlying injection `f.toEmbedding : V ↪ W`. This is always a supergraph of `G`
94- (by `Copy.le_inducedShape`); it records the induced subgraph of `H` on the image of `f`,
95- transported back to the vertex type `V`. -/
96- @[expose] def inducedShape (f : Copy G H) : SimpleGraph V :=
90+ /-- The pullback of the host graph along the underlying injection of a copy. -/
91+ def inducedShape (f : Copy G H) : SimpleGraph V :=
9792 H.comap f.toEmbedding
9893
99- /-- Adjacency in the induced shape unfolds to adjacency in `H` at the image vertices. -/
10094@[simp] lemma inducedShape_adj (f : Copy G H) {a b : V} :
10195 f.inducedShape.Adj a b ↔ H.Adj (f a) (f b) := Iff.rfl
10296
103- /-- A copy `f : Copy G H` is dominated by its induced shape: every edge of `G` is mapped
104- to an edge of `H`, hence appears as an edge of the pullback. -/
10597lemma le_inducedShape (f : Copy G H) : G ≤ f.inducedShape :=
10698 fun _ _ => f.toHom.map_adj
10799
108- /-- Promote a copy whose induced shape equals a specified supergraph `G'` to a graph
109- embedding `G' ↪g H`. The underlying function is `f` itself; the adjacency-iff direction
110- that is missing in `Copy` is recovered from `h : f.inducedShape = G'`. -/
100+ /-- A copy with induced shape `G'` promotes to a graph embedding `G' ↪g H`. -/
111101@[expose] def toEmbeddingOfInducedShapeEq (f : Copy G H) (h : f.inducedShape = G') :
112102 G' ↪g H where
113103 toFun := f
@@ -119,27 +109,20 @@ that is missing in `Copy` is recovered from `h : f.inducedShape = G'`. -/
119109@[simp] lemma toEmbeddingOfInducedShapeEq_apply (f : Copy G H) (h : f.inducedShape = G')
120110 (v : V) : f.toEmbeddingOfInducedShapeEq h v = f v := rfl
121111
122- /-- The fiber of `Copy.inducedShape` over a fixed supergraph `G'` of `G` is canonically
123- isomorphic to the type of graph embeddings `G' ↪g H`. The underlying function of the copy
124- is the same as the underlying function of the embedding; the only difference is the explicit
125- recording of the iff-direction of adjacency, made possible by the inducedShape-equation. -/
112+ /-- The fiber of `inducedShape` over a supergraph `G' ≥ G` is canonically `Embedding G' H`. -/
126113def fiberInducedShapeEquiv (hGG' : G ≤ G') :
127114 {f : Copy G H // f.inducedShape = G'} ≃ Embedding G' H where
128115 toFun f := f.val.toEmbeddingOfInducedShapeEq f.prop
129- invFun e := ⟨e.toCopy.comp (Copy.ofLE G G' hGG'), by
130- ext a b
131- simp [inducedShape]⟩
132- left_inv f := by
133- apply Subtype.ext
134- ext v
135- simp
136- right_inv e := by
137- apply DFunLike.ext
138- intro v
139- simp
116+ invFun e := ⟨e.toCopy.comp (Copy.ofLE G G' hGG'), by ext a b; simp [inducedShape]⟩
117+ left_inv f := by apply Subtype.ext; ext v; simp
118+ right_inv e := by apply DFunLike.ext; intro v; simp
140119
141120end Copy
142121
122+ @[simp] lemma Embedding.inducedShape_toCopy {G : SimpleGraph V} {H : SimpleGraph W}
123+ (e : Embedding G H) : e.toCopy.inducedShape = G := by
124+ ext a b; rw [Copy.inducedShape_adj]; exact e.map_rel_iff
125+
143126/-! ### Forward bijection and count identity -/
144127
145128section Forward
0 commit comments