proposition: Lemma is_functional_compose (a b : algebra_functionals_set 1) : is_functional (compose (pr1 a) (pr1 b)) 1.
proof: Proof. set (v := weqvecfun 2 [(pr1 a ; pr1 b)]). unfold compose, is_functional, make_functional. cbn -[weqvecfun action]. rewrite (move_action_through_vector_1 _ _). rewrite <- comp_action. cbn -[weqvecfun]. rewrite subst_abs. rewrite subst_app. do 2 rewrite subst_var. do 2 extend_tuple_2. cbn -[v]. rewrite inflate_abs. rewrite beta_equality. do 4 rewrite subst_app. do 3 rewrite subst_subst. do 3 rewrite subst_var. do 3 extend_tuple_3. rewrite subst_var. do 4 rewrite inflate_var. rewrite extend_tuple_inr. do 2 rewrite subst_var. now do 2 rewrite extend_tuple_inl. Qed.
imports: UniMath.Foundations.All UniMath.MoreFoundations.All UniMath.Algebra.Monoids UniMath.Combinatorics.Tuples UniMath.CategoryTheory.Categories.HSET.Core UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Presheaf UniMath.Combinatorics.StandardFiniteSets UniMath.Combinatorics.Vectors UniMath.AlgebraicTheories.AlgebraicTheories UniMath.AlgebraicTheories.Algebras UniMath.AlgebraicTheories.Examples.LambdaCalculus UniMath.AlgebraicTheories.LambdaTheories UniMath.AlgebraicTheories.LambdaCalculus UniMath.AlgebraicTheories.LambdaTheoryCategory