Skip to main content
Julio Di Egidio's user avatar
Julio Di Egidio's user avatar
Julio Di Egidio's user avatar
Julio Di Egidio
  • Member for 7 months
  • Last seen this week
comment
Using if in Fixpoint
@Feryll "... there are indeed propositions in base Coq for which neither it nor its negation has a witness" That too is at least an understatement: indeed, there are undecidable propositions in classical mathematics, too, so that is more misleading than it is just off mark...
comment
Using if in Fixpoint
"To not deny is to assert" I think is already a better characterization. I don't mean a holy war, indeed I only said yours was an understatement: IMO that is a critical point though, maybe even a crucial one, as for understanding what is what. -- Anyway, just an observation/remark on that specific point, indeed I have no qualms with your answer overall.
comment
Less ridiculous way to prove that an Ascii character compares equal with itself in Coq
@PeterLeFanuLumsdaine Generally speaking, if I have to dig into a library's implementation details in order to use it, then the library is not good enough... Encapsulation is a name for this.
comment
Using if in Fixpoint
"classical logic ... destroys hopes to have well-behaved computation" is the least of the problems with classical logic and quite and understatement...
comment
Possible root cause(s) of the misunderstanding that DTT implies not Turing complete?
Conversely, one might argue that Turing Machines are not an adequate model of computation: indeed there is no such thing as a machine that does not halt or crash or gets switched off, eventually.
comment
Formalizing "finite or infinite" in Coq
I have decided to mark this answer as a solution: I have found every answer and every comment very useful, thanks very much again to all those who have contributed, just, since I can accept one and only one answer, this is the one that eventually I find nearest to the desiderata in my original question.
accepted
Loading…
revised
Loading…
revised
Loading…
answered
Loading…
comment
Formalizing "finite or infinite" in Coq
Thank you, very interesting. Indeed, already what is happening in run_inv, how you concretely achieve that kind of "partiality", is totally new to me... I will certainly read more about this Braga method.
awarded
comment
Formalizing "finite or infinite" in Coq
(2/2) So, this solution quite makes sense to me, it is just a bit more concrete-level than I'd wish/hope: analogous to formalizing a discourse on arbitrary (unbounded) precision arithmetic with a multi-precision (hard-limited) specification... OTOH, please correct me if I am mistaken, a fuel-based approach makes an IsFinRun fully decidable and effective, so I would end up needing that ingredient at some stage anyway, to the point that I might very well introduce it since specification time... -- Need to think more about it/play more with it. Thanks very much for now.
comment
Formalizing "finite or infinite" in Coq
(1/2) We have no way to guess the amount of fuel needed, to the point that, to preserve correctness, instead of option I'd try and use a three-valued result as in Some, None, Failed (equiv., an option of option), and parametrise the whole thing on a global hard depth limit: which I'd say is a common pattern in resource constrained environments. (Would you agree with this "reading"?)
revised
Formalizing "finite or infinite" in Coq
added a link to stdlib plus fixed a typo
Loading…
comment
Formalizing "finite or infinite" in Coq
Thanks very much @NaïmFavier . This indeed works: Definition IsFinRun (r : run) : Set := {p : pos | r = pos_to_run p}. -- OTOH, I had thought about the coproduct, but then I thought, maybe wrongly, that it would be less elegant than structural subtyping as well as less faithful to the informal progression and notions... anyway, as for decidability, I'd have thought working in Set was the critical factor: I am missing the distinction you are making in that sense.
awarded
Loading…
comment