File tree Expand file tree Collapse file tree
Mathlib/Combinatorics/SimpleGraph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,9 +121,7 @@ def mapEdgeSet (f : Copy A B) : A.edgeSet ↪ B.edgeSet where
121121def mapNeighborSet (f : Copy A B) (a : α) :
122122 A.neighborSet a ↪ B.neighborSet (f a) where
123123 toFun v := ⟨f v, f.toHom.apply_mem_neighborSet v.prop⟩
124- inj' _ _ h := by
125- rw [Subtype.mk_eq_mk] at h ⊢
126- exact f.injective h
124+ inj' _ _ h := Subtype.ext (f.injective (congrArg Subtype.val h))
127125
128126/-- A copy gives rise to an embedding of vertex types. -/
129127@[expose] def toEmbedding (f : Copy A B) : α ↪ β := ⟨f, f.injective⟩
@@ -136,10 +134,8 @@ def mapNeighborSet (f : Copy A B) (a : α) :
136134@ [simp, norm_cast] lemma coe_id : ⇑(id G) = _root_.id := rfl
137135
138136/-- The composition of copies is a copy. -/
139- def comp (g : Copy B C) (f : Copy A B) : Copy A C := by
140- use g.toHom.comp f.toHom
141- rw [Hom.coe_comp]
142- exact g.injective.comp f.injective
137+ def comp (g : Copy B C) (f : Copy A B) : Copy A C :=
138+ ⟨g.toHom.comp f.toHom, by simpa [Hom.coe_comp] using g.injective.comp f.injective⟩
143139
144140@[simp]
145141theorem comp_apply (g : Copy B C) (f : Copy A B) (a : α) : g.comp f a = g (f a) :=
You can’t perform that action at this time.
0 commit comments