Axiom HleafNodeConst: forall x p leafIdx lvl dt,
              isLeafNode x (writeToNode p leafIdx lvl dt) ->
              isLeafNode x p.

Lemma get_random_nat_invariant_holds: forall s memSz, init_invariant s memSz -> let (_, oldTsPair) := runState (get_random_nat tt) s in init_invariant oldTsPair memSz.