@@ -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`
@@ -500,13 +500,13 @@ variable [Fintype V]
500500
501501/-- `Sub A B` is the type of `SimpleGraph.Subgraph`s of `B` isomorphic to `A`. The corresponding
502502count is `SimpleGraph.copyCount`. -/
503- abbrev Sub (A : SimpleGraph α) (B : SimpleGraph β) : Type _ :=
503+ abbrev UnlabeledCopy (A : SimpleGraph α) (B : SimpleGraph β) : Type _ :=
504504 {B' : B.Subgraph // Nonempty (A ≃g B'.coe)}
505505
506506/-- `G.copyCount H` is the number of unlabelled copies of `H` in `G`, i.e. the number of subgraphs
507507of `G` isomorphic to `H`. See `SimpleGraph.labelledCopyCount` for the number of labelled copies. -/
508508noncomputable def copyCount (G : SimpleGraph V) (H : SimpleGraph W) : ℕ := by
509- classical exact Fintype.card (H.Sub G)
509+ classical exact Fintype.card (H.UnlabeledCopy G)
510510
511511@[simp] lemma copyCount_eq_zero : G.copyCount H = 0 ↔ H.Free G := by
512512 classical
@@ -521,13 +521,14 @@ lemma copyCount_le_labelledCopyCount [Fintype W] : G.copyCount H ≤ G.labelledC
521521 classical
522522 rw [copyCount, labelledCopyCount]
523523 apply Fintype.card_le_of_surjective
524- (fun c : Copy H G ↦ (⟨c.toSubgraph, ⟨c.isoToSubgraph⟩⟩ : H.Sub G))
524+ (fun c : Copy H G ↦ (⟨c.toSubgraph, ⟨c.isoToSubgraph⟩⟩ : H.UnlabeledCopy G))
525525 rintro ⟨G', hG'⟩
526526 obtain ⟨c, hc⟩ : ∃ c : Copy H G, c.toSubgraph = G' := by
527527 rwa [← Set.mem_range, Copy.range_toSubgraph]
528528 exact ⟨c, Subtype.ext hc⟩
529529
530- instance uniqueSubBot (G : SimpleGraph V) : Unique ((⊥ : SimpleGraph V).Sub G) where
530+ instance uniqueUnlabeledCopyBot (G : SimpleGraph V) :
531+ Unique ((⊥ : SimpleGraph V).UnlabeledCopy G) where
531532 default := ⟨{ verts := .univ, Adj := ⊥, adj_sub := False.elim, edge_vert := False.elim },
532533 ⟨(Equiv.Set.univ _).symm, by simp⟩⟩
533534 uniq := fun ⟨G', ⟨e⟩⟩ ↦ Subtype.ext <| Subgraph.ext
@@ -648,9 +649,9 @@ lemma le_card_edgeFinset_killCopies [Fintype V] :
648649 classical
649650 obtain rfl | hH := eq_or_ne H ⊥
650651 · simp [← card_edgeSet]
651- let f (G' : H.Sub G) := (aux hH G'.2 ).some
652+ let f (G' : H.UnlabeledCopy G) := (aux hH G'.2 ).some
652653 calc
653- _ = #G.edgeFinset - card (H.Sub G) := by rw [copyCount]
654+ _ = #G.edgeFinset - card (H.UnlabeledCopy G) := by rw [copyCount]
654655 _ ≤ #G.edgeFinset - #(univ.image f) := Nat.sub_le_sub_left card_image_le _
655656 _ = #G.edgeFinset - #(Set.range f).toFinset := by rw [Set.toFinset_range]
656657 _ ≤ #(G.edgeFinset \ (Set.range f).toFinset) := le_card_sdiff ..
0 commit comments