Module NRAtocNRAEnv


Section NRAtocNRAEnv.
  Require Import String.
  Require Import List.
  Require Import BasicRuntime.
  Require Import NRARuntime.
  Require Import cNRAEnvRuntime.

  Context {fr:foreign_runtime}.

  Section Top.
    Context (h:brand_relation_t).

    Definition nra_to_nraenv_core_top (q:nra) : nraenv_core :=
      nraenv_core_of_nra q.

    Theorem nra_to_nraenv_core_top_correct :
      forall q:nra, forall global_env:bindings,
          nra_eval_top h q global_env =
          nraenv_core_eval_top h (nra_to_nraenv_core_top q) global_env.
Proof.
      intros.
      unfold nra_eval_top.
      unfold nraenv_core_eval_top.
      unfold nra_to_nraenv_core_top.
      simpl.
      rewrite <- nraenv_core_eval_of_nra.
      reflexivity.
    Qed.
  End Top.
    
End NRAtocNRAEnv.