The areas / V01. The language of Mathlib
Mathlib.Logic.Function.Const
58 declarations. Mathlib docs · Source
def Function.IsConst E1 #
{α : Sort u_1} → {β : Sort u_2} → (α → β) → Prop
A function is constant if it takes equal values at any two inputs.
Note that a function with empty domain is considered constant.
If a constant function has non-empty co domain, then it can be represented by Function.const,
see isConst_iff_exists_eq_const.
The intended use is for expressing that a function is constant when the exact constant value is
not known, not unique or not easy to express. To state the constant value explicitly,
use Function.const.
theorem Function.isConst_iff E0 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β}, Function.IsConst f ↔ ∀ (x y : α), f x = f y
theorem Function.IsConst.eq E1 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β}, Function.IsConst f → ∀ (x y : α), f x = f y
theorem Function.IsConst.const E0 #
∀ {α : Sort u_1} {β : Sort u_2} (b : β), Function.IsConst (Function.const α b)
theorem Function.IsConst.of_subsingleton_domain E0 #
∀ {α : Sort u_1} {β : Sort u_2} [Subsingleton α] (f : α → β), Function.IsConst f
All functions on a subsingleton domain are constant.
theorem Function.IsConst.of_subsingleton_codomain E0 #
∀ {α : Sort u_1} {β : Sort u_2} [Subsingleton β] (f : α → β), Function.IsConst f
All functions to a subsingleton codomain are constant.
theorem Function.IsConst.of_forall_eq E0 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β} (b : β), (∀ (x : α), f x = b) → Function.IsConst f
theorem Function.isConst_iff_exists_forall_eq E0 #
∀ {α : Sort u_1} {β : Sort u_2} [Nonempty β] {f : α → β}, Function.IsConst f ↔ ∃ b, ∀ (x : α), f x = b
A function f : α → β is constant on a non-empty codomain if and only if there is b : β so
that f a = b for all a : α.
theorem Function.isConst_iff_exists_forall_eq_of_nonempty_domain E1 #
∀ {α : Sort u_1} {β : Sort u_2} [Nonempty α] {f : α → β}, Function.IsConst f ↔ ∃ b, ∀ (x : α), f x = b
A function f : α → β is constant on a non-empty domain if and only if there is b : β so
that f a = b for all a : α.
theorem Function.isConst_iff_exists_eq_const E1 #
∀ {α : Sort u_1} {β : Sort u_2} [Nonempty β] {f : α → β}, Function.IsConst f ↔ ∃ b, f = Function.const α b
A function α → β is constant on a non-empty codomain if and only if there is b : β so that
the function can be written as Function.const α b.
theorem Function.IsConst.exists_eq_const E1 #
∀ {α : Sort u_1} {β : Sort u_2} [Nonempty β] {f : α → β}, Function.IsConst f → ∃ b, f = Function.const α b
Alias of the forward direction of Function.isConst_iff_exists_eq_const.
A function α → β is constant on a non-empty codomain if and only if there is b : β so that
the function can be written as Function.const α b.
theorem Function.isConst_iff_exists_eq_const_of_nonempty_domain E1 #
∀ {α : Sort u_1} {β : Sort u_2} [Nonempty α] {f : α → β}, Function.IsConst f ↔ ∃ b, f = Function.const α b
A function α → β is constant on a non-empty domain if and only if there is b : β so that
the function can be written as Function.const α b.
theorem Function.IsConst.comp_left E1 #
∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} {f : α → β}, Function.IsConst f → ∀ (g : β → γ), Function.IsConst (g ∘ f)
Postcomposition preserves being constant.
theorem Function.IsConst.comp_right E1 #
∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} {g : β → γ}, Function.IsConst g → ∀ (f : α → β), Function.IsConst (g ∘ f)
Precomposing a constant function gives a constant function.
theorem Function.not_isConst_of_apply_ne E1 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β} {x y : α}, f x ≠ f y → ¬Function.IsConst f
theorem Function.not_isConst_iff_exists_apply_ne E1 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β}, ¬Function.IsConst f ↔ ∃ x y, f x ≠ f y
theorem Function.isConst_id_iff E0 #
∀ {α : Sort u_1}, Function.IsConst id ↔ Subsingleton α
The identity function on a type is constant if and only if the type is a subsingleton.
theorem Set.subsingleton_range_iff E0 #
∀ {α : Sort u_1} {β : Type u_4} {f : α → β}, (Set.range f).Subsingleton ↔ Function.IsConst f
theorem Set.nontrivial_range_iff E0 #
∀ {α : Sort u_1} {β : Type u_4} {f : α → β}, (Set.range f).Nontrivial ↔ ¬Function.IsConst f
theorem Function.isConst_and_injective_iff E0 #
∀ {α : Sort u_1} {β : Sort u_2} (f : α → β), Function.IsConst f ∧ Function.Injective f ↔ Subsingleton α
theorem Function.IsConst.injective_iff E0 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β}, Function.IsConst f → (Function.Injective f ↔ Subsingleton α)
theorem Function.Injective.isConst_iff E0 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β}, Function.Injective f → (Function.IsConst f ↔ Subsingleton α)
theorem Function.isConst_and_surjective_iff E0 #
∀ {α : Sort u_1} {β : Sort u_2} (f : α → β),
Function.IsConst f ∧ Function.Surjective f ↔ IsEmpty β ∨ Nonempty α ∧ Subsingleton β
theorem Function.isConst_and_surjective_iff_of_nonempty E1 #
∀ {α : Sort u_1} {β : Sort u_2} [Nonempty α] (f : α → β), Function.IsConst f ∧ Function.Surjective f ↔ Subsingleton β
theorem Function.IsConst.surjective_iff E0 #
∀ {α : Sort u_1} {β : Sort u_2} [Nonempty α] {f : α → β}, Function.IsConst f → (Function.Surjective f ↔ Subsingleton β)
theorem Function.Surjective.isConst_iff E0 #
∀ {α : Sort u_1} {β : Sort u_2} {f : α → β}, Function.Surjective f → (Function.IsConst f ↔ Subsingleton β)
def Function.IsConstOn E1 #
{β : Sort u_2} → {α : Type u_4} → (α → β) → Set α → Prop
A function is constant on a set s if it takes equal values at any two points of s.
The intended use is for expressing that a function is constant on s when the exact constant
value is not known, not unique or not easy to express. To state the constant value explicitly,
use Set.EqOn f (Function.const α b) s.
theorem Function.isConstOn_iff E0 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s : Set α}, Function.IsConstOn f s ↔ ∀ x ∈ s, ∀ y ∈ s, f x = f y
theorem Function.IsConstOn.eq E1 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s : Set α}, Function.IsConstOn f s → ∀ {x y : α}, x ∈ s → y ∈ s → f x = f y
theorem Function.isConstOn_iff_isConst_comp_val E0 #
∀ {β : Sort u_2} {α : Type u_4} (f : α → β) (s : Set α), Function.IsConstOn f s ↔ Function.IsConst (f ∘ Subtype.val)
theorem Function.isConstOn_univ E0 #
∀ {β : Sort u_2} {α : Type u_4} (f : α → β), Function.IsConstOn f Set.univ ↔ Function.IsConst f
theorem Function.IsConst.isConstOn E1 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s : Set α}, Function.IsConst f → Function.IsConstOn f s
theorem Function.IsConstOn.anti E1 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s t : Set α}, Function.IsConstOn f t → s ⊆ t → Function.IsConstOn f s
theorem Function.IsConstOn.of_eqOn E1 #
∀ {α : Type u_4} {β : Type u_5} {f g : α → β} {s : Set α},
Function.IsConstOn f s → Set.EqOn f g s → Function.IsConstOn g s
theorem Function.IsConstOn.congr E1 #
∀ {α : Type u_4} {β : Type u_5} {f g : α → β} {s t : Set α},
Function.IsConstOn f s → Set.EqOn f g s → s = t → Function.IsConstOn g t
theorem Set.EqOn.isConstOn_iff E0 #
∀ {α : Type u_4} {β : Type u_5} {f g : α → β} {s : Set α},
Set.EqOn f g s → (Function.IsConstOn f s ↔ Function.IsConstOn g s)
theorem Function.IsConstOn.const E0 #
∀ {β : Sort u_2} {α : Type u_4} (b : β) (s : Set α), Function.IsConstOn (Function.const α b) s
theorem Function.IsConstOn.fun_const E0 #
∀ {β : Sort u_2} {α : Type u_4} (b : β) (s : Set α), Function.IsConstOn (fun x ↦ b) s
theorem Function.IsConstOn.of_subsingleton E1 #
∀ {β : Sort u_2} {α : Type u_4} {s : Set α}, s.Subsingleton → ∀ (f : α → β), Function.IsConstOn f s
Every function is constant on a subsingleton set.
theorem Function.isConstOn_empty E0 #
∀ {β : Sort u_2} {α : Type u_4} (f : α → β), Function.IsConstOn f ∅
theorem Function.isConstOn_singleton E0 #
∀ {β : Sort u_2} {α : Type u_4} (f : α → β) (a : α), Function.IsConstOn f {a}
theorem Function.IsConstOn.of_forall_eq E0 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s : Set α} (b : β), (∀ x ∈ s, f x = b) → Function.IsConstOn f s
theorem Function.isConstOn_iff_exists_forall_eq E0 #
∀ {β : Sort u_2} {α : Type u_4} [Nonempty β] {f : α → β} {s : Set α}, Function.IsConstOn f s ↔ ∃ b, ∀ x ∈ s, f x = b
A function f : α → β to a non-empty codomain is constant on s if and only if there is
b : β so that f a = b for all a ∈ s.
theorem Function.isConstOn_iff_exists_forall_eq_of_nonempty E1 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s : Set α}, s.Nonempty → (Function.IsConstOn f s ↔ ∃ b, ∀ x ∈ s, f x = b)
A function f : α → β is constant on a non-empty set s if and only if there is b : β so
that f a = b for all a ∈ s.
theorem Function.isConstOn_iff_exists_eqOn_const E1 #
∀ {α : Type u_4} {β : Type u_5} [Nonempty β] {f : α → β} {s : Set α},
Function.IsConstOn f s ↔ ∃ b, Set.EqOn f (Function.const α b) s
A function α → β to a non-empty codomain is constant on s if and only if there is b : β
so that the function agrees with Function.const α b on s.
theorem Function.IsConstOn.exists_eqOn_const E1 #
∀ {α : Type u_4} {β : Type u_5} [Nonempty β] {f : α → β} {s : Set α},
Function.IsConstOn f s → ∃ b, Set.EqOn f (Function.const α b) s
Alias of the forward direction of Function.isConstOn_iff_exists_eqOn_const.
A function α → β to a non-empty codomain is constant on s if and only if there is b : β
so that the function agrees with Function.const α b on s.
theorem Function.isConstOn_iff_exists_eqOn_const_of_nonempty E1 #
∀ {α : Type u_4} {β : Type u_5} {f : α → β} {s : Set α},
s.Nonempty → (Function.IsConstOn f s ↔ ∃ b, Set.EqOn f (Function.const α b) s)
A function α → β is constant on a non-empty set s if and only if there is b : β so that
the function agrees with Function.const α b on s.
theorem Function.IsConstOn.comp_left E1 #
∀ {β : Sort u_2} {γ : Sort u_3} {α : Type u_4} {f : α → β} {s : Set α},
Function.IsConstOn f s → ∀ (g : β → γ), Function.IsConstOn (g ∘ f) s
Postcomposition preserves being constant on a set.
theorem Function.IsConstOn.comp_right E1 #
∀ {α : Type u_4} {γ : Type u_5} {g : γ → γ} {t : Set γ},
Function.IsConstOn g t → ∀ {f : α → γ} {s : Set α}, Set.MapsTo f s t → Function.IsConstOn (g ∘ f) s
Precomposing a function constant on t with a function mapping s to t gives a function
constant on s.
theorem Function.IsConst.isConstOn_comp E1 #
∀ {α : Type u_4} {γ : Sort u_5} {g : γ → γ},
Function.IsConst g → ∀ (f : α → γ) (s : Set α), Function.IsConstOn (g ∘ f) s
Precomposing a constant function gives a function constant on any set.
theorem Function.not_isConstOn_of_apply_ne E1 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s : Set α} {x y : α}, x ∈ s → y ∈ s → f x ≠ f y → ¬Function.IsConstOn f s
theorem Function.not_isConstOn_iff_exists_apply_ne E1 #
∀ {β : Sort u_2} {α : Type u_4} {f : α → β} {s : Set α}, ¬Function.IsConstOn f s ↔ ∃ x ∈ s, ∃ y ∈ s, f x ≠ f y
theorem Function.isConstOn_id_iff E0 #
∀ {α : Type u_4} {s : Set α}, Function.IsConstOn id s ↔ s.Subsingleton
The identity function is constant on a set if and only if the set is a subsingleton.
theorem Set.subsingleton_image_iff E0 #
∀ {α : Type u_4} {β : Type u_5} {f : α → β} {s : Set α}, (f '' s).Subsingleton ↔ Function.IsConstOn f s
theorem Set.nontrivial_image_iff E0 #
∀ {α : Type u_4} {β : Type u_5} {f : α → β} {s : Set α}, (f '' s).Nontrivial ↔ ¬Function.IsConstOn f s
theorem Function.isConstOn_and_injOn_iff E0 #
∀ {α : Type u_4} {β : Type u_5} (f : α → β) (s : Set α), Function.IsConstOn f s ∧ Set.InjOn f s ↔ s.Subsingleton
theorem Function.IsConstOn.injOn_iff E0 #
∀ {α : Type u_4} {β : Type u_5} {f : α → β} {s : Set α}, Function.IsConstOn f s → (Set.InjOn f s ↔ s.Subsingleton)
theorem Set.InjOn.isConstOn_iff E0 #
∀ {α : Type u_4} {β : Type u_5} {f : α → β} {s : Set α}, Set.InjOn f s → (Function.IsConstOn f s ↔ s.Subsingleton)