Commit 24464222 authored by Amin Timany's avatar Amin Timany

Make progress on proving binary fundamental lemma

The way the binary relation is defined, the binary fundamental lemma simply
doesn't hold. I overlooked the fact that we need to enable CAS only for types
where equality is checkable.
parent 274c92ea
This diff is collapsed.
......@@ -175,7 +175,7 @@ Section logrel.
λ w, ( j K v,
τ1i v j (fill K (App (# w.2) (# v.2)))
WP (App (# w.1) (# v.1)) @
{{z, z', j (fill K (# z)) τ2i (z, z')}})%I
{{z, z', j (fill K (# z')) τ2i (z, z')}})%I
|}
|}
|}.
......
......@@ -308,15 +308,15 @@ Section lang_rules.
Lemma step_load N E ρ j K l q v:
nclose N E
((Spec_ctx N ρ j (fill K (Load (Loc l))) l ↦ₛ{q} v)%I)
|={E}=>(j (fill K (of_val v)) l ↦ₛ{q} v)%I.
((Spec_ctx N ρ j (fill K (Load (Loc l))) l ↦ₛ{q} v)%I)
|={E}=>(j (fill K (of_val v)) l ↦ₛ{q} v)%I.
Proof.
Admitted.
Lemma step_store N E ρ j K l v' e v:
to_val e = Some v nclose N E
((Spec_ctx N ρ j (fill K (Store (Loc l) e)) l ↦ₛ v')%I)
|={E}=>(j (fill K e) l ↦ₛ v)%I.
((Spec_ctx N ρ j (fill K (Store (Loc l) e)) l ↦ₛ v')%I)
|={E}=>(j (fill K Unit) l ↦ₛ v)%I.
Proof.
Admitted.
......@@ -387,7 +387,7 @@ Section lang_rules.
Lemma step_fork N E ρ j K e :
nclose N E
((Spec_ctx N ρ j (fill K (Fork e)))%I)
|={E}=>(j (fill K (Unit)))%I.
|={E}=>( j', j (fill K (Unit)) j' (fill K e))%I.
Proof.
Admitted.
......
......@@ -28,10 +28,10 @@ Inductive typed (Γ : list type) : expr → type → Prop :=
| Snd_typed e τ1 τ2 : typed Γ e (TProd τ1 τ2) typed Γ (Snd e) τ2
| InjL_typed e τ1 τ2 : typed Γ e τ1 typed Γ (InjL e) (TSum τ1 τ2)
| InjR_typed e τ1 τ2 : typed Γ e τ2 typed Γ (InjR e) (TSum τ1 τ2)
| Case_typed e0 e1 e2 τ1 τ2 ρ :
| Case_typed e0 e1 e2 τ1 τ2 τ3 :
typed Γ e0 (TSum τ1 τ2)
typed (τ1 :: Γ) e1 ρ typed (τ2 :: Γ) e2 ρ
typed Γ (Case e0 e1 e2) ρ
typed (τ1 :: Γ) e1 τ3 typed (τ2 :: Γ) e2 τ3
typed Γ (Case e0 e1 e2) τ3
| Lam_typed e τ1 τ2 :
typed (τ1 :: Γ) e τ2 typed Γ (Lam e) (TArrow τ1 τ2)
| App_typed e1 e2 τ1 τ2 :
......@@ -66,7 +66,8 @@ Proof.
assert ( {A} `{Ids A} `{Rename A}
(s1 s2 : nat A) x, (x 0 s1 (pred x) = s2 (pred x)) up s1 x = up s2 x).
{ intros A H1 H2. rewrite /up=> s1 s2 [|x] //=; auto with f_equal omega. }
induction Htyped => s1 s2 Hs; f_equal/=; eauto using lookup_lt_Some with omega typed_subst_invariant.
(induction Htyped => s1 s2 Hs; f_equal/=);
eauto using lookup_lt_Some with omega typed_subst_invariant.
Qed.
Definition env_subst (vs : list val) (x : var) : expr :=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment