Skip to content

Commit 570a85c

Browse files
committed
chore: rename Finset.card_doubleton to Finset.card_pair (#9379)
1 parent 26c28ad commit 570a85c

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

Mathlib/Combinatorics/SimpleGraph/Clique.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ theorem cliqueFree_two : G.CliqueFree 2 ↔ G = ⊥ := by
339339
classical
340340
constructor
341341
· simp_rw [← edgeSet_eq_empty, Set.eq_empty_iff_forall_not_mem, Sym2.forall, mem_edgeSet]
342-
exact fun h a b hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩
342+
exact fun h a b hab => h _ ⟨by simpa [hab.ne], card_pair hab.ne⟩
343343
· rintro rfl
344344
exact cliqueFree_bot le_rfl
345345
#align simple_graph.clique_free_two SimpleGraph.cliqueFree_two
@@ -396,7 +396,7 @@ theorem cliqueFreeOn_of_card_lt {s : Finset α} (h : s.card < n) : G.CliqueFreeO
396396
@[simp]
397397
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ) := by
398398
classical
399-
refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_doubleton hab.ne⟩, _⟩
399+
refine' ⟨fun h a ha b hb _ hab => h _ ⟨by simpa [hab.ne], card_pair hab.ne⟩, _⟩
400400
· push_cast
401401
exact Set.insert_subset_iff.2 ⟨ha, Set.singleton_subset_iff.2 hb⟩
402402
simp only [CliqueFreeOn, isNClique_iff, card_eq_two, coe_subset, not_and, not_exists]

Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ theorem sum_incMatrix_apply_of_mem_edgeSet :
136136
refine' e.ind _
137137
intro a b h
138138
rw [mem_edgeSet] at h
139-
rw [← Nat.cast_two, ← card_doubleton h.ne]
139+
rw [← Nat.cast_two, ← card_pair h.ne]
140140
simp only [incMatrix_apply', sum_boole, mk'_mem_incidenceSet_iff, h, true_and_iff]
141141
congr 2
142142
ext e
@@ -157,7 +157,7 @@ theorem incMatrix_transpose_mul_diag [DecidableRel G.Adj] :
157157
· revert h
158158
refine' e.ind _
159159
intro v w h
160-
rw [← Nat.cast_two, ← card_doubleton (G.ne_of_adj h)]
160+
rw [← Nat.cast_two, ← card_pair (G.ne_of_adj h)]
161161
simp only [mk'_mem_incidenceSet_iff, G.mem_edgeSet.mp h, true_and, mem_univ, forall_true_left,
162162
forall_eq_or_imp, forall_eq, and_self, mem_singleton, ne_eq]
163163
congr 2

Mathlib/Data/Finset/Card.lean

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ theorem card_insert_eq_ite : card (insert a s) = if a ∈ s then s.card else s.c
149149
#align finset.card_insert_eq_ite Finset.card_insert_eq_ite
150150

151151
@[simp]
152-
theorem card_doubleton (h : a ≠ b) : ({a, b} : Finset α).card = 2 := by
152+
theorem card_pair (h : a ≠ b) : ({a, b} : Finset α).card = 2 := by
153153
rw [card_insert_of_not_mem (not_mem_singleton.2 h), card_singleton]
154-
#align finset.card_doubleton Finset.card_doubleton
154+
#align finset.card_doubleton Finset.card_pair
155+
156+
@[deprecated] alias card_doubleton := Finset.card_pair
155157

156158
/-- $\#(s \setminus \{a\}) = \#s - 1$ if $a \in s$. -/
157159
@[simp]
@@ -694,7 +696,7 @@ theorem card_eq_two : s.card = 2 ↔ ∃ x y, x ≠ y ∧ s = {x, y} := by
694696
rintro ⟨a, _, hab, rfl, b, rfl⟩
695697
exact ⟨a, b, not_mem_singleton.1 hab, rfl⟩
696698
· rintro ⟨x, y, h, rfl⟩
697-
exact card_doubleton h
699+
exact card_pair h
698700
#align finset.card_eq_two Finset.card_eq_two
699701

700702
theorem card_eq_three : s.card = 3 ↔ ∃ x y z, x ≠ y ∧ x ≠ z ∧ y ≠ z ∧ s = {x, y, z} := by

Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ theorem quadraticChar_card_sqrts (hF : ringChar F ≠ 2) (a : F) :
264264
simp only [neg_sq]
265265
norm_cast
266266
rw [h₁, List.toFinset_cons, List.toFinset_cons, List.toFinset_nil]
267-
exact Finset.card_doubleton (Ne.symm (mt (Ring.eq_self_iff_eq_zero_of_char_ne_two hF).mp h₀))
267+
exact Finset.card_pair (Ne.symm (mt (Ring.eq_self_iff_eq_zero_of_char_ne_two hF).mp h₀))
268268
· rw [quadraticChar_neg_one_iff_not_isSquare.mpr h]
269269
simp only [Int.coe_nat_eq_zero, Finset.card_eq_zero, Set.toFinset_card, Fintype.card_ofFinset,
270270
Set.mem_setOf_eq, add_left_neg]

Mathlib/NumberTheory/NumberField/Embeddings.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ theorem card_filter_mk_eq [NumberField K] (w : InfinitePlace K) :
461461
split_ifs with hw
462462
· rw [ComplexEmbedding.isReal_iff.mp (isReal_iff.mp hw), Finset.union_idempotent,
463463
Finset.card_singleton]
464-
· refine Finset.card_doubleton ?_
464+
· refine Finset.card_pair ?_
465465
rwa [Ne.def, eq_comm, ← ComplexEmbedding.isReal_iff, ← isReal_iff]
466466

467467
open scoped BigOperators

0 commit comments

Comments
 (0)