Class Ghost := { G : Type; valid : G -> Prop;
Join_G :> Join G; Sep_G :> Sep_alg G; Perm_G :> Perm_alg G;
join_valid : forall a b c, join a b c -> valid c -> valid a }.
Section Update.
Context {RA: Ghost}.

Lemma core_valid: forall a, valid a -> valid (core a).
Definition valid_2 a b := exists c, join a b c /\ valid c.