data.finset.interval
⟷
Mathlib.Data.Finset.Interval
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Data.Finset.LocallyFinite.Basic
+import Order.Interval.Finset.Basic
#align_import data.finset.interval from "leanprover-community/mathlib"@"d64d67d000b974f0d86a2be7918cf800be6271c8"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -36,10 +36,10 @@ instance : LocallyFiniteOrder (Finset α)
finsetIco s t := t.ssubsets.filterₓ ((· ⊆ ·) s)
finsetIoc s t := t.powerset.filterₓ ((· ⊂ ·) s)
finsetIoo s t := t.ssubsets.filterₓ ((· ⊂ ·) s)
- finset_mem_Icc s t u := by rw [mem_filter, mem_powerset]; exact and_comm' _ _
- finset_mem_Ico s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm' _ _
- finset_mem_Ioc s t u := by rw [mem_filter, mem_powerset]; exact and_comm' _ _
- finset_mem_Ioo s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm' _ _
+ finset_mem_Icc s t u := by rw [mem_filter, mem_powerset]; exact and_comm _ _
+ finset_mem_Ico s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm _ _
+ finset_mem_Ioc s t u := by rw [mem_filter, mem_powerset]; exact and_comm _ _
+ finset_mem_Ioo s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm _ _
#print Finset.Icc_eq_filter_powerset /-
theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filterₓ ((· ⊆ ·) s) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Data.Finset.LocallyFinite
+import Data.Finset.LocallyFinite.Basic
#align_import data.finset.interval from "leanprover-community/mathlib"@"d64d67d000b974f0d86a2be7918cf800be6271c8"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -111,7 +111,7 @@ theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :
by
rw [← card_sdiff h, ← card_powerset, Icc_eq_image_powerset h, Finset.card_image_iff]
rintro u hu v hv (huv : s ⊔ u = s ⊔ v)
- rw [mem_coe, mem_powerset] at hu hv
+ rw [mem_coe, mem_powerset] at hu hv
rw [← (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, ←
(disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, huv]
#align finset.card_Icc_finset Finset.card_Icc_finset
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Mathbin.Data.Finset.LocallyFinite
+import Data.Finset.LocallyFinite
#align_import data.finset.interval from "leanprover-community/mathlib"@"d64d67d000b974f0d86a2be7918cf800be6271c8"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finset.interval
-! leanprover-community/mathlib commit d64d67d000b974f0d86a2be7918cf800be6271c8
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.LocallyFinite
+#align_import data.finset.interval from "leanprover-community/mathlib"@"d64d67d000b974f0d86a2be7918cf800be6271c8"
+
/-!
# Intervals of finsets as finsets
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -56,21 +56,29 @@ theorem Ico_eq_filter_ssubsets : Ico s t = t.ssubsets.filterₓ ((· ⊆ ·) s)
#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsets
-/
+#print Finset.Ioc_eq_filter_powerset /-
theorem Ioc_eq_filter_powerset : Ioc s t = t.powerset.filterₓ ((· ⊂ ·) s) :=
rfl
#align finset.Ioc_eq_filter_powerset Finset.Ioc_eq_filter_powerset
+-/
+#print Finset.Ioo_eq_filter_ssubsets /-
theorem Ioo_eq_filter_ssubsets : Ioo s t = t.ssubsets.filterₓ ((· ⊂ ·) s) :=
rfl
#align finset.Ioo_eq_filter_ssubsets Finset.Ioo_eq_filter_ssubsets
+-/
+#print Finset.Iic_eq_powerset /-
theorem Iic_eq_powerset : Iic s = s.powerset :=
filter_true_of_mem fun t _ => empty_subset t
#align finset.Iic_eq_powerset Finset.Iic_eq_powerset
+-/
+#print Finset.Iio_eq_ssubsets /-
theorem Iio_eq_ssubsets : Iio s = s.ssubsets :=
filter_true_of_mem fun t _ => empty_subset t
#align finset.Iio_eq_ssubsets Finset.Iio_eq_ssubsets
+-/
variable {s t}
@@ -119,24 +127,32 @@ theorem card_Ico_finset (h : s ⊆ t) : (Ico s t).card = 2 ^ (t.card - s.card) -
#align finset.card_Ico_finset Finset.card_Ico_finset
-/
+#print Finset.card_Ioc_finset /-
/-- Cardinality of an `Ioc` of finsets. -/
theorem card_Ioc_finset (h : s ⊆ t) : (Ioc s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc_finset h]
#align finset.card_Ioc_finset Finset.card_Ioc_finset
+-/
+#print Finset.card_Ioo_finset /-
/-- Cardinality of an `Ioo` of finsets. -/
theorem card_Ioo_finset (h : s ⊆ t) : (Ioo s t).card = 2 ^ (t.card - s.card) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc_finset h]
#align finset.card_Ioo_finset Finset.card_Ioo_finset
+-/
+#print Finset.card_Iic_finset /-
/-- Cardinality of an `Iic` of finsets. -/
theorem card_Iic_finset : (Iic s).card = 2 ^ s.card := by rw [Iic_eq_powerset, card_powerset]
#align finset.card_Iic_finset Finset.card_Iic_finset
+-/
+#print Finset.card_Iio_finset /-
/-- Cardinality of an `Iio` of finsets. -/
theorem card_Iio_finset : (Iio s).card = 2 ^ s.card - 1 := by
rw [Iio_eq_ssubsets, ssubsets, card_erase_of_mem (mem_powerset_self _), card_powerset]
#align finset.card_Iio_finset Finset.card_Iio_finset
+-/
end Finset
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -106,7 +106,7 @@ theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :
by
rw [← card_sdiff h, ← card_powerset, Icc_eq_image_powerset h, Finset.card_image_iff]
rintro u hu v hv (huv : s ⊔ u = s ⊔ v)
- rw [mem_coe, mem_powerset] at hu hv
+ rw [mem_coe, mem_powerset] at hu hv
rw [← (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, ←
(disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, huv]
#align finset.card_Icc_finset Finset.card_Icc_finset
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -44,13 +44,17 @@ instance : LocallyFiniteOrder (Finset α)
finset_mem_Ioc s t u := by rw [mem_filter, mem_powerset]; exact and_comm' _ _
finset_mem_Ioo s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm' _ _
+#print Finset.Icc_eq_filter_powerset /-
theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Icc_eq_filter_powerset Finset.Icc_eq_filter_powerset
+-/
+#print Finset.Ico_eq_filter_ssubsets /-
theorem Ico_eq_filter_ssubsets : Ico s t = t.ssubsets.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsets
+-/
theorem Ioc_eq_filter_powerset : Ioc s t = t.powerset.filterₓ ((· ⊂ ·) s) :=
rfl
@@ -70,6 +74,7 @@ theorem Iio_eq_ssubsets : Iio s = s.ssubsets :=
variable {s t}
+#print Finset.Icc_eq_image_powerset /-
theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image ((· ∪ ·) s) :=
by
ext u
@@ -80,7 +85,9 @@ theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (
· rintro ⟨v, hv, rfl⟩
exact ⟨le_sup_left, union_subset h <| hv.trans <| sdiff_subset _ _⟩
#align finset.Icc_eq_image_powerset Finset.Icc_eq_image_powerset
+-/
+#print Finset.Ico_eq_image_ssubsets /-
theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image ((· ∪ ·) s) :=
by
ext u
@@ -91,7 +98,9 @@ theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image (
· rintro ⟨v, hv, rfl⟩
exact ⟨le_sup_left, sup_lt_of_lt_sdiff_left hv h⟩
#align finset.Ico_eq_image_ssubsets Finset.Ico_eq_image_ssubsets
+-/
+#print Finset.card_Icc_finset /-
/-- Cardinality of a non-empty `Icc` of finsets. -/
theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :=
by
@@ -101,11 +110,14 @@ theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :
rw [← (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, ←
(disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, huv]
#align finset.card_Icc_finset Finset.card_Icc_finset
+-/
+#print Finset.card_Ico_finset /-
/-- Cardinality of an `Ico` of finsets. -/
theorem card_Ico_finset (h : s ⊆ t) : (Ico s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc_finset h]
#align finset.card_Ico_finset Finset.card_Ico_finset
+-/
/-- Cardinality of an `Ioc` of finsets. -/
theorem card_Ioc_finset (h : s ⊆ t) : (Ioc s t).card = 2 ^ (t.card - s.card) - 1 := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -44,74 +44,32 @@ instance : LocallyFiniteOrder (Finset α)
finset_mem_Ioc s t u := by rw [mem_filter, mem_powerset]; exact and_comm' _ _
finset_mem_Ioo s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm' _ _
-/- warning: finset.Icc_eq_filter_powerset -> Finset.Icc_eq_filter_powerset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s) (fun (a : Finset.{u1} α) => Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Finset.powerset.{u1} α t))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.383 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.385 : Finset.{u1} α) => HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.383 x._@.Mathlib.Data.Finset.Interval._hyg.385) s) (fun (a : Finset.{u1} α) => Finset.decidableSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.powerset.{u1} α t))
-Case conversion may be inaccurate. Consider using '#align finset.Icc_eq_filter_powerset Finset.Icc_eq_filter_powersetₓ'. -/
theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Icc_eq_filter_powerset Finset.Icc_eq_filter_powerset
-/- warning: finset.Ico_eq_filter_ssubsets -> Finset.Ico_eq_filter_ssubsets is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s) (fun (a : Finset.{u1} α) => Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.420 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.422 : Finset.{u1} α) => HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.420 x._@.Mathlib.Data.Finset.Interval._hyg.422) s) (fun (a : Finset.{u1} α) => Finset.decidableSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
-Case conversion may be inaccurate. Consider using '#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsetsₓ'. -/
theorem Ico_eq_filter_ssubsets : Ico s t = t.ssubsets.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsets
-/- warning: finset.Ioc_eq_filter_powerset -> Finset.Ioc_eq_filter_powerset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.hasSsubset.{u1} α) s) (fun (a : Finset.{u1} α) => And.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s a) (Not (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s)) (Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Not.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s) (Finset.decidableDforallFinset.{u1} α a (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 s)))) (Finset.powerset.{u1} α t))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.457 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.459 : Finset.{u1} α) => HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.instHasSSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.457 x._@.Mathlib.Data.Finset.Interval._hyg.459) s) (fun (a : Finset.{u1} α) => Finset.decidableSSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.powerset.{u1} α t))
-Case conversion may be inaccurate. Consider using '#align finset.Ioc_eq_filter_powerset Finset.Ioc_eq_filter_powersetₓ'. -/
theorem Ioc_eq_filter_powerset : Ioc s t = t.powerset.filterₓ ((· ⊂ ·) s) :=
rfl
#align finset.Ioc_eq_filter_powerset Finset.Ioc_eq_filter_powerset
-/- warning: finset.Ioo_eq_filter_ssubsets -> Finset.Ioo_eq_filter_ssubsets is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.hasSsubset.{u1} α) s) (fun (a : Finset.{u1} α) => And.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s a) (Not (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s)) (Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Not.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s) (Finset.decidableDforallFinset.{u1} α a (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 s)))) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.494 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.496 : Finset.{u1} α) => HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.instHasSSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.494 x._@.Mathlib.Data.Finset.Interval._hyg.496) s) (fun (a : Finset.{u1} α) => Finset.decidableSSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
-Case conversion may be inaccurate. Consider using '#align finset.Ioo_eq_filter_ssubsets Finset.Ioo_eq_filter_ssubsetsₓ'. -/
theorem Ioo_eq_filter_ssubsets : Ioo s t = t.ssubsets.filterₓ ((· ⊂ ·) s) :=
rfl
#align finset.Ioo_eq_filter_ssubsets Finset.Ioo_eq_filter_ssubsets
-/- warning: finset.Iic_eq_powerset -> Finset.Iic_eq_powerset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.powerset.{u1} α s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.powerset.{u1} α s)
-Case conversion may be inaccurate. Consider using '#align finset.Iic_eq_powerset Finset.Iic_eq_powersetₓ'. -/
theorem Iic_eq_powerset : Iic s = s.powerset :=
filter_true_of_mem fun t _ => empty_subset t
#align finset.Iic_eq_powerset Finset.Iic_eq_powerset
-/- warning: finset.Iio_eq_ssubsets -> Finset.Iio_eq_ssubsets is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s)
-Case conversion may be inaccurate. Consider using '#align finset.Iio_eq_ssubsets Finset.Iio_eq_ssubsetsₓ'. -/
theorem Iio_eq_ssubsets : Iio s = s.ssubsets :=
filter_true_of_mem fun t _ => empty_subset t
#align finset.Iio_eq_ssubsets Finset.Iio_eq_ssubsets
variable {s t}
-/- warning: finset.Icc_eq_image_powerset -> Finset.Icc_eq_image_powerset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) (Finset.powerset.{u1} α (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.hasSdiff.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.602 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.604 : Finset.{u1} α) => Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) x._@.Mathlib.Data.Finset.Interval._hyg.602 x._@.Mathlib.Data.Finset.Interval._hyg.604) s) (Finset.powerset.{u1} α (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.instSDiffFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
-Case conversion may be inaccurate. Consider using '#align finset.Icc_eq_image_powerset Finset.Icc_eq_image_powersetₓ'. -/
theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image ((· ∪ ·) s) :=
by
ext u
@@ -123,12 +81,6 @@ theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (
exact ⟨le_sup_left, union_subset h <| hv.trans <| sdiff_subset _ _⟩
#align finset.Icc_eq_image_powerset Finset.Icc_eq_image_powerset
-/- warning: finset.Ico_eq_image_ssubsets -> Finset.Ico_eq_image_ssubsets is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.hasSdiff.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.698 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.700 : Finset.{u1} α) => Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) x._@.Mathlib.Data.Finset.Interval._hyg.698 x._@.Mathlib.Data.Finset.Interval._hyg.700) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.instSDiffFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
-Case conversion may be inaccurate. Consider using '#align finset.Ico_eq_image_ssubsets Finset.Ico_eq_image_ssubsetsₓ'. -/
theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image ((· ∪ ·) s) :=
by
ext u
@@ -140,12 +92,6 @@ theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image (
exact ⟨le_sup_left, sup_lt_of_lt_sdiff_left hv h⟩
#align finset.Ico_eq_image_ssubsets Finset.Ico_eq_image_ssubsets
-/- warning: finset.card_Icc_finset -> Finset.card_Icc_finset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))))
-Case conversion may be inaccurate. Consider using '#align finset.card_Icc_finset Finset.card_Icc_finsetₓ'. -/
/-- Cardinality of a non-empty `Icc` of finsets. -/
theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :=
by
@@ -156,55 +102,25 @@ theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :
(disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, huv]
#align finset.card_Icc_finset Finset.card_Icc_finset
-/- warning: finset.card_Ico_finset -> Finset.card_Ico_finset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))
-Case conversion may be inaccurate. Consider using '#align finset.card_Ico_finset Finset.card_Ico_finsetₓ'. -/
/-- Cardinality of an `Ico` of finsets. -/
theorem card_Ico_finset (h : s ⊆ t) : (Ico s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc_finset h]
#align finset.card_Ico_finset Finset.card_Ico_finset
-/- warning: finset.card_Ioc_finset -> Finset.card_Ioc_finset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))
-Case conversion may be inaccurate. Consider using '#align finset.card_Ioc_finset Finset.card_Ioc_finsetₓ'. -/
/-- Cardinality of an `Ioc` of finsets. -/
theorem card_Ioc_finset (h : s ⊆ t) : (Ioc s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc_finset h]
#align finset.card_Ioc_finset Finset.card_Ioc_finset
-/- warning: finset.card_Ioo_finset -> Finset.card_Ioo_finset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))))
-Case conversion may be inaccurate. Consider using '#align finset.card_Ioo_finset Finset.card_Ioo_finsetₓ'. -/
/-- Cardinality of an `Ioo` of finsets. -/
theorem card_Ioo_finset (h : s ⊆ t) : (Ioo s t).card = 2 ^ (t.card - s.card) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc_finset h]
#align finset.card_Ioo_finset Finset.card_Ioo_finset
-/- warning: finset.card_Iic_finset -> Finset.card_Iic_finset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (Finset.card.{u1} α s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (Finset.card.{u1} α s))
-Case conversion may be inaccurate. Consider using '#align finset.card_Iic_finset Finset.card_Iic_finsetₓ'. -/
/-- Cardinality of an `Iic` of finsets. -/
theorem card_Iic_finset : (Iic s).card = 2 ^ s.card := by rw [Iic_eq_powerset, card_powerset]
#align finset.card_Iic_finset Finset.card_Iic_finset
-/- warning: finset.card_Iio_finset -> Finset.card_Iio_finset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (Finset.card.{u1} α s)) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (Finset.card.{u1} α s)) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align finset.card_Iio_finset Finset.card_Iio_finsetₓ'. -/
/-- Cardinality of an `Iio` of finsets. -/
theorem card_Iio_finset : (Iio s).card = 2 ^ s.card - 1 := by
rw [Iio_eq_ssubsets, ssubsets, card_erase_of_mem (mem_powerset_self _), card_powerset]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -39,18 +39,10 @@ instance : LocallyFiniteOrder (Finset α)
finsetIco s t := t.ssubsets.filterₓ ((· ⊆ ·) s)
finsetIoc s t := t.powerset.filterₓ ((· ⊂ ·) s)
finsetIoo s t := t.ssubsets.filterₓ ((· ⊂ ·) s)
- finset_mem_Icc s t u := by
- rw [mem_filter, mem_powerset]
- exact and_comm' _ _
- finset_mem_Ico s t u := by
- rw [mem_filter, mem_ssubsets]
- exact and_comm' _ _
- finset_mem_Ioc s t u := by
- rw [mem_filter, mem_powerset]
- exact and_comm' _ _
- finset_mem_Ioo s t u := by
- rw [mem_filter, mem_ssubsets]
- exact and_comm' _ _
+ finset_mem_Icc s t u := by rw [mem_filter, mem_powerset]; exact and_comm' _ _
+ finset_mem_Ico s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm' _ _
+ finset_mem_Ioc s t u := by rw [mem_filter, mem_powerset]; exact and_comm' _ _
+ finset_mem_Ioo s t u := by rw [mem_filter, mem_ssubsets]; exact and_comm' _ _
/- warning: finset.Icc_eq_filter_powerset -> Finset.Icc_eq_filter_powerset is a dubious translation:
lean 3 declaration is
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -52,17 +52,25 @@ instance : LocallyFiniteOrder (Finset α)
rw [mem_filter, mem_ssubsets]
exact and_comm' _ _
-#print Finset.Icc_eq_filter_powerset /-
+/- warning: finset.Icc_eq_filter_powerset -> Finset.Icc_eq_filter_powerset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s) (fun (a : Finset.{u1} α) => Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Finset.powerset.{u1} α t))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.383 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.385 : Finset.{u1} α) => HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.383 x._@.Mathlib.Data.Finset.Interval._hyg.385) s) (fun (a : Finset.{u1} α) => Finset.decidableSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.powerset.{u1} α t))
+Case conversion may be inaccurate. Consider using '#align finset.Icc_eq_filter_powerset Finset.Icc_eq_filter_powersetₓ'. -/
theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Icc_eq_filter_powerset Finset.Icc_eq_filter_powerset
--/
-#print Finset.Ico_eq_filter_ssubsets /-
+/- warning: finset.Ico_eq_filter_ssubsets -> Finset.Ico_eq_filter_ssubsets is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s) (fun (a : Finset.{u1} α) => Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.420 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.422 : Finset.{u1} α) => HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.420 x._@.Mathlib.Data.Finset.Interval._hyg.422) s) (fun (a : Finset.{u1} α) => Finset.decidableSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
+Case conversion may be inaccurate. Consider using '#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsetsₓ'. -/
theorem Ico_eq_filter_ssubsets : Ico s t = t.ssubsets.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsets
--/
/- warning: finset.Ioc_eq_filter_powerset -> Finset.Ioc_eq_filter_powerset is a dubious translation:
lean 3 declaration is
@@ -106,7 +114,12 @@ theorem Iio_eq_ssubsets : Iio s = s.ssubsets :=
variable {s t}
-#print Finset.Icc_eq_image_powerset /-
+/- warning: finset.Icc_eq_image_powerset -> Finset.Icc_eq_image_powerset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) (Finset.powerset.{u1} α (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.hasSdiff.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.602 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.604 : Finset.{u1} α) => Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) x._@.Mathlib.Data.Finset.Interval._hyg.602 x._@.Mathlib.Data.Finset.Interval._hyg.604) s) (Finset.powerset.{u1} α (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.instSDiffFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
+Case conversion may be inaccurate. Consider using '#align finset.Icc_eq_image_powerset Finset.Icc_eq_image_powersetₓ'. -/
theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image ((· ∪ ·) s) :=
by
ext u
@@ -117,9 +130,13 @@ theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (
· rintro ⟨v, hv, rfl⟩
exact ⟨le_sup_left, union_subset h <| hv.trans <| sdiff_subset _ _⟩
#align finset.Icc_eq_image_powerset Finset.Icc_eq_image_powerset
--/
-#print Finset.Ico_eq_image_ssubsets /-
+/- warning: finset.Ico_eq_image_ssubsets -> Finset.Ico_eq_image_ssubsets is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Union.union.{u1} (Finset.{u1} α) (Finset.hasUnion.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.hasSdiff.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.image.{u1, u1} (Finset.{u1} α) (Finset.{u1} α) (fun (a : Finset.{u1} α) (b : Finset.{u1} α) => Finset.decidableEq.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.698 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.700 : Finset.{u1} α) => Union.union.{u1} (Finset.{u1} α) (Finset.instUnionFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) x._@.Mathlib.Data.Finset.Interval._hyg.698 x._@.Mathlib.Data.Finset.Interval._hyg.700) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) (SDiff.sdiff.{u1} (Finset.{u1} α) (Finset.instSDiffFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t s))))
+Case conversion may be inaccurate. Consider using '#align finset.Ico_eq_image_ssubsets Finset.Ico_eq_image_ssubsetsₓ'. -/
theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image ((· ∪ ·) s) :=
by
ext u
@@ -130,9 +147,13 @@ theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image (
· rintro ⟨v, hv, rfl⟩
exact ⟨le_sup_left, sup_lt_of_lt_sdiff_left hv h⟩
#align finset.Ico_eq_image_ssubsets Finset.Ico_eq_image_ssubsets
--/
-#print Finset.card_Icc_finset /-
+/- warning: finset.card_Icc_finset -> Finset.card_Icc_finset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Icc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))))
+Case conversion may be inaccurate. Consider using '#align finset.card_Icc_finset Finset.card_Icc_finsetₓ'. -/
/-- Cardinality of a non-empty `Icc` of finsets. -/
theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :=
by
@@ -142,14 +163,17 @@ theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :
rw [← (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, ←
(disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, huv]
#align finset.card_Icc_finset Finset.card_Icc_finset
--/
-#print Finset.card_Ico_finset /-
+/- warning: finset.card_Ico_finset -> Finset.card_Ico_finset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ico.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))
+Case conversion may be inaccurate. Consider using '#align finset.card_Ico_finset Finset.card_Ico_finsetₓ'. -/
/-- Cardinality of an `Ico` of finsets. -/
theorem card_Ico_finset (h : s ⊆ t) : (Ico s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc_finset h]
#align finset.card_Ico_finset Finset.card_Ico_finset
--/
/- warning: finset.card_Ioc_finset -> Finset.card_Ioc_finset is a dubious translation:
lean 3 declaration is
mathlib commit https://github.com/leanprover-community/mathlib/commit/06a655b5fcfbda03502f9158bbf6c0f1400886f9
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module data.finset.interval
-! leanprover-community/mathlib commit bf07fdbb61a94b65f262287a4b12c7aedf869e72
+! leanprover-community/mathlib commit d64d67d000b974f0d86a2be7918cf800be6271c8
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.Data.Finset.LocallyFinite
/-!
# Intervals of finsets as finsets
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file provides the `locally_finite_order` instance for `finset α` and calculates the cardinality
of finite intervals of finsets.
mathlib commit https://github.com/leanprover-community/mathlib/commit/d95bef0d215ea58c0fd7bbc4b151bf3fe952c095
@@ -49,32 +49,61 @@ instance : LocallyFiniteOrder (Finset α)
rw [mem_filter, mem_ssubsets]
exact and_comm' _ _
+#print Finset.Icc_eq_filter_powerset /-
theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Icc_eq_filter_powerset Finset.Icc_eq_filter_powerset
+-/
+#print Finset.Ico_eq_filter_ssubsets /-
theorem Ico_eq_filter_ssubsets : Ico s t = t.ssubsets.filterₓ ((· ⊆ ·) s) :=
rfl
#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsets
+-/
+/- warning: finset.Ioc_eq_filter_powerset -> Finset.Ioc_eq_filter_powerset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.hasSsubset.{u1} α) s) (fun (a : Finset.{u1} α) => And.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s a) (Not (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s)) (Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Not.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s) (Finset.decidableDforallFinset.{u1} α a (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 s)))) (Finset.powerset.{u1} α t))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.457 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.459 : Finset.{u1} α) => HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.instHasSSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.457 x._@.Mathlib.Data.Finset.Interval._hyg.459) s) (fun (a : Finset.{u1} α) => Finset.decidableSSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.powerset.{u1} α t))
+Case conversion may be inaccurate. Consider using '#align finset.Ioc_eq_filter_powerset Finset.Ioc_eq_filter_powersetₓ'. -/
theorem Ioc_eq_filter_powerset : Ioc s t = t.powerset.filterₓ ((· ⊂ ·) s) :=
rfl
#align finset.Ioc_eq_filter_powerset Finset.Ioc_eq_filter_powerset
+/- warning: finset.Ioo_eq_filter_ssubsets -> Finset.Ioo_eq_filter_ssubsets is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) (HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.hasSsubset.{u1} α) s) (fun (a : Finset.{u1} α) => And.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s a) (Not (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s)) (Finset.decidableDforallFinset.{u1} α s (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 a)) (Not.decidable (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) a s) (Finset.decidableDforallFinset.{u1} α a (fun (a_1 : α) (ᾰ : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 s) (fun (a_1 : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 a) => Finset.decidableMem.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a_1 s)))) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t) (Finset.filter.{u1} (Finset.{u1} α) ((fun (x._@.Mathlib.Data.Finset.Interval._hyg.494 : Finset.{u1} α) (x._@.Mathlib.Data.Finset.Interval._hyg.496 : Finset.{u1} α) => HasSSubset.SSubset.{u1} (Finset.{u1} α) (Finset.instHasSSubsetFinset.{u1} α) x._@.Mathlib.Data.Finset.Interval._hyg.494 x._@.Mathlib.Data.Finset.Interval._hyg.496) s) (fun (a : Finset.{u1} α) => Finset.decidableSSubsetFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) t))
+Case conversion may be inaccurate. Consider using '#align finset.Ioo_eq_filter_ssubsets Finset.Ioo_eq_filter_ssubsetsₓ'. -/
theorem Ioo_eq_filter_ssubsets : Ioo s t = t.ssubsets.filterₓ ((· ⊂ ·) s) :=
rfl
#align finset.Ioo_eq_filter_ssubsets Finset.Ioo_eq_filter_ssubsets
+/- warning: finset.Iic_eq_powerset -> Finset.Iic_eq_powerset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.powerset.{u1} α s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.powerset.{u1} α s)
+Case conversion may be inaccurate. Consider using '#align finset.Iic_eq_powerset Finset.Iic_eq_powersetₓ'. -/
theorem Iic_eq_powerset : Iic s = s.powerset :=
filter_true_of_mem fun t _ => empty_subset t
#align finset.Iic_eq_powerset Finset.Iic_eq_powerset
+/- warning: finset.Iio_eq_ssubsets -> Finset.Iio_eq_ssubsets is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Finset.{u1} α)) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s) (Finset.ssubsets.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s)
+Case conversion may be inaccurate. Consider using '#align finset.Iio_eq_ssubsets Finset.Iio_eq_ssubsetsₓ'. -/
theorem Iio_eq_ssubsets : Iio s = s.ssubsets :=
filter_true_of_mem fun t _ => empty_subset t
#align finset.Iio_eq_ssubsets Finset.Iio_eq_ssubsets
variable {s t}
+#print Finset.Icc_eq_image_powerset /-
theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image ((· ∪ ·) s) :=
by
ext u
@@ -85,7 +114,9 @@ theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (
· rintro ⟨v, hv, rfl⟩
exact ⟨le_sup_left, union_subset h <| hv.trans <| sdiff_subset _ _⟩
#align finset.Icc_eq_image_powerset Finset.Icc_eq_image_powerset
+-/
+#print Finset.Ico_eq_image_ssubsets /-
theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image ((· ∪ ·) s) :=
by
ext u
@@ -96,7 +127,9 @@ theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image (
· rintro ⟨v, hv, rfl⟩
exact ⟨le_sup_left, sup_lt_of_lt_sdiff_left hv h⟩
#align finset.Ico_eq_image_ssubsets Finset.Ico_eq_image_ssubsets
+-/
+#print Finset.card_Icc_finset /-
/-- Cardinality of a non-empty `Icc` of finsets. -/
theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :=
by
@@ -106,26 +139,53 @@ theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) :
rw [← (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, ←
(disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, huv]
#align finset.card_Icc_finset Finset.card_Icc_finset
+-/
+#print Finset.card_Ico_finset /-
/-- Cardinality of an `Ico` of finsets. -/
theorem card_Ico_finset (h : s ⊆ t) : (Ico s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ico_eq_card_Icc_sub_one, card_Icc_finset h]
#align finset.card_Ico_finset Finset.card_Ico_finset
+-/
+/- warning: finset.card_Ioc_finset -> Finset.card_Ioc_finset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioc.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))
+Case conversion may be inaccurate. Consider using '#align finset.card_Ioc_finset Finset.card_Ioc_finsetₓ'. -/
/-- Cardinality of an `Ioc` of finsets. -/
theorem card_Ioc_finset (h : s ⊆ t) : (Ioc s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc_finset h]
#align finset.card_Ioc_finset Finset.card_Ioc_finset
+/- warning: finset.card_Ioo_finset -> Finset.card_Ioo_finset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.hasSubset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : Finset.{u1} α}, (HasSubset.Subset.{u1} (Finset.{u1} α) (Finset.instHasSubsetFinset.{u1} α) s t) -> (Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Ioo.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s t)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.card.{u1} α t) (Finset.card.{u1} α s))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2))))
+Case conversion may be inaccurate. Consider using '#align finset.card_Ioo_finset Finset.card_Ioo_finsetₓ'. -/
/-- Cardinality of an `Ioo` of finsets. -/
theorem card_Ioo_finset (h : s ⊆ t) : (Ioo s t).card = 2 ^ (t.card - s.card) - 2 := by
rw [card_Ioo_eq_card_Icc_sub_two, card_Icc_finset h]
#align finset.card_Ioo_finset Finset.card_Ioo_finset
+/- warning: finset.card_Iic_finset -> Finset.card_Iic_finset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (Finset.card.{u1} α s))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iic.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (Finset.card.{u1} α s))
+Case conversion may be inaccurate. Consider using '#align finset.card_Iic_finset Finset.card_Iic_finsetₓ'. -/
/-- Cardinality of an `Iic` of finsets. -/
theorem card_Iic_finset : (Iic s).card = 2 ^ s.card := by rw [Iic_eq_powerset, card_powerset]
#align finset.card_Iic_finset Finset.card_Iic_finset
+/- warning: finset.card_Iio_finset -> Finset.card_Iio_finset is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.orderBot.{u1} α) (Finset.locallyFiniteOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (Finset.card.{u1} α s)) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α}, Eq.{1} Nat (Finset.card.{u1} (Finset.{u1} α) (Finset.Iio.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{u1} (Finset.{u1} α) (PartialOrder.toPreorder.{u1} (Finset.{u1} α) (Finset.partialOrder.{u1} α)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u1} α) (Finset.instLocallyFiniteOrderFinsetToPreorderPartialOrder.{u1} α (fun (a : α) (b : α) => _inst_1 a b))) s)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat instPowNat) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)) (Finset.card.{u1} α s)) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
+Case conversion may be inaccurate. Consider using '#align finset.card_Iio_finset Finset.card_Iio_finsetₓ'. -/
/-- Cardinality of an `Iio` of finsets. -/
theorem card_Iio_finset : (Iio s).card = 2 ^ s.card - 1 := by
rw [Iio_eq_ssubsets, ssubsets, card_erase_of_mem (mem_powerset_self _), card_powerset]
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Move Set.Ixx
, Finset.Ixx
, Multiset.Ixx
together under two different folders:
Order.Interval
for their definition and basic propertiesAlgebra.Order.Interval
for their algebraic propertiesMove the definitions of Multiset.Ixx
to what is now Order.Interval.Multiset
. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx
three years ago).
Move the algebraic results out of what is now Order.Interval.Finset.Basic
to a new file Algebra.Order.Interval.Finset.Basic
.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import Mathlib.Data.Finset.Grade
-import Mathlib.Data.Finset.LocallyFinite.Basic
+import Mathlib.Order.Interval.Finset.Basic
#align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
@@ -33,7 +33,7 @@ section Decidable
variable [DecidableEq α] (s t : Finset α)
-instance : LocallyFiniteOrder (Finset α)
+instance instLocallyFiniteOrder : LocallyFiniteOrder (Finset α)
where
finsetIcc s t := t.powerset.filter (s ⊆ ·)
finsetIco s t := t.ssubsets.filter (s ⊆ ·)
Define the sequence of "hollow boxes" indexed by natural numbers as the successive differences of the "boxes" Icc (-n) n
.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import Mathlib.Data.Finset.Grade
-import Mathlib.Data.Finset.LocallyFinite
+import Mathlib.Data.Finset.LocallyFinite.Basic
#align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
Covby
to CovBy
(#9578)
Rename
Covby
→ CovBy
, Wcovby
→ WCovBy
*covby*
→ *covBy*
wcovby.finset_val
→ WCovBy.finset_val
, wcovby.finset_coe
→ WCovBy.finset_coe
Covby.is_coatom
→ CovBy.isCoatom
@@ -140,7 +140,7 @@ section Cons
/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (cons a s ha)` for all `s`
and `a ∉ s`. -/
lemma monotone_iff_forall_le_cons : Monotone f ↔ ∀ s, ∀ ⦃a⦄ (ha), f s ≤ f (cons a s ha) := by
- classical simp [monotone_iff_forall_covby, covby_iff_exists_cons]
+ classical simp [monotone_iff_forall_covBy, covBy_iff_exists_cons]
/-- A function `f` from `Finset α` is antitone if and only if `f (cons a s ha) ≤ f s` for all
`s` and `a ∉ s`. -/
@@ -150,7 +150,7 @@ lemma antitone_iff_forall_cons_le : Antitone f ↔ ∀ s ⦃a⦄ ha, f (cons a s
/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (cons a s ha)` for
all `s` and `a ∉ s`. -/
lemma strictMono_iff_forall_lt_cons : StrictMono f ↔ ∀ s ⦃a⦄ ha, f s < f (cons a s ha) := by
- classical simp [strictMono_iff_forall_covby, covby_iff_exists_cons]
+ classical simp [strictMono_iff_forall_covBy, covBy_iff_exists_cons]
/-- A function `f` from `Finset α` is strictly antitone if and only if `f (cons a s ha) < f s` for
all `s` and `a ∉ s`. -/
Characterise IsAtom
, IsCoatom
, Covby
in Set α
, Multiset α
, Finset α
and deduce that Multiset α
, Finset α
are graded orders.
Note I am moving some existing characterisations to here because it makes sense thematically, but I could be convinced otherwise.
@@ -3,6 +3,7 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
+import Mathlib.Data.Finset.Grade
import Mathlib.Data.Finset.LocallyFinite
#align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
(· op ·) a
by (a op ·)
(#8843)
I used the regex \(\(· (.) ·\) (.)\)
, replacing with ($2 $1 ·)
.
@@ -34,10 +34,10 @@ variable [DecidableEq α] (s t : Finset α)
instance : LocallyFiniteOrder (Finset α)
where
- finsetIcc s t := t.powerset.filter ((· ⊆ ·) s)
- finsetIco s t := t.ssubsets.filter ((· ⊆ ·) s)
- finsetIoc s t := t.powerset.filter ((· ⊂ ·) s)
- finsetIoo s t := t.ssubsets.filter ((· ⊂ ·) s)
+ finsetIcc s t := t.powerset.filter (s ⊆ ·)
+ finsetIco s t := t.ssubsets.filter (s ⊆ ·)
+ finsetIoc s t := t.powerset.filter (s ⊂ ·)
+ finsetIoo s t := t.ssubsets.filter (s ⊂ ·)
finset_mem_Icc s t u := by
rw [mem_filter, mem_powerset]
exact and_comm
@@ -51,19 +51,19 @@ instance : LocallyFiniteOrder (Finset α)
rw [mem_filter, mem_ssubsets]
exact and_comm
-theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filter ((· ⊆ ·) s) :=
+theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filter (s ⊆ ·) :=
rfl
#align finset.Icc_eq_filter_powerset Finset.Icc_eq_filter_powerset
-theorem Ico_eq_filter_ssubsets : Ico s t = t.ssubsets.filter ((· ⊆ ·) s) :=
+theorem Ico_eq_filter_ssubsets : Ico s t = t.ssubsets.filter (s ⊆ ·) :=
rfl
#align finset.Ico_eq_filter_ssubsets Finset.Ico_eq_filter_ssubsets
-theorem Ioc_eq_filter_powerset : Ioc s t = t.powerset.filter ((· ⊂ ·) s) :=
+theorem Ioc_eq_filter_powerset : Ioc s t = t.powerset.filter (s ⊂ ·) :=
rfl
#align finset.Ioc_eq_filter_powerset Finset.Ioc_eq_filter_powerset
-theorem Ioo_eq_filter_ssubsets : Ioo s t = t.ssubsets.filter ((· ⊂ ·) s) :=
+theorem Ioo_eq_filter_ssubsets : Ioo s t = t.ssubsets.filter (s ⊂ ·) :=
rfl
#align finset.Ioo_eq_filter_ssubsets Finset.Ioo_eq_filter_ssubsets
@@ -77,7 +77,7 @@ theorem Iio_eq_ssubsets : Iio s = s.ssubsets :=
variable {s t}
-theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image ((· ∪ ·) s) := by
+theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (s ∪ ·) := by
ext u
simp_rw [mem_Icc, mem_image, mem_powerset]
constructor
@@ -87,7 +87,7 @@ theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (
exact ⟨le_sup_left, union_subset h <| hv.trans <| sdiff_subset _ _⟩
#align finset.Icc_eq_image_powerset Finset.Icc_eq_image_powerset
-theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image ((· ∪ ·) s) := by
+theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image (s ∪ ·) := by
ext u
simp_rw [mem_Ico, mem_image, mem_ssubsets]
constructor
Move the lemmas characterising Covby
on Finset α
from Data.Finset.Interval
to Data.Finset.Basic
. Golf the other proofs in Data.Finset.Interval
and make sure the lemma names reflect whether each lemma is about insert
or cons
.
@@ -24,7 +24,7 @@ out of `Finset α` in terms of `Finset.insert`
-/
-variable {α : Type*}
+variable {α β : Type*}
namespace Finset
@@ -132,50 +132,29 @@ theorem card_Iio_finset : (Iio s).card = 2 ^ s.card - 1 := by
end Decidable
-variable {s t : Finset α}
+variable [Preorder β] {s t : Finset α} {f : Finset α → β}
section Cons
-lemma covby_cons {i : α} (hi : i ∉ s) : s ⋖ cons i s hi :=
- Covby.of_image ⟨⟨((↑) : Finset α → Set α), coe_injective⟩, coe_subset⟩ <| by
- simp only [RelEmbedding.coe_mk, Function.Embedding.coeFn_mk, coe_cons, mem_coe]
- exact_mod_cast Set.covby_insert (show i ∉ (s : Set α) from hi)
+/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (cons a s ha)` for all `s`
+and `a ∉ s`. -/
+lemma monotone_iff_forall_le_cons : Monotone f ↔ ∀ s, ∀ ⦃a⦄ (ha), f s ≤ f (cons a s ha) := by
+ classical simp [monotone_iff_forall_covby, covby_iff_exists_cons]
-lemma covby_iff : s ⋖ t ↔ ∃ i : α, ∃ hi : i ∉ s, t = cons i s hi := by
- constructor
- · intro hst
- obtain ⟨i, hi, his⟩ := ssubset_iff_exists_cons_subset.mp hst.1
- exact ⟨i, hi, .symm <| eq_of_le_of_not_lt his <| hst.2 <| ssubset_cons hi⟩
- · rintro ⟨i, hi, rfl⟩
- exact covby_cons hi
-
-/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (cons i s hi)` for all
-`s` and `i ∉ s`. -/
-theorem monotone_iff {β : Type*} [Preorder β] (f : Finset α → β) :
- Monotone f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f s ≤ f (cons i s hi) := by
- classical
- simp only [monotone_iff_forall_covby, covby_iff, forall_exists_index, and_imp]
- aesop
-
-/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (insert i s)` for
-all `s` and `i ∉ s`. -/
-theorem strictMono_iff {β : Type*} [Preorder β] (f : Finset α → β) :
- StrictMono f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f s < f (cons i s hi) := by
- classical
- simp only [strictMono_iff_forall_covby, covby_iff, forall_exists_index, and_imp]
- aesop
-
-/-- A function `f` from `Finset α` is antitone if and only if `f (cons i s hi) ≤ f s` for all
-`s` and `i ∉ s`. -/
-theorem antitone_iff {β : Type*} [Preorder β] (f : Finset α → β) :
- Antitone f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f (cons i s hi) ≤ f s :=
- monotone_iff (β := βᵒᵈ) f
-
-/-- A function `f` from `Finset α` is strictly antitone if and only if `f (cons i s hi) < f s` for
-all `s` and `i ∉ s`. -/
-theorem strictAnti_iff {β : Type*} [Preorder β] (f : Finset α → β) :
- StrictAnti f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f (cons i s hi) < f s :=
- strictMono_iff (β := βᵒᵈ) f
+/-- A function `f` from `Finset α` is antitone if and only if `f (cons a s ha) ≤ f s` for all
+`s` and `a ∉ s`. -/
+lemma antitone_iff_forall_cons_le : Antitone f ↔ ∀ s ⦃a⦄ ha, f (cons a s ha) ≤ f s :=
+ monotone_iff_forall_le_cons (β := βᵒᵈ)
+
+/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (cons a s ha)` for
+all `s` and `a ∉ s`. -/
+lemma strictMono_iff_forall_lt_cons : StrictMono f ↔ ∀ s ⦃a⦄ ha, f s < f (cons a s ha) := by
+ classical simp [strictMono_iff_forall_covby, covby_iff_exists_cons]
+
+/-- A function `f` from `Finset α` is strictly antitone if and only if `f (cons a s ha) < f s` for
+all `s` and `a ∉ s`. -/
+lemma strictAnti_iff_forall_cons_lt : StrictAnti f ↔ ∀ s ⦃a⦄ ha, f (cons a s ha) < f s :=
+ strictMono_iff_forall_lt_cons (β := βᵒᵈ)
end Cons
@@ -183,35 +162,25 @@ section Insert
variable [DecidableEq α]
-lemma covby_insert {i : α} (hi : i ∉ s) : s ⋖ insert i s := by
- simpa using covby_cons hi
-
-lemma covby_iff' : s ⋖ t ↔ ∃ i : α, i ∉ s ∧ t = insert i s := by
- simp [covby_iff]
-
-/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (insert i s)` for all
-`s` and `i ∉ s`. -/
-theorem monotone_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
- Monotone f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f s ≤ f (insert i s) := by
- simp [monotone_iff]
-
-/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (insert i s)` for
-all `s` and `i ∉ s`. -/
-theorem strictMono_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
- StrictMono f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f s < f (insert i s) := by
- simp [strictMono_iff]
-
-/-- A function `f` from `Finset α` is antitone if and only if `f (insert i s) ≤ f s` for all
-`s` and `i ∉ s`. -/
-theorem antitone_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
- Antitone f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f (insert i s) ≤ f s :=
- monotone_iff' (β := βᵒᵈ) f
-
-/-- A function `f` from `Finset α` is strictly antitone if and only if `f (insert i s) < f s` for
-all `s` and `i ∉ s`. -/
-theorem strictAnti_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
- StrictAnti f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f (insert i s) < f s :=
- strictMono_iff' (β := βᵒᵈ) f
+/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (insert a s)` for all `s` and
+`a ∉ s`. -/
+lemma monotone_iff_forall_le_insert : Monotone f ↔ ∀ s ⦃a⦄, a ∉ s → f s ≤ f (insert a s) := by
+ simp [monotone_iff_forall_le_cons]
+
+/-- A function `f` from `Finset α` is antitone if and only if `f (insert a s) ≤ f s` for all
+`s` and `a ∉ s`. -/
+lemma antitone_iff_forall_insert_le : Antitone f ↔ ∀ s ⦃a⦄, a ∉ s → f (insert a s) ≤ f s :=
+ monotone_iff_forall_le_insert (β := βᵒᵈ)
+
+/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (insert a s)` for
+all `s` and `a ∉ s`. -/
+lemma strictMono_iff_forall_lt_insert : StrictMono f ↔ ∀ s ⦃a⦄, a ∉ s → f s < f (insert a s) := by
+ simp [strictMono_iff_forall_lt_cons]
+
+/-- A function `f` from `Finset α` is strictly antitone if and only if `f (insert a s) < f s` for
+all `s` and `a ∉ s`. -/
+lemma strictAnti_iff_forall_lt_insert : StrictAnti f ↔ ∀ s ⦃a⦄, a ∉ s → f (insert a s) < f s :=
+ strictMono_iff_forall_lt_insert (β := βᵒᵈ)
end Insert
@@ -18,6 +18,9 @@ included in `t`. For example,
`Finset.Icc {0, 1} {0, 1, 2, 3} = {{0, 1}, {0, 1, 2}, {0, 1, 3}, {0, 1, 2, 3}}`
and
`Finset.Icc {0, 1, 2} {0, 1, 3} = {}`.
+
+In addition, this file gives characterizations of monotone and strictly monotone functions
+out of `Finset α` in terms of `Finset.insert`
-/
@@ -25,6 +28,8 @@ variable {α : Type*}
namespace Finset
+section Decidable
+
variable [DecidableEq α] (s t : Finset α)
instance : LocallyFiniteOrder (Finset α)
@@ -125,4 +130,89 @@ theorem card_Iio_finset : (Iio s).card = 2 ^ s.card - 1 := by
rw [Iio_eq_ssubsets, ssubsets, card_erase_of_mem (mem_powerset_self _), card_powerset]
#align finset.card_Iio_finset Finset.card_Iio_finset
+end Decidable
+
+variable {s t : Finset α}
+
+section Cons
+
+lemma covby_cons {i : α} (hi : i ∉ s) : s ⋖ cons i s hi :=
+ Covby.of_image ⟨⟨((↑) : Finset α → Set α), coe_injective⟩, coe_subset⟩ <| by
+ simp only [RelEmbedding.coe_mk, Function.Embedding.coeFn_mk, coe_cons, mem_coe]
+ exact_mod_cast Set.covby_insert (show i ∉ (s : Set α) from hi)
+
+lemma covby_iff : s ⋖ t ↔ ∃ i : α, ∃ hi : i ∉ s, t = cons i s hi := by
+ constructor
+ · intro hst
+ obtain ⟨i, hi, his⟩ := ssubset_iff_exists_cons_subset.mp hst.1
+ exact ⟨i, hi, .symm <| eq_of_le_of_not_lt his <| hst.2 <| ssubset_cons hi⟩
+ · rintro ⟨i, hi, rfl⟩
+ exact covby_cons hi
+
+/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (cons i s hi)` for all
+`s` and `i ∉ s`. -/
+theorem monotone_iff {β : Type*} [Preorder β] (f : Finset α → β) :
+ Monotone f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f s ≤ f (cons i s hi) := by
+ classical
+ simp only [monotone_iff_forall_covby, covby_iff, forall_exists_index, and_imp]
+ aesop
+
+/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (insert i s)` for
+all `s` and `i ∉ s`. -/
+theorem strictMono_iff {β : Type*} [Preorder β] (f : Finset α → β) :
+ StrictMono f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f s < f (cons i s hi) := by
+ classical
+ simp only [strictMono_iff_forall_covby, covby_iff, forall_exists_index, and_imp]
+ aesop
+
+/-- A function `f` from `Finset α` is antitone if and only if `f (cons i s hi) ≤ f s` for all
+`s` and `i ∉ s`. -/
+theorem antitone_iff {β : Type*} [Preorder β] (f : Finset α → β) :
+ Antitone f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f (cons i s hi) ≤ f s :=
+ monotone_iff (β := βᵒᵈ) f
+
+/-- A function `f` from `Finset α` is strictly antitone if and only if `f (cons i s hi) < f s` for
+all `s` and `i ∉ s`. -/
+theorem strictAnti_iff {β : Type*} [Preorder β] (f : Finset α → β) :
+ StrictAnti f ↔ ∀ s : Finset α, ∀ {i} (hi : i ∉ s), f (cons i s hi) < f s :=
+ strictMono_iff (β := βᵒᵈ) f
+
+end Cons
+
+section Insert
+
+variable [DecidableEq α]
+
+lemma covby_insert {i : α} (hi : i ∉ s) : s ⋖ insert i s := by
+ simpa using covby_cons hi
+
+lemma covby_iff' : s ⋖ t ↔ ∃ i : α, i ∉ s ∧ t = insert i s := by
+ simp [covby_iff]
+
+/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (insert i s)` for all
+`s` and `i ∉ s`. -/
+theorem monotone_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
+ Monotone f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f s ≤ f (insert i s) := by
+ simp [monotone_iff]
+
+/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (insert i s)` for
+all `s` and `i ∉ s`. -/
+theorem strictMono_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
+ StrictMono f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f s < f (insert i s) := by
+ simp [strictMono_iff]
+
+/-- A function `f` from `Finset α` is antitone if and only if `f (insert i s) ≤ f s` for all
+`s` and `i ∉ s`. -/
+theorem antitone_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
+ Antitone f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f (insert i s) ≤ f s :=
+ monotone_iff' (β := βᵒᵈ) f
+
+/-- A function `f` from `Finset α` is strictly antitone if and only if `f (insert i s) < f s` for
+all `s` and `i ∉ s`. -/
+theorem strictAnti_iff' {β : Type*} [Preorder β] (f : Finset α → β) :
+ StrictAnti f ↔ ∀ s : Finset α, ∀ {i} (_hi : i ∉ s), f (insert i s) < f s :=
+ strictMono_iff' (β := βᵒᵈ) f
+
+end Insert
+
end Finset
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -21,7 +21,7 @@ and
-/
-variable {α : Type _}
+variable {α : Type*}
namespace Finset
@@ -2,14 +2,11 @@
Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.finset.interval
-! leanprover-community/mathlib commit 98e83c3d541c77cdb7da20d79611a780ff8e7d90
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.LocallyFinite
+#align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
+
/-!
# Intervals of finsets as finsets
closes #3680, see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Stepping.20through.20simp_rw/near/326712986
@@ -77,7 +77,7 @@ variable {s t}
theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image ((· ∪ ·) s) := by
ext u
- simp_rw [mem_Icc, mem_image, exists_prop, mem_powerset]
+ simp_rw [mem_Icc, mem_image, mem_powerset]
constructor
· rintro ⟨hs, ht⟩
exact ⟨u \ s, sdiff_le_sdiff_right ht, sup_sdiff_cancel_right hs⟩
@@ -87,7 +87,7 @@ theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (
theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image ((· ∪ ·) s) := by
ext u
- simp_rw [mem_Ico, mem_image, exists_prop, mem_ssubsets]
+ simp_rw [mem_Ico, mem_image, mem_ssubsets]
constructor
· rintro ⟨hs, ht⟩
exact ⟨u \ s, sdiff_lt_sdiff_right ht hs, sup_sdiff_cancel_right hs⟩
The unported dependencies are