Skip to content

Commit bc61eff

Browse files
jcommelinrwbarton
andcommitted
chore: revert Multiset and Finset API to use Prop instead of Bool (#1652)
Co-authored-by: Reid Barton <rwbarton@gmail.com>
1 parent 6bec256 commit bc61eff

File tree

13 files changed

+144
-176
lines changed

13 files changed

+144
-176
lines changed

Mathlib/Algebra/BigOperators/Basic.lean

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,11 @@ theorem prod_union [DecidableEq α] (h : Disjoint s₁ s₂) :
373373
#align finset.sum_union Finset.sum_union
374374

375375
@[to_additive]
376-
theorem prod_filter_mul_prod_filter_not (s : Finset α) (p : α → Prop) [DecidablePred p]
377-
[DecidablePred fun x => ¬p x] (f : α → β) :
376+
theorem prod_filter_mul_prod_filter_not
377+
(s : Finset α) (p : α → Prop) [DecidablePred p] [∀ x, Decidable (¬p x)] (f : α → β) :
378378
((∏ x in s.filter p, f x) * ∏ x in s.filter fun x => ¬p x, f x) = ∏ x in s, f x := by
379-
classical
380-
rw [← prod_union]
381-
· conv in ∏ x in s, f x => rw [← filter_union_filter_neg_eq (p ·) s]
382-
simp
383-
· simpa using disjoint_filter_filter_neg s s (p ·)
379+
have := Classical.decEq α
380+
rw [← prod_union (disjoint_filter_filter_neg s s p), filter_union_filter_neg_eq]
384381
#align finset.prod_filter_mul_prod_filter_not Finset.prod_filter_mul_prod_filter_not
385382
#align finset.sum_filter_add_sum_filter_not Finset.sum_filter_add_sum_filter_not
386383

@@ -1112,13 +1109,13 @@ theorem prod_bij_ne_one {s : Finset α} {t : Finset γ} {f : α → β} {g : γ
11121109
(i_inj : ∀ a₁ a₂ h₁₁ h₁₂ h₂₁ h₂₂, i a₁ h₁₁ h₁₂ = i a₂ h₂₁ h₂₂ → a₁ = a₂)
11131110
(i_surj : ∀ b ∈ t, g b ≠ 1 → ∃ a h₁ h₂, b = i a h₁ h₂) (h : ∀ a h₁ h₂, f a = g (i a h₁ h₂)) :
11141111
(∏ x in s, f x) = ∏ x in t, g x := by
1115-
classical refine'
1116-
calc
1117-
(∏ x in s, f x) = ∏ x in s.filter fun x => f x ≠ 1, f x := prod_filter_ne_one.symm
1118-
_ = ∏ x in t.filter fun x => g x ≠ 1, g x :=
1119-
prod_bij (fun a ha => i a (mem_filter.mp ha).1 $ by simpa using (mem_filter.mp ha).2)
1120-
_ _ _ _
1121-
_ = ∏ x in t, g x := prod_filter_ne_one
1112+
classical
1113+
calc
1114+
(∏ x in s, f x) = ∏ x in s.filter fun x => f x ≠ 1, f x := prod_filter_ne_one.symm
1115+
_ = ∏ x in t.filter fun x => g x ≠ 1, g x :=
1116+
prod_bij (fun a ha => i a (mem_filter.mp ha).1 $ by simpa using (mem_filter.mp ha).2)
1117+
?_ ?_ ?_ ?_
1118+
_ = ∏ x in t, g x := prod_filter_ne_one
11221119
· intros a ha
11231120
refine' (mem_filter.mp ha).elim _
11241121
intros h₁ h₂
@@ -1134,8 +1131,7 @@ theorem prod_bij_ne_one {s : Finset α} {t : Finset γ} {f : α → β} {g : γ
11341131
· intros b hb
11351132
refine' (mem_filter.mp hb).elim fun h₁ h₂ ↦ _
11361133
obtain ⟨a, ha₁, ha₂, eq⟩ := i_surj b h₁ fun H ↦ by rw [H] at h₂; simp at h₂
1137-
refine' ⟨a, mem_filter.mpr ⟨ha₁, _⟩, eq⟩
1138-
classical exact decide_eq_true ha₂
1134+
exact ⟨a, mem_filter.mpr ⟨ha₁, ha₂⟩, eq⟩
11391135

11401136
#align finset.prod_bij_ne_one Finset.prod_bij_ne_one
11411137
#align finset.sum_bij_ne_zero Finset.sum_bij_ne_zero
@@ -1565,12 +1561,9 @@ theorem prod_cancels_of_partition_cancels (R : Setoid α) [DecidableRel R.r]
15651561
(h : ∀ x ∈ s, (∏ a in s.filter fun y => y ≈ x, f a) = 1) : (∏ x in s, f x) = 1 := by
15661562
rw [prod_partition R, ← Finset.prod_eq_one]
15671563
intro xbar xbar_in_s
1568-
obtain ⟨x, x_in_s, xbar_eq_x⟩ := mem_image.mp xbar_in_s
1569-
rw [← xbar_eq_x, filter_congr]
1570-
· apply h x x_in_s
1571-
· intros
1572-
simp only [decide_eq_true_eq, ← Quotient.eq]
1573-
rfl
1564+
obtain ⟨x, x_in_s, rfl⟩ := mem_image.mp xbar_in_s
1565+
simp only [← Quotient.eq] at h
1566+
exact h x x_in_s
15741567
#align finset.prod_cancels_of_partition_cancels Finset.prod_cancels_of_partition_cancels
15751568
#align finset.sum_cancels_of_partition_cancels Finset.sum_cancels_of_partition_cancels
15761569

Mathlib/Algebra/FreeMonoid/Count.lean

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ variable {α : Type _} (p : α → Prop) [DecidablePred p]
2626
namespace FreeAddMonoid
2727

2828
/-- `List.countp` as a bundled additive monoid homomorphism. -/
29-
-- Porting note: changed the type of `p : α → Prop` to `p : α → Bool` to match the
30-
-- change in `List.countp`
31-
def countp (p : α → Bool): FreeAddMonoid α →+ ℕ where
29+
def countp : FreeAddMonoid α →+ ℕ where
3230
toFun := List.countp p
33-
map_zero' := List.countp_nil p
34-
map_add' := List.countp_append p
31+
map_zero' := List.countp_nil _
32+
map_add' := List.countp_append _
3533
#align free_add_monoid.countp FreeAddMonoid.countp
3634

3735
theorem countp_of (x : α): countp p (of x) = if p x = true then 1 else 0 := by
@@ -42,9 +40,8 @@ theorem countp_apply (l : FreeAddMonoid α) : countp p l = List.countp p l := rf
4240
#align free_add_monoid.countp_apply FreeAddMonoid.countp_apply
4341

4442
/-- `List.count` as a bundled additive monoid homomorphism. -/
45-
-- Porting note: changed from `countp (Eq x)` to match the definition of `List.count` and thus
46-
-- we can prove `count_apply` by `rfl`
47-
def count [DecidableEq α] (x : α) : FreeAddMonoid α →+ ℕ := countp (· == x)
43+
-- Porting note: was (x = ·)
44+
def count [DecidableEq α] (x : α) : FreeAddMonoid α →+ ℕ := countp (· = x)
4845
#align free_add_monoid.count FreeAddMonoid.count
4946

5047
theorem count_of [DecidableEq α] (x y : α) : count x (of y) = (Pi.single x 1 : α → ℕ) y := by
@@ -61,21 +58,17 @@ end FreeAddMonoid
6158
namespace FreeMonoid
6259

6360
/-- `list.countp` as a bundled multiplicative monoid homomorphism. -/
64-
-- Porting note: changed the type of `p : α → Prop` to `p : α → Bool` to match the
65-
-- definition of `FreeAddMonoid.countp`
66-
def countp (p : α → Bool): FreeMonoid α →* Multiplicative ℕ :=
61+
def countp : FreeMonoid α →* Multiplicative ℕ :=
6762
AddMonoidHom.toMultiplicative (FreeAddMonoid.countp p)
6863
#align free_monoid.countp FreeMonoid.countp
6964

70-
-- Porting note: changed the type of `p : α → Prop` to `p : α → Bool` and `if` to `bif`
71-
theorem countp_of' (x : α) (p : α → Bool):
72-
countp p (of x) = bif p x then Multiplicative.ofAdd 1 else Multiplicative.ofAdd 0 := by
73-
simp [countp]
74-
exact AddMonoidHom.toMultiplicative_apply_apply (FreeAddMonoid.countp p) (of x)
65+
theorem countp_of' (x : α) :
66+
countp p (of x) = if p x then Multiplicative.ofAdd 1 else Multiplicative.ofAdd 0 := by
67+
erw [FreeAddMonoid.countp_of]
68+
simp only [eq_iff_iff, iff_true, ofAdd_zero]; rfl
7569
#align free_monoid.countp_of' FreeMonoid.countp_of'
7670

77-
-- Porting note: changed `if` to `bif`
78-
theorem countp_of (x : α) : countp p (of x) = bif p x then Multiplicative.ofAdd 1 else 1 := by
71+
theorem countp_of (x : α) : countp p (of x) = if p x then Multiplicative.ofAdd 1 else 1 := by
7972
rw [countp_of', ofAdd_zero]
8073
#align free_monoid.countp_of FreeMonoid.countp_of
8174

@@ -85,7 +78,7 @@ theorem countp_apply (l : FreeAddMonoid α) : countp p l = Multiplicative.ofAdd
8578
#align free_monoid.countp_apply FreeMonoid.countp_apply
8679

8780
/-- `List.count` as a bundled additive monoid homomorphism. -/
88-
def count [DecidableEq α] (x : α) : FreeMonoid α →* Multiplicative ℕ := countp (· == x)
81+
def count [DecidableEq α] (x : α) : FreeMonoid α →* Multiplicative ℕ := countp (· = x)
8982
#align free_monoid.count FreeMonoid.count
9083

9184
theorem count_apply [DecidableEq α] (x : α) (l : FreeAddMonoid α) :

Mathlib/Algebra/GCDMonoid/Finset.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,16 @@ all the `decide`s around. -/
230230
theorem gcd_eq_gcd_filter_ne_zero [DecidablePred fun x : β ↦ f x = 0] :
231231
s.gcd f = (s.filter fun x ↦ f x ≠ 0).gcd f := by
232232
classical
233-
trans ((s.filter fun x ↦ f x = 0) ∪ s.filter fun x ↦ (¬decide (f x = 0) = true)).gcd f
233+
trans ((s.filter fun x ↦ f x = 0) ∪ s.filter fun x ↦ (f x 0)).gcd f
234234
· rw [filter_union_filter_neg_eq]
235235
rw [gcd_union]
236236
refine' Eq.trans (_ : _ = GCDMonoid.gcd (0 : α) _) (_ : GCDMonoid.gcd (0 : α) _ = _)
237-
· exact (gcd (filter (fun x => decide (f x ≠ 0)) s) f)
237+
· exact (gcd (filter (fun x => (f x ≠ 0)) s) f)
238238
· refine' congr (congr rfl <| s.induction_on _ _) (by simp)
239239
· simp
240240
· intro a s _ h
241241
rw [filter_insert]
242-
split_ifs with h1 <;>
243-
· simp only [decide_eq_true_eq] at h1
244-
simp [h, h1]
242+
split_ifs with h1 <;> simp [h, h1]
245243
simp only [gcd_zero_left, normalize_gcd]
246244
#align finset.gcd_eq_gcd_filter_ne_zero Finset.gcd_eq_gcd_filter_ne_zero
247245

Mathlib/Combinatorics/SetFamily/Compression/Down.lean

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ theorem mem_memberSubfamily : s ∈ 𝒜.memberSubfamily a ↔ insert a s ∈
6767
simp_rw [memberSubfamily, mem_image, mem_filter]
6868
refine' ⟨_, fun h => ⟨insert a s, ⟨h.1, by simp⟩, erase_insert h.2⟩⟩
6969
rintro ⟨s, ⟨hs1, hs2⟩, rfl⟩
70-
rw [decide_eq_true_eq] at hs2
7170
rw [insert_erase hs2]
7271
exact ⟨hs1, not_mem_erase _ _⟩
7372
#align finset.mem_member_subfamily Finset.mem_memberSubfamily
@@ -100,7 +99,6 @@ theorem card_memberSubfamily_add_card_nonMemberSubfamily (a : α) (𝒜 : Finset
10099
by
101100
rw [memberSubfamily, nonMemberSubfamily, card_image_of_injOn]
102101
· conv_rhs => rw [← filter_card_add_filter_neg_card_eq_card (fun s => (a ∈ s))]
103-
simp
104102
· apply (erase_injOn' _).mono
105103
simp
106104
#align
@@ -169,7 +167,6 @@ def compression (a : α) (𝒜 : Finset (Finset α)) : Finset (Finset α) :=
169167
((𝒜.image fun s => erase s a).filter fun s => s ∉ 𝒜) <|
170168
disjoint_left.2 fun s h₁ h₂ => by
171169
have := (mem_filter.1 h₂).2
172-
rw [decide_eq_true_iff] at this
173170
exact this (mem_filter.1 h₁).1
174171
#align down.compression Down.compression
175172

@@ -234,14 +231,9 @@ theorem card_compression (a : α) (𝒜 : Finset (Finset α)) : (𝓓 a 𝒜).ca
234231
rw [compression, card_disjUnion, image_filter,
235232
card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), ← card_disjoint_union]
236233
· conv_rhs => rw [← filter_union_filter_neg_eq (fun s => (erase s a ∈ 𝒜)) 𝒜]
237-
congr
238-
ext
239-
simp
240234
· convert disjoint_filter_filter_neg 𝒜 𝒜 (fun s => (erase s a ∈ 𝒜))
241-
ext
242-
simp
243235
intro s hs
244-
rw [mem_coe, mem_filter, Function.comp_apply, decide_eq_true_iff] at hs
236+
rw [mem_coe, mem_filter, Function.comp_apply] at hs
245237
convert not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
246238
#align down.card_compression Down.card_compression
247239

Mathlib/Data/Finset/Basic.lean

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ This is then used to define `Fintype.card`, the size of a type.
7070
7171
### Finsets from functions
7272
73-
* `Finset.filter`: Given a predicate `p : α → Bool`, `s.filter p` is
73+
* `Finset.filter`: Given a decidable predicate `p : α → Prop`, `s.filter p` is
7474
the finset consisting of those elements in `s` satisfying the predicate `p`.
7575
7676
### The lattice structure on subsets of finsets
@@ -2520,8 +2520,7 @@ end DecidablePiExists
25202520

25212521
section Filter
25222522

2523-
-- Porting note: changed from `α → Prop`.
2524-
variable (p q : α → Bool)
2523+
variable (p q : α → Prop) [DecidablePred p] [DecidablePred q]
25252524

25262525
/-- `filter p s` is the set of elements of `s` that satisfy `p`. -/
25272526
def filter (s : Finset α) : Finset α :=
@@ -2563,14 +2562,14 @@ theorem filter_filter (s : Finset α) : (s.filter p).filter q = s.filter fun a =
25632562
simp only [mem_filter, and_assoc, Bool.decide_and, Bool.decide_coe, Bool.and_eq_true]
25642563
#align finset.filter_filter Finset.filter_filter
25652564

2566-
theorem filter_true {s : Finset α} : Finset.filter (fun _ => true) s = s := by
2565+
theorem filter_True {s : Finset α} : Finset.filter (fun _ => True) s = s := by
25672566
ext; simp
2568-
#align finset.filter_true Finset.filter_true
2567+
#align finset.filter_true Finset.filter_True
25692568

25702569
@[simp]
2571-
theorem filter_false (s : Finset α) : filter (fun _ => false) s = ∅ :=
2570+
theorem filter_False (s : Finset α) : filter (fun _ => False) s = ∅ :=
25722571
ext fun a => by simp [mem_filter, and_false_iff]
2573-
#align finset.filter_false Finset.filter_false
2572+
#align finset.filter_false Finset.filter_False
25742573

25752574
variable {p q}
25762575

@@ -2617,9 +2616,8 @@ theorem filter_subset_filter {s t : Finset α} (h : s ⊆ t) : s.filter p ⊆ t.
26172616
theorem monotone_filter_left : Monotone (filter p) := fun _ _ => filter_subset_filter p
26182617
#align finset.monotone_filter_left Finset.monotone_filter_left
26192618

2620-
-- Porting note: was `p q : α → Prop, h : p ≤ q`.
2621-
theorem monotone_filter_right (s : Finset α) ⦃p q : α → Bool⦄
2622-
(h : ∀ a, p a → q a) : s.filter p ≤ s.filter q :=
2619+
theorem monotone_filter_right (s : Finset α) ⦃p q : α → Prop⦄ [DecidablePred p] [DecidablePred q]
2620+
(h : p ≤ q) : s.filter p ≤ s.filter q :=
26232621
Multiset.subset_of_le (Multiset.monotone_filter_right s.val h)
26242622
#align finset.monotone_filter_right Finset.monotone_filter_right
26252623

@@ -2649,25 +2647,28 @@ theorem filter_cons_of_neg (a : α) (s : Finset α) (ha : a ∉ s) (hp : ¬p a)
26492647
eq_of_veq <| Multiset.filter_cons_of_neg s.val hp
26502648
#align finset.filter_cons_of_neg Finset.filter_cons_of_neg
26512649

2652-
theorem disjoint_filter {s : Finset α} {p q : α → Bool} :
2650+
theorem disjoint_filter {s : Finset α} {p q : α → Prop} [DecidablePred p] [DecidablePred q] :
26532651
Disjoint (s.filter p) (s.filter q) ↔ ∀ x ∈ s, p x → ¬q x := by
26542652
constructor <;> simp (config := { contextual := true }) [disjoint_left]
26552653
#align finset.disjoint_filter Finset.disjoint_filter
26562654

2657-
theorem disjoint_filter_filter {s t : Finset α} {p q : α → Bool} :
2655+
theorem disjoint_filter_filter {s t : Finset α}
2656+
{p q : α → Prop} [DecidablePred p] [DecidablePred q] :
26582657
Disjoint s t → Disjoint (s.filter p) (t.filter q) :=
26592658
Disjoint.mono (filter_subset _ _) (filter_subset _ _)
26602659
#align finset.disjoint_filter_filter Finset.disjoint_filter_filter
26612660

2662-
theorem disjoint_filter_filter' (s t : Finset α) {p q : α → Bool} (h : Disjoint p q) :
2661+
theorem disjoint_filter_filter' (s t : Finset α)
2662+
{p q : α → Prop} [DecidablePred p] [DecidablePred q] (h : Disjoint p q) :
26632663
Disjoint (s.filter p) (t.filter q) := by
26642664
simp_rw [disjoint_left, mem_filter]
26652665
rintro a ⟨_, hp⟩ ⟨_, hq⟩
26662666
rw [Pi.disjoint_iff] at h
26672667
simpa [hp, hq] using h a
26682668
#align finset.disjoint_filter_filter' Finset.disjoint_filter_filter'
26692669

2670-
theorem disjoint_filter_filter_neg (s t : Finset α) (p : α → Bool) :
2670+
theorem disjoint_filter_filter_neg (s t : Finset α) (p : α → Prop)
2671+
[DecidablePred p] [∀ x, Decidable (¬p x)] :
26712672
Disjoint (s.filter p) (t.filter fun a => ¬p a) := by
26722673
simp_rw [decide_not, Bool.decide_coe, Bool.not_eq_true']
26732674
exact disjoint_filter_filter' s t disjoint_compl_right
@@ -2839,16 +2840,12 @@ theorem filter_inter_filter_neg_eq (s t : Finset α) :
28392840

28402841
theorem filter_union_filter_of_codisjoint (s : Finset α) (h : Codisjoint p q) :
28412842
s.filter p ∪ s.filter q = s :=
2842-
(filter_or _ _ _).symm.trans <| filter_true_of_mem fun x _ => by
2843-
simpa [Bool.le_iff_imp] using h.top_le x
2843+
(filter_or _ _ _).symm.trans <| filter_true_of_mem fun x _ => h.top_le x trivial
28442844
#align finset.filter_union_filter_of_codisjoint Finset.filter_union_filter_of_codisjoint
28452845

2846-
theorem filter_union_filter_neg_eq (s : Finset α) :
2846+
theorem filter_union_filter_neg_eq [∀ x, Decidable (¬p x)] (s : Finset α) :
28472847
(s.filter p ∪ s.filter fun a => ¬p a) = s :=
2848-
filter_union_filter_of_codisjoint _ _ _ <| by
2849-
convert @codisjoint_hnot_right _ _ p
2850-
ext a
2851-
simp only [decide_not, hnot_eq_compl, Bool.decide_coe, Pi.compl_apply, Bool.compl_eq_bnot]
2848+
filter_union_filter_of_codisjoint _ _ _ <| @codisjoint_hnot_right _ _ p
28522849
#align finset.filter_union_filter_neg_eq Finset.filter_union_filter_neg_eq
28532850

28542851
end Filter

Mathlib/Data/Finset/Card.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ theorem map_eq_of_subset {f : α ↪ α} (hs : s.map f ⊆ s) : s.map f = s :=
282282

283283
theorem filter_card_eq {p : α → Prop} [DecidablePred p] (h : (s.filter p).card = s.card) (x : α)
284284
(hx : x ∈ s) : p x := by
285-
rw [← eq_of_subset_of_card_le (s.filter_subset p) h.ge, mem_filter, decide_eq_true_eq] at hx
285+
rw [← eq_of_subset_of_card_le (s.filter_subset p) h.ge, mem_filter] at hx
286286
exact hx.2
287287
#align finset.filter_card_eq Finset.filter_card_eq
288288

@@ -459,7 +459,8 @@ theorem card_sdiff_add_card : (s \ t).card + t.card = (s ∪ t).card := by
459459

460460
end Lattice
461461

462-
theorem filter_card_add_filter_neg_card_eq_card (p : α → Bool) :
462+
theorem filter_card_add_filter_neg_card_eq_card
463+
(p : α → Prop) [DecidablePred p] [∀ x, Decidable (¬p x)] :
463464
(s.filter p).card + (s.filter (fun a => ¬ p a)).card = s.card := by
464465
classical rw [← card_union_eq (disjoint_filter_filter_neg _ _ _), filter_union_filter_neg_eq]
465466
#align finset.filter_card_add_filter_neg_card_eq_card

Mathlib/Data/Finset/Fold.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [Decidable
150150
split_ifs with h
151151
· have : x ∉ Finset.filter p s := by simp [hx]
152152
simp [Finset.filter_insert, h, Finset.fold_insert this, ha.assoc, IH]
153-
· have : x ∉ Finset.filter (fun i => !p i) s := by simp [hx]
153+
· have : x ∉ Finset.filter (fun i => ¬ p i) s := by simp [hx]
154154
simp [Finset.filter_insert, h, Finset.fold_insert this, IH, ← ha.assoc, hc.comm]
155155
#align finset.fold_ite' Finset.fold_ite'
156156

Mathlib/Data/Finset/NatAntidiagonal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ theorem filter_fst_eq_antidiagonal (n m : ℕ) :
123123

124124
theorem filter_snd_eq_antidiagonal (n m : ℕ) :
125125
filter (fun x : ℕ × ℕ ↦ x.snd = m) (antidiagonal n) = if m ≤ n then {(n - m, m)} else ∅ := by
126-
have : (fun x : ℕ × ℕ ↦ (x.snd = m : Bool)) ∘ Prod.swap = fun x : ℕ × ℕ ↦ x.fst = m := by
126+
have : (fun x : ℕ × ℕ ↦ (x.snd = m)) ∘ Prod.swap = fun x : ℕ × ℕ ↦ x.fst = m := by
127127
ext ; simp
128128
rw [← map_swap_antidiagonal]
129129
simp [filter_map, this, filter_fst_eq_antidiagonal, apply_ite (Finset.map _)]

0 commit comments

Comments
 (0)