proposition: Lemma finalSeg_length : forall l k, length (finalSeg l k) = length l - k.
proof: Proof. induction l. destruct k; trivial. destruct k; trivial. simpl. rewrite initialSeg_full; trivial. lia. unfold finalSeg; simpl. fold (finalSeg l k). apply IHl. Qed.
imports: Coq(Permutation Setoid) CoLoR(NatUtil LogicUtil)