proposition: Lemma index_last x s : uniq (x :: s) -> index (last x s) (x :: s) = size s.
proof: Proof. rewrite lastI rcons_uniq -cats1 index_cat size_belast. by case: ifP => //=; rewrite eqxx addn0. Qed.
imports: HB(structures) mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat)