coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Joachim Breitner <mail AT joachim-breitner.de>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] How strong is this deferredFix axiom?
- Date: Wed, 06 Dec 2017 13:21:04 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mail AT joachim-breitner.de; spf=Neutral smtp.mailfrom=mail AT joachim-breitner.de; spf=None smtp.helo=postmaster AT hermes.serverama.de
- Ironport-phdr: 9a23:gt9K5hF2KEvOBK+gxMv0U51GYnF86YWxBRYc798ds5kLTJ76r8qwAkXT6L1XgUPTWs2DsrQf1LqQ7viocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWf8zMIJRX+KQcwY829WsuL15z2hKiO/MjYZBwNjz6ga5tzKg+3pEPfrJo4m4xnf4Q2wxDJo34AUf5bxH9uKEjbyxP158OY/plq+CRRvrcr7cNBTaP3ZeI0QOoLX3wdL2kp6Ziz5lH4RgyV6y5ZCz1Onw==
Hi list,
I would like to be able to define recursive function and defer the
termination proof to later; this is especially interesting in the
context of generated Coq code with hs-to-coq[1].
What I currently use is
Axiom unsafeFix : forall {a}, (a -> a) -> a.
to define the recursive function, and then
Axiom unsafeFix_eq : forall {a} (f : a -> a),
unsafeFix f = f (unsafeFix f).
and to some extent and pragmatically speaking, this is not too bad if I
am disciplined in the use of these axioms[2].
But it is still unsatisfying, and if possible I’d like to avoid such
dangerous axioms. So I am wondering about these:
Axiom deferredFix : forall {a}, a -> (a -> a) -> a.
Axiom deferredFix_eq : forall {a} d (f : a -> a),
(exists x, f x = x) ->
deferredFix d f = f (deferredFix d f).
I believe these are consistent with basic Coq, because I can implement
them using the Hilbert Choice operator provided in the Coq standard
library:
Require Import Coq.Logic.ClassicalEpsilon.
Definition deferredFix : forall {a}, a -> (a -> a) -> a :=
fun {a} def f => epsilon (inhabits def) (fun x => f x = x).
Definition deferredFix_eq : forall {a} d (f : a -> a),
(exists x, f x = x) ->
deferredFix d f = f (deferredFix d f) :=
fun a d f H =>
eq_sym (epsilon_spec (inhabits d) (fun x => f x = x) H).
But are they as strong as Hilbert’s epsilon, or are they weaker? How
weak are they?
Regards,
Joachim
[1] https://arxiv.org/abs/1711.09286
[2] https://www.joachim-breitner.de/blog/733-Existence_and_Termination
--
Joachim “nomeata” Breitner
mail AT joachim-breitner.de
https://www.joachim-breitner.de/
Attachment:
signature.asc
Description: This is a digitally signed message part
- [Coq-Club] How strong is this deferredFix axiom?, Joachim Breitner, 12/06/2017
- Re: [Coq-Club] How strong is this deferredFix axiom?, Stefan Monnier, 12/06/2017
- Re: [Coq-Club] How strong is this deferredFix axiom?, Gaëtan Gilbert, 12/06/2017
- Re: [Coq-Club] How strong is this deferredFix axiom?, Joachim Breitner, 12/06/2017
- Re: [Coq-Club] How strong is this deferredFix axiom?, Joachim Breitner, 12/07/2017
- Re: [Coq-Club] How strong is this deferredFix axiom?, Joachim Breitner, 12/08/2017
- Re: [Coq-Club] How strong is this deferredFix axiom?, Gaëtan Gilbert, 12/08/2017
- Re: [Coq-Club] How strong is this deferredFix axiom?, Joachim Breitner, 12/06/2017
Archive powered by MHonArc 2.6.18.