Equations: a tool for programming with dependent types