Built with Alectryon, running Coq+SerAPI v8.16.0+0.16.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.
From Tealeaves Require Export
  Tactics.Prelude
  Classes.Functor
  Misc.Product
  Misc.Strength
  Functors.Identity
  Functors.Compose.

Import Product.Notations.

#[local] Generalizable Variables ϕ F G A B C.

(** * Applicative Functors *)
(**********************************************************************)
Class Pure (F: Type -> Type) :=
  pure: forall {A}, A -> F A.
Class Mult (F: Type -> Type) :=
  mult: forall {A B: Type}, F A * F B -> F (A * B).

#[local] Notation "x ⊗ y" :=
  (mult (x, y)) (at level 50, left associativity).

Class Applicative (G: Type -> Type)
  `{Map_G: Map G} `{Pure_G: Pure G} `{Mult_G: Mult G} :=
  { app_functor :> Functor G;
    app_pure_natural: forall (A B: Type) (f: A -> B) (x: A),
      map f (pure x) = pure (f x);
    app_mult_natural:
    forall (A B C D: Type) (f: A -> C) (g: B -> D) (x: G A) (y: G B),
      map f x ⊗ map g y = map (map_tensor f g) (x ⊗ y);
    app_assoc: forall (A B C: Type) (x: G A) (y: G B) (z: G C),
      map α ((x ⊗ y) ⊗ z) = x ⊗ (y ⊗ z);
    app_unital_l: forall (A: Type) (x: G A),
      map left_unitor (pure tt ⊗ x) = x;
    app_unital_r: forall (A: Type) (x: G A),
      map right_unitor (x ⊗ pure tt) = x;
    app_mult_pure: forall (A B: Type) (a: A) (b: B),
      pure a ⊗ pure b = pure (a, b);
  }.

G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Natural (@pure G Pure_G)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Natural (@pure G Pure_G)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A B : Type) (f : A -> B), map f ∘ pure = pure ∘ map f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A B : Type) (f : A -> B), map f ∘ pure = pure ∘ map f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
f: A -> B

map f ∘ pure = pure ∘ map f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
f: A -> B

map f ○ pure = pure ○ map f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
f: A -> B
a: A

map f (pure a) = pure (map f a)
now rewrite app_pure_natural. Qed. (** ** Homomorphisms Between Applicative Functors *) (**********************************************************************) Class ApplicativeMorphism (F G: Type -> Type) `{Map F} `{Mult F} `{Pure F} `{Map G} `{Mult G} `{Pure G} (ϕ: forall {A}, F A -> G A) := { appmor_app_F: Applicative F; appmor_app_G: Applicative G; appmor_natural: forall (A B: Type) (f: A -> B) (x: F A), ϕ (map f x) = map f (ϕ x); appmor_pure: forall (A: Type) (a: A), ϕ (pure a) = pure a; appmor_mult: forall (A B: Type) (x: F A) (y: F B), ϕ (x ⊗ y) = ϕ x ⊗ ϕ y; }. Section pointfree. Context `{ApplicativeMorphism F G ϕ}.
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ

forall (A B : Type) (f : A -> B), ϕ B ∘ map f = map f ∘ ϕ A
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ

forall (A B : Type) (f : A -> B), ϕ B ∘ map f = map f ∘ ϕ A
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ
A, B: Type
f: A -> B

ϕ B ∘ map f = map f ∘ ϕ A
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ
A, B: Type
f: A -> B
x: F A

(ϕ B ∘ map f) x = (map f ∘ ϕ A) x
apply appmor_natural. Qed.
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ

forall A : Type, ϕ A ∘ pure = pure
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ

forall A : Type, ϕ A ∘ pure = pure
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ
A: Type

ϕ A ∘ pure = pure
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
H5: ApplicativeMorphism F G ϕ
A: Type
x: A

(ϕ A ∘ pure) x = pure x
apply appmor_pure. Qed. End pointfree.
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ

Natural ϕ
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ

Natural ϕ
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y

Natural ϕ
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y

Functor F
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y
Functor G
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y
forall (A B : Type) (f : A -> B), map f ∘ ϕ A = ϕ B ∘ map f
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y

Functor F
typeclasses eauto.
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y

Functor G
typeclasses eauto.
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y

forall (A B : Type) (f : A -> B), map f ∘ ϕ A = ϕ B ∘ map f
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y
A, B: Type
f: A -> B

map f ∘ ϕ A = ϕ B ∘ map f
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y
A, B: Type
f: A -> B
fa: F A

(map f ∘ ϕ A) fa = (ϕ B ∘ map f) fa
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y
A, B: Type
f: A -> B
fa: F A

map f (ϕ A fa) = ϕ B (map f fa)
F, G: Type -> Type
H: Map F
H0: Mult F
H1: Pure F
H2: Map G
H3: Mult G
H4: Pure G
ϕ: forall A : Type, F A -> G A
morphism: ApplicativeMorphism F G ϕ
appmor_app_F0: Applicative F
appmor_app_G0: Applicative G
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F A), ϕ B (map f x) = map f (ϕ A x)
appmor_pure0: forall (A : Type) (a : A), ϕ A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F A) (y : F B), ϕ (A * B) (x ⊗ y) = ϕ A x ⊗ ϕ B y
A, B: Type
f: A -> B
fa: F A

map f (ϕ A fa) = map f (ϕ A fa)
reflexivity. Qed. Ltac infer_applicative_instances := match goal with | H: ApplicativeMorphism ?G1 ?G2 |- _ => let app1 := fresh "app1" in assert (app1: Applicative G1) by now inversion H end; match goal with | H: ApplicativeMorphism ?G1 ?G2 |- _ => let app2 := fresh "app2" in assert (app2: Applicative G2) by now inversion H end. (** *** The identity transformation on any <<F>> is a homomorphism *) (**********************************************************************)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

ApplicativeMorphism F F (@id ○ F)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

ApplicativeMorphism F F (@id ○ F)
constructor; now try typeclasses eauto. Qed. (** ** Basic Lemmas *) (**********************************************************************) Section basics. Context `{Applicative F}.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A : Type) (t : F A), pure tt ⊗ t = map left_unitor_inv t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A : Type) (t : F A), pure tt ⊗ t = map left_unitor_inv t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

pure tt ⊗ t = map left_unitor_inv t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

pure tt ⊗ t = map left_unitor_inv (map left_unitor (pure tt ⊗ t))
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

pure tt ⊗ t = (map left_unitor_inv ∘ map left_unitor) (pure tt ⊗ t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

pure tt ⊗ t = map (left_unitor_inv ∘ left_unitor) (pure tt ⊗ t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

pure tt ⊗ t = map id (pure tt ⊗ t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

pure tt ⊗ t = id (pure tt ⊗ t)
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A : Type) (t : F A), t ⊗ pure tt = map right_unitor_inv t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A : Type) (t : F A), t ⊗ pure tt = map right_unitor_inv t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

t ⊗ pure tt = map right_unitor_inv t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

t ⊗ pure tt = map right_unitor_inv (map right_unitor (t ⊗ pure tt))
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

t ⊗ pure tt = (map right_unitor_inv ∘ map right_unitor) (t ⊗ pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

t ⊗ pure tt = map (right_unitor_inv ∘ right_unitor) (t ⊗ pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

t ⊗ pure tt = map id (t ⊗ pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

t ⊗ pure tt = id (t ⊗ pure tt)
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B : Type) (a : A) (t : F B), pure a ⊗ t = strength (a, t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B : Type) (a : A) (t : F B), pure a ⊗ t = strength (a, t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = strength (a, t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = map (pair a) t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = map (pair a) (map left_unitor (pure tt ⊗ t))
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = (map (pair a) ∘ map left_unitor) (pure tt ⊗ t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = map (pair a ∘ left_unitor) (pure tt ⊗ t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = map (map_fst (const a)) (pure tt ⊗ t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = map (map_tensor (const a) id) (pure tt ⊗ t)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = map (const a) (pure tt) ⊗ map id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = pure (const a tt) ⊗ map id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

pure a ⊗ t = pure (const a tt) ⊗ id t
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B : Type) (a : A) (t : F B), t ⊗ pure a = map (fun b : B => (b, a)) t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B : Type) (a : A) (t : F B), t ⊗ pure a = map (fun b : B => (b, a)) t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = map (fun b : B => (b, a)) t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = map (fun b : B => (b, a)) (map right_unitor (t ⊗ pure tt))
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = (map (fun b : B => (b, a)) ∘ map right_unitor) (t ⊗ pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = map ((fun b : B => (b, a)) ∘ right_unitor) (t ⊗ pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = map (map_snd (const a)) (t ⊗ pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = map (map_tensor id (const a)) (t ⊗ pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = map id t ⊗ map (const a) (pure tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = map id t ⊗ pure (const a tt)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B: Type
a: A
t: F B

t ⊗ pure a = id t ⊗ pure (const a tt)
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall A : Type, map left_unitor ∘ mult ∘ pair (pure tt) = id
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall A : Type, map left_unitor ∘ mult ∘ pair (pure tt) = id
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type

map left_unitor ∘ mult ∘ pair (pure tt) = id
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

(map left_unitor ∘ mult ∘ pair (pure tt)) t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map left_unitor (pure tt ⊗ t) = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map left_unitor (map left_unitor_inv t) = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

(map left_unitor ∘ map left_unitor_inv) t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map (left_unitor ∘ left_unitor_inv) t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map id t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

id t = id t
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall A : Type, map right_unitor ∘ mult ∘ (fun b : F A => (b, pure tt)) = id
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall A : Type, map right_unitor ∘ mult ∘ (fun b : F A => (b, pure tt)) = id
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type

map right_unitor ∘ mult ∘ (fun b : F A => (b, pure tt)) = id
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

(map right_unitor ∘ mult ∘ (fun b : F A => (b, pure tt))) t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map right_unitor (t ⊗ pure tt) = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map right_unitor (map right_unitor_inv t) = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

(map right_unitor ∘ map right_unitor_inv) t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map (right_unitor ∘ right_unitor_inv) t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

map id t = id t
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A: Type
t: F A

id t = id t
reflexivity. Qed. End basics. (** ** Mapping and Reassociating <<⊗>> *) (**********************************************************************) Section Applicative_corollaries. Context (F: Type -> Type) `{Applicative F}.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B C : Type) (f : A -> C) (x : F A) (y : F B), map f x ⊗ y = map (map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B C : Type) (f : A -> C) (x : F A) (y : F B), map f x ⊗ y = map (map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
f: A -> C
x: F A
y: F B

map f x ⊗ y = map (map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
f: A -> C
x: F A
y: F B

map f x ⊗ map id y = map (map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
f: A -> C
x: F A
y: F B

map (map_tensor f id) (x ⊗ y) = map (map_fst f) (x ⊗ y)
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B D : Type) (g : B -> D) (x : F A) (y : F B), x ⊗ map g y = map (map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B D : Type) (g : B -> D) (x : F A) (y : F B), x ⊗ map g y = map (map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, D: Type
g: B -> D
x: F A
y: F B

x ⊗ map g y = map (map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, D: Type
g: B -> D
x: F A
y: F B

map id x ⊗ map g y = map (map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, D: Type
g: B -> D
x: F A
y: F B

map (map_tensor id g) (x ⊗ y) = map (map_snd g) (x ⊗ y)
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B C E : Type) (f : A -> C) (h : C * B -> E) (x : F A) (y : F B), map h (map f x ⊗ y) = map (h ∘ map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B C E : Type) (f : A -> C) (h : C * B -> E) (x : F A) (y : F B), map h (map f x ⊗ y) = map (h ∘ map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C, E: Type
f: A -> C
h: C * B -> E
x: F A
y: F B

map h (map f x ⊗ y) = map (h ∘ map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C, E: Type
f: A -> C
h: C * B -> E
x: F A
y: F B

map h (map (map_fst f) (x ⊗ y)) = map (h ∘ map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C, E: Type
f: A -> C
h: C * B -> E
x: F A
y: F B

(map h ∘ map (map_fst f)) (x ⊗ y) = map (h ∘ map_fst f) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C, E: Type
f: A -> C
h: C * B -> E
x: F A
y: F B

map (h ∘ map_fst f) (x ⊗ y) = map (h ∘ map_fst f) (x ⊗ y)
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B D E : Type) (g : B -> D) (h : A * D -> E) (x : F A) (y : F B), map h (x ⊗ map g y) = map (h ∘ map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B D E : Type) (g : B -> D) (h : A * D -> E) (x : F A) (y : F B), map h (x ⊗ map g y) = map (h ∘ map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, D, E: Type
g: B -> D
h: A * D -> E
x: F A
y: F B

map h (x ⊗ map g y) = map (h ∘ map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, D, E: Type
g: B -> D
h: A * D -> E
x: F A
y: F B

map h (map (map_snd g) (x ⊗ y)) = map (h ∘ map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, D, E: Type
g: B -> D
h: A * D -> E
x: F A
y: F B

(map h ∘ map (map_snd g)) (x ⊗ y) = map (h ∘ map_snd g) (x ⊗ y)
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, D, E: Type
g: B -> D
h: A * D -> E
x: F A
y: F B

map (h ∘ map_snd g) (x ⊗ y) = map (h ∘ map_snd g) (x ⊗ y)
reflexivity. Qed.
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B C : Type) (x : F A) (y : F B) (z : F C), map α^-1 (x ⊗ (y ⊗ z)) = x ⊗ y ⊗ z
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F

forall (A B C : Type) (x : F A) (y : F B) (z : F C), map α^-1 (x ⊗ (y ⊗ z)) = x ⊗ y ⊗ z
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
x: F A
y: F B
z: F C

map α^-1 (x ⊗ (y ⊗ z)) = x ⊗ y ⊗ z
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
x: F A
y: F B
z: F C

map α^-1 (map α (x ⊗ y ⊗ z)) = x ⊗ y ⊗ z
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
x: F A
y: F B
z: F C

(map α^-1 ∘ map α) (x ⊗ y ⊗ z) = x ⊗ y ⊗ z
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
x: F A
y: F B
z: F C

map (α^-1 ∘ α) (x ⊗ y ⊗ z) = x ⊗ y ⊗ z
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
x: F A
y: F B
z: F C

map id (x ⊗ y ⊗ z) = x ⊗ y ⊗ z
F: Type -> Type
Map_G: Map F
Pure_G: Pure F
Mult_G: Mult F
H: Applicative F
A, B, C: Type
x: F A
y: F B
z: F C

id (x ⊗ y ⊗ z) = x ⊗ y ⊗ z
reflexivity. Qed. End Applicative_corollaries. (** * The Category of Applicative Functors *) (**********************************************************************) (** ** The Identity Applicative Functor *) (**********************************************************************) #[export] Instance Pure_I: Pure (fun A => A) := @id. #[export] Instance Mult_I: Mult (fun A => A) := fun A B (p: A * B) => p. #[export, program] Instance Applicative_I: Applicative (fun A => A). (** *** <<pure F>> is a Homomorphism from <<I>> to <<F>> *) (**********************************************************************) Section pure_as_applicative_transformation. Context `{Applicative G}.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A B : Type) (f : A -> B) (t : A), pure (map f t) = map f (pure t)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A B : Type) (f : A -> B) (t : A), pure (map f t) = map f (pure t)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
f: A -> B
t: A

pure (map f t) = map f (pure t)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
f: A -> B
t: A

pure (map f t) = pure (f t)
reflexivity. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A : Type) (a : A), pure (pure a) = pure a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A : Type) (a : A), pure (pure a) = pure a
reflexivity. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A B : Type) (a : A) (b : B), pure (a ⊗ b) = pure a ⊗ pure b
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

forall (A B : Type) (a : A) (b : B), pure (a ⊗ b) = pure a ⊗ pure b
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
a: A
b: B

pure (a ⊗ b) = pure a ⊗ pure b
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
a: A
b: B

pure (a, b) = pure a ⊗ pure b
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
a: A
b: B

pure (a, b) = pure (a, b)
reflexivity. Qed. #[export] Instance ApplicativeMorphism_pure: ApplicativeMorphism (fun A => A) G (@pure G _) := {| appmor_natural := pure_appmor_1; appmor_pure := pure_appmor_2; appmor_mult := pure_appmor_3; |}. End pure_as_applicative_transformation. (** ** Composition of Applicative Functors *) (**********************************************************************) Section applicative_compose. Context (G2 G1: Type -> Type) `{Applicative G1} `{Applicative G2}. #[export] Instance Pure_compose: Pure (G2 ∘ G1) := fun (A: Type) (a: A) => pure (F := G2) (pure (F := G1) a). #[export] Instance Mult_compose: Mult (G2 ∘ G1) := fun (A B: Type) (p: G2 (G1 A) * G2 (G1 B)) => map (F := G2) (mult (F := G1)) (mult (F := G2) (fst p, snd p)): G2 (G1 (A * B)).
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B : Type) (f : A -> B) (x : A), map f (pure x) = pure (f x)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B : Type) (f : A -> B) (x : A), map f (pure x) = pure (f x)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
f: A -> B
x: A

map f (pure x) = pure (f x)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
f: A -> B
x: A

map (map f) (pure (pure x)) = pure (pure (f x))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
f: A -> B
x: A

pure (pure (f x)) = pure (pure (f x))
reflexivity. Qed.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B C D : Type) (f : A -> C) (g : B -> D) (x : G2 (G1 A)) (y : G2 (G1 B)), map f x ⊗ map g y = map (map_tensor f g) (x ⊗ y)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B C D : Type) (f : A -> C) (g : B -> D) (x : G2 (G1 A)) (y : G2 (G1 B)), map f x ⊗ map g y = map (map_tensor f g) (x ⊗ y)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

map f x ⊗ map g y = map (map_tensor f g) (x ⊗ y)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

map mult (fst (map (map f) x, map (map g) y) ⊗ snd (map (map f) x, map (map g) y)) = map (map (map_tensor f g)) (map mult (fst (x, y) ⊗ snd (x, y)))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

map mult (map (map f) x ⊗ map (map g) y) = map (map (map_tensor f g)) (map mult (x ⊗ y))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

map mult (map (map_tensor (map f) (map g)) (x ⊗ y)) = map (map (map_tensor f g)) (map mult (x ⊗ y))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

(map mult ∘ map (map_tensor (map f) (map g))) (x ⊗ y) = map (map (map_tensor f g)) (map mult (x ⊗ y))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

map (mult ∘ map_tensor (map f) (map g)) (x ⊗ y) = map (map (map_tensor f g)) (map mult (x ⊗ y))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

map (mult ∘ map_tensor (map f) (map g)) (x ⊗ y) = (map (map (map_tensor f g)) ∘ map mult) (x ⊗ y)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

map (mult ∘ map_tensor (map f) (map g)) (x ⊗ y) = map (map (map_tensor f g) ∘ mult) (x ⊗ y)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)

mult ∘ map_tensor (map f) (map g) = map (map_tensor f g) ∘ mult
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)
fa: G1 A
fb: G1 B

(mult ∘ map_tensor (map f) (map g)) (fa, fb) = (map (map_tensor f g) ∘ mult) (fa, fb)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)
fa: G1 A
fb: G1 B

mult (map_tensor (map f) (map g) (fa, fb)) = map (map_tensor f g) (fa ⊗ fb)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C, D: Type
f: A -> C
g: B -> D
x: G2 (G1 A)
y: G2 (G1 B)
fa: G1 A
fb: G1 B

mult (map_tensor (map f) (map g) (fa, fb)) = map f fa ⊗ map g fb
reflexivity. Qed.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B C : Type) (x : G2 (G1 A)) (y : G2 (G1 B)) (z : G2 (G1 C)), map α (x ⊗ y ⊗ z) = x ⊗ (y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B C : Type) (x : G2 (G1 A)) (y : G2 (G1 B)) (z : G2 (G1 C)), map α (x ⊗ y ⊗ z) = x ⊗ (y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map α (x ⊗ y ⊗ z) = x ⊗ (y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α) (map mult (fst (map mult (fst (x, y) ⊗ snd (x, y)), z) ⊗ snd (map mult (fst (x, y) ⊗ snd (x, y)), z))) = map mult (fst (x, map mult (fst (y, z) ⊗ snd (y, z))) ⊗ snd (x, map mult (fst (y, z) ⊗ snd (y, z))))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α) (map mult (map mult (x ⊗ y) ⊗ z)) = map mult (x ⊗ map mult (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α) (map mult (map (map_tensor mult id) (x ⊗ y ⊗ z))) = map mult (x ⊗ map mult (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)
map (map_tensor mult id) (x ⊗ y ⊗ z) = map mult (x ⊗ y) ⊗ z
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map_tensor mult id) (x ⊗ y ⊗ z) = map mult (x ⊗ y) ⊗ z
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map mult (x ⊗ y) ⊗ map id z = map mult (x ⊗ y) ⊗ z
now rewrite fun_map_id.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α) (map mult (map (map_tensor mult id) (x ⊗ y ⊗ z))) = map mult (x ⊗ map mult (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α) ((map mult ∘ map (map_tensor mult id)) (x ⊗ y ⊗ z)) = map mult (x ⊗ map mult (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α) (map (mult ∘ map_tensor mult id) (x ⊗ y ⊗ z)) = map mult (x ⊗ map mult (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

(map (map α) ∘ map (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map mult (x ⊗ map mult (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map mult (x ⊗ map mult (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map mult (map (map_tensor id mult) (x ⊗ (y ⊗ z)))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)
map (map_tensor id mult) (x ⊗ (y ⊗ z)) = x ⊗ map mult (y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map_tensor id mult) (x ⊗ (y ⊗ z)) = x ⊗ map mult (y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map id x ⊗ map mult (y ⊗ z) = x ⊗ map mult (y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

id x ⊗ map mult (y ⊗ z) = x ⊗ map mult (y ⊗ z)
reflexivity.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map mult (map (map_tensor id mult) (x ⊗ (y ⊗ z)))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = (map mult ∘ map (map_tensor id mult)) (x ⊗ (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map (mult ∘ map_tensor id mult) (x ⊗ (y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map (mult ∘ map_tensor id mult) (map α (x ⊗ y ⊗ z))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = (map (mult ∘ map_tensor id mult) ∘ map α) (x ⊗ y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map (mult ∘ map_tensor id mult ∘ α) (x ⊗ y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map (map α ∘ (mult ∘ map_tensor mult id)) (x ⊗ y ⊗ z) = map (mult ∘ map_tensor id mult ∘ α) (x ⊗ y ⊗ z)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)

map α ∘ (mult ∘ map_tensor mult id) = mult ∘ map_tensor id mult ∘ α
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)
ga: G1 A
gb: G1 B
gc: G1 C

(map α ∘ (mult ∘ map_tensor mult id)) (ga, gb, gc) = (mult ∘ map_tensor id mult ∘ α) (ga, gb, gc)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)
ga: G1 A
gb: G1 B
gc: G1 C

map α (ga ⊗ gb ⊗ gc) = ga ⊗ (gb ⊗ gc)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B, C: Type
x: G2 (G1 A)
y: G2 (G1 B)
z: G2 (G1 C)
ga: G1 A
gb: G1 B
gc: G1 C

ga ⊗ (gb ⊗ gc) = ga ⊗ (gb ⊗ gc)
reflexivity. Qed.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A : Type) (x : G2 (G1 A)), map left_unitor (pure tt ⊗ x) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A : Type) (x : G2 (G1 A)), map left_unitor (pure tt ⊗ x) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map left_unitor (pure tt ⊗ x) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map left_unitor) (map mult (fst (pure (pure tt), x) ⊗ snd (pure (pure tt), x))) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map left_unitor) (map mult (pure (pure tt) ⊗ x)) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

(map (map left_unitor) ∘ map mult) (pure (pure tt) ⊗ x) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map left_unitor ∘ mult) (pure (pure tt) ⊗ x) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map left_unitor ∘ mult) (strength (pure tt, x)) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map left_unitor ∘ mult) (map (pair (pure tt)) x) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

(map (map left_unitor ∘ mult) ∘ map (pair (pure tt))) x = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map left_unitor ∘ mult ∘ pair (pure tt)) x = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map id x = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

id x = x
reflexivity. Qed.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A : Type) (x : (G2 ∘ G1) A), map right_unitor (x ⊗ pure tt) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A : Type) (x : (G2 ∘ G1) A), map right_unitor (x ⊗ pure tt) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: (G2 ∘ G1) A

map right_unitor (x ⊗ pure tt) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map right_unitor (x ⊗ pure tt) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map right_unitor) (map mult (fst (x, pure (pure tt)) ⊗ snd (x, pure (pure tt)))) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map right_unitor) (map mult (x ⊗ pure (pure tt))) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

(map (map right_unitor) ∘ map mult) (x ⊗ pure (pure tt)) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map right_unitor ∘ mult) (x ⊗ pure (pure tt)) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map right_unitor ∘ mult) (map (fun b : G1 A => (b, pure tt)) x) = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

(map (map right_unitor ∘ mult) ∘ map (fun b : G1 A => (b, pure tt))) x = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map (map right_unitor ∘ mult ∘ (fun b : G1 A => (b, pure tt))) x = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

map id x = x
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A: Type
x: G2 (G1 A)

id x = x
reflexivity. Qed.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B : Type) (a : A) (b : B), pure a ⊗ pure b = pure (a, b)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2

forall (A B : Type) (a : A) (b : B), pure a ⊗ pure b = pure (a, b)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B

pure a ⊗ pure b = pure (a, b)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B

map mult (fst (pure (pure a), pure (pure b)) ⊗ snd (pure (pure a), pure (pure b))) = pure (pure (a, b))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B

map mult (pure (pure a) ⊗ pure (pure b)) = pure (pure (a, b))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B

forall p : G1 A * G1 B, map mult (pure p) = pure (mult p)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B
square: forall p : G1 A * G1 B, map mult (pure p) = pure (mult p)
map mult (pure (pure a) ⊗ pure (pure b)) = pure (pure (a, b))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B

forall p : G1 A * G1 B, map mult (pure p) = pure (mult p)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B
p: G1 A * G1 B

map mult (pure p) = pure (mult p)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B
p: G1 A * G1 B

pure (mult p) = pure (mult p)
reflexivity.
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B
square: forall p : G1 A * G1 B, map mult (pure p) = pure (mult p)

map mult (pure (pure a) ⊗ pure (pure b)) = pure (pure (a, b))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B
square: forall p : G1 A * G1 B, map mult (pure p) = pure (mult p)

map mult (pure (pure a) ⊗ pure (pure b)) = pure (pure a ⊗ pure b)
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B
square: forall p : G1 A * G1 B, map mult (pure p) = pure (mult p)

map mult (pure (pure a) ⊗ pure (pure b)) = map mult (pure (pure a, pure b))
G2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
A, B: Type
a: A
b: B
square: forall p : G1 A * G1 B, map mult (pure p) = pure (mult p)

map mult (pure (pure a) ⊗ pure (pure b)) = map mult (pure (pure a) ⊗ pure (pure b))
reflexivity. Qed. #[export, program] Instance Applicative_compose: Applicative (G2 ∘ G1) := {| app_pure_natural := app_pure_nat_compose; app_mult_natural := app_mult_nat_compose; app_assoc := app_asc_compose; app_unital_l := app_unital_l_compose; app_unital_r := app_unital_r_compose; app_mult_pure := app_mult_pure_compose; |}. End applicative_compose. (** ** Composition with the Identity Functor *) (**********************************************************************) Section applicative_compose_laws. Context (G: Type -> Type) `{Applicative G}.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Pure_compose G (fun A : Type => A) = @pure G Pure_G
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Pure_compose G (fun A : Type => A) = @pure G Pure_G
easy. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Pure_compose (fun A : Type => A) G = @pure G Pure_G
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Pure_compose (fun A : Type => A) G = @pure G Pure_G
easy. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Mult_compose G (fun A : Type => A) = @mult G Mult_G
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Mult_compose G (fun A : Type => A) = @mult G Mult_G
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
x: (G ∘ (fun A : Type => A)) A
y: (G ∘ (fun A : Type => A)) B

Mult_compose G (fun A : Type => A) A B (x, y) = x ⊗ y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
x: G A
y: G B

Mult_compose G (fun A : Type => A) A B (x, y) = x ⊗ y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
x: G A
y: G B

map mult (fst (x, y) ⊗ snd (x, y)) = x ⊗ y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
x: G A
y: G B

id (fst (x, y) ⊗ snd (x, y)) = x ⊗ y
reflexivity. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Mult_compose (fun A : Type => A) G = @mult G Mult_G
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G

Mult_compose (fun A : Type => A) G = @mult G Mult_G
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
x: ((fun A : Type => A) ∘ G) A
y: ((fun A : Type => A) ∘ G) B

Mult_compose (fun A : Type => A) G A B (x, y) = x ⊗ y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
x: G A
y: G B

Mult_compose (fun A : Type => A) G A B (x, y) = x ⊗ y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: Applicative G
A, B: Type
x: G A
y: G B

map mult (fst (x, y) ⊗ snd (x, y)) = x ⊗ y
reflexivity. Qed. End applicative_compose_laws. (** ** Parallel Composition of Applicative Homomorphisms *) (**********************************************************************) Section applicative_compose_laws.
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ G2) (fun A : Type => ϕ1 (G2 A) ∘ map (ϕ2 A))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ G2) (fun A : Type => ϕ1 (G2 A) ∘ map (ϕ2 A))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ G2) (fun A : Type => ϕ1 (G2 A) ∘ map (ϕ2 A))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ G2) (fun A : Type => ϕ1 (G2 A) ∘ map (ϕ2 A))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y

forall (A B : Type) (f : A -> B) (x : (F1 ∘ F2) A), (ϕ1 (G2 B) ∘ map (ϕ2 B)) (map f x) = map f ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
forall (A : Type) (a : A), (ϕ1 (G2 A) ∘ map (ϕ2 A)) (pure a) = pure a
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
forall (A B : Type) (x : (F1 ∘ F2) A) (y : (F1 ∘ F2) B), (ϕ1 (G2 (A * B)) ∘ map (ϕ2 (A * B))) (x ⊗ y) = (ϕ1 (G2 A) ∘ map (ϕ2 A)) x ⊗ (ϕ1 (G2 B) ∘ map (ϕ2 B)) y
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y

forall (A B : Type) (f : A -> B) (x : (F1 ∘ F2) A), (ϕ1 (G2 B) ∘ map (ϕ2 B)) (map f x) = map f ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A

(ϕ1 (G2 B) ∘ map (ϕ2 B)) (map f x) = map f ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A

(ϕ1 (G2 B) ∘ map (ϕ2 B)) (map (map f) x) = map (map f) ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A

ϕ1 (G2 B) (map (ϕ2 B) (map (map f) x)) = map (map f) (ϕ1 (G2 A) (map (ϕ2 A) x))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A

ϕ1 (G2 B) ((map (ϕ2 B) ∘ map (map f)) x) = map (map f) ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A

ϕ1 (G2 B) (map (ϕ2 B ∘ map f) x) = map (map f) ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A

forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
appmor_natural1': forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A
ϕ1 (G2 B) (map (ϕ2 B ∘ map f) x) = map (map f) ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A

forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
A0, B0: Type
f0: A0 -> B0

ϕ2 B0 ∘ map f0 = map f0 ∘ ϕ2 A0
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
A0, B0: Type
f0: A0 -> B0
f2a: F2 A0

(ϕ2 B0 ∘ map f0) f2a = (map f0 ∘ ϕ2 A0) f2a
apply appmor_natural1.
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
appmor_natural1': forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A

ϕ1 (G2 B) (map (ϕ2 B ∘ map f) x) = map (map f) ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
appmor_natural1': forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A

ϕ1 (G2 B) (map (map f ∘ ϕ2 A) x) = map (map f) ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
appmor_natural1': forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A

ϕ1 (G2 B) ((map (map f) ∘ map (ϕ2 A)) x) = map (map f) ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
appmor_natural1': forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A

ϕ1 (G2 B) (map (map f) (map (ϕ2 A) x)) = map (map f) (ϕ1 (G2 A) (map (ϕ2 A) x))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
f: A -> B
x: (F1 ∘ F2) A
appmor_natural1': forall (A B : Type) (f : A -> B), ϕ2 B ∘ map f = map f ∘ ϕ2 A

map (map f) (ϕ1 (G2 A) (map (ϕ2 A) x)) = map (map f) (ϕ1 (G2 A) (map (ϕ2 A) x))
reflexivity.
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y

forall (A : Type) (a : A), (ϕ1 (G2 A) ∘ map (ϕ2 A)) (pure a) = pure a
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A: Type
a: A

(ϕ1 (G2 A) ∘ map (ϕ2 A)) (pure a) = pure a
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A: Type
a: A

(ϕ1 (G2 A) ∘ map (ϕ2 A)) (pure (pure a)) = pure (pure a)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A: Type
a: A

ϕ1 (G2 A) (map (ϕ2 A) (pure (pure a))) = pure (pure a)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A: Type
a: A

ϕ1 (G2 A) (pure (ϕ2 A (pure a))) = pure (pure a)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A: Type
a: A

pure (ϕ2 A (pure a)) = pure (pure a)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A: Type
a: A

pure (pure a) = pure (pure a)
reflexivity.
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y

forall (A B : Type) (x : (F1 ∘ F2) A) (y : (F1 ∘ F2) B), (ϕ1 (G2 (A * B)) ∘ map (ϕ2 (A * B))) (x ⊗ y) = (ϕ1 (G2 A) ∘ map (ϕ2 A)) x ⊗ (ϕ1 (G2 B) ∘ map (ϕ2 B)) y
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: (F1 ∘ F2) A
y: (F1 ∘ F2) B

(ϕ1 (G2 (A * B)) ∘ map (ϕ2 (A * B))) (x ⊗ y) = (ϕ1 (G2 A) ∘ map (ϕ2 A)) x ⊗ (ϕ1 (G2 B) ∘ map (ϕ2 B)) y
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: (F1 ∘ F2) A
y: (F1 ∘ F2) B

(ϕ1 (G2 (A * B)) ∘ map (ϕ2 (A * B))) (map mult (fst (x, y) ⊗ snd (x, y))) = map mult (fst ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x, (ϕ1 (G2 B) ∘ map (ϕ2 B)) y) ⊗ snd ((ϕ1 (G2 A) ∘ map (ϕ2 A)) x, (ϕ1 (G2 B) ∘ map (ϕ2 B)) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)

ϕ1 (G2 (A * B)) (map (ϕ2 (A * B)) (map mult (fst (x, y) ⊗ snd (x, y)))) = map mult (fst (ϕ1 (G2 A) (map (ϕ2 A) x), ϕ1 (G2 B) (map (ϕ2 B) y)) ⊗ snd (ϕ1 (G2 A) (map (ϕ2 A) x), ϕ1 (G2 B) (map (ϕ2 B) y)))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)

ϕ1 (G2 (A * B)) (map (ϕ2 (A * B)) (map mult (x ⊗ y))) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)

ϕ1 (G2 (A * B)) ((map (ϕ2 (A * B)) ∘ map mult) (x ⊗ y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)

ϕ1 (G2 (A * B)) (map (ϕ2 (A * B) ∘ mult) (x ⊗ y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)

forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)
ϕ1 (G2 (A * B)) (map (ϕ2 (A * B) ∘ mult) (x ⊗ y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)

forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
A0, B0: Type

ϕ2 (A0 * B0) ∘ mult = mult ∘ map_tensor (ϕ2 A0) (ϕ2 B0)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
A0, B0: Type
x': F2 A0
y': F2 B0

(ϕ2 (A0 * B0) ∘ mult) (x', y') = (mult ∘ map_tensor (ϕ2 A0) (ϕ2 B0)) (x', y')
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
A0, B0: Type
x': F2 A0
y': F2 B0

ϕ2 (A0 * B0) (x' ⊗ y') = ϕ2 A0 x' ⊗ ϕ2 B0 y'
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
A0, B0: Type
x': F2 A0
y': F2 B0

ϕ2 A0 x' ⊗ ϕ2 B0 y' = ϕ2 A0 x' ⊗ ϕ2 B0 y'
reflexivity.
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

ϕ1 (G2 (A * B)) (map (ϕ2 (A * B) ∘ mult) (x ⊗ y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

ϕ1 (G2 (A * B)) (map (mult ∘ map_tensor (ϕ2 A) (ϕ2 B)) (x ⊗ y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

map (mult ∘ map_tensor (ϕ2 A) (ϕ2 B)) (ϕ1 (F2 A * F2 B) (x ⊗ y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

(map mult ∘ map (map_tensor (ϕ2 A) (ϕ2 B))) (ϕ1 (F2 A * F2 B) (x ⊗ y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

(map mult ∘ map (map_tensor (ϕ2 A) (ϕ2 B))) (ϕ1 (F2 A) x ⊗ ϕ1 (F2 B) y) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

map mult (map (map_tensor (ϕ2 A) (ϕ2 B)) (ϕ1 (F2 A) x ⊗ ϕ1 (F2 B) y)) = map mult (ϕ1 (G2 A) (map (ϕ2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
(* rhs *)
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

map mult (map (map_tensor (ϕ2 A) (ϕ2 B)) (ϕ1 (F2 A) x ⊗ ϕ1 (F2 B) y)) = map mult (map (ϕ2 A) (ϕ1 (F2 A) x) ⊗ ϕ1 (G2 B) (map (ϕ2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

map mult (map (map_tensor (ϕ2 A) (ϕ2 B)) (ϕ1 (F2 A) x ⊗ ϕ1 (F2 B) y)) = map mult (map (ϕ2 A) (ϕ1 (F2 A) x) ⊗ map (ϕ2 B) (ϕ1 (F2 B) y))
F1, F2, G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: Applicative G2
Map_G1: Map F1
Pure_G1: Pure F1
Mult_G1: Mult F1
H1: Applicative F1
Map_G2: Map F2
Pure_G2: Pure F2
Mult_G2: Mult F2
H2: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism1: ApplicativeMorphism F2 G2 ϕ2
appmor_app_F0: Applicative F1
appmor_app_G0: Applicative G1
appmor_natural0: forall (A B : Type) (f : A -> B) (x : F1 A), ϕ1 B (map f x) = map f (ϕ1 A x)
appmor_pure0: forall (A : Type) (a : A), ϕ1 A (pure a) = pure a
appmor_mult0: forall (A B : Type) (x : F1 A) (y : F1 B), ϕ1 (A * B) (x ⊗ y) = ϕ1 A x ⊗ ϕ1 B y
appmor_app_F1: Applicative F2
appmor_app_G1: Applicative G2
appmor_natural1: forall (A B : Type) (f : A -> B) (x : F2 A), ϕ2 B (map f x) = map f (ϕ2 A x)
appmor_pure1: forall (A : Type) (a : A), ϕ2 A (pure a) = pure a
appmor_mult1: forall (A B : Type) (x : F2 A) (y : F2 B), ϕ2 (A * B) (x ⊗ y) = ϕ2 A x ⊗ ϕ2 B y
A, B: Type
x: F1 (F2 A)
y: F1 (F2 B)
appmor_mult1': forall A B : Type, ϕ2 (A * B) ∘ mult = mult ∘ map_tensor (ϕ2 A) (ϕ2 B)

map mult (map (map_tensor (ϕ2 A) (ϕ2 B)) (ϕ1 (F2 A) x ⊗ ϕ1 (F2 B) y)) = map mult (map (map_tensor (ϕ2 A) (ϕ2 B)) (ϕ1 (F2 A) x ⊗ ϕ1 (F2 B) y))
reflexivity. Qed.
F1, F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
F1, F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
F1, F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ F2) (fun A : Type => ϕ1 (F2 A) ∘ map id)
F1, F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
(fun A : Type => ϕ1 (F2 A) ∘ map id) = ϕ1 ○ F2
F1, F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1

ApplicativeMorphism (F1 ∘ F2) (G1 ∘ F2) (fun A : Type => ϕ1 (F2 A) ∘ map id)
apply (ApplicativeMorphism_parallel F1 F2 G1 F2).
F1, F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1

(fun A : Type => ϕ1 (F2 A) ∘ map id) = ϕ1 ○ F2
F1, F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ1: forall A : Type, F1 A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism F1 G1 ϕ1
A: Type

ϕ1 (F2 A) ∘ map id = ϕ1 (F2 A)
now rewrite (fun_map_id (F := F1)). Qed.
F1, F2, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: Applicative G2
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism0: ApplicativeMorphism F2 G2 ϕ2

ApplicativeMorphism (F1 ∘ F2) (F1 ∘ G2) (fun A : Type => map (ϕ2 A))
F1, F2, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: Applicative G2
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism0: ApplicativeMorphism F2 G2 ϕ2

ApplicativeMorphism (F1 ∘ F2) (F1 ∘ G2) (fun A : Type => map (ϕ2 A))
F1, F2, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: Applicative G2
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
Map_G1: Map F2
Pure_G1: Pure F2
Mult_G1: Mult F2
H1: Applicative F2
ϕ2: forall A : Type, F2 A -> G2 A
ApplicativeMorphism0: ApplicativeMorphism F2 G2 ϕ2

ApplicativeMorphism (F1 ∘ F2) (F1 ∘ G2) (fun A : Type => (@id ○ F1) (G2 A) ∘ map (ϕ2 A))
apply (ApplicativeMorphism_parallel F1 F2 F1 G2). Qed.
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism F2 (G1 ∘ F2) (ϕ1 ○ F2)
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism F2 (G1 ∘ F2) (ϕ1 ○ F2)
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism ((fun A : Type => A) ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism ((fun A : Type => A) ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism ((fun A : Type => A) ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism ((fun A : Type => A) ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism ((fun A : Type => A) ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
F2, G1: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: Applicative G1
Map_G0: Map F2
Pure_G0: Pure F2
Mult_G0: Mult F2
H0: Applicative F2
ϕ1: forall A : Type, (fun A0 : Type => A0) A -> G1 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G1 ϕ1

ApplicativeMorphism ((fun A : Type => A) ∘ F2) (G1 ∘ F2) (ϕ1 ○ F2)
apply (ApplicativeMorphism_parallel_left (fun X => X) F2 G1). Qed.
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: Applicative G2
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G2 ϕ2

ApplicativeMorphism F1 (F1 ∘ G2) (fun A : Type => map (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: Applicative G2
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: Applicative F1
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: ApplicativeMorphism (fun A : Type => A) G2 ϕ2

ApplicativeMorphism F1 (F1 ∘ G2) (fun A : Type => map (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: @Applicative G2 Map_G Pure_G Mult_G
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: @Applicative F1 Map_G0 Pure_G0 Mult_G0
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: @ApplicativeMorphism (fun A : Type => A) G2 Map_I Mult_I Pure_I Map_G Mult_G Pure_G ϕ2

@ApplicativeMorphism F1 (F1 ∘ G2) Map_G0 Mult_G0 Pure_G0 (@Map_compose F1 G2 Map_G Map_G0) (@Mult_compose F1 G2 Mult_G Map_G0 Mult_G0) (@Pure_compose F1 G2 Pure_G Pure_G0) (fun A : Type => @map F1 Map_G0 A (G2 A) (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: @Applicative G2 Map_G Pure_G Mult_G
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: @Applicative F1 Map_G0 Pure_G0 Mult_G0
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: @ApplicativeMorphism (fun A : Type => A) G2 Map_I Mult_I Pure_I Map_G Mult_G Pure_G ϕ2

@ApplicativeMorphism (F1 ∘ (fun A : Type => A)) (F1 ∘ G2) Map_G0 Mult_G0 Pure_G0 (@Map_compose F1 G2 Map_G Map_G0) (@Mult_compose F1 G2 Mult_G Map_G0 Mult_G0) (@Pure_compose F1 G2 Pure_G Pure_G0) (fun A : Type => @map F1 Map_G0 A (G2 A) (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: @Applicative G2 Map_G Pure_G Mult_G
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: @Applicative F1 Map_G0 Pure_G0 Mult_G0
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: @ApplicativeMorphism (fun A : Type => A) G2 Map_I Mult_I Pure_I Map_G Mult_G Pure_G ϕ2

@ApplicativeMorphism (F1 ∘ (fun A : Type => A)) (F1 ∘ G2) (@Map_compose F1 (fun X : Type => X) Map_I Map_G0) Mult_G0 Pure_G0 (@Map_compose F1 G2 Map_G Map_G0) (@Mult_compose F1 G2 Mult_G Map_G0 Mult_G0) (@Pure_compose F1 G2 Pure_G Pure_G0) (fun A : Type => @map F1 Map_G0 A (G2 A) (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: @Applicative G2 Map_G Pure_G Mult_G
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: @Applicative F1 Map_G0 Pure_G0 Mult_G0
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: @ApplicativeMorphism (fun A : Type => A) G2 Map_I Mult_I Pure_I Map_G Mult_G Pure_G ϕ2

@ApplicativeMorphism (F1 ∘ (fun A : Type => A)) (F1 ∘ G2) (@Map_compose F1 (fun X : Type => X) Map_I Map_G0) (@mult F1 Mult_G0) Pure_G0 (@Map_compose F1 G2 Map_G Map_G0) (@Mult_compose F1 G2 Mult_G Map_G0 Mult_G0) (@Pure_compose F1 G2 Pure_G Pure_G0) (fun A : Type => @map F1 Map_G0 A (G2 A) (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: @Applicative G2 Map_G Pure_G Mult_G
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: @Applicative F1 Map_G0 Pure_G0 Mult_G0
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: @ApplicativeMorphism (fun A : Type => A) G2 Map_I Mult_I Pure_I Map_G Mult_G Pure_G ϕ2

@ApplicativeMorphism (F1 ∘ (fun A : Type => A)) (F1 ∘ G2) (@Map_compose F1 (fun X : Type => X) Map_I Map_G0) (@Mult_compose F1 (fun A : Type => A) Mult_I Map_G0 Mult_G0) Pure_G0 (@Map_compose F1 G2 Map_G Map_G0) (@Mult_compose F1 G2 Mult_G Map_G0 Mult_G0) (@Pure_compose F1 G2 Pure_G Pure_G0) (fun A : Type => @map F1 Map_G0 A (G2 A) (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: @Applicative G2 Map_G Pure_G Mult_G
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: @Applicative F1 Map_G0 Pure_G0 Mult_G0
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: @ApplicativeMorphism (fun A : Type => A) G2 Map_I Mult_I Pure_I Map_G Mult_G Pure_G ϕ2

@ApplicativeMorphism (F1 ∘ (fun A : Type => A)) (F1 ∘ G2) (@Map_compose F1 (fun X : Type => X) Map_I Map_G0) (@Mult_compose F1 (fun A : Type => A) Mult_I Map_G0 Mult_G0) (@pure F1 Pure_G0) (@Map_compose F1 G2 Map_G Map_G0) (@Mult_compose F1 G2 Mult_G Map_G0 Mult_G0) (@Pure_compose F1 G2 Pure_G Pure_G0) (fun A : Type => @map F1 Map_G0 A (G2 A) (ϕ2 A))
F1, G2: Type -> Type
Map_G: Map G2
Pure_G: Pure G2
Mult_G: Mult G2
H: @Applicative G2 Map_G Pure_G Mult_G
Map_G0: Map F1
Pure_G0: Pure F1
Mult_G0: Mult F1
H0: @Applicative F1 Map_G0 Pure_G0 Mult_G0
ϕ2: forall A : Type, (fun A0 : Type => A0) A -> G2 A
ApplicativeMorphism0: @ApplicativeMorphism (fun A : Type => A) G2 Map_I Mult_I Pure_I Map_G Mult_G Pure_G ϕ2

@ApplicativeMorphism (F1 ∘ (fun A : Type => A)) (F1 ∘ G2) (@Map_compose F1 (fun X : Type => X) Map_I Map_G0) (@Mult_compose F1 (fun A : Type => A) Mult_I Map_G0 Mult_G0) (@Pure_compose F1 (fun A : Type => A) Pure_I Pure_G0) (@Map_compose F1 G2 Map_G Map_G0) (@Mult_compose F1 G2 Mult_G Map_G0 Mult_G0) (@Pure_compose F1 G2 Pure_G Pure_G0) (fun A : Type => @map F1 Map_G0 A (G2 A) (ϕ2 A))
apply (ApplicativeMorphism_parallel_right F1 (fun X => X) G2). Qed. End applicative_compose_laws. (** * The "ap" combinator << <⋆> >> *) (**********************************************************************) Definition ap (G: Type -> Type) `{Map G} `{Mult G} {A B: Type}: G (A -> B) -> G A -> G B := fun Gf Ga => map (fun '(f, a) => f a) (Gf ⊗ Ga). #[local] Notation "Gf <⋆> Ga" := (ap _ Gf Ga) (at level 50, left associativity). Section ApplicativeFunctor_ap. Context `{Applicative G}.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B : Type) (f : A -> B) (t : G A), @map G Map_G A B f t = @pure G Pure_G (A -> B) f <⋆> t
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B : Type) (f : A -> B) (t : G A), @map G Map_G A B f t = @pure G Pure_G (A -> B) f <⋆> t
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
t: G A

@map G Map_G A B f t = @pure G Pure_G (A -> B) f <⋆> t
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
t: G A

@map G Map_G A B f t = @map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (@pure G Pure_G (A -> B) f ⊗ t)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
t: G A

@map G Map_G A B f t = @map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (@strength G Map_G (A -> B) A (f, t))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
t: G A

@map G Map_G A B f t = @map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (@map G Map_G A ((A -> B) * A) (@pair (A -> B) A f) t)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
t: G A

@map G Map_G A B f t = (@map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @map G Map_G A ((A -> B) * A) (@pair (A -> B) A f)) t
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
t: G A

@map G Map_G A B f t = @map G Map_G A B ((fun '(f, a) => f a) ∘ @pair (A -> B) A f) t
reflexivity. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (G2 : Type -> Type) (H0 : Map G) (H1 : Mult G) (H2 : Pure G) (H3 : Map G2) (H4 : Mult G2) (H5 : Pure G2) (ϕ : forall A : Type, G A -> G2 A), @ApplicativeMorphism G G2 H0 H1 H2 H3 H4 H5 ϕ -> forall (A B : Type) (x : G (A -> B)) (y : G A), ϕ B (x <⋆> y) = ϕ (A -> B) x <⋆> ϕ A y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (G2 : Type -> Type) (H0 : Map G) (H1 : Mult G) (H2 : Pure G) (H3 : Map G2) (H4 : Mult G2) (H5 : Pure G2) (ϕ : forall A : Type, G A -> G2 A), @ApplicativeMorphism G G2 H0 H1 H2 H3 H4 H5 ϕ -> forall (A B : Type) (x : G (A -> B)) (y : G A), ϕ B (x <⋆> y) = ϕ (A -> B) x <⋆> ϕ A y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
G2: Type -> Type
H0: Map G
H1: Mult G
H2: Pure G
H3: Map G2
H4: Mult G2
H5: Pure G2
ϕ: forall A : Type, G A -> G2 A
H6: @ApplicativeMorphism G G2 H0 H1 H2 H3 H4 H5 ϕ
A, B: Type
x: G (A -> B)
y: G A

ϕ B (x <⋆> y) = ϕ (A -> B) x <⋆> ϕ A y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
G2: Type -> Type
H0: Map G
H1: Mult G
H2: Pure G
H3: Map G2
H4: Mult G2
H5: Pure G2
ϕ: forall A : Type, G A -> G2 A
H6: @ApplicativeMorphism G G2 H0 H1 H2 H3 H4 H5 ϕ
A, B: Type
x: G (A -> B)
y: G A

ϕ B (@map G H0 ((A -> B) * A) B (fun '(f, a) => f a) (x ⊗ y)) = @map G2 H3 ((A -> B) * A) B (fun '(f, a) => f a) (ϕ (A -> B) x ⊗ ϕ A y)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
G2: Type -> Type
H0: Map G
H1: Mult G
H2: Pure G
H3: Map G2
H4: Mult G2
H5: Pure G2
ϕ: forall A : Type, G A -> G2 A
H6: @ApplicativeMorphism G G2 H0 H1 H2 H3 H4 H5 ϕ
A, B: Type
x: G (A -> B)
y: G A

@map G2 H3 ((A -> B) * A) B (fun '(f, a) => f a) (ϕ ((A -> B) * A) (x ⊗ y)) = @map G2 H3 ((A -> B) * A) B (fun '(f, a) => f a) (ϕ (A -> B) x ⊗ ϕ A y)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
G2: Type -> Type
H0: Map G
H1: Mult G
H2: Pure G
H3: Map G2
H4: Mult G2
H5: Pure G2
ϕ: forall A : Type, G A -> G2 A
H6: @ApplicativeMorphism G G2 H0 H1 H2 H3 H4 H5 ϕ
A, B: Type
x: G (A -> B)
y: G A

@map G2 H3 ((A -> B) * A) B (fun '(f, a) => f a) (ϕ (A -> B) x ⊗ ϕ A y) = @map G2 H3 ((A -> B) * A) B (fun '(f, a) => f a) (ϕ (A -> B) x ⊗ ϕ A y)
reflexivity. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A : Type) (t : G A), @pure G Pure_G (A -> A) (@id A) <⋆> t = t
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A : Type) (t : G A), @pure G Pure_G (A -> A) (@id A) <⋆> t = t
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A: Type
t: G A

@pure G Pure_G (A -> A) (@id A) <⋆> t = t
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A: Type
t: G A

@map G Map_G A A (@id A) t = t
now rewrite (fun_map_id). Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B : Type) (f : A -> B) (a : A), @pure G Pure_G (A -> B) f <⋆> @pure G Pure_G A a = @pure G Pure_G B (f a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B : Type) (f : A -> B) (a : A), @pure G Pure_G (A -> B) f <⋆> @pure G Pure_G A a = @pure G Pure_G B (f a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
a: A

@pure G Pure_G (A -> B) f <⋆> @pure G Pure_G A a = @pure G Pure_G B (f a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
a: A

@map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (@pure G Pure_G (A -> B) f ⊗ @pure G Pure_G A a) = @pure G Pure_G B (f a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: A -> B
a: A

@map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (@pure G Pure_G ((A -> B) * A) (f, a)) = @pure G Pure_G B (f a)
now rewrite app_pure_natural. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B : Type) (f : G (A -> B)) (a : A), f <⋆> @pure G Pure_G A a = @pure G Pure_G ((A -> B) -> B) (@evalAt A B a) <⋆> f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B : Type) (f : G (A -> B)) (a : A), f <⋆> @pure G Pure_G A a = @pure G Pure_G ((A -> B) -> B) (@evalAt A B a) <⋆> f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: G (A -> B)
a: A

f <⋆> @pure G Pure_G A a = @pure G Pure_G ((A -> B) -> B) (@evalAt A B a) <⋆> f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: G (A -> B)
a: A

@map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (f ⊗ @pure G Pure_G A a) = @map G Map_G (((A -> B) -> B) * (A -> B)) B (fun '(f, a) => f a) (@pure G Pure_G ((A -> B) -> B) (@evalAt A B a) ⊗ f)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: G (A -> B)
a: A

@map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (@map G Map_G (A -> B) ((A -> B) * A) (fun b : A -> B => (b, a)) f) = @map G Map_G (((A -> B) -> B) * (A -> B)) B (fun '(f, a) => f a) (@strength G Map_G ((A -> B) -> B) (A -> B) (@evalAt A B a, f))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: G (A -> B)
a: A

@map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (@map G Map_G (A -> B) ((A -> B) * A) (fun b : A -> B => (b, a)) f) = @map G Map_G (((A -> B) -> B) * (A -> B)) B (fun '(f, a) => f a) (@map G Map_G (A -> B) (((A -> B) -> B) * (A -> B)) (@pair ((A -> B) -> B) (A -> B) (@evalAt A B a)) f)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B: Type
f: G (A -> B)
a: A

(@map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @map G Map_G (A -> B) ((A -> B) * A) (fun b : A -> B => (b, a))) f = (@map G Map_G (((A -> B) -> B) * (A -> B)) B (fun '(f, a) => f a) ∘ @map G Map_G (A -> B) (((A -> B) -> B) * (A -> B)) (@pair ((A -> B) -> B) (A -> B) (@evalAt A B a))) f
now do 2 rewrite (fun_map_map). Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B C : Type) (f : G (B -> C)) (g : G (A -> B)) (a : G A), @pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) <⋆> f <⋆> g <⋆> a = f <⋆> (g <⋆> a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G

forall (A B C : Type) (f : G (B -> C)) (g : G (A -> B)) (a : G A), @pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) <⋆> f <⋆> g <⋆> a = f <⋆> (g <⋆> a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) <⋆> f <⋆> g <⋆> a = f <⋆> (g <⋆> a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G ((A -> C) * A) C (fun '(f, a) => f a) (@map G Map_G (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a) (@map G Map_G (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) ((A -> B) -> A -> C) (fun '(f, a) => f a) (@pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) ⊗ f) ⊗ g) ⊗ a) = @map G Map_G ((B -> C) * B) C (fun '(f, a) => f a) (f ⊗ @map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) ((A -> B) -> A -> C) (fun '(f, a) => f a) (@pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) ⊗ f) ⊗ g ⊗ a) = @map G Map_G ((B -> C) * B) C (fun '(f, a) => f a) (f ⊗ @map G Map_G ((A -> B) * A) B (fun '(f, a) => f a) (g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) ((A -> B) -> A -> C) (fun '(f, a) => f a) (@pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) ⊗ f) ⊗ g ⊗ a) = @map G Map_G ((B -> C) * ((A -> B) * A)) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a)) (f ⊗ (g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) ((A -> B) -> A -> C) (fun '(f, a) => f a) (@strength G Map_G ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C, f)) ⊗ g ⊗ a) = @map G Map_G ((B -> C) * ((A -> B) * A)) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a)) (f ⊗ (g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) ((A -> B) -> A -> C) (fun '(f, a) => f a) (@map G Map_G (B -> C) (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) (@pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) f) ⊗ g ⊗ a) = @map G Map_G ((B -> C) * ((A -> B) * A)) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a)) (f ⊗ (g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) ((@map G Map_G (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) ((A -> B) -> A -> C) (fun '(f, a) => f a) ∘ @map G Map_G (B -> C) (((B -> C) -> (A -> B) -> A -> C) * (B -> C)) (@pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C))) f ⊗ g ⊗ a) = @map G Map_G ((B -> C) * ((A -> B) * A)) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a)) (f ⊗ (g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) f ⊗ g ⊗ a) = @map G Map_G ((B -> C) * ((A -> B) * A)) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a)) (f ⊗ (g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) f ⊗ g ⊗ a) = @map G Map_G ((B -> C) * ((A -> B) * A)) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a)) (@map G Map_G ((B -> C) * (A -> B) * A) ((B -> C) * ((A -> B) * A)) α (f ⊗ g ⊗ a))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) f ⊗ g ⊗ a) = (@map G Map_G ((B -> C) * ((A -> B) * A)) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a)) ∘ @map G Map_G ((B -> C) * (A -> B) * A) ((B -> C) * ((A -> B) * A)) α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) f ⊗ g ⊗ a) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G (((A -> B) -> A -> C) * ((A -> B) * A)) (((A -> B) -> A -> C) * (A -> B) * A) α^-1 (@map G Map_G (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) f ⊗ (g ⊗ a))) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G ((B -> C) * ((A -> B) * A)) (((A -> B) -> A -> C) * (A -> B) * A) (α^-1 ∘ @map_fst ((A -> B) * A) (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C))) (f ⊗ (g ⊗ a))) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G ((B -> C) * ((A -> B) * A)) (((A -> B) -> A -> C) * (A -> B) * A) (α^-1 ∘ @map_fst ((A -> B) * A) (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C))) (@map G Map_G ((B -> C) * (A -> B) * A) ((B -> C) * ((A -> B) * A)) α (f ⊗ g ⊗ a))) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) ((@map G Map_G ((B -> C) * ((A -> B) * A)) (((A -> B) -> A -> C) * (A -> B) * A) (α^-1 ∘ @map_fst ((A -> B) * A) (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C))) ∘ @map G Map_G ((B -> C) * (A -> B) * A) ((B -> C) * ((A -> B) * A)) α) (f ⊗ g ⊗ a)) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) (@map G Map_G ((B -> C) * (A -> B) * A) (((A -> B) -> A -> C) * (A -> B) * A) (α^-1 ∘ @map_fst ((A -> B) * A) (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) ∘ α) (f ⊗ g ⊗ a)) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

(@map G Map_G (((A -> B) -> A -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a)) ∘ @map G Map_G ((B -> C) * (A -> B) * A) (((A -> B) -> A -> C) * (A -> B) * A) (α^-1 ∘ @map_fst ((A -> B) * A) (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) ∘ α)) (f ⊗ g ⊗ a) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

@map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a) ∘ (α^-1 ∘ @map_fst ((A -> B) * A) (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) ∘ α)) (f ⊗ g ⊗ a) = @map G Map_G ((B -> C) * (A -> B) * A) C ((fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α) (f ⊗ g ⊗ a)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C: Type
f: G (B -> C)
g: G (A -> B)
a: G A

(fun '(f, a) => f a) ∘ @map_fst A (((A -> B) -> A -> C) * (A -> B)) (A -> C) (fun '(f, a) => f a) ∘ (α^-1 ∘ @map_fst ((A -> B) * A) (B -> C) ((A -> B) -> A -> C) ((fun '(f, a) => f a) ∘ @pair ((B -> C) -> (A -> B) -> A -> C) (B -> C) (@compose A B C)) ∘ α) = (fun '(f, a) => f a) ∘ @map_snd (B -> C) ((A -> B) * A) B (fun '(f, a) => f a) ∘ α
now ext [[x y] z]. Qed. End ApplicativeFunctor_ap. (** ** Convenience Laws for <<ap>> *) (**********************************************************************) Section ApplicativeFunctor_ap_utility. Context `{Applicative G} {A B C D: Type}. (** Fuse <<pure>> into <<map>> *) (*ap5*)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (f : A -> B) (g : B -> C) (a : G A), @pure G Pure_G (B -> C) g <⋆> @map G Map_G A B f a = @map G Map_G A C (g ∘ f) a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (f : A -> B) (g : B -> C) (a : G A), @pure G Pure_G (B -> C) g <⋆> @map G Map_G A B f a = @map G Map_G A C (g ∘ f) a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: A -> B
g: B -> C
a: G A

@pure G Pure_G (B -> C) g <⋆> @map G Map_G A B f a = @map G Map_G A C (g ∘ f) a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: A -> B
g: B -> C
a: G A

@pure G Pure_G (B -> C) g <⋆> (@pure G Pure_G (A -> B) f <⋆> a) = @pure G Pure_G (A -> C) (g ∘ f) <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: A -> B
g: B -> C
a: G A

@pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) <⋆> @pure G Pure_G (B -> C) g <⋆> @pure G Pure_G (A -> B) f <⋆> a = @pure G Pure_G (A -> C) (g ∘ f) <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: A -> B
g: B -> C
a: G A

@pure G Pure_G (A -> C) (g ∘ f) <⋆> a = @pure G Pure_G (A -> C) (g ∘ f) <⋆> a
reflexivity. Qed. (** Push an <<map>> under an <<ap>> *)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (f : G (A -> B)) (g : B -> C) (a : G A), @map G Map_G B C g (f <⋆> a) = @map G Map_G (A -> B) (A -> C) (@compose A B C g) f <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (f : G (A -> B)) (g : B -> C) (a : G A), @map G Map_G B C g (f <⋆> a) = @map G Map_G (A -> B) (A -> C) (@compose A B C g) f <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: G (A -> B)
g: B -> C
a: G A

@map G Map_G B C g (f <⋆> a) = @map G Map_G (A -> B) (A -> C) (@compose A B C g) f <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: G (A -> B)
g: B -> C
a: G A

@pure G Pure_G (B -> C) g <⋆> (f <⋆> a) = @pure G Pure_G ((A -> B) -> A -> C) (@compose A B C g) <⋆> f <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: G (A -> B)
g: B -> C
a: G A

@pure G Pure_G ((B -> C) -> (A -> B) -> A -> C) (@compose A B C) <⋆> @pure G Pure_G (B -> C) g <⋆> f <⋆> a = @pure G Pure_G ((A -> B) -> A -> C) (@compose A B C g) <⋆> f <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
f: G (A -> B)
g: B -> C
a: G A

@pure G Pure_G ((A -> B) -> A -> C) (@compose A B C g) <⋆> f <⋆> a = @pure G Pure_G ((A -> B) -> A -> C) (@compose A B C g) <⋆> f <⋆> a
reflexivity. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall g : B -> C, @compose (G A) (G B) (G C) (@map G Map_G B C g) ∘ @ap G Map_G Mult_G A B = @ap G Map_G Mult_G A C ∘ @map G Map_G (A -> B) (A -> C) (@compose A B C g)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall g : B -> C, @compose (G A) (G B) (G C) (@map G Map_G B C g) ∘ @ap G Map_G Mult_G A B = @ap G Map_G Mult_G A C ∘ @map G Map_G (A -> B) (A -> C) (@compose A B C g)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
g: B -> C

@compose (G A) (G B) (G C) (@map G Map_G B C g) ∘ @ap G Map_G Mult_G A B = @ap G Map_G Mult_G A C ∘ @map G Map_G (A -> B) (A -> C) (@compose A B C g)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
g: B -> C
f: G (A -> B)
a: G A

(@compose (G A) (G B) (G C) (@map G Map_G B C g) ∘ @ap G Map_G Mult_G A B) f a = (@ap G Map_G Mult_G A C ∘ @map G Map_G (A -> B) (A -> C) (@compose A B C g)) f a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
g: B -> C
f: G (A -> B)
a: G A

@map G Map_G B C g (f <⋆> a) = @map G Map_G (A -> B) (A -> C) (fun f : A -> B => g ○ f) f <⋆> a
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
g: B -> C
f: G (A -> B)
a: G A

@map G Map_G (A -> B) (A -> C) (@compose A B C g) f <⋆> a = @map G Map_G (A -> B) (A -> C) (fun f : A -> B => g ○ f) f <⋆> a
reflexivity. Qed. (** Bring an <<map>> from right of an <<ap>> to left *)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (A B C : Type) (x : G (A -> B)) (y : G C) (f : C -> A), @map G Map_G (A -> B) (C -> B) (@precompose C A B f) x <⋆> y = x <⋆> @map G Map_G C A f y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (A B C : Type) (x : G (A -> B)) (y : G C) (f : C -> A), @map G Map_G (A -> B) (C -> B) (@precompose C A B f) x <⋆> y = x <⋆> @map G Map_G C A f y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D, A0, B0, C0: Type
x: G (A0 -> B0)
y: G C0
f: C0 -> A0

@map G Map_G (A0 -> B0) (C0 -> B0) (@precompose C0 A0 B0 f) x <⋆> y = x <⋆> @map G Map_G C0 A0 f y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D, A0, B0, C0: Type
x: G (A0 -> B0)
y: G C0
f: C0 -> A0

@pure G Pure_G ((A0 -> B0) -> C0 -> B0) (@precompose C0 A0 B0 f) <⋆> x <⋆> y = x <⋆> (@pure G Pure_G (C0 -> A0) f <⋆> y)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D, A0, B0, C0: Type
x: G (A0 -> B0)
y: G C0
f: C0 -> A0

@pure G Pure_G ((A0 -> B0) -> C0 -> B0) (@precompose C0 A0 B0 f) <⋆> x <⋆> y = @pure G Pure_G ((A0 -> B0) -> (C0 -> A0) -> C0 -> B0) (@compose C0 A0 B0) <⋆> x <⋆> @pure G Pure_G (C0 -> A0) f <⋆> y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D, A0, B0, C0: Type
x: G (A0 -> B0)
y: G C0
f: C0 -> A0

@pure G Pure_G ((A0 -> B0) -> C0 -> B0) (@precompose C0 A0 B0 f) <⋆> x <⋆> y = @pure G Pure_G (((C0 -> A0) -> C0 -> B0) -> C0 -> B0) (@evalAt (C0 -> A0) (C0 -> B0) f) <⋆> (@pure G Pure_G ((A0 -> B0) -> (C0 -> A0) -> C0 -> B0) (@compose C0 A0 B0) <⋆> x) <⋆> y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D, A0, B0, C0: Type
x: G (A0 -> B0)
y: G C0
f: C0 -> A0

@pure G Pure_G ((A0 -> B0) -> C0 -> B0) (@precompose C0 A0 B0 f) <⋆> x <⋆> y = @pure G Pure_G ((((C0 -> A0) -> C0 -> B0) -> C0 -> B0) -> ((A0 -> B0) -> (C0 -> A0) -> C0 -> B0) -> (A0 -> B0) -> C0 -> B0) (@compose (A0 -> B0) ((C0 -> A0) -> C0 -> B0) (C0 -> B0)) <⋆> @pure G Pure_G (((C0 -> A0) -> C0 -> B0) -> C0 -> B0) (@evalAt (C0 -> A0) (C0 -> B0) f) <⋆> @pure G Pure_G ((A0 -> B0) -> (C0 -> A0) -> C0 -> B0) (@compose C0 A0 B0) <⋆> x <⋆> y
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D, A0, B0, C0: Type
x: G (A0 -> B0)
y: G C0
f: C0 -> A0

@pure G Pure_G ((A0 -> B0) -> C0 -> B0) (@precompose C0 A0 B0 f) <⋆> x <⋆> y = @pure G Pure_G ((A0 -> B0) -> C0 -> B0) (@evalAt (C0 -> A0) (C0 -> B0) f ∘ @compose C0 A0 B0) <⋆> x <⋆> y
reflexivity. Qed.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (a : G A) (b : G B) (f : A -> B -> C), @map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @pure G Pure_G (A -> B -> C) f <⋆> a <⋆> b
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type

forall (a : G A) (b : G B) (f : A -> B -> C), @map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @pure G Pure_G (A -> B -> C) f <⋆> a <⋆> b
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @pure G Pure_G (A -> B -> C) f <⋆> a <⋆> b
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G ((B -> C) * B) C (fun '(f, a) => f a) (@map G Map_G ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) (@pure G Pure_G (A -> B -> C) f ⊗ a) ⊗ b)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G ((B -> C) * B) C (fun '(f, a) => f a) (@map G Map_G ((A -> B -> C) * A * B) ((B -> C) * B) (@map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a)) (@pure G Pure_G (A -> B -> C) f ⊗ a ⊗ b))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = (@map G Map_G ((B -> C) * B) C (fun '(f, a) => f a) ∘ @map G Map_G ((A -> B -> C) * A * B) ((B -> C) * B) (@map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a))) (@pure G Pure_G (A -> B -> C) f ⊗ a ⊗ b)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G ((A -> B -> C) * A * B) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a)) (@pure G Pure_G (A -> B -> C) f ⊗ a ⊗ b)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G ((A -> B -> C) * A * B) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a)) (@map G Map_G ((A -> B -> C) * (A * B)) ((A -> B -> C) * A * B) α^-1 (@pure G Pure_G (A -> B -> C) f ⊗ (a ⊗ b)))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = (@map G Map_G ((A -> B -> C) * A * B) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a)) ∘ @map G Map_G ((A -> B -> C) * (A * B)) ((A -> B -> C) * A * B) α^-1) (@pure G Pure_G (A -> B -> C) f ⊗ (a ⊗ b))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G ((A -> B -> C) * (A * B)) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) ∘ α^-1) (@pure G Pure_G (A -> B -> C) f ⊗ (a ⊗ b))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G ((A -> B -> C) * (A * B)) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) ∘ α^-1) (@strength G Map_G (A -> B -> C) (A * B) (f, a ⊗ b))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G ((A -> B -> C) * (A * B)) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) ∘ α^-1) (@map G Map_G (A * B) ((A -> B -> C) * (A * B)) (@pair (A -> B -> C) (A * B) f) (a ⊗ b))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = (@map G Map_G ((A -> B -> C) * (A * B)) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) ∘ α^-1) ∘ @map G Map_G (A * B) ((A -> B -> C) * (A * B)) (@pair (A -> B -> C) (A * B) f)) (a ⊗ b)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@map G Map_G (A * B) C (@uncurry A B C f) (a ⊗ b) = @map G Map_G (A * B) C ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) ∘ α^-1 ∘ @pair (A -> B -> C) (A * B) f) (a ⊗ b)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C

@uncurry A B C f = (fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) ∘ α^-1 ∘ @pair (A -> B -> C) (A * B) f
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
A, B, C, D: Type
a: G A
b: G B
f: A -> B -> C
a': A
b': B

@uncurry A B C f (a', b') = ((fun '(f, a) => f a) ∘ @map_fst B ((A -> B -> C) * A) (B -> C) (fun '(f, a) => f a) ∘ α^-1 ∘ @pair (A -> B -> C) (A * B) f) (a', b')
reflexivity. Qed. End ApplicativeFunctor_ap_utility. (** ** Composition of Functors and <<ap>> / << <⋆> >> *) (**********************************************************************) Section ap_compose. Context (G1 G2: Type -> Type) `{Applicative G1} `{Applicative G2} {A B: Type}.
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type

forall (f : G2 (G1 (A -> B))) (a : G2 (G1 A)), f <⋆> a = @pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type

forall (f : G2 (G1 (A -> B))) (a : G2 (G1 A)), f <⋆> a = @pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

f <⋆> a = @pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map (G2 ∘ G1) (@Map_compose G2 G1 Map_G Map_G0) ((A -> B) * A) B (fun '(f, a) => f a) (f ⊗ a) = @pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 ((A -> B) * A)) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a)) (f ⊗ a) = @pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 ((A -> B) * A)) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a)) (@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 ((A -> B) * A)) (@mult G1 Mult_G (A -> B) A) (@fst (G2 (G1 (A -> B))) (G2 (G1 A)) (f, a) ⊗ @snd (G2 (G1 (A -> B))) (G2 (G1 A)) (f, a))) = @pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 ((A -> B) * A)) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a)) (@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 ((A -> B) * A)) (@mult G1 Mult_G (A -> B) A) (f ⊗ a)) = @pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 ((A -> B) * A)) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a)) (@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 ((A -> B) * A)) (@mult G1 Mult_G (A -> B) A) (f ⊗ a)) = @map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

(@map G2 Map_G0 (G1 ((A -> B) * A)) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a)) ∘ @map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 ((A -> B) * A)) (@mult G1 Mult_G (A -> B) A)) (f ⊗ a) = @map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @mult G1 Mult_G (A -> B) A) (f ⊗ a) = @map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @mult G1 Mult_G (A -> B) A) (f ⊗ a) = @map G2 Map_G0 ((G1 A -> G1 B) * G1 A) (G1 B) (fun '(f, a) => f a) (@map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f ⊗ a)
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @mult G1 Mult_G (A -> B) A) (f ⊗ a) = @map G2 Map_G0 ((G1 A -> G1 B) * G1 A) (G1 B) (fun '(f, a) => f a) (@map G2 Map_G0 (G1 (A -> B) * G1 A) ((G1 A -> G1 B) * G1 A) (@map_fst (G1 A) (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B)) (f ⊗ a))
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @mult G1 Mult_G (A -> B) A) (f ⊗ a) = (@map G2 Map_G0 ((G1 A -> G1 B) * G1 A) (G1 B) (fun '(f, a) => f a) ∘ @map G2 Map_G0 (G1 (A -> B) * G1 A) ((G1 A -> G1 B) * G1 A) (@map_fst (G1 A) (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B))) (f ⊗ a)
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 B) (@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @mult G1 Mult_G (A -> B) A) (f ⊗ a) = @map G2 Map_G0 (G1 (A -> B) * G1 A) (G1 B) ((fun '(f, a) => f a) ∘ @map_fst (G1 A) (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B)) (f ⊗ a)
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@map G1 Map_G ((A -> B) * A) B (fun '(f, a) => f a) ∘ @mult G1 Mult_G (A -> B) A = (fun '(f, a) => f a) ∘ @map_fst (G1 A) (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B)
now ext [G1f G1a]. Qed.
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type

forall (f : G2 (G1 (A -> B))) (a : G2 (G1 A)), f <⋆> a = @map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type

forall (f : G2 (G1 (A -> B))) (a : G2 (G1 A)), f <⋆> a = @map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

f <⋆> a = @map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f <⋆> a
G1, G2: Type -> Type
Map_G: Map G1
Pure_G: Pure G1
Mult_G: Mult G1
H: @Applicative G1 Map_G Pure_G Mult_G
Map_G0: Map G2
Pure_G0: Pure G2
Mult_G0: Mult G2
H0: @Applicative G2 Map_G0 Pure_G0 Mult_G0
A, B: Type
f: G2 (G1 (A -> B))
a: G2 (G1 A)

@pure G2 Pure_G0 (G1 (A -> B) -> G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) <⋆> f <⋆> a = @map G2 Map_G0 (G1 (A -> B)) (G1 A -> G1 B) (@ap G1 Map_G Mult_G A B) f <⋆> a
now rewrite map_to_ap. Qed. (* Theorem ap_compose3: ap (G2 ∘ G1) (A := A) (B := B) = ap G2 ∘ map G2 (ap G1). Proof. intros. ext f a. rewrite (ap_compose1). now rewrite <- map_to_ap. Qed. Theorem ap_compose_new: forall `{Applicative G1} `{Applicative G2}, forall (A B: Type) (x: G1 (G2 A))(f: A -> B), P (G1 ∘ G2) f <⋆> x = P G1 (ap G2 (P G2 f)) <⋆> x. Proof. intros. rewrite (ap_compose1 G2 G1). unfold_ops @Pure_compose. rewrite ap2. reflexivity. Qed. *) End ap_compose. (** * Monoids as Constant Applicative Functors *) (**********************************************************************) From Tealeaves Require Import Classes.Monoid. Import Monoid.Notations. Section with_monoid. Context (G: Type -> Type) (M: Type) `{Applicative G} `{Monoid M}. #[export] Instance Monoid_op_applicative: Monoid_op (G M) := fun m1 m2 => map (F := G) (uncurry monoid_op) (m1 ⊗ m2). #[export] Instance Monoid_unit_applicative: Monoid_unit (G M) := pure (F := G) Ƶ.
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0

@Monoid (G M) Monoid_op_applicative Monoid_unit_applicative
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0

@Monoid (G M) Monoid_op_applicative Monoid_unit_applicative
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0

forall x y z : G M, (x ● y) ● z = x ● (y ● z)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
forall x : G M, x ● Ƶ = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
forall x : G M, Ƶ ● x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0

forall x y z : G M, (x ● y) ● z = x ● (y ● z)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

(x ● y) ● z = x ● (y ● z)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

(x ● y) ● z = x ● (y ● z)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (x ⊗ y) ⊗ z) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (x ⊗ @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (y ⊗ z))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (@map G Map_G (M * M * M) (M * M) (@map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z)) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (x ⊗ @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (y ⊗ z))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

(@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) ∘ @map G Map_G (M * M * M) (M * M) (@map_fst M (M * M) M (@uncurry M M M (@monoid_op M op)))) (x ⊗ y ⊗ z) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (x ⊗ @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (y ⊗ z))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (x ⊗ @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (y ⊗ z))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (@map G Map_G (M * (M * M)) (M * M) (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ (y ⊗ z)))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (@map G Map_G (M * (M * M)) (M * M) (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op))) (@map G Map_G (M * M * M) (M * (M * M)) α (x ⊗ y ⊗ z)))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) ((@map G Map_G (M * (M * M)) (M * M) (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op))) ∘ @map G Map_G (M * M * M) (M * (M * M)) α) (x ⊗ y ⊗ z))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z) = @map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (@map G Map_G (M * M * M) (M * M) (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op)) ∘ α) (x ⊗ y ⊗ z))
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z) = (@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) ∘ @map G Map_G (M * M * M) (M * M) (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op)) ∘ α)) (x ⊗ y ⊗ z)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (x ⊗ y ⊗ z) = @map G Map_G (M * M * M) M (@uncurry M M M (@monoid_op M op) ∘ (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op)) ∘ α)) (x ⊗ y ⊗ z)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M

@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op)) = @uncurry M M M (@monoid_op M op) ∘ (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op)) ∘ α)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M
m1, m2, m3: M

(@uncurry M M M (@monoid_op M op) ∘ @map_fst M (M * M) M (@uncurry M M M (@monoid_op M op))) (m1, m2, m3) = (@uncurry M M M (@monoid_op M op) ∘ (@map_snd M (M * M) M (@uncurry M M M (@monoid_op M op)) ∘ α)) (m1, m2, m3)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M
m1, m2, m3: M

(m1 ● m2) ● @id M m3 = @id M m1 ● (m2 ● m3)
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x, y, z: G M
m1, m2, m3: M

m1 ● (m2 ● @id M m3) = @id M m1 ● (m2 ● m3)
reflexivity.
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0

forall x : G M, x ● Ƶ = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

x ● Ƶ = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (x ⊗ Ƶ) = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (x ⊗ @pure G Pure_G M Ƶ) = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@pure G Pure_G (M -> M -> M) (@monoid_op M op) <⋆> x <⋆> @pure G Pure_G M Ƶ = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G M (M -> M) (@monoid_op M op) x <⋆> @pure G Pure_G M Ƶ = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@pure G Pure_G ((M -> M) -> M) (@evalAt M M Ƶ) <⋆> @map G Map_G M (M -> M) (@monoid_op M op) x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@pure G Pure_G ((M -> M) -> M) (fun f : M -> M => f Ƶ) <⋆> @map G Map_G M (M -> M) (@monoid_op M op) x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G M M ((fun f : M -> M => f Ƶ) ∘ @monoid_op M op) x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G M M ((fun f : M -> M => f Ƶ) ∘ @monoid_op M op) x = @id (G M) x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G M M ((fun f : M -> M => f Ƶ) ∘ @monoid_op M op) x = @map G Map_G M M (@id M) x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

(fun f : M -> M => f Ƶ) ∘ @monoid_op M op = @id M
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M
m: M

((fun f : M -> M => f Ƶ) ∘ @monoid_op M op) m = @id M m
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M
m: M

m ● Ƶ = @id M m
now rewrite monoid_id_r.
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0

forall x : G M, Ƶ ● x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

Ƶ ● x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (Ƶ ⊗ x) = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G (M * M) M (@uncurry M M M (@monoid_op M op)) (@pure G Pure_G M Ƶ ⊗ x) = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@pure G Pure_G (M -> M -> M) (@monoid_op M op) <⋆> @pure G Pure_G M Ƶ <⋆> x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@pure G Pure_G (M -> M) (@monoid_op M op Ƶ) <⋆> x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G M M (@monoid_op M op Ƶ) x = x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G M M (@monoid_op M op Ƶ) x = @id (G M) x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@map G Map_G M M (@monoid_op M op Ƶ) x = @map G Map_G M M (@id M) x
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M

@monoid_op M op Ƶ = @id M
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M
m: M

Ƶ ● m = @id M m
G: Type -> Type
M: Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
op: Monoid_op M
unit0: Monoid_unit M
H0: @Monoid M op unit0
x: G M
m: M

Ƶ ● m = @id M m
now rewrite monoid_id_l. Qed. End with_monoid. (** ** Monoids Homomorphisms as Applicative Homomorphisms *) (**********************************************************************) Section with_hom. Context `{Applicative G} (M1 M2: Type) `{morphism: Monoid_Morphism M1 M2 ϕ}.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ

@Monoid_Morphism (G M1) (G M2) (@Monoid_op_applicative G M1 Map_G Mult_G src_op) (@Monoid_unit_applicative G M1 Pure_G src_unit) (@Monoid_op_applicative G M2 Map_G Mult_G tgt_op) (@Monoid_unit_applicative G M2 Pure_G tgt_unit) (@map G Map_G M1 M2 ϕ)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ

@Monoid_Morphism (G M1) (G M2) (@Monoid_op_applicative G M1 Map_G Mult_G src_op) (@Monoid_unit_applicative G M1 Pure_G src_unit) (@Monoid_op_applicative G M2 Map_G Mult_G tgt_op) (@Monoid_unit_applicative G M2 Pure_G tgt_unit) (@map G Map_G M1 M2 ϕ)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

@Monoid_Morphism (G M1) (G M2) (@Monoid_op_applicative G M1 Map_G Mult_G src_op) (@Monoid_unit_applicative G M1 Pure_G src_unit) (@Monoid_op_applicative G M2 Map_G Mult_G tgt_op) (@Monoid_unit_applicative G M2 Pure_G tgt_unit) (@map G Map_G M1 M2 ϕ)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

@Monoid (G M1) (@Monoid_op_applicative G M1 Map_G Mult_G src_op) (@Monoid_unit_applicative G M1 Pure_G src_unit)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
@Monoid (G M2) (@Monoid_op_applicative G M2 Map_G Mult_G tgt_op) (@Monoid_unit_applicative G M2 Pure_G tgt_unit)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
@map G Map_G M1 M2 ϕ Ƶ = Ƶ
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
forall a1 a2 : G M1, @map G Map_G M1 M2 ϕ (a1 ● a2) = @map G Map_G M1 M2 ϕ a1 ● @map G Map_G M1 M2 ϕ a2
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

@Monoid (G M1) (@Monoid_op_applicative G M1 Map_G Mult_G src_op) (@Monoid_unit_applicative G M1 Pure_G src_unit)
typeclasses eauto.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

@Monoid (G M2) (@Monoid_op_applicative G M2 Map_G Mult_G tgt_op) (@Monoid_unit_applicative G M2 Pure_G tgt_unit)
typeclasses eauto.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

@map G Map_G M1 M2 ϕ Ƶ = Ƶ
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

@map G Map_G M1 M2 ϕ (@pure G Pure_G M1 Ƶ) = @pure G Pure_G M2 Ƶ
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

@pure G Pure_G M2 (ϕ Ƶ) = @pure G Pure_G M2 Ƶ
now rewrite monmor_unit.
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2

forall a1 a2 : G M1, @map G Map_G M1 M2 ϕ (a1 ● a2) = @map G Map_G M1 M2 ϕ a1 ● @map G Map_G M1 M2 ϕ a2
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

@map G Map_G M1 M2 ϕ (a1 ● a2) = @map G Map_G M1 M2 ϕ a1 ● @map G Map_G M1 M2 ϕ a2
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

@map G Map_G M1 M2 ϕ (@map G Map_G (M1 * M1) M1 (@uncurry M1 M1 M1 (@monoid_op M1 src_op)) (a1 ⊗ a2)) = @map G Map_G (M2 * M2) M2 (@uncurry M2 M2 M2 (@monoid_op M2 tgt_op)) (@map G Map_G M1 M2 ϕ a1 ⊗ @map G Map_G M1 M2 ϕ a2)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

(@map G Map_G M1 M2 ϕ ∘ @map G Map_G (M1 * M1) M1 (@uncurry M1 M1 M1 (@monoid_op M1 src_op))) (a1 ⊗ a2) = @map G Map_G (M2 * M2) M2 (@uncurry M2 M2 M2 (@monoid_op M2 tgt_op)) (@map G Map_G M1 M2 ϕ a1 ⊗ @map G Map_G M1 M2 ϕ a2)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

@map G Map_G (M1 * M1) M2 (ϕ ∘ @uncurry M1 M1 M1 (@monoid_op M1 src_op)) (a1 ⊗ a2) = @map G Map_G (M2 * M2) M2 (@uncurry M2 M2 M2 (@monoid_op M2 tgt_op)) (@map G Map_G M1 M2 ϕ a1 ⊗ @map G Map_G M1 M2 ϕ a2)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

@map G Map_G (M1 * M1) M2 (ϕ ∘ @uncurry M1 M1 M1 (@monoid_op M1 src_op)) (a1 ⊗ a2) = @map G Map_G (M2 * M2) M2 (@uncurry M2 M2 M2 (@monoid_op M2 tgt_op)) (@map G Map_G (M1 * M1) (M2 * M2) (@map_tensor M1 M2 ϕ M1 M2 ϕ) (a1 ⊗ a2))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

@map G Map_G (M1 * M1) M2 (ϕ ∘ @uncurry M1 M1 M1 (@monoid_op M1 src_op)) (a1 ⊗ a2) = (@map G Map_G (M2 * M2) M2 (@uncurry M2 M2 M2 (@monoid_op M2 tgt_op)) ∘ @map G Map_G (M1 * M1) (M2 * M2) (@map_tensor M1 M2 ϕ M1 M2 ϕ)) (a1 ⊗ a2)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

@map G Map_G (M1 * M1) M2 (ϕ ∘ @uncurry M1 M1 M1 (@monoid_op M1 src_op)) (a1 ⊗ a2) = @map G Map_G (M1 * M1) M2 (@uncurry M2 M2 M2 (@monoid_op M2 tgt_op) ∘ @map_tensor M1 M2 ϕ M1 M2 ϕ) (a1 ⊗ a2)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1

ϕ ∘ @uncurry M1 M1 M1 (@monoid_op M1 src_op) = @uncurry M2 M2 M2 (@monoid_op M2 tgt_op) ∘ @map_tensor M1 M2 ϕ M1 M2 ϕ
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1
m1, m2: M1

(ϕ ∘ @uncurry M1 M1 M1 (@monoid_op M1 src_op)) (m1, m2) = (@uncurry M2 M2 M2 (@monoid_op M2 tgt_op) ∘ @map_tensor M1 M2 ϕ M1 M2 ϕ) (m1, m2)
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1
m1, m2: M1

ϕ (@uncurry M1 M1 M1 (@monoid_op M1 src_op) (m1, m2)) = @uncurry M2 M2 M2 (@monoid_op M2 tgt_op) (@map_tensor M1 M2 ϕ M1 M2 ϕ (m1, m2))
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1
m1, m2: M1

ϕ (m1 ● m2) = ϕ m1 ● ϕ m2
G: Type -> Type
Map_G: Map G
Pure_G: Pure G
Mult_G: Mult G
H: @Applicative G Map_G Pure_G Mult_G
M1, M2: Type
src_op: Monoid_op M1
src_unit: Monoid_unit M1
tgt_op: Monoid_op M2
tgt_unit: Monoid_unit M2
ϕ: M1 -> M2
morphism: @Monoid_Morphism M1 M2 src_op src_unit tgt_op tgt_unit ϕ
monmor_src: @Monoid M1 src_op src_unit
monmor_tgt: @Monoid M2 tgt_op tgt_unit
monmor_unit: ϕ Ƶ = Ƶ
monmor_op: forall a1 a2 : M1, ϕ (a1 ● a2) = ϕ a1 ● ϕ a2
a1, a2: G M1
m1, m2: M1

ϕ m1 ● ϕ m2 = ϕ m1 ● ϕ m2
reflexivity. Qed. End with_hom. (** * Notations *) (**********************************************************************) Module Notations. Notation "x ⊗ y" := (mult (x, y)) (at level 50, left associativity): tealeaves_scope. Notation "Gf <⋆> Ga" := (ap _ Gf Ga) (at level 50, left associativity): tealeaves_scope. End Notations.