Restrict the domain of a function to a set #
Main definitions #
Set.restrict f s: restrict the domain offto the sets;Set.codRestrict f s h: givenh : ∀ x, f x ∈ s, restrict the codomain offto the sets;
Restrict #
Restrict domain of a function f to a set s. Same as Subtype.restrict but this version
takes an argument ↥s instead of Subtype s.
Instances For
theorem
Set.restrict_def
{α : Type u_1}
{π : α → Type u_6}
(s : Set α)
:
s.restrict = fun (f : (a : α) → π a) (x : ↑s) => f ↑x
theorem
Set.restrict_eq
{α : Type u_1}
{β : Type u_2}
(f : α → β)
(s : Set α)
:
s.restrict f = f ∘ Subtype.val
@[simp]
@[simp]
theorem
Set.restrict_apply
{α : Type u_1}
{π : α → Type u_6}
(f : (a : α) → π a)
(s : Set α)
(x : ↑s)
:
s.restrict f x = f ↑x
theorem
Set.restrict_eq_iff
{α : Type u_1}
{π : α → Type u_6}
{f : (a : α) → π a}
{s : Set α}
{g : (a : ↑s) → π ↑a}
:
s.restrict f = g ↔ ∀ (a : α) (ha : a ∈ s), f a = g ⟨a, ha⟩
theorem
Set.eq_restrict_iff
{α : Type u_1}
{π : α → Type u_6}
{s : Set α}
{f : (a : ↑s) → π ↑a}
{g : (a : α) → π a}
:
f = s.restrict g ↔ ∀ (a : α) (ha : a ∈ s), f ⟨a, ha⟩ = g a
@[simp]
@[simp]
theorem
Set.restrict_dite
{α : Type u_1}
{β : Type u_2}
{s : Set α}
[(x : α) → Decidable (x ∈ s)]
(f : (a : α) → a ∈ s → β)
(g : (a : α) → a ∉ s → β)
:
(s.restrict fun (a : α) => if h : a ∈ s then f a h else g a h) = fun (a : ↑s) => f ↑a ⋯
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Set.restrict_extend_range
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β)
(g : α → γ)
(g' : β → γ)
:
(range f).restrict (Function.extend f g g') = fun (x : ↑(range f)) => g (Exists.choose ⋯)
@[simp]
theorem
Set.restrict_extend_compl_range
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β)
(g : α → γ)
(g' : β → γ)
:
(range f)ᶜ.restrict (Function.extend f g g') = g' ∘ Subtype.val
def
Set.restrict₂
{α : Type u_1}
{π : α → Type u_6}
{s t : Set α}
(hst : s ⊆ t)
(f : (a : ↑t) → π ↑a)
(a : ↑s)
:
π ↑a
If a function f is restricted to a set t, and s ⊆ t, this is the restriction to s.
Instances For
theorem
Set.restrict₂_def
{α : Type u_1}
{π : α → Type u_6}
{s t : Set α}
(hst : s ⊆ t)
:
restrict₂ hst = fun (f : (a : ↑t) → π ↑a) (x : ↑s) => f ⟨↑x, ⋯⟩
theorem
Set.range_extend_subset
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β)
(g : α → γ)
(g' : β → γ)
:
theorem
Set.range_extend
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α → β}
(hf : Function.Injective f)
(g : α → γ)
(g' : β → γ)
:
def
Set.codRestrict
{α : Type u_1}
{ι : Sort u_5}
(f : ι → α)
(s : Set α)
(h : ∀ (x : ι), f x ∈ s)
:
ι → ↑s
Restrict codomain of a function f to a set s. Same as Subtype.coind but this version
has codomain ↥s instead of Subtype s.
Instances For
@[simp]
theorem
Set.val_codRestrict_apply
{α : Type u_1}
{ι : Sort u_5}
(f : ι → α)
(s : Set α)
(h : ∀ (x : ι), f x ∈ s)
(x : ι)
:
↑(codRestrict f s h x) = f x
@[simp]
theorem
Set.restrict_comp_codRestrict
{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
{f : ι → α}
{g : α → β}
{b : Set α}
(h : ∀ (x : ι), f x ∈ b)
:
b.restrict g ∘ codRestrict f b h = g ∘ f
@[simp]
theorem
Set.injective_codRestrict
{α : Type u_1}
{ι : Sort u_5}
{f : ι → α}
{s : Set α}
(h : ∀ (x : ι), f x ∈ s)
:
Function.Injective (codRestrict f s h) ↔ Function.Injective f
theorem
Function.Injective.codRestrict
{α : Type u_1}
{ι : Sort u_5}
{f : ι → α}
{s : Set α}
(h : ∀ (x : ι), f x ∈ s)
:
Injective f → Injective (Set.codRestrict f s h)
Alias of the reverse direction of Set.injective_codRestrict.
@[simp]
theorem
Set.range_codRestrict
{α : Type u_1}
{ι : Sort u_5}
{f : ι → α}
{s : Set α}
(h : ∀ (x : ι), f x ∈ s)
:
range (codRestrict f s h) = Subtype.val ⁻¹' range f
theorem
Set.surjective_codRestrict
{α : Type u_1}
{ι : Sort u_5}
{f : ι → α}
{s : Set α}
(h : ∀ (x : ι), f x ∈ s)
:
Function.Surjective (codRestrict f s h) ↔ range f = s
theorem
Set.codRestrict_range_surjective
{α : Type u_1}
{ι : Sort u_5}
(f : ι → α)
:
Function.Surjective (codRestrict f (range f) ⋯)
@[simp]
@[simp]
@[simp]
theorem
Set.codRestrict_restrict
{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
(h : ∀ (x : ↑s), f ↑x ∈ t)
:
codRestrict (s.restrict f) t h = MapsTo.restrict f s t ⋯
Restricting the domain and then the codomain is the same as MapsTo.restrict.
theorem
Set.MapsTo.restrict_eq_codRestrict
{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
(h : MapsTo f s t)
:
restrict f s t h = codRestrict (s.restrict f) t ⋯
Reverse of Set.codRestrict_restrict.
theorem
Set.surjective_mapsTo_image_restrict
{α : Type u_1}
{β : Type u_2}
(f : α → β)
(s : Set α)
:
Function.Surjective (MapsTo.restrict f s (f '' s) ⋯)
Restriction onto preimage #
theorem
Set.image_restrictPreimage
{α : Type u_1}
{β : Type u_2}
(s : Set α)
(t : Set β)
(f : α → β)
:
t.restrictPreimage f '' (Subtype.val ⁻¹' s) = Subtype.val ⁻¹' (f '' s)
theorem
Set.range_restrictPreimage
{α : Type u_1}
{β : Type u_2}
(t : Set β)
(f : α → β)
:
range (t.restrictPreimage f) = Subtype.val ⁻¹' range f
@[simp]
theorem
Set.restrictPreimage_mk
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
{a : α}
(h : a ∈ f ⁻¹' t)
:
t.restrictPreimage f ⟨a, h⟩ = ⟨f a, h⟩
theorem
Set.image_val_preimage_restrictPreimage
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
{u : Set ↑t}
:
Subtype.val '' (t.restrictPreimage f ⁻¹' u) = f ⁻¹' (Subtype.val '' u)
theorem
Set.preimage_restrictPreimage
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
{u : Set ↑t}
:
t.restrictPreimage f ⁻¹' u = (fun (a : ↑(f ⁻¹' t)) => f ↑a) ⁻¹' (Subtype.val '' u)
theorem
Set.restrictPreimage_injective
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Function.Injective f)
:
Function.Injective (t.restrictPreimage f)
theorem
Set.restrictPreimage_surjective
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Function.Surjective f)
:
Function.Surjective (t.restrictPreimage f)
theorem
Set.restrictPreimage_bijective
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Function.Bijective f)
:
theorem
Function.Injective.restrictPreimage
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Injective f)
:
Injective (t.restrictPreimage f)
Alias of Set.restrictPreimage_injective.
theorem
Function.Surjective.restrictPreimage
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Surjective f)
:
Surjective (t.restrictPreimage f)
Alias of Set.restrictPreimage_surjective.
theorem
Function.Bijective.restrictPreimage
{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Bijective f)
:
Bijective (t.restrictPreimage f)
Alias of Set.restrictPreimage_bijective.
Injectivity on a set #
Alias of the forward direction of Set.injOn_iff_injective.
Surjectivity on a set #
@[simp]