proposition: Lemma sternD_gcd_rec2 u v i n (S := sternD u v n): i < 2^n -> gcdn (nth 0 S i)(nth 0 S i.+1) = gcdn u v.
proof: Proof. move => h; rewrite -(sternD_gcd_rec u v h). by rewrite nth0 head_sternD sternD_stern ? expn_gt0 // muln1 mulnC gcdnMDl. Qed.
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat) mathcomp(seq choice fintype order bigop ssralg) mathcomp(div ssrnum ssrint rat prime path binomial) mathcomp(tuple finset) gaia(fibm)