Lemma free_grfun_setquotpr {X Y : hSet} (f : X → Y) (x : free_monoid (setcoprod X X)) : free_grfun f (setquotpr _ x) = setquotpr _ (@free_monoidfun (setcoprod X X) (setcoprod Y Y) (coprodf f f) x). Proof. refine (setquotunivcomm _ _ _ _ _ @ _). refine (free_monoid_extend_homot _ x @ _). exact (sumofmaps_funcomp f free_gr_unit f (grinv (free_gr Y) ∘ free_gr_unit)). rewrite (@free_monoid_extend_funcomp (setcoprod X X) (setcoprod Y Y)). refine (free_monoid_extend_homot _ _ @ _). exact (sumofmaps_free_gr_unit). apply (@free_monoid_extend_comp (setcoprod _ _)). Defined.
Require Import UniMath.MoreFoundations.Subtypes. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.Algebra.Monoids. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.IteratedBinaryOperations. Require Import UniMath.Combinatorics.Lists.