Skip to content

Commit b49331a

Browse files
committed
refactor(Data/Finset): reverse Finset.Image <-> Finset.SymmDiff import (#23398)
I noticed while looking at the [long pole](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/The.20long.20pole.20in.20mathlib/near/508704797) that `Finset.SymmDiff` is not required anywhere on the pole, so if we reverse the import direction between it and `Finset.Image` we can make the import graph a little bit less tall.
1 parent 718d4fe commit b49331a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Mathlib/Data/Finset/Image.lean

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Mathlib.Data.Finset.Disjoint
99
import Mathlib.Data.Finset.Erase
1010
import Mathlib.Data.Finset.Filter
1111
import Mathlib.Data.Finset.Range
12-
import Mathlib.Data.Finset.SymmDiff
12+
import Mathlib.Data.Finset.SDiff
1313

1414
/-! # Image and map operations on finite sets
1515
@@ -454,11 +454,6 @@ lemma image_sdiff_of_injOn [DecidableEq α] {t : Finset α} (hf : Set.InjOn f s)
454454
(s \ t).image f = s.image f \ t.image f :=
455455
mod_cast Set.image_diff_of_injOn hf <| coe_subset.2 hts
456456

457-
open scoped symmDiff in
458-
theorem image_symmDiff [DecidableEq α] {f : α → β} (s t : Finset α) (hf : Injective f) :
459-
(s ∆ t).image f = s.image f ∆ t.image f :=
460-
mod_cast Set.image_symmDiff hf s t
461-
462457
theorem _root_.Disjoint.of_image_finset {s t : Finset α} {f : α → β}
463458
(h : Disjoint (s.image f) (t.image f)) : Disjoint s t :=
464459
disjoint_iff_ne.2 fun _ ha _ hb =>

Mathlib/Data/Finset/SymmDiff.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2015 Microsoft Corporation. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro
55
-/
6-
import Mathlib.Data.Finset.SDiff
6+
import Mathlib.Data.Finset.Image
77
import Mathlib.Data.Set.SymmDiff
88

99
/-!
@@ -48,6 +48,10 @@ theorem coe_symmDiff : (↑(s ∆ t) : Set α) = (s : Set α) ∆ t :=
4848
@[simp] lemma symmDiff_nonempty : (s ∆ t).Nonempty ↔ s ≠ t :=
4949
nonempty_iff_ne_empty.trans symmDiff_eq_empty.not
5050

51+
theorem image_symmDiff [DecidableEq β] {f : α → β} (s t : Finset α) (hf : Injective f) :
52+
(s ∆ t).image f = s.image f ∆ t.image f :=
53+
mod_cast Set.image_symmDiff hf s t
54+
5155
end SymmDiff
5256

5357
end Finset

Mathlib/Data/Fintype/Sets.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Mario Carneiro
55
-/
66
import Mathlib.Data.Finset.BooleanAlgebra
7+
import Mathlib.Data.Finset.SymmDiff
78
import Mathlib.Data.Fintype.OfMap
89

910
/-!

0 commit comments

Comments
 (0)