Definition funToPosFun {A : Type} `{_ : CoArbitrary A} (f : A -> RandomSeed) (p : positive)
: RandomSeed :=
  match coarbReverse p with 
    | Some a => f a
    | None   => newRandomSeed
  end.Definition coarbLe {A : Type} `{_ : CoArbitrary A} (x y : A) : Prop :=
  Pos.le (coarbitrary x) (coarbitrary y).

Theorem coarbComplete : forall {A : Type} `{_ : CoArbitrary A} (max : A) (f : A -> RandomSeed), exists seed, forall a, coarbLe a max -> varySeed (posToPath (coarbitrary a)) seed = f a.