We reason about a translation between syntax with de Bruijn indices and locally nameless variables. This consists of a function which, given a locally closed term t, outputs a term of the same shape whose leaves are de Bruijn indices and a "key": some arbitrary permutation of the names of free variables in t. Another function accepts a key and a de Bruijn term and computes a locally nameless term of the same shape. The two functions are shown to be inverses.
Table of Contents :depth: 2
Since we are using the Kleisli typeclass hierarchy, we import modules under the namespaces Classes.Kleisli and Theory.Kleisli.
From Tealeaves Require Export Backends.LN Backends.DB.DB Backends.Adapters.Key Backends.Adapters.LNtoDB Backends.Adapters.DBtoLN Functors.Option Misc.PartialBijection. From Coq Require Import PeanoNat. Import LN.Notations. Import DecoratedTraversableMonad.UsefulInstances. #[local] Generalizable Variables W T U. #[local] Open Scope nat_scope. Section translate. Context `{Return_T: Return T} `{Binddt_TT: Binddt nat T T} `{Binddt_TU: Binddt nat T U} `{Monad_inst: ! DecoratedTraversableMonad nat T} `{Module_inst: ! DecoratedTraversableRightPreModule nat T U (unit := Monoid_unit_zero) (op := Monoid_op_plus)}. (** ** Basic supporting lemmas *) (********************************************************************)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (e n : nat), LC t -> (e, Bd n) ∈d t -> bound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (e n : nat), LC t -> (e, Bd n) ∈d t -> bound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: LC t
Hin: (e, Bd n) ∈d tbound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: LC t
Hin: (e, Bd n) ∈d tbound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: forall (w : nat) (l : LN), (w, l) ∈d t -> lc_loc 0 (w, l)
Hin: (e, Bd n) ∈d tbound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: lc_loc 0 (e, Bd n)
Hin: (e, Bd n) ∈d tbound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: n < e + 0
Hin: (e, Bd n) ∈d tbound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: n < e
Hin: (e, Bd n) ∈d tbound n eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
n: nat
HLC: n < 0
Hin: (0, Bd n) ∈d tbound n 0T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: n < S e
Hin: (S e, Bd n) ∈d tbound n (S e)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: n < S e
Hin: (S e, Bd n) ∈d tbound n (S e)lia. Qed.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
HLC: n < S e
Hin: (S e, Bd n) ∈d tn < S e + 0T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (e n : nat), LC t -> (e, Bd n) ∈d t -> bound_b n e = trueT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (e n : nat), LC t -> (e, Bd n) ∈d t -> bound_b n e = trueT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
H: LC t
H0: (e, Bd n) ∈d tbound_b n e = trueT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
H: LC t
H0: (e, Bd n) ∈d tbound n e -> bound_b n e = trueT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
H: LC t
H0: (e, Bd n) ∈d tbound n e -> n < elia. Qed.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
e, n: nat
H: LC t
H0: (e, Bd n) ∈d tn < e + 0 -> n < eT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall n depth : nat, ~ bound (n + depth) depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall n depth : nat, ~ bound (n + depth) depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n, depth: nat~ bound (n + depth) depthlia. Qed.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n, depth: nat~ n + depth < depth + 0T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall n depth : nat, bound_b (n + depth) depth = falseT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall n depth : nat, bound_b (n + depth) depth = falseT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n, depth: natbound_b (n + depth) depth = falselia. Qed.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n, depth: nat~ n + depth < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (n : nat) (a : atom) (k : key), a ∈ k -> exists ix : nat, toDB_loc k (n, Fr a) = Some ixT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (n : nat) (a : atom) (k : key), a ∈ k -> exists ix : nat, toDB_loc k (n, Fr a) = Some ixT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n: nat
a: atom
k: key
H: a ∈ kexists ix : nat, toDB_loc k (n, Fr a) = Some ixT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n: nat
a: atom
k: key
H: a ∈ kexists ix : nat, map (fun ix0 : nat => ix0 + n) (getIndex k a) = Some ixT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n: nat
a: atom
k: key
H, H_in: a ∈ k
n0: nat
H_key_lookup: getIndex k a = Some n0exists ix : nat, map (fun ix0 : nat => ix0 + n) (getIndex k a) = Some ixT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n: nat
a: atom
k: key
H, H_in: a ∈ k
n0: nat
H_key_lookup: getIndex k a = Some n0exists ix : nat, map (fun ix0 : nat => ix0 + n) (Some n0) = Some ixreflexivity. Qed. (** ** Totality *) (********************************************************************) (** Given a locally closed locally nameless term and a key with enough atoms, <<toDB>> is guaranteed to return something. *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
n: nat
a: atom
k: key
H, H_in: a ∈ k
n0: nat
H_key_lookup: getIndex k a = Some n0map (fun ix : nat => ix + n) (Some n0) = Some ?ixT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key), LC t -> scoped_key k t -> exists t' : U nat, toDB k t = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key), LC t -> scoped_key k t -> exists t' : U nat, toDB k t = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: LC t
Hin: scoped_key k texists t' : U nat, toDB k t = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: LC t
Hin: scoped_key k texists t' : U nat, mapdt (toDB_loc k) t = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: LC t
Hin: scoped_key k texists t' : U nat, (runBatch (toDB_loc k) ∘ toBatch3) t = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: LC t
Hin: scoped_key k texists t' : U nat, runBatch (toDB_loc k) (toBatch3 t) = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: LC t
Hin: forall x : atom, x ∈ free t -> x ∈ kexists t' : U nat, runBatch (toDB_loc k) (toBatch3 t) = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: LC t
Hin: forall x : atom, tosubset (free t) x -> tosubset k xexists t' : U nat, runBatch (toDB_loc k) (toBatch3 t) = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: Forall_ctx (lc_loc 0) t
Hin: forall x : atom, tosubset (free t) x -> tosubset k xexists t' : U nat, runBatch (toDB_loc k) (toBatch3 t) = Some t'(* the proof breaks here because can't rewrite under the binders. *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: Forall_ctx (lc_loc 0) t
Hin: forall x : atom, (runBatch ret ∘ toBatch) (free t) x -> (runBatch ret ∘ toBatch) k xexists t' : U nat, runBatch (toDB_loc k) (toBatch3 t) = Some t'(* try rewrite (toctxset_through_runBatch2) in HLC. rewrite toBatch_to_toBatch3 in Hin. unfold compose in Hin. induction (toBatch3 t). - cbv. eauto. - rewrite runBatch_rw2. assert (H: (forall x: atom, @runBatch LN nat (@const Type Type (LN -> Prop)) (@Map_const (LN -> Prop)) (@Mult_const (LN -> Prop) (@Monoid_op_subset LN)) (@Pure_const (LN -> Prop) (@Monoid_unit_subset LN)) (@ret subset Return_subset LN) (nat -> C) (@mapfst_Batch nat (nat -> C) (nat * LN) LN (@extract (prod nat) (Extract_reader nat) LN) b) (Fr x) -> x ∈ k)). { intros x. specialize (Hin x). intros hyp. apply Hin. left. assumption. } specialize (IHb H). destruct IHb as [f Hfeq]. rewrite Hfeq. destruct a as [depth l]. destruct l. + pose toDB_Fr. specialize (e depth n k). enough (H_a_in_k: n ∈ k). { specialize (e H_a_in_k). destruct e as [ix Hixeq]. rewrite Hixeq. cbn. eauto. } apply Hin. cbn. right. reflexivity. + (* Proof missing due to technical difficulties above *) *) Abort.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
HLC: Forall_ctx (lc_loc 0) t
Hin: forall x : atom, (runBatch ret ∘ toBatch) (free t) x -> (runBatch ret ∘ toBatch) k xexists t' : U nat, runBatch (toDB_loc k) (toBatch3 t) = Some t'T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (A B : Type) (t : T A) (f : nat * A -> option B), (exists (n : nat) (a : A), (n, a) ∈d t /\ f (n, a) = None) -> mapdt f t = NoneT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (A B : Type) (t : T A) (f : nat * A -> option B), (exists (n : nat) (a : A), (n, a) ∈d t /\ f (n, a) = None) -> mapdt f t = NoneT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
A, B: Type
t: T A
f: nat * A -> option B
H: exists (n : nat) (a : A), (n, a) ∈d t /\ f (n, a) = Nonemapdt f t = NoneAbort.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
A, B: Type
t: T A
f: nat * A -> option B
H: exists (n : nat) (a : A), (n, a) ∈d t /\ f (n, a) = None(runBatch (map ret ∘ f) ∘ toBatch7) t = NoneT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key), (exists x : atom, Fr x ∈ t /\ ~ x ∈ k) -> toDB k t = NoneT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key), (exists x : atom, Fr x ∈ t /\ ~ x ∈ k) -> toDB k t = NoneT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: exists x : atom, Fr x ∈ t /\ ~ x ∈ ktoDB k t = NoneAbort. (** ** Roundtrip from LN *) (********************************************************************) (** A helper lemma used below *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: exists x : atom, Fr x ∈ t /\ ~ x ∈ ktoDB k t = NoneT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (k : list atom) (depth : nat) (x : atom), x ∈ k -> map (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (k : list atom) (depth : nat) (x : atom), x ∈ k -> map (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H: x ∈ kmap (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H, H_in: x ∈ k
n: nat
H_key_lookup: getIndex k x = Some nmap (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H, H_in: x ∈ k
n: nat
H_key_lookup: getIndex k x = Some nmap (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (Some n) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H, H_in: x ∈ k
n: nat
H_key_lookup: getIndex k x = Some nSome ((toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) n) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H, H_in: x ∈ k
n: nat
H_key_lookup: getIndex k x = Some nSome (if bound_b (n + depth) depth == true then Some (Bd (n + depth)) else map Fr (getName k (n + depth - depth))) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H, H_in: x ∈ k
n: nat
H_key_lookup: getIndex k x = Some nSome (if false == true then Some (Bd (n + depth)) else map Fr (getName k (n + depth - depth))) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H, H_in: x ∈ k
n: nat
H_key_lookup: getIndex k x = Some nSome (if false == true then Some (Bd (n + depth)) else map Fr (getName k n)) = Some (Some (Fr x))reflexivity. Qed. (** Starting with a locally closed term and a big enough key, the roundtrip is locally the identity function *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
depth: nat
x: atom
H, H_in: x ∈ k
n: nat
H_key_lookup: getIndex k x = Some nSome (if false == true then Some (Bd (n + depth)) else map Fr (Some x)) = Some (Some (Fr x))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key) (depth : nat) (l : LN), LC t -> scoped_key k t -> (depth, l) ∈d t -> (toLN_loc k ⋆3 toDB_loc k) (depth, l) = pure lT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key) (depth : nat) (l : LN), LC t -> scoped_key k t -> (depth, l) ∈d t -> (toLN_loc k ⋆3 toDB_loc k) (depth, l) = pure lT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
l: LN
Hlc: LC t
Hwhole: scoped_key k t
Hin: (depth, l) ∈d t(toLN_loc k ⋆3 toDB_loc k) (depth, l) = pure lT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
l: LN
Hlc: LC t
Hwhole: scoped_key k t
Hin: (depth, l) ∈d tmap (toLN_loc k ∘ pair depth) (toDB_loc k (depth, l)) = pure lT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
l: LN
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, l) ∈d tmap (toLN_loc k ∘ pair depth) (toDB_loc k (depth, l)) = pure lT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Fr x) ∈d tmap (toLN_loc k ∘ pair depth) (toDB_loc k (depth, Fr x)) = pure (Fr x)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tmap (toLN_loc k ∘ pair depth) (toDB_loc k (depth, Bd n)) = pure (Bd n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Fr x) ∈d tmap (toLN_loc k ∘ pair depth) (toDB_loc k (depth, Fr x)) = pure (Fr x)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Fr x) ∈d tmap (toLN_loc k ∘ pair depth) (map (fun ix : nat => ix + depth) (getIndex k x)) = pure (Fr x)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Fr x) ∈d t(map (toLN_loc k ∘ pair depth) ∘ map (fun ix : nat => ix + depth)) (getIndex k x) = pure (Fr x)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Fr x) ∈d tmap (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = pure (Fr x)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: Fr x ∈ tmap (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = pure (Fr x)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: x ∈ free tmap (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = pure (Fr x)now apply LN_DB_roundtrip_loc_helper1.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth: nat
x: atom
Hlc: LC t
Hwhole: x ∈ kmap (toLN_loc k ∘ pair depth ∘ (fun ix : nat => ix + depth)) (getIndex k x) = pure (Fr x)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tmap (toLN_loc k ∘ pair depth) (toDB_loc k (depth, Bd n)) = pure (Bd n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tmap (toLN_loc k ∘ pair depth) (Some n) = pure (Bd n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tSome ((toLN_loc k ∘ pair depth) n) = pure (Bd n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tSome (toLN_loc k (depth, n)) = pure (Bd n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tSome (if bound_b n depth == true then Some (Bd n) else map Fr (getName k (n - depth))) = pure (Bd n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: LC t
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: forall (w : nat) (l : LN), (w, l) ∈d t -> lc_loc 0 (w, l)
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: lc_loc 0 (depth, Bd n)
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthlia. Qed. (** Starting with a locally closed term and a big enough key, the roundtrip is locally the identity function *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
depth, n: nat
Hlc: n < depth + 0
Hwhole: forall x : atom, x ∈ free t -> x ∈ k
Hin: (depth, Bd n) ∈d tn < depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key), scoped_key k t -> LC t -> map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U LN) (k : key), scoped_key k t -> LC t -> map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC tmap (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC tmap (mapdt (toLN_loc k)) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC tmap (mapdt (toLN_loc k)) (mapdt (toDB_loc k) t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC t(map (mapdt (toLN_loc k)) ∘ mapdt (toDB_loc k)) t = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC tmapdt (toLN_loc k ⋆3 toDB_loc k) t = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC tmapdt (toLN_loc k ⋆3 toDB_loc k) t = pure tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC tforall (e : nat) (a : LN), (e, a) ∈d t -> (toLN_loc k ⋆3 toDB_loc k) (e, a) = pure arewrite (LN_DB_roundtrip_loc t); auto. Qed. (** ** Roundtrip from DB *) (********************************************************************) (** A helper lemma used below *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U LN
k: key
H: scoped_key k t
H0: LC t
e: nat
a: LN
H1: (e, a) ∈d t(toLN_loc k ⋆3 toDB_loc k) (e, a) = pure aT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U nat) (k : list atom) (gap : nat), gap <> 0 -> forall depth n : nat, unique k -> n < depth + gap -> resolves_gap gap k -> bound_b n depth = false -> (depth, n) ∈d t -> map (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U nat) (k : list atom) (gap : nat), gap <> 0 -> forall depth n : nat, unique k -> n < depth + gap -> resolves_gap gap k -> bound_b n depth = false -> (depth, n) ∈d t -> map (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: resolves_gap gap k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d tmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: resolves_gap gap k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d tmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: contains_ix_upto (gap - 1) k \/ gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d tmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: contains_ix_upto (gap - 1) k \/ gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d tn >= depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: contains_ix_upto (gap - 1) k \/ gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: contains_ix_upto (gap - 1) k \/ gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d tn >= depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: contains_ix_upto (gap - 1) k \/ gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d tn >= depthlia.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: contains_ix_upto (gap - 1) k \/ gap = 0
Hbound: depth + 0 <= n
Helt: (depth, n) ∈d tn >= depthT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: contains_ix_upto (gap - 1) k \/ gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
GapZero: gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
o: option atom
Heqo: o = getName k (n - depth)map (toDB_loc k ∘ pair depth) (map Fr o) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
o: option atom
Heqo: getName k (n - depth) = omap (toDB_loc k ∘ pair depth) (map Fr o) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getName k (n - depth) = Some n0map (toDB_loc k ∘ pair depth) (map Fr (Some n0)) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
Heqo: getName k (n - depth) = Nonemap (toDB_loc k ∘ pair depth) (map Fr None) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getName k (n - depth) = Some n0map (toDB_loc k ∘ pair depth) (map Fr (Some n0)) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getName k (n - depth) = Some n0Some (map (fun ix : nat => ix + depth) (getIndex k n0)) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getIndex k n0 = Some (n - depth)Some (map (fun ix : nat => ix + depth) (getIndex k n0)) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getIndex k n0 = Some (n - depth)Some (map (fun ix : nat => ix + depth) (Some (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getIndex k n0 = Some (n - depth)Some (Some (n - depth + depth)) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getIndex k n0 = Some (n - depth)Some (n - depth + depth) = Some nlia.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
n0: atom
Heqo: getIndex k n0 = Some (n - depth)n - depth + depth = nT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
Heqo: getName k (n - depth) = Nonemap (toDB_loc k ∘ pair depth) (map Fr None) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
Heqo: getName k (n - depth) = Nonemap (toDB_loc k ∘ pair depth) (map Fr None) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
Heqo: getName k (n - depth) = NoneNone = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
Heqo: getName k (n - depth) = NoneFalseT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: contains_ix_upto (gap - 1) k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
Heqo: ~ contains_ix_upto (n - depth) kFalselia. }T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Okay: gap - 1 < length k
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depth
Heqo: ~ n - depth < length kFalseT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
GapZero: gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap: nat
Hnz: gap <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
GapZero: gap = 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)false. } Qed. (** A helper lemma used below *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
Hnz: 0 <> 0
depth, n: nat
Huniq: unique k
Hclosed: n < depth + 0
Hbound: bound_b n depth = false
Helt: (depth, n) ∈d t
H: n >= depthmap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U nat) (k : list atom) (gap depth n : nat), unique k -> cl_at gap t -> resolves_gap gap k -> (depth, n) ∈d t -> (toDB_loc k ⋆3 toLN_loc k) (depth, n) = pure nT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (t : U nat) (k : list atom) (gap depth n : nat), unique k -> cl_at gap t -> resolves_gap gap k -> (depth, n) ∈d t -> (toDB_loc k ⋆3 toLN_loc k) (depth, n) = pure nT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t(toDB_loc k ⋆3 toLN_loc k) (depth, n) = pure nT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t(toDB_loc k ⋆3 toLN_loc k) (depth, n) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d tmap (toDB_loc k ∘ pair depth) (toLN_loc k (depth, n)) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d tmap (toDB_loc k ∘ pair depth) (if bound_b n depth == true then Some (Bd n) else map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n >= depth
Hbound: bound_b n depth = falsemap (toDB_loc k ∘ pair depth) (if false == true then Some (Bd n) else map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n < depth
Hbound: bound_b n depth = truemap (toDB_loc k ∘ pair depth) (if true == true then Some (Bd n) else map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n >= depth
Hbound: bound_b n depth = falsemap (toDB_loc k ∘ pair depth) (if false == true then Some (Bd n) else map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n >= depth
Hbound: bound_b n depth = falsemap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: forall d n : nat, (d, n) ∈d t -> cl_at_loc gap (d, n)
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n >= depth
Hbound: bound_b n depth = falsemap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at_loc gap (depth, n)
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n >= depth
Hbound: bound_b n depth = falsemap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n >= depth
Hbound: bound_b n depth = falsemap (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)apply (DB_LN_roundtrip_loc_helper1 t k gap); eauto.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: n < depth + gap
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n >= depth
Hbound: bound_b n depth = false
H: gap <> 0map (toDB_loc k ∘ pair depth) (map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n < depth
Hbound: bound_b n depth = truemap (toDB_loc k ∘ pair depth) (if true == true then Some (Bd n) else map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n < depth
Hbound: bound_b n depth = truemap (toDB_loc k ∘ pair depth) (if true == true then Some (Bd n) else map Fr (getName k (n - depth))) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (depth, n) ∈d t
Hord: n < depth
Hbound: bound_b n depth = trueSome (if match depth with | 0 => false | S m' => n <=? m' end then Some n else None) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (0, n) ∈d t
Hord: n < 0
Hbound: bound_b n 0 = trueSome None = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (S depth, n) ∈d t
Hord: n < S depth
Hbound: bound_b n (S depth) = trueSome (if n <=? depth then Some n else None) = Some (Some n)false.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (0, n) ∈d t
Hord: n < 0
Hbound: bound_b n 0 = trueSome None = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (S depth, n) ∈d t
Hord: n < S depth
Hbound: bound_b n (S depth) = trueSome (if n <=? depth then Some n else None) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (S depth, n) ∈d t
Hord: n < S depth
Hbound: bound_b n (S depth) = true
Hle: n <= depthSome (if n <=? depth then Some n else None) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (S depth, n) ∈d t
Hord: n < S depth
Hbound: bound_b n (S depth) = true
Hle: (n <=? depth) = trueSome (if n <=? depth then Some n else None) = Some (Some n)reflexivity. } Qed. (** Starting with a term with no more than <<gap>>-level free variables, if the key has at least <<gap>> many unique names, the roundtrip of a de Bruijn index is locally the identity function. *)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
t: U nat
k: list atom
gap, depth, n: nat
Huniq: unique k
Hclosed: cl_at gap t
Hcont: resolves_gap gap k
Helt: (S depth, n) ∈d t
Hord: n < S depth
Hbound: bound_b n (S depth) = true
Hle: (n <=? depth) = trueSome (Some n) = Some (Some n)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (k : list atom) (gap : nat) (t : U nat), unique k -> cl_at gap t -> resolves_gap gap k -> map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (k : list atom) (gap : nat) (t : U nat), unique k -> cl_at gap t -> resolves_gap gap k -> map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap kmap (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap kmap (toDB k) (mapdt (toLN_loc k) t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap kmap (mapdt (toDB_loc k)) (mapdt (toLN_loc k) t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap k(map (mapdt (toDB_loc k)) ∘ mapdt (toLN_loc k)) t = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap kmapdt (toDB_loc k ⋆3 toLN_loc k) t = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap kmapdt (toDB_loc k ⋆3 toLN_loc k) t = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap kmapdt (toDB_loc k ⋆3 toLN_loc k) t = pure tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap kforall e a : nat, (e, a) ∈d t -> (toDB_loc k ⋆3 toLN_loc k) (e, a) = pure anow rewrite (DB_LN_roundtrip_loc t k gap). Qed.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
gap: nat
t: U nat
H: unique k
H0: cl_at gap t
H1: resolves_gap gap k
e, a: nat
H2: (e, a) ∈d t(toDB_loc k ⋆3 toLN_loc k) (e, a) = pure aT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall k : list atom, unique k -> forall (t : U LN) (u : U nat), toDB k t = Some u <-> toLN k u = Some tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall k : list atom, unique k -> forall (t : U LN) (u : U nat), toDB k t = Some u <-> toLN k u = Some tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
u: U nattoDB k t = Some u <-> toLN k u = Some tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
u: U nat(forall b : U nat, toLN k b = None \/ map (toDB k) (toLN k b) = Some (Some b)) /\ (forall a : U LN, toDB k a = None \/ map (toLN k) (toDB k a) = Some (Some a))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k(forall b : U nat, toLN k b = None \/ map (toDB k) (toLN k b) = Some (Some b)) /\ (forall a : U LN, toDB k a = None \/ map (toLN k) (toDB k a) = Some (Some a))T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nattoLN k t = None \/ map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LNtoDB k t = None \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nattoLN k t = None \/ map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat~ cl_at (length k) t \/ map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) t~ cl_at (length k) t \/ map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Not_Hclosedat: ~ cl_at (length k) t~ cl_at (length k) t \/ map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tmap (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Not_Hclosedat: ~ cl_at (length k) t~ cl_at (length k) t \/ map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tunique kT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tcl_at (length k) tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tresolves_gap (length k) kT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Not_Hclosedat: ~ cl_at (length k) t~ cl_at (length k) t \/ map (toDB k) (toLN k t) = Some (Some t)assumption.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tunique kassumption.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tcl_at (length k) tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tresolves_gap (length k) klia.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Hclosedat: cl_at (length k) tlength k <= length know left.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U nat
Not_Hclosedat: ~ cl_at (length k) t~ cl_at (length k) t \/ map (toDB k) (toLN k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LNtoDB k t = None \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: ~ scoped_key k t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t
H1: LC t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t
H1: ~ LC t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t
H1: LC t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)apply LN_DB_roundtrip; assumption.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t
H1: LC tmap (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t
H1: ~ LC t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t
H1: ~ LC t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)now right. }T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: scoped_key k t
H1: ~ LC t~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: ~ scoped_key k t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: ~ scoped_key k t(~ scoped_key k t \/ ~ LC t) \/ map (toLN k) (toDB k t) = Some (Some t)now left. } Qed.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: list atom
H: unique k
t: U LN
H0: ~ scoped_key k t~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (k : key) (t : U LN), ~ (scoped_key k t /\ LC t) <-> ~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall (k : key) (t : U LN), ~ (scoped_key k t /\ LC t) <-> ~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN~ (scoped_key k t /\ LC t) <-> ~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN~ (scoped_key k t /\ LC t) -> ~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN~ scoped_key k t \/ ~ LC t -> ~ (scoped_key k t /\ LC t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN~ (scoped_key k t /\ LC t) -> ~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN
H: ~ (scoped_key k t /\ LC t)~ scoped_key k t \/ ~ LC tT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN
H: ~ (scoped_key k t /\ LC t)Decidable.decidable (scoped_key k t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN
H: ~ (scoped_key k t /\ LC t)~ (scoped_key k t /\ LC t)assumption.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN
H: ~ (scoped_key k t /\ LC t)~ (scoped_key k t /\ LC t)tauto. Qed.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
t: U LN~ scoped_key k t \/ ~ LC t -> ~ (scoped_key k t /\ LC t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall k : key, unique k -> PartialBijectionSpec (U LN) (U nat) (fun t : U LN => (forall x : atom, x ∈ free t -> x ∈ k) /\ LC t) (fun t : U nat => level t <= length k) (toDB k) (toLN k)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T Uforall k : key, unique k -> PartialBijectionSpec (U LN) (U nat) (fun t : U LN => (forall x : atom, x ∈ free t -> x ∈ k) /\ LC t) (fun t : U nat => level t <= length k) (toDB k) (toLN k)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique kPartialBijectionSpec (U LN) (U nat) (fun t : U LN => (forall x : atom, x ∈ free t -> x ∈ k) /\ LC t) (fun t : U nat => level t <= length k) (toDB k) (toLN k)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique kforall (a : U LN) (b : U nat), toDB k a = Some b <-> toLN k b = Some aT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique kforall a : U LN, toDB k a = None <-> ~ ((forall x : atom, x ∈ free a -> x ∈ k) /\ LC a)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique kforall b : U nat, toLN k b = None <-> ~ level b <= length kT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique kforall (a : U LN) (b : U nat), toDB k a = Some b <-> toLN k b = Some aT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
a: U LN
b: U nattoDB k a = Some b <-> toLN k b = Some aassumption.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
a: U LN
b: U natunique kT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique kforall a : U LN, toDB k a = None <-> ~ ((forall x : atom, x ∈ free a -> x ∈ k) /\ LC a)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
t: U LNtoDB k t = None <-> ~ ((forall x : atom, x ∈ free t -> x ∈ k) /\ LC t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
t: U LN~ scoped_key k t \/ ~ LC t <-> ~ ((forall x : atom, x ∈ free t -> x ∈ k) /\ LC t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
t: U LN~ (scoped_key k t /\ LC t) <-> ~ ((forall x : atom, x ∈ free t -> x ∈ k) /\ LC t)reflexivity.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
t: U LN~ ((forall x : atom, x ∈ free t -> x ∈ k) /\ LC t) <-> ~ ((forall x : atom, x ∈ free t -> x ∈ k) /\ LC t)T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique kforall b : U nat, toLN k b = None <-> ~ level b <= length kT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
t: U nattoLN k t = None <-> ~ level t <= length kT: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
t: U nat~ cl_at (length k) t <-> ~ level t <= length kreflexivity. Qed. End translate.T: Type -> Type
Return_T: Return T
Binddt_TT: Binddt nat T T
U: Type -> Type
Binddt_TU: Binddt nat T U
Monad_inst: DecoratedTraversableMonad nat T
Module_inst: DecoratedTraversableRightPreModule nat T U
k: key
H: unique k
t: U nat~ level t <= length k <-> ~ level t <= length k