fact: Fixpoint find_last (l: list A) : option nat := match l with | nil => None | hd::tl => match find_last tl with | Some i => Some (S i) | None => match P_dec hd with | left _ => Some 0 | right _ => None end end end.
imports: Coq(Permutation Setoid) CoLoR(NatUtil LogicUtil)