(* Ramification Premises for Nested Load/Store Rule *)

(* Specifications: *)
Lemma RP_one_layer: forall t nf f u v p,
legal_nested_field t (f :: nf) ->
legal_type t ->
field_at t nf u p
|-- field_at t (f :: nf)
(proj_gfield_reptype (nested_field_type t nf) f u) p *
(field_at t (f :: nf) v p -*
field_at t nf (upd_gfield_reptype (nested_field_type t nf) f u v) p).
Lemma RP_field: forall t nf u v p,
legal_nested_field t nf ->
legal_type t ->
data_at t u p |-- field_at t nf (proj_reptype t nf u) p *
(field_at t nf v p -* data_at t (upd_reptype t nf u v) p).
Lemma RP_mapsto: forall t nf u v p w0 w1,
legal_nested_field t nf ->
legal_type t ->
nested_field_type t nf = Tint ->
JMeq (proj_reptype t nf u) w0 ->
JMeq v w1 ->
data_at t u p |-- mapsto (field_address t nf p) w0 *
(mapsto (field_address t nf p) w1 -* data_at t (upd_reptype t nf u v) p).
Lemma Lemma1: forall t nf u p w,
legal_nested_field t nf ->
legal_type t ->
nested_field_type t nf = Tint ->
JMeq (proj_reptype t nf u) w ->
data_at t u p |-- mapsto (field_address t nf p) w * TT.
(* Reroot Equation *)
Lemma field_at_data_at: forall t nf v p,
field_at t nf v p = data_at _ v (field_address t nf p).