fact: Definition first_index_helper (ls : list A) (rec : nat * A -> nat * A) : B := list_rect (fun _ => (nat * A -> nat * A) -> B) (fun _ => rect None) (fun x xs first_index_helper_xs rec => bool_rect_nodep _ (rect (Some (rec (0, x)))) (first_index_helper_xs (fun x => rec (S (fst x), snd x))) (f x)) ls rec.
imports: Coq.Lists.List Fiat.Common.BoolFacts Fiat.Common.Equality