Images and preimages of sets #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Main definitions #
-
preimage f t : set α: the preimage f⁻¹(t) (writtenf ⁻¹' tin Lean) of a subset of β. -
range f : set β: the image ofunivunderf. Also works for{p : Prop} (f : p → α)(unlikeimage)
Notation #
-
f ⁻¹' tforset.preimage f t -
f '' sforset.image f s
Tags #
set, sets, image, preimage, pre-image, range
Inverse image #
The preimage of s : set β by f : α → β, written f ⁻¹' s,
is the set of x : α such that f x ∈ s.
Instances for set.preimage
Image of a set under a function #
The image of s : set α by f : α → β, written f '' s,
is the set of y : β such that f x = y for some x ∈ s.
Instances for set.image
Instances for ↥set.image
set.image is monotone. See set.image_subset for the statement in terms of ⊆.
Lemmas about the powerset and image. #
The powerset of {a} ∪ s is 𝒫 s together with {a} ∪ t for each t ∈ 𝒫 s.
Lemmas about range of a function. #
Range of a function.
This function is more flexible than f '' univ, as the image requires that the domain is in Type
and not an arbitrary Sort.
Instances for set.range
Alias of the reverse direction of set.range_iff_surjective.
The range of a function from a unique type contains just the
function applied to its single value.
We can use the axiom of choice to pick a preimage for every element of range f.
Equations
- set.range_splitting f = λ (x : ↥(set.range f)), Exists.some _
The image of a subsingleton is a subsingleton.
The preimage of a subsingleton under an injective map is a subsingleton.
If the image of a set under an injective map is a subsingleton, the set is a subsingleton.
If the preimage of a set under an surjective map is a subsingleton, the set is a subsingleton.
The preimage of a nontrivial set under a surjective map is nontrivial.
The image of a nontrivial set under an injective map is nontrivial.
If the image of a set is nontrivial, the set is nontrivial.
If the preimage of a set under an injective map is nontrivial, the set is nontrivial.
Image and preimage on subtypes #
A variant of range_coe. Try to use range_coe if possible.
This version is useful when defining a new type that is defined as the subtype of something.
In that case, the coercion doesn't fire anymore.