proposition: Lemma leqt_sorted m (t1 t2 : m.-tuple A) : sorted (>%O) t1 -> leqt t1 t2.
proof: Proof. move=> sS; apply/leqtP => a b. rewrite leq_eqVlt => /orP[/val_eqP->//|aLb]. pose v := tnth t1 a; rewrite leNgt !(tnth_nth v). by rewrite -DualPOrder.ltEdual lt_sorted_ltn_nth ?(aLb, inE, size_tuple). Qed.
imports: mathcomp(all_ssreflect perm algebra.zmodp) mathcomp(zify)