Built with Alectryon, running Coq+SerAPI v8.18.0+0.18.3. 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.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Cubical. Require Import Spaces.List.Core Spaces.List.Theory. Require Import Colimits.Pushout. Require Import Truncations.Core Truncations.SeparatedTrunc. Require Import Algebra.Groups.Group. Require Import WildCat. 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 sucessively out of coequalizers. *) (** We will call M [amal_type] and prefix all the constructors with [amal_] (for amalgmated free product). *) Section FreeProduct. Context (G H K : Group) (f : GroupHomomorphism G H) (g : GroupHomomorphism G K). Local Definition Words : Type := list (H + K). Local Notation "[ x ]" := (cons x nil).
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

x ++ nil = x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

x ++ nil = x
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
a: (H + K)%type
x: list (H + K)
IHx: x ++ nil = x

(a :: x) ++ nil = a :: x
cbn; f_ap. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y, z: Words

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

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

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

x ++ nil ++ z = (x ++ nil) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
a: (H + K)%type
y: list (H + K)
IHy: forall x z : Words, x ++ y ++ z = (x ++ y) ++ z
x, z: Words
x ++ (a :: y) ++ z = (x ++ a :: y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

x ++ nil ++ z = (x ++ nil) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

x ++ nil = x
apply word_concat_w_nil.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
a: (H + K)%type
y: list (H + K)
IHy: forall x z : Words, x ++ y ++ z = (x ++ y) ++ z
x, z: Words

x ++ (a :: y) ++ z = (x ++ a :: y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
a: (H + K)%type
x: Words

forall (z : Words) (y : list (H + K)), (forall x z0 : Words, x ++ y ++ z0 = (x ++ y) ++ z0) -> x ++ a :: y ++ z = (x ++ a :: y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
a, a0: (H + K)%type
x: list (H + K)
IHx: forall (z : Words) (y : list (H + K)), (forall x z0 : Words, x ++ y ++ z0 = (x ++ y) ++ z0) -> x ++ a :: y ++ z = (x ++ a :: y) ++ z

forall (z : Words) (y : list (H + K)), (forall x z0 : Words, x ++ y ++ z0 = (x ++ y) ++ z0) -> (a0 :: x) ++ a :: y ++ z = ((a0 :: x) ++ a :: y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
a, a0: (H + K)%type
x: list (H + K)
IHx: forall (z : Words) (y : list (H + K)), (forall x z0 : Words, x ++ y ++ z0 = (x ++ y) ++ z0) -> x ++ a :: y ++ z = (x ++ a :: y) ++ z
z: Words
y: list (H + K)
IHy: forall x z : Words, x ++ y ++ z = (x ++ y) ++ z

(a0 :: x) ++ a :: y ++ z = ((a0 :: x) ++ a :: y) ++ z
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
a, a0: (H + K)%type
x: list (H + K)
IHx: forall (z : Words) (y : list (H + K)), (forall x z0 : Words, x ++ y ++ z0 = (x ++ y) ++ z0) -> x ++ a :: y ++ z = (x ++ a :: y) ++ z
z: Words
y: list (H + K)
IHy: forall x z : Words, x ++ y ++ z = (x ++ y) ++ z

x ++ a :: y ++ z = (x ++ a :: y) ++ z
apply IHx, IHy. Defined.
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)%type
xs: list (H + K)
Words
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
word_inverse: Words -> Words
x: (H + K)%type
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)%type
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
y: Words

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

word_inverse y ++ word_inverse nil = word_inverse (nil ++ y)
apply word_concat_w_nil.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: (H + K)%type
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)%type
xs: list (H + K)
y: Words
IHxs: word_inverse (xs ++ y) = word_inverse y ++ word_inverse xs

match x with | inl g => word_inverse (xs ++ y) ++ [inl (- g)] | inr g => word_inverse (xs ++ y) ++ [inr (- g)] end = word_inverse y ++ match x with | inl g => word_inverse xs ++ [inl (- g)] | inr g => word_inverse xs ++ [inr (- g)] end
destruct x; refine (_ @ (word_concat_w_ww _ _ _)^); 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 mon_unit] ++ y) = amal_eta (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

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

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

coeq (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = amal_eta (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

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

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

coeq (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
a: (pc1 + pc2 + pc3 + pc4 + pc5)%type

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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 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 mon_unit] ++ y)) (e (x ++ y))
ok: forall x y : Words, DPath P (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ y)) (e (x ++ y))
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 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_H x y) (?e (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_K x y) (?e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_H x y) (?e (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_K x y) (?e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_H x y) (e (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
forall x y : Words, DPath (fun _ : amal_type => P) (amal_omega_K x y) (e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
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 (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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
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 (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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
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 (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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words
e (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words
e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
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 (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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
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 (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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words
e (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words
e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
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 (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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words
e (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words
e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words

e (x ++ [inl mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words
e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ y) = e (x ++ y)
ok: forall x y : Words, e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
x, y: Words

e (x ++ [inr mon_unit] ++ y) = e (x ++ y)
apply ok. Defined. (** Now for the group structure *) (** 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 x : Words => ?Goal y) (x ++ [inl h1; inl h2] ++ y0) = (fun x : Words => ?Goal 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 x : Words => ?Goal y) (x ++ [inr k1; inr k2] ++ y0) = (fun x : Words => ?Goal 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 x : Words => ?Goal y) (x ++ [inl (f z)] ++ y0) = (fun x : Words => ?Goal 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 x : Words => ?Goal y) (x ++ [inl mon_unit] ++ y0) = (fun x : Words => ?Goal y) (x ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words
forall (y : amal_type) (y0 : Words), (fun x : Words => ?Goal y) (x ++ [inr mon_unit] ++ y0) = (fun x : Words => ?Goal 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 y : Words => ?Goal4) (y ++ [inl h1; inl h2] ++ y0) = (fun y : Words => ?Goal4) (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 y : Words => ?Goal4) (y ++ [inr k1; inr k2] ++ y0) = (fun y : Words => ?Goal4) (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 y : Words => ?Goal4) (y ++ [inl (f z)] ++ y0) = (fun y : Words => ?Goal4) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => ?Goal4) (y ++ [inl mon_unit] ++ y0) = (fun y : Words => ?Goal4) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => ?Goal4) (y ++ [inr mon_unit] ++ y0) = (fun y : Words => ?Goal4) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (h1 h2 : H), (fun y : Words => amal_eta (x ++ y)) (y ++ [inl h1; inl h2] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inr k1; inr k2] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inl (f z)] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => amal_eta (x ++ y)) (y ++ [inl mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => amal_eta (x ++ y)) (y ++ [inr mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (h1 h2 : H), (fun y : Words => amal_eta (x ++ y)) (y ++ [inl h1; inl h2] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inl h1; inl h2] ++ z) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inr k1; inr k2] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inl (f z)] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => amal_eta (x ++ y)) (y ++ [inl mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => amal_eta (x ++ y)) (y ++ [inr mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

forall (y0 : Words) (k1 k2 : K), (fun y : Words => amal_eta (x ++ y)) (y ++ [inr k1; inr k2] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inr k1; inr k2] ++ z) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inl (f z)] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ [inr (g z)] ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => amal_eta (x ++ y)) (y ++ [inl mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => amal_eta (x ++ y)) (y ++ [inr mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

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

(fun y : Words => amal_eta (x ++ y)) (y ++ [inl (f z)] ++ w) = (fun y : Words => amal_eta (x ++ y)) (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 y : Words => amal_eta (x ++ y)) (y ++ [inl mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words
forall y0 : Words, (fun y : Words => amal_eta (x ++ y)) (y ++ [inr mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

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

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

x ++ y ++ [inl mon_unit] ++ 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 mon_unit] ++ 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 y : Words => amal_eta (x ++ y)) (y ++ [inr mon_unit] ++ y0) = (fun y : Words => amal_eta (x ++ y)) (y ++ y0)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, y: Words

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

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

x ++ y ++ [inr mon_unit] ++ 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 mon_unit] ++ 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h3 h4 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h3; inl h4] ++ z)) @ amal_mu_H (x ++ y1) z h3 h4) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h3 * h4)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inl h1; inl h2] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h3 h4 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h3; inl h4] ++ z)) @ amal_mu_H (x ++ y1) z h3 h4) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h3 * h4)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k3; inr k4] ++ z)) @ amal_mu_K (x ++ y1) z k3 k4) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k3 * k4)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr k1; inr k2] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k3; inr k4] ++ z)) @ amal_mu_K (x ++ y1) z k3 k4) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k3 * k4)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inl mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h3 h4 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h3; inl h4] ++ z)) @ amal_mu_H (x ++ y1) z h3 h4) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h3 * h4)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inl h1; inl h2] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h3 h4 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h3; inl h4] ++ z)) @ amal_mu_H (x ++ y1) z h3 h4) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h3 * h4)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) r) (x ++ [inl h1; inl h2] ++ y) = (fun x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y 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) (h3 h4 : H) => (ap amal_eta (word_concat_w_ww (x ++ [inl h1; inl h2] ++ y) y0 ([inl h3; inl h4] ++ z)) @ amal_mu_H ((x ++ [inl h1; inl h2] ++ y) ++ y0) z h3 h4) @ ap amal_eta (word_concat_w_ww (x ++ [inl h1; inl h2] ++ y) y0 ([inl (h3 * h4)] ++ z))^) (fun (y0 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl h1; inl h2] ++ y) y0 ([inr (k1 * k2)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl h1; inl h2] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl h1; inl h2] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (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) (h3 h4 : H) => (ap amal_eta (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 ([inl h3; inl h4] ++ z)) @ amal_mu_H ((x ++ [inl (h1 * h2)] ++ y) ++ y0) z h3 h4) @ ap amal_eta (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 ([inl (h3 * h4)] ++ z))^) (fun (y0 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 ([inr (k1 * k2)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 ([inl (f z)] ++ w0)) @ amal_tau ((x ++ [inl (h1 * h2)] ++ y) ++ y0) w0 z) @ ap amal_eta (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 ([inl mon_unit] ++ z)) @ amal_omega_H ((x ++ [inl (h1 * h2)] ++ y) ++ y0) z) @ ap amal_eta (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (x ++ [inl (h1 * h2)] ++ y) y0 ([inr mon_unit] ++ z)) @ amal_omega_K ((x ++ [inl (h1 * h2)] ++ y) ++ y0) z) @ ap amal_eta (word_concat_w_ww (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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k3; inr k4] ++ z)) @ amal_mu_K (x ++ y1) z k3 k4) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k3 * k4)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr k1; inr k2] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k3; inr k4] ++ z)) @ amal_mu_K (x ++ y1) z k3 k4) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k3 * k4)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inl mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k3; inr k4] ++ z)) @ amal_mu_K (x ++ y1) z k3 k4) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k3 * k4)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr k1; inr k2] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k3; inr k4] ++ z)) @ amal_mu_K (x ++ y1) z k3 k4) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k3 * k4)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) r) (x ++ [inr k1; inr k2] ++ y) = (fun x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y 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 (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr k1; inr k2] ++ y) y0 ([inl (h1 * h2)] ++ z))^) (fun (y0 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww (x ++ [inr k1; inr k2] ++ y) y0 ([inr k3; inr k4] ++ z)) @ amal_mu_K ((x ++ [inr k1; inr k2] ++ y) ++ y0) z k3 k4) @ ap amal_eta (word_concat_w_ww (x ++ [inr k1; inr k2] ++ y) y0 ([inr (k3 * k4)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr k1; inr k2] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr k1; inr k2] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (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 (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 ([inl (h1 * h2)] ++ z))^) (fun (y0 z : Words) (k3 k4 : K) => (ap amal_eta (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 ([inr k3; inr k4] ++ z)) @ amal_mu_K ((x ++ [inr (k1 * k2)] ++ y) ++ y0) z k3 k4) @ ap amal_eta (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 ([inr (k3 * k4)] ++ z))^) (fun (y0 w0 : Words) (z : G) => (ap amal_eta (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 ([inl (f z)] ++ w0)) @ amal_tau ((x ++ [inr (k1 * k2)] ++ y) ++ y0) w0 z) @ ap amal_eta (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 ([inr (g z)] ++ w0))^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 ([inl mon_unit] ++ z)) @ amal_omega_H ((x ++ [inr (k1 * k2)] ++ y) ++ y0) z) @ ap amal_eta (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 z)^) (fun y0 z : Words => (ap amal_eta (word_concat_w_ww (x ++ [inr (k1 * k2)] ++ y) y0 ([inr mon_unit] ++ z)) @ amal_omega_K ((x ++ [inr (k1 * k2)] ++ y) ++ y0) z) @ ap amal_eta (word_concat_w_ww (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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inl mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) y) (x ++ [inl (f z)] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z0)) @ amal_mu_H (x ++ y1) z0 h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z0))^) (fun (y1 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z0)) @ amal_mu_K (x ++ y1) z0 k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z0))^) (fun (y1 w : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z0)] ++ w)) @ amal_tau (x ++ y1) w z0) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z0)] ++ w))^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z0)) @ amal_omega_H (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x y1 z0)^) (fun y1 z0 : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z0)) @ amal_omega_K (x ++ y1) z0) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) r) (x ++ [inl (f z)] ++ y) = (fun x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) 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 (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl (f z)] ++ y) y0 ([inl (h1 * h2)] ++ z0))^) (fun (y0 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl (f z)] ++ y) y0 ([inr (k1 * k2)] ++ z0))^) (fun (y0 w0 : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww (x ++ [inl (f z)] ++ y) y0 ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inl (f z)] ++ y) ++ y0) w0 z0) @ ap amal_eta (word_concat_w_ww (x ++ [inl (f z)] ++ y) y0 ([inr (g z0)] ++ w0))^) (fun y0 z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inl (f z)] ++ y) y0 ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inl (f z)] ++ y) ++ y0) z0) @ ap amal_eta (word_concat_w_ww (x ++ [inl (f z)] ++ y) y0 z0)^) (fun y0 z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inl (f z)] ++ y) y0 ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inl (f z)] ++ y) ++ y0) z0) @ ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr (g z)] ++ y) y0 ([inl (h1 * h2)] ++ z0))^) (fun (y0 z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr (g z)] ++ y) y0 ([inr (k1 * k2)] ++ z0))^) (fun (y0 w0 : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww (x ++ [inr (g z)] ++ y) y0 ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inr (g z)] ++ y) ++ y0) w0 z0) @ ap amal_eta (word_concat_w_ww (x ++ [inr (g z)] ++ y) y0 ([inr (g z0)] ++ w0))^) (fun y0 z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inr (g z)] ++ y) y0 ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inr (g z)] ++ y) ++ y0) z0) @ ap amal_eta (word_concat_w_ww (x ++ [inr (g z)] ++ y) y0 z0)^) (fun y0 z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inr (g z)] ++ y) y0 ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inr (g z)] ++ y) ++ y0) z0) @ ap amal_eta (word_concat_w_ww (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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inl mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inl mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) r) (x ++ [inl mon_unit] ++ z) = (fun x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) 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 mon_unit] ++ z) ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl mon_unit] ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inl mon_unit] ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww (x ++ [inl mon_unit] ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inl mon_unit] ++ z) ++ y) w0 z0) @ ap amal_eta (word_concat_w_ww (x ++ [inl mon_unit] ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inl mon_unit] ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inl mon_unit] ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (x ++ [inl mon_unit] ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inl mon_unit] ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inl mon_unit] ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ z) y ([inl h1; inl h2] ++ z0)) @ amal_mu_H ((x ++ z) ++ y) z0 h1 h2) @ ap amal_eta (word_concat_w_ww (x ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inr k1; inr k2] ++ z0)) @ amal_mu_K ((x ++ z) ++ y) z0 k1 k2) @ ap amal_eta (word_concat_w_ww (x ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ z) ++ y) w0 z0) @ ap amal_eta (word_concat_w_ww (x ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (x ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) y) (x ++ [inr mon_unit] ++ y0) = (fun x : Words => amal_type_rec amal_type (fun y1 : Words => amal_eta (x ++ y1)) (fun (y1 z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y1 ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y1) z h1 h2) @ ap amal_eta (word_concat_w_ww x y1 ([inl (h1 * h2)] ++ z))^) (fun (y1 z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y1 ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y1) z k1 k2) @ ap amal_eta (word_concat_w_ww x y1 ([inr (k1 * k2)] ++ z))^) (fun (y1 w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y1 ([inl (f z)] ++ w)) @ amal_tau (x ++ y1) w z) @ ap amal_eta (word_concat_w_ww x y1 ([inr (g z)] ++ w))^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x y1 z)^) (fun y1 z : Words => (ap amal_eta (word_concat_w_ww x y1 ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y1) z) @ ap amal_eta (word_concat_w_ww x 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 x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) r) (x ++ [inr mon_unit] ++ z) = (fun x : Words => amal_type_rec amal_type (fun y : Words => amal_eta (x ++ y)) (fun (y z : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww x y ([inl h1; inl h2] ++ z)) @ amal_mu_H (x ++ y) z h1 h2) @ ap amal_eta (word_concat_w_ww x y ([inl (h1 * h2)] ++ z))^) (fun (y z : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww x y ([inr k1; inr k2] ++ z)) @ amal_mu_K (x ++ y) z k1 k2) @ ap amal_eta (word_concat_w_ww x y ([inr (k1 * k2)] ++ z))^) (fun (y w : Words) (z : G) => (ap amal_eta (word_concat_w_ww x y ([inl (f z)] ++ w)) @ amal_tau (x ++ y) w z) @ ap amal_eta (word_concat_w_ww x y ([inr (g z)] ++ w))^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inl mon_unit] ++ z)) @ amal_omega_H (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) (fun y z : Words => (ap amal_eta (word_concat_w_ww x y ([inr mon_unit] ++ z)) @ amal_omega_K (x ++ y) z) @ ap amal_eta (word_concat_w_ww x y z)^) 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 mon_unit] ++ z) ++ y)) (fun (y z0 : Words) (h1 h2 : H) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr mon_unit] ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ [inr mon_unit] ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww (x ++ [inr mon_unit] ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ [inr mon_unit] ++ z) ++ y) w0 z0) @ ap amal_eta (word_concat_w_ww (x ++ [inr mon_unit] ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inr mon_unit] ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ [inr mon_unit] ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (x ++ [inr mon_unit] ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ [inr mon_unit] ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ [inr mon_unit] ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (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 (word_concat_w_ww (x ++ z) y ([inl h1; inl h2] ++ z0)) @ amal_mu_H ((x ++ z) ++ y) z0 h1 h2) @ ap amal_eta (word_concat_w_ww (x ++ z) y ([inl (h1 * h2)] ++ z0))^) (fun (y z0 : Words) (k1 k2 : K) => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inr k1; inr k2] ++ z0)) @ amal_mu_K ((x ++ z) ++ y) z0 k1 k2) @ ap amal_eta (word_concat_w_ww (x ++ z) y ([inr (k1 * k2)] ++ z0))^) (fun (y w0 : Words) (z0 : G) => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inl (f z0)] ++ w0)) @ amal_tau ((x ++ z) ++ y) w0 z0) @ ap amal_eta (word_concat_w_ww (x ++ z) y ([inr (g z0)] ++ w0))^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inl mon_unit] ++ z0)) @ amal_omega_H ((x ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (x ++ z) y z0)^) (fun y z0 : Words => (ap amal_eta (word_concat_w_ww (x ++ z) y ([inr mon_unit] ++ z0)) @ amal_omega_K ((x ++ z) ++ y) z0) @ ap amal_eta (word_concat_w_ww (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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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

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

Negate 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 mon_unit] ++ y) = ?e (x ++ y)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
forall x y : Words, ?e (x ++ [inr mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 negate_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 mon_unit] ++ 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 mon_unit] ++ 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 negate_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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ z) ++ word_inverse x = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inl mon_unit] ++ 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 mon_unit]) ++ 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 mon_unit]) ++ 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 mon_unit] ++ 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 (- mon_unit) :: 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 mon_unit :: 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ 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 mon_unit] ++ z) ++ word_inverse x = ?Goal
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x, z: Words

word_inverse ([inr mon_unit] ++ 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 mon_unit]) ++ 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 mon_unit]) ++ 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 mon_unit] ++ 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 (- mon_unit) :: 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 mon_unit :: 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 word_concat_w_ww. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

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

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

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

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

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

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

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

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

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

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

amal_eta (word_inverse (x :: xs) ++ x :: xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse (inl h :: xs) ++ inl h :: xs) = mon_unit
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) = mon_unit
amal_eta (word_inverse (inr k :: xs) ++ inr k :: xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse (inl h :: xs) ++ inl h :: xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse ([inl h] ++ xs) ++ [inl h] ++ xs) = mon_unit
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) = mon_unit

amal_eta ((word_inverse xs ++ word_inverse [inl h]) ++ [inl h] ++ xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse xs ++ word_inverse [inl h] ++ [inl h] ++ xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse xs ++ [inl (- h * h)] ++ xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse xs ++ [inl mon_unit] ++ xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse xs ++ xs) = mon_unit
apply 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) = mon_unit

amal_eta (word_inverse (inr k :: xs) ++ inr k :: xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse ([inr k] ++ xs) ++ [inr k] ++ xs) = mon_unit
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) = mon_unit

amal_eta ((word_inverse xs ++ word_inverse [inr k]) ++ [inr k] ++ xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse xs ++ word_inverse [inr k] ++ [inr k] ++ xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse xs ++ [inr (- k * k)] ++ xs) = mon_unit
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) = mon_unit

amal_eta (word_inverse xs ++ [inr mon_unit] ++ xs) = mon_unit
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) = mon_unit

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

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

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

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

amal_eta ((x :: xs) ++ word_inverse (x :: xs)) = mon_unit
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) = mon_unit

amal_eta ((inl h :: xs) ++ word_inverse (inl h :: xs)) = mon_unit
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) = mon_unit
amal_eta ((inr k :: xs) ++ word_inverse (inr k :: xs)) = mon_unit
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) = mon_unit

amal_eta ((inl h :: xs) ++ word_inverse (inl h :: xs)) = mon_unit
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) = mon_unit

amal_eta (inl h :: xs ++ word_inverse xs ++ [inl (- h)]) = mon_unit
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) = mon_unit

amal_eta (inl h :: (xs ++ word_inverse xs) ++ [inl (- h)]) = mon_unit
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) = mon_unit

amal_eta [inl h] * amal_eta (xs ++ word_inverse xs) * amal_eta [inl (- h)] = mon_unit
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) = mon_unit

amal_eta [inl h] * mon_unit * amal_eta [inl (- h)] = mon_unit
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) = mon_unit

amal_eta [inl h] * amal_eta [inl (- h)] = mon_unit
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) = mon_unit

amal_eta ([inl h] ++ nil) * amal_eta [inl (- h)] = mon_unit
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) = mon_unit

amal_eta (([inl h] ++ [inl (- h)]) ++ nil) = mon_unit
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) = mon_unit

amal_eta ([inl h] ++ [inl (- h)] ++ nil) = mon_unit
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) = mon_unit

amal_eta (nil ++ [inl h] ++ [inl (- h)] ++ nil) = mon_unit
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) = mon_unit

amal_eta (nil ++ [inl (h * - h)] ++ nil) = mon_unit
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) = mon_unit

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) = mon_unit
?Goal0 = mon_unit
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) = mon_unit

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) = mon_unit

[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) = mon_unit

[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) = mon_unit

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) = mon_unit

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) = mon_unit

amal_eta (nil ++ [inl mon_unit] ++ nil) = mon_unit
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) = mon_unit

amal_eta ((inr k :: xs) ++ word_inverse (inr k :: xs)) = mon_unit
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) = mon_unit

amal_eta (inr k :: xs ++ word_inverse xs ++ [inr (- k)]) = mon_unit
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) = mon_unit

amal_eta (inr k :: (xs ++ word_inverse xs) ++ [inr (- k)]) = mon_unit
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) = mon_unit

amal_eta [inr k] * amal_eta (xs ++ word_inverse xs) * amal_eta [inr (- k)] = mon_unit
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) = mon_unit

amal_eta [inr k] * mon_unit * amal_eta [inr (- k)] = mon_unit
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) = mon_unit

amal_eta [inr k] * amal_eta [inr (- k)] = mon_unit
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) = mon_unit

amal_eta ([inr k] ++ nil) * amal_eta [inr (- k)] = mon_unit
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) = mon_unit

amal_eta (([inr k] ++ [inr (- k)]) ++ nil) = mon_unit
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) = mon_unit

amal_eta ([inr k] ++ [inr (- k)] ++ nil) = mon_unit
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) = mon_unit

amal_eta (nil ++ [inr k] ++ [inr (- k)] ++ nil) = mon_unit
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) = mon_unit

amal_eta (nil ++ [inr (k * - k)] ++ nil) = mon_unit
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) = mon_unit

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) = mon_unit
?Goal = mon_unit
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) = mon_unit

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) = mon_unit

[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) = mon_unit

[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) = mon_unit

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) = mon_unit

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) = mon_unit

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

LeftInverse sg_op negate mon_unit
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

LeftInverse sg_op negate mon_unit
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

- amal_eta x * amal_eta x = mon_unit
apply amal_eta_word_concat_Vw. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

RightInverse sg_op negate mon_unit
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

RightInverse sg_op negate mon_unit
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
x: Words

amal_eta x * - amal_eta x = mon_unit
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
snrapply (Build_Group amal_type); repeat split; exact _. Defined. (** 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 -> 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 -> 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 mon_unit] ++ 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 mon_unit] ++ 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl h1; inl h2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr k1; inr k2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl h1; inl h2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (x ++ [inl h1; inl h2] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inl h1; inl h2]) x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inl h1; inl h2] = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) = h (h1 * h2) * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y = h (h1 * h2) * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr k1; inr k2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr k1; inr k2] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (x ++ [inr k1; inr k2] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inr k1; inr k2]) x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inr k1; inr k2] = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) = k (k1 * k2) * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y = k (k1 * k2) * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl (f z)] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (x ++ [inl (f z)] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inl (f z)]) x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inl mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (x ++ [inl mon_unit] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inl mon_unit]) x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inl mon_unit] = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 mon_unit * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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

mon_unit * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit w) (x ++ [inr mon_unit] ++ y) = (fun w : Words => fold_right (fun X0 : H + K => match X0 with | inl g => (fun (l : H) (x0 : X) => h l * x0) g | inr g => (fun (r : K) (x0 : X) => k r * x0) g end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (x ++ [inr mon_unit] ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inr mon_unit]) x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) [inr mon_unit] = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 mon_unit * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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

mon_unit * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (x ++ y) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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 g => fun x : X => h g * x | inr g => fun x : X => k g * x end) (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit y) x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x * fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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) mon_unit y: X

fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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) mon_unit y: X

fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s nil = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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)%type
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) mon_unit y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x * s
fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s (a :: x) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (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)%type
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) mon_unit y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x * s

fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s (a :: x) = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit (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)%type
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) mon_unit y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x * s

match a with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s x) = match a with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit 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)%type
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) mon_unit y: X
IHx: fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) s x = fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x * s

match a with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x * s) = match a with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => h g * x | inr g => fun x : X => k g * x end) mon_unit x) * s
destruct a; apply simple_associativity. Qed.
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

GroupHomomorphism AmalgamatedFreeProduct 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

GroupHomomorphism AmalgamatedFreeProduct 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 -> 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
IsSemiGroupPreserving ?f
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)
exact _. Defined.
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K

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

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

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

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

AmalgamatedFreeProduct
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

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

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

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

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

AmalgamatedFreeProduct
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
H0: Funext
X: Group

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

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

{h : GroupHomomorphism H X & {k : GroupHomomorphism K X & h o f == k o g}} -> GroupHomomorphism AmalgamatedFreeProduct X
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
GroupHomomorphism AmalgamatedFreeProduct X -> {h : GroupHomomorphism H X & {k : GroupHomomorphism 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

GroupHomomorphism AmalgamatedFreeProduct X -> {h : GroupHomomorphism H X & {k : GroupHomomorphism 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 : GroupHomomorphism H X & {k : GroupHomomorphism K X & h o f == k o g}} => (fun (h : GroupHomomorphism H X) (proj2 : {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}) => (fun (k : GroupHomomorphism K X) (p : (fun x : G => h (f x)) == (fun x : G => k (g x))) => 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 : GroupHomomorphism H X & {k : GroupHomomorphism K X & h o f == k o g}} => (fun (h : GroupHomomorphism H X) (proj2 : {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}) => (fun (k : GroupHomomorphism K X) (p : (fun x : G => h (f x)) == (fun x : G => k (g x))) => 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

GroupHomomorphism AmalgamatedFreeProduct X -> {h : GroupHomomorphism H X & {k : GroupHomomorphism 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: GroupHomomorphism AmalgamatedFreeProduct X

{h : GroupHomomorphism H X & {k : GroupHomomorphism 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: GroupHomomorphism AmalgamatedFreeProduct X

{k : GroupHomomorphism K X & (fun x : G => grp_homo_compose r amal_inl (f x)) == (fun x : G => k (g x))}
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism AmalgamatedFreeProduct X

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

grp_homo_compose r amal_inl (f x) = grp_homo_compose r amal_inr (g x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism AmalgamatedFreeProduct 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: GroupHomomorphism AmalgamatedFreeProduct 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: GroupHomomorphism AmalgamatedFreeProduct 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: GroupHomomorphism AmalgamatedFreeProduct X
x: G

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

(fun X0 : {h : GroupHomomorphism H X & {k : GroupHomomorphism K X & h o f == k o g}} => (fun (h : GroupHomomorphism H X) (proj2 : {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}) => (fun (k : GroupHomomorphism K X) (p : (fun x : G => h (f x)) == (fun x : G => k (g x))) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) o (fun r : GroupHomomorphism AmalgamatedFreeProduct 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : (fun x : G => grp_homo_compose r amal_inl (f x)) == (fun x : G => grp_homo_compose r amal_inr (g x)))) == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
(fun r : GroupHomomorphism AmalgamatedFreeProduct 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : (fun x : G => grp_homo_compose r amal_inl (f x)) == (fun x : G => grp_homo_compose r amal_inr (g x)))) o (fun X0 : {h : GroupHomomorphism H X & {k : GroupHomomorphism K X & h o f == k o g}} => (fun (h : GroupHomomorphism H X) (proj2 : {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}) => (fun (k : GroupHomomorphism K X) (p : (fun x : G => h (f x)) == (fun x : G => k (g x))) => 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 : GroupHomomorphism H X & {k : GroupHomomorphism K X & h o f == k o g}} => (fun (h : GroupHomomorphism H X) (proj2 : {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}) => (fun (k : GroupHomomorphism K X) (p : (fun x : G => h (f x)) == (fun x : G => k (g x))) => AmalgamatedFreeProduct_rec X h k p) proj2.1 proj2.2) X0.1 X0.2) o (fun r : GroupHomomorphism AmalgamatedFreeProduct 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : (fun x : G => grp_homo_compose r amal_inl (f x)) == (fun x : G => grp_homo_compose r amal_inr (g x)))) == idmap
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism AmalgamatedFreeProduct 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]))) = r
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism AmalgamatedFreeProduct 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]))) == r
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism AmalgamatedFreeProduct X

forall w : Words, (fun x : amal_type => 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) (word_concat_w_nil [inr (g x0)])) (word_concat_w_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: GroupHomomorphism AmalgamatedFreeProduct X
x: Words

(fun x : amal_type => 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) (word_concat_w_nil [inr (g x0)])) (word_concat_w_nil [inl (f x0)]))) x = r x) (amal_eta x)
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
r: GroupHomomorphism AmalgamatedFreeProduct 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_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: GroupHomomorphism AmalgamatedFreeProduct X
a: (H + K)%type
x: list (H + K)
IHx: 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]))) (amal_eta x) = r (amal_eta 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]))) (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 X
a: (H + K)%type
x: list (H + K)
IHx: 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]))) (amal_eta x) = r (amal_eta 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]))) (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 X
a: (H + K)%type
x: list (H + K)
IHx: fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => r (amal_eta [inl g]) * x | inr g => fun x : X => r (amal_eta [inr g]) * x end) mon_unit x = r (amal_eta x)

match a with | inl g => fun x : X => r (amal_eta [inl g]) * x | inr g => fun x : X => r (amal_eta [inr g]) * x end (fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => r (amal_eta [inl g]) * x | inr g => fun x : X => r (amal_eta [inr g]) * x end) mon_unit 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 X
a: (H + K)%type
x: list (H + K)
IHx: fold_right (fun X0 : H + K => match X0 with | inl g => fun x : X => r (amal_eta [inl g]) * x | inr g => fun x : X => r (amal_eta [inr g]) * x end) mon_unit x = r (amal_eta x)

match a with | inl g => fun x : X => r (amal_eta [inl g]) * x | inr g => fun x : X => r (amal_eta [inr g]) * x 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 : GroupHomomorphism AmalgamatedFreeProduct 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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]) : amal_inl (f x) = amal_inr (g x))) : (fun x : G => grp_homo_compose r amal_inl (f x)) == (fun x : G => grp_homo_compose r amal_inr (g x)))) o (fun X0 : {h : GroupHomomorphism H X & {k : GroupHomomorphism K X & h o f == k o g}} => (fun (h : GroupHomomorphism H X) (proj2 : {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}) => (fun (k : GroupHomomorphism K X) (p : (fun x : G => h (f x)) == (fun x : G => k (g x))) => 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 : GroupHomomorphism H X & {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (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) (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) (word_concat_w_nil [inr (g x)])) (word_concat_w_nil [inl (f x)]))) = hkp
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
hkp: {h : GroupHomomorphism H X & {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (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)) = hkp
G, H, K: Group
f: GroupHomomorphism G H
g: GroupHomomorphism G K
H0: Funext
X: Group
hkp: {h : GroupHomomorphism H X & {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}}

equiv_sigma_prod (fun hk : GroupHomomorphism H X * GroupHomomorphism 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 : GroupHomomorphism H X * GroupHomomorphism 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 : GroupHomomorphism H X & {k : GroupHomomorphism K X & (fun x : G => h (f x)) == (fun x : G => k (g x))}}

(equiv_sigma_prod (fun hk : GroupHomomorphism H X * GroupHomomorphism 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 : GroupHomomorphism H X * GroupHomomorphism 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: GroupHomomorphism H X
k: GroupHomomorphism K X
p: (fun x : G => h (f x)) == (fun x : G => k (g x))

(equiv_sigma_prod (fun hk : GroupHomomorphism H X * GroupHomomorphism 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 : GroupHomomorphism H X * GroupHomomorphism 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. End FreeProduct. Arguments amal_eta {G H K f g} x. Definition FreeProduct (G H : Group) : Group := AmalgamatedFreeProduct grp_trivial G H (grp_trivial_rec _) (grp_trivial_rec _). 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 _ _ _ _ _.
G, H, K: Group
f: GroupHomomorphism G K
g: GroupHomomorphism H K

GroupHomomorphism (FreeProduct G H) K
G, H, K: Group
f: GroupHomomorphism G K
g: GroupHomomorphism H K

GroupHomomorphism (FreeProduct G H) K
G, H, K: Group
f: GroupHomomorphism G K
g: GroupHomomorphism H K

f o grp_trivial_rec G == g o grp_trivial_rec H
G, H, K: Group
f: GroupHomomorphism G K
g: GroupHomomorphism H K

f (grp_trivial_rec G tt) = g (grp_trivial_rec H tt)
refine (grp_homo_unit _ @ (grp_homo_unit _)^). Defined.
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 : GroupHomomorphism G K & {k : GroupHomomorphism H K & (fun x : grp_trivial => h (grp_trivial_rec G x)) == (fun x : grp_trivial => k (grp_trivial_rec H x))}} <~> GroupHomomorphism G K * GroupHomomorphism H K
funext: Funext
G, H, K: Group
y: GroupHomomorphism G K

forall a : GroupHomomorphism H K, Contr ((fun x : grp_trivial => y (grp_trivial_rec G x)) == (fun x : grp_trivial => a (grp_trivial_rec H x)))
funext: Funext
G, H, K: Group
y: GroupHomomorphism G K
f: GroupHomomorphism H K

Contr ((fun x : grp_trivial => y (grp_trivial_rec G x)) == (fun x : grp_trivial => f (grp_trivial_rec H x)))
funext: Funext
G, H, K: Group
y: GroupHomomorphism G K
f: GroupHomomorphism H K

forall a : grp_trivial, Contr (y (grp_trivial_rec G a) = f (grp_trivial_rec H a))
funext: Funext
G, H, K: Group
y: GroupHomomorphism G K
f: GroupHomomorphism H K

merely (y (grp_trivial_rec G tt) = f (grp_trivial_rec H tt))
funext: Funext
G, H, K: Group
y: GroupHomomorphism G K
f: GroupHomomorphism H K

y (grp_trivial_rec G tt) = f (grp_trivial_rec H tt)
refine (grp_homo_unit _ @ (grp_homo_unit _)^). Defined. (** The freeproduct 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
exact (FreeProduct_rec G H).
G, H: Group

forall (z : Group) (f : G $-> z) (g : H $-> z), FreeProduct_rec G H z f g $o freeproduct_inl $== f
G, H, Z: Group
f: G $-> Z
g: H $-> Z
x: G

f x * mon_unit = f x
rapply right_identity.
G, H: Group

forall (z : Group) (f : G $-> z) (g : H $-> z), FreeProduct_rec G H z f g $o freeproduct_inr $== g
G, H, Z: Group
f: G $-> Z
g: H $-> Z
x: H

g x * mon_unit = g x
rapply right_identity.
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
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

forall w : Words G H, f (amal_eta w) = g (amal_eta w)
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
w: Words G H

f (amal_eta w) = g (amal_eta w)
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 (amal_eta nil) = g (amal_eta nil)
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
gh: (G + H)%type
w: list (G + H)
IHw: f (amal_eta w) = g (amal_eta w)
f (amal_eta (gh :: w)) = g (amal_eta (gh :: w))
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
gh: (G + H)%type
w: list (G + H)
IHw: f (amal_eta w) = g (amal_eta w)

f (amal_eta (gh :: w)) = g (amal_eta (gh :: w))
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
gh: (G + H)%type
w: list (G + H)
IHw: f (amal_eta w) = g (amal_eta w)

f (amal_eta (gh :: w)) = g (amal_eta (gh :: w))
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
gh: (G + H)%type
w: list (G + H)
IHw: f (amal_eta w) = g (amal_eta w)

f (amal_eta [gh] * amal_eta w) = g (amal_eta [gh] * amal_eta w)
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
gh: (G + H)%type
w: list (G + H)
IHw: f (amal_eta w) = g (amal_eta w)

f (amal_eta [gh]) * f (amal_eta w) = g (amal_eta [gh]) * g (amal_eta w)
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
gh: (G + H)%type

f (amal_eta [gh]) = g (amal_eta [gh])
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
g': G

f (amal_eta [inl g']) = g (amal_eta [inl 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
h: H
f (amal_eta [inr h]) = g (amal_eta [inr h])
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
g': G

f (amal_eta [inl g']) = g (amal_eta [inl g'])
exact (p 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
h: H

f (amal_eta [inr h]) = g (amal_eta [inr h])
exact (q h). Defined.