0
$\begingroup$

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).

$\endgroup$

1 Answer 1

3
$\begingroup$

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.
$\endgroup$

Your Answer

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

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