(* Coq 8.2beta4 *)
Unset Structural Injection.
Record coreSemantics : Type := CoreSemantics {
core: Type;
corestep: core ->  core -> Prop;
corestep_fun: forall q q1 q2, corestep q q1 -> corestep q q2 -> q1 = q2
}.
Definition state : Type := {sem: coreSemantics & sem.(core)}.
Inductive step: state -> state -> Prop :=
| step_core: forall sem st st'
(Hcs: sem.(corestep) st st'),
step (existT _ sem st) (existT _ sem st').
Record oe_core := oe_Core {
in_core: Type;
in_corestep: in_core -> in_core -> Prop;
in_corestep_fun: forall q  q1 q2,  in_corestep q q1 -> in_corestep q q2 -> q1 = q2;
in_q: in_core
}.
Definition oe2coreSem (oec : oe_core) : coreSemantics :=
CoreSemantics oec.(in_core) oec.(in_corestep)  oec.(in_corestep_fun).
Definition oe_corestep (q q': oe_core) :=
step (existT _ (oe2coreSem q) q.(in_q)) (existT _ (oe2coreSem q') q'.(in_q)).
Definition f := CoreSemantics oe_core.

Lemma oe_corestep_fun: forall q q1 q2,
oe_corestep q q1 -> oe_corestep q q2 -> q1 = q2.