Definition R x y := lex (variant x) (variant y).

(* Specifications: *)
Axiom R_wf : well_founded R.
Definition find_cycle_rec :
forall (m:nat) (xm x2m:A), m > 0 -> xm=x m -> x2m=x (2*m) ->
{ m:nat | m > 0 /\ x m = x (2*m) }.