(* Gives us a logic over nats *)
Existing Instance ag_nat.
(* Build the logic over worlds.  We take tuples of a nat, a local env, and a memory.  The nat exists to let us define the |> operator and the Geodel Leob rule in the usual way.  We get a SA by the obvious combination of SAs on locals and mems with the trival SA on nats. *)
Definition world := (nat * (locals * mem))%type.
Definition world_sa : sepalg world :=
sa_prod (sa_equiv nat) (sa_prod locals_sa mem_sa).
Existing Instance world_sa.
Definition world_age : ageable world :=
ag_prod nat (locals * mem) ag_nat.
Existing Instance world_age.
Definition world_asa : ASA world :=
asa_prod nat (locals * mem) (sa_equiv nat) ag_nat (sa_prod locals_sa mem_sa) asa_nat.
Existing Instance world_asa.

(* Convenience lemmas that pin down the type of a general lemma about the product ASA. *)
Lemma world_nec_split : forall n x n' x',
@necR world world_age (n,x) (n',x') <-> necR n n' /\ x = x'.