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
  Adapters.CategoricalToKleisli.TraversableFunctor
  Adapters.KleisliToCoalgebraic.TraversableFunctor
  Classes.Coalgebraic.TraversableFunctor
  Functors.Batch
  Functors.List
  Functors.VectorRefinement
  Theory.TraversableFunctor.

Import Coalgebraic.TraversableFunctor (ToBatch, toBatch).
Import KleisliToCoalgebraic.TraversableFunctor.DerivedInstances.

Import Subset.Notations.
Import Applicative.Notations.
Import ContainerFunctor.Notations.
Import ProductFunctor.Notations.
Import Kleisli.TraversableFunctor.Notations.
Import Batch.Notations.
Import Monoid.Notations.
Import VectorRefinement.Notations.

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

#[local] Arguments mapfst_Batch {B C A1 A2}%type_scope
  f%function_scope b.
#[local] Arguments mapsnd_Batch {A B1 B2 C}%type_scope
  f%function_scope b.




(** * Lifting relations over Traversable functors *)
(**********************************************************************)
Definition lift_relation {X} {A B:Type} `{Traverse X}
  (R: A -> B -> Prop): X A -> X B -> Prop :=
  traverse (G := subset) R.

X: Type -> Type
A, B: Type
H: Traverse X
R: A -> B -> Prop
t1: X A
t2: X B

lift_relation R t1 t2 = traverse R t1 t2
X: Type -> Type
A, B: Type
H: Traverse X
R: A -> B -> Prop
t1: X A
t2: X B

lift_relation R t1 t2 = traverse R t1 t2
reflexivity. Qed. Section lifting_relations. Context `{Classes.Categorical.TraversableFunctor.TraversableFunctor T}. Import CategoricalToKleisli.TraversableFunctor.DerivedOperations. Import CategoricalToKleisli.TraversableFunctor.DerivedInstances. Import KleisliToCoalgebraic.TraversableFunctor.DerivedOperations. Import KleisliToCoalgebraic.TraversableFunctor.DerivedInstances. Context `{ToSubset T} `{! Compat_ToSubset_Traverse T}.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B), lift_relation R t u <-> (exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B), lift_relation R t u <-> (exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B

lift_relation R t u <-> (exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B

traverse R t u <-> (exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B

map (trav_make t) (forwards (traverse (mkBackwards ∘ R) (trav_contents t))) u <-> (exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B

map (trav_make t) ((forwards ∘ traverse (mkBackwards ∘ R)) (trav_contents t)) u <-> (exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B

map (trav_make t) (traverse R (trav_contents t)) u <-> (exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u)
reflexivity. Qed. (* Minor, not helpful *)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Plen : plength u = plength t), lift_relation R t u -> trav_make t (coerce Plen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Plen : plength u = plength t), lift_relation R t u -> trav_make t (coerce Plen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
Hrel: lift_relation R t u

trav_make t (coerce Plen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
Hrel: exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u

trav_make t (coerce Plen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

trav_make t (coerce Plen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

trav_contents u ~~ trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Hcontents: trav_contents u ~~ trav_contents_u
trav_make t (coerce Plen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

trav_contents u ~~ trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_contents_u ~~ trav_contents u

trav_contents u ~~ trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_contents_u ~~ trav_contents u

proj1_sig trav_contents_u = proj1_sig (trav_contents u)
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Hcontents: trav_contents u ~~ trav_contents_u

trav_make t (coerce Plen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Hcontents: trav_contents u ~~ trav_contents_u

trav_make t (coerce Plen in trav_contents u) = trav_make t trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Hcontents: trav_contents u ~~ trav_contents_u

trav_make t ~!~ trav_make t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Hcontents: trav_contents u ~~ trav_contents_u
coerce Plen in trav_contents u ~~ trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Hcontents: trav_contents u ~~ trav_contents_u

trav_make t ~!~ trav_make t
reflexivity.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Plen: plength u = plength t
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Hcontents: trav_contents u ~~ trav_contents_u

coerce Plen in trav_contents u ~~ trav_contents_u
vector_sim. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hlen : plength u = plength t), lift_relation R t u -> traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hlen : plength u = plength t), lift_relation R t u -> traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Hrel: lift_relation R t u

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Hrel: exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Heq: coerce Hlen in trav_contents u = trav_contents_u

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
coerce Hlen in trav_contents u = trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Heq: coerce Hlen in trav_contents u = trav_contents_u

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
Heq: coerce Hlen in trav_contents u = trav_contents_u

traverse R (trav_contents t) trav_contents_u
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

coerce Hlen in trav_contents u = trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

coerce Hlen in trav_contents u ~~ trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

trav_contents u ~~ trav_contents_u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

proj1_sig trav_contents_u = proj1_sig (trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
trav_contents_u: Vector (plength t) B
Hrel: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u

trav_make t trav_contents_u = u
assumption. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hlen : plength u = plength t), trav_make t ~!~ trav_make u -> traverse R (trav_contents t) (coerce Hlen in trav_contents u) -> lift_relation R t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hlen : plength u = plength t), trav_make t ~!~ trav_make u -> traverse R (trav_contents t) (coerce Hlen in trav_contents u) -> lift_relation R t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u

traverse R (trav_contents t) (coerce Hlen in trav_contents u) -> lift_relation R t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u

traverse R (trav_contents t) (coerce Hlen in trav_contents u) -> exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)

traverse R (trav_contents t) (coerce Hlen in trav_contents u) /\ trav_make t (coerce Hlen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)
trav_make t (coerce Hlen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)

trav_make t (coerce Hlen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)

trav_make t (coerce Hlen in trav_contents u) = id u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)

trav_make t (coerce Hlen in trav_contents u) = trav_make u (trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)

trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)
coerce Hlen in trav_contents u ~~ trav_contents u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hlen: plength u = plength t
Htrav: trav_make t ~!~ trav_make u
H3: traverse R (trav_contents t) (coerce Hlen in trav_contents u)

coerce Hlen in trav_contents u ~~ trav_contents u
vector_sim. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B), lift_relation R t u -> forall C : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B), lift_relation R t u -> forall C : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hrel: lift_relation R t u

forall C : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hrel: lift_relation R t u
C: Type

trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hrel: exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u
C: Type

trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
C: Type

trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
trav_contents_u: Vector (plength t) B
Htrav: traverse R (trav_contents t) trav_contents_u
Hmake: trav_make t trav_contents_u = u
C: Type

trav_make t ?v = u
eassumption. Qed. (** ** Related terms have the same shape *) (********************************************************************)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B), lift_relation R t u -> shape t = shape u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B), lift_relation R t u -> shape t = shape u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hrel: lift_relation R t u

shape t = shape u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hrel: lift_relation R t u

forall B0 : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hrel: lift_relation R t u

lift_relation ?R t u
eassumption. Qed. (** ** Related terms have a related zip *) (********************************************************************)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

Monoid_op_Opposite Monoid_op_and = and
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

Monoid_op_Opposite Monoid_op_and = and
ext P1 P2; propext; cbv; tauto. Qed. (* Hshape is trying to use Derived.Map_Traverse so pass (H := H) to ensure the right Map F is chosen *)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hshape : shape t = shape u), lift_relation R t u -> Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hshape : shape t = shape u), lift_relation R t u -> Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

mapReduce (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

mapReduce (uncurry R) (trav_make t (same_shape_zip_contents t u Hshape))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

mapReduce (uncurry R) (same_shape_zip_contents t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

mapReduce (uncurry R) (same_shape_zip_contents t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

mapReduce (uncurry R) (Vector_zip A B (plength t) (plength u) (trav_contents t) (trav_contents u) (same_shape_implies_plength t u Hshape))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

mapReduce (uncurry R) (Vector_zip_eq (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u

traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u
t0:= relation2: forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hlen : plength u = plength t), lift_relation R t u -> traverse R (trav_contents t) (coerce Hlen in trav_contents u)

traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
H3: lift_relation R t u
t0:= relation2: forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hlen : plength u = plength t), lift_relation R t u -> traverse R (trav_contents t) (coerce Hlen in trav_contents u)

lift_relation R t u
assumption. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
M: Type
op: Monoid_op M
unit0: Monoid_unit M
H3: Monoid M

forall (A B : Type) (f : A * B -> M) (t : T A) (u : T B) (Hshape : shape t = shape u), mapReduce f (same_shape_zip t u Hshape) = mapReduce f (same_shape_zip_contents t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
M: Type
op: Monoid_op M
unit0: Monoid_unit M
H3: Monoid M

forall (A B : Type) (f : A * B -> M) (t : T A) (u : T B) (Hshape : shape t = shape u), mapReduce f (same_shape_zip t u Hshape) = mapReduce f (same_shape_zip_contents t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
M: Type
op: Monoid_op M
unit0: Monoid_unit M
H3: Monoid M
A, B: Type
f: A * B -> M
t: T A
u: T B
Hshape: shape t = shape u

mapReduce f (same_shape_zip t u Hshape) = mapReduce f (same_shape_zip_contents t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
M: Type
op: Monoid_op M
unit0: Monoid_unit M
H3: Monoid M
A, B: Type
f: A * B -> M
t: T A
u: T B
Hshape: shape t = shape u

mapReduce f (trav_make t (same_shape_zip_contents t u Hshape)) = mapReduce f (same_shape_zip_contents t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
M: Type
op: Monoid_op M
unit0: Monoid_unit M
H3: Monoid M
A, B: Type
f: A * B -> M
t: T A
u: T B
Hshape: shape t = shape u

mapReduce f (same_shape_zip_contents t u Hshape) = mapReduce f (same_shape_zip_contents t u Hshape)
reflexivity. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hshape : shape t = shape u), lift_relation R t u <-> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B : Type) (R : A -> B -> Prop) (t : T A) (u : T B) (Hshape : shape t = shape u), lift_relation R t u <-> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u

lift_relation R t u <-> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u

lift_relation R t u -> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
(forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape) -> lift_relation R t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u

lift_relation R t u -> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hrel: lift_relation R t u

(forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hrel: lift_relation R t u

forall C : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hrel: lift_relation R t u
Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hrel: lift_relation R t u

forall C : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hrel: lift_relation R t u

lift_relation ?R t u
eassumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hrel: lift_relation R t u

Forall (uncurry R) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hrel: lift_relation R t u

lift_relation R t u
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u

(forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry R) (same_shape_zip t u Hshape) -> lift_relation R t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)

lift_relation R t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)

exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)

plength u = plength t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t
exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)

plength u = plength t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)

shape u = shape t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)

shape t = shape u
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

exists b : Vector (plength t) B, traverse R (trav_contents t) b /\ trav_make t b = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u) /\ trav_make t (coerce Hlen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t
trav_make t (coerce Hlen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (trav_make t (same_shape_zip_contents t u Hshape))
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (trav_make t (Vector_zip A B (plength t) (plength u) (trav_contents t) (trav_contents u) (same_shape_implies_plength t u Hshape)))
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (trav_make t (Vector_zip_eq (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)))
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: mapReduce (uncurry R) (trav_make t (Vector_zip_eq (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)))
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: mapReduce (uncurry R) (Vector_zip_eq (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u))
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: mapReduce (uncurry R) (Vector_zip_eq (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u))
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
Hlen: plength u = plength t

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
Hlen: plength u = plength t
Hcoerce: coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u = coerce Hlen in trav_contents u

traverse R (trav_contents t) (coerce Hlen in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
Hlen: plength u = plength t
coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u = coerce Hlen in trav_contents u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
Hlen: plength u = plength t
Hcoerce: coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u = coerce Hlen in trav_contents u

traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
Hlen: plength u = plength t
coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u = coerce Hlen in trav_contents u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
Hlen: plength u = plength t

coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u = coerce Hlen in trav_contents u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: traverse R (trav_contents t) (coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u)
Hlen: plength u = plength t

coerce eq_sym (same_shape_implies_plength t u Hshape) in trav_contents u ~~ coerce Hlen in trav_contents u
vector_sim.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

trav_make t (coerce Hlen in trav_contents u) = u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

trav_make t (coerce Hlen in trav_contents u) = id u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

trav_make t (coerce Hlen in trav_contents u) = trav_make u (trav_contents u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t
coerce Hlen in trav_contents u ~~ trav_contents u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

trav_make t ~!~ trav_make u
apply Hmake.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B: Type
R: A -> B -> Prop
t: T A
u: T B
Hshape: shape t = shape u
Hmake: forall C : Type, trav_make t ~!~ trav_make u
Hzip: Forall (uncurry R) (same_shape_zip t u Hshape)
Hlen: plength u = plength t

coerce Hlen in trav_contents u ~~ trav_contents u
vector_sim. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B1 B2 : Type) (R : B1 -> B2 -> Prop) (t : T A) (f : A -> B1), lift_relation R (map f t) = lift_relation (R ∘ map f) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B1 B2 : Type) (R : B1 -> B2 -> Prop) (t : T A) (f : A -> B1), lift_relation R (map f t) = lift_relation (R ∘ map f) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1

lift_relation R (map f t) = lift_relation (R ∘ map f) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1

traverse R (map f t) = traverse (R ∘ map f) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1

(traverse R ∘ map f) t = traverse (R ∘ map f) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1

traverse (R ∘ f) t = traverse (R ∘ map f) t
reflexivity. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (B1 A B2 : Type) (R : B1 -> B2 -> Prop) (t : T B1) (u : T A) (f : A -> B2) (Hshape : shape t = shape (map f u)) (Hshape' : shape t = shape u), Forall (uncurry R) (same_shape_zip t (map f u) Hshape) = Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (B1 A B2 : Type) (R : B1 -> B2 -> Prop) (t : T B1) (u : T A) (f : A -> B2) (Hshape : shape t = shape (map f u)) (Hshape' : shape t = shape u), Forall (uncurry R) (same_shape_zip t (map f u) Hshape) = Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

Forall (uncurry R) (same_shape_zip t (map f u) Hshape) = Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

mapReduce (uncurry R) (same_shape_zip t (map f u) Hshape) = mapReduce (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

mapReduce (uncurry R) (same_shape_zip_contents t (map f u) Hshape) = mapReduce (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

mapReduce (uncurry R) (same_shape_zip_contents t (map f u) Hshape) = mapReduce (uncurry (precompose f ∘ R)) (same_shape_zip_contents t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

mapReduce (uncurry R) (map (map_snd f) (same_shape_zip_contents t u (same_shape_map_rev_r t u f Hshape))) = mapReduce (uncurry (precompose f ∘ R)) (same_shape_zip_contents t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

(mapReduce (uncurry R) ∘ map (map_snd f)) (same_shape_zip_contents t u (same_shape_map_rev_r t u f Hshape)) = mapReduce (uncurry (precompose f ∘ R)) (same_shape_zip_contents t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

mapReduce (uncurry R ∘ map_snd f) (same_shape_zip_contents t u (same_shape_map_rev_r t u f Hshape)) = mapReduce (uncurry (precompose f ∘ R)) (same_shape_zip_contents t u Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

uncurry R ∘ map_snd f = uncurry (precompose f ∘ R)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u
same_shape_zip_contents t u (same_shape_map_rev_r t u f Hshape) = same_shape_zip_contents t u Hshape'
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

uncurry R ∘ map_snd f = uncurry (precompose f ∘ R)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u
x: B1
y: A

(uncurry R ∘ map_snd f) (x, y) = uncurry (precompose f ∘ R) (x, y)
reflexivity.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape (map f u)
Hshape': shape t = shape u

same_shape_zip_contents t u (same_shape_map_rev_r t u f Hshape) = same_shape_zip_contents t u Hshape'
apply same_shape_zip_contents_proof_irrelevance. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (B1 A B2 : Type) (R : B1 -> B2 -> Prop) (t : T B1) (u : T A) (f : A -> B2), shape t = shape u -> lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (B1 A B2 : Type) (R : B1 -> B2 -> Prop) (t : T B1) (u : T A) (f : A -> B2), shape t = shape u -> lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u

lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u

shape t = shape (map f u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u

shape t = shape (map f u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u

shape t = shape u
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

lift_relation R t (map f u) <-> lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

(forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry R) (same_shape_zip t (map f u) Hshape') <-> lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

(forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry R) (same_shape_zip t (map f u) Hshape') <-> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

(forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape') <-> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

(forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape') -> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
(forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape) -> (forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

(forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape') -> (forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make (map f u)
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')

(forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make (map f u)
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')

forall C : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make (map f u)
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')
Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make (map f u)
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')

forall C : Type, trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make (map f u)
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')
C: Type

trav_make t ~!~ trav_make u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make (map f u)
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')
C: Type

shape t = shape u
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make (map f u)
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u ?Hshape')

Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
eassumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)

(forall C : Type, trav_make t ~!~ trav_make u) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape) -> (forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make u
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)

(forall C : Type, trav_make t ~!~ trav_make (map f u)) /\ Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make u
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)

forall C : Type, trav_make t ~!~ trav_make (map f u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make u
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make u
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)

forall C : Type, trav_make t ~!~ trav_make (map f u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make u
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)

shape t = shape (map f u)
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
Hshape: shape t = shape u
Hshape': shape t = shape (map f u)
X1: forall C : Type, trav_make t ~!~ trav_make u
X2: Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)

Forall (uncurry (precompose f ∘ R)) (same_shape_zip t u Hshape)
assumption. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (B1 A B2 : Type) (R : B1 -> B2 -> Prop) (t : T B1) (u : T A) (f : A -> B2), lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (B1 A B2 : Type) (R : B1 -> B2 -> Prop) (t : T B1) (u : T A) (f : A -> B2), lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2

lift_relation R t (map f u) = lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2

lift_relation R t (map f u) <-> lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2

lift_relation R t (map f u) -> lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
lift_relation (precompose f ∘ R) t u -> lift_relation R t (map f u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2

lift_relation R t (map f u) -> lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
hyp: lift_relation R t (map f u)

lift_relation (precompose f ∘ R) t u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
hyp: lift_relation R t (map f u)

shape t = shape u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
hyp: shape t = shape (map f u)

shape t = shape u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
hyp: shape t = shape u

shape t = shape u
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2

lift_relation (precompose f ∘ R) t u -> lift_relation R t (map f u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
hyp: lift_relation (precompose f ∘ R) t u

lift_relation R t (map f u)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
hyp: lift_relation (precompose f ∘ R) t u

shape t = shape u
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
B1, A, B2: Type
R: B1 -> B2 -> Prop
t: T B1
u: T A
f: A -> B2
hyp: shape t = shape u

shape t = shape u
assumption. Qed. (* TODO This can actually be strengthed into an IFF *)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B1 B2 : Type) (R : B1 -> B2 -> Prop) (t : T A) (f : A -> B1) (g : A -> B2), (forall a : A, a ∈ t -> R (f a) (g a)) -> lift_relation R (map f t) (map g t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T

forall (A B1 B2 : Type) (R : B1 -> B2 -> Prop) (t : T A) (f : A -> B1) (g : A -> B2), (forall a : A, a ∈ t -> R (f a) (g a)) -> lift_relation R (map f t) (map g t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, a ∈ t -> R (f a) (g a)

lift_relation R (map f t) (map g t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, a ∈ t -> R (f a) (g a)

lift_relation (R ∘ map f) t (map g t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, a ∈ t -> R (f a) (g a)

lift_relation (precompose g ∘ (R ∘ map f)) t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, a ∈ t -> R (f a) (g a)

traverse (precompose g ∘ (R ∘ map f)) t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, a ∈ t -> R (f a) (g a)

(runBatch (precompose g ∘ (R ∘ map f)) ∘ toBatch) t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, a ∈ t -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (toBatch t) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, tosubset t a -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (toBatch t) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret t a -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (toBatch t) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret t a -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (toBatch t) (id t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret t a -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (toBatch t) ((runBatch id ∘ toBatch) t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret t a -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (toBatch t) (runBatch id (toBatch t))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (toBatch t) (runBatch id (toBatch t))
(* induction (@toBatch T ToBatch_inst A A t). *) (* Generates a weird hypothesis *)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)

forall (C : Type) (c : C), (forall a : A, mapReduce ret (Done c) a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) (Done c) (runBatch id (Done c))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
forall (C : Type) (b : Batch A A (A -> C)), ((forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)) -> forall a : A, (forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)) -> runBatch (fun a0 : A => precompose g (R (map f a0))) (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)

forall (C : Type) (c : C), (forall a : A, mapReduce ret (Done c) a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) (Done c) (runBatch id (Done c))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
c: C
hyp': forall a : A, mapReduce ret (Done c) a -> R (f a) (g a)

runBatch (fun a : A => precompose g (R (map f a))) (Done c) (runBatch id (Done c))
reflexivity.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)

forall (C : Type) (b : Batch A A (A -> C)), ((forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)) -> forall a : A, (forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)) -> runBatch (fun a0 : A => precompose g (R (map f a0))) (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)

forall a : A, (forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)) -> runBatch (fun a0 : A => precompose g (R (map f a0))) (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

runBatch (fun a : A => precompose g (R (map f a))) (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

(runBatch (fun a : A => precompose g (R (map f a))) b <⋆> precompose g (R (map f a))) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

(runBatch (fun a : A => precompose g (R (map f a))) b <⋆> precompose g (R (map f a))) (runBatch id b <⋆> id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

exists (f0 : A -> C) (a0 : A), precompose g (R (map f a)) a0 /\ runBatch (fun a : A => precompose g (R (map f a))) b f0 /\ f0 a0 = runBatch id b <⋆> id a
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

exists (f0 : A -> C) (a0 : A), precompose g (R (map f a)) a0 /\ runBatch (fun a : A => precompose g (R (map f a))) b f0 /\ f0 a0 = map (fun '(f, a) => f a) (runBatch id b ⊗ id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

exists (f0 : A -> C) (a0 : A), precompose g (R (f a)) a0 /\ runBatch (fun a : A => precompose g (R (f a))) b f0 /\ f0 a0 = (let '(f, a) := runBatch id b ⊗ id a in f a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

exists (f0 : A -> C) (a0 : A), precompose g (R (f a)) a0 /\ runBatch (fun a : A => precompose g (R (f a))) b f0 /\ f0 a0 = runBatch id b (id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

precompose g (R (f a)) a /\ runBatch (fun a : A => precompose g (R (f a))) b (runBatch id b) /\ runBatch id b a = runBatch id b (id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

precompose g (R (f a)) a
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)
runBatch (fun a : A => precompose g (R (f a))) b (runBatch id b)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)
runBatch id b a = runBatch id b (id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

precompose g (R (f a)) a
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

R (f a) (g a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

R (f a) (g a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

mapReduce ret (b ⧆ a) a
now right.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

runBatch (fun a : A => precompose g (R (f a))) b (runBatch id b)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)
runBatch id b a = runBatch id b (id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

runBatch (fun a : A => precompose g (R (f a))) b (runBatch id b)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

forall a : A, mapReduce ret b a -> R (f a) (g a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)
a0: A
H3: mapReduce ret b a0

R (f a0) (g a0)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)
a0: A
H3: mapReduce ret b a0

mapReduce ret (b ⧆ a) a0
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)
a0: A
H3: mapReduce ret b a0

(mapReduce ret b ● ret a) a0
now left.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

runBatch id b a = runBatch id b (id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
C: Type
b: Batch A A (A -> C)
IH: (forall a : A, mapReduce ret b a -> R (f a) (g a)) -> runBatch (fun a : A => precompose g (R (map f a))) b (runBatch id b)
a: A
hyp': forall a0 : A, mapReduce ret (b ⧆ a) a0 -> R (f a0) (g a0)

runBatch id b a = runBatch id b (id a)
reflexivity. }
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
H2: ToSubset T
Compat_ToSubset_Traverse0: Compat_ToSubset_Traverse T
A, B1, B2: Type
R: B1 -> B2 -> Prop
t: T A
f: A -> B1
g: A -> B2
hyp: forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)

forall a : A, mapReduce ret (toBatch t) a -> R (f a) (g a)
assumption. Qed. End lifting_relations. (** * Properties of Relations *) (**********************************************************************) Section relprop. End relprop. (** * Diagonal *) (**********************************************************************) Section relprop. Context `{Classes.Categorical.TraversableFunctor.TraversableFunctor T}. Import CategoricalToKleisli.TraversableFunctor.DerivedOperations. Import CategoricalToKleisli.TraversableFunctor.DerivedInstances. Import KleisliToCoalgebraic.TraversableFunctor.DerivedOperations. Import KleisliToCoalgebraic.TraversableFunctor.DerivedInstances.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> A -> Prop) (t : T A), Forall (fun a : A => R a a) t -> lift_relation R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> A -> Prop) (t : T A), Forall (fun a : A => R a a) t -> lift_relation R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: Forall (fun a : A => R a a) t

lift_relation R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: mapReduce (fun a : A => R a a) t

lift_relation R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: traverse (fun a : A => R a a) t

lift_relation R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: traverse (fun a : A => R a a) t

traverse R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: (runBatch (fun a : A => R a a) ∘ toBatch) t

traverse R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: (runBatch (fun a : A => R a a) ∘ toBatch) t

(runBatch R ∘ toBatch) t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: (runBatch (fun a : A => R a a) ∘ toBatch) t

runBatch R (toBatch t) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: (runBatch (fun a : A => R a a) ∘ toBatch) t

runBatch R (toBatch t) (id t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: (runBatch (fun a : A => R a a) ∘ toBatch) t

runBatch R (toBatch t) ((runBatch id ∘ toBatch) t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: (runBatch (fun a : A => R a a) ∘ toBatch) t

runBatch R (toBatch t) (runBatch id (toBatch t))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
HF: runBatch (fun a : A => R a a) (toBatch t)

runBatch R (toBatch t) (runBatch id (toBatch t))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A

runBatch (fun a : A => R a a) (toBatch t) -> runBatch R (toBatch t) (runBatch id (toBatch t))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A

forall (C : Type) (c : C), runBatch (fun a : A => R a a) (Done c) -> runBatch R (Done c) (runBatch id (Done c))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
forall (C : Type) (b : Batch A A (A -> C)), (runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)) -> forall a : A, runBatch (fun a0 : A => R a0 a0) (b ⧆ a) -> runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A

forall (C : Type) (c : C), runBatch (fun a : A => R a a) (Done c) -> runBatch R (Done c) (runBatch id (Done c))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A

forall (C : Type) (c : C), True -> c = c
tauto.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A

forall (C : Type) (b : Batch A A (A -> C)), (runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)) -> forall a : A, runBatch (fun a0 : A => R a0 a0) (b ⧆ a) -> runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: runBatch (fun a : A => R a a) (b ⧆ a)

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: runBatch (fun a : A => R a a) b <⋆> R a a

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: map (fun '(f, a) => f a) (runBatch (fun a : A => R a a) b ⊗ R a a)

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: Map_const ((A -> C) * A) C (fun '(f, a) => f a) (runBatch (fun a : A => R a a) b ⊗ R a a)

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: runBatch (fun a : A => R a a) b ⊗ R a a

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: Mult_const (A -> C) A (runBatch (fun a : A => R a a) b, R a a)

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: runBatch (fun a : A => R a a) b ● R a a

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: Monoid_op_and (runBatch (fun a : A => R a a) b) (R a a)

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
X2: runBatch (fun a : A => R a a) b /\ R a a

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
Y1: runBatch (fun a : A => R a a) b
Y2: R a a

runBatch R (b ⧆ a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
Y1: runBatch (fun a : A => R a a) b
Y2: R a a

(runBatch R b <⋆> R a) (runBatch id (b ⧆ a))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
Y1: runBatch (fun a : A => R a a) b
Y2: R a a

(runBatch R b <⋆> R a) (runBatch id b <⋆> id a)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
Y1: runBatch (fun a : A => R a a) b
Y2: R a a

exists (f : A -> C) (a0 : A), R a a0 /\ runBatch R b f /\ f a0 = runBatch id b <⋆> id a
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
Y1: runBatch (fun a : A => R a a) b
Y2: R a a

exists a0 : A, R a a0 /\ runBatch R b (runBatch id b) /\ runBatch id b a0 = runBatch id b <⋆> id a
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
C: Type
b: Batch A A (A -> C)
X1: runBatch (fun a : A => R a a) b -> runBatch R b (runBatch id b)
a: A
Y1: runBatch (fun a : A => R a a) b
Y2: R a a

R a a /\ runBatch R b (runBatch id b) /\ runBatch id b a = runBatch id b <⋆> id a
split; auto. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> Prop) (t : T A), Forall R t = Forall R (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> Prop) (t : T A), Forall R t = Forall R (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> Prop) (t : T A), mapReduce R t = mapReduce R (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A

mapReduce R t = mapReduce R (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A

traverse R t = mapReduce R (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A

map (trav_make t) (forwards (traverse (mkBackwards ∘ R) (trav_contents t))) = mapReduce R (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A

map (trav_make t) (forwards (traverse (mkBackwards ∘ R) vnil)) = mapReduce R vnil
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v
map (trav_make t) (forwards (traverse (mkBackwards ∘ R) (vcons m a v))) = mapReduce R (vcons m a v)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A

map (trav_make t) (forwards (traverse (mkBackwards ∘ R) vnil)) = mapReduce R vnil
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A

pure (exist (fun l : list False => length l = 0) nil eq_refl) = pure (exist (fun l : list False => length l = 0) nil eq_refl)
reflexivity.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

map (trav_make t) (forwards (traverse (mkBackwards ∘ R) (vcons m a v))) = mapReduce R (vcons m a v)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

map (trav_make t) (forwards (pure (vcons m) <⋆> (mkBackwards ∘ R) a <⋆> traverse (mkBackwards ∘ R) v)) = mapReduce R (vcons m a v)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

map (trav_make t) (forwards (pure (vcons m) <⋆> (mkBackwards ∘ R) a <⋆> traverse (mkBackwards ∘ R) v)) = traverse R (vcons m a v)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

map (trav_make t) (forwards (pure (vcons m) <⋆> (mkBackwards ∘ R) a <⋆> traverse (mkBackwards ∘ R) v)) = pure (vcons m) <⋆> R a <⋆> traverse R v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

map (trav_make t) (forwards (pure (vcons m) <⋆> (mkBackwards ∘ R) a <⋆> traverse (mkBackwards ∘ R) v)) = pure (vcons m) <⋆> R a <⋆> mapReduce R v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

forwards (traverse (mkBackwards ∘ R) v) ● (R a ● pure (vcons m)) = (pure (vcons m) ● R a) ● mapReduce R v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

forwards (traverse (mkBackwards ∘ R) v) ● (R a ● pure (vcons m)) = (pure (vcons m) ● R a) ● map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

forwards (traverse (mkBackwards ∘ R) v) ● (R a ● pure (vcons m)) = (pure (vcons m) ● R a) ● map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

(forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ Ƶ) = ((Ƶ /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

(forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True) = ((True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards))
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True -> (True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v
(True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards) -> forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True -> (True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v
H2: forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True

(True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v
H2: forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v)
H3: R a
H4: True

(True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards)
split; auto.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v

(True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards) -> forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v
H2: (True /\ R a) /\ (let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards)

forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> Prop
t: T A
a: A
m: nat
v: Vector m A
IHv: map (trav_make t) (forwards (traverse (mkBackwards ∘ R) v)) = mapReduce R v
H2: True
H4: R a
H3: let (forwards) := traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v in forwards

forwards (traverse_Vector m (Backwards (const Prop)) (mkBackwards ∘ R) v) /\ R a /\ True
split; auto. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> A -> Prop) (t : T A), lift_relation R t t -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> A -> Prop) (t : T A), lift_relation R t t -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A

lift_relation R t t -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A

(forall C : Type, trav_make t ~!~ trav_make t) /\ Forall (uncurry R) (same_shape_zip t t eq_refl) -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: Forall (uncurry R) (same_shape_zip t t eq_refl)

Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

Forall (uncurry R) (same_shape_zip t t eq_refl) -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

Forall (uncurry R) (trav_make t (same_shape_zip_contents t t eq_refl)) -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

Forall (uncurry R) (trav_make t (Vector_zip A A (plength t) (plength t) (trav_contents t) (trav_contents t) (same_shape_implies_plength t t eq_refl))) -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

Forall (uncurry R) (trav_make t (Vector_zip_eq (trav_contents t) (trav_contents t))) -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

Forall (uncurry R) (trav_make t (map (fun a : A => (a, a)) (trav_contents t))) -> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

mapReduce (uncurry R) (trav_make t (map (fun a : A => (a, a)) (trav_contents t))) -> mapReduce (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

mapReduce (uncurry R) (map (fun a : A => (a, a)) (trav_contents t)) -> mapReduce (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

(mapReduce (uncurry R) ∘ map (fun a : A => (a, a))) (trav_contents t) -> mapReduce (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

mapReduce (uncurry R ∘ (fun a : A => (a, a))) (trav_contents t) -> mapReduce (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t

mapReduce (fun a : A => uncurry R (a, a)) (trav_contents t) -> mapReduce (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => uncurry R (a, a)) (trav_contents t)

mapReduce (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => uncurry R (a, a)) (trav_contents t)

Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => uncurry R (a, a)) (trav_contents t)

Forall (fun a : A => R a a) (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => R a a) (trav_contents t)

Forall (fun a : A => R a a) (trav_contents t)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => R a a) vnil

Forall (fun a : A => R a a) vnil
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: mapReduce (fun a : A => R a a) (vcons m a v)
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v
Forall (fun a : A => R a a) (vcons m a v)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => R a a) vnil

Forall (fun a : A => R a a) vnil
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => R a a) vnil

mapReduce (fun a : A => R a a) vnil
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
X2: mapReduce (fun a : A => R a a) vnil

Ƶ
easy.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: mapReduce (fun a : A => R a a) (vcons m a v)
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v

Forall (fun a : A => R a a) (vcons m a v)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: mapReduce (fun a : A => R a a) (vcons m a v)
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v

mapReduce (fun a : A => R a a) (vcons m a v)
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: mapReduce (fun a : A => R a a) (vcons m a v)
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v

R a a ● mapReduce (fun a : A => R a a) v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: R a a ● mapReduce (fun a : A => R a a) v
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v

R a a ● mapReduce (fun a : A => R a a) v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: R a a ● mapReduce (fun a : A => R a a) v
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v
H2: mapReduce (fun a : A => R a a) v
H3: R a a

R a a ● mapReduce (fun a : A => R a a) v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: R a a ● mapReduce (fun a : A => R a a) v
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v
H2: mapReduce (fun a : A => R a a) v
H3: R a a

R a a
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: R a a ● mapReduce (fun a : A => R a a) v
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v
H2: mapReduce (fun a : A => R a a) v
H3: R a a
mapReduce (fun a : A => R a a) v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: R a a ● mapReduce (fun a : A => R a a) v
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v
H2: mapReduce (fun a : A => R a a) v
H3: R a a

R a a
assumption.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: R a a ● mapReduce (fun a : A => R a a) v
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v
H2: mapReduce (fun a : A => R a a) v
H3: R a a

mapReduce (fun a : A => R a a) v
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
X1: forall C : Type, trav_make t ~!~ trav_make t
a: A
m: nat
v: Vector m A
X2: R a a ● mapReduce (fun a : A => R a a) v
IHv: mapReduce (fun a : A => R a a) v -> Forall (fun a : A => R a a) v
H2: mapReduce (fun a : A => R a a) v
H3: R a a

mapReduce (fun a : A => R a a) v
assumption. Qed.
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> A -> Prop) (t : T A), lift_relation R t t <-> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T

forall (A : Type) (R : A -> A -> Prop) (t : T A), lift_relation R t t <-> Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
H2: lift_relation R t t

Forall (fun a : A => R a a) t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
H2: Forall (fun a : A => R a a) t
lift_relation R t t
T: Type -> Type
H: Map T
H0: TraversableFunctor.ApplicativeDist T
H1: Categorical.TraversableFunctor.TraversableFunctor T
A: Type
R: A -> A -> Prop
t: T A
H2: Forall (fun a : A => R a a) t

lift_relation R t t
apply relation_diagonal1; auto. Qed. End relprop.