Constant functions #
This file defines Function.IsConst, the predicate that a function takes the same value
at every pair of inputs.
Note that a function with empty domain is considered constant.
If a constant function has non-empty codomain, then it can be represented by Function.const,
see isConst_iff_exists_eq_const.
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.
Instances For
All function on a subsingleton domain are constant.
All function to a subsingleton codomain are constant.
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.
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.
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.
The identity function on a type is constant if and only if the type is a subsingleton.