combinatorics.set_family.compression.down
β·
Mathlib.Combinatorics.SetFamily.Compression.Down
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -189,7 +189,7 @@ scoped[FinsetFamily] notation "π " => Down.compression
original, or it's not in the original but it's the compression of something in the original. -/
theorem mem_compression : s β π a π β s β π β§ s.eraseβ a β π β¨ s β π β§ insert a s β π :=
by
- simp_rw [compression, mem_disj_union, mem_filter, mem_image, and_comm' (s β π)]
+ simp_rw [compression, mem_disj_union, mem_filter, mem_image, and_comm (s β π)]
refine'
or_congr_right
(and_congr_left fun hs =>
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -222,7 +222,7 @@ theorem erase_mem_compression_of_mem_compression : s β π a π β s.erase
theorem mem_compression_of_insert_mem_compression (h : insert a s β π a π) : s β π a π :=
by
by_cases ha : a β s
- Β· rwa [insert_eq_of_mem ha] at h
+ Β· rwa [insert_eq_of_mem ha] at h
Β· rw [β erase_insert ha]
exact erase_mem_compression_of_mem_compression h
#align down.mem_compression_of_insert_mem_compression Down.mem_compression_of_insert_mem_compression
@@ -250,7 +250,7 @@ theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).ca
card_image_of_inj_on ((erase_inj_on' _).mono fun s hs => _), β card_disjoint_union,
filter_union_filter_neg_eq]
Β· exact disjoint_filter_filter_neg _ _ _
- rw [mem_coe, mem_filter] at hs
+ rw [mem_coe, mem_filter] at hs
exact not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
#align down.card_compression Down.card_compression
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2022 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.Card
+import Data.Finset.Card
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"cc70d9141824ea8982d1562ce009952f2c3ece30"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2022 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 combinatorics.set_family.compression.down
-! leanprover-community/mathlib commit cc70d9141824ea8982d1562ce009952f2c3ece30
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.Card
+#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"cc70d9141824ea8982d1562ce009952f2c3ece30"
+
/-!
# Down-compressions
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -185,7 +185,6 @@ def compression (a : Ξ±) (π : Finset (Finset Ξ±)) : Finset (Finset Ξ±) :=
#align down.compression Down.compression
-/
--- mathport name: down.compression
scoped[FinsetFamily] notation "π " => Down.compression
#print Down.mem_compression /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -226,7 +226,7 @@ theorem erase_mem_compression_of_mem_compression : s β π a π β s.erase
theorem mem_compression_of_insert_mem_compression (h : insert a s β π a π) : s β π a π :=
by
by_cases ha : a β s
- Β· rwa [insert_eq_of_mem ha] at h
+ Β· rwa [insert_eq_of_mem ha] at h
Β· rw [β erase_insert ha]
exact erase_mem_compression_of_mem_compression h
#align down.mem_compression_of_insert_mem_compression Down.mem_compression_of_insert_mem_compression
@@ -254,7 +254,7 @@ theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).ca
card_image_of_inj_on ((erase_inj_on' _).mono fun s hs => _), β card_disjoint_union,
filter_union_filter_neg_eq]
Β· exact disjoint_filter_filter_neg _ _ _
- rw [mem_coe, mem_filter] at hs
+ rw [mem_coe, mem_filter] at hs
exact not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
#align down.card_compression Down.card_compression
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -142,39 +142,29 @@ theorem memberSubfamily_union_nonMemberSubfamily (a : Ξ±) (π : Finset (Finset
#print Finset.memberSubfamily_memberSubfamily /-
@[simp]
-theorem memberSubfamily_memberSubfamily : (π.memberSubfamily a).memberSubfamily a = β
:=
- by
- ext
+theorem memberSubfamily_memberSubfamily : (π.memberSubfamily a).memberSubfamily a = β
:= by ext;
simp
#align finset.member_subfamily_member_subfamily Finset.memberSubfamily_memberSubfamily
-/
#print Finset.memberSubfamily_nonMemberSubfamily /-
@[simp]
-theorem memberSubfamily_nonMemberSubfamily : (π.nonMemberSubfamily a).memberSubfamily a = β
:=
- by
- ext
- simp
+theorem memberSubfamily_nonMemberSubfamily : (π.nonMemberSubfamily a).memberSubfamily a = β
:= by
+ ext; simp
#align finset.member_subfamily_non_member_subfamily Finset.memberSubfamily_nonMemberSubfamily
-/
#print Finset.nonMemberSubfamily_memberSubfamily /-
@[simp]
theorem nonMemberSubfamily_memberSubfamily :
- (π.memberSubfamily a).nonMemberSubfamily a = π.memberSubfamily a :=
- by
- ext
- simp
+ (π.memberSubfamily a).nonMemberSubfamily a = π.memberSubfamily a := by ext; simp
#align finset.non_member_subfamily_member_subfamily Finset.nonMemberSubfamily_memberSubfamily
-/
#print Finset.nonMemberSubfamily_nonMemberSubfamily /-
@[simp]
theorem nonMemberSubfamily_nonMemberSubfamily :
- (π.nonMemberSubfamily a).nonMemberSubfamily a = π.nonMemberSubfamily a :=
- by
- ext
- simp
+ (π.nonMemberSubfamily a).nonMemberSubfamily a = π.nonMemberSubfamily a := by ext; simp
#align finset.non_member_subfamily_non_member_subfamily Finset.nonMemberSubfamily_nonMemberSubfamily
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -231,7 +231,6 @@ def compression (a : Ξ±) (π : Finset (Finset Ξ±)) : Finset (Finset Ξ±) :=
exact this (mem_filter.1 hβ).1
#align down.compression Down.compression
--- mathport name: down.compression
@[inherit_doc]
scoped[FinsetFamily] notation "π " => Down.compression
-- Porting note: had to open this
(s β© t).card = s.card + t.card - (s βͺ t).card
(#10224)
once coerced to an AddGroupWithOne
. Also unify Finset.card_disjoint_union
and Finset.card_union_eq
From LeanAPAP
@@ -283,7 +283,7 @@ theorem compression_idem (a : Ξ±) (π : Finset (Finset Ξ±)) : π a (π a
@[simp]
theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).card = π.card := by
rw [compression, card_disjUnion, filter_image,
- card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), β card_disjoint_union]
+ card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), β card_union_of_disjoint]
Β· conv_rhs => rw [β filter_union_filter_neg_eq (fun s => (erase s a β π)) π]
Β· exact disjoint_filter_filter_neg π π (fun s => (erase s a β π))
intro s hs
Finset
lemma names (#8894)
Change a few lemma names that have historically bothered me.
Finset.card_le_of_subset
β Finset.card_le_card
Multiset.card_le_of_le
β Multiset.card_le_card
Multiset.card_lt_of_lt
β Multiset.card_lt_card
Set.ncard_le_of_subset
β Set.ncard_le_ncard
Finset.image_filter
β Finset.filter_image
CompleteLattice.finset_sup_compact_of_compact
β CompleteLattice.isCompactElement_finset_sup
@@ -282,7 +282,7 @@ theorem compression_idem (a : Ξ±) (π : Finset (Finset Ξ±)) : π a (π a
/-- Down-compressing a family doesn't change its size. -/
@[simp]
theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).card = π.card := by
- rw [compression, card_disjUnion, image_filter,
+ rw [compression, card_disjUnion, filter_image,
card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), β card_disjoint_union]
Β· conv_rhs => rw [β filter_union_filter_neg_eq (fun s => (erase s a β π)) π]
Β· exact disjoint_filter_filter_neg π π (fun s => (erase s a β π))
@@ -142,7 +142,7 @@ lemma memberSubfamily_image_insert (hπ : β s β π, a β s) :
simp only [mem_memberSubfamily, mem_image]
refine β¨?_, fun hs β¦ β¨β¨s, hs, rflβ©, hπ _ hsβ©β©
rintro β¨β¨t, ht, htsβ©, hsβ©
- rwa [βinsert_erase_invOn.2.injOn (hπ _ ht) hs hts]
+ rwa [β insert_erase_invOn.2.injOn (hπ _ ht) hs hts]
@[simp] lemma nonMemberSubfamily_image_insert : (π.image <| insert a).nonMemberSubfamily a = β
:= by
simp [eq_empty_iff_forall_not_mem]
@@ -182,7 +182,7 @@ lemma memberFamily_induction_on {p : Finset (Finset Ξ±) β Prop}
clear_value u
induction' u using Finset.induction with a u _ ih generalizing π
Β· simp_rw [subset_empty] at hu
- rw [βsubset_singleton_iff', subset_singleton_iff] at hu
+ rw [β subset_singleton_iff', subset_singleton_iff] at hu
obtain rfl | rfl := hu <;> assumption
refine subfamily a (ih _ ?_) (ih _ ?_)
Β· simp only [mem_nonMemberSubfamily, and_imp]
@@ -211,7 +211,7 @@ protected lemma family_induction_on {p : Finset (Finset Ξ±) β Prop}
(subfamily : β (a : Ξ±) β¦π : Finset (Finset Ξ±)β¦,
p (π.filter (a β Β·)) β p (π.filter (a β Β·)) β p π) : p π := by
refine memberFamily_induction_on π empty singleton_empty fun a π hπβ hπβ β¦ subfamily a hπβ ?_
- rw [βimage_insert_memberSubfamily]
+ rw [β image_insert_memberSubfamily]
exact image_insert _ (by simp) hπβ
end Finset
Provide an induction principle for finset families: One can increase the support of a finset family one by one.
@@ -3,7 +3,7 @@ Copyright (c) 2022 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.Card
+import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
@@ -136,6 +136,84 @@ theorem nonMemberSubfamily_nonMemberSubfamily :
simp
#align finset.non_member_subfamily_non_member_subfamily Finset.nonMemberSubfamily_nonMemberSubfamily
+lemma memberSubfamily_image_insert (hπ : β s β π, a β s) :
+ (π.image <| insert a).memberSubfamily a = π := by
+ ext s
+ simp only [mem_memberSubfamily, mem_image]
+ refine β¨?_, fun hs β¦ β¨β¨s, hs, rflβ©, hπ _ hsβ©β©
+ rintro β¨β¨t, ht, htsβ©, hsβ©
+ rwa [βinsert_erase_invOn.2.injOn (hπ _ ht) hs hts]
+
+@[simp] lemma nonMemberSubfamily_image_insert : (π.image <| insert a).nonMemberSubfamily a = β
:= by
+ simp [eq_empty_iff_forall_not_mem]
+
+@[simp] lemma memberSubfamily_image_erase : (π.image (erase Β· a)).memberSubfamily a = β
:= by
+ simp [eq_empty_iff_forall_not_mem,
+ (ne_of_mem_of_not_mem' (mem_insert_self _ _) (not_mem_erase _ _)).symm]
+
+lemma image_insert_memberSubfamily (π : Finset (Finset Ξ±)) (a : Ξ±) :
+ (π.memberSubfamily a).image (insert a) = π.filter (a β Β·) := by
+ ext s
+ simp only [mem_memberSubfamily, mem_image, mem_filter]
+ refine β¨?_, fun β¨hs, haβ© β¦ β¨erase s a, β¨?_, not_mem_erase _ _β©, insert_erase haβ©β©
+ Β· rintro β¨s, β¨hs, -β©, rflβ©
+ exact β¨hs, mem_insert_self _ _β©
+ Β· rwa [insert_erase ha]
+
+/-- Induction principle for finset families. To prove a statement for every finset family,
+it suffices to prove it for
+* the empty finset family.
+* the finset family which only contains the empty finset.
+* `β¬ βͺ {s βͺ {a} | s β π}` assuming the property for `β¬` and `π`, where `a` is an element of the
+ ground type and `π` and `β¬` are families of finsets not containing `a`.
+ Note that instead of giving `β¬` and `π`, the `subfamily` case gives you
+ `π = β¬ βͺ {s βͺ {a} | s β π}`, so that `β¬ = π.nonMemberSubfamily` and `π = π.memberSubfamily`.
+
+This is a way of formalising induction on `n` where `π` is a finset family on `n` elements.
+
+See also `Finset.family_induction_on.`-/
+@[elab_as_elim]
+lemma memberFamily_induction_on {p : Finset (Finset Ξ±) β Prop}
+ (π : Finset (Finset Ξ±)) (empty : p β
) (singleton_empty : p {β
})
+ (subfamily : β (a : Ξ±) β¦π : Finset (Finset Ξ±)β¦,
+ p (π.nonMemberSubfamily a) β p (π.memberSubfamily a) β p π) : p π := by
+ set u := π.sup id
+ have hu : β s β π, s β u := fun s β¦ le_sup (f := id)
+ clear_value u
+ induction' u using Finset.induction with a u _ ih generalizing π
+ Β· simp_rw [subset_empty] at hu
+ rw [βsubset_singleton_iff', subset_singleton_iff] at hu
+ obtain rfl | rfl := hu <;> assumption
+ refine subfamily a (ih _ ?_) (ih _ ?_)
+ Β· simp only [mem_nonMemberSubfamily, and_imp]
+ exact fun s hs has β¦ (subset_insert_iff_of_not_mem has).1 <| hu _ hs
+ Β· simp only [mem_memberSubfamily, and_imp]
+ exact fun s hs ha β¦ (insert_subset_insert_iff ha).1 <| hu _ hs
+
+/-- Induction principle for finset families. To prove a statement for every finset family,
+it suffices to prove it for
+* the empty finset family.
+* the finset family which only contains the empty finset.
+* `{s βͺ {a} | s β π}` assuming the property for `π` a family of finsets not containing `a`.
+* `β¬ βͺ π` assuming the property for `β¬` and `π`, where `a` is an element of the ground type and
+ `β¬`is a family of finsets not containing `a` and `π` a family of finsets containing `a`.
+ Note that instead of giving `β¬` and `π`, the `subfamily` case gives you `π = β¬ βͺ π`, so that
+ `β¬ = π.filter (a β Β·)` and `π = π.filter (a β Β·)`.
+
+This is a way of formalising induction on `n` where `π` is a finset family on `n` elements.
+
+See also `Finset.memberFamily_induction_on.`-/
+@[elab_as_elim]
+protected lemma family_induction_on {p : Finset (Finset Ξ±) β Prop}
+ (π : Finset (Finset Ξ±)) (empty : p β
) (singleton_empty : p {β
})
+ (image_insert : β (a : Ξ±) β¦π : Finset (Finset Ξ±)β¦,
+ (β s β π, a β s) β p π β p (π.image <| insert a))
+ (subfamily : β (a : Ξ±) β¦π : Finset (Finset Ξ±)β¦,
+ p (π.filter (a β Β·)) β p (π.filter (a β Β·)) β p π) : p π := by
+ refine memberFamily_induction_on π empty singleton_empty fun a π hπβ hπβ β¦ subfamily a hπβ ?_
+ rw [βimage_insert_memberSubfamily]
+ exact image_insert _ (by simp) hπβ
+
end Finset
open Finset
@@ -209,7 +209,7 @@ theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).ca
Β· conv_rhs => rw [β filter_union_filter_neg_eq (fun s => (erase s a β π)) π]
Β· exact disjoint_filter_filter_neg π π (fun s => (erase s a β π))
intro s hs
- rw [mem_coe, mem_filter, Function.comp_apply] at hs
+ rw [mem_coe, mem_filter] at hs
exact not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
#align down.card_compression Down.card_compression
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -37,7 +37,7 @@ compression, down-compression
-/
-variable {Ξ± : Type _} [DecidableEq Ξ±] {π β¬ : Finset (Finset Ξ±)} {s : Finset Ξ±} {a : Ξ±}
+variable {Ξ± : Type*} [DecidableEq Ξ±] {π β¬ : Finset (Finset Ξ±)} {s : Finset Ξ±} {a : Ξ±}
namespace Finset
@@ -2,14 +2,11 @@
Copyright (c) 2022 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 combinatorics.set_family.compression.down
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.Card
+#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
+
/-!
# Down-compressions
This makes a mathlib4 version of mathlib3's tactic.basic
, now called Mathlib.Tactic.Common
, which imports all tactics which do not have significant theory requirements, and then is imported all across the base of the hierarchy.
This ensures that all common tactics are available nearly everywhere in the library, rather than having to be imported one-by-one as you need them.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -9,7 +9,6 @@ Authors: YaΓ«l Dillies
! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.Card
-import Mathlib.Tactic.ScopedNS
/-!
# Down-compressions
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -62,8 +62,7 @@ theorem mem_nonMemberSubfamily : s β π.nonMemberSubfamily a β s β π
#align finset.mem_non_member_subfamily Finset.mem_nonMemberSubfamily
@[simp]
-theorem mem_memberSubfamily : s β π.memberSubfamily a β insert a s β π β§ a β s :=
- by
+theorem mem_memberSubfamily : s β π.memberSubfamily a β insert a s β π β§ a β s := by
simp_rw [memberSubfamily, mem_image, mem_filter]
refine' β¨_, fun h => β¨insert a s, β¨h.1, by simpβ©, erase_insert h.2β©β©
rintro β¨s, β¨hs1, hs2β©, rflβ©
@@ -77,8 +76,7 @@ theorem nonMemberSubfamily_inter (a : Ξ±) (π β¬ : Finset (Finset Ξ±)) :
#align finset.non_member_subfamily_inter Finset.nonMemberSubfamily_inter
theorem memberSubfamily_inter (a : Ξ±) (π β¬ : Finset (Finset Ξ±)) :
- (π β© β¬).memberSubfamily a = π.memberSubfamily a β© β¬.memberSubfamily a :=
- by
+ (π β© β¬).memberSubfamily a = π.memberSubfamily a β© β¬.memberSubfamily a := by
unfold memberSubfamily
rw [filter_inter_distrib, image_inter_of_injOn _ _ ((erase_injOn' _).mono _)]
simp
@@ -95,8 +93,7 @@ theorem memberSubfamily_union (a : Ξ±) (π β¬ : Finset (Finset Ξ±)) :
#align finset.member_subfamily_union Finset.memberSubfamily_union
theorem card_memberSubfamily_add_card_nonMemberSubfamily (a : Ξ±) (π : Finset (Finset Ξ±)) :
- (π.memberSubfamily a).card + (π.nonMemberSubfamily a).card = π.card :=
- by
+ (π.memberSubfamily a).card + (π.nonMemberSubfamily a).card = π.card := by
rw [memberSubfamily, nonMemberSubfamily, card_image_of_injOn]
Β· conv_rhs => rw [β filter_card_add_filter_neg_card_eq_card (fun s => (a β s))]
Β· apply (erase_injOn' _).mono
@@ -104,8 +101,7 @@ theorem card_memberSubfamily_add_card_nonMemberSubfamily (a : Ξ±) (π : Finset
#align finset.card_member_subfamily_add_card_non_member_subfamily Finset.card_memberSubfamily_add_card_nonMemberSubfamily
theorem memberSubfamily_union_nonMemberSubfamily (a : Ξ±) (π : Finset (Finset Ξ±)) :
- π.memberSubfamily a βͺ π.nonMemberSubfamily a = π.image fun s => s.erase a :=
- by
+ π.memberSubfamily a βͺ π.nonMemberSubfamily a = π.image fun s => s.erase a := by
ext s
simp only [mem_union, mem_memberSubfamily, mem_nonMemberSubfamily, mem_image, exists_prop]
constructor
@@ -119,31 +115,27 @@ theorem memberSubfamily_union_nonMemberSubfamily (a : Ξ±) (π : Finset (Finset
#align finset.member_subfamily_union_non_member_subfamily Finset.memberSubfamily_union_nonMemberSubfamily
@[simp]
-theorem memberSubfamily_memberSubfamily : (π.memberSubfamily a).memberSubfamily a = β
:=
- by
+theorem memberSubfamily_memberSubfamily : (π.memberSubfamily a).memberSubfamily a = β
:= by
ext
simp
#align finset.member_subfamily_member_subfamily Finset.memberSubfamily_memberSubfamily
@[simp]
-theorem memberSubfamily_nonMemberSubfamily : (π.nonMemberSubfamily a).memberSubfamily a = β
:=
- by
+theorem memberSubfamily_nonMemberSubfamily : (π.nonMemberSubfamily a).memberSubfamily a = β
:= by
ext
simp
#align finset.member_subfamily_non_member_subfamily Finset.memberSubfamily_nonMemberSubfamily
@[simp]
theorem nonMemberSubfamily_memberSubfamily :
- (π.memberSubfamily a).nonMemberSubfamily a = π.memberSubfamily a :=
- by
+ (π.memberSubfamily a).nonMemberSubfamily a = π.memberSubfamily a := by
ext
simp
#align finset.non_member_subfamily_member_subfamily Finset.nonMemberSubfamily_memberSubfamily
@[simp]
theorem nonMemberSubfamily_nonMemberSubfamily :
- (π.nonMemberSubfamily a).nonMemberSubfamily a = π.nonMemberSubfamily a :=
- by
+ (π.nonMemberSubfamily a).nonMemberSubfamily a = π.nonMemberSubfamily a := by
ext
simp
#align finset.non_member_subfamily_non_member_subfamily Finset.nonMemberSubfamily_nonMemberSubfamily
@@ -173,8 +165,7 @@ open FinsetFamily
/-- `a` is in the down-compressed family iff it's in the original and its compression is in the
original, or it's not in the original but it's the compression of something in the original. -/
-theorem mem_compression : s β π a π β s β π β§ s.erase a β π β¨ s β π β§ insert a s β π :=
- by
+theorem mem_compression : s β π a π β s β π β§ s.erase a β π β¨ s β π β§ insert a s β π := by
simp_rw [compression, mem_disjUnion, mem_filter, mem_image, and_comm (a := (Β¬ s β π))]
refine'
or_congr_right
@@ -184,23 +175,20 @@ theorem mem_compression : s β π a π β s β π β§ s.erase a β
rwa [insert_erase (erase_ne_self.1 (ne_of_mem_of_not_mem ht hs).symm)]
#align down.mem_compression Down.mem_compression
-theorem erase_mem_compression (hs : s β π) : s.erase a β π a π :=
- by
+theorem erase_mem_compression (hs : s β π) : s.erase a β π a π := by
simp_rw [mem_compression, erase_idem, and_self_iff]
refine' (em _).imp_right fun h => β¨h, _β©
rwa [insert_erase (erase_ne_self.1 (ne_of_mem_of_not_mem hs h).symm)]
#align down.erase_mem_compression Down.erase_mem_compression
-- This is a special case of `erase_mem_compression` once we have `compression_idem`.
-theorem erase_mem_compression_of_mem_compression : s β π a π β s.erase a β π a π :=
- by
+theorem erase_mem_compression_of_mem_compression : s β π a π β s.erase a β π a π := by
simp_rw [mem_compression, erase_idem]
refine' Or.imp (fun h => β¨h.2, h.2β©) fun h => _
rwa [erase_eq_of_not_mem (insert_ne_self.1 <| ne_of_mem_of_not_mem h.2 h.1)]
#align down.erase_mem_compression_of_mem_compression Down.erase_mem_compression_of_mem_compression
-theorem mem_compression_of_insert_mem_compression (h : insert a s β π a π) : s β π a π :=
- by
+theorem mem_compression_of_insert_mem_compression (h : insert a s β π a π) : s β π a π := by
by_cases ha : a β s
Β· rwa [insert_eq_of_mem ha] at h
Β· rw [β erase_insert ha]
@@ -209,8 +197,7 @@ theorem mem_compression_of_insert_mem_compression (h : insert a s β π a
/-- Down-compressing a family is idempotent. -/
@[simp]
-theorem compression_idem (a : Ξ±) (π : Finset (Finset Ξ±)) : π a (π a π) = π a π :=
- by
+theorem compression_idem (a : Ξ±) (π : Finset (Finset Ξ±)) : π a (π a π) = π a π := by
ext s
refine' mem_compression.trans β¨_, fun h => Or.inl β¨h, erase_mem_compression_of_mem_compression hβ©β©
rintro (h | h)
@@ -220,8 +207,7 @@ theorem compression_idem (a : Ξ±) (π : Finset (Finset Ξ±)) : π a (π a
/-- Down-compressing a family doesn't change its size. -/
@[simp]
-theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).card = π.card :=
- by
+theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).card = π.card := by
rw [compression, card_disjUnion, image_filter,
card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), β card_disjoint_union]
Β· conv_rhs => rw [β filter_union_filter_neg_eq (fun s => (erase s a β π)) π]
closes #3680, see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Stepping.20through.20simp_rw/near/326712986
@@ -175,8 +175,7 @@ open FinsetFamily
original, or it's not in the original but it's the compression of something in the original. -/
theorem mem_compression : s β π a π β s β π β§ s.erase a β π β¨ s β π β§ insert a s β π :=
by
- simp_rw [compression, mem_disjUnion, mem_filter, mem_image,
- decide_eq_true_eq, and_comm (a := (Β¬ s β π))]
+ simp_rw [compression, mem_disjUnion, mem_filter, mem_image, and_comm (a := (Β¬ s β π))]
refine'
or_congr_right
(and_congr_left fun hs =>
congr!
and convert
(#2606)
congr!
, convert
, and convert_to
to control parts of the congruence algorithm, in particular transparency settings when applying congruence lemmas.congr!
now applies congruence lemmas with reducible transparency by default. This prevents it from unfolding definitions when applying congruence lemmas. It also now tries both the LHS-biased and RHS-biased simp congruence lemmas, with a configuration option to set which it should try first.HEq
congruence lemma generator that gives each hypothesis access to the proofs of previous hypotheses. This means that if you have an equality β’ β¨a, xβ© = β¨b, yβ©
of sigma types, congr!
turns this into goals β’ a = b
and β’ a = b β HEq x y
(note that congr!
will also auto-introduce a = b
for you in the second goal). This congruence lemma generator applies to more cases than the simp congruence lemma generator does.congr!
(and hence convert
) are more careful about applying lemmas that don't force definitions to unfold. There were a number of cases in mathlib where the implementation of congr
was being abused to unfold definitions.set_option trace.congr! true
you can see what congr!
sees when it is deciding on congruence lemmas.convert_to
to do using 1
when there is no using
clause, to match its documentation.Note that congr!
is more capable than congr
at finding a way to equate left-hand sides and right-hand sides, so you will frequently need to limit its depth with a using
clause. However, there is also a new heuristic to prevent considering unlikely-to-be-provable type equalities (controlled by the typeEqs
option), which can help limit the depth automatically.
There is also a predefined configuration that you can invoke with, for example, convert (config := .unfoldSameFun) h
, that causes it to behave more like congr
, including using default transparency when unfolding.
@@ -226,10 +226,10 @@ theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).ca
rw [compression, card_disjUnion, image_filter,
card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), β card_disjoint_union]
Β· conv_rhs => rw [β filter_union_filter_neg_eq (fun s => (erase s a β π)) π]
- Β· convert disjoint_filter_filter_neg π π (fun s => (erase s a β π))
+ Β· exact disjoint_filter_filter_neg π π (fun s => (erase s a β π))
intro s hs
rw [mem_coe, mem_filter, Function.comp_apply] at hs
- convert not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
+ exact not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
#align down.card_compression Down.card_compression
end Down
@@ -101,9 +101,7 @@ theorem card_memberSubfamily_add_card_nonMemberSubfamily (a : Ξ±) (π : Finset
Β· conv_rhs => rw [β filter_card_add_filter_neg_card_eq_card (fun s => (a β s))]
Β· apply (erase_injOn' _).mono
simp
-#align
- finset.card_member_subfamily_add_card_non_member_subfamily
- Finset.card_memberSubfamily_add_card_nonMemberSubfamily
+#align finset.card_member_subfamily_add_card_non_member_subfamily Finset.card_memberSubfamily_add_card_nonMemberSubfamily
theorem memberSubfamily_union_nonMemberSubfamily (a : Ξ±) (π : Finset (Finset Ξ±)) :
π.memberSubfamily a βͺ π.nonMemberSubfamily a = π.image fun s => s.erase a :=
@@ -118,9 +116,7 @@ theorem memberSubfamily_union_nonMemberSubfamily (a : Ξ±) (π : Finset (Finset
by_cases ha : a β s
Β· exact Or.inl β¨by rwa [insert_erase ha], not_mem_erase _ _β©
Β· exact Or.inr β¨by rwa [erase_eq_of_not_mem ha], not_mem_erase _ _β©
-#align
- finset.member_subfamily_union_non_member_subfamily
- Finset.memberSubfamily_union_nonMemberSubfamily
+#align finset.member_subfamily_union_non_member_subfamily Finset.memberSubfamily_union_nonMemberSubfamily
@[simp]
theorem memberSubfamily_memberSubfamily : (π.memberSubfamily a).memberSubfamily a = β
:=
@@ -150,8 +146,7 @@ theorem nonMemberSubfamily_nonMemberSubfamily :
by
ext
simp
-#align
- finset.non_member_subfamily_non_member_subfamily Finset.nonMemberSubfamily_nonMemberSubfamily
+#align finset.non_member_subfamily_non_member_subfamily Finset.nonMemberSubfamily_nonMemberSubfamily
end Finset
@@ -67,7 +67,6 @@ theorem mem_memberSubfamily : s β π.memberSubfamily a β insert a s β
simp_rw [memberSubfamily, mem_image, mem_filter]
refine' β¨_, fun h => β¨insert a s, β¨h.1, by simpβ©, erase_insert h.2β©β©
rintro β¨s, β¨hs1, hs2β©, rflβ©
- rw [decide_eq_true_eq] at hs2
rw [insert_erase hs2]
exact β¨hs1, not_mem_erase _ _β©
#align finset.mem_member_subfamily Finset.mem_memberSubfamily
@@ -100,7 +99,6 @@ theorem card_memberSubfamily_add_card_nonMemberSubfamily (a : Ξ±) (π : Finset
by
rw [memberSubfamily, nonMemberSubfamily, card_image_of_injOn]
Β· conv_rhs => rw [β filter_card_add_filter_neg_card_eq_card (fun s => (a β s))]
- simp
Β· apply (erase_injOn' _).mono
simp
#align
@@ -169,7 +167,6 @@ def compression (a : Ξ±) (π : Finset (Finset Ξ±)) : Finset (Finset Ξ±) :=
((π.image fun s => erase s a).filter fun s => s β π) <|
disjoint_left.2 fun s hβ hβ => by
have := (mem_filter.1 hβ).2
- rw [decide_eq_true_iff] at this
exact this (mem_filter.1 hβ).1
#align down.compression Down.compression
@@ -234,14 +231,9 @@ theorem card_compression (a : Ξ±) (π : Finset (Finset Ξ±)) : (π a π).ca
rw [compression, card_disjUnion, image_filter,
card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), β card_disjoint_union]
Β· conv_rhs => rw [β filter_union_filter_neg_eq (fun s => (erase s a β π)) π]
- congr
- ext
- simp
Β· convert disjoint_filter_filter_neg π π (fun s => (erase s a β π))
- ext
- simp
intro s hs
- rw [mem_coe, mem_filter, Function.comp_apply, decide_eq_true_iff] at hs
+ rw [mem_coe, mem_filter, Function.comp_apply] at hs
convert not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm
#align down.card_compression Down.card_compression
The unported dependencies are