@@ -35,7 +35,7 @@ Containment:
3535 same underlying vertex type.
3636* `SimpleGraph.Free` is the predicate that `H` is `G`-free, that is, `H` does not contain a copy of
3737 `G`. This is the negation of `SimpleGraph.IsContained` implemented for convenience.
38- * `SimpleGraph.Sub H G`: Type of `SimpleGraph.Subgraph`s of `G` isomorphic to `H`.
38+ * `SimpleGraph.UnlabeledCopy H G`: Type of `SimpleGraph.Subgraph`s of `G` isomorphic to `H`.
3939* `SimpleGraph.killCopies G H`: Subgraph of `G` that does not contain `H`. Obtained by arbitrarily
4040 removing an edge from each copy of `H` in `G`.
4141* `SimpleGraph.copyCount G H`: Number of copies of `H` in `G`, i.e. number of subgraphs of `G`
@@ -499,13 +499,13 @@ variable [Fintype V]
499499
500500/-- `Sub A B` is the type of `SimpleGraph.Subgraph`s of `B` isomorphic to `A`. The corresponding
501501count is `SimpleGraph.copyCount`. -/
502- abbrev Sub (A : SimpleGraph α) (B : SimpleGraph β) : Type _ :=
502+ abbrev UnlabeledCopy (A : SimpleGraph α) (B : SimpleGraph β) : Type _ :=
503503 {B' : B.Subgraph // Nonempty (A ≃g B'.coe)}
504504
505505/-- `G.copyCount H` is the number of unlabelled copies of `H` in `G`, i.e. the number of subgraphs
506506of `G` isomorphic to `H`. See `SimpleGraph.labelledCopyCount` for the number of labelled copies. -/
507507noncomputable def copyCount (G : SimpleGraph V) (H : SimpleGraph W) : ℕ := by
508- classical exact Fintype.card (H.Sub G)
508+ classical exact Fintype.card (H.UnlabeledCopy G)
509509
510510@[simp] lemma copyCount_eq_zero : G.copyCount H = 0 ↔ H.Free G := by
511511 classical
@@ -520,13 +520,13 @@ lemma copyCount_le_labelledCopyCount [Fintype W] : G.copyCount H ≤ G.labelledC
520520 classical
521521 rw [copyCount, labelledCopyCount]
522522 apply Fintype.card_le_of_surjective
523- (fun c : Copy H G ↦ (⟨c.toSubgraph, ⟨c.isoToSubgraph⟩⟩ : H.Sub G))
523+ (fun c : Copy H G ↦ (⟨c.toSubgraph, ⟨c.isoToSubgraph⟩⟩ : H.UnlabeledCopy G))
524524 rintro ⟨G', hG'⟩
525525 obtain ⟨c, hc⟩ : ∃ c : Copy H G, c.toSubgraph = G' := by
526526 rwa [← Set.mem_range, Copy.range_toSubgraph]
527527 exact ⟨c, Subtype.ext hc⟩
528528
529- instance uniqueSubBot (G : SimpleGraph V) : Unique ((⊥ : SimpleGraph V).Sub G) where
529+ instance uniqueSubBot (G : SimpleGraph V) : Unique ((⊥ : SimpleGraph V).UnlabeledCopy G) where
530530 default := ⟨{ verts := .univ, Adj := ⊥, adj_sub := False.elim, edge_vert := False.elim },
531531 ⟨(Equiv.Set.univ _).symm, by simp⟩⟩
532532 uniq := fun ⟨G', ⟨e⟩⟩ ↦ Subtype.ext <| Subgraph.ext
@@ -647,9 +647,9 @@ lemma le_card_edgeFinset_killCopies [Fintype V] :
647647 classical
648648 obtain rfl | hH := eq_or_ne H ⊥
649649 · simp [← card_edgeSet]
650- let f (G' : H.Sub G) := (aux hH G'.2 ).some
650+ let f (G' : H.UnlabeledCopy G) := (aux hH G'.2 ).some
651651 calc
652- _ = #G.edgeFinset - card (H.Sub G) := by rw [copyCount]
652+ _ = #G.edgeFinset - card (H.UnlabeledCopy G) := by rw [copyCount]
653653 _ ≤ #G.edgeFinset - #(univ.image f) := Nat.sub_le_sub_left card_image_le _
654654 _ = #G.edgeFinset - #(Set.range f).toFinset := by rw [Set.toFinset_range]
655655 _ ≤ #(G.edgeFinset \ (Set.range f).toFinset) := le_card_sdiff ..
0 commit comments