proposition: Lemma map_nth_dep {A B} (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.rev (up_to (List.length l))) l)) (f n d) = f n (nth n l d).
proof: Proof. rewrite <- (map_nth_dep_helper (fun x => x)). rewrite List.map_id; 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