(* We axiomatize a random number generator
   (currently written in OCaml only) *)
Axiom RandomSeed : Type.Axiom randomSeed_inhabited : inhabited RandomSeed.Axiom randomNext     : RandomSeed -> Z * RandomSeed.Axiom randomGenRange : RandomSeed -> Z * Z.Axiom mkRandomSeed   : Z          -> RandomSeed.Axiom newRandomSeed  : RandomSeed.(* begin randomSplitAssumption *)
Axiom randomSplit : RandomSeed -> RandomSeed * RandomSeed.Axiom randomSplitAssumption :
  forall s1 s2 : RandomSeed, exists s, randomSplit s = (s1,s2).(* end randomSplitAssumption *)

CoInductive RandomSeedTree :=
| RstNode : RandomSeed -> RandomSeedTree -> RandomSeedTree -> RandomSeedTree.(* end randomSplitAssumption *)

CoInductive RandomSeedTree :=
| RstNode : RandomSeed -> RandomSeedTree -> RandomSeedTree -> RandomSeedTree.Definition root_rst (rst : RandomSeedTree) : RandomSeed :=
  match rst with
  | RstNode root _ _ => root
  end.Definition left_rst (rst : RandomSeedTree) : RandomSeedTree :=
  match rst with
  | RstNode _ t1 _ => t1
  end.Definition right_rst (rst : RandomSeedTree) : RandomSeedTree :=
  match rst with
  | RstNode _ _ t2 => t2
  end.

(* Specifications: *)
Lemma rst_eta : forall rst : RandomSeedTree, rst = RstNode (root_rst rst) (left_rst rst) (right_rst rst).