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
Theory.DecoratedTraversableMonad
Theory.Multisorted.DecoratedTraversableMonad
Backends.Multisorted.LN
Simplification.Simplification
Simplification.MBinddt.Export LN.Notations.#[local] Generalizable VariablesF G A B C ϕ.(** * The index [K] *)(******************************************************************************)InductiveK2 : Type := ktyp | ktrm.
EqDec K2 eq
EqDec K2 eq
forallxy : K2, {x = y} + {x <> y}
decide equality.Defined.#[export] InstanceI2 : Index := {| K := K2 |}.(** * System F syntax and typeclass instances *)(******************************************************************************)Parameterbase_typ : Type.Sectionsyntax.Context
{V : Type}.Inductivetyp : Type :=
| ty_c : base_typ -> typ
| ty_v : V -> typ
| ty_ar : typ -> typ -> typ
| ty_univ : typ -> typ.Inductiveterm : Type :=
| tm_var : V -> term
| tm_abs : typ -> term -> term
| tm_app : term -> term -> term
| tm_tab : term -> term
| tm_tap : term -> typ -> term.Endsyntax.(** Clear the implicit arguments to the type constructors. This keeps <<V>> implicit for the constructors. *)Arguments typ V : clear implicits.Arguments term V : clear implicits.DefinitionSystemF (k : K) (v : Type) : Type :=
match k with
| ktyp => typ v
| ktrm => term v
end.(** ** Notations *)(******************************************************************************)ModuleNotations.Declare Scope SystemF_scope.(** *** Notations for type expressions *)Notation"A ⟹ B" := (ty_ar A B) (at level51, right associativity) : SystemF_scope.Notation"∀ τ" := (ty_univ τ) (at level60) : SystemF_scope.(** *** Notations for term expressions *)Notation"'λ' X ⋅ body" := (tm_abs X body) (at level45) : SystemF_scope.Notation"t1 @ t2" := (tm_app t1 t2) (at level40) : SystemF_scope.Notation"'Λ' body" := (tm_tab body) (at level45) : SystemF_scope.Notation"t1 @@ t2" := (tm_tap t1 t2) (at level40) : SystemF_scope.(** *** Coercions from variables to leaves *)CoercionFr : atom >-> LN.CoercionBd : nat >-> LN.(** *** Coercions from leaves to term expressions *)Definitiontm_var_ : LN -> term LN := @tm_var LN.Coerciontm_var_ : LN >-> term.(** *** Coercions from leaves to type expressions *)Definitionc_base_type: base_typ -> typ LN := @ty_c LN.Definitionc_LN_type : LN -> typ LN := @ty_v LN.Coercionc_base_type : base_typ >-> typ.Coercionc_LN_type : LN >-> typ.EndNotations.Open Scope SystemF_scope.Import Notations.(** ** Example expressions *)(******************************************************************************)Moduleexamples.Context
(xyz : atom)
(c1c2c3 : base_typ).(** *** Raw abstract syntax *)(** Abstract syntax trees without notations or coercions *)(******************************************************************************)(** *** Constants and variables *)Exampletyp_1 : typ LN := ty_v (Fr x).Exampletyp_2 : typ LN := ty_v (Fr y).Exampletyp_3 : typ LN := ty_v (Fr z).Exampletyp_4 : typ LN := ty_v (Bd 0).Exampletyp_5 : typ LN := ty_v (Bd 1).Exampletyp_6 : typ LN := ty_v (Bd 2).Exampletyp_7 : typ LN := ty_c c1.Exampletyp_8 : typ LN := ty_c c2.(** *** Simple types *)Exampletyp_9 : typ LN := ty_ar (ty_v (Fr x))
(ty_v (Fr x)).Exampletyp_10 : typ LN := ty_ar (ty_v (Fr x))
(ty_v (Fr y)).Exampletyp_11 : typ LN := ty_ar (ty_v (Fr x))
(ty_v (Bd 1)).Exampletyp_12 : typ LN := ty_ar (ty_v (Bd 1))
(ty_c c1).Exampletyp_13 : typ LN := ty_ar (ty_ar (ty_v (Bd 0))
(ty_v (Fr x)))
(ty_v (Bd 1)).Exampletyp_14 : typ LN := ty_ar (ty_c c2)
(ty_ar (ty_v (Fr x))
(ty_v (Bd 1))).Exampletyp_15 : typ LN := ty_ar (ty_ar (ty_v (Bd 2))
(ty_c c1))
(ty_ar (ty_v (Fr y))
(ty_v (Fr x))).Exampletyp_16 : typ LN := ty_ar (ty_ar (ty_v (Bd 2))
(ty_v (Bd 1)))
(ty_ar (ty_v (Fr y))
(ty_v (Fr x))).(** *** Universal types *)Exampletyp_17 : typ LN := ty_univ (ty_ar (ty_v (Bd 0))
(ty_v (Bd 0))).Exampletyp_18 : typ LN := ty_univ (ty_ar (ty_ar (ty_v (Bd 2))
(ty_v (Bd 1)))
(ty_ar (ty_v (Fr y))
(ty_v (Fr x)))).(** *** Printy printed syntax *)(******************************************************************************)Modulepretty.#[local] Open Scope SystemF_scope.
= ty_v 0
: typ LN
= ty_v x
: typ LN
= ty_c c1
: typ LN
(** Constants and variables *)Exampletyp_1 : typ LN := x.Exampletyp_2 : typ LN := y.Exampletyp_3 : typ LN := Fr z.Exampletyp_4 : typ LN := 0.Exampletyp_5 : typ LN := Bd 1.Exampletyp_6 : typ LN := 2.Exampletyp_7 : typ LN := c1.Exampletyp_8 : typ LN := c2.(** Simple types *)Exampletyp_9 : typ LN := x ⟹ x.Exampletyp_10 : typ LN := x ⟹ y.
(x ⟹ x : typ LN) = x ⟹ x
reflexivity.Qed.
(x ⟹ 1 : typ LN) = x ⟹ 1
reflexivity.Qed.Exampletyp_11 : typ LN := x ⟹ 1.Exampletyp_12 : typ LN := x ⟹ c1.Exampletyp_13 : typ LN := (x ⟹ 0) ⟹ 1.Exampletyp_14 : typ LN := c2 ⟹ (x ⟹ 1).
reflexivity.Qed.Exampletyp_19 : typ LN := (∀2 ⟹ 1) ⟹ (y ⟹ x).Exampletyp_20 : typ LN := (2 ⟹ 1) ⟹ ∀y ⟹ x.Endpretty.Exampleterm_1 : term LN := tm_var (Fr x).Exampleterm_2 : term LN := tm_var (Bd 0).Exampleterm_3 : term LN := tm_app term_1 term_2.Exampleterm_4 : term LN := tm_app term_3 term_3.(** Identity function on type [c1]. *)Exampleterm_5 : term LN := tm_abs (ty_c c1) (tm_var (Bd 0)).Exampleterm_6 : term LN := tm_app term_5 term_3.(** Polymorphic identity function. *)Exampleterm_7 : term LN := tm_tab (tm_abs (ty_v (Bd 0))(tm_var (Bd 0))).(** Instantiate identity at <<c1>> *)Exampleterm_8 : term LN := tm_tap term_7 c1.#[local] Open Scope SystemF_scope.Exampleterm_9 : term LN := (Λ λ0 ⋅ 0).Endexamples.(** ** <<binddt>> operations *)(******************************************************************************)Sectionoperations.Context
(F : Type -> Type)
`{Applicative F}
{A B : Type}.Fixpointbind_type (f : forall (k : K), list K2 * A -> F (SystemF k B)) (t : typ A) : F (typ B) :=
match t with
| ty_c t =>
pure (ty_c t)
| ty_v a =>
f ktyp (nil, a)
| ty_ar t1 t2 =>
pure ty_ar <⋆> bind_type f t1 <⋆> bind_type f t2
| ty_univ body =>
pure ty_univ <⋆> bind_type (f ◻ allK (incr [ktyp])) body
end.Fixpointbind_term (f : forall (k : K), list K2 * A -> F (SystemF k B)) (t : term A) : F (term B) :=
match t with
| tm_var a =>
f ktrm (nil, a)
| tm_abs ty body =>
pure tm_abs
<⋆> bind_type f ty
<⋆> bind_term (f ◻ allK (incr [ktrm])) body
| tm_app t1 t2 =>
pure tm_app <⋆> bind_term f t1 <⋆> bind_term f t2
| tm_tab body =>
pure tm_tab <⋆> bind_term (f ◻ allK (incr [ktyp])) body
| tm_tap t1 ty =>
pure tm_tap <⋆> bind_term f t1 <⋆> bind_type f ty
end.Endoperations.#[export] InstanceMReturn_SystemF : MReturn SystemF :=
funAk => match k with
| ktyp => ty_v
| ktrm => tm_var
end.#[export] InstanceMBind_type : MBind (list K2) SystemF typ := @bind_type.#[export] InstanceMBind_term : MBind (list K2) SystemF term := @bind_term.#[export] InstanceMBind_SystemF : forallk, MBind (list K2) SystemF (SystemF k) :=
ltac:(intros [|]; typeclasses eauto).Ltaccbn_mbinddt_post_hook ::=
trymatch goal with
| |- context[bind_type ?G?f?τ] =>
change (bind_type G f τ) with (mbinddt typ G f τ)
| |- context[bind_term ?G?f?t] =>
change (bind_term G f t) with (mbinddt term G f t)
end.(*Ltac simplify_mbinddt_unfold_ret_hook ::= unfold_ops @MReturn_SystemF.*)Ltacuse_operational_tcs :=
ltac_trace "use_operational_tcs";
change (bind_type ?F?f) with (mbinddt typ F f).Ltacgrammatical_categories_down :=
ltac_trace "grammatical_categories_down";
change (SystemF ktyp) with typ;
change (MBind_SystemF ktyp) with MBind_type.Ltacgrammatical_categories_up :=
ltac_trace "grammatical_categories_up";
change typ with (SystemF ktyp);
change (MBind_type) with (MBind_SystemF ktyp).LtacK_down :=
ltac_trace "K_down";
change (@K I2) with K2.LtacK_up :=
ltac_trace "K_up";
change K2 with (@K I2).(** ** Example computations *)(******************************************************************************)Sectionexample_computations.Open Scope SystemF_scope.Context
(xyz : atom)
(c1c2c3 : base_typ).(** ** Demo of opening operation *)
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x 0 = x
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x 1 = 0
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x x = x
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x y = y
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp y x = x
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp y y = y
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x (∀0) = ∀0
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x (∀1) = ∀x
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x (∀1 ⟹ 0) = ∀x ⟹ 0
reflexivity.Qed.
x, y, z: atom c1, c2, c3: base_typ
open typ ktyp x (∀1 ⟹ 2) = ∀x ⟹ 1
reflexivity.Qed.Endexample_computations.(** * Proofs of the DTM axioms *)(******************************************************************************)(** ** Helper lemmas for proving DTM axioms *)(******************************************************************************)SectionDTM_instance_lemmas.Context
(W : Type)
(S : Type -> Type)
(T : K -> Type -> Type)
`{! MReturn T}
`{! MBind W T S}
`{! forallk, MBind W T (T k)}
{mn_op : Monoid_op W}
{mn_unit : Monoid_unit W}.
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W
forall (A : Type) (t : S A) (w : W),
mbinddt S (funA0 : Type => A0)
(funk : K => mret T k ∘ extract) t = t ->
mbinddt S (funA0 : Type => A0)
(funk : K => (mret T k ∘ extract) ⦿ w) t = t
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W
forall (A : Type) (t : S A) (w : W),
mbinddt S (funA0 : Type => A0)
(funk : K => mret T k ∘ extract) t = t ->
mbinddt S (funA0 : Type => A0)
(funk : K => (mret T k ∘ extract) ⦿ w) t = t
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W A: Type t: S A w: W IH: mbinddt S (funA : Type => A)
(funk : K => mret T k ∘ extract) t = t
mbinddt S (funA : Type => A)
(funk : K => (mret T k ∘ extract) ⦿ w) t = t
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W A: Type t: S A w: W IH: mbinddt S (funA : Type => A)
(funk : K => mret T k ∘ extract) t = t
mbinddt S (funA : Type => A)
(funk : K => (mret T k ∘ extract) ⦿ w) t =
mbinddt S (funA : Type => A)
(funk : K => mret T k ∘ extract) t
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W A: Type t: S A w: W IH: mbinddt S (funA : Type => A)
(funk : K => mret T k ∘ extract) t = t
(funk : K => (mret T k ∘ extract) ⦿ w) =
(funk : K => mret T k ∘ extract)
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W A: Type t: S A w: W IH: mbinddt S (funA : Type => A)
(funk : K => mret T k ∘ extract) t = t k: K w': W a: A
((mret T k ∘ extract) ⦿ w) (w', a) =
(mret T k ∘ extract) (w', a)
easy.Qed.
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W
forall (A : Type) (w : W),
mbinddt S (funA0 : Type => A0)
(funk : K => mret T k ∘ extract) =
mbinddt S (funA0 : Type => A0)
((funk : K => mret T k ∘ extract) ◻ allK (incr w))
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W
forall (A : Type) (w : W),
mbinddt S (funA0 : Type => A0)
(funk : K => mret T k ∘ extract) =
mbinddt S (funA0 : Type => A0)
((funk : K => mret T k ∘ extract) ◻ allK (incr w))
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W A: Type w: W
mbinddt S (funA : Type => A)
(funk : K => mret T k ∘ extract) =
mbinddt S (funA : Type => A)
((funk : K => mret T k ∘ extract) ◻ allK (incr w))
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W A: Type w: W
(funk : K => mret T k ∘ extract) =
(funk : K => mret T k ∘ extract) ◻ allK (incr w)
now ext k [w' a].Qed.Context
`{Applicative G}
`{Applicative F}
`{! Monoid W}
{A B C : Type}
(g : forallk, W * B -> G (T k C))
(f : forallk, W * A -> F (T k B)).(* for Var case *)
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B)
forall (a : A) (k : K),
map (mbinddt (T k) G g) (f k (Ƶ, a)) =
map (mbinddt (T k) G (g ◻ allK (incr Ƶ))) (f k (Ƶ, a))
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B)
forall (a : A) (k : K),
map (mbinddt (T k) G g) (f k (Ƶ, a)) =
map (mbinddt (T k) G (g ◻ allK (incr Ƶ))) (f k (Ƶ, a))
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B) a: A k: K
map (mbinddt (T k) G g) (f k (Ƶ, a)) =
map (mbinddt (T k) G (g ◻ allK (incr Ƶ))) (f k (Ƶ, a))
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B) a: A k: K
g = g ◻ allK (incr Ƶ)
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B) a: A k, k': K w: W b: B
g k' (w, b) = (g ◻ allK (incr Ƶ)) k' (w, b)
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B) a: A k, k': K w: W b: B
g k' (w, b) = (g k' ∘ incr Ƶ) (w, b)
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B) a: A k, k': K w: W b: B
g k' (w, b) = g k' (incr Ƶ (w, b))
W: Type S: Type -> Type T: K -> Type -> Type MReturn0: MReturn T MBind0: MBind W T S H: forallk : K, MBind W T (T k) mn_op: Monoid_op W mn_unit: Monoid_unit W G: Type -> Type Map_G: Map G Pure_G: Pure G Mult_G: Mult G H0: Applicative G F: Type -> Type Map_G0: Map F Pure_G0: Pure F Mult_G0: Mult F H1: Applicative F Monoid0: Monoid W A, B, C: Type g: forallk : K, W * B -> G (T k C) f: forallk : K, W * A -> F (T k B) a: A k, k': K w: W b: B
g k' (w, b) = g k' (Ƶ ● w, b)
now simpl_monoid.Qed.EndDTM_instance_lemmas.(** ** <<mbinddt_mret>> *)(******************************************************************************)
forallA : Type,
mbinddt typ (funA0 : Type => A0)
(mret SystemF ◻ allK extract) = id
forallA : Type,
mbinddt typ (funA0 : Type => A0)
(mret SystemF ◻ allK extract) = id
A: Type
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) = id
A: Type t: typ A
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t = id t
A: Type t: typ A
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
A: Type b: base_typ
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) (ty_c b) = ty_c b
A: Type v: A
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) (ty_v v) = ty_v v
A: Type t1, t2: typ A IHt1: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) (t1 ⟹ t2) = t1 ⟹ t2
A: Type t: typ A IHt: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract)
(∀t) = ∀t
A: Type b: base_typ
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) (ty_c b) = ty_c b
A: Type b: base_typ
pure (ty_c b) = ty_c b
reflexivity.
A: Type v: A
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) (ty_v v) = ty_v v
A: Type v: A
ty_v v = ty_v v
reflexivity.
A: Type t1, t2: typ A IHt1: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) (t1 ⟹ t2) = t1 ⟹ t2
A: Type t1, t2: typ A IHt1: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
pure ty_ar
(mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1)
(mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2) = t1 ⟹ t2
A: Type t1, t2: typ A IHt1: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1
A: Type t1, t2: typ A IHt1: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
A: Type t1, t2: typ A IHt1: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
apply IHt2.
A: Type t: typ A IHt: mbinddt typ (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) (∀t) = ∀t
A: Type t: typ A IHt: mbinddt typ (funA : Type => A) (mret SystemF ◻ allK extract) t = t
pure ty_univ
(mbinddt typ (funA : Type => A)
((mret SystemF ◻ allK extract)
◻ allK (incr [ktyp])) t) = ∀t
A: Type t: typ A IHt: mbinddt typ (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt typ (funA : Type => A)
((mret SystemF ◻ allK extract) ◻ allK (incr [ktyp]))
t = t
A: Type t: typ A IHt: mbinddt typ (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt typ (funA : Type => A)
(mret SystemF ◻ (allK extract ◻ allK (incr [ktyp])))
t = t
A: Type t: typ A IHt: mbinddt typ (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt typ (funA : Type => A)
(mret SystemF ◻ (allK extract ◻ allK (incr [ktyp])))
t = t
A: Type t: typ A IHt: mbinddt typ (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK (extract ∘ incr [ktyp])) t = t
A: Type t: typ A IHt: mbinddt typ (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
assumption.Qed.
forallA : Type,
mbinddt term (funA0 : Type => A0)
(mret SystemF ◻ allK extract) = id
forallA : Type,
mbinddt term (funA0 : Type => A0)
(mret SystemF ◻ allK extract) = id
A: Type
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) = id
A: Type t: term A
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t = id t
A: Type t: term A
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
A: Type v: A
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (tm_var v) = tm_var v
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (λt ⋅ t0) = λt ⋅ t0
A: Type t1, t2: term A IHt1: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (t1 @ t2) = t1 @ t2
A: Type t: term A IHt: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract)
(Λ t) = Λ t
A: Type t: term A t0: typ A IHt: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract)
(t @@ t0) = t @@ t0
A: Type v: A
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (tm_var v) = tm_var v
A: Type v: A
tm_var v = tm_var v
reflexivity.
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (λt ⋅ t0) = λt ⋅ t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
pure tm_abs
(mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t)
(mbinddt term (funA : Type => A)
((mret SystemF ◻ allK extract)
◻ allK (incr [ktrm])) t0) = λt ⋅ t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt typ (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
((mret SystemF ◻ allK extract) ◻ allK (incr [ktrm]))
t0 = t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
((mret SystemF ◻ allK extract) ◻ allK (incr [ktrm]))
t0 = t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
((mret SystemF ◻ allK extract) ◻ allK (incr [ktrm]))
t0 = t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
(mret SystemF ◻ (allK extract ◻ allK (incr [ktrm])))
t0 = t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
(mret SystemF ◻ (allK extract ◻ allK (incr [ktrm])))
t0 = t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK (extract ∘ incr [ktrm])) t0 =
t0
A: Type t: typ A t0: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t0 = t0
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t0 = t0
assumption.
A: Type t1, t2: term A IHt1: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (t1 @ t2) = t1 @ t2
A: Type t1, t2: term A IHt1: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
pure tm_app
(mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1)
(mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2) = t1 @ t2
A: Type t1, t2: term A IHt1: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1
A: Type t1, t2: term A IHt1: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
A: Type t1, t2: term A IHt1: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1
apply IHt1.
A: Type t1, t2: term A IHt1: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t1 = t1 IHt2: mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t2 = t2
apply IHt2.
A: Type t: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (Λ t) = Λ t
A: Type t: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
pure tm_tab
(mbinddt term (funA : Type => A)
((mret SystemF ◻ allK extract)
◻ allK (incr [ktyp])) t) = Λ t
A: Type t: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
((mret SystemF ◻ allK extract) ◻ allK (incr [ktyp]))
t = t
A: Type t: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ (allK extract ◻ allK (incr [ktyp])))
t = t
A: Type t: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ (allK extract ◻ allK (incr [ktyp])))
t = t
A: Type t: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK (extract ∘ incr [ktyp])) t = t
A: Type t: term A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
assumption.
A: Type t: term A t0: typ A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) (t @@ t0) = t @@ t0
A: Type t: term A t0: typ A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
pure tm_tap
(mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t)
(bind_type (funA : Type => A)
(mret SystemF ◻ allK extract) t0) = t @@ t0
A: Type t: term A t0: typ A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
A: Type t: term A t0: typ A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
bind_type (funA : Type => A)
(mret SystemF ◻ allK extract) t0 = t0
A: Type t: term A t0: typ A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
mbinddt term (funA : Type => A)
(mret SystemF ◻ allK extract) t = t
apply IHt.
A: Type t: term A t0: typ A IHt: mbinddt term (funA : Type => A) (mret SystemF ◻ allK extract) t = t
bind_type (funA : Type => A)
(mret SystemF ◻ allK extract) t0 = t0
forall (FG : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (Map_G0 : Map G) (Pure_G0 : Pure G)
(Mult_G0 : Mult G),
Applicative G ->
forall (BC : Type)
(g : forallk : K, list K2 * B -> G (SystemF k C))
(A : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) ∘ mbinddt typ F f =
mbinddt typ (F ∘ G) (g ⋆dtm f)
forall (FG : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (Map_G0 : Map G) (Pure_G0 : Pure G)
(Mult_G0 : Mult G),
Applicative G ->
forall (BC : Type)
(g : forallk : K, list K2 * B -> G (SystemF k C))
(A : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) ∘ mbinddt typ F f =
mbinddt typ (F ∘ G) (g ⋆dtm f)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C: Type g: forallk : K, list K2 * B -> G (SystemF k C) A: Type f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) ∘ mbinddt typ F f =
mbinddt typ (F ∘ G) (g ⋆dtm f)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C: Type g: forallk : K, list K2 * B -> G (SystemF k C) A: Type f: forallk : K, list K2 * A -> F (SystemF k B) t: typ A
(map (mbinddt typ G g) ∘ mbinddt typ F f) t =
mbinddt typ (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C: Type g: forallk : K, list K2 * B -> G (SystemF k C) A: Type t: typ A
forallf : forallk : K, list K2 * A -> F (SystemF k B),
(map (mbinddt typ G g) ∘ mbinddt typ F f) t =
mbinddt typ (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A
forall
(g : forallk : K, list K2 * B -> G (SystemF k C))
(f : forallk : K, list K2 * A -> F (SystemF k B)),
(map (mbinddt typ G g) ∘ mbinddt typ F f) t =
mbinddt typ (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A
forall
(g : forallk : K, list K2 * B -> G (SystemF k C))
(f : forallk : K, list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type b: base_typ g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (ty_c b)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (ty_c b)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (ty_v v)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (ty_v v)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (t1 ⟹ t2)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (t1 ⟹ t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (∀t)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (∀t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type b: base_typ g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (ty_c b)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (ty_c b)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type b: base_typ g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (pure (ty_c b)) = pure (ty_c b)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type b: base_typ g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
pure (mbinddt typ G g (ty_c b)) = pure (ty_c b)
reflexivity.
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (ty_v v)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (ty_v v)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (f ktyp ([], v)) =
map
(MBind_type G Map_G0 Pure_G0 Mult_G0 B C
(g ◻ allK (incr []))) (f ktyp ([], v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (f ktyp ([], v)) =
map (mbinddt typ G (g ◻ allK (incr [])))
(f ktyp ([], v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (f ktyp (Ƶ : list K2, v)) =
map (mbinddt typ G (g ◻ allK (incr (Ƶ : list K2))))
(f ktyp (Ƶ : list K2, v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt (SystemF ktyp) G g)
(f ktyp (Ƶ : list K2, v)) =
map
(mbinddt (SystemF ktyp) G
(g ◻ allK (incr (Ƶ : list K2))))
(f ktyp (Ƶ : list K2, v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt (SystemF ktyp) G g) (f ktyp (Ƶ, v)) =
map
(mbinddt (SystemF ktyp) G
(funk : K => g k ∘ allK (incr Ƶ) k))
(f ktyp (Ƶ, v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt (SystemF ktyp) G g) (f ktyp (Ƶ, v)) =
map
(mbinddt (SystemF ktyp) G
(funk : K => g k ∘ allK (incr Ƶ) k))
(f ktyp (Ƶ, v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (t1 ⟹ t2)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (t1 ⟹ t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆> mbinddt typ (F ∘ G) (g ⋆dtm f) t1 <⋆>
mbinddt typ (F ∘ G) (g ⋆dtm f) t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆>
map (mbinddt typ G g) (mbinddt typ F f t1) <⋆>
mbinddt typ (F ∘ G) (g ⋆dtm f) t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆>
map (mbinddt typ G g) (mbinddt typ F f t1) <⋆>
map (mbinddt typ G g) (mbinddt typ F f t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
map (ap G)
(map (ap G) (pure ty_ar) <⋆>
map (mbinddt typ G g) (mbinddt typ F f t1)) <⋆>
map (mbinddt typ G g) (mbinddt typ F f t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
map (precompose (mbinddt typ G g))
(map (ap G)
(map (ap G) (pure ty_ar) <⋆>
map (mbinddt typ G g) (mbinddt typ F f t1))) <⋆>
mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
map (precompose (mbinddt typ G g))
(map (ap G)
(map (precompose (mbinddt typ G g))
(map (ap G) (pure ty_ar)) <⋆>
mbinddt typ F f t1)) <⋆> mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (compose (compose (mbinddt typ G g))) (pure ty_ar) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2 =
map (precompose (mbinddt typ G g))
(map (ap G)
(map (precompose (mbinddt typ G g))
(map (ap G) (pure ty_ar)) <⋆>
mbinddt typ F f t1)) <⋆> mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (compose (compose (mbinddt typ G g))) (pure ty_ar) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2 =
map (compose (precompose (mbinddt typ G g)))
(map (compose (ap G))
(map (precompose (mbinddt typ G g))
(map (ap G) (pure ty_ar)))) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt typ G g))) (pure ty_ar) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2 =
map (compose (precompose (mbinddt typ G g)))
(map (compose (ap G))
(map (precompose (mbinddt typ G g))
(map (ap G) (pure ty_ar)))) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt typ G g))) (pure ty_ar) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2 =
map
(compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt typ G g) ∘ ap G)))
(pure ty_ar) <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt typ G g))) (pure ty_ar) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2 =
map
(compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt typ G g) ∘ ap G)))
(pure (pure ty_ar)) <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (compose (mbinddt typ G g) ∘ ty_ar) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2 =
map
(compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt typ G g) ∘ ap G)))
(pure (pure ty_ar)) <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: typ A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t1) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t2) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (compose (mbinddt typ G g) ∘ ty_ar) <⋆>
mbinddt typ F f t1 <⋆> mbinddt typ F f t2 =
pure
((compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt typ G g) ∘ ap G)))
(pure ty_ar)) <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2
reflexivity.
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g) (mbinddt typ F f (∀t)) =
mbinddt typ (F ∘ G) (g ⋆dtm f) (∀t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
mbinddt typ (F ∘ G) (g ⋆dtm f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
mbinddt typ (F ∘ G)
((g ◻ allK (incr [ktyp]))
⋆dtm (f ◻ allK (incr [ktyp]))) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
map (mbinddt typ G (g ◻ allK (incr [ktyp])))
(mbinddt typ F (f ◻ allK (incr [ktyp])) t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
map (ap G) (pure ty_univ) <⋆>
map (mbinddt typ G (g ◻ allK (incr [ktyp])))
(mbinddt typ F (f ◻ allK (incr [ktyp])) t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
map
(precompose (mbinddt typ G (g ◻ allK (incr [ktyp]))))
(map (ap G) (pure ty_univ)) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
(map
(precompose
(mbinddt typ G (g ◻ allK (incr [ktyp]))))
∘ map (ap G)) (pure ty_univ) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
(map
(precompose
(mbinddt typ G (g ◻ allK (incr [ktyp]))))
∘ map (ap G)) (pure ty_univ) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
map
(precompose (mbinddt typ G (g ◻ allK (incr [ktyp])))
∘ ap G) (pure ty_univ) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
map
(precompose (mbinddt typ G (g ◻ allK (incr [ktyp])))
∘ ap G) (pure (pure ty_univ)) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt typ G g)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure
((precompose
(mbinddt typ G (g ◻ allK (incr [ktyp]))) ∘ ap G)
(pure ty_univ)) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (mbinddt typ G g)) (pure ty_univ) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t =
pure
((precompose
(mbinddt typ G (g ◻ allK (incr [ktyp]))) ∘ ap G)
(pure ty_univ)) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt typ G g) (mbinddt typ F f t) =
mbinddt typ (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (mbinddt typ G g ∘ ty_univ) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t =
pure
((precompose
(mbinddt typ G (g ◻ allK (incr [ktyp]))) ∘ ap G)
(pure ty_univ)) <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t
reflexivity.Qed.
forall (FG : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (Map_G0 : Map G) (Pure_G0 : Pure G)
(Mult_G0 : Mult G),
Applicative G ->
forall (BC : Type)
(g : forallk : K, list K2 * B -> G (SystemF k C))
(A : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) ∘ mbinddt term F f =
mbinddt term (F ∘ G) (g ⋆dtm f)
forall (FG : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (Map_G0 : Map G) (Pure_G0 : Pure G)
(Mult_G0 : Mult G),
Applicative G ->
forall (BC : Type)
(g : forallk : K, list K2 * B -> G (SystemF k C))
(A : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) ∘ mbinddt term F f =
mbinddt term (F ∘ G) (g ⋆dtm f)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C: Type g: forallk : K, list K2 * B -> G (SystemF k C) A: Type f: forallk : K, list K2 * A -> F (SystemF k B)
map (mbinddt term G g) ∘ mbinddt term F f =
mbinddt term (F ∘ G) (g ⋆dtm f)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C: Type g: forallk : K, list K2 * B -> G (SystemF k C) A: Type f: forallk : K, list K2 * A -> F (SystemF k B) t: term A
(map (mbinddt term G g) ∘ mbinddt term F f) t =
mbinddt term (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C: Type g: forallk : K, list K2 * B -> G (SystemF k C) A: Type t: term A
forallf : forallk : K, list K2 * A -> F (SystemF k B),
(map (mbinddt term G g) ∘ mbinddt term F f) t =
mbinddt term (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A
forall
(g : forallk : K, list K2 * B -> G (SystemF k C))
(f : forallk : K, list K2 * A -> F (SystemF k B)),
(map (mbinddt term G g) ∘ mbinddt term F f) t =
mbinddt term (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A
forall
(g : forallk : K, list K2 * B -> G (SystemF k C))
(f : forallk : K, list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (tm_var v)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (tm_var v)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (λt ⋅ t0)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (λt ⋅ t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (t1 @ t2)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (t1 @ t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (Λ t)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (Λ t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (t @@ t0)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (t @@ t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (tm_var v)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (tm_var v)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (f ktrm ([], v)) =
map
(MBind_term G Map_G0 Pure_G0 Mult_G0 B C
(g ◻ allK (incr []))) (f ktrm ([], v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (f ktrm ([], v)) =
map (mbinddt term G (g ◻ allK (incr [])))
(f ktrm ([], v))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
mbinddt term G g = mbinddt term G (g ◻ allK (incr []))
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type v: A g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
g = g ◻ allK (incr [])
now ext k [w a].
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (λt ⋅ t0)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (λt ⋅ t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> bind_type F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆> bind_type (F ∘ G) (g ⋆dtm f) t <⋆>
mbinddt term (F ∘ G) (g ⋆dtm f ◻ allK (incr [ktrm]))
t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆> mbinddt typ (F ∘ G) (g ⋆dtm f) t <⋆>
mbinddt term (F ∘ G) (g ⋆dtm f ◻ allK (incr [ktrm]))
t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆> mbinddt typ (F ∘ G) (g ⋆dtm f) t <⋆>
mbinddt term (F ∘ G)
((g ◻ allK (incr [ktrm]))
⋆dtm (f ◻ allK (incr [ktrm]))) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆> mbinddt typ (F ∘ G) (g ⋆dtm f) t <⋆>
map (mbinddt term G (g ◻ allK (incr [ktrm])))
(mbinddt term F (f ◻ allK (incr [ktrm])) t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
(map (mbinddt typ G g) ∘ mbinddt typ F f) t <⋆>
map (mbinddt term G (g ◻ allK (incr [ktrm])))
(mbinddt term F (f ◻ allK (incr [ktrm])) t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
(map (mbinddt typ G g) ∘ mbinddt typ F f) t <⋆>
map (mbinddt term G (g ◻ allK (incr [ktrm])))
(mbinddt term F (f ◻ allK (incr [ktrm])) t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
map (ap G)
(map (ap G) (pure tm_abs) <⋆>
(map (mbinddt typ G g) ∘ mbinddt typ F f) t) <⋆>
map (mbinddt term G (g ◻ allK (incr [ktrm])))
(mbinddt term F (f ◻ allK (incr [ktrm])) t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
map (ap G)
(map (ap G) (pure tm_abs) <⋆>
map (mbinddt typ G g) (mbinddt typ F f t)) <⋆>
map (mbinddt term G (g ◻ allK (incr [ktrm])))
(mbinddt term F (f ◻ allK (incr [ktrm])) t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
map
(precompose
(mbinddt term G (g ◻ allK (incr [ktrm]))))
(map (ap G)
(map (precompose (mbinddt typ G g))
(map (ap G) (pure tm_abs)) <⋆>
mbinddt typ F f t)) <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
map
(precompose
(mbinddt term G (g ◻ allK (incr [ktrm]))))
(map (ap G)
(map (precompose (mbinddt typ G g))
(map (ap G) (pure (pure tm_abs))) <⋆>
mbinddt typ F f t)) <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_abs <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
map
(precompose
(mbinddt term G (g ◻ allK (incr [ktrm]))))
(map (ap G)
(map (precompose (mbinddt typ G g))
(pure (ap G (pure tm_abs))) <⋆>
mbinddt typ F f t)) <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_abs) <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0 =
map
(compose
(precompose
(mbinddt term G (g ◻ allK (incr [ktrm])))))
(map (compose (ap G))
(map (precompose (mbinddt typ G g))
(pure (ap G (pure tm_abs))))) <⋆>
mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_abs) <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0 =
map
(compose
(precompose
(mbinddt term G (g ◻ allK (incr [ktrm])))))
((map (compose (ap G))
∘ map (precompose (mbinddt typ G g)))
(pure (ap G (pure tm_abs)))) <⋆>
mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_abs) <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0 =
map
(compose
(precompose
(mbinddt term G (g ◻ allK (incr [ktrm])))))
(map (compose (ap G) ∘ precompose (mbinddt typ G g))
(pure (ap G (pure tm_abs)))) <⋆>
mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: typ A t0: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t0) =
mbinddt term (F ∘ G) (g ⋆dtm f) t0 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (compose (mbinddt term G g) ∘ tm_abs) <⋆>
mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0 =
pure
(precompose
(mbinddt term G (g ◻ allK (incr [ktrm])))
∘ (compose (ap G) ∘ precompose (mbinddt typ G g))
(ap G (pure tm_abs))) <⋆> mbinddt typ F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0
reflexivity.
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (t1 @ t2)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (t1 @ t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆> mbinddt term (F ∘ G) (g ⋆dtm f) t1 <⋆>
mbinddt term (F ∘ G) (g ⋆dtm f) t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆>
map (mbinddt term G g) (mbinddt term F f t1) <⋆>
mbinddt term (F ∘ G) (g ⋆dtm f) t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆>
map (mbinddt term G g) (mbinddt term F f t1) <⋆>
map (mbinddt term G g) (mbinddt term F f t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
map (ap G)
(map (ap G) (pure tm_app) <⋆>
map (mbinddt term G g) (mbinddt term F f t1)) <⋆>
map (mbinddt term G g) (mbinddt term F f t2)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
map (precompose (mbinddt term G g))
(map (ap G)
(map (precompose (mbinddt term G g))
(map (ap G) (pure tm_app)) <⋆>
mbinddt term F f t1)) <⋆> mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
map (compose (precompose (mbinddt term G g)))
(map (compose (ap G))
(map (precompose (mbinddt term G g))
(map (ap G) (pure tm_app)))) <⋆>
mbinddt term F f t1 <⋆> mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
map (compose (precompose (mbinddt term G g)))
(map (compose (ap G))
((map (precompose (mbinddt term G g))
∘ map (ap G)) (pure tm_app))) <⋆>
mbinddt term F f t1 <⋆> mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
map (compose (precompose (mbinddt term G g)))
(map (compose (ap G))
(map (precompose (mbinddt term G g) ∘ ap G)
(pure tm_app))) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
map (compose (precompose (mbinddt term G g)))
((map (compose (ap G))
∘ map (precompose (mbinddt term G g) ∘ ap G))
(pure tm_app)) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
map (compose (precompose (mbinddt term G g)))
(map
(compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G))
(pure tm_app)) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
(map (compose (precompose (mbinddt term G g)))
∘ map
(compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
map
(compose (precompose (mbinddt term G g))
∘ (compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_app) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2 =
map
(compose (precompose (mbinddt term G g))
∘ (compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure (pure tm_app)) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t1, t2: term A IHt1: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t1) =
mbinddt term (F ∘ G) (g ⋆dtm f) t1 IHt2: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t2) =
mbinddt term (F ∘ G) (g ⋆dtm f) t2 g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (compose (mbinddt term G g) ∘ tm_app) <⋆>
mbinddt term F f t1 <⋆> mbinddt term F f t2 =
pure
((compose (precompose (mbinddt term G g))
∘ (compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure tm_app)) <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2
reflexivity.
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (Λ t)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (Λ t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
mbinddt term (F ∘ G) (g ⋆dtm f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
mbinddt term (F ∘ G)
((g ◻ allK (incr [ktyp]))
⋆dtm (f ◻ allK (incr [ktyp]))) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
map (mbinddt term G (g ◻ allK (incr [ktyp])))
(mbinddt term F (f ◻ allK (incr [ktyp])) t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
map (ap G) (pure tm_tab) <⋆>
map (mbinddt term G (g ◻ allK (incr [ktyp])))
(mbinddt term F (f ◻ allK (incr [ktyp])) t)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
map
(precompose
(mbinddt term G (g ◻ allK (incr [ktyp]))))
(map (ap G) (pure tm_tab)) <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (mbinddt term G g)) (pure tm_tab) <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t =
map
(precompose
(mbinddt term G (g ◻ allK (incr [ktyp]))))
(map (ap G) (pure tm_tab)) <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (mbinddt term G g)) (pure tm_tab) <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t =
map
(precompose
(mbinddt term G (g ◻ allK (incr [ktyp]))))
(map (ap G) (pure (pure tm_tab))) <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (mbinddt term G g ∘ tm_tab) <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t =
pure
(precompose
(mbinddt term G (g ◻ allK (incr [ktyp])))
(ap G (pure tm_tab))) <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t
reflexivity.
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g) (mbinddt term F f (t @@ t0)) =
mbinddt term (F ∘ G) (g ⋆dtm f) (t @@ t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
pure tm_tap <⋆> mbinddt term (F ∘ G) (g ⋆dtm f) t <⋆>
bind_type (F ∘ G) (g ⋆dtm f) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
pure tm_tap <⋆>
map (mbinddt term G g) (mbinddt term F f t) <⋆>
bind_type (F ∘ G) (g ⋆dtm f) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
pure tm_tap <⋆>
map (mbinddt term G g) (mbinddt term F f t) <⋆>
(map (mbinddt typ G g) ∘ mbinddt typ F f) t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
pure tm_tap <⋆>
map (mbinddt term G g) (mbinddt term F f t) <⋆>
map (mbinddt typ G g) (mbinddt typ F f t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
map (ap G)
(map (ap G) (pure tm_tap) <⋆>
map (mbinddt term G g) (mbinddt term F f t)) <⋆>
map (mbinddt typ G g) (mbinddt typ F f t0)
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
map (precompose (mbinddt typ G g))
(map (ap G)
(map (precompose (mbinddt term G g))
(map (ap G) (pure tm_tap)) <⋆>
mbinddt term F f t)) <⋆> mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (mbinddt term G g)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0) =
map (precompose (mbinddt typ G g))
(map (ap G)
(map (precompose (mbinddt term G g))
(map (ap G) (pure tm_tap)) <⋆>
mbinddt term F f t)) <⋆> mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
map (compose (precompose (mbinddt typ G g)))
(map (compose (ap G))
(map (precompose (mbinddt term G g))
(map (ap G) (pure tm_tap)))) <⋆>
mbinddt term F f t <⋆> mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
map (compose (precompose (mbinddt typ G g)))
(map (compose (ap G))
((map (precompose (mbinddt term G g))
∘ map (ap G)) (pure tm_tap))) <⋆>
mbinddt term F f t <⋆> mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
map (compose (precompose (mbinddt typ G g)))
(map (compose (ap G))
(map (precompose (mbinddt term G g) ∘ ap G)
(pure tm_tap))) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
map (compose (precompose (mbinddt typ G g)))
((map (compose (ap G))
∘ map (precompose (mbinddt term G g) ∘ ap G))
(pure tm_tap)) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
map (compose (precompose (mbinddt typ G g)))
(map
(compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G))
(pure tm_tap)) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
(map (compose (precompose (mbinddt typ G g)))
∘ map
(compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
map
(compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
map (compose (compose (mbinddt term G g)))
(pure tm_tap) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0 =
map
(compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure (pure tm_tap)) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (compose (mbinddt term G g) ∘ tm_tap) <⋆>
mbinddt term F f t <⋆> mbinddt typ F f t0 =
map
(compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure (pure tm_tap)) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
F, G: Type -> Type Map_G: Map F Pure_G: Pure F Mult_G: Mult F H: Applicative F Map_G0: Map G Pure_G0: Pure G Mult_G0: Mult G H0: Applicative G B, C, A: Type t: term A t0: typ A IHt: forall
(g : forallk : K,
list K2 * B -> G (SystemF k C))
(f : forallk : K,
list K2 * A -> F (SystemF k B)),
map (mbinddt term G g) (mbinddt term F f t) =
mbinddt term (F ∘ G) (g ⋆dtm f) t g: forallk : K, list K2 * B -> G (SystemF k C) f: forallk : K, list K2 * A -> F (SystemF k B) H1: Functor F
pure (compose (mbinddt term G g) ∘ tm_tap) <⋆>
mbinddt term F f t <⋆> mbinddt typ F f t0 =
pure
((compose (precompose (mbinddt typ G g))
∘ (compose (ap G)
∘ (precompose (mbinddt term G g) ∘ ap G)))
(pure tm_tap)) <⋆> mbinddt term F f t <⋆>
mbinddt typ F f t0
reflexivity.Qed.(** ** <<mbinddt_morphism>> *)(******************************************************************************)#[local] Set Keyed Unification.
forall (FG : Type -> Type) (H : Map F) (H0 : Mult F)
(H1 : Pure F) (H2 : Map G) (H3 : Mult G)
(H4 : Pure G) (ϕ : F ⇒ G),
ApplicativeMorphism F G ϕ ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
ϕ (typ B) ∘ mbinddt typ F f =
mbinddt typ G (funk : K => ϕ (SystemF k B) ∘ f k)
forall (FG : Type -> Type) (H : Map F) (H0 : Mult F)
(H1 : Pure F) (H2 : Map G) (H3 : Mult G)
(H4 : Pure G) (ϕ : F ⇒ G),
ApplicativeMorphism F G ϕ ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
ϕ (typ B) ∘ mbinddt typ F f =
mbinddt typ G (funk : K => ϕ (SystemF k B) ∘ f k)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) ∘ mbinddt typ F f =
mbinddt typ G (funk : K => ϕ (SystemF k B) ∘ f k)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type f: forallk : K, list K2 * A -> F (SystemF k B) t: typ A
(ϕ (typ B) ∘ mbinddt typ F f) t =
mbinddt typ G (funk : K => ϕ (SystemF k B) ∘ f k) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A
forallf : forallk : K, list K2 * A -> F (SystemF k B),
(ϕ (typ B) ∘ mbinddt typ F f) t =
mbinddt typ G (funk : K => ϕ (SystemF k B) ∘ f k) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A
forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type b: base_typ f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (ty_c b)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(ty_c b)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type v: A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (ty_v v)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(ty_v v)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t1) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t2) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (t1 ⟹ t2)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(t1 ⟹ t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A IHt: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (∀t)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(∀t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type b: base_typ f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (ty_c b)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(ty_c b)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type b: base_typ f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (pure (ty_c b)) = pure (ty_c b)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type b: base_typ f: forallk : K, list K2 * A -> F (SystemF k B)
pure (ty_c b) = pure (ty_c b)
reflexivity.
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type v: A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (ty_v v)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(ty_v v)
reflexivity.
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t1) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t2) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (t1 ⟹ t2)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(t1 ⟹ t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t1) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t2) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t1 <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t2
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t1) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t2) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t2
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t2) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t2
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t2) =
mbinddt typ G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_ar <⋆> mbinddt typ F f t1 <⋆>
mbinddt typ F f t2) =
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B -> typ B) (pure ty_ar <⋆> mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2) =
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B -> typ B -> typ B) (pure ty_ar) <⋆>
ϕ (typ B) (mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2) =
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2) =
pure ty_ar <⋆> ϕ (typ B) (mbinddt typ F f t1) <⋆>
ϕ (typ B) (mbinddt typ F f t2)
reflexivity.
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B) (mbinddt typ F f (∀t)) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k)
(∀t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
mbinddt typ G
((funk : K2 => ϕ (SystemF k B) ○ f k)
◻ allK (incr [ktyp])) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (typ B) (mbinddt typ F f t) =
mbinddt typ G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
ϕ (typ B)
(mbinddt typ F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B)
(pure ty_univ <⋆>
mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
ϕ (typ B)
(mbinddt typ F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B -> typ B) (pure ty_univ) <⋆>
ϕ (typ B) (mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
ϕ (typ B)
(mbinddt typ F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
pure ty_univ <⋆>
ϕ (typ B) (mbinddt typ F (f ◻ allK (incr [ktyp])) t) =
pure ty_univ <⋆>
ϕ (typ B)
(mbinddt typ F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
reflexivity.Qed.
forall (FG : Type -> Type) (H : Map F) (H0 : Mult F)
(H1 : Pure F) (H2 : Map G) (H3 : Mult G)
(H4 : Pure G) (ϕ : F ⇒ G),
ApplicativeMorphism F G ϕ ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
ϕ (term B) ∘ mbinddt term F f =
mbinddt term G (funk : K => ϕ (SystemF k B) ∘ f k)
forall (FG : Type -> Type) (H : Map F) (H0 : Mult F)
(H1 : Pure F) (H2 : Map G) (H3 : Mult G)
(H4 : Pure G) (ϕ : F ⇒ G),
ApplicativeMorphism F G ϕ ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
ϕ (term B) ∘ mbinddt term F f =
mbinddt term G (funk : K => ϕ (SystemF k B) ∘ f k)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) ∘ mbinddt term F f =
mbinddt term G (funk : K => ϕ (SystemF k B) ∘ f k)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type f: forallk : K, list K2 * A -> F (SystemF k B) t: term A
(ϕ (term B) ∘ mbinddt term F f) t =
mbinddt term G (funk : K => ϕ (SystemF k B) ∘ f k) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A
forallf : forallk : K, list K2 * A -> F (SystemF k B),
(ϕ (term B) ∘ mbinddt term F f) t =
mbinddt term G (funk : K => ϕ (SystemF k B) ∘ f k) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A
forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type v: A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (tm_var v)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(tm_var v)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t0) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t0 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (λt ⋅ t0)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(λt ⋅ t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t1) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t2) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (t1 @ t2)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(t1 @ t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A IHt: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (Λ t)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(Λ t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A IHt: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (t @@ t0)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(t @@ t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type v: A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (tm_var v)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(tm_var v)
reflexivity.
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t0) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t0 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (λt ⋅ t0)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(λt ⋅ t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t0) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t0 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_abs <⋆> bind_type F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
mbinddt term G
((funk : K2 => ϕ (SystemF k B) ○ f k)
◻ allK (incr [ktrm])) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t0) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t0 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_abs <⋆> bind_type F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktrm]) k) t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_abs <⋆> bind_type F f t <⋆>
mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktrm]) k) t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (typ B -> term B -> term B) (pure tm_abs) <⋆>
ϕ (typ B) (bind_type F f t) <⋆>
ϕ (term B)
(mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktrm]) k) t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_abs <⋆> ϕ (typ B) (bind_type F f t) <⋆>
ϕ (term B)
(mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktrm]) k) t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_abs <⋆> ϕ (typ B) (mbinddt typ F f t) <⋆>
ϕ (term B)
(mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktrm]) k) t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_abs <⋆> (ϕ (typ B) ∘ mbinddt typ F f) t <⋆>
ϕ (term B)
(mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktrm]) k) t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: typ A t0: term A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_abs <⋆>
mbinddt typ G (funk : K => ϕ (SystemF k B) ∘ f k) t <⋆>
ϕ (term B)
(mbinddt term F (f ◻ allK (incr [ktrm])) t0) =
pure tm_abs <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktrm]) k) t0)
reflexivity.
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t1) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t2) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (t1 @ t2)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(t1 @ t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t1) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t2) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆>
mbinddt term G (funk : K2 => ϕ (SystemF k B) ○ f k)
t1 <⋆>
mbinddt term G (funk : K2 => ϕ (SystemF k B) ○ f k)
t2
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A IHt1: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t1) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t1 IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t2) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
mbinddt term G (funk : K2 => ϕ (SystemF k B) ○ f k)
t2
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t2) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
mbinddt term G (funk : K2 => ϕ (SystemF k B) ○ f k)
t2
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A IHt2: forallf : forallk : K,
list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t2) =
mbinddt term G
(funk : K => ϕ (SystemF k B) ○ f k) t2 f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_app <⋆> mbinddt term F f t1 <⋆>
mbinddt term F f t2) =
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B -> term B)
(pure tm_app <⋆> mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2) =
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B -> term B -> term B) (pure tm_app) <⋆>
ϕ (term B) (mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2) =
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t1, t2: term A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2) =
pure tm_app <⋆> ϕ (term B) (mbinddt term F f t1) <⋆>
ϕ (term B) (mbinddt term F f t2)
reflexivity.
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (Λ t)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(Λ t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
mbinddt term G
((funk : K2 => ϕ (SystemF k B) ○ f k)
◻ allK (incr [ktyp])) t
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_tab <⋆>
mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B -> term B) (pure tm_tab) <⋆>
ϕ (term B) (mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_tab <⋆>
ϕ (term B) (mbinddt term F (f ◻ allK (incr [ktyp])) t) =
pure tm_tab <⋆>
ϕ (term B)
(mbinddt term F
(funk : K => f k ○ allK (incr [ktyp]) k) t)
reflexivity.
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B) (mbinddt term F f (t @@ t0)) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k)
(t @@ t0)
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
pure tm_tap <⋆>
mbinddt term G (funk : K2 => ϕ (SystemF k B) ○ f k) t <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A IHt: forallf : forallk : K, list K2 * A -> F (SystemF k B),
ϕ (term B) (mbinddt term F f t) =
mbinddt term G (funk : K => ϕ (SystemF k B) ○ f k) t f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B)
(pure tm_tap <⋆> mbinddt term F f t <⋆>
bind_type F f t0) =
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
ϕ (term B -> typ B -> term B) (pure tm_tap) <⋆>
ϕ (term B) (mbinddt term F f t) <⋆>
ϕ (typ B) (bind_type F f t0) =
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
ϕ (typ B) (bind_type F f t0) =
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
bind_type G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
ϕ (typ B) (mbinddt typ F f t0) =
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
(ϕ (typ B) ∘ mbinddt typ F f) t0 =
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
F, G: Type -> Type H: Map F H0: Mult F H1: Pure F H2: Map G H3: Mult G H4: Pure G ϕ: F ⇒ G H5: ApplicativeMorphism F G ϕ A, B: Type t: term A t0: typ A f: forallk : K, list K2 * A -> F (SystemF k B)
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
mbinddt typ G (funk : K => ϕ (SystemF k B) ∘ f k) t0 =
pure tm_tap <⋆> ϕ (term B) (mbinddt term F f t) <⋆>
mbinddt typ G (funk : K2 => ϕ (SystemF k B) ○ f k) t0
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt typ F f ∘ mret SystemF ktyp = f ktyp ∘ pair []
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt typ F f ∘ mret SystemF ktyp = f ktyp ∘ pair []
reflexivity.Qed.
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt term F f ∘ mret SystemF ktrm =
f ktrm ∘ pair []
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt term F f ∘ mret SystemF ktrm =
f ktrm ∘ pair []
reflexivity.Qed.
forall (k : K) (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk0 : K, list K2 * A -> F (SystemF k0 B)),
mbinddt (SystemF k) F f ∘ mret SystemF k =
f k ○ pair Ƶ
forall (k : K) (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk0 : K, list K2 * A -> F (SystemF k0 B)),
mbinddt (SystemF k) F f ∘ mret SystemF k =
f k ○ pair Ƶ
k: K
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt (SystemF k) F f ∘ mret SystemF k =
f k ○ pair Ƶ
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt (SystemF ktyp) F f ∘ mret SystemF ktyp =
f ktyp ○ pair Ƶ
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt (SystemF ktrm) F f ∘ mret SystemF ktrm =
f ktrm ○ pair Ƶ
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt (SystemF ktyp) F f ∘ mret SystemF ktyp =
f ktyp ○ pair Ƶ
apply mbinddt_comp_mret_typ.
forall (F : Type -> Type) (Map_G : Map F)
(Pure_G : Pure F) (Mult_G : Mult F),
Applicative F ->
forall (AB : Type)
(f : forallk : K, list K2 * A -> F (SystemF k B)),
mbinddt (SystemF ktrm) F f ∘ mret SystemF ktrm =
f ktrm ○ pair Ƶ
apply mbinddt_comp_mret_term.Qed.(** ** <<DTPreModule>> instances *)(******************************************************************************)#[export] InstanceDTP_typ: MultiDecoratedTraversablePreModule
(list K2) SystemF typ :=
{| dtp_mbinddt_mret := @mbinddt_mret_typ;
dtp_mbinddt_mbinddt := @mbinddt_mbinddt_typ;
dtp_mbinddt_morphism := @mbinddt_morphism_typ;
|}.#[export] InstanceDTP_term: MultiDecoratedTraversablePreModule
(list K2) SystemF term :=
{| dtp_mbinddt_mret := @mbinddt_mret_term;
dtp_mbinddt_mbinddt := @mbinddt_mbinddt_term;
dtp_mbinddt_morphism := @mbinddt_morphism_term;
|}.#[export] Instance: forallk, MultiDecoratedTraversablePreModule
(list K2) SystemF (SystemF k) :=
funk => match k with
| ktyp => DTP_typ
| ktrm => DTP_term
end.#[export] Instance: MultiDecoratedTraversableMonad (list K2) SystemF :=
{| dtm_mbinddt_comp_mret := mbinddt_comp_mret_F;
|}.(** * System F type system and operational rules *)(******************************************************************************)Reserved Notation"Δ ; Γ ⊢ t : τ" (at level90, t at level99).(** ** Contexts and well-formedness predicates *)(******************************************************************************)(** *** Context of type variables *)Definitionkind_ctx := alist unit.(** *** Context of term variables *)Definitiontype_ctx := alist (typ LN).(** *** Well-formedness for kinding contexts *)(** A kinding context is well-formed when its keys, i.e. type variables, are unique. *)Definitionok_kind_ctx : kind_ctx -> Prop := uniq.#[export] Hint Unfold ok_kind_ctx : tea_alist.(** *** Well-formedness of type expressions in a kinding context *)(** A type is well-formed in a kinding context <<Δ>> when all of its type variables appear in Δ and the type is locally closed. *)Definitionok_type : kind_ctx -> typ LN -> Prop :=
funΔτ => scoped typ ktyp τ (domset Δ) /\ LC typ ktyp τ.(** *** Well-formedness for typing contexts *)(** A typing context <<Γ>> is well-formed in kinding context <<Δ>> when the keys of <<Γ>> (i.e. term variables) are unique, and each associated type is itself well-formed in context <<Δ>>. *)Definitionok_type_ctx : kind_ctx -> type_ctx -> Prop :=
funΔΓ => uniq Γ /\ forallτ, τ ∈ range Γ -> ok_type Δ τ.(** *** Well-formedness of term expressions in context *)(** A term <<t>> is well-formed in contexts <<Δ>> and <<Γ>> when its type variables are declared in <<Δ>>, its term variables are declared in <<Γ>>, and it is locally closed with respect to both kinds of variables. *)Definitionok_term : kind_ctx -> type_ctx -> term LN -> Prop :=
funΔΓt => scoped term ktyp t (domset Δ) /\
scoped term ktrm t (domset Γ) /\
LC term ktrm t /\
LC term ktyp t.(** ** Typing judgments *)(******************************************************************************)Implicit Types (Δ : kind_ctx) (Γ : type_ctx) (τ : typ LN).InductiveJudgment : kind_ctx -> type_ctx -> term LN -> typ LN -> Prop :=
| j_var :
forallΔΓxτ,
ok_kind_ctx Δ ->
ok_type_ctx Δ Γ ->
(x, τ) ∈ (Γ : list (atom * typ LN)) ->
(Δ ; Γ ⊢ tm_var (Fr x) : τ)
| j_abs :
forallΔΓ (L:AtomSet.t) tτ1τ2,
(forallx, x `notin` L ->
Δ ; Γ ++ x ~ τ1 ⊢ open term ktrm (tm_var (Fr x)) t : τ2) ->
(Δ ; Γ ⊢ tm_abs τ1 t : ty_ar τ1 τ2)
| j_app :
forallΔΓt1t2τ1τ2,
(Δ ; Γ ⊢ t1 : ty_ar τ1 τ2) ->
(Δ ; Γ ⊢ t2 : τ1) ->
(Δ ; Γ ⊢ tm_app t1 t2 : τ2)
| j_univ :
forallΔΓLτt,
(forallx, x `notin` L ->
Δ ++ x ~ tt ; Γ ⊢ open term ktyp (ty_v (Fr x)) t
: open typ ktyp (ty_v (Fr x)) τ) ->
(Δ ; Γ ⊢ tm_tab t : ty_univ τ)
| j_inst :
forallΔΓtτ1τ2,
ok_type Δ τ1 ->
(Δ ; Γ ⊢ t : ty_univ τ2) ->
(Δ ; Γ ⊢ tm_tap t τ1 : open typ ktyp τ1 τ2)
where"Δ ; Γ ⊢ t : τ" := (Judgment Δ Γ t τ).(** ** Values and reduction rules *)(******************************************************************************)Inductivevalue : term LN -> Prop :=
| val_abs : forallTt, value (tm_abs T t)
| val_tab : forallt, value (tm_tab t).Inductivered : term LN -> term LN -> Prop :=
| red_app_l : forallt1t1't2,
red t1 t1' ->
red (tm_app t1 t2) (tm_app t1' t2)
| red_app_r : forallt1t2t2',
value t1 ->
red t2 t2' ->
red (tm_app t1 t2) (tm_app t1 t2')
| red_abs : forallTt1t2,
value t2 ->
red (tm_app (tm_abs T t1) t2) (open term ktrm t2 t1)
| red_tapl : foralltt'T,
red t t' ->
red (tm_tap t T) (tm_tap t' T)
| red_tab : forallTt,
red (tm_tap (tm_tab t) T) (open term ktyp T t).Definitionpreservation := foralltt'τ,
(nil ; nil ⊢ t : τ) ->
red t t' ->
(nil ; nil ⊢ t' : τ).Definitionprogress := foralltτ,
(nil ; nil ⊢ t : τ) ->
value t \/ existst', red t t'.