|
| 1 | +/- |
| 2 | +Copyright (c) 2024 Markus Himmel. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Markus Himmel |
| 5 | +-/ |
| 6 | +import Mathlib.Data.Set.Lattice |
| 7 | +import Mathlib.Logic.Small.Basic |
| 8 | + |
| 9 | +/-! |
| 10 | +# Results about `Small` on coerced sets |
| 11 | +-/ |
| 12 | + |
| 13 | +universe u v w |
| 14 | + |
| 15 | +theorem small_subset {α : Type v} {s t : Set α} (hts : t ⊆ s) [Small.{u} s] : Small.{u} t := |
| 16 | + let f : t → s := fun x => ⟨x, hts x.prop⟩ |
| 17 | + @small_of_injective _ _ _ f fun _ _ hxy => Subtype.ext (Subtype.mk.inj hxy) |
| 18 | +#align small_subset small_subset |
| 19 | + |
| 20 | +instance small_range {α : Type v} {β : Type w} (f : α → β) [Small.{u} α] : |
| 21 | + Small.{u} (Set.range f) := |
| 22 | + small_of_surjective Set.surjective_onto_range |
| 23 | +#align small_range small_range |
| 24 | + |
| 25 | +instance small_image {α : Type v} {β : Type w} (f : α → β) (S : Set α) [Small.{u} S] : |
| 26 | + Small.{u} (f '' S) := |
| 27 | + small_of_surjective Set.surjective_onto_image |
| 28 | +#align small_image small_image |
| 29 | + |
| 30 | +instance small_union {α : Type v} (s t : Set α) [Small.{u} s] [Small.{u} t] : |
| 31 | + Small.{u} (s ∪ t : Set α) := by |
| 32 | + rw [← Subtype.range_val (s := s), ← Subtype.range_val (s := t), ← Set.Sum.elim_range] |
| 33 | + infer_instance |
| 34 | + |
| 35 | +instance small_iUnion {α : Type v} {ι : Type w} [Small.{u} ι] (s : ι → Set α) |
| 36 | + [∀ i, Small.{u} (s i)] : Small.{u} (⋃ i, s i) := |
| 37 | + small_of_surjective <| Set.sigmaToiUnion_surjective _ |
| 38 | + |
| 39 | +instance small_sUnion {α : Type v} (s : Set (Set α)) [Small.{u} s] [∀ t : s, Small.{u} t] : |
| 40 | + Small.{u} (⋃₀ s) := |
| 41 | + Set.sUnion_eq_iUnion ▸ small_iUnion _ |
0 commit comments