Even and odd functions #
We define even functions α → β
assuming α
has a negation, and odd functions assuming both α
and β
have negation.
These definitions are Function.Even
and Function.Odd
; and they are protected
, to avoid
conflicting with the root-level definitions Even
and Odd
(which, for functions, mean that the
function takes even resp. odd values, a wholly different concept).
A function f
is even if it satisfies f (-x) = f x
for all x
.
Equations
- Function.Even f = ∀ (a : α), f (-a) = f a
Instances For
Any constant function is even.
The zero function is even.
The zero function is odd.
If f
is arbitrary and g
is even, then f ∘ g
is even.
If f
is even and g
is odd, then f ∘ g
is even.
If f
and g
are odd, then f ∘ g
is odd.
If f
is both even and odd, and its target is a torsion-free commutative additive group,
then f = 0
.
The sum of the values of an odd function is 0.
An odd function vanishes at zero.