Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: small_iUnion and small_sUnion #10921

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Move back
  • Loading branch information
TwoFX committed Feb 25, 2024
commit 650e03f943828813770e9e76afe23f0b4a0bbfb9
17 changes: 16 additions & 1 deletion Mathlib/Logic/Small/Set.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,26 @@ import Mathlib.Data.Set.Lattice
import Mathlib.Logic.Small.Basic

/-!
# Additional results about `Small` on coerced sets
# Results about `Small` on coerced sets
-/

universe u v w

instance small_range {α : Type v} {β : Type w} (f : α → β) [Small.{u} α] :
Small.{u} (Set.range f) :=
small_of_surjective Set.surjective_onto_range
#align small_range small_range

instance small_image {α : Type v} {β : Type w} (f : α → β) (S : Set α) [Small.{u} S] :
Small.{u} (f '' S) :=
small_of_surjective Set.surjective_onto_image
#align small_image small_image

instance small_union {α : Type v} (s t : Set α) [Small.{u} s] [Small.{u} t] :
Small.{u} (s ∪ t : Set α) := by
rw [← Subtype.range_val (s := s), ← Subtype.range_val (s := t), ← Set.Sum.elim_range]
infer_instance

instance small_iUnion {α : Type v} {ι : Type w} [Small.{u} ι] (s : ι → Set α)
[∀ i, Small.{u} (s i)] : Small.{u} (⋃ i, s i) :=
small_of_surjective <| Set.sigmaToiUnion_surjective _
Expand Down
Loading