Definition new_location :=
  if Zeven nb_steps then new_location_even else new_location_odd.

(* Specifications: *)
Theorem new_location_correct : forall x k l, (0 <= k < nb_steps)%Z -> inbetween (start + Z2R k * step) (start + Z2R (k + 1) * step) x l -> inbetween start (start + Z2R nb_steps * step) x (new_location k l).
Lemma inbetween_mult_aux : forall x d s, ((x * s + d * s) / 2 = (x + d) / 2 * s)%R.
Theorem inbetween_mult_compat : forall x d u l s, (0 < s)%R -> inbetween x d u l -> inbetween (x * s) (d * s) (u * s) l.
Theorem inbetween_mult_reg : forall x d u l s, (0 < s)%R -> inbetween (x * s) (d * s) (u * s) l -> inbetween x d u l.