Getting rid of a redundant identity

If we set `q = f . g`, we don't need the equation (3) provided by referential transparency.
Stub (indentation, comments)
Merge sgraf's derivation simplificaion