data.finset.sliceMathlib.Data.Finset.Slice

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -113,10 +113,10 @@ theorem Sized.univ_mem_iff [Fintype α] (hA : A.Sized r) : Finset.univ ∈ A ↔
 #align set.sized.univ_mem_iff Set.Sized.univ_mem_iff
 -/
 
-#print Set.sized_powersetLen /-
-theorem sized_powersetLen (s : Finset α) (r : ℕ) : (powersetLen r s : Set (Finset α)).Sized r :=
-  fun t ht => (mem_powersetLen.1 ht).2
-#align set.sized_powerset_len Set.sized_powersetLen
+#print Set.sized_powersetCard /-
+theorem sized_powersetCard (s : Finset α) (r : ℕ) : (powersetCard r s : Set (Finset α)).Sized r :=
+  fun t ht => (mem_powersetCard.1 ht).2
+#align set.sized_powerset_len Set.sized_powersetCard
 -/
 
 end Set
@@ -127,14 +127,14 @@ section Sized
 
 variable [Fintype α] {𝒜 : Finset (Finset α)} {s : Finset α} {r : ℕ}
 
-#print Finset.subset_powersetLen_univ_iff /-
-theorem subset_powersetLen_univ_iff : 𝒜 ⊆ powersetLen r univ ↔ (𝒜 : Set (Finset α)).Sized r :=
+#print Finset.subset_powersetCard_univ_iff /-
+theorem subset_powersetCard_univ_iff : 𝒜 ⊆ powersetCard r univ ↔ (𝒜 : Set (Finset α)).Sized r :=
   forall_congr' fun A => by rw [mem_powerset_len_univ_iff, mem_coe]
-#align finset.subset_powerset_len_univ_iff Finset.subset_powersetLen_univ_iff
+#align finset.subset_powerset_len_univ_iff Finset.subset_powersetCard_univ_iff
 -/
 
 alias ⟨_, _root_.set.sized.subset_powerset_len_univ⟩ := subset_powerset_len_univ_iff
-#align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetLen_univ
+#align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetCard_univ
 
 #print Set.Sized.card_le /-
 theorem Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
Diff
@@ -136,13 +136,13 @@ theorem subset_powersetLen_univ_iff : 𝒜 ⊆ powersetLen r univ ↔ (𝒜 : Se
 alias ⟨_, _root_.set.sized.subset_powerset_len_univ⟩ := subset_powerset_len_univ_iff
 #align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetLen_univ
 
-#print Finset.Set.Sized.card_le /-
-theorem Finset.Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
+#print Set.Sized.card_le /-
+theorem Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
     card 𝒜 ≤ (Fintype.card α).choose r :=
   by
   rw [Fintype.card, ← card_powerset_len]
   exact card_le_of_subset h𝒜.subset_powerset_len_univ
-#align set.sized.card_le Finset.Set.Sized.card_le
+#align set.sized.card_le Set.Sized.card_le
 -/
 
 end Sized
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2021 Bhavik Mehta, Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies
 -/
-import Mathbin.Algebra.BigOperators.Basic
-import Mathbin.Data.Nat.Interval
-import Mathbin.Order.Antichain
+import Algebra.BigOperators.Basic
+import Data.Nat.Interval
+import Order.Antichain
 
 #align_import data.finset.slice from "leanprover-community/mathlib"@"68d1483e8a718ec63219f0e227ca3f0140361086"
 
Diff
@@ -64,7 +64,7 @@ theorem sized_union : (A ∪ B).Sized r ↔ A.Sized r ∧ B.Sized r :=
 #align set.sized_union Set.sized_union
 -/
 
-alias sized_union ↔ _ sized.union
+alias ⟨_, sized.union⟩ := sized_union
 #align set.sized.union Set.sized.union
 
 #print Set.sized_iUnion /-
@@ -133,7 +133,7 @@ theorem subset_powersetLen_univ_iff : 𝒜 ⊆ powersetLen r univ ↔ (𝒜 : Se
 #align finset.subset_powerset_len_univ_iff Finset.subset_powersetLen_univ_iff
 -/
 
-alias subset_powerset_len_univ_iff ↔ _ _root_.set.sized.subset_powerset_len_univ
+alias ⟨_, _root_.set.sized.subset_powerset_len_univ⟩ := subset_powerset_len_univ_iff
 #align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetLen_univ
 
 #print Finset.Set.Sized.card_le /-
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Bhavik Mehta, Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finset.slice
-! leanprover-community/mathlib commit 68d1483e8a718ec63219f0e227ca3f0140361086
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.BigOperators.Basic
 import Mathbin.Data.Nat.Interval
 import Mathbin.Order.Antichain
 
+#align_import data.finset.slice from "leanprover-community/mathlib"@"68d1483e8a718ec63219f0e227ca3f0140361086"
+
 /-!
 # `r`-sets and slice
 
Diff
@@ -60,25 +60,31 @@ theorem Sized.mono (h : A ⊆ B) (hB : B.Sized r) : A.Sized r := fun x hx => hB
 #align set.sized.mono Set.Sized.mono
 -/
 
+#print Set.sized_union /-
 theorem sized_union : (A ∪ B).Sized r ↔ A.Sized r ∧ B.Sized r :=
   ⟨fun hA => ⟨hA.mono <| subset_union_left _ _, hA.mono <| subset_union_right _ _⟩, fun hA x hx =>
     hx.elim (fun h => hA.1 h) fun h => hA.2 h⟩
 #align set.sized_union Set.sized_union
+-/
 
 alias sized_union ↔ _ sized.union
 #align set.sized.union Set.sized.union
 
+#print Set.sized_iUnion /-
 --TODO: A `forall_Union` lemma would be handy here.
 @[simp]
 theorem sized_iUnion {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r := by
   simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]; exact forall_swap
 #align set.sized_Union Set.sized_iUnion
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i j) -/
+#print Set.sized_iUnion₂ /-
 @[simp]
 theorem sized_iUnion₂ {f : ∀ i, κ i → Set (Finset α)} :
     (⋃ (i) (j), f i j).Sized r ↔ ∀ i j, (f i j).Sized r := by simp_rw [sized_Union]
 #align set.sized_Union₂ Set.sized_iUnion₂
+-/
 
 #print Set.Sized.isAntichain /-
 protected theorem Sized.isAntichain (hA : A.Sized r) : IsAntichain (· ⊆ ·) A :=
@@ -158,7 +164,6 @@ def slice (𝒜 : Finset (Finset α)) (r : ℕ) : Finset (Finset α) :=
 #align finset.slice Finset.slice
 -/
 
--- mathport name: finset.slice
 scoped[FinsetFamily] infixl:90 " # " => Finset.slice
 
 #print Finset.mem_slice /-
@@ -194,18 +199,23 @@ theorem ne_of_mem_slice (h₁ : A₁ ∈ 𝒜 # r₁) (h₂ : A₂ ∈ 𝒜 # r
 #align finset.ne_of_mem_slice Finset.ne_of_mem_slice
 -/
 
+#print Finset.pairwiseDisjoint_slice /-
 theorem pairwiseDisjoint_slice : (Set.univ : Set ℕ).PairwiseDisjoint (slice 𝒜) := fun m _ n _ hmn =>
   disjoint_filter.2 fun s hs hm hn => hmn <| hm.symm.trans hn
 #align finset.pairwise_disjoint_slice Finset.pairwiseDisjoint_slice
+-/
 
 variable [Fintype α] (𝒜)
 
+#print Finset.biUnion_slice /-
 @[simp]
 theorem biUnion_slice [DecidableEq α] : (Iic <| Fintype.card α).biUnion 𝒜.slice = 𝒜 :=
   Subset.antisymm (biUnion_subset.2 fun r _ => slice_subset) fun s hs =>
     mem_biUnion.2 ⟨s.card, mem_Iic.2 <| s.card_le_univ, mem_slice.2 <| ⟨hs, rfl⟩⟩
 #align finset.bUnion_slice Finset.biUnion_slice
+-/
 
+#print Finset.sum_card_slice /-
 @[simp]
 theorem sum_card_slice : ∑ r in Iic (Fintype.card α), (𝒜 # r).card = 𝒜.card :=
   by
@@ -213,6 +223,7 @@ theorem sum_card_slice : ∑ r in Iic (Fintype.card α), (𝒜 # r).card = 𝒜.
   rw [← card_bUnion, bUnion_slice]
   exact finset.pairwise_disjoint_slice.subset (Set.subset_univ _)
 #align finset.sum_card_slice Finset.sum_card_slice
+-/
 
 end Slice
 
Diff
@@ -207,7 +207,7 @@ theorem biUnion_slice [DecidableEq α] : (Iic <| Fintype.card α).biUnion 𝒜.s
 #align finset.bUnion_slice Finset.biUnion_slice
 
 @[simp]
-theorem sum_card_slice : (∑ r in Iic (Fintype.card α), (𝒜 # r).card) = 𝒜.card :=
+theorem sum_card_slice : ∑ r in Iic (Fintype.card α), (𝒜 # r).card = 𝒜.card :=
   by
   letI := Classical.decEq α
   rw [← card_bUnion, bUnion_slice]
Diff
@@ -37,7 +37,7 @@ the set family made of its `r`-sets.
 
 open Finset Nat
 
-open BigOperators
+open scoped BigOperators
 
 variable {α : Type _} {ι : Sort _} {κ : ι → Sort _}
 
Diff
@@ -60,44 +60,20 @@ theorem Sized.mono (h : A ⊆ B) (hB : B.Sized r) : A.Sized r := fun x hx => hB
 #align set.sized.mono Set.Sized.mono
 -/
 
-/- warning: set.sized_union -> Set.sized_union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {A : Set.{u1} (Finset.{u1} α)} {B : Set.{u1} (Finset.{u1} α)} {r : Nat}, Iff (Set.Sized.{u1} α r (Union.union.{u1} (Set.{u1} (Finset.{u1} α)) (Set.hasUnion.{u1} (Finset.{u1} α)) A B)) (And (Set.Sized.{u1} α r A) (Set.Sized.{u1} α r B))
-but is expected to have type
-  forall {α : Type.{u1}} {A : Set.{u1} (Finset.{u1} α)} {B : Set.{u1} (Finset.{u1} α)} {r : Nat}, Iff (Set.Sized.{u1} α r (Union.union.{u1} (Set.{u1} (Finset.{u1} α)) (Set.instUnionSet.{u1} (Finset.{u1} α)) A B)) (And (Set.Sized.{u1} α r A) (Set.Sized.{u1} α r B))
-Case conversion may be inaccurate. Consider using '#align set.sized_union Set.sized_unionₓ'. -/
 theorem sized_union : (A ∪ B).Sized r ↔ A.Sized r ∧ B.Sized r :=
   ⟨fun hA => ⟨hA.mono <| subset_union_left _ _, hA.mono <| subset_union_right _ _⟩, fun hA x hx =>
     hx.elim (fun h => hA.1 h) fun h => hA.2 h⟩
 #align set.sized_union Set.sized_union
 
-/- warning: set.sized.union -> Set.sized.union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {A : Set.{u1} (Finset.{u1} α)} {B : Set.{u1} (Finset.{u1} α)} {r : Nat}, (And (Set.Sized.{u1} α r A) (Set.Sized.{u1} α r B)) -> (Set.Sized.{u1} α r (Union.union.{u1} (Set.{u1} (Finset.{u1} α)) (Set.hasUnion.{u1} (Finset.{u1} α)) A B))
-but is expected to have type
-  forall {α : Type.{u1}} {A : Set.{u1} (Finset.{u1} α)} {B : Set.{u1} (Finset.{u1} α)} {r : Nat}, (And (Set.Sized.{u1} α r A) (Set.Sized.{u1} α r B)) -> (Set.Sized.{u1} α r (Union.union.{u1} (Set.{u1} (Finset.{u1} α)) (Set.instUnionSet.{u1} (Finset.{u1} α)) A B))
-Case conversion may be inaccurate. Consider using '#align set.sized.union Set.sized.unionₓ'. -/
 alias sized_union ↔ _ sized.union
 #align set.sized.union Set.sized.union
 
-/- warning: set.sized_Union -> Set.sized_iUnion is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {r : Nat} {f : ι -> (Set.{u1} (Finset.{u1} α))}, Iff (Set.Sized.{u1} α r (Set.iUnion.{u1, u2} (Finset.{u1} α) ι (fun (i : ι) => f i))) (forall (i : ι), Set.Sized.{u1} α r (f i))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {r : Nat} {f : ι -> (Set.{u2} (Finset.{u2} α))}, Iff (Set.Sized.{u2} α r (Set.iUnion.{u2, u1} (Finset.{u2} α) ι (fun (i : ι) => f i))) (forall (i : ι), Set.Sized.{u2} α r (f i))
-Case conversion may be inaccurate. Consider using '#align set.sized_Union Set.sized_iUnionₓ'. -/
 --TODO: A `forall_Union` lemma would be handy here.
 @[simp]
 theorem sized_iUnion {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r := by
   simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]; exact forall_swap
 #align set.sized_Union Set.sized_iUnion
 
-/- warning: set.sized_Union₂ -> Set.sized_iUnion₂ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {κ : ι -> Sort.{u3}} {r : Nat} {f : forall (i : ι), (κ i) -> (Set.{u1} (Finset.{u1} α))}, Iff (Set.Sized.{u1} α r (Set.iUnion.{u1, u2} (Finset.{u1} α) ι (fun (i : ι) => Set.iUnion.{u1, u3} (Finset.{u1} α) (κ i) (fun (j : κ i) => f i j)))) (forall (i : ι) (j : κ i), Set.Sized.{u1} α r (f i j))
-but is expected to have type
-  forall {α : Type.{u3}} {ι : Sort.{u2}} {κ : ι -> Sort.{u1}} {r : Nat} {f : forall (i : ι), (κ i) -> (Set.{u3} (Finset.{u3} α))}, Iff (Set.Sized.{u3} α r (Set.iUnion.{u3, u2} (Finset.{u3} α) ι (fun (i : ι) => Set.iUnion.{u3, u1} (Finset.{u3} α) (κ i) (fun (j : κ i) => f i j)))) (forall (i : ι) (j : κ i), Set.Sized.{u3} α r (f i j))
-Case conversion may be inaccurate. Consider using '#align set.sized_Union₂ Set.sized_iUnion₂ₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i j) -/
 @[simp]
 theorem sized_iUnion₂ {f : ∀ i, κ i → Set (Finset α)} :
@@ -218,36 +194,18 @@ theorem ne_of_mem_slice (h₁ : A₁ ∈ 𝒜 # r₁) (h₂ : A₂ ∈ 𝒜 # r
 #align finset.ne_of_mem_slice Finset.ne_of_mem_slice
 -/
 
-/- warning: finset.pairwise_disjoint_slice -> Finset.pairwiseDisjoint_slice is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {𝒜 : Finset.{u1} (Finset.{u1} α)}, Set.PairwiseDisjoint.{u1, 0} (Finset.{u1} (Finset.{u1} α)) Nat (Finset.partialOrder.{u1} (Finset.{u1} α)) (Finset.orderBot.{u1} (Finset.{u1} α)) (Set.univ.{0} Nat) (Finset.slice.{u1} α 𝒜)
-but is expected to have type
-  forall {α : Type.{u1}} {𝒜 : Finset.{u1} (Finset.{u1} α)}, Set.PairwiseDisjoint.{u1, 0} (Finset.{u1} (Finset.{u1} α)) Nat (Finset.partialOrder.{u1} (Finset.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} (Finset.{u1} α)) (Set.univ.{0} Nat) (Finset.slice.{u1} α 𝒜)
-Case conversion may be inaccurate. Consider using '#align finset.pairwise_disjoint_slice Finset.pairwiseDisjoint_sliceₓ'. -/
 theorem pairwiseDisjoint_slice : (Set.univ : Set ℕ).PairwiseDisjoint (slice 𝒜) := fun m _ n _ hmn =>
   disjoint_filter.2 fun s hs hm hn => hmn <| hm.symm.trans hn
 #align finset.pairwise_disjoint_slice Finset.pairwiseDisjoint_slice
 
 variable [Fintype α] (𝒜)
 
-/- warning: finset.bUnion_slice -> Finset.biUnion_slice is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α] [_inst_2 : DecidableEq.{succ u1} α], Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.biUnion.{0, u1} Nat (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_2 a b) a b) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) (Fintype.card.{u1} α _inst_1)) (Finset.slice.{u1} α 𝒜)) 𝒜
-but is expected to have type
-  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α] [_inst_2 : DecidableEq.{succ u1} α], Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.biUnion.{0, u1} Nat (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_2 a b) a b) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fintype.card.{u1} α _inst_1)) (Finset.slice.{u1} α 𝒜)) 𝒜
-Case conversion may be inaccurate. Consider using '#align finset.bUnion_slice Finset.biUnion_sliceₓ'. -/
 @[simp]
 theorem biUnion_slice [DecidableEq α] : (Iic <| Fintype.card α).biUnion 𝒜.slice = 𝒜 :=
   Subset.antisymm (biUnion_subset.2 fun r _ => slice_subset) fun s hs =>
     mem_biUnion.2 ⟨s.card, mem_Iic.2 <| s.card_le_univ, mem_slice.2 <| ⟨hs, rfl⟩⟩
 #align finset.bUnion_slice Finset.biUnion_slice
 
-/- warning: finset.sum_card_slice -> Finset.sum_card_slice is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α], Eq.{1} Nat (Finset.sum.{0, 0} Nat Nat Nat.addCommMonoid (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) (Fintype.card.{u1} α _inst_1)) (fun (r : Nat) => Finset.card.{u1} (Finset.{u1} α) (Finset.slice.{u1} α 𝒜 r))) (Finset.card.{u1} (Finset.{u1} α) 𝒜)
-but is expected to have type
-  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α], Eq.{1} Nat (Finset.sum.{0, 0} Nat Nat Nat.addCommMonoid (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fintype.card.{u1} α _inst_1)) (fun (r : Nat) => Finset.card.{u1} (Finset.{u1} α) (Finset.slice.{u1} α 𝒜 r))) (Finset.card.{u1} (Finset.{u1} α) 𝒜)
-Case conversion may be inaccurate. Consider using '#align finset.sum_card_slice Finset.sum_card_sliceₓ'. -/
 @[simp]
 theorem sum_card_slice : (∑ r in Iic (Fintype.card α), (𝒜 # r).card) = 𝒜.card :=
   by
Diff
@@ -88,10 +88,8 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align set.sized_Union Set.sized_iUnionₓ'. -/
 --TODO: A `forall_Union` lemma would be handy here.
 @[simp]
-theorem sized_iUnion {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r :=
-  by
-  simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]
-  exact forall_swap
+theorem sized_iUnion {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r := by
+  simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]; exact forall_swap
 #align set.sized_Union Set.sized_iUnion
 
 /- warning: set.sized_Union₂ -> Set.sized_iUnion₂ is a dubious translation:
Diff
@@ -232,15 +232,24 @@ theorem pairwiseDisjoint_slice : (Set.univ : Set ℕ).PairwiseDisjoint (slice 
 
 variable [Fintype α] (𝒜)
 
-#print Finset.biUnion_slice /-
+/- warning: finset.bUnion_slice -> Finset.biUnion_slice is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α] [_inst_2 : DecidableEq.{succ u1} α], Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.biUnion.{0, u1} Nat (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_2 a b) a b) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) (Fintype.card.{u1} α _inst_1)) (Finset.slice.{u1} α 𝒜)) 𝒜
+but is expected to have type
+  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α] [_inst_2 : DecidableEq.{succ u1} α], Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.biUnion.{0, u1} Nat (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_2 a b) a b) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fintype.card.{u1} α _inst_1)) (Finset.slice.{u1} α 𝒜)) 𝒜
+Case conversion may be inaccurate. Consider using '#align finset.bUnion_slice Finset.biUnion_sliceₓ'. -/
 @[simp]
 theorem biUnion_slice [DecidableEq α] : (Iic <| Fintype.card α).biUnion 𝒜.slice = 𝒜 :=
   Subset.antisymm (biUnion_subset.2 fun r _ => slice_subset) fun s hs =>
     mem_biUnion.2 ⟨s.card, mem_Iic.2 <| s.card_le_univ, mem_slice.2 <| ⟨hs, rfl⟩⟩
 #align finset.bUnion_slice Finset.biUnion_slice
--/
 
-#print Finset.sum_card_slice /-
+/- warning: finset.sum_card_slice -> Finset.sum_card_slice is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α], Eq.{1} Nat (Finset.sum.{0, 0} Nat Nat Nat.addCommMonoid (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) (Fintype.card.{u1} α _inst_1)) (fun (r : Nat) => Finset.card.{u1} (Finset.{u1} α) (Finset.slice.{u1} α 𝒜 r))) (Finset.card.{u1} (Finset.{u1} α) 𝒜)
+but is expected to have type
+  forall {α : Type.{u1}} (𝒜 : Finset.{u1} (Finset.{u1} α)) [_inst_1 : Fintype.{u1} α], Eq.{1} Nat (Finset.sum.{0, 0} Nat Nat Nat.addCommMonoid (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fintype.card.{u1} α _inst_1)) (fun (r : Nat) => Finset.card.{u1} (Finset.{u1} α) (Finset.slice.{u1} α 𝒜 r))) (Finset.card.{u1} (Finset.{u1} α) 𝒜)
+Case conversion may be inaccurate. Consider using '#align finset.sum_card_slice Finset.sum_card_sliceₓ'. -/
 @[simp]
 theorem sum_card_slice : (∑ r in Iic (Fintype.card α), (𝒜 # r).card) = 𝒜.card :=
   by
@@ -248,7 +257,6 @@ theorem sum_card_slice : (∑ r in Iic (Fintype.card α), (𝒜 # r).card) = 
   rw [← card_bUnion, bUnion_slice]
   exact finset.pairwise_disjoint_slice.subset (Set.subset_univ _)
 #align finset.sum_card_slice Finset.sum_card_slice
--/
 
 end Slice
 
Diff
@@ -80,31 +80,31 @@ Case conversion may be inaccurate. Consider using '#align set.sized.union Set.si
 alias sized_union ↔ _ sized.union
 #align set.sized.union Set.sized.union
 
-/- warning: set.sized_Union -> Set.sized_unionᵢ is a dubious translation:
+/- warning: set.sized_Union -> Set.sized_iUnion is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {r : Nat} {f : ι -> (Set.{u1} (Finset.{u1} α))}, Iff (Set.Sized.{u1} α r (Set.unionᵢ.{u1, u2} (Finset.{u1} α) ι (fun (i : ι) => f i))) (forall (i : ι), Set.Sized.{u1} α r (f i))
+  forall {α : Type.{u1}} {ι : Sort.{u2}} {r : Nat} {f : ι -> (Set.{u1} (Finset.{u1} α))}, Iff (Set.Sized.{u1} α r (Set.iUnion.{u1, u2} (Finset.{u1} α) ι (fun (i : ι) => f i))) (forall (i : ι), Set.Sized.{u1} α r (f i))
 but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {r : Nat} {f : ι -> (Set.{u2} (Finset.{u2} α))}, Iff (Set.Sized.{u2} α r (Set.unionᵢ.{u2, u1} (Finset.{u2} α) ι (fun (i : ι) => f i))) (forall (i : ι), Set.Sized.{u2} α r (f i))
-Case conversion may be inaccurate. Consider using '#align set.sized_Union Set.sized_unionᵢₓ'. -/
+  forall {α : Type.{u2}} {ι : Sort.{u1}} {r : Nat} {f : ι -> (Set.{u2} (Finset.{u2} α))}, Iff (Set.Sized.{u2} α r (Set.iUnion.{u2, u1} (Finset.{u2} α) ι (fun (i : ι) => f i))) (forall (i : ι), Set.Sized.{u2} α r (f i))
+Case conversion may be inaccurate. Consider using '#align set.sized_Union Set.sized_iUnionₓ'. -/
 --TODO: A `forall_Union` lemma would be handy here.
 @[simp]
-theorem sized_unionᵢ {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r :=
+theorem sized_iUnion {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r :=
   by
-  simp_rw [Set.Sized, Set.mem_unionᵢ, forall_exists_index]
+  simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]
   exact forall_swap
-#align set.sized_Union Set.sized_unionᵢ
+#align set.sized_Union Set.sized_iUnion
 
-/- warning: set.sized_Union₂ -> Set.sized_unionᵢ₂ is a dubious translation:
+/- warning: set.sized_Union₂ -> Set.sized_iUnion₂ is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {κ : ι -> Sort.{u3}} {r : Nat} {f : forall (i : ι), (κ i) -> (Set.{u1} (Finset.{u1} α))}, Iff (Set.Sized.{u1} α r (Set.unionᵢ.{u1, u2} (Finset.{u1} α) ι (fun (i : ι) => Set.unionᵢ.{u1, u3} (Finset.{u1} α) (κ i) (fun (j : κ i) => f i j)))) (forall (i : ι) (j : κ i), Set.Sized.{u1} α r (f i j))
+  forall {α : Type.{u1}} {ι : Sort.{u2}} {κ : ι -> Sort.{u3}} {r : Nat} {f : forall (i : ι), (κ i) -> (Set.{u1} (Finset.{u1} α))}, Iff (Set.Sized.{u1} α r (Set.iUnion.{u1, u2} (Finset.{u1} α) ι (fun (i : ι) => Set.iUnion.{u1, u3} (Finset.{u1} α) (κ i) (fun (j : κ i) => f i j)))) (forall (i : ι) (j : κ i), Set.Sized.{u1} α r (f i j))
 but is expected to have type
-  forall {α : Type.{u3}} {ι : Sort.{u2}} {κ : ι -> Sort.{u1}} {r : Nat} {f : forall (i : ι), (κ i) -> (Set.{u3} (Finset.{u3} α))}, Iff (Set.Sized.{u3} α r (Set.unionᵢ.{u3, u2} (Finset.{u3} α) ι (fun (i : ι) => Set.unionᵢ.{u3, u1} (Finset.{u3} α) (κ i) (fun (j : κ i) => f i j)))) (forall (i : ι) (j : κ i), Set.Sized.{u3} α r (f i j))
-Case conversion may be inaccurate. Consider using '#align set.sized_Union₂ Set.sized_unionᵢ₂ₓ'. -/
+  forall {α : Type.{u3}} {ι : Sort.{u2}} {κ : ι -> Sort.{u1}} {r : Nat} {f : forall (i : ι), (κ i) -> (Set.{u3} (Finset.{u3} α))}, Iff (Set.Sized.{u3} α r (Set.iUnion.{u3, u2} (Finset.{u3} α) ι (fun (i : ι) => Set.iUnion.{u3, u1} (Finset.{u3} α) (κ i) (fun (j : κ i) => f i j)))) (forall (i : ι) (j : κ i), Set.Sized.{u3} α r (f i j))
+Case conversion may be inaccurate. Consider using '#align set.sized_Union₂ Set.sized_iUnion₂ₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:107:6: warning: expanding binder group (i j) -/
 @[simp]
-theorem sized_unionᵢ₂ {f : ∀ i, κ i → Set (Finset α)} :
+theorem sized_iUnion₂ {f : ∀ i, κ i → Set (Finset α)} :
     (⋃ (i) (j), f i j).Sized r ↔ ∀ i j, (f i j).Sized r := by simp_rw [sized_Union]
-#align set.sized_Union₂ Set.sized_unionᵢ₂
+#align set.sized_Union₂ Set.sized_iUnion₂
 
 #print Set.Sized.isAntichain /-
 protected theorem Sized.isAntichain (hA : A.Sized r) : IsAntichain (· ⊆ ·) A :=
@@ -232,12 +232,12 @@ theorem pairwiseDisjoint_slice : (Set.univ : Set ℕ).PairwiseDisjoint (slice 
 
 variable [Fintype α] (𝒜)
 
-#print Finset.bunionᵢ_slice /-
+#print Finset.biUnion_slice /-
 @[simp]
-theorem bunionᵢ_slice [DecidableEq α] : (Iic <| Fintype.card α).bunionᵢ 𝒜.slice = 𝒜 :=
-  Subset.antisymm (bunionᵢ_subset.2 fun r _ => slice_subset) fun s hs =>
-    mem_bunionᵢ.2 ⟨s.card, mem_Iic.2 <| s.card_le_univ, mem_slice.2 <| ⟨hs, rfl⟩⟩
-#align finset.bUnion_slice Finset.bunionᵢ_slice
+theorem biUnion_slice [DecidableEq α] : (Iic <| Fintype.card α).biUnion 𝒜.slice = 𝒜 :=
+  Subset.antisymm (biUnion_subset.2 fun r _ => slice_subset) fun s hs =>
+    mem_biUnion.2 ⟨s.card, mem_Iic.2 <| s.card_le_univ, mem_slice.2 <| ⟨hs, rfl⟩⟩
+#align finset.bUnion_slice Finset.biUnion_slice
 -/
 
 #print Finset.sum_card_slice /-

Changes in mathlib4

mathlib3
mathlib4
chore: remove mathport name: <expression> lines (#11928)

Quoting [@digama0](https://github.com/digama0):

These were actually never meant to go in the file, they are basically debugging information and only useful on significantly broken mathport files. You can safely remove all of them.

Diff
@@ -133,7 +133,6 @@ def slice (𝒜 : Finset (Finset α)) (r : ℕ) : Finset (Finset α) :=
   𝒜.filter fun i => i.card = r
 #align finset.slice Finset.slice
 
--- mathport name: finset.slice
 -- Porting note: old code: scoped[FinsetFamily]
 @[inherit_doc]
 scoped[Finset] infixl:90 " # " => Finset.slice
chore: Improve Finset lemma names (#8894)

Change a few lemma names that have historically bothered me.

  • Finset.card_le_of_subsetFinset.card_le_card
  • Multiset.card_le_of_leMultiset.card_le_card
  • Multiset.card_lt_of_ltMultiset.card_lt_card
  • Set.ncard_le_of_subsetSet.ncard_le_ncard
  • Finset.image_filterFinset.filter_image
  • CompleteLattice.finset_sup_compact_of_compactCompleteLattice.isCompactElement_finset_sup
Diff
@@ -116,7 +116,7 @@ alias ⟨_, _root_.Set.Sized.subset_powersetCard_univ⟩ := subset_powersetCard_
 theorem _root_.Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
     card 𝒜 ≤ (Fintype.card α).choose r := by
   rw [Fintype.card, ← card_powersetCard]
-  exact card_le_of_subset (subset_powersetCard_univ_iff.mpr h𝒜)
+  exact card_le_card (subset_powersetCard_univ_iff.mpr h𝒜)
 #align set.sized.card_le Set.Sized.card_le
 
 end Sized
chore: rename Finset.powersetLen to powersetCard (#7667)

I don't understand why this was ever named powersetLen, there isn't even the notion of the length of a Finset/Multiset.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -94,9 +94,9 @@ theorem Sized.univ_mem_iff [Fintype α] (hA : A.Sized r) : Finset.univ ∈ A ↔
   hA.isAntichain.top_mem_iff
 #align set.sized.univ_mem_iff Set.Sized.univ_mem_iff
 
-theorem sized_powersetLen (s : Finset α) (r : ℕ) : (powersetLen r s : Set (Finset α)).Sized r :=
-  fun _t ht => (mem_powersetLen.1 ht).2
-#align set.sized_powerset_len Set.sized_powersetLen
+theorem sized_powersetCard (s : Finset α) (r : ℕ) : (powersetCard r s : Set (Finset α)).Sized r :=
+  fun _t ht => (mem_powersetCard.1 ht).2
+#align set.sized_powerset_len Set.sized_powersetCard
 
 end Set
 
@@ -106,17 +106,17 @@ section Sized
 
 variable [Fintype α] {𝒜 : Finset (Finset α)} {s : Finset α} {r : ℕ}
 
-theorem subset_powersetLen_univ_iff : 𝒜 ⊆ powersetLen r univ ↔ (𝒜 : Set (Finset α)).Sized r :=
-  forall_congr' fun A => by rw [mem_powersetLen_univ, mem_coe]
-#align finset.subset_powerset_len_univ_iff Finset.subset_powersetLen_univ_iff
+theorem subset_powersetCard_univ_iff : 𝒜 ⊆ powersetCard r univ ↔ (𝒜 : Set (Finset α)).Sized r :=
+  forall_congr' fun A => by rw [mem_powersetCard_univ, mem_coe]
+#align finset.subset_powerset_len_univ_iff Finset.subset_powersetCard_univ_iff
 
-alias ⟨_, _root_.Set.Sized.subset_powersetLen_univ⟩ := subset_powersetLen_univ_iff
-#align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetLen_univ
+alias ⟨_, _root_.Set.Sized.subset_powersetCard_univ⟩ := subset_powersetCard_univ_iff
+#align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetCard_univ
 
 theorem _root_.Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
     card 𝒜 ≤ (Fintype.card α).choose r := by
-  rw [Fintype.card, ← card_powersetLen]
-  exact card_le_of_subset (subset_powersetLen_univ_iff.mpr h𝒜)
+  rw [Fintype.card, ← card_powersetCard]
+  exact card_le_of_subset (subset_powersetCard_univ_iff.mpr h𝒜)
 #align set.sized.card_le Set.Sized.card_le
 
 end Sized
feat: Order isomorphism between Finset α and Set α (#7375)

over a fintype.

Also fix the name of Finset.mem_powerset_len_univ_iff (it should be powersetLen, not powerset_len).

Diff
@@ -107,7 +107,7 @@ section Sized
 variable [Fintype α] {𝒜 : Finset (Finset α)} {s : Finset α} {r : ℕ}
 
 theorem subset_powersetLen_univ_iff : 𝒜 ⊆ powersetLen r univ ↔ (𝒜 : Set (Finset α)).Sized r :=
-  forall_congr' fun A => by rw [mem_powerset_len_univ_iff, mem_coe]
+  forall_congr' fun A => by rw [mem_powersetLen_univ, mem_coe]
 #align finset.subset_powerset_len_univ_iff Finset.subset_powersetLen_univ_iff
 
 alias ⟨_, _root_.Set.Sized.subset_powersetLen_univ⟩ := subset_powersetLen_univ_iff
feat: Miscellaneous Finset lemmas (#7379)
Diff
@@ -37,7 +37,7 @@ variable {α : Type*} {ι : Sort*} {κ : ι → Sort*}
 
 namespace Set
 
-variable {A B : Set (Finset α)} {r : ℕ}
+variable {A B : Set (Finset α)} {s : Finset α} {r : ℕ}
 
 /-! ### Families of `r`-sets -/
 
@@ -50,6 +50,9 @@ def Sized (r : ℕ) (A : Set (Finset α)) : Prop :=
 theorem Sized.mono (h : A ⊆ B) (hB : B.Sized r) : A.Sized r := fun _x hx => hB <| h hx
 #align set.sized.mono Set.Sized.mono
 
+@[simp] lemma sized_empty : (∅ : Set (Finset α)).Sized r := by simp [Sized]
+@[simp] lemma sized_singleton : ({s} : Set (Finset α)).Sized r ↔ s.card = r := by simp [Sized]
+
 theorem sized_union : (A ∪ B).Sized r ↔ A.Sized r ∧ B.Sized r :=
   ⟨fun hA => ⟨hA.mono <| subset_union_left _ _, hA.mono <| subset_union_right _ _⟩, fun hA _x hx =>
     hx.elim (fun h => hA.1 h) fun h => hA.2 h⟩
@@ -110,11 +113,11 @@ theorem subset_powersetLen_univ_iff : 𝒜 ⊆ powersetLen r univ ↔ (𝒜 : Se
 alias ⟨_, _root_.Set.Sized.subset_powersetLen_univ⟩ := subset_powersetLen_univ_iff
 #align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetLen_univ
 
-theorem Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
+theorem _root_.Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
     card 𝒜 ≤ (Fintype.card α).choose r := by
   rw [Fintype.card, ← card_powersetLen]
   exact card_le_of_subset (subset_powersetLen_univ_iff.mpr h𝒜)
-#align set.sized.card_le Finset.Set.Sized.card_le
+#align set.sized.card_le Set.Sized.card_le
 
 end Sized
 
feat: patch for new alias command (#6172)
Diff
@@ -55,7 +55,7 @@ theorem sized_union : (A ∪ B).Sized r ↔ A.Sized r ∧ B.Sized r :=
     hx.elim (fun h => hA.1 h) fun h => hA.2 h⟩
 #align set.sized_union Set.sized_union
 
-alias sized_union ↔ _ sized.union
+alias ⟨_, sized.union⟩ := sized_union
 #align set.sized.union Set.sized.union
 
 --TODO: A `forall_iUnion` lemma would be handy here.
@@ -107,7 +107,7 @@ theorem subset_powersetLen_univ_iff : 𝒜 ⊆ powersetLen r univ ↔ (𝒜 : Se
   forall_congr' fun A => by rw [mem_powerset_len_univ_iff, mem_coe]
 #align finset.subset_powerset_len_univ_iff Finset.subset_powersetLen_univ_iff
 
-alias subset_powersetLen_univ_iff ↔ _ _root_.Set.Sized.subset_powersetLen_univ
+alias ⟨_, _root_.Set.Sized.subset_powersetLen_univ⟩ := subset_powersetLen_univ_iff
 #align set.sized.subset_powerset_len_univ Set.Sized.subset_powersetLen_univ
 
 theorem Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -33,7 +33,7 @@ open Finset Nat
 
 open BigOperators
 
-variable {α : Type _} {ι : Sort _} {κ : ι → Sort _}
+variable {α : Type*} {ι : Sort*} {κ : ι → Sort*}
 
 namespace Set
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Bhavik Mehta, Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finset.slice
-! leanprover-community/mathlib commit f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.BigOperators.Basic
 import Mathlib.Data.Nat.Interval
 import Mathlib.Order.Antichain
 
+#align_import data.finset.slice from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
+
 /-!
 # `r`-sets and slice
 
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -61,18 +61,18 @@ theorem sized_union : (A ∪ B).Sized r ↔ A.Sized r ∧ B.Sized r :=
 alias sized_union ↔ _ sized.union
 #align set.sized.union Set.sized.union
 
---TODO: A `forall_unionᵢ` lemma would be handy here.
+--TODO: A `forall_iUnion` lemma would be handy here.
 @[simp]
-theorem sized_unionᵢ {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r := by
-  simp_rw [Set.Sized, Set.mem_unionᵢ, forall_exists_index]
+theorem sized_iUnion {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r := by
+  simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]
   exact forall_swap
-#align set.sized_Union Set.sized_unionᵢ
+#align set.sized_Union Set.sized_iUnion
 
 -- @[simp] -- Porting note: left hand side is not simp-normal form.
-theorem sized_unionᵢ₂ {f : ∀ i, κ i → Set (Finset α)} :
+theorem sized_iUnion₂ {f : ∀ i, κ i → Set (Finset α)} :
     (⋃ (i) (j), f i j).Sized r ↔ ∀ i j, (f i j).Sized r :=
- by simp only [Set.sized_unionᵢ]
-#align set.sized_Union₂ Set.sized_unionᵢ₂
+ by simp only [Set.sized_iUnion]
+#align set.sized_Union₂ Set.sized_iUnion₂
 
 protected theorem Sized.isAntichain (hA : A.Sized r) : IsAntichain (· ⊆ ·) A :=
   fun _s hs _t ht h hst => h <| Finset.eq_of_subset_of_card_le hst ((hA ht).trans (hA hs).symm).le
@@ -168,19 +168,18 @@ theorem pairwiseDisjoint_slice : (Set.univ : Set ℕ).PairwiseDisjoint (slice 
 variable [Fintype α] (𝒜)
 
 @[simp]
-theorem bunionᵢ_slice [DecidableEq α] : (Iic <| Fintype.card α).bunionᵢ 𝒜.slice = 𝒜 :=
-  Subset.antisymm (bunionᵢ_subset.2 fun _r _ => slice_subset) fun s hs =>
-    mem_bunionᵢ.2 ⟨s.card, mem_Iic.2 <| s.card_le_univ, mem_slice.2 <| ⟨hs, rfl⟩⟩
-#align finset.bUnion_slice Finset.bunionᵢ_slice
+theorem biUnion_slice [DecidableEq α] : (Iic <| Fintype.card α).biUnion 𝒜.slice = 𝒜 :=
+  Subset.antisymm (biUnion_subset.2 fun _r _ => slice_subset) fun s hs =>
+    mem_biUnion.2 ⟨s.card, mem_Iic.2 <| s.card_le_univ, mem_slice.2 <| ⟨hs, rfl⟩⟩
+#align finset.bUnion_slice Finset.biUnion_slice
 
 @[simp]
 theorem sum_card_slice : (∑ r in Iic (Fintype.card α), (𝒜 # r).card) = 𝒜.card := by
   letI := Classical.decEq α
-  rw [← card_bunionᵢ, bunionᵢ_slice]
+  rw [← card_biUnion, biUnion_slice]
   exact Finset.pairwiseDisjoint_slice.subset (Set.subset_univ _)
 #align finset.sum_card_slice Finset.sum_card_slice
 
 end Slice
 
 end Finset
-
chore: scoped BigOperators notation (#1952)
Diff
@@ -34,7 +34,7 @@ the set family made of its `r`-sets.
 
 open Finset Nat
 
--- open BigOperators -- Porting note: commented out locale
+open BigOperators
 
 variable {α : Type _} {ι : Sort _} {κ : ι → Sort _}
 
feat: Port Data.Finset.Slice (#1928)

Dependencies 7 + 230

231 files ported (97.1%)
101093 lines ported (97.1%)
Show graph

The unported dependencies are