I want to define a translation function g from another function f.

Definition trans (f g : Q -> Q) (t : Q) := 
forall q : Q, f (q + t) == g q.

In the above code, I implicitly define a translation g.

However, I'm unsatisfied with this definition.

In the case that a function f is declared, I want to define a translation function explicitly with a fixed distance (for example, 1).


1 Answer 1


Do you mean a functional like below ?

Definition trans (t:nat){A: Type}(f: nat-> A) := fun n => f (t+n).

Definition g := trans 3 (fun n => 2 * n).

Compute g 10.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.