proposition: Lemma map_nth_dep_helper {A B} (f' : nat -> nat) (f : nat -> A -> B) (l : list A) (d : A) (n : nat) : nth n (map (fun n'a => f (fst n'a) (snd n'a)) (combine (List.map f' (List.rev (up_to (List.length l)))) l)) (f (f' n) d) = f (f' n) (nth n l d).
proof: Proof. rewrite <- (map_nth (f (f' n))). rewrite step_rev_up_to. revert f' n; induction l as [|x xs IHxs]; intros. { destruct n; simpl; reflexivity. } { destruct n; simpl; [ reflexivity | ]. specialize (IHxs (fun x => f' (S x))). rewrite <- IHxs; clear IHxs. rewrite map_map. rewrite <- step_rev_up_to. reflexivity. } Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Coq.Lists.List Coq.Lists.SetoidList Coq.Bool.Bool Fiat.Common Fiat.Common.List.Operations Fiat.Common.Equality Fiat.Common.List.FlattenList Fiat.Common.LogicFacts