fact: Fixpoint pre_rootn l n (fuel i : nat) := if fuel is fuel1.+1 then if i == 0 then (0, 0) else let i' := i %/ n in let k' := i %% n in let (r, k2) := pre_rootn l n fuel1 i' in let remainder := seq_pol_eval l r in if remainder <= n * k2 + k' then (r.*2.+1, n * k2 + k'- remainder) else (r.*2, n * k2 + k') else (0, 0).
imports: mathcomp(all_ssreflect)