fact: Definition bitonic := [qualify s | [exists r : 'I_(size (s : seq A)).+1, exists n : 'I_(size (s : seq A)).+1, let s1 := rot r s in sorted (<=%O) (take n s1) && sorted (>=%O) (drop n s1)]].
imports: mathcomp(all_ssreflect perm algebra.zmodp) mathcomp(zify) more_tuple nsort