From Tealeaves Require Export Misc.Product Classes.Functor Functors.Identity Functors.Compose. Import Product.Notations. #[local] Generalizable Variables F G A B. (** * Tensorial Strength *) (**********************************************************************)
All endofunctors in the CoC have a tensorial strength with respect to the Cartesian product of types. This is just the operation that distributes a pairing over an endofunctor. See Tensorial Strength.
Section tensor_strength. Definition strength {F: Type -> Type} `{Map F} {A B}: forall (p: A * F B), F (A * B) := fun '(a, t) => map (pair a) t.forall A B : Type, strength = idforall A B : Type, strength = idnow ext [a b]. Qed.A, B: Typestrength = idF: Type -> Type
Map_F: Map F
H: Functor F
G: Type -> Type
Map_F0: Map G
H0: Functor Gforall A B : Type, strength = map strength ∘ strengthF: Type -> Type
Map_F: Map F
H: Functor F
G: Type -> Type
Map_F0: Map G
H0: Functor Gforall A B : Type, strength = map strength ∘ strengthF: Type -> Type
Map_F: Map F
H: Functor F
G: Type -> Type
Map_F0: Map G
H0: Functor G
A, B: Typestrength = map strength ∘ strengthF: Type -> Type
Map_F: Map F
H: Functor F
G: Type -> Type
Map_F0: Map G
H0: Functor G
A, B: Type
x: A
y: (F ∘ G) Bstrength (x, y) = (map strength ∘ strength) (x, y)F: Type -> Type
Map_F: Map F
H: Functor F
G: Type -> Type
Map_F0: Map G
H0: Functor G
A, B: Type
x: A
y: (F ∘ G) Bmap (pair x) y = map (fun '(a, t) => map (pair a) t) (map (pair x) y)now rewrite (fun_map_map). Qed. Context (F: Type -> Type) `{Functor F}.F: Type -> Type
Map_F: Map F
H: Functor F
G: Type -> Type
Map_F0: Map G
H0: Functor G
A, B: Type
x: A
y: (F ∘ G) B(eq ∘ map (pair x)) y ((map (fun '(a, t) => map (pair a) t) ∘ map (pair x)) y)F: Type -> Type
Map_F: Map F
H: Functor F
A, B: Typeforall (a : A) (x : F B), strength (a, x) = map (pair a) xreflexivity. Qed.F: Type -> Type
Map_F: Map F
H: Functor F
A, B: Typeforall (a : A) (x : F B), strength (a, x) = map (pair a) xF: Type -> Type
Map_F: Map F
H: Functor F
A, B: Typeforall a : A, (strength ∘ pair a : F B -> F (A * B)) = map (pair a)reflexivity. Qed.F: Type -> Type
Map_F: Map F
H: Functor F
A, B: Typeforall a : A, (strength ∘ pair a : F B -> F (A * B)) = map (pair a)F: Type -> Type
Map_F: Map F
H: Functor F
A1, B1: Type
f: A1 -> B1
A2, B2: Type
g: A2 -> B2forall p : A1 * F A2, strength (map_tensor f (map g) p) = map (map_tensor f g) (strength p)F: Type -> Type
Map_F: Map F
H: Functor F
A1, B1: Type
f: A1 -> B1
A2, B2: Type
g: A2 -> B2forall p : A1 * F A2, strength (map_tensor f (map g) p) = map (map_tensor f g) (strength p)F: Type -> Type
Map_F: Map F
H: Functor F
A1, B1: Type
f: A1 -> B1
A2, B2: Type
g: A2 -> B2
a: A1
t: F A2strength (map_tensor f (map g) (a, t)) = map (map_tensor f g) (strength (a, t))F: Type -> Type
Map_F: Map F
H: Functor F
A1, B1: Type
f: A1 -> B1
A2, B2: Type
g: A2 -> B2
a: A1
t: F A2map (pair (f a)) (map g t) = map (map_tensor f g) (map (pair a) t)F: Type -> Type
Map_F: Map F
H: Functor F
A1, B1: Type
f: A1 -> B1
A2, B2: Type
g: A2 -> B2
a: A1
t: F A2(map (pair (f a)) ∘ map g) t = map (map_tensor f g) (map (pair a) t)now rewrite 2(fun_map_map). Qed.F: Type -> Type
Map_F: Map F
H: Functor F
A1, B1: Type
f: A1 -> B1
A2, B2: Type
g: A2 -> B2
a: A1
t: F A2(map (pair (f a)) ∘ map g) t = (map (map_tensor f g) ∘ map (pair a)) tF: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> Bforall p : A * F C, map (map_fst f) (strength p) = strength (map_fst f p)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> Bforall p : A * F C, map (map_fst f) (strength p) = strength (map_fst f p)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> B
p: A * F Cmap (map_fst f) (strength p) = strength (map_fst f p)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> B
p: A * F Cmap (map_tensor f id) (strength p) = strength (map_tensor f id p)now rewrite (fun_map_id). Qed.F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> B
p: A * F Cstrength (map_tensor f (map id) p) = strength (map_tensor f id p)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> Bforall p : C * F A, map (map_snd f) (strength p) = strength (map_snd (map f) p)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> Bforall p : C * F A, map (map_snd f) (strength p) = strength (map_snd (map f) p)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> B
p: C * F Amap (map_snd f) (strength p) = strength (map_snd (map f) p)now rewrite <- strength_nat. Qed.F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
f: A -> B
p: C * F Amap (map_tensor id f) (strength p) = strength (map_tensor id (map f) p)F: Type -> Type
Map_F: Map F
H: Functor F
A: Typeforall p : unit * F A, map left_unitor (strength p) = left_unitor pF: Type -> Type
Map_F: Map F
H: Functor F
A: Typeforall p : unit * F A, map left_unitor (strength p) = left_unitor pF: Type -> Type
Map_F: Map F
H: Functor F
A: Type
u: unit
t: F Amap left_unitor (strength (u, t)) = left_unitor (u, t)F: Type -> Type
Map_F: Map F
H: Functor F
A: Type
t: F Amap left_unitor (strength (tt, t)) = left_unitor (tt, t)F: Type -> Type
Map_F: Map F
H: Functor F
A: Type
t: F Amap left_unitor (map (pair tt) t) = tF: Type -> Type
Map_F: Map F
H: Functor F
A: Type
t: F A(map left_unitor ∘ map (pair tt)) t = tnow rewrite (fun_map_id). Qed.F: Type -> Type
Map_F: Map F
H: Functor F
A: Type
t: F Amap (left_unitor ∘ pair tt) t = tF: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Typemap α ∘ strength = strength ∘ map_snd strength ∘ αF: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Typemap α ∘ strength = strength ∘ map_snd strength ∘ αF: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
a: A
b: B
t: F C(map α ∘ strength) (a, b, t) = (strength ∘ map_snd strength ∘ α) (a, b, t)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
a: A
b: B
t: F Cmap α (map (pair (a, b)) t) = (let '(a, t) := map_snd (fun '(a, t) => map (pair a) t) (α (a, b, t)) in map (pair a) t)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
a: A
b: B
t: F Cmap α (map (pair (a, b)) t) = map (pair (id a)) (map (pair b) t)F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
a: A
b: B
t: F C(map α ∘ map (pair (a, b))) t = (map (pair (id a)) ∘ map (pair b)) treflexivity. Qed. End tensor_strength. (** * Notations *) (**********************************************************************) Module Notations. #[local] Arguments strength F%function_scope {H} (A B)%type_scope _. Notation "'σ'":= (strength): tealeaves_scope. End Notations.F: Type -> Type
Map_F: Map F
H: Functor F
A, B, C: Type
a: A
b: B
t: F Cmap (α ∘ pair (a, b)) t = map (pair (id a) ∘ pair b) t