Functions over sets #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Main definitions #
Predicate #
set.eq_on f₁ f₂ s: functionsf₁andf₂are equal at every point ofs;set.maps_to f s t:fsends every point ofsto a point oft;set.inj_on f s: restriction offtosis injective;set.surj_on f s t: every point inshas a preimage ins;set.bij_on f s t:fis a bijection betweensandt;set.left_inv_on f' f s: for everyx ∈ swe havef' (f x) = x;set.right_inv_on f' f t: for everyy ∈ twe havef (f' y) = y;set.inv_on f' f s t:f'is a two-side inverse offonsandt, i.e. we haveset.left_inv_on f' f sandset.right_inv_on f' f t.
Functions #
set.restrict f s: restrict the domain offto the sets;set.cod_restrict f s h: givenh : ∀ x, f x ∈ s, restrict the codomain offto the sets;set.maps_to.restrict f s t h: givenh : maps_to f s t, restrict the domain offtosand the codomain tot.
Restrict #
Restrict codomain of a function f to a set s. Same as subtype.coind but this version
has codomain ↥s instead of subtype s.
Equations
- set.cod_restrict f s h = λ (x : ι), ⟨f x, _⟩
Alias of the reverse direction of set.injective_cod_restrict.
Equality on a set #
Alias of the forward direction of set.eq_on_range.
Congruence lemmas #
Mono lemmas #
maps to #
maps_to f a b means that the image of a is contained in b.
Equations
- set.maps_to f s t = ∀ ⦃x : α⦄, x ∈ s → f x ∈ t
Given a map f sending s : set α into t : set β, restrict domain of f to s
and the codomain to t. Same as subtype.map.
Equations
- set.maps_to.restrict f s t h = subtype.map f h
Restricting the domain and then the codomain is the same as maps_to.restrict.
Reverse of set.cod_restrict_restrict.
Restriction onto preimage #
The restriction of a function onto the preimage of a set.
Equations
- t.restrict_preimage f = set.maps_to.restrict f (f ⁻¹' t) t _
Alias of set.restrict_preimage_injective.
Alias of set.restrict_preimage_surjective.
Alias of set.restrict_preimage_bijective.
Injectivity on a set #
f is injective on a if the restriction of f to a is injective.
Alias of the reverse direction of set.inj_on.ne_iff.
Alias of set.inj_on_of_injective.
Alias of the forward direction of set.inj_on_iff_injective.
Surjectivity on a set #
f is surjective from a to b if b is contained in the image of a.
Equations
- set.surj_on f s t = (t ⊆ f '' s)
Bijectivity #
f is bijective from s to t if f is injective on s and f '' s = t.
Equations
- set.bij_on f s t = (set.maps_to f s t ∧ set.inj_on f s ∧ set.surj_on f s t)
Alias of the forward direction of set.bijective_iff_bij_on_univ.
left inverse #
g is a left inverse to f on a means that g (f x) = x for all x ∈ a.
Equations
- set.left_inv_on f' f s = ∀ ⦃x : α⦄, x ∈ s → f' (f x) = x
Right inverse #
g is a right inverse to f on b if f (g x) = x for all x ∈ b.
Equations
- set.right_inv_on f' f t = set.left_inv_on f f' t
Two-side inverses #
g is an inverse to f viewed as a map from a to b
Equations
- set.inv_on g f s t = (set.left_inv_on g f s ∧ set.right_inv_on g f t)
If functions f' and f are inverse on s and t, f maps s into t, and f' maps t
into s, then f is a bijection between s and t. The maps_to arguments can be deduced from
surj_on statements using left_inv_on.maps_to and right_inv_on.maps_to.
inv_fun_on is a left/right inverse #
Construct the inverse for a function f on domain s. This function is a right inverse of f
on f '' s. For a computable version, see function.injective.inv_of_mem_range.
Monotone #
Piecewise defined function #
Equations
Alias of the forward direction of strict_mono_restrict.
Alias of the reverse direction of strict_mono_restrict.
Non-dependent version of function.update_comp_eq_of_not_mem_range'
Equivalences, permutations #
Alias of the reverse direction of equiv.bij_on_symm.
Alias of the forward direction of equiv.bij_on_symm.