Skip to content

Commit

Permalink
feat(set_theory/zfc/basic): range of indexed family of sets (#18296)
Browse files Browse the repository at this point in the history
  • Loading branch information
vihdzp committed Feb 28, 2023
1 parent 4c586d2 commit 8f66c29
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/set_theory/zfc/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,26 @@ theorem image.mk :
(image f x).to_set = f '' x.to_set :=
by { ext, simp }

/-- The range of an indexed family of sets. The universes allow for a more general index type
without manual use of `ulift`. -/
noncomputable def range {α : Type u} (f : α → Set.{max u v}) : Set.{max u v} :=
⟦⟨ulift α, quotient.out ∘ f ∘ ulift.down⟩⟧

@[simp] theorem mem_range {α : Type u} {f : α → Set.{max u v}} {x : Set.{max u v}} :
x ∈ range f ↔ x ∈ set.range f :=
quotient.induction_on x (λ y, begin
split,
{ rintro ⟨z, hz⟩,
exact ⟨z.down, quotient.eq_mk_iff_out.2 hz.symm⟩ },
{ rintro ⟨z, hz⟩,
use z,
simpa [hz] using pSet.equiv.symm (quotient.mk_out y) }
end)

@[simp] theorem to_set_range {α : Type u} (f : α → Set.{max u v}) :
(range f).to_set = set.range f :=
by { ext, simp }

/-- Kuratowski ordered pair -/
def pair (x y : Set.{u}) : Set.{u} := {{x}, {x, y}}

Expand Down

0 comments on commit 8f66c29

Please sign in to comment.