parity - Maple Help

difforms

 parity
 extension of mod 2

 Calling Sequence parity(expr)

Parameters

 expr - Maple expression

Description

 • The function parity computes the parity of an expression, by assuming that unspecified exponents are integers. Given n is an integer, ${p}^{n}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}2=p$. For unassigned names, the function parity returns the name.
 • It is with the parity function that defform recognizes certain names as even or odd.
 • The command with(difforms,parity) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{difforms}\right):$$\mathrm{defform}\left(w=p,p=\mathrm{even}\right)$
 > $\mathrm{parity}\left(3p\right)$
 ${0}$ (1)
 > $\mathrm{parity}\left({p}^{m}+k\right)$
 ${k}$ (2)