Definition lvalue_LR_of_type: forall Delta rho P p t e,
t = typeof e ->
tc_environ Delta rho ->
P |-- !! (p = eval_lvalue e rho) && tc_lvalue Delta e rho ->
P |-- !! (p = eval_LR e (LR_of_type t) rho) && tc_LR_strong Delta e (LR_of_type t) rho.

(* Specifications: *)
Lemma eval_lvalue_nested_efield_aux: forall Delta t_root e efs gfs tts p,
field_compatible t_root gfs p ->
legal_nested_efield t_root e gfs tts (LR_of_type t_root) = true ->
local (`(eq p) (eval_LR e (LR_of_type t_root))) &&
tc_LR Delta e (LR_of_type t_root) &&
local (tc_environ Delta) &&
tc_efield Delta efs &&
local (efield_denote efs gfs) |--
local (`(eq (field_address t_root gfs p))
(eval_LR (nested_efield e efs tts) (LR_of_type (nested_field_type t_root gfs)))) &&
tc_LR_strong Delta (nested_efield e efs tts) (LR_of_type (nested_field_type t_root gfs)).
Lemma nested_efield_facts: forall Delta t_root e efs gfs tts lr p,
field_compatible t_root gfs p ->
LR_of_type t_root = lr ->
legal_nested_efield t_root e gfs tts lr = true ->
type_is_by_value (nested_field_type t_root gfs) = true ->
local (`(eq p) (eval_LR e (LR_of_type t_root))) &&
tc_LR Delta e (LR_of_type t_root) &&
local (tc_environ Delta) &&
tc_efield Delta efs &&
local (efield_denote efs gfs) |--
local (`(eq (field_address t_root gfs p))
(eval_lvalue (nested_efield e efs tts))) &&
tc_lvalue Delta (nested_efield e efs tts).
Lemma eval_lvalue_nested_efield: forall Delta t_root e efs gfs tts lr p,
field_compatible t_root gfs p ->
LR_of_type t_root = lr ->
legal_nested_efield t_root e gfs tts lr = true ->
type_is_by_value (nested_field_type t_root gfs) = true ->
local (`(eq p) (eval_LR e lr)) &&
tc_LR Delta e lr &&
local (tc_environ Delta) &&
tc_efield Delta efs &&
local (efield_denote efs gfs) |--
local (`(eq (field_address t_root gfs p)) (eval_lvalue (nested_efield e efs tts))).
Lemma tc_lvalue_nested_efield: forall Delta t_root e efs gfs tts lr p,
field_compatible t_root gfs p ->
LR_of_type t_root = lr ->
legal_nested_efield t_root e gfs tts lr = true ->
type_is_by_value (nested_field_type t_root gfs) = true ->
local (`(eq p) (eval_LR e lr)) &&
tc_LR Delta e lr &&
local (tc_environ Delta) &&
tc_efield Delta efs &&
local (efield_denote efs gfs) |--
tc_lvalue Delta (nested_efield e efs tts).