Require compcert.common.Globalenvs.
(*To prove memsem*)
Inductive state : Type :=
State : function ->
statement -> cont -> env -> temp_env -> state
| Callstate : fundef -> list val -> cont -> state
| Returnstate : val -> cont -> state.
Definition CC_core := state.
Definition CC_core_to_CC_state (c:state) (m:mem) : Clight.state :=
match c with
State f st k e te => Clight.State f st k e te m
|  Callstate fd args k => Clight.Callstate fd args k m
| Returnstate v k => Clight.Returnstate v k m
end.
Definition CC_state_to_CC_core (c:Clight.state): state * mem :=
match c with
Clight.State f st k e te m => (State f st k e te, m)
|  Clight.Callstate fd args k m => (Callstate fd args k, m)
| Clight.Returnstate v k m => (Returnstate v k, m)
end.

Lemma CC_core_to_CC_state_inj: forall c m c' m',
CC_core_to_CC_state c m = CC_core_to_CC_state c' m' -> (c',m')=(c,m).