(* Token factories *)
Parameter isTokenFactory : t -> nat -> Prop.
Parameter isToken : t -> nat -> Prop.
Parameter create_token : nat -> t -> (t*t).

(* Specifications: *)
Axiom create_token_correct : forall fac fac' tok x n,
create_token n fac = (fac',tok) ->
isTokenFactory fac x ->
isTokenFactory fac' (n+x) /\
isToken tok n /\
join fac' tok fac.
Axiom absorbToken : forall fac fac' tok x n,
isTokenFactory fac' (n+x) ->
isToken tok n ->
join fac' tok fac ->
isTokenFactory fac x.
Axiom mergeToken : forall tok1 n1 tok2 n2 tok',
isToken tok1 n1 ->
isToken tok2 n2 ->
join tok1 tok2 tok' ->
isToken tok' (n1+n2).