proposition: Lemma fold_right_fun {A B C} (f : A -> C -> (B -> C)) (init : B -> C) (x : B) (ls : list A) : fold_right (fun (a : A) (b : B -> C) x => f a (b x) x) init ls x = fold_right (B := A) (A := C) (fun a b => f a b x) (init x) ls.
proof: Proof. induction ls; simpl; trivial. rewrite IHls; 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