(** Proving that [safe'] implies [safe] (the reverse implication only holds if we replace [f] with a coinductive stream) *)

(* Specifications: *)
Lemma safe'_safe x : (exists f, f 0 = x /\ safe' f) -> safe x.
(** From [safe], we can derive a function assumming the functional axiom of choice (but we don't need choice to prove [safe]) *)
Lemma safe_safe' x :
(forall P, P \/ ~P) ->
FunctionalChoice ->
safe x -> (exists f, f 0 = x /\ safe' f).
Lemma not_ex_forall {A} (P : A -> Prop) : (~ex P) <-> (forall x, ~P x).
split.