Definition create_token (n:nat) (fac:t) : t*t :=
match n with
| O => (fac,bot)
| S n' =>
(exist (fun x => canonicalTree x) (mkCanon (create_tok1 n' (proj1_sig fac))) (mkCanon_correct _),
exist (fun x => canonicalTree x) (mkCanon (create_tok2 n' (proj1_sig fac))) (mkCanon_correct _))
end.

(* Specifications: *)
Lemma 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.