Built with Alectryon. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use instead of Ctrl.
From HoTT Require Import Basics Types.From HoTT Require Import Basics Types.
Require Import WildCat.Core WildCat.Coproducts.
Require Import Cubical.DPath.
Require Import Spaces.List.Core Spaces.List.Theory.
Require Import Colimits.Pushout.
Require Import Truncations.Core Truncations.SeparatedTrunc.
Require Import Algebra.Groups.Group.

Local Open Scope list_scope.
Local Open Scope mc_scope.
Local Open Scope mc_mult_scope.

(** In this file we define the amalgamated free product of a span of group homomorphisms as a HIT. *)

(** We wish to define the amalgamated free product of a span of group homomorphisms f : G -> H, g : G -> K as the following HIT:

<<
  HIT M(f,g)
   | amal_eta : list (H + K) -> M(f,g)
   | mu_H : forall (x y : list (H + K)) (h1 h2 : H),
      amal_eta (x ++ [inl h1, inl h2] ++ y) = amal_eta (x ++ [inl (h1 * h2)] ++ y)
   | mu_K : forall (x y : list (H + K)) (k1 k2 : K),
      amal_eta (x ++ [inr k1, inr k2] ++ y) = amal_eta (x ++ [inr (k1 * k2)] ++ y)
   | tau : forall (x y : list (H + K)) (z : G),
      amal_eta (x ++ [inl (f z)] ++ y) = amal_eta (x ++ [inr (g z)] ++ y)
   | omega_H : forall (x y : list (H + K)),
      amal_eta (x ++ [inl mon_unit] ++ y) = amal_eta (x ++ y)
   | omega_K : forall (x y : list (H + K)),
      amal_eta (x ++ [inr mon_unit] ++ y) = amal_eta (x ++ y).
>>

  We will build this HIT up successively out of coequalizers. *)

(** We will call M [amal_type] and prefix all the constructors with [amal_] (for amalgamated free product). *)

Section AmalgamatedFreeProduct.

  Context {G H K : Group}
    (f : GroupHomomorphism G H) (g : GroupHomomorphism G K).

  Local Definition Words : Type := list (H + K).

  
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
x: Words

Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
x: Words

Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words

Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
x: H + K
xs: list (H + K)
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
x: H + K
xs: list (H + K)

Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
h: H
xs: list (H + K)

Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
k: K
xs: list (H + K)
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
h: H
xs: list (H + K)

Words
exact ((word_inverse xs) ++ [inl h^]).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
k: K
xs: list (H + K)

Words
exact ((word_inverse xs) ++ [inr k^]). Defined. (** Inversion changes order of concatenation. *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

word_inverse (x ++ y) = word_inverse y ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

word_inverse (x ++ y) = word_inverse y ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
y: Words

word_inverse (nil ++ y) = word_inverse y ++ word_inverse nil
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H + K
xs: list (H + K)
y: Words
IHxs: word_inverse (xs ++ y) = word_inverse y ++ word_inverse xs
word_inverse ((x :: xs) ++ y) = word_inverse y ++ word_inverse (x :: xs)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H + K
xs: list (H + K)
y: Words
IHxs: word_inverse (xs ++ y) = word_inverse y ++ word_inverse xs

word_inverse ((x :: xs) ++ y) = word_inverse y ++ word_inverse (x :: xs)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H + K
xs: list (H + K)
y: Words
IHxs: word_inverse (xs ++ y) = word_inverse y ++ word_inverse xs

match x with | inl g0 => word_inverse (xs ++ y) ++ [inl g0^] | inr g0 => word_inverse (xs ++ y) ++ [inr g0^] end = word_inverse y ++ match x with | inl g0 => word_inverse xs ++ [inl g0^] | inr g0 => word_inverse xs ++ [inr g0^] end
destruct x; rhs napply app_assoc; f_ap. Defined. (** There are five source types for the path constructors. We will construct this HIT as the colimit of five forks going into [Words]. We can bundle up this colimit as a single coequalizer. *) (** Source types of path constructors *) Local Definition pc1 : Type := Words * H * H * Words. Local Definition pc2 : Type := Words * K * K * Words. Local Definition pc3 : Type := Words * G * Words. Local Definition pc4 : Type := Words * Words. Local Definition pc5 : Type := Words * Words. (** End points of the first path constructor *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
h1, h2: H
y: Words

Words
exact (x ++ (inl h1 :: [inl h2]) ++ y). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
h1, h2: H
y: Words

Words
exact (x ++ [inl (h1 * h2)] ++ y). Defined. (** End points of the second path construct *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc2 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc2 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
k1, k2: K
y: Words

Words
exact (x ++ (inr k1 :: [inr k2]) ++ y). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc2 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc2 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
k1, k2: K
y: Words

Words
exact (x ++ [inr (k1 * k2)] ++ y). Defined. (** End points of the third path constructor *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc3 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc3 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
z: G
y: Words

Words
exact (x ++ [inl (f z)] ++ y). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc3 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc3 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
z: G
y: Words

Words
exact (x ++ [inr (g z)] ++ y). Defined. (** End points of the fourth path constructor *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc4 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc4 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

Words
exact (x ++ [inl mon_unit] ++ y). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc4 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc4 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

Words
exact (x ++ y). Defined. (** End points of the fifth path constructor *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

Words
exact (x ++ [inr mon_unit] ++ y). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

Words
exact (x ++ y). Defined. (** We can then define maps going into words consisting of the corresponding endpoints of the path constructors. *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 + pc2 + pc3 + pc4 + pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 + pc2 + pc3 + pc4 + pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc1

Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc2
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc3
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc4
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc5
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc1

Words
exact (m1 x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc2

Words
exact (m2 x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc3

Words
exact (m3 x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc4

Words
exact (m4 x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc5

Words
exact (m5 x). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 + pc2 + pc3 + pc4 + pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

pc1 + pc2 + pc3 + pc4 + pc5 -> Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc1

Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc2
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc3
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc4
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc5
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc1

Words
exact (m1' x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc2

Words
exact (m2' x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc3

Words
exact (m3' x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc4

Words
exact (m4' x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: pc5

Words
exact (m5' x). Defined. (** Finally we can define our type as the 0-truncation of the coequalizer of these maps *) Definition amal_type : Type := Tr 0 (Coeq map1 map2). (** We can define the constructors *) Definition amal_eta : Words -> amal_type := tr o coeq.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

amal_eta (x ++ [inl h1, inl h2] ++ y) = amal_eta (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

amal_eta (x ++ [inl h1, inl h2] ++ y) = amal_eta (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

tr (coeq (x ++ [inl h1, inl h2] ++ y)) = tr (coeq (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

coeq (x ++ [inl h1, inl h2] ++ y) = coeq (x ++ [inl (h1 * h2)] ++ y)
exact (cglue (inl (inl (inl (inl (x,h1,h2,y)))))). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

amal_eta (x ++ [inr k1, inr k2] ++ y) = amal_eta (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

amal_eta (x ++ [inr k1, inr k2] ++ y) = amal_eta (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

tr (coeq (x ++ [inr k1, inr k2] ++ y)) = tr (coeq (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

coeq (x ++ [inr k1, inr k2] ++ y) = coeq (x ++ [inr (k1 * k2)] ++ y)
exact (cglue (inl (inl (inl (inr (x,k1,k2,y)))))). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

amal_eta (x ++ [inl (f z)] ++ y) = amal_eta (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

amal_eta (x ++ [inl (f z)] ++ y) = amal_eta (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

tr (coeq (x ++ [inl (f z)] ++ y)) = tr (coeq (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

coeq (x ++ [inl (f z)] ++ y) = coeq (x ++ [inr (g z)] ++ y)
exact (cglue (inl (inl (inr (x,z,y))))). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

amal_eta (x ++ [inl 1] ++ y) = amal_eta (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

amal_eta (x ++ [inl 1] ++ y) = amal_eta (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

tr (coeq (x ++ [inl 1] ++ y)) = tr (coeq (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

coeq (x ++ [inl 1] ++ y) = coeq (x ++ y)
exact (cglue (inl (inr (x,y)))). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

amal_eta (x ++ [inr 1] ++ y) = amal_eta (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

amal_eta (x ++ [inr 1] ++ y) = amal_eta (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

tr (coeq (x ++ [inr 1] ++ y)) = tr (coeq (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

coeq (x ++ [inr 1] ++ y) = coeq (x ++ y)
exact (cglue (inr (x,y))). Defined. (** Now we can derive the dependent eliminator *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))

forall x : amal_type, P x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))

forall x : amal_type, P x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))

forall a : Coeq map1 map2, P (tr a)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))

forall a : Words, (fun w : Coeq map1 map2 => P (tr w)) (coeq a)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
forall b : pc1 + pc2 + pc3 + pc4 + pc5, transport (fun w : Coeq map1 map2 => P (tr w)) (cglue b) (?coeq' (map1 b)) = ?coeq' (map2 b)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))

forall b : pc1 + pc2 + pc3 + pc4 + pc5, transport (fun w : Coeq map1 map2 => P (tr w)) (cglue b) (e (map1 b)) = e (map2 b)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc1 + pc2 + pc3 + pc4 + pc5

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue a) (e (map1 a)) = e (map2 a)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc1

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inl (inl a))))) (e (map1 (inl (inl (inl (inl a)))))) = e (map2 (inl (inl (inl (inl a)))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc2
transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inl (inr a))))) (e (map1 (inl (inl (inl (inr a)))))) = e (map2 (inl (inl (inl (inr a)))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc3
transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inr a)))) (e (map1 (inl (inl (inr a))))) = e (map2 (inl (inl (inr a))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc4
transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inr a))) (e (map1 (inl (inr a)))) = e (map2 (inl (inr a)))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc5
transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inr a)) (e (map1 (inr a))) = e (map2 (inr a))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc1

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inl (inl a))))) (e (map1 (inl (inl (inl (inl a)))))) = e (map2 (inl (inl (inl (inl a)))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h0 h3 : H), DPath P (amal_mu_H x0 y0 h0 h3) (e (x0 ++ [inl h0, inl h3] ++ y0)) (e (x0 ++ [inl (h0 * h3)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x: Words
h1, h2: H
y: Words

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inl (inl (x, h1, h2, y)))))) (e (map1 (inl (inl (inl (inl (x, h1, h2, y))))))) = e (map2 (inl (inl (inl (inl (x, h1, h2, y))))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h0 h3 : H), DPath P (amal_mu_H x0 y0 h0 h3) (e (x0 ++ [inl h0, inl h3] ++ y0)) (e (x0 ++ [inl (h0 * h3)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x: Words
h1, h2: H
y: Words

DPath P (ap tr (cglue (inl (inl (inl (inl (x, h1, h2, y))))))) (e (map1 (inl (inl (inl (inl (x, h1, h2, y))))))) (e (map2 (inl (inl (inl (inl (x, h1, h2, y)))))))
exact (mh x y h1 h2).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc2

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inl (inr a))))) (e (map1 (inl (inl (inl (inr a)))))) = e (map2 (inl (inl (inl (inr a)))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k0 k3 : K), DPath P (amal_mu_K x0 y0 k0 k3) (e (x0 ++ [inr k0, inr k3] ++ y0)) (e (x0 ++ [inr (k0 * k3)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x: Words
k1, k2: K
y: Words

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inl (inr (x, k1, k2, y)))))) (e (map1 (inl (inl (inl (inr (x, k1, k2, y))))))) = e (map2 (inl (inl (inl (inr (x, k1, k2, y))))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k0 k3 : K), DPath P (amal_mu_K x0 y0 k0 k3) (e (x0 ++ [inr k0, inr k3] ++ y0)) (e (x0 ++ [inr (k0 * k3)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x: Words
k1, k2: K
y: Words

DPath P (ap tr (cglue (inl (inl (inl (inr (x, k1, k2, y))))))) (e (map1 (inl (inl (inl (inr (x, k1, k2, y))))))) (e (map2 (inl (inl (inl (inr (x, k1, k2, y)))))))
exact (mk x y k1 k2).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc3

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inr a)))) (e (map1 (inl (inl (inr a))))) = e (map2 (inl (inl (inr a))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z0 : G), DPath P (amal_tau x0 y0 z0) (e (x0 ++ [inl (f z0)] ++ y0)) (e (x0 ++ [inr (g z0)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x: Words
z: G
y: Words

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inl (inr (x, z, y))))) (e (map1 (inl (inl (inr (x, z, y)))))) = e (map2 (inl (inl (inr (x, z, y)))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z0 : G), DPath P (amal_tau x0 y0 z0) (e (x0 ++ [inl (f z0)] ++ y0)) (e (x0 ++ [inr (g z0)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x: Words
z: G
y: Words

DPath P (ap tr (cglue (inl (inl (inr (x, z, y)))))) (e (map1 (inl (inl (inr (x, z, y)))))) (e (map2 (inl (inl (inr (x, z, y))))))
exact (t x y z).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc4

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inr a))) (e (map1 (inl (inr a)))) = e (map2 (inl (inr a)))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x, y: Words

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inl (inr (x, y)))) (e (map1 (inl (inr (x, y))))) = e (map2 (inl (inr (x, y))))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x, y: Words

DPath P (ap tr (cglue (inl (inr (x, y))))) (e (map1 (inl (inr (x, y))))) (e (map2 (inl (inr (x, y)))))
exact (oh x y).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHSet (P x)
e: forall w : Words, P (amal_eta w)
mh: forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
mk: forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
t: forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
oh: forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
a: pc5

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inr a)) (e (map1 (inr a))) = e (map2 (inr a))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x, y: Words

transport (fun w : Coeq map1 map2 => P (tr w)) (cglue (inr (x, y))) (e (map1 (inr (x, y)))) = e (map2 (inr (x, y)))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x0 : amal_type, IsHSet (P x0)
e: forall w : Words, P (amal_eta w)
mh: forall (x0 y0 : Words) (h1 h2 : H), DPath P (amal_mu_H x0 y0 h1 h2) (e (x0 ++ [inl h1, inl h2] ++ y0)) (e (x0 ++ [inl (h1 * h2)] ++ y0))
mk: forall (x0 y0 : Words) (k1 k2 : K), DPath P (amal_mu_K x0 y0 k1 k2) (e (x0 ++ [inr k1, inr k2] ++ y0)) (e (x0 ++ [inr (k1 * k2)] ++ y0))
t: forall (x0 y0 : Words) (z : G), DPath P (amal_tau x0 y0 z) (e (x0 ++ [inl (f z)] ++ y0)) (e (x0 ++ [inr (g z)] ++ y0))
oh: forall x0 y0 : Words, DPath P (amal_omega_H x0 y0) (e (x0 ++ [inl 1] ++ y0)) (e (x0 ++ y0))
ok: forall x0 y0 : Words, DPath P (amal_omega_K x0 y0) (e (x0 ++ [inr 1] ++ y0)) (e (x0 ++ y0))
x, y: Words

DPath P (ap tr (cglue (inr (x, y)))) (e (map1 (inr (x, y)))) (e (map2 (inr (x, y))))
exact (ok x y). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)

forall x : amal_type, P x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)

forall x : amal_type, P x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)

forall x : amal_type, IsHSet (P x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall w : Words, P (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (?e (x ++ [inl h1, inl h2] ++ y)) (?e (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (?e (x ++ [inr k1, inr k2] ++ y)) (?e (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (z : G), DPath P (amal_tau x y z) (?e (x ++ [inl (f z)] ++ y)) (?e (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall x y : Words, DPath P (amal_omega_H x y) (?e (x ++ [inl 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall x y : Words, DPath P (amal_omega_K x y) (?e (x ++ [inr 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)

forall w : Words, P (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (?e (x ++ [inl h1, inl h2] ++ y)) (?e (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (?e (x ++ [inr k1, inr k2] ++ y)) (?e (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (z : G), DPath P (amal_tau x y z) (?e (x ++ [inl (f z)] ++ y)) (?e (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall x y : Words, DPath P (amal_omega_H x y) (?e (x ++ [inl 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall x y : Words, DPath P (amal_omega_K x y) (?e (x ++ [inr 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)

forall (x y : Words) (h1 h2 : H), DPath P (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (k1 k2 : K), DPath P (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall (x y : Words) (z : G), DPath P (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall x y : Words, DPath P (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: amal_type -> Type
H0: forall x : amal_type, IsHProp (P x)
e: forall w : Words, P (amal_eta w)
forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
all: intros; apply path_ishprop. Defined. (** From which we can derive the non-dependent eliminator / recursion principle *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)

amal_type -> P
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)

amal_type -> P
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)

forall x : amal_type, IsHSet ((fun _ : amal_type => P) x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall w : Words, (fun _ : amal_type => P) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (h1 h2 : H), DPath (fun _ : amal_type => P) (amal_mu_H x y h1 h2) (?e (x ++ [inl h1, inl h2] ++ y)) (?e (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (k1 k2 : K), DPath (fun _ : amal_type => P) (amal_mu_K x y k1 k2) (?e (x ++ [inr k1, inr k2] ++ y)) (?e (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (z : G), DPath (fun _ : amal_type => P) (amal_tau x y z) (?e (x ++ [inl (f z)] ++ y)) (?e (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_H x y) (?e (x ++ [inl 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_K x y) (?e (x ++ [inr 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)

forall w : Words, (fun _ : amal_type => P) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (h1 h2 : H), DPath (fun _ : amal_type => P) (amal_mu_H x y h1 h2) (?e (x ++ [inl h1, inl h2] ++ y)) (?e (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (k1 k2 : K), DPath (fun _ : amal_type => P) (amal_mu_K x y k1 k2) (?e (x ++ [inr k1, inr k2] ++ y)) (?e (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (z : G), DPath (fun _ : amal_type => P) (amal_tau x y z) (?e (x ++ [inl (f z)] ++ y)) (?e (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_H x y) (?e (x ++ [inl 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_K x y) (?e (x ++ [inr 1] ++ y)) (?e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)

forall (x y : Words) (h1 h2 : H), DPath (fun _ : amal_type => P) (amal_mu_H x y h1 h2) (e (x ++ [inl h1, inl h2] ++ y)) (e (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (k1 k2 : K), DPath (fun _ : amal_type => P) (amal_mu_K x y k1 k2) (e (x ++ [inr k1, inr k2] ++ y)) (e (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall (x y : Words) (z : G), DPath (fun _ : amal_type => P) (amal_tau x y z) (e (x ++ [inl (f z)] ++ y)) (e (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_H x y) (e (x ++ [inl 1] ++ y)) (e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x y : Words) (h1 h2 : H), e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
ek: forall (x y : Words) (k1 k2 : K), e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
t: forall (x y : Words) (z : G), e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
oh: forall x y : Words, e (x ++ [inl 1] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr 1] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_K x y) (e (x ++ [inr 1] ++ y)) (e (x ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h0 h3 : H), e (x0 ++ [inl h0, inl h3] ++ y0) = e (x0 ++ [inl (h0 * h3)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
h1, h2: H

e (x ++ [inl h1, inl h2] ++ y) = e (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k0 k3 : K), e (x0 ++ [inr k0, inr k3] ++ y0) = e (x0 ++ [inr (k0 * k3)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
k1, k2: K
e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z0 : G), e (x0 ++ [inl (f z0)] ++ y0) = e (x0 ++ [inr (g z0)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
z: G
e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
e (x ++ [inl 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
e (x ++ [inr 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k0 k3 : K), e (x0 ++ [inr k0, inr k3] ++ y0) = e (x0 ++ [inr (k0 * k3)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
k1, k2: K

e (x ++ [inr k1, inr k2] ++ y) = e (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z0 : G), e (x0 ++ [inl (f z0)] ++ y0) = e (x0 ++ [inr (g z0)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
z: G
e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
e (x ++ [inl 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
e (x ++ [inr 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z0 : G), e (x0 ++ [inl (f z0)] ++ y0) = e (x0 ++ [inr (g z0)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
z: G

e (x ++ [inl (f z)] ++ y) = e (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
e (x ++ [inl 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
e (x ++ [inr 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words

e (x ++ [inl 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words
e (x ++ [inr 1] ++ y) = e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Type
IsHSet0: IsHSet P
e: Words -> P
eh: forall (x0 y0 : Words) (h1 h2 : H), e (x0 ++ [inl h1, inl h2] ++ y0) = e (x0 ++ [inl (h1 * h2)] ++ y0)
ek: forall (x0 y0 : Words) (k1 k2 : K), e (x0 ++ [inr k1, inr k2] ++ y0) = e (x0 ++ [inr (k1 * k2)] ++ y0)
t: forall (x0 y0 : Words) (z : G), e (x0 ++ [inl (f z)] ++ y0) = e (x0 ++ [inr (g z)] ++ y0)
oh: forall x0 y0 : Words, e (x0 ++ [inl 1] ++ y0) = e (x0 ++ y0)
ok: forall x0 y0 : Words, e (x0 ++ [inr 1] ++ y0) = e (x0 ++ y0)
x, y: Words

e (x ++ [inr 1] ++ y) = e (x ++ y)
apply ok. Defined. (** Now for the group structure *) (** We will frequently need to use that path types in [amal_type] are hprops, and so it speeds things up to create this instance. It is fast to use [_] here, but when the terms are large below, it becomes slower. *) Local Instance ishprop_paths_amal_type (x y : amal_type) : IsHProp (x = y) := _. (** The group operation is concatenation of the underlying list. Most of the work is spent showing that it respects the path constructors. *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

SgOp amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

SgOp amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
y: amal_type

amal_type -> amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_type -> amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words) (h1 h2 : H), (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inl h1, inl h2] ++ y0) = (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inl (h1 * h2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words) (k1 k2 : K), (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inr k1, inr k2] ++ y0) = (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words) (z : G), (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inl (f z)] ++ y0) = (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inl 1] ++ y0) = (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ [inr 1] ++ y0) = (fun x0 : Words => ?Goal@{x:=x0} y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_type -> amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall (y0 : Words) (h1 h2 : H), (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inl h1, inl h2] ++ y0) = (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inl (h1 * h2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall (y0 : Words) (k1 k2 : K), (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inr k1, inr k2] ++ y0) = (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall (y0 : Words) (z : G), (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inl (f z)] ++ y0) = (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inl 1] ++ y0) = (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ [inr 1] ++ y0) = (fun y1 : Words => ?Goal4@{y:=y1}) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (h1 h2 : H), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl h1, inl h2] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl (h1 * h2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall (y0 : Words) (k1 k2 : K), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr k1, inr k2] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall (y0 : Words) (z : G), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl (f z)] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (h1 h2 : H), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl h1, inl h2] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl (h1 * h2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
h1, h2: H

(fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inl h1, inl h2] ++ z) = (fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inl (h1 * h2)] ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
h1, h2: H

x ++ y ++ [inl h1, inl h2] ++ z = ?Goal8
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
h1, h2: H
amal_eta ?Goal8 = amal_eta ?Goal11
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
h1, h2: H
x ++ y ++ [inl (h1 * h2)] ++ z = ?Goal11
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
h1, h2: H

amal_eta ((x ++ y) ++ [inl h1, inl h2] ++ z) = amal_eta ((x ++ y) ++ [inl (h1 * h2)] ++ z)
rapply amal_mu_H.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (k1 k2 : K), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr k1, inr k2] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall (y0 : Words) (z : G), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl (f z)] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (k1 k2 : K), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr k1, inr k2] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
k1, k2: K

(fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inr k1, inr k2] ++ z) = (fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inr (k1 * k2)] ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
k1, k2: K

x ++ y ++ [inr k1, inr k2] ++ z = ?Goal7
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
k1, k2: K
amal_eta ?Goal7 = amal_eta ?Goal10
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
k1, k2: K
x ++ y ++ [inr (k1 * k2)] ++ z = ?Goal10
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
k1, k2: K

amal_eta ((x ++ y) ++ [inr k1, inr k2] ++ z) = amal_eta ((x ++ y) ++ [inr (k1 * k2)] ++ z)
rapply amal_mu_K.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (z : G), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl (f z)] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (z : G), (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl (f z)] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, w: Words
z: G

(fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inl (f z)] ++ w) = (fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inr (g z)] ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, w: Words
z: G

x ++ y ++ [inl (f z)] ++ w = ?Goal6
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, w: Words
z: G
amal_eta ?Goal6 = amal_eta ?Goal9
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, w: Words
z: G
x ++ y ++ [inr (g z)] ++ w = ?Goal9
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, w: Words
z: G

amal_eta ((x ++ y) ++ [inl (f z)] ++ w) = amal_eta ((x ++ y) ++ [inr (g z)] ++ w)
apply amal_tau.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inl 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words

(fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inl 1] ++ z) = (fun y0 : Words => amal_eta (x ++ y0)) (y ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words

x ++ y ++ [inl 1] ++ z = ?Goal5
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
amal_eta ?Goal5 = amal_eta ?Goal8
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
x ++ y ++ z = ?Goal8
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words

amal_eta ((x ++ y) ++ [inl 1] ++ z) = amal_eta ((x ++ y) ++ z)
apply amal_omega_H.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall y0 : Words, (fun y1 : Words => amal_eta (x ++ y1)) (y ++ [inr 1] ++ y0) = (fun y1 : Words => amal_eta (x ++ y1)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words

(fun y0 : Words => amal_eta (x ++ y0)) (y ++ [inr 1] ++ z) = (fun y0 : Words => amal_eta (x ++ y0)) (y ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words

x ++ y ++ [inr 1] ++ z = ?Goal4
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
amal_eta ?Goal4 = amal_eta ?Goal7
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words
x ++ y ++ z = ?Goal7
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words

amal_eta ((x ++ y) ++ [inr 1] ++ z) = amal_eta ((x ++ y) ++ z)
apply amal_omega_K. }
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words) (h1 h2 : H), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h0, inl h3] ++ z)) @ amal_mu_H (x0 ++ y1) z h0 h3) @ ap amal_eta (app_assoc x0 y1 ([inl (h0 * h3)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl h1, inl h2] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h0, inl h3] ++ z)) @ amal_mu_H (x0 ++ y1) z h0 h3) @ ap amal_eta (app_assoc x0 y1 ([inl (h0 * h3)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl (h1 * h2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words) (k1 k2 : K), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y1) z k0 k3) @ ap amal_eta (app_assoc x0 y1 ([inr (k0 * k3)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr k1, inr k2] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y1) z k0 k3) @ ap amal_eta (app_assoc x0 y1 ([inr (k0 * k3)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words) (z : G), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words) (h1 h2 : H), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h0, inl h3] ++ z)) @ amal_mu_H (x0 ++ y1) z h0 h3) @ ap amal_eta (app_assoc x0 y1 ([inl (h0 * h3)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl h1, inl h2] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h0, inl h3] ++ z)) @ amal_mu_H (x0 ++ y1) z h0 h3) @ ap amal_eta (app_assoc x0 y1 ([inl (h0 * h3)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl (h1 * h2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

forall r : amal_type, (fun x0 : Words => amal_type_rec amal_type (fun y0 : Words => amal_eta (x0 ++ y0)) (fun (y0 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc x0 y0 ([inl h0, inl h3] ++ z)) @ amal_mu_H (x0 ++ y0) z h0 h3) @ ap amal_eta (app_assoc x0 y0 ([inl (h0 * h3)] ++ z))^) (fun (y0 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y0 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y0) z k1 k2) @ ap amal_eta (app_assoc x0 y0 ([inr (k1 * k2)] ++ z))^) (fun (y0 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y0 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y0) w z) @ ap amal_eta (app_assoc x0 y0 ([inr (g z)] ++ w))^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) r) (x ++ [inl h1, inl h2] ++ y) = (fun x0 : Words => amal_type_rec amal_type (fun y0 : Words => amal_eta (x0 ++ y0)) (fun (y0 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc x0 y0 ([inl h0, inl h3] ++ z)) @ amal_mu_H (x0 ++ y0) z h0 h3) @ ap amal_eta (app_assoc x0 y0 ([inl (h0 * h3)] ++ z))^) (fun (y0 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y0 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y0) z k1 k2) @ ap amal_eta (app_assoc x0 y0 ([inr (k1 * k2)] ++ z))^) (fun (y0 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y0 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y0) w z) @ ap amal_eta (app_assoc x0 y0 ([inr (g z)] ++ w))^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) r) (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

forall w : Words, amal_type_rec amal_type (fun y0 : Words => amal_eta ((x ++ [inl h1, inl h2] ++ y) ++ y0)) (fun (y0 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inl h0, inl h3] ++ z)) @ amal_mu_H ((x ++ [inl h1, inl h2] ++ y) ++ y0) z h0 h3) @ ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inl (h0 * h3)] ++ z))^) (fun (y0 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inr k1, inr k2] ++ z)) @ amal_mu_K ((x ++ [inl h1, inl h2] ++ y) ++ y0) z k1 k2) @ ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inr (k1 * k2)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inl (f z)] ++ w0)) @ amal_tau ((x ++ [inl h1, inl h2] ++ y) ++ y0) w0 z) @ ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inl mon_unit] ++ z)) @ amal_omega_H ((x ++ [inl h1, inl h2] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 ([inr mon_unit] ++ z)) @ amal_omega_K ((x ++ [inl h1, inl h2] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inl h1, inl h2] ++ y) y0 z)^) (amal_eta w) = amal_type_rec amal_type (fun y0 : Words => amal_eta ((x ++ [inl (h1 * h2)] ++ y) ++ y0)) (fun (y0 z : Words) (h0 h3 : H) => (ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inl h0, inl h3] ++ z)) @ amal_mu_H ((x ++ [inl (h1 * h2)] ++ y) ++ y0) z h0 h3) @ ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inl (h0 * h3)] ++ z))^) (fun (y0 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inr k1, inr k2] ++ z)) @ amal_mu_K ((x ++ [inl (h1 * h2)] ++ y) ++ y0) z k1 k2) @ ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inr (k1 * k2)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inl (f z)] ++ w0)) @ amal_tau ((x ++ [inl (h1 * h2)] ++ y) ++ y0) w0 z) @ ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inl mon_unit] ++ z)) @ amal_omega_H ((x ++ [inl (h1 * h2)] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 ([inr mon_unit] ++ z)) @ amal_omega_K ((x ++ [inl (h1 * h2)] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inl (h1 * h2)] ++ y) y0 z)^) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words

amal_eta ((x ++ [inl h1, inl h2] ++ y) ++ z) = amal_eta ((x ++ [inl (h1 * h2)] ++ y) ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words

?Goal3 = (x ++ [inl h1, inl h2] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words
amal_eta ?Goal3 = amal_eta ?Goal6
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words
?Goal6 = (x ++ [inl (h1 * h2)] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words

amal_eta (x ++ ([inl h1, inl h2] ++ y) ++ z) = amal_eta (x ++ ([inl (h1 * h2)] ++ y) ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words

?Goal3 = ([inl h1, inl h2] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words
amal_eta (x ++ ?Goal3) = amal_eta (x ++ ?Goal6)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words
?Goal6 = ([inl (h1 * h2)] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
z: Words

amal_eta (x ++ [inl h1, inl h2] ++ y ++ z) = amal_eta (x ++ [inl (h1 * h2)] ++ y ++ z)
apply amal_mu_H.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words) (k1 k2 : K), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y1) z k0 k3) @ ap amal_eta (app_assoc x0 y1 ([inr (k0 * k3)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr k1, inr k2] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y1) z k0 k3) @ ap amal_eta (app_assoc x0 y1 ([inr (k0 * k3)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words) (z : G), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words) (k1 k2 : K), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y1) z k0 k3) @ ap amal_eta (app_assoc x0 y1 ([inr (k0 * k3)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr k1, inr k2] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y1) z k0 k3) @ ap amal_eta (app_assoc x0 y1 ([inr (k0 * k3)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr (k1 * k2)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

forall r : amal_type, (fun x0 : Words => amal_type_rec amal_type (fun y0 : Words => amal_eta (x0 ++ y0)) (fun (y0 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y0 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y0) z h1 h2) @ ap amal_eta (app_assoc x0 y0 ([inl (h1 * h2)] ++ z))^) (fun (y0 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y0 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y0) z k0 k3) @ ap amal_eta (app_assoc x0 y0 ([inr (k0 * k3)] ++ z))^) (fun (y0 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y0 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y0) w z) @ ap amal_eta (app_assoc x0 y0 ([inr (g z)] ++ w))^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) r) (x ++ [inr k1, inr k2] ++ y) = (fun x0 : Words => amal_type_rec amal_type (fun y0 : Words => amal_eta (x0 ++ y0)) (fun (y0 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y0 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y0) z h1 h2) @ ap amal_eta (app_assoc x0 y0 ([inl (h1 * h2)] ++ z))^) (fun (y0 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc x0 y0 ([inr k0, inr k3] ++ z)) @ amal_mu_K (x0 ++ y0) z k0 k3) @ ap amal_eta (app_assoc x0 y0 ([inr (k0 * k3)] ++ z))^) (fun (y0 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y0 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y0) w z) @ ap amal_eta (app_assoc x0 y0 ([inr (g z)] ++ w))^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc x0 y0 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y0) z) @ ap amal_eta (app_assoc x0 y0 z)^) r) (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

forall w : Words, amal_type_rec amal_type (fun y0 : Words => amal_eta ((x ++ [inr k1, inr k2] ++ y) ++ y0)) (fun (y0 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inl h1, inl h2] ++ z)) @ amal_mu_H ((x ++ [inr k1, inr k2] ++ y) ++ y0) z h1 h2) @ ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inl (h1 * h2)] ++ z))^) (fun (y0 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inr k0, inr k3] ++ z)) @ amal_mu_K ((x ++ [inr k1, inr k2] ++ y) ++ y0) z k0 k3) @ ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inr (k0 * k3)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inl (f z)] ++ w0)) @ amal_tau ((x ++ [inr k1, inr k2] ++ y) ++ y0) w0 z) @ ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inl mon_unit] ++ z)) @ amal_omega_H ((x ++ [inr k1, inr k2] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 ([inr mon_unit] ++ z)) @ amal_omega_K ((x ++ [inr k1, inr k2] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inr k1, inr k2] ++ y) y0 z)^) (amal_eta w) = amal_type_rec amal_type (fun y0 : Words => amal_eta ((x ++ [inr (k1 * k2)] ++ y) ++ y0)) (fun (y0 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inl h1, inl h2] ++ z)) @ amal_mu_H ((x ++ [inr (k1 * k2)] ++ y) ++ y0) z h1 h2) @ ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inl (h1 * h2)] ++ z))^) (fun (y0 z : Words) (k0 k3 : K) => (ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inr k0, inr k3] ++ z)) @ amal_mu_K ((x ++ [inr (k1 * k2)] ++ y) ++ y0) z k0 k3) @ ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inr (k0 * k3)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inl (f z)] ++ w0)) @ amal_tau ((x ++ [inr (k1 * k2)] ++ y) ++ y0) w0 z) @ ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inl mon_unit] ++ z)) @ amal_omega_H ((x ++ [inr (k1 * k2)] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 ([inr mon_unit] ++ z)) @ amal_omega_K ((x ++ [inr (k1 * k2)] ++ y) ++ y0) z) @ ap amal_eta (app_assoc (x ++ [inr (k1 * k2)] ++ y) y0 z)^) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words

amal_eta ((x ++ [inr k1, inr k2] ++ y) ++ z) = amal_eta ((x ++ [inr (k1 * k2)] ++ y) ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words

?Goal2 = (x ++ [inr k1, inr k2] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words
amal_eta ?Goal2 = amal_eta ?Goal5
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words
?Goal5 = (x ++ [inr (k1 * k2)] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words

amal_eta (x ++ ([inr k1, inr k2] ++ y) ++ z) = amal_eta (x ++ ([inr (k1 * k2)] ++ y) ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words

?Goal2 = ([inr k1, inr k2] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words
amal_eta (x ++ ?Goal2) = amal_eta (x ++ ?Goal5)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words
?Goal5 = ([inr (k1 * k2)] ++ y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
z: Words

amal_eta (x ++ [inr k1, inr k2] ++ y ++ z) = amal_eta (x ++ [inr (k1 * k2)] ++ y ++ z)
apply amal_mu_K.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words) (z : G), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words) (z : G), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y1) z0 h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y1) z0 k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y1) w z0) @ ap amal_eta (app_assoc x0 y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y1) z0) @ ap amal_eta (app_assoc x0 y1 z0)^) y) (x ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

forall r : amal_type, (fun x0 : Words => amal_type_rec amal_type (fun y0 : Words => amal_eta (x0 ++ y0)) (fun (y0 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y0 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y0) z0 h1 h2) @ ap amal_eta (app_assoc x0 y0 ([inl (h1 * h2)] ++ z0))^) (fun (y0 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y0 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y0) z0 k1 k2) @ ap amal_eta (app_assoc x0 y0 ([inr (k1 * k2)] ++ z0))^) (fun (y0 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y0 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y0) w z0) @ ap amal_eta (app_assoc x0 y0 ([inr (g z0)] ++ w))^) (fun y0 z0 : Words => (ap amal_eta (app_assoc x0 y0 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y0) z0) @ ap amal_eta (app_assoc x0 y0 z0)^) (fun y0 z0 : Words => (ap amal_eta (app_assoc x0 y0 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y0) z0) @ ap amal_eta (app_assoc x0 y0 z0)^) r) (x ++ [inl (f z)] ++ y) = (fun x0 : Words => amal_type_rec amal_type (fun y0 : Words => amal_eta (x0 ++ y0)) (fun (y0 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y0 ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y0) z0 h1 h2) @ ap amal_eta (app_assoc x0 y0 ([inl (h1 * h2)] ++ z0))^) (fun (y0 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y0 ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y0) z0 k1 k2) @ ap amal_eta (app_assoc x0 y0 ([inr (k1 * k2)] ++ z0))^) (fun (y0 w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y0 ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y0) w z0) @ ap amal_eta (app_assoc x0 y0 ([inr (g z0)] ++ w))^) (fun y0 z0 : Words => (ap amal_eta (app_assoc x0 y0 ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y0) z0) @ ap amal_eta (app_assoc x0 y0 z0)^) (fun y0 z0 : Words => (ap amal_eta (app_assoc x0 y0 ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y0) z0) @ ap amal_eta (app_assoc x0 y0 z0)^) r) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

forall w : Words, amal_type_rec amal_type (fun y0 : Words => amal_eta ((x ++ [inl (f z)] ++ y) ++ y0)) (fun (y0 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inl h1, inl h2] ++ z0)) @ amal_mu_H ((x ++ [inl (f z)] ++ y) ++ y0) z0 h1 h2) @ ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inl (h1 * h2)] ++ z0))^) (fun (y0 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inr k1, inr k2] ++ z0)) @ amal_mu_K ((x ++ [inl (f z)] ++ y) ++ y0) z0 k1 k2) @ ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inr (k1 * k2)] ++ z0))^) (fun (y0 w0 : Words) (z0 : G) => (ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inl (f z)] ++ y) ++ y0) w0 z0) @ ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inr (g z0)] ++ w0))^) (fun y0 z0 : Words => (ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inl (f z)] ++ y) ++ y0) z0) @ ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 z0)^) (fun y0 z0 : Words => (ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inl (f z)] ++ y) ++ y0) z0) @ ap amal_eta (app_assoc (x ++ [inl (f z)] ++ y) y0 z0)^) (amal_eta w) = amal_type_rec amal_type (fun y0 : Words => amal_eta ((x ++ [inr (g z)] ++ y) ++ y0)) (fun (y0 z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inl h1, inl h2] ++ z0)) @ amal_mu_H ((x ++ [inr (g z)] ++ y) ++ y0) z0 h1 h2) @ ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inl (h1 * h2)] ++ z0))^) (fun (y0 z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inr k1, inr k2] ++ z0)) @ amal_mu_K ((x ++ [inr (g z)] ++ y) ++ y0) z0 k1 k2) @ ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inr (k1 * k2)] ++ z0))^) (fun (y0 w0 : Words) (z0 : G) => (ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inr (g z)] ++ y) ++ y0) w0 z0) @ ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inr (g z0)] ++ w0))^) (fun y0 z0 : Words => (ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inr (g z)] ++ y) ++ y0) z0) @ ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 z0)^) (fun y0 z0 : Words => (ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inr (g z)] ++ y) ++ y0) z0) @ ap amal_eta (app_assoc (x ++ [inr (g z)] ++ y) y0 z0)^) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words

amal_eta ((x ++ [inl (f z)] ++ y) ++ w) = amal_eta ((x ++ [inr (g z)] ++ y) ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words

?Goal1 = (x ++ [inl (f z)] ++ y) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words
amal_eta ?Goal1 = amal_eta ?Goal4
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words
?Goal4 = (x ++ [inr (g z)] ++ y) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words

amal_eta (x ++ ([inl (f z)] ++ y) ++ w) = amal_eta (x ++ ([inr (g z)] ++ y) ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words

?Goal1 = ([inl (f z)] ++ y) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words
amal_eta (x ++ ?Goal1) = amal_eta (x ++ ?Goal4)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words
?Goal4 = ([inr (g z)] ++ y) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
w: Words

amal_eta (x ++ [inl (f z)] ++ y ++ w) = amal_eta (x ++ [inr (g z)] ++ y ++ w)
apply amal_tau.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inl 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

forall r : amal_type, (fun x0 : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x0 ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y) z0 h1 h2) @ ap amal_eta (app_assoc x0 y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y) z0 k1 k2) @ ap amal_eta (app_assoc x0 y ([inr (k1 * k2)] ++ z0))^) (fun (y w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y) w z0) @ ap amal_eta (app_assoc x0 y ([inr (g z0)] ++ w))^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) r) (x ++ [inl 1] ++ z) = (fun x0 : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x0 ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y) z0 h1 h2) @ ap amal_eta (app_assoc x0 y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y) z0 k1 k2) @ ap amal_eta (app_assoc x0 y ([inr (k1 * k2)] ++ z0))^) (fun (y w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y) w z0) @ ap amal_eta (app_assoc x0 y ([inr (g z0)] ++ w))^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) r) (x ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

forall w : Words, amal_type_rec amal_type (fun y : Words => amal_eta ((x ++ [inl 1] ++ z) ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inl h1, inl h2] ++ z0)) @ amal_mu_H ((x ++ [inl mon_unit] ++ z) ++ y) z0 h1 h2) @ ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inr k1, inr k2] ++ z0)) @ amal_mu_K ((x ++ [inl mon_unit] ++ z) ++ y) z0 k1 k2) @ ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inl mon_unit] ++ z) ++ y) w0 z0) @ ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inl mon_unit] ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inl mon_unit] ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ [inl mon_unit] ++ z) y z0)^) (amal_eta w) = amal_type_rec amal_type (fun y : Words => amal_eta ((x ++ z) ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ z) y ([inl h1, inl h2] ++ z0)) @ amal_mu_H ((x ++ z) ++ y) z0 h1 h2) @ ap amal_eta (app_assoc (x ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ z) y ([inr k1, inr k2] ++ z0)) @ amal_mu_K ((x ++ z) ++ y) z0 k1 k2) @ ap amal_eta (app_assoc (x ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (app_assoc (x ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ z) ++ y) w0 z0) @ ap amal_eta (app_assoc (x ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ z) y z0)^) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

amal_eta ((x ++ [inl 1] ++ z) ++ w) = amal_eta ((x ++ z) ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

?Goal0 = (x ++ [inl 1] ++ z) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words
amal_eta ?Goal0 = amal_eta ?Goal3
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words
?Goal3 = (x ++ z) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

amal_eta (x ++ ([inl 1] ++ z) ++ w) = amal_eta (x ++ z ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

?Goal0 = ([inl 1] ++ z) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words
amal_eta (x ++ ?Goal0) = amal_eta (x ++ z ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

amal_eta (x ++ [inl 1] ++ z ++ w) = amal_eta (x ++ z ++ w)
apply amal_omega_H.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

forall (y : amal_type) (y0 : Words), (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ [inr 1] ++ y0) = (fun x0 : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x0 ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y1 ([inl h1, inl h2] ++ z)) @ amal_mu_H (x0 ++ y1) z h1 h2) @ ap amal_eta (app_assoc x0 y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y1 ([inr k1, inr k2] ++ z)) @ amal_mu_K (x0 ++ y1) z k1 k2) @ ap amal_eta (app_assoc x0 y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (app_assoc x0 y1 ([inl (f z)] ++ w)) @ amal_tau (x0 ++ y1) w z) @ ap amal_eta (app_assoc x0 y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) (fun y1 z : Words => (ap amal_eta (app_assoc x0 y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x0 ++ y1) z) @ ap amal_eta (app_assoc x0 y1 z)^) y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

forall r : amal_type, (fun x0 : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x0 ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y) z0 h1 h2) @ ap amal_eta (app_assoc x0 y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y) z0 k1 k2) @ ap amal_eta (app_assoc x0 y ([inr (k1 * k2)] ++ z0))^) (fun (y w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y) w z0) @ ap amal_eta (app_assoc x0 y ([inr (g z0)] ++ w))^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) r) (x ++ [inr 1] ++ z) = (fun x0 : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x0 ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc x0 y ([inl h1, inl h2] ++ z0)) @ amal_mu_H (x0 ++ y) z0 h1 h2) @ ap amal_eta (app_assoc x0 y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc x0 y ([inr k1, inr k2] ++ z0)) @ amal_mu_K (x0 ++ y) z0 k1 k2) @ ap amal_eta (app_assoc x0 y ([inr (k1 * k2)] ++ z0))^) (fun (y w : Words) (z0 : G) => (ap amal_eta (app_assoc x0 y ([inl (f z0)] ++ w)) @ amal_tau (x0 ++ y) w z0) @ ap amal_eta (app_assoc x0 y ([inr (g z0)] ++ w))^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inl mon_unit] ++ z0)) @ amal_omega_H (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc x0 y ([inr mon_unit] ++ z0)) @ amal_omega_K (x0 ++ y) z0) @ ap amal_eta (app_assoc x0 y z0)^) r) (x ++ z)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

forall w : Words, amal_type_rec amal_type (fun y : Words => amal_eta ((x ++ [inr 1] ++ z) ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inl h1, inl h2] ++ z0)) @ amal_mu_H ((x ++ [inr mon_unit] ++ z) ++ y) z0 h1 h2) @ ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inr k1, inr k2] ++ z0)) @ amal_mu_K ((x ++ [inr mon_unit] ++ z) ++ y) z0 k1 k2) @ ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inr mon_unit] ++ z) ++ y) w0 z0) @ ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inr mon_unit] ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inr mon_unit] ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ [inr mon_unit] ++ z) y z0)^) (amal_eta w) = amal_type_rec amal_type (fun y : Words => amal_eta ((x ++ z) ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (app_assoc (x ++ z) y ([inl h1, inl h2] ++ z0)) @ amal_mu_H ((x ++ z) ++ y) z0 h1 h2) @ ap amal_eta (app_assoc (x ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (app_assoc (x ++ z) y ([inr k1, inr k2] ++ z0)) @ amal_mu_K ((x ++ z) ++ y) z0 k1 k2) @ ap amal_eta (app_assoc (x ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (app_assoc (x ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ z) ++ y) w0 z0) @ ap amal_eta (app_assoc (x ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (app_assoc (x ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ z) ++ y) z0) @ ap amal_eta (app_assoc (x ++ z) y z0)^) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

amal_eta ((x ++ [inr 1] ++ z) ++ w) = amal_eta ((x ++ z) ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

?Goal = (x ++ [inr 1] ++ z) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words
?Goal2 = (x ++ z) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

amal_eta (x ++ ([inr 1] ++ z) ++ w) = amal_eta (x ++ z ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

?Goal = ([inr 1] ++ z) ++ w
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words
amal_eta (x ++ ?Goal) = amal_eta (x ++ z ++ w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z, w: Words

amal_eta (x ++ [inr 1] ++ z ++ w) = amal_eta (x ++ z ++ w)
apply amal_omega_K. } Defined. (** The identity element is the empty list *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

MonUnit amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

MonUnit amal_type
exact (amal_eta nil). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Inverse amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Inverse amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Words -> amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall (x y : Words) (h1 h2 : H), ?e (x ++ [inl h1, inl h2] ++ y) = ?e (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall (x y : Words) (k1 k2 : K), ?e (x ++ [inr k1, inr k2] ++ y) = ?e (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall (x y : Words) (z : G), ?e (x ++ [inl (f z)] ++ y) = ?e (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, ?e (x ++ [inl 1] ++ y) = ?e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, ?e (x ++ [inr 1] ++ y) = ?e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Words -> amal_type
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
w: Words

amal_type
exact (amal_eta (word_inverse w)).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall (x y : Words) (h1 h2 : H), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl h1, inl h2] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall (x y : Words) (k1 k2 : K), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr k1, inr k2] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall (x y : Words) (z : G), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl (f z)] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall (x y : Words) (h1 h2 : H), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl h1, inl h2] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

amal_eta (word_inverse (x ++ [inl h1, inl h2] ++ y)) = amal_eta (word_inverse (x ++ [inl (h1 * h2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

word_inverse (x ++ [inl h1, inl h2] ++ y) = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
word_inverse (x ++ [inl (h1 * h2)] ++ y) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

word_inverse ([inl h1, inl h2] ++ y) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
word_inverse ([inl (h1 * h2)] ++ y) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
amal_eta (?Goal0 ++ word_inverse x) = amal_eta (?Goal2 ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

word_inverse ([inl (h1 * h2)] ++ y) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
amal_eta ((word_inverse y ++ word_inverse [inl h1, inl h2]) ++ word_inverse x) = amal_eta (?Goal0 ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

word_inverse ([inl (h1 * h2)] ++ y) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

word_inverse y ++ word_inverse [inl (h1 * h2)] = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

[inl (h1 * h2)^] = ?y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

inl (h1 * h2)^ = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

(h1 * h2)^ = ?y
apply inverse_sg_op.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

amal_eta ((word_inverse y ++ word_inverse [inl h1, inl h2]) ++ word_inverse x) = amal_eta ((word_inverse y ++ [inl (h2^ * h1^)]) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

amal_eta ((word_inverse y ++ [inl h2^, inl h1^]) ++ word_inverse x) = amal_eta ((word_inverse y ++ [inl (h2^ * h1^)]) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

?Goal = (word_inverse y ++ [inl h2^, inl h1^]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H
?Goal2 = (word_inverse y ++ [inl (h2^ * h1^)]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
h1, h2: H

amal_eta (word_inverse y ++ [inl h2^, inl h1^] ++ word_inverse x) = amal_eta (word_inverse y ++ [inl (h2^ * h1^)] ++ word_inverse x)
apply amal_mu_H.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall (x y : Words) (k1 k2 : K), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr k1, inr k2] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall (x y : Words) (z : G), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl (f z)] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall (x y : Words) (k1 k2 : K), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr k1, inr k2] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

amal_eta (word_inverse (x ++ [inr k1, inr k2] ++ y)) = amal_eta (word_inverse (x ++ [inr (k1 * k2)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

word_inverse (x ++ [inr k1, inr k2] ++ y) = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
word_inverse (x ++ [inr (k1 * k2)] ++ y) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

word_inverse ([inr k1, inr k2] ++ y) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
word_inverse ([inr (k1 * k2)] ++ y) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
amal_eta (?Goal0 ++ word_inverse x) = amal_eta (?Goal2 ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

word_inverse ([inr (k1 * k2)] ++ y) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
amal_eta ((word_inverse y ++ word_inverse [inr k1, inr k2]) ++ word_inverse x) = amal_eta (?Goal0 ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

word_inverse ([inr (k1 * k2)] ++ y) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

word_inverse y ++ word_inverse [inr (k1 * k2)] = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

[inr (k1 * k2)^] = ?y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

inr (k1 * k2)^ = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

(k1 * k2)^ = ?y
apply inverse_sg_op.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

amal_eta ((word_inverse y ++ word_inverse [inr k1, inr k2]) ++ word_inverse x) = amal_eta ((word_inverse y ++ [inr (k2^ * k1^)]) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

amal_eta ((word_inverse y ++ [inr k2^, inr k1^]) ++ word_inverse x) = amal_eta ((word_inverse y ++ [inr (k2^ * k1^)]) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

?Goal = (word_inverse y ++ [inr k2^, inr k1^]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K
?Goal2 = (word_inverse y ++ [inr (k2^ * k1^)]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
k1, k2: K

amal_eta (word_inverse y ++ [inr k2^, inr k1^] ++ word_inverse x) = amal_eta (word_inverse y ++ [inr (k2^ * k1^)] ++ word_inverse x)
apply amal_mu_K.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall (x y : Words) (z : G), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl (f z)] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall (x y : Words) (z : G), (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl (f z)] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

amal_eta (word_inverse (x ++ [inl (f z)] ++ y)) = amal_eta (word_inverse (x ++ [inr (g z)] ++ y))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

word_inverse (x ++ [inl (f z)] ++ y) = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
word_inverse (x ++ [inr (g z)] ++ y) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

word_inverse ([inl (f z)] ++ y) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
word_inverse ([inr (g z)] ++ y) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
amal_eta (?Goal0 ++ word_inverse x) = amal_eta (?Goal2 ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

[inl (f z)^] = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
[inr (g z)^] = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
amal_eta ((word_inverse y ++ ?Goal0) ++ word_inverse x) = amal_eta ((word_inverse y ++ ?Goal2) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

inl (f z)^ = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
inr (g z)^ = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
amal_eta ((word_inverse y ++ [?Goal0]) ++ word_inverse x) = amal_eta ((word_inverse y ++ [?Goal2]) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

(f z)^ = ?y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
(g z)^ = ?y0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
amal_eta ((word_inverse y ++ [inl ?y]) ++ word_inverse x) = amal_eta ((word_inverse y ++ [inr ?y0]) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

amal_eta ((word_inverse y ++ [inl (f z^)]) ++ word_inverse x) = amal_eta ((word_inverse y ++ [inr (g z^)]) ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

?Goal = (word_inverse y ++ [inl (f z^)]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G
?Goal2 = (word_inverse y ++ [inr (g z^)]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
z: G

amal_eta (word_inverse y ++ [inl (f z^)] ++ word_inverse x) = amal_eta (word_inverse y ++ [inr (g z^)] ++ word_inverse x)
apply amal_tau.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inl 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse (x ++ [inl 1] ++ z)) = amal_eta (word_inverse (x ++ z))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse (x ++ [inl 1] ++ z) = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
word_inverse (x ++ z) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse ([inl 1] ++ z) ++ word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inl 1] ++ z) ++ word_inverse x = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
amal_eta ?Goal = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inl 1] ++ z) ++ word_inverse x = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inl 1] ++ z) = ?Goal0
apply word_inverse_ww.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta ((word_inverse z ++ word_inverse [inl 1]) ++ word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

?Goal = (word_inverse z ++ word_inverse [inl 1]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
amal_eta ?Goal = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse z ++ word_inverse [inl 1] ++ word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse z ++ inl 1^ :: word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse z ++ inl 1 :: word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
apply amal_omega_H.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

forall x y : Words, (fun w : Words => amal_eta (word_inverse w)) (x ++ [inr 1] ++ y) = (fun w : Words => amal_eta (word_inverse w)) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse (x ++ [inr 1] ++ z)) = amal_eta (word_inverse (x ++ z))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse (x ++ [inr 1] ++ z) = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
amal_eta ?Goal = amal_eta ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
word_inverse (x ++ z) = ?Goal2
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse ([inr 1] ++ z) ++ word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inr 1] ++ z) ++ word_inverse x = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
amal_eta ?Goal = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inr 1] ++ z) ++ word_inverse x = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inr 1] ++ z) = ?Goal0
apply word_inverse_ww.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta ((word_inverse z ++ word_inverse [inr 1]) ++ word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

?Goal = (word_inverse z ++ word_inverse [inr 1]) ++ word_inverse x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words
amal_eta ?Goal = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse z ++ word_inverse [inr 1] ++ word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse z ++ inr 1^ :: word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

amal_eta (word_inverse z ++ inr 1 :: word_inverse x) = amal_eta (word_inverse z ++ word_inverse x)
apply amal_omega_K. } Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Associative sg_op
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Associative sg_op
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: amal_type

forall z : amal_type, x * (y * z) = x * y * z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: amal_type
z: Words

forall y : amal_type, x * (y * amal_eta z) = x * y * amal_eta z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
z, y: Words

forall x : amal_type, x * (amal_eta y * amal_eta z) = x * amal_eta y * amal_eta z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
z, y, x: Words

amal_eta x * (amal_eta y * amal_eta z) = amal_eta x * amal_eta y * amal_eta z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
z, y, x: Words

x ++ y ++ z = (x ++ y) ++ z
rapply app_assoc. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

LeftIdentity sg_op 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

LeftIdentity sg_op 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

1 * amal_eta x = amal_eta x
reflexivity. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

RightIdentity sg_op 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

RightIdentity sg_op 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_eta x * 1 = amal_eta x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

x ++ nil = x
napply app_nil. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_eta (word_inverse x ++ x) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_eta (word_inverse x ++ x) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

amal_eta (word_inverse nil ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H + K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1
amal_eta (word_inverse (x :: xs) ++ x :: xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H + K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse (x :: xs) ++ x :: xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse (inl h :: xs) ++ inl h :: xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1
amal_eta (word_inverse (inr k :: xs) ++ inr k :: xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse (inl h :: xs) ++ inl h :: xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse ([inl h] ++ xs) ++ [inl h] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta ((word_inverse xs ++ word_inverse [inl h]) ++ [inl h] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ word_inverse [inl h] ++ [inl h] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ [inl (h^ * h)] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ [inl 1] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ xs) = 1
exact IHxs.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse (inr k :: xs) ++ inr k :: xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse ([inr k] ++ xs) ++ [inr k] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta ((word_inverse xs ++ word_inverse [inr k]) ++ [inr k] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ word_inverse [inr k] ++ [inr k] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ [inr (k^ * k)] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ [inr 1] ++ xs) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (word_inverse xs ++ xs) = 1

amal_eta (word_inverse xs ++ xs) = 1
exact IHxs. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_eta (x ++ word_inverse x) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_eta (x ++ word_inverse x) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

amal_eta (nil ++ word_inverse nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H + K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1
amal_eta ((x :: xs) ++ word_inverse (x :: xs)) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H + K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ((x :: xs) ++ word_inverse (x :: xs)) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ((inl h :: xs) ++ word_inverse (inl h :: xs)) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1
amal_eta ((inr k :: xs) ++ word_inverse (inr k :: xs)) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ((inl h :: xs) ++ word_inverse (inl h :: xs)) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (inl h :: xs ++ word_inverse xs ++ [inl h^]) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (inl h :: (xs ++ word_inverse xs) ++ [inl h^]) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta [inl h] * amal_eta (xs ++ word_inverse xs) * amal_eta [inl h^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta [inl h] * 1 * amal_eta [inl h^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta [inl h] * amal_eta [inl h^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ([inl h] ++ nil) * amal_eta [inl h^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (([inl h] ++ [inl h^]) ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ([inl h] ++ [inl h^] ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inl h] ++ [inl h^] ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inl (h * h^)] ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inl (h * h^)] ++ nil) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1
?Goal0 = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inl (h * h^)] ++ nil) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

[inl (h * h^)] ++ nil = ?y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

[inl (h * h^)] = ?Goal1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

inl (h * h^) = ?Goal1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

h * h^ = ?y
apply right_inverse.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
h: H
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inl 1] ++ nil) = 1
apply amal_omega_H.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ((inr k :: xs) ++ word_inverse (inr k :: xs)) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (inr k :: xs ++ word_inverse xs ++ [inr k^]) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (inr k :: (xs ++ word_inverse xs) ++ [inr k^]) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta [inr k] * amal_eta (xs ++ word_inverse xs) * amal_eta [inr k^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta [inr k] * 1 * amal_eta [inr k^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta [inr k] * amal_eta [inr k^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ([inr k] ++ nil) * amal_eta [inr k^] = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (([inr k] ++ [inr k^]) ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta ([inr k] ++ [inr k^] ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inr k] ++ [inr k^] ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inr (k * k^)] ++ nil) = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inr (k * k^)] ++ nil) = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1
?Goal = 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inr (k * k^)] ++ nil) = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

[inr (k * k^)] ++ nil = ?y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

[inr (k * k^)] = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

inr (k * k^) = ?Goal0
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

k * k^ = ?y
apply right_inverse.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
k: K
xs: list (H + K)
IHxs: amal_eta (xs ++ word_inverse xs) = 1

amal_eta (nil ++ [inr 1] ++ nil) = 1
apply amal_omega_K. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

LeftInverse sg_op inv 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

LeftInverse sg_op inv 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

(amal_eta x)^ * amal_eta x = 1
apply amal_eta_word_concat_Vw. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

RightInverse sg_op inv 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

RightInverse sg_op inv 1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_eta x * (amal_eta x)^ = 1
apply amal_eta_word_concat_wV. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Group
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

Group
snapply (Build_Group amal_type sgop_amal_type); repeat split; exact _. Defined. End AmalgamatedFreeProduct. Arguments amal_eta {G H K f g} x. Arguments amal_mu_H {G H K f g} x y. Arguments amal_mu_K {G H K f g} x y. Arguments amal_tau {G H K f g} x y z. Arguments amal_omega_H {G H K f g} x y. Arguments amal_omega_K {G H K f g} x y. Section RecInd. Context {G H K : Group} {f : GroupHomomorphism G H} {g : GroupHomomorphism G K}. (** Using foldr. It's important that we use foldr as foldl is near impossible to reason about. *)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

AmalgamatedFreeProduct f g -> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

AmalgamatedFreeProduct f g -> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

Words -> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall (x y : Words) (h1 h2 : H), ?e (x ++ [inl h1, inl h2] ++ y) = ?e (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall (x y : Words) (k1 k2 : K), ?e (x ++ [inr k1, inr k2] ++ y) = ?e (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall (x y : Words) (z : G), ?e (x ++ [inl (f z)] ++ y) = ?e (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, ?e (x ++ [inl 1] ++ y) = ?e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, ?e (x ++ [inr 1] ++ y) = ?e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

Words -> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words

X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words

H + K -> X -> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words
X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words

H + K -> X -> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words
l: H
x: X

X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words
r: K
x: X
X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words
l: H
x: X

X
exact (h l * x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words
r: K
x: X

X
exact (k r * x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
w: Words

X
exact mon_unit.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall (x y : Words) (h1 h2 : H), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl h1, inl h2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall (x y : Words) (k1 k2 : K), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr k1, inr k2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall (x y : Words) (z : G), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall (x y : Words) (h1 h2 : H), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl h1, inl h2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
h1, h2: H

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inl h1, inl h2] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inl (h1 * h2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
h1, h2: H

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inl h1, inl h2]) x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inl (h1 * h2)]) x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
h1, h2: H

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inl h1, inl h2] = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inl (h1 * h2)]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
h1, h2: H

h h1 * (h h2 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) = h (h1 * h2) * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
h1, h2: H

h h1 * h h2 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y = h (h1 * h2) * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
h1, h2: H

h h1 * h h2 = h (h1 * h2)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
h1, h2: H

h (h1 * h2) = h h1 * h h2
exact (grp_homo_op h h1 h2).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall (x y : Words) (k1 k2 : K), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr k1, inr k2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall (x y : Words) (z : G), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall (x y : Words) (k1 k2 : K), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr k1, inr k2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
k1, k2: K

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inr k1, inr k2] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inr (k1 * k2)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
k1, k2: K

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inr k1, inr k2]) x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inr (k1 * k2)]) x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
k1, k2: K

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inr k1, inr k2] = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inr (k1 * k2)]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
k1, k2: K

k k1 * (k k2 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) = k (k1 * k2) * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
k1, k2: K

k k1 * k k2 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y = k (k1 * k2) * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
k1, k2: K

k k1 * k k2 = k (k1 * k2)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
k1, k2: K

k (k1 * k2) = k k1 * k k2
exact (grp_homo_op k k1 k2).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall (x y : Words) (z : G), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall (x y : Words) (z : G), (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
z: G

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inl (f z)] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inr (g z)] ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words
z: G

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inl (f z)]) x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inr (g z)]) x
f_ap; simpl; f_ap.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inl 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inl 1] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inl 1]) x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inl 1] = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

h 1 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

1 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
rapply left_identity.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

forall x y : Words, (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ [inr 1] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g0 => (fun (l : H) (x0 : X) => h l * x0) g0 | inr g0 => (fun (r : K) (x0 : X) => k r * x0) g0 end) 1 w) (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ [inr 1] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inr 1]) x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) [inr 1] = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

k 1 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
x, y: Words

1 * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
rapply left_identity. } Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

IsSemiGroupPreserving (AmalgamatedFreeProduct_rec' X h k p)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g

IsSemiGroupPreserving (AmalgamatedFreeProduct_rec' X h k p)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y, x: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (x ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y, x: Words

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y) x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 y
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y, x: Words
s:= fold_right (fun X0 : H + K => match X0 with | inl l => fun x0 : X => h l * x0 | inr r => fun x0 : X => k r * x0 end) 1 y: X

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * s
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y: Words
s:= fold_right (fun X0 : H + K => match X0 with | inl l => fun x0 : X => h l * x0 | inr r => fun x0 : X => k r * x0 end) 1 y: X

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x : X => h g0 * x | inr g0 => fun x : X => k g0 * x end) s nil = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x : X => h g0 * x | inr g0 => fun x : X => k g0 * x end) 1 nil * s
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y: Words
a: H + K
x: list (H + K)
s:= fold_right (fun X0 : H + K => match X0 with | inl l => fun x0 : X => h l * x0 | inr r => fun x0 : X => k r * x0 end) 1 y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * s
fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s (a :: x) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (a :: x) * s
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y: Words
a: H + K
x: list (H + K)
s:= fold_right (fun X0 : H + K => match X0 with | inl l => fun x0 : X => h l * x0 | inr r => fun x0 : X => k r * x0 end) 1 y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * s

fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s (a :: x) = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 (a :: x) * s
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y: Words
a: H + K
x: list (H + K)
s:= fold_right (fun X0 : H + K => match X0 with | inl l => fun x0 : X => h l * x0 | inr r => fun x0 : X => k r * x0 end) 1 y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * s

match a with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s x) = match a with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x) * s
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: GroupHomomorphism H X
k: GroupHomomorphism K X
p: h o f == k o g
y: Words
a: H + K
x: list (H + K)
s:= fold_right (fun X0 : H + K => match X0 with | inl l => fun x0 : X => h l * x0 | inr r => fun x0 : X => k r * x0 end) 1 y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) s x = fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * s

match a with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x * s) = match a with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => h g0 * x0 | inr g0 => fun x0 : X => k g0 * x0 end) 1 x) * s
destruct a; apply simple_associativity. Qed.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: H $-> X
k: K $-> X
p: h $o f $== k $o g

AmalgamatedFreeProduct f g $-> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: H $-> X
k: K $-> X
p: h $o f $== k $o g

AmalgamatedFreeProduct f g $-> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: H $-> X
k: K $-> X
p: h $o f $== k $o g

AmalgamatedFreeProduct f g -> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: H $-> X
k: K $-> X
p: h $o f $== k $o g
IsSemiGroupPreserving ?grp_homo_map
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
X: Group
h: H $-> X
k: K $-> X
p: h $o f $== k $o g

IsSemiGroupPreserving (AmalgamatedFreeProduct_rec' X h k p)
exact _. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

H $-> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

H $-> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

H -> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
IsSemiGroupPreserving ?grp_homo_map
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

H -> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: H

AmalgamatedFreeProduct f g
exact (amal_eta [inl x]).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

IsSemiGroupPreserving (fun x : H => amal_eta [inl x])
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: H

amal_eta [inl (x * y)] = amal_eta [inl x] * amal_eta [inl y]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: H

amal_eta ([inl (x * y)] ++ nil) = amal_eta [inl x] * amal_eta [inl y]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: H

amal_eta (nil ++ [inl x, inl y] ++ nil) = amal_eta [inl x] * amal_eta [inl y]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: H

amal_eta (nil ++ [inl x, inl y]) = amal_eta [inl x] * amal_eta [inl y]
reflexivity. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

K $-> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

K $-> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

K -> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
IsSemiGroupPreserving ?grp_homo_map
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

K -> AmalgamatedFreeProduct f g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: K

AmalgamatedFreeProduct f g
exact (amal_eta [inr x]).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

IsSemiGroupPreserving (fun x : K => amal_eta [inr x])
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: K

amal_eta [inr (x * y)] = amal_eta [inr x] * amal_eta [inr y]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: K

amal_eta ([inr (x * y)] ++ nil) = amal_eta [inr x] * amal_eta [inr y]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: K

amal_eta (nil ++ [inr x, inr y] ++ nil) = amal_eta [inr x] * amal_eta [inr y]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: K

amal_eta (nil ++ [inr x, inr y]) = amal_eta [inr x] * amal_eta [inr y]
reflexivity. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

amal_inl $o f $== amal_inr $o g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

amal_inl $o f $== amal_inr $o g
hnf; apply (amal_tau nil nil). Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

{h : H $-> X & {k : K $-> X & h $o f $== k $o g}} <~> (AmalgamatedFreeProduct f g $-> X)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

{h : H $-> X & {k : K $-> X & h $o f $== k $o g}} <~> (AmalgamatedFreeProduct f g $-> X)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

{h : H $-> X & {k : K $-> X & h $o f $== k $o g}} -> AmalgamatedFreeProduct f g $-> X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
(AmalgamatedFreeProduct f g $-> X) -> {h : H $-> X & {k : K $-> X & h $o f $== k $o g}}
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
?f o ?g == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
?g o ?f == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

(AmalgamatedFreeProduct f g $-> X) -> {h : H $-> X & {k : K $-> X & h $o f $== k $o g}}
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
(fun X0 : {h : H $-> X & {k : K $-> X & h $o f $== k $o g}} => (fun (h : H $-> X) (proj2 : {k : K $-> X & h $o f $== k $o g}) => (fun (k : K $-> X) (p : h $o f $== k $o g) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) o ?g == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
?g o (fun X0 : {h : H $-> X & {k : K $-> X & h $o f $== k $o g}} => (fun (h : H $-> X) (proj2 : {k : K $-> X & h $o f $== k $o g}) => (fun (k : K $-> X) (p : h $o f $== k $o g) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

(AmalgamatedFreeProduct f g $-> X) -> {h : H $-> X & {k : K $-> X & h $o f $== k $o g}}
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X

{h : H $-> X & {k : K $-> X & h $o f $== k $o g}}
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X

{k : K $-> X & grp_homo_compose r amal_inl $o f $== k $o g}
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X

grp_homo_compose r amal_inl $o f $== grp_homo_compose r amal_inr $o g
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
x: G

(grp_homo_compose r amal_inl $o f) x = (grp_homo_compose r amal_inr $o g) x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
x: G

amal_inl (f x) = amal_inr (g x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
x: G

amal_eta [inl (f x)] = amal_eta [inr (g x)]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
x: G

amal_eta ([inl (f x)] ++ nil) = amal_eta [inr (g x)]
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
x: G

amal_eta ([inl (f x)] ++ nil) = amal_eta ([inr (g x)] ++ nil)
exact (amal_tau nil nil x).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

(fun X0 : {h : H $-> X & {k : K $-> X & h $o f $== k $o g}} => (fun (h : H $-> X) (proj2 : {k : K $-> X & h $o f $== k $o g}) => (fun (k : K $-> X) (p : h $o f $== k $o g) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) o (fun r : AmalgamatedFreeProduct f g $-> X => (grp_homo_compose r amal_inl; grp_homo_compose r amal_inr; (fun x : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : grp_homo_compose r amal_inl $o f $== grp_homo_compose r amal_inr $o g)) == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
(fun r : AmalgamatedFreeProduct f g $-> X => (grp_homo_compose r amal_inl; grp_homo_compose r amal_inr; (fun x : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : grp_homo_compose r amal_inl $o f $== grp_homo_compose r amal_inr $o g)) o (fun X0 : {h : H $-> X & {k : K $-> X & h $o f $== k $o g}} => (fun (h : H $-> X) (proj2 : {k : K $-> X & h $o f $== k $o g}) => (fun (k : K $-> X) (p : h $o f $== k $o g) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

(fun X0 : {h : H $-> X & {k : K $-> X & h $o f $== k $o g}} => (fun (h : H $-> X) (proj2 : {k : K $-> X & h $o f $== k $o g}) => (fun (k : K $-> X) (p : h $o f $== k $o g) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) o (fun r : AmalgamatedFreeProduct f g $-> X => (grp_homo_compose r amal_inl; grp_homo_compose r amal_inr; (fun x : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : grp_homo_compose r amal_inl $o f $== grp_homo_compose r amal_inr $o g)) == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X

AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]))) = r
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X

AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]))) == r
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X

forall w : Words, (fun x : amal_type f g => AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x0 : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x0)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x0)] ++ nil) = amal_eta l) (amal_tau nil nil x0) (app_nil [inr (g x0)])) (app_nil [inl (f x0)]))) x = r x) (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
x: Words

(fun x0 : amal_type f g => AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x1 : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x1)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x1)] ++ nil) = amal_eta l) (amal_tau nil nil x1) (app_nil [inr (g x1)])) (app_nil [inl (f x1)]))) x0 = r x0) (amal_eta x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X

AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]))) (amal_eta nil) = r (amal_eta nil)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
a: H + K
x: list (H + K)
IHx: AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x0 : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x0)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x0)] ++ nil) = amal_eta l) (amal_tau nil nil x0) (app_nil [inr (g x0)])) (app_nil [inl (f x0)]))) (amal_eta x) = r (amal_eta x)
AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x0 : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x0)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x0)] ++ nil) = amal_eta l) (amal_tau nil nil x0) (app_nil [inr (g x0)])) (app_nil [inl (f x0)]))) (amal_eta (a :: x)) = r (amal_eta (a :: x))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: AmalgamatedFreeProduct f g $-> X
a: H + K
x: list (H + K)
IHx: AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x0 : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x0)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x0)] ++ nil) = amal_eta l) (amal_tau nil nil x0) (app_nil [inr (g x0)])) (app_nil [inl (f x0)]))) (amal_eta x) = r (amal_eta x)

AmalgamatedFreeProduct_rec X (grp_homo_compose r amal_inl) (grp_homo_compose r amal_inr) (fun x0 : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x0)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x0)] ++ nil) = amal_eta l) (amal_tau nil nil x0) (app_nil [inr (g x0)])) (app_nil [inl (f x0)]))) (amal_eta (a :: x)) = r (amal_eta (a :: x))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism (AmalgamatedFreeProduct f g) X
a: H + K
x: list (H + K)
IHx: fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => r (amal_eta [inl g0]) * x0 | inr g0 => fun x0 : X => r (amal_eta [inr g0]) * x0 end) 1 x = r (amal_eta x)

match a with | inl g0 => fun x0 : X => r (amal_eta [inl g0]) * x0 | inr g0 => fun x0 : X => r (amal_eta [inr g0]) * x0 end (fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => r (amal_eta [inl g0]) * x0 | inr g0 => fun x0 : X => r (amal_eta [inr g0]) * x0 end) 1 x) = r (amal_eta (a :: x))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism (AmalgamatedFreeProduct f g) X
a: H + K
x: list (H + K)
IHx: fold_right (fun X0 : H + K => match X0 with | inl g0 => fun x0 : X => r (amal_eta [inl g0]) * x0 | inr g0 => fun x0 : X => r (amal_eta [inr g0]) * x0 end) 1 x = r (amal_eta x)

match a with | inl g0 => fun x0 : X => r (amal_eta [inl g0]) * x0 | inr g0 => fun x0 : X => r (amal_eta [inr g0]) * x0 end (r (amal_eta x)) = r (amal_eta (a :: x))
destruct a; symmetry; rapply (grp_homo_op r (amal_eta [_]) (amal_eta x)).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group

(fun r : AmalgamatedFreeProduct f g $-> X => (grp_homo_compose r amal_inl; grp_homo_compose r amal_inr; (fun x : G => ap r (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : grp_homo_compose r amal_inl $o f $== grp_homo_compose r amal_inr $o g)) o (fun X0 : {h : H $-> X & {k : K $-> X & h $o f $== k $o g}} => (fun (h : H $-> X) (proj2 : {k : K $-> X & h $o f $== k $o g}) => (fun (k : K $-> X) (p : h $o f $== k $o g) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
hkp: {h : H $-> X & {k : K $-> X & h $o f $== k $o g}}

(grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inl; grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inr; fun x : G => ap (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) (internal_paths_rew (fun l : list (H + K) => amal_eta l = amal_eta [inr (g x)]) (internal_paths_rew (fun l : list (H + K) => amal_eta ([inl (f x)] ++ nil) = amal_eta l) (amal_tau nil nil x) (app_nil [inr (g x)])) (app_nil [inl (f x)]))) = hkp
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
hkp: {h : H $-> X & {k : K $-> X & h $o f $== k $o g}}

(grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inl; grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inr; fun x : G => ap (AmalgamatedFreeProduct_rec' X hkp.1 (hkp.2).1 (hkp.2).2) (amal_tau nil nil x)) = hkp
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
hkp: {h : H $-> X & {k : K $-> X & h $o f $== k $o g}}

equiv_sigma_prod (fun hk : (H $-> X) * (K $-> X) => (fun x : G => fst hk (f x)) == (fun x : G => snd hk (g x))) (grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inl; grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inr; fun x : G => ap (AmalgamatedFreeProduct_rec' X hkp.1 (hkp.2).1 (hkp.2).2) (amal_tau nil nil x)) = equiv_sigma_prod (fun hk : (H $-> X) * (K $-> X) => (fun x : G => fst hk (f x)) == (fun x : G => snd hk (g x))) hkp
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
hkp: {h : H $-> X & {k : K $-> X & h $o f $== k $o g}}

(equiv_sigma_prod (fun hk : (H $-> X) * (K $-> X) => (fun x : G => fst hk (f x)) == (fun x : G => snd hk (g x))) (grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inl; grp_homo_compose (AmalgamatedFreeProduct_rec X hkp.1 (hkp.2).1 (hkp.2).2) amal_inr; fun x : G => ap (AmalgamatedFreeProduct_rec' X hkp.1 (hkp.2).1 (hkp.2).2) (amal_tau nil nil x))).1 = (equiv_sigma_prod (fun hk : (H $-> X) * (K $-> X) => (fun x : G => fst hk (f x)) == (fun x : G => snd hk (g x))) hkp).1
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
h: H $-> X
k: K $-> X
p: h $o f $== k $o g

(equiv_sigma_prod (fun hk : (H $-> X) * (K $-> X) => (fun x : G => fst hk (f x)) == (fun x : G => snd hk (g x))) (grp_homo_compose (AmalgamatedFreeProduct_rec X h k p) amal_inl; grp_homo_compose (AmalgamatedFreeProduct_rec X h k p) amal_inr; fun x : G => ap (AmalgamatedFreeProduct_rec' X h k p) (amal_tau nil nil x))).1 = (equiv_sigma_prod (fun hk : (H $-> X) * (K $-> X) => (fun x : G => fst hk (f x)) == (fun x : G => snd hk (g x))) (h; k; p)).1
apply path_prod; cbn; apply equiv_path_grouphomomorphism; intro; simpl; rapply right_identity. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)

forall x : AmalgamatedFreeProduct f g, P x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)

forall x : AmalgamatedFreeProduct f g, P x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)

forall w : Words, P (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: Words

P (amal_eta w)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)

P (amal_eta nil)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a0 : H, P (amal_inl a0)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
a: H + K
P (amal_eta (a :: w))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)

P (amal_eta nil)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)

P (amal_eta (nil ++ [inl 1] ++ nil))
apply l.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a0 : H, P (amal_inl a0)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
a: H + K

P (amal_eta (a :: w))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a0 : H, P (amal_inl a0)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
a: H

P (amal_eta (inl a :: w))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b0 : K, P (amal_inr b0)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
b: K
P (amal_eta (inr b :: w))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a0 : H, P (amal_inl a0)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
a: H

P (amal_eta (inl a :: w))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a0 : H, P (amal_inl a0)
r: forall b : K, P (amal_inr b)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
a: H

P (amal_inl a * amal_eta w)
by apply Hop.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b0 : K, P (amal_inr b0)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
b: K

P (amal_eta (inr b :: w))
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: AmalgamatedFreeProduct f g -> Type
H0: forall x : AmalgamatedFreeProduct f g, IsHProp (P x)
l: forall a : H, P (amal_inl a)
r: forall b0 : K, P (amal_inr b0)
Hop: forall x y : AmalgamatedFreeProduct f g, P x -> P y -> P (x * y)
w: list (H + K)
IH: P (amal_eta w)
b: K

P (amal_inr b * amal_eta w)
by apply Hop. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Group
k, k': AmalgamatedFreeProduct f g $-> P
l: k $o amal_inl $== k' $o amal_inl
r: k $o amal_inr $== k' $o amal_inr

k $== k'
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Group
k, k': AmalgamatedFreeProduct f g $-> P
l: k $o amal_inl $== k' $o amal_inl
r: k $o amal_inr $== k' $o amal_inr

k $== k'
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
P: Group
k, k': AmalgamatedFreeProduct f g $-> P
l: k $o amal_inl $== k' $o amal_inl
r: k $o amal_inr $== k' $o amal_inr

forall x y : AmalgamatedFreeProduct f g, k x = k' x -> k y = k' y -> k (x * y) = k' (x * y)
intros x y; napply grp_homo_op_agree. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
P: Group
k, k': AmalgamatedFreeProduct f g $-> P

(k $o amal_inl $== k' $o amal_inl) * (k $o amal_inr $== k' $o amal_inr) <~> k $== k'
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
P: Group
k, k': AmalgamatedFreeProduct f g $-> P

(k $o amal_inl $== k' $o amal_inl) * (k $o amal_inr $== k' $o amal_inr) <~> k $== k'
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
P: Group
k, k': AmalgamatedFreeProduct f g $-> P

(k $o amal_inl $== k' $o amal_inl) * (k $o amal_inr $== k' $o amal_inr) -> k $== k'
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
P: Group
k, k': AmalgamatedFreeProduct f g $-> P
k $== k' -> (k $o amal_inl $== k' $o amal_inl) * (k $o amal_inr $== k' $o amal_inr)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
P: Group
k, k': AmalgamatedFreeProduct f g $-> P

(k $o amal_inl $== k' $o amal_inl) * (k $o amal_inr $== k' $o amal_inr) -> k $== k'
exact (uncurry amalgamatedfreeproduct_ind_homotopy).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
P: Group
k, k': AmalgamatedFreeProduct f g $-> P

k $== k' -> (k $o amal_inl $== k' $o amal_inl) * (k $o amal_inr $== k' $o amal_inr)
intros p; split; exact (p $@R _). Defined. End RecInd. Definition FreeProduct (G H : Group) : Group := AmalgamatedFreeProduct (grp_trivial_rec G) (grp_trivial_rec H). Definition freeproduct_inl {G H : Group} : GroupHomomorphism G (FreeProduct G H) := amal_inl. Definition freeproduct_inr {G H : Group} : GroupHomomorphism H (FreeProduct G H) := amal_inr. Definition freeproduct_ind_hprop {G H} (P : FreeProduct G H -> Type) `{forall x, IsHProp (P x)} (l : forall g, P (freeproduct_inl g)) (r : forall h, P (freeproduct_inr h)) (Hop : forall x y, P x -> P y -> P (x * y)) : forall x, P x := amalgamatedfreeproduct_ind_hprop P l r Hop. (* The above is slow, ~0.15s. *) Definition freeproduct_ind_homotopy {G H K : Group} {f f' : FreeProduct G H $-> K} (l : f $o freeproduct_inl $== f' $o freeproduct_inl) (r : f $o freeproduct_inr $== f' $o freeproduct_inr) : f $== f' := amalgamatedfreeproduct_ind_homotopy l r. Definition equiv_freeproduct_ind_homotopy {Funext : Funext} {G H K : Group} (f f' : FreeProduct G H $-> K) : (f $o freeproduct_inl $== f' $o freeproduct_inl) * (f $o freeproduct_inr $== f' $o freeproduct_inr) <~> f $== f' := equiv_amalgamatedfreeproduct_ind_homotopy _ _.
G, H, K: Group
f: G $-> K
g: H $-> K

FreeProduct G H $-> K
G, H, K: Group
f: G $-> K
g: H $-> K

FreeProduct G H $-> K
G, H, K: Group
f: G $-> K
g: H $-> K

f $o grp_trivial_rec G $== g $o grp_trivial_rec H
G, H, K: Group
f: G $-> K
g: H $-> K

(f $o grp_trivial_rec G) tt = (g $o grp_trivial_rec H) tt
exact (grp_homo_unit f @ (grp_homo_unit g)^). Defined. Definition freeproduct_rec_beta_inl {G H K : Group} (f : G $-> K) (g : H $-> K) : FreeProduct_rec f g $o freeproduct_inl $== f := fun x => right_identity (f x). Definition freeproduct_rec_beta_inr {G H K : Group} (f : G $-> K) (g : H $-> K) : FreeProduct_rec f g $o freeproduct_inr $== g := fun x => right_identity (g x).
funext: Funext
G, H, K: Group

GroupHomomorphism G K * GroupHomomorphism H K <~> GroupHomomorphism (FreeProduct G H) K
funext: Funext
G, H, K: Group

GroupHomomorphism G K * GroupHomomorphism H K <~> GroupHomomorphism (FreeProduct G H) K
funext: Funext
G, H, K: Group

{h : G $-> K & {k : H $-> K & h $o grp_trivial_rec G $== k $o grp_trivial_rec H}} <~> GroupHomomorphism G K * GroupHomomorphism H K
funext: Funext
G, H, K: Group
y: G $-> K

forall a : H $-> K, Contr (y $o grp_trivial_rec G $== a $o grp_trivial_rec H)
funext: Funext
G, H, K: Group
y: G $-> K
f: H $-> K

Contr (y $o grp_trivial_rec G $== f $o grp_trivial_rec H)
funext: Funext
G, H, K: Group
y: G $-> K
f: H $-> K

forall a : grp_trivial, Contr ((y $o grp_trivial_rec G) a = (f $o grp_trivial_rec H) a)
funext: Funext
G, H, K: Group
y: G $-> K
f: H $-> K

(y $o grp_trivial_rec G) tt = (f $o grp_trivial_rec H) tt
exact (grp_homo_unit _ @ (grp_homo_unit _)^). Defined. (** The free product is the coproduct in the category of groups. *)

HasBinaryCoproducts Group

HasBinaryCoproducts Group
G, H: Group

BinaryCoproduct G H
G, H: Group

Group
G, H: Group
G $-> ?cat_coprod
G, H: Group
H $-> ?cat_coprod
G, H: Group
forall z : Group, (G $-> z) -> (H $-> z) -> ?cat_coprod $-> z
G, H: Group
forall (z : Group) (f : G $-> z) (g : H $-> z), ?cat_coprod_rec z f g $o ?cat_inl $== f
G, H: Group
forall (z : Group) (f : G $-> z) (g : H $-> z), ?cat_coprod_rec z f g $o ?cat_inr $== g
G, H: Group
forall (z : Group) (f g : ?cat_coprod $-> z), f $o ?cat_inl $== g $o ?cat_inl -> f $o ?cat_inr $== g $o ?cat_inr -> f $== g
G, H: Group

Group
exact (FreeProduct G H).
G, H: Group

G $-> FreeProduct G H
exact freeproduct_inl.
G, H: Group

H $-> FreeProduct G H
exact freeproduct_inr.
G, H: Group

forall z : Group, (G $-> z) -> (H $-> z) -> FreeProduct G H $-> z
intros Z; exact FreeProduct_rec.
G, H: Group

forall (z : Group) (f : G $-> z) (g : H $-> z), (fun Z : Group => FreeProduct_rec) z f g $o freeproduct_inl $== f
intros; apply freeproduct_rec_beta_inl.
G, H: Group

forall (z : Group) (f : G $-> z) (g : H $-> z), (fun Z : Group => FreeProduct_rec) z f g $o freeproduct_inr $== g
intros; apply freeproduct_rec_beta_inr.
G, H: Group

forall (z : Group) (f g : FreeProduct G H $-> z), f $o freeproduct_inl $== g $o freeproduct_inl -> f $o freeproduct_inr $== g $o freeproduct_inr -> f $== g
G, H, Z: Group
f, g: FreeProduct G H $-> Z
p: f $o freeproduct_inl $== g $o freeproduct_inl
q: f $o freeproduct_inr $== g $o freeproduct_inr

f $== g
by snapply freeproduct_ind_homotopy. Defined.