@@ -114,28 +114,28 @@ theorem edgeSet_univ_card : (univ : Finset G.edgeSet).card = G.edgeFinset.card :
114
114
Fintype.card_of_subtype G.edgeFinset fun _ => mem_edgeFinset
115
115
#align simple_graph.edge_set_univ_card SimpleGraph.edgeSet_univ_card
116
116
117
- variable [Fintype V] [DecidableEq V]
117
+ variable [Fintype V]
118
118
119
119
@[simp]
120
- theorem edgeFinset_top : (⊤ : SimpleGraph V).edgeFinset = univ.filter fun e => ¬e.IsDiag := by
120
+ theorem edgeFinset_top [DecidableEq V] :
121
+ (⊤ : SimpleGraph V).edgeFinset = univ.filter fun e => ¬e.IsDiag := by
121
122
rw [← coe_inj]; simp
122
123
123
124
/-- The complete graph on `n` vertices has `n.choose 2` edges. -/
124
- theorem card_edgeFinset_top_eq_card_choose_two :
125
+ theorem card_edgeFinset_top_eq_card_choose_two [DecidableEq V] :
125
126
(⊤ : SimpleGraph V).edgeFinset.card = (Fintype.card V).choose 2 := by
126
127
simp_rw [Set.toFinset_card, edgeSet_top, Set.coe_setOf, ← Sym2.card_subtype_not_diag]
127
128
128
129
/-- Any graph on `n` vertices has at most `n.choose 2` edges. -/
129
130
theorem card_edgeFinset_le_card_choose_two : G.edgeFinset.card ≤ (Fintype.card V).choose 2 := by
131
+ classical
130
132
rw [← card_edgeFinset_top_eq_card_choose_two]
131
133
exact card_le_card (edgeFinset_mono le_top)
132
134
133
135
end EdgeFinset
134
136
135
- -- porting note: added `Fintype (Sym2 V)` argument rather than have it be inferred.
136
- -- As a consequence, deleted the `Fintype V` argument.
137
- theorem edgeFinset_deleteEdges [Fintype (Sym2 V)] [DecidableEq V] [DecidableRel G.Adj]
138
- (s : Finset (Sym2 V)) [DecidableRel (G.deleteEdges s).Adj] :
137
+ theorem edgeFinset_deleteEdges [DecidableEq V] [Fintype G.edgeSet] (s : Finset (Sym2 V))
138
+ [Fintype (G.deleteEdges s).edgeSet] :
139
139
(G.deleteEdges s).edgeFinset = G.edgeFinset \ s := by
140
140
ext e
141
141
simp [edgeSet_deleteEdges]
@@ -144,8 +144,8 @@ theorem edgeFinset_deleteEdges [Fintype (Sym2 V)] [DecidableEq V] [DecidableRel
144
144
section DeleteFar
145
145
146
146
-- porting note: added `Fintype (Sym2 V)` argument.
147
- variable {𝕜 : Type *} [OrderedRing 𝕜] [Fintype V] [Fintype (Sym2 V)] [DecidableEq V]
148
- [DecidableRel G.Adj ] {p : SimpleGraph V → Prop } {r r₁ r₂ : 𝕜}
147
+ variable {𝕜 : Type *} [OrderedRing 𝕜] [Fintype V] [Fintype (Sym2 V)]
148
+ [Fintype G.edgeSet ] {p : SimpleGraph V → Prop } {r r₁ r₂ : 𝕜}
149
149
150
150
/-- A graph is `r`-*delete-far* from a property `p` if we must delete at least `r` edges from it to
151
151
get a graph with the property `p`. -/
@@ -158,6 +158,7 @@ variable {G}
158
158
theorem deleteFar_iff :
159
159
G.DeleteFar p r ↔ ∀ ⦃H : SimpleGraph _⦄ [DecidableRel H.Adj],
160
160
H ≤ G → p H → r ≤ G.edgeFinset.card - H.edgeFinset.card := by
161
+ classical
161
162
refine ⟨fun h H _ hHG hH ↦ ?_, fun h s hs hG ↦ ?_⟩
162
163
· have := h (sdiff_subset G.edgeFinset H.edgeFinset)
163
164
simp only [deleteEdges_sdiff_eq_of_le _ hHG, edgeFinset_mono hHG, card_sdiff,
0 commit comments