title: What is the name of this generalization of idempotence?
body: <p>Lots of commonly useful properties of functions have concise names. For example, <a href="http://en.wikipedia.org/wiki/Associative_property" rel="noreferrer">associativity</a>, <a href="http://en.wikipedia.org/wiki/Commutative_property" rel="noreferrer">commutativity</a>, <a href="http://en.wikipedia.org/wiki/Transitive_property" rel="noreferrer">transitivity</a>, etc.</p>
  
  <p>I am making a library for use with <a href="http://hackage.haskell.org/package/QuickCheck" rel="noreferrer">QuickCheck</a> that provides shorthand definitions of these properties and others.</p>
  
  <p>The one I have a question about is <a href="http://en.wikipedia.org/wiki/Idempotence#Unary_operation" rel="noreferrer">idempotence</a> of unary functions. A function f is idempotent iif ∀x . f x == f (f x).</p>
  
  <p>There is an interesting generalization of this property for which I am struggling to find a similarly concise name. To avoid biasing peoples name choices by suggesting one, I'll name it P and provide the following definition:</p>
  
  <p>A function f has the P property with respect to g iif ∀x . f x == f (g x). We can see this as a generalization of idempotence by redefining idempotence in terms of P. A function f is idempotent iif it has the P property with respect to itself.</p>
  
  <p>To see that this is a useful property observe that it justifies a rewrite rule that can be used to implement a number of common optimizations. This often but not always arises when g is some sort of canonicalization function. Some examples:</p>
  
  <ul>
  <li><a href="http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#v:length" rel="noreferrer"><code>length</code></a> is P with respect to <a href="http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#v:map" rel="noreferrer"><code>map</code></a> <code>f</code> (for all choices of f)</li>
  <li>Converting to <a href="http://en.wikipedia.org/wiki/Conjunctive_normal_form" rel="noreferrer">CNF</a> is P with respect to converting to <a href="http://en.wikipedia.org/wiki/Disjunctive_normal_form" rel="noreferrer">DNF</a> (and vice versa)</li>
  <li><a href="http://en.wikipedia.org/wiki/Unicode_equivalence#Normalization" rel="noreferrer">Unicode normalization</a> to form NFC is P with respect to normalization to form NFD (and vice versa)</li>
  <li><a href="http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#v:minimum" rel="noreferrer"><code>minimum</code></a> is P with respect to <a href="http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data-List.html#v:nub" rel="noreferrer">nub</a></li>
  </ul>
  
  <p>What would you name this property?</p>