Let (G1,…,Gn) and (A1,…,An−1) be two sequences of groups; for each i, let ϕi:Ai→Gi and ψi:Ai→Gi+1 be two injective homomorphisms; by these homomorphisms Ai can be identified both with a subgroup of Gi and with a subgroup of Gi+1.
(a) Let H1=G1,H2=H1∗A1G2,…,Hn=Hn−1∗An−1Gn. The group Hn is called the sum of the groups (Gi) amalgamated by the subgroups (Ai); it is denoted by G1∗A1G2∗A2⋯∗An−1Gn. If T is an arbitrary group, define a bijection between the homomorphisms of Hn into T and the families (t_1, \ldots, t_n) of homomorphisms ti:Gi→T such that ti∘ϕi=ti+1∘ψi for 1≤i≤n−1.
(b) Each Gi is identified with the corresponding subgroup of Hn. Show that Gi∩Gi+1=Ai and that Gi∩Gi+2=Ai∩Ai+1 (the latter intersection being taken in Gi+1).