proposition: Lemma foldr_node (X : hSet) (x : X) (f : pr1 A × X × X -> X) (a : pr1 A) (l1 l2 : pr1 Tree) : foldr X x f (node (a,,l1,,l2)) = f (a,,foldr X x f l1,,foldr X x f l2).
proof: Proof. assert (F := maponpaths (λ x, BinCoproductIn2 (BinCoproductsHSET _ _)· x) (algebra_mor_commutes _ _ _ (foldr_map X x f))). assert (Fal := toforallpaths _ _ _ F (a,,l1,,l2)). clear F. unfold compose in Fal. simpl in Fal. apply Fal. Opaque foldr_map. Qed.
imports: UniMath.Foundations.PartD UniMath.Foundations.Propositions UniMath.Foundations.Sets UniMath.Foundations.NaturalNumbers UniMath.MoreFoundations.Tactics UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Limits.Graphs.Colimits UniMath.CategoryTheory.Categories.HSET.Core UniMath.CategoryTheory.Categories.HSET.Limits UniMath.CategoryTheory.Categories.HSET.Colimits UniMath.CategoryTheory.Limits.Initial UniMath.CategoryTheory.FunctorAlgebras UniMath.CategoryTheory.Limits.BinProducts UniMath.CategoryTheory.Limits.Terminal UniMath.CategoryTheory.Chains.All UniMath.CategoryTheory.exponentials UniMath.CategoryTheory.Limits.BinCoproducts UniMath.CategoryTheory.Inductives.Lists