We want to prove adequacy by unicity of solutions to the set of equations defining the composition. To do so, we rely on the notion of guarded iteration introduced in ITree/Guarded.v. Through this file, we prove that the composition is indeed eventually guarded. As described in §6.3, the proof relies crucially on the eval_app_not_var assumption (Def 6.21).
We consider a language abstractly captured as a machine satisfying an appropriate axiomatization.
Context `{CC : context T C} {CL : context_laws T C}. Context {val} {VM : subst_monoid val} {VML : subst_monoid_laws val}. Context {conf} {CM : subst_module val conf} {CML : subst_module_laws val conf}. Context {obs : obs_struct T C} {M : machine val conf obs}. Context {ML : machine_laws val conf obs} {VV : var_assumptions val}. Notation ogs_ctx := (ogs_ctx (C:=C)).
A central elements in the proof lies in ensuring that there exists a unique solution to compo_body. Since the composition of strategies is defined as such a solution, adequacy can be established by proving that evaluating and observing the substituted term is also a solution of compo_body.
By iter_evg_uniq, we know that eventually guarded equations admit a unique fixed point: we hence start by proving this eventual guardedness, captured in lemma compo_body_guarded.
This proof will among other be using an induction on the age of a variable, ie it's height in the OGS position Φ. We provide this definition and utilities.
Equations var_height Φ p {x} : ↓[p]Φ ∋ x -> nat := var_height ∅ₓ Pas i with c_view_emp i := { | ! } ; var_height ∅ₓ Act i with c_view_emp i := { | ! } ; var_height (Φ ▶ₓ Γ) Pas i := var_height Φ Act i ; var_height (Φ ▶ₓ Γ) Act i with c_view_cat i := { | Vcat_l j := var_height Φ Pas j ; | Vcat_r j := 1 + c_length Φ } . #[global] Arguments var_height {Φ p x} i.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ogs_ctx
p: polarity
x: T
i: ↓[ p] Φ ∋ x0 < var_height iT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ogs_ctx
p: polarity
x: T
i: ↓[ p] Φ ∋ x0 < var_height iT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
i: ↓⁻ (Φ ▶ₓ Γ) ∋ x
H: 0 < var_height i0 < var_height iT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: 0 < var_height j
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Heqcall: var_height j = var_height (r_cat_l j)0 < var_height (r_cat_l j)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: Γ ∋ x
Heq: c_view_cat (r_cat_r j) = Vcat_r j
Heqcall: 1 + c_length Φ = var_height (r_cat_r j)0 < var_height (r_cat_r j)apply H.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
i: ↓⁻ (Φ ▶ₓ Γ) ∋ x
H: 0 < var_height i0 < var_height irewrite <- Heqcall; apply H.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: 0 < var_height j
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Heqcall: var_height j = var_height (r_cat_l j)0 < var_height (r_cat_l j)rewrite <- Heqcall; apply Nat.lt_0_succ. Qed. Equations lt_bound : polarity -> relation nat := lt_bound Act := lt ; lt_bound Pas := le .T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: Γ ∋ x
Heq: c_view_cat (r_cat_r j) = Vcat_r j
Heqcall: 1 + c_length Φ = var_height (r_cat_r j)0 < var_height (r_cat_r j)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ogs_ctx
p: polarity
x: T
i: ↓[ p] Φ ∋ xlt_bound p (var_height i) (1 + c_length Φ)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ogs_ctx
p: polarity
x: T
i: ↓[ p] Φ ∋ xlt_bound p (var_height i) (1 + c_length Φ)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
i: ↓⁻ (Φ ▶ₓ Γ) ∋ x
H: lt_bound Act (var_height i) (1 + c_length Φ)(var_height i <= S (S (c_length Φ)))%natT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: lt_bound Pas (var_height j) (1 + c_length Φ)
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Heqcall: var_height j = var_height (r_cat_l j)var_height_clause_4 (@var_height) Φ Γ x (r_cat_l j) (c_view_cat (r_cat_l j)) < S (S (c_length Φ))T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: Γ ∋ x
Heq: c_view_cat (r_cat_r j) = Vcat_r j
Heqcall: 1 + c_length Φ = var_height (r_cat_r j)var_height_clause_4 (@var_height) Φ Γ x (r_cat_r j) (c_view_cat (r_cat_r j)) < S (S (c_length Φ))now apply Nat.lt_succ_r, Nat.le_le_succ_r, Nat.le_le_succ_r.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
i: ↓⁻ (Φ ▶ₓ Γ) ∋ x
H: lt_bound Act (var_height i) (1 + c_length Φ)(var_height i <= S (S (c_length Φ)))%natrewrite Heq; now apply Nat.lt_succ_r.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: lt_bound Pas (var_height j) (1 + c_length Φ)
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Heqcall: var_height j = var_height (r_cat_l j)var_height_clause_4 (@var_height) Φ Γ x (r_cat_l j) (c_view_cat (r_cat_l j)) < S (S (c_length Φ))rewrite Heq; apply Nat.lt_succ_diag_r. Qed. Equations var_height' {Δ Φ p x} : Δ +▶ ↓[p]Φ ∋ x -> nat := var_height' i with c_view_cat i := { | Vcat_l j := O ; | Vcat_r j := var_height j } .T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: Γ ∋ x
Heq: c_view_cat (r_cat_r j) = Vcat_r j
Heqcall: 1 + c_length Φ = var_height (r_cat_r j)var_height_clause_4 (@var_height) Φ Γ x (r_cat_r j) (c_view_cat (r_cat_r j)) < S (S (c_length Φ))
This is the main theorem about height: if we lookup a variable in an OGS environment and obtain another variable, then this new variable is strictly lower than the first one.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
H: is_var (ₐ↓ v x j)var_height' (is_var_get H) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
H: is_var (ₐ↓ v x j)var_height' (is_var_get H) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
H: is_var (lookup v j ᵥ⊛ᵣ [r_cat_l, r_ctx_dom j ᵣ⊛ r_cat_r])var_height' (is_var_get H) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
H: is_var (lookup v j)var_height' (is_var_get (ren_is_var [r_cat_l, r_ctx_dom j ᵣ⊛ r_cat_r] H)) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
H: is_var (lookup v j)var_height' match c_view_cat (is_var_get H) with | Vcat_l i => r_cat_l i | Vcat_r j0 => r_cat_r (r_ctx_dom j x j0) end < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
v0: val (Δ +▶ ctx_dom j) x
Heqv0: v0 = lookup v j
H: is_var v0var_height' match c_view_cat (is_var_get H) with | Vcat_l i => r_cat_l i | Vcat_r j0 => r_cat_r (r_ctx_dom j x j0) end < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
i: Δ ∋ x
Heqv0: a_id (r_cat_l i) = lookup v jvar_height' (r_cat_l i) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
j0: ctx_dom j ∋ x
Heqv0: a_id (r_cat_r j0) = lookup v jvar_height' (r_cat_r (r_ctx_dom j x j0)) < var_height junfold var_height'; rewrite c_view_cat_simpl_l; apply var_height_pos.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
i: Δ ∋ x
Heqv0: a_id (r_cat_l i) = lookup v jvar_height' (r_cat_l i) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
j0: ctx_dom j ∋ x
Heqv0: a_id (r_cat_r j0) = lookup v jvar_height' (r_cat_r (r_ctx_dom j x j0)) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
j0: ctx_dom j ∋ x
Heqv0: a_id (r_cat_r j0) = lookup v jvar_height (r_ctx_dom j x j0) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
p: polarity
v: ogs_env Δ p Φ
x: T
j: ↓[ p ^] Φ ∋ x
j0: ctx_dom j ∋ x
Heqv0: a_id (r_cat_r j0) = lookup v j
a: ctx_dom j ⊆ ↓[ p] Φ
Heqa: a = r_ctx_dom jvar_height (a x j0) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
i: ↓[ Act ^] (Φ ▶ₓ Γ) ∋ x
H: forall (Δ : C) (v : ogs_env Δ Pas Φ) (j0 : ctx_dom i ∋ x), a_id (r_cat_r j0) = lookup v i -> forall a : ctx_dom i ⊆ ↓⁻ Φ, a = r_ctx_dom i -> var_height (a x j0) < var_height i
Δ: C
v: ogs_env Δ Act (Φ ▶ₓ Γ)
j0: ctx_dom i ∋ x
Heqv0: a_id (r_cat_r j0) = lookup v ivar_height (r_ctx_dom i x j0) < var_height iT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: forall (Δ : C) (v : ogs_env Δ Act Φ) (j0 : ctx_dom j ∋ x), a_id (r_cat_r j0) = lookup v j -> forall a : ctx_dom j ⊆ ↓⁺ Φ, a = r_ctx_dom j -> var_height (a x j0) < var_height j
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Δ: C
v: ogs_env Δ Pas (Φ ▶ₓ Γ)
j1: ctx_dom (r_cat_l j) ∋ x
Heqv0: a_id (r_cat_r j1) = lookup v (r_cat_l j)var_height (r_ctx_dom (r_cat_l j) x j1) < var_height (r_cat_l j)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: Γ ∋ x
Heq: c_view_cat (r_cat_r j) = Vcat_r j
Δ: C
v: ogs_env Δ Pas (Φ ▶ₓ Γ)
j1: ctx_dom (r_cat_r j) ∋ x
Heqv0: a_id (r_cat_r j1) = lookup v (r_cat_r j)var_height (r_ctx_dom (r_cat_r j) x j1) < var_height (r_cat_r j)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
i: ↓[ Act ^] (Φ ▶ₓ Γ) ∋ x
H: forall (Δ : C) (v : ogs_env Δ Pas Φ) (j0 : ctx_dom i ∋ x), a_id (r_cat_r j0) = lookup v i -> forall a : ctx_dom i ⊆ ↓⁻ Φ, a = r_ctx_dom i -> var_height (a x j0) < var_height i
Δ: C
v: ogs_env Δ Act (Φ ▶ₓ Γ)
j0: ctx_dom i ∋ x
Heqv0: a_id (r_cat_r j0) = lookup v ivar_height (r_ctx_dom i x j0) < var_height idependent destruction v; now apply (H _ v).T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
i: ↓[ Act ^] (Φ ▶ₓ Γ) ∋ x
H: forall (Δ : C) (v : ogs_env Δ Pas Φ) (j0 : ctx_dom i ∋ x), a_id (r_cat_r j0) = lookup v i -> forall a : ctx_dom i ⊆ ↓⁻ Φ, a = r_ctx_dom i -> var_height (a x j0) < var_height i
Δ: C
v: ogs_env Δ Act (Φ ▶ₓ Γ)
j0: ctx_dom i ∋ x
Heqv0: a_id (r_cat_r j0) = lookup v ivar_height (r_ctx_dom i x j0) < var_height iT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: forall (Δ : C) (v : ogs_env Δ Act Φ) (j0 : ctx_dom j ∋ x), a_id (r_cat_r j0) = lookup v j -> forall a : ctx_dom j ⊆ ↓⁺ Φ, a = r_ctx_dom j -> var_height (a x j0) < var_height j
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Δ: C
v: ogs_env Δ Pas (Φ ▶ₓ Γ)
j1: ctx_dom (r_cat_l j) ∋ x
Heqv0: a_id (r_cat_r j1) = lookup v (r_cat_l j)var_height (r_ctx_dom (r_cat_l j) x j1) < var_height (r_cat_l j)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: forall (Δ : C) (v : ogs_env Δ Act Φ) (j0 : ctx_dom j ∋ x), a_id (r_cat_r j0) = lookup v j -> forall a : ctx_dom j ⊆ ↓⁺ Φ, a = r_ctx_dom j -> var_height (a x j0) < var_height j
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Δ: C
v: ogs_env Δ Act Φ
a: Γ =[ val ]> (Δ +▶ ↓⁺ Φ)
j1: ctx_dom (r_cat_l j) ∋ x
Heqv0: a_id (r_cat_r j1) = lookup (v;⁻ a) (r_cat_l j)var_height (r_ctx_dom (r_cat_l j) x j1) < var_height (r_cat_l j)now apply (H _ v).T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: (fix join_pol (p : polarity) (o : ogs_ctx) {struct o} : C := match p with | Act => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ c0 => join_pol Pas c +▶ c0 end | Pas => fun o0 : ogs_ctx => match o0 with | ∅ₓ => ∅ | c ▶ₓ _ => join_pol Act c end end o) Pas Φ ∋ x
H: forall (Δ : C) (v : ogs_env Δ Act Φ) (j0 : ctx_dom j ∋ x), a_id (r_cat_r j0) = lookup v j -> forall a : ctx_dom j ⊆ ↓⁺ Φ, a = r_ctx_dom j -> var_height (a x j0) < var_height j
Heq: c_view_cat (r_cat_l j) = Vcat_l j
Δ: C
v: ogs_env Δ Act Φ
a: Γ =[ val ]> (Δ +▶ ↓⁺ Φ)
j1: ctx_dom j ∋ x
Heqv: a_id (r_cat_r j1) = lookup v jvar_height (r_ctx_dom j x j1) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: Γ ∋ x
Heq: c_view_cat (r_cat_r j) = Vcat_r j
Δ: C
v: ogs_env Δ Pas (Φ ▶ₓ Γ)
j1: ctx_dom (r_cat_r j) ∋ x
Heqv0: a_id (r_cat_r j1) = lookup v (r_cat_r j)var_height (r_ctx_dom (r_cat_r j) x j1) < var_height (r_cat_r j)revert j1; cbn; rewrite Heq; exact var_height_bound. Qed.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Φ: ctx C
Γ: C
x: T
j: Γ ∋ x
Heq: c_view_cat (r_cat_r j) = Vcat_r j
Δ: C
v: ogs_env Δ Act Φ
a: Γ =[ val ]> (Δ +▶ ↓⁺ Φ)
j1: ctx_dom (r_cat_r j) ∋ xvar_height (r_ctx_dom (r_cat_r j) x j1) < var_height (r_cat_r j)
We are now ready to prove eventual guardedness. In fact the main lemma will have a slightly different statement, considering a particular kind of pair of OGS states: the ones we obtain when restarting after an interaction. As the statement is quite long we factor it in a definition first.
Definition compo_body_guarded_aux_stmt {Δ Φ} (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) {x} (o : obs x) (γ : dom o =[val]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x) : Prop := ev_guarded (fun 'T1_0 => compo_body) (compo_body (RedT (MS ((ₐ↓v _ j ᵥ⊛ᵣ r_cat3_1) ⊙ o⦗r_cat_rr ᵣ⊛ a_id⦘) (v ;⁺)) (u ;⁻ γ))) .
Now the main proof.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
x: T
o: obs x
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ xcompo_body_guarded_aux_stmt u v o γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
x: T
o: obs x
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ xcompo_body_guarded_aux_stmt u v o γ j
First we setup an induction on the accessibility of the current observation in the relation given by the "no-infinite redex" property.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs xforall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), compo_body_guarded_aux_stmt u v o γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
o':= x,' o: {x : T & obs x}forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 o') =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 o'), compo_body_guarded_aux_stmt u v (projT2 o') γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
o: {x : T & obs x}forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 o) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 o), compo_body_guarded_aux_stmt u v (projT2 o) γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: {x : T & obs x}
H: forall y : {x : T & obs x}, head_inst_nostep y x -> Acc head_inst_nostep y
H0: forall y : {x : T & obs x}, head_inst_nostep y x -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ jforall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 x) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 x), compo_body_guarded_aux_stmt u v (projT2 x) γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
H: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> Acc head_inst_nostep y
H0: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ jforall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), compo_body_guarded_aux_stmt u v o γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ xcompo_body_guarded_aux_stmt u v o γ j
Next we setup an induction on the height of the current variable we have restarted on.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
n: nat
Heqn: n = var_height j
h:= lt_wf n: Acc lt ncompo_body_guarded_aux_stmt u v o γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
x0: nat
H: forall y : nat, y < x0 -> Acc lt y
H0: forall y : nat, y < x0 -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ jforall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), x0 = var_height j -> compo_body_guarded_aux_stmt u v o γ jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height jcompo_body_guarded_aux_stmt u v o γ j
Then we case split on whether ₐ↓ v x j is a variable or not.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height jev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := ₐ↓ v x j ᵥ⊛ᵣ r_cat3_1 ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) xev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := vv ᵥ⊛ᵣ r_cat3_1 ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
i: is_var vvev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := vv ᵥ⊛ᵣ r_cat3_1 ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)ev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := vv ᵥ⊛ᵣ r_cat3_1 ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})
Case 1: it is a variable.
First, some shenenigans to extract the variable.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
i: is_var vvev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := vv ᵥ⊛ᵣ r_cat3_1 ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)ev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := a_id (is_var_get i) ᵥ⊛ᵣ r_cat3_1 ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)ev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := a_id (r_cat3_1 x (is_var_get i)) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe (eval (a_id (r_cat3_1 x (is_var_get i)) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)) with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) end
Next, we are evaluating a normal form, so we know by hypothesis eval_nf_ret that it will reduce to the same normal form. We need some trickery to rewrite by this bisimilarity.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)
Heval: eval (emb (r_cat3_1 x (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈)) ≋ ret_delay (r_cat3_1 x (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈)ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe (eval (a_id (r_cat3_1 x (is_var_get i)) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)) with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)
Heval: it_eq_map ∅ₑ (fun _ : T1 => nf_eq) (it_eq (fun _ : T1 => nf_eq)) T1_0 (eval (emb (r_cat3_1 x (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈))) (ret_delay (r_cat3_1 x (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈))ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe (eval (a_id (r_cat3_1 x (is_var_get i)) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)) with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)
Heval: it_eq_map ∅ₑ (fun _ : T1 => nf_eq) (it_eq (fun _ : T1 => nf_eq)) T1_0 (eval (a_id (r_cat3_1 x (is_var_get i)) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)) (ret_delay (r_cat3_1 x (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈))ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe (eval (a_id (r_cat3_1 x (is_var_get i)) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)) with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heval: it_eq_map ∅ₑ (fun _ : T1 => nf_eq) (it_eq (fun _ : T1 => nf_eq)) T1_0 tt (ret_delay (r_cat3_1 x (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈))ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe tt with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
i: is_var (ₐ↓ v x j)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqttn: ttn = r_cat3_1 x (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈
Heval: it_eq_map ∅ₑ (fun _ : T1 => nf_eq) (it_eq (fun _ : T1 => nf_eq)) T1_0 tt (ret_delay ttn)ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe tt with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x0: T
o: obs x0
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x0,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x0), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x0
Heqn: n = var_height j
i: is_var (ₐ↓ v x0 j)
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqttn: ttn = r_cat3_1 x0 (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈
r1: nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o))
r_rel: nf_eq r1 ttn
x: RetF r1 = observe ttev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe tt with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x0: T
o: obs x0
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x0,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x0), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x0
Heqn: n = var_height j
i: is_var (ₐ↓ v x0 j)
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o))
r1: nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o))
r_rel: nf_eq r1 (r_cat3_1 x0 (is_var_get i) ⋅ o ⦇ r_cat_rr ᵣ⊛ a_id ⦈)
x: RetF r1 = observe ttev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe tt with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
i: is_var (ₐ↓ v t j)
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_id
x: RetF (r_cat3_1 t (is_var_get i) ⋅ o0 ⦇ a1 ⦈) = observe ttev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe tt with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t0 => TauF (fmap_delay (m_strat_wrap (v;⁺)) t0) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t0 => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o0) & m_strat_pas Δ (Φ ▶ₓ dom o0 ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t0) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o0) & m_strat_pas Δ (Φ ▶ₓ dom o0 ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
i: is_var (ₐ↓ v t j)
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match m_strat_wrap (v;⁺) (r_cat3_1 t (is_var_get i) ⋅ o0 ⦇ a1 ⦈) with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
i: is_var (ₐ↓ v t j)
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat match c_view_cat (is_var_get i) with | Vcat_l i => r_cat_l i | Vcat_r j => r_cat_r (r_cat_l j) end with | Vcat_l i => inl (i ⋅ o0) | Vcat_r j0 => inr ((j0 ⋅ o0),' ((v;⁺);⁻ nf_args (match c_view_cat (is_var_get i) with | Vcat_l i => r_cat_l i | Vcat_r j => r_cat_r (r_cat_l j) end ⋅ o0 ⦇ a1 ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
vv: val (Δ +▶ ↓⁻ Φ) t
Heqvv: vv = ₐ↓ v t j
i: is_var vv
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat match c_view_cat (is_var_get i) with | Vcat_l i => r_cat_l i | Vcat_r j => r_cat_r (r_cat_l j) end with | Vcat_l i => inl (i ⋅ o0) | Vcat_r j => inr ((j ⋅ o0),' ((v;⁺);⁻ nf_args (match c_view_cat (is_var_get i) with | Vcat_l i => r_cat_l i | Vcat_r j0 => r_cat_r (r_cat_l j0) end ⋅ o0 ⦇ a1 ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)
Now, we case split to see whether this variable was a final variable or one given by the opponent.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
i: Δ ∋ t
Heqvv: a_id (r_cat_l i) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat (r_cat_l i) with | Vcat_l i => inl (i ⋅ o0) | Vcat_r j => inr ((j ⋅ o0),' ((v;⁺);⁻ nf_args (r_cat_l i ⋅ o0 ⦇ a1 ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat (r_cat_r (r_cat_l j0)) with | Vcat_l i => inl (i ⋅ o0) | Vcat_r j => inr ((j ⋅ o0),' ((v;⁺);⁻ nf_args (r_cat_r (r_cat_l j0) ⋅ o0 ⦇ a1 ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)
In case of a final variable the composition is ended, hence guarded, hence eventually guarded.
rewrite c_view_cat_simpl_l; now do 2 econstructor.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
i: Δ ∋ t
Heqvv: a_id (r_cat_l i) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat (r_cat_l i) with | Vcat_l i => inl (i ⋅ o0) | Vcat_r j => inr ((j ⋅ o0),' ((v;⁺);⁻ nf_args (r_cat_l i ⋅ o0 ⦇ a1 ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)
In the other case, there is an interaction. Since we have looked-up a variable and obtained another variable, we know it is strictly older and use our induction hypothesis on the height of the current variable.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat (r_cat_r (r_cat_l j0)) with | Vcat_l i => inl (i ⋅ o0) | Vcat_r j => inr ((j ⋅ o0),' ((v;⁺);⁻ nf_args (r_cat_r (r_cat_l j0) ⋅ o0 ⦇ a1 ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF (inl {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ dom o0; red_act := m_strat_resp (u;⁻ γ) (r_cat_l j0 ⋅ o0); red_pas := (v;⁺);⁻ nf_args (r_cat_r (r_cat_l j0) ⋅ o0 ⦇ a1 ⦈) |}))T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (_observe (compo_body {| red_ctx := Φ ▶ₓ dom o0 ▶ₓ dom o0; red_act := m_strat_resp (u;⁻ γ) (r_cat_l j0 ⋅ o0); red_pas := (v;⁺);⁻ nf_args (r_cat_r (r_cat_l j0) ⋅ o0 ⦇ a1 ⦈) |}))T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
Heqn: n = var_height j
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idvar_height (m_var (r_cat_l j0 ⋅ o0)) < nT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
tt: delay (nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o0)))
ttn: (c_var ∥ₛ obs # val) (Δ +▶ (↓⁻ Φ +▶ dom o0))
a1: dom o0 =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o0))
a: a1 ≡ₐ r_cat_rr ᵣ⊛ a_idvar_height (r_cat_l j0) < var_height j
There is some trickery to apply height_decrease.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t jvar_height (r_cat_l j0) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t jis_var (ₐ↓ v t j)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
i: is_var (ₐ↓ v t j)var_height (r_cat_l j0) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t jis_var (a_id (r_cat_r j0))T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
i: is_var (ₐ↓ v t j)var_height (r_cat_l j0) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
i: is_var (ₐ↓ v t j)var_height (r_cat_l j0) < var_height jT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = ₐ↓ v t j
i: is_var (ₐ↓ v t j)var_height (r_cat_l j0) < S (var_height' (is_var_get i))T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
i: Δ +▶ ↓⁻ Φ ∋ t
Heqvv: a_id (r_cat_r j0) = a_id ivar_height_clause_4 (@var_height) Φ (dom o0) t (r_cat_l j0) (c_view_cat (r_cat_l j0)) < S (var_height' i)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
i: Δ +▶ ↓⁻ Φ ∋ t
Heqvv: r_cat_r j0 = ivar_height_clause_4 (@var_height) Φ (dom o0) t (r_cat_l j0) (c_view_cat (r_cat_l j0)) < S (var_height' i)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
i: Δ +▶ ↓⁻ Φ ∋ t
Heqvv: r_cat_r j0 = ivar_height_clause_4 (@var_height) Φ (dom o0) t (r_cat_l j0) (c_view_cat (r_cat_l j0)) < S (var_height'_clause_1 Δ Φ Pas t (r_cat_r j0) (c_view_cat (r_cat_r j0)))now apply Nat.lt_succ_diag_r.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
t: T
o0: obs t
IHred: forall y : {x : T & obs x}, head_inst_nostep y (t,' o0) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ t), y = var_height j -> compo_body_guarded_aux_stmt u v o0 γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o0 =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ t
j0: ↓⁻ Φ ∋ t
i: Δ +▶ ↓⁻ Φ ∋ t
Heqvv: r_cat_r j0 = ivar_height j0 < S (var_height j0)
Case 2: the looked-up value is not a variable. In this case we look at one step of the evaluation. If there is a redex we are happy. Else, our resumed configuration was still a normal form and we can exhibit a proof of the bad instanciation relation, which enables us to call our other induction hypothesis.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)ev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Φ ▶ₓ dom o; red_act := {| ms_conf := vv ᵥ⊛ᵣ r_cat3_1 ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘; ms_env := v;⁺ |}; red_pas := u;⁻ γ |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe (eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)) with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe tt with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
ot: itree' ∅ₑ (fun _ : T1 => nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o))) T1_0
Heqot: ot = _observe ttev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match ot with | RetF r => RetF (m_strat_wrap (v;⁺) r) | TauF t => TauF (fmap_delay (m_strat_wrap (v;⁺)) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap (v;⁺)) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ (↓⁻ Φ +▶ dom o) & m_strat_pas Δ (Φ ▶ₓ dom o ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp (u;⁻ γ) (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
r: nf obs val (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqot: RetF r = _observe ttev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match m_strat_wrap (v;⁺) r with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
nx: T
ni: Δ +▶ (↓⁻ Φ +▶ dom o) ∋ nx
no: obs nx
narg: dom no =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqot: RetF (ni ⋅ no ⦇ narg ⦈) = _observe ttev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat ni with | Vcat_l i => inl (i ⋅ no) | Vcat_r j => inr ((j ⋅ no),' ((v;⁺);⁻ nf_args (ni ⋅ no ⦇ narg ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 e); red_act := m_strat_resp (u;⁻ γ) (projT1 e); red_pas := projT2 e |} end)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
nx: T
no: obs nx
narg: dom no =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o))
j0: ↓⁻ Φ +▶ dom o ∋ nx
Heqot: RetF (r_cat_r j0 ⋅ no ⦇ narg ⦈) = _observe ttev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF (inl {| red_ctx := Φ ▶ₓ dom o ▶ₓ m_dom (projT1 ((j0 ⋅ no),' ((v;⁺);⁻ nf_args (r_cat_r j0 ⋅ no ⦇ narg ⦈)))); red_act := m_strat_resp (u;⁻ γ) (projT1 ((j0 ⋅ no),' ((v;⁺);⁻ nf_args (r_cat_r j0 ⋅ no ⦇ narg ⦈)))); red_pas := projT2 ((j0 ⋅ no),' ((v;⁺);⁻ nf_args (r_cat_r j0 ⋅ no ⦇ narg ⦈))) |}))T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
nx: T
no: obs nx
narg: dom no =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o))
j0: ↓⁻ Φ +▶ dom o ∋ nx
Heqot: RetF (r_cat_r j0 ⋅ no ⦇ narg ⦈) = _observe tthead_inst_nostep (nx,' no) (x,' o)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
nx: T
no: obs nx
narg: dom no =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o))
j0: ↓⁻ Φ +▶ dom o ∋ nx
Heqot: RetF (r_cat_r j0 ⋅ no ⦇ narg ⦈) = _observe ttevalₒ ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘) ≊ ret_delay (r_cat_r j0 ⋅ projT2 (nx,' no))T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
nx: T
no: obs nx
narg: dom no =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o))
j0: ↓⁻ Φ +▶ dom o ∋ nx
Heqot: RetF (r_cat_r j0 ⋅ no ⦇ narg ⦈) = _observe ttit_eqF ∅ₑ (eqᵢ (fun _ : T1 => obs ∙ (Δ +▶ (↓⁻ Φ +▶ dom o)))) (it_eq (eqᵢ (fun _ : T1 => obs ∙ (Δ +▶ (↓⁻ Φ +▶ dom o))))) T1_0 match _observe (eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)) with | RetF r => RetF r | TauF t => TauF (then_to_obs t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => nf_to_obs (Δ +▶ (↓⁻ Φ +▶ dom o))) <$> k r) end (RetF (r_cat_r j0 ⋅ no))now econstructor. Qed.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
x: T
o: obs x
IHred: forall y : {x : T & obs x}, head_inst_nostep y (x,' o) -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom (projT2 y) =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ projT1 y), compo_body_guarded_aux_stmt u v (projT2 y) γ j
n: nat
IHvar: forall y : nat, y < n -> forall (Φ : ogs_ctx) (u : ogs_env Δ Act Φ) (v : ogs_env Δ Pas Φ) (γ : dom o =[ val ]> (Δ +▶ ↓⁺ Φ)) (j : ↓⁺ Φ ∋ x), y = var_height j -> compo_body_guarded_aux_stmt u v o γ j
Φ: ogs_ctx
u: ogs_env Δ Act Φ
v: ogs_env Δ Pas Φ
γ: dom o =[ val ]> (Δ +▶ ↓⁺ Φ)
j: ↓⁺ Φ ∋ x
Heqn: n = var_height j
vv:= ₐ↓ v x j: val (Δ +▶ ↓⁻ Φ) x
t: ¬ (is_var vv)
tt: (delay ∘ nf obs val) (Δ +▶ (↓⁻ Φ +▶ dom o))
Heqtt: tt = eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘)
nx: T
no: obs nx
narg: dom no =[ val ]> (Δ +▶ (↓⁻ Φ +▶ dom o))
j0: ↓⁻ Φ +▶ dom o ∋ nx
Heqot: RetF (r_cat_r j0 ⋅ no ⦇ narg ⦈) = _observe (eval ((vv ᵥ⊛ r_emb r_cat3_1) ⊙ o ⦗ r_cat_rr ᵣ⊛ a_id ⦘))it_eqF ∅ₑ (eqᵢ (fun _ : T1 => obs ∙ (Δ +▶ (↓⁻ Φ +▶ dom o)))) (it_eq (eqᵢ (fun _ : T1 => obs ∙ (Δ +▶ (↓⁻ Φ +▶ dom o))))) T1_0 (RetF (r_cat_r j0 ⋅ no ⦇ narg ⦈)) (RetF (r_cat_r j0 ⋅ no))
Now the actual proof of eventual guardedness is just about unfolding a bit of the beginning of the interactions until we attain a resume and can apply our main lemma.
T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: Ceqn_ev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: Ceqn_ev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Γ: ogs_ctx
c: conf (Δ +▶ ↓⁺ Γ)
u: ogs_env Δ Act Γ
v: ogs_env Δ Pas Γev_guarded (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (compo_body {| red_ctx := Γ; red_act := {| ms_conf := c; ms_env := u |}; red_pas := v |})T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Γ: ogs_ctx
c: conf (Δ +▶ ↓⁺ Γ)
u: ogs_env Δ Act Γ
v: ogs_env Δ Pas Γev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match _observe (eval c) with | RetF r => RetF (m_strat_wrap u r) | TauF t => TauF (fmap_delay (m_strat_wrap u) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap u) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e); red_act := m_strat_resp v (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ ↓⁺ Γ & m_strat_pas Δ (Γ ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e); red_act := m_strat_resp v (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ ↓⁺ Γ & m_strat_pas Δ (Γ ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp v (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Γ: ogs_ctx
c: conf (Δ +▶ ↓⁺ Γ)
u: ogs_env Δ Act Γ
v: ogs_env Δ Pas Γ
ot:= _observe (eval c): itree' ∅ₑ (fun _ : T1 => nf obs val (Δ +▶ ↓⁺ Γ)) T1_0ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) match match ot with | RetF r => RetF (m_strat_wrap u r) | TauF t => TauF (fmap_delay (m_strat_wrap u) t) | VisF e k => VisF e (fun r : ex_falso e => (fun _ : T1 => m_strat_wrap u) <$> k r) end with | RetF r => RetF match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e); red_act := m_strat_resp v (projT1 e); red_pas := projT2 e |} end | TauF t => TauF (fmap_delay (fun r : obs ∙ Δ + {m : obs ∙ ↓⁺ Γ & m_strat_pas Δ (Γ ▶ₓ m_dom m)} => match r with | inl r0 => inr r0 | inr e => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e); red_act := m_strat_resp v (projT1 e); red_pas := projT2 e |} end) t) | VisF e k => VisF e (fun r : ex_falso e => (fun (_ : T1) (r0 : obs ∙ Δ + {m : obs ∙ ↓⁺ Γ & m_strat_pas Δ (Γ ▶ₓ m_dom m)}) => match r0 with | inl r1 => inr r1 | inr e0 => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e0); red_act := m_strat_resp v (projT1 e0); red_pas := projT2 e0 |} end) <$> k r) endT, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Γ: ogs_ctx
c: conf (Δ +▶ ↓⁺ Γ)
u: ogs_env Δ Act Γ
v: ogs_env Δ Pas Γ
r: nf obs val (Δ +▶ ↓⁺ Γ)ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match m_strat_wrap u r with | inl r => inr r | inr e => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e); red_act := m_strat_resp v (projT1 e); red_pas := projT2 e |} end)T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Γ: ogs_ctx
c: conf (Δ +▶ ↓⁺ Γ)
u: ogs_env Δ Act Γ
v: ogs_env Δ Pas Γ
x: T
i: Δ +▶ ↓⁺ Γ ∋ x
o: obs x
a: dom o =[ val ]> (Δ +▶ ↓⁺ Γ)ev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF match match c_view_cat i with | Vcat_l i => inl (i ⋅ o) | Vcat_r j => inr ((j ⋅ o),' (u;⁻ nf_args (i ⋅ o ⦇ a ⦈))) end with | inl r => inr r | inr e => inl {| red_ctx := Γ ▶ₓ m_dom (projT1 e); red_act := m_strat_resp v (projT1 e); red_pas := projT2 e |} end)refine (GNext _); apply compo_body_guarded_aux. Qed.T, C: Type
CC: context T C
CL: context_laws T C
val: Fam₁ T C
VM: subst_monoid val
VML: subst_monoid_laws val
conf: Fam₀ T C
CM: subst_module val conf
CML: subst_module_laws val conf
obs: obs_struct T C
M: machine val conf obs
ML: machine_laws val conf obs
VV: var_assumptions val
Δ: C
Γ: ogs_ctx
c: conf (Δ +▶ ↓⁺ Γ)
u: ogs_env Δ Act Γ
v: ogs_env Δ Pas Γ
x: T
o: obs x
a: dom o =[ val ]> (Δ +▶ ↓⁺ Γ)
j: ↓⁺ Γ ∋ xev_guarded' (fun pat : T1 => let 'T1_0 as x := pat return (reduce_t Δ -> itree ∅ₑ ((fun _ : T1 => reduce_t Δ) +ᵢ (fun _ : T1 => obs ∙ Δ)) x) in compo_body) (RetF (inl {| red_ctx := Γ ▶ₓ m_dom (projT1 ((j ⋅ o),' (u;⁻ nf_args (r_cat_r j ⋅ o ⦇ a ⦈)))); red_act := m_strat_resp v (projT1 ((j ⋅ o),' (u;⁻ nf_args (r_cat_r j ⋅ o ⦇ a ⦈)))); red_pas := projT2 ((j ⋅ o),' (u;⁻ nf_args (r_cat_r j ⋅ o ⦇ a ⦈))) |}))
From the previous proof we can directly apply the strong fixed point construction on eventually guarded equations and obtain a composition operator without any Tau node at interaction points.
Definition compo_ev_guarded {Δ a} (u : m_strat_act Δ a) (v : m_strat_pas Δ a) : delay (obs∙ Δ) := iter_ev_guarded _ compo_body_guarded T1_0 (RedT u v). End with_param. #[global] Notation "u ∥g v" := (compo_ev_guarded u v) (at level 40).