Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Non obvious recursion (Issue with Function + Can't unfold Program Fixpoint)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Non obvious recursion (Issue with Function + Can't unfold Program Fixpoint)


Chronological Thread 
  • From: Dominique Larchey-Wendling <dominique.larchey-wendling AT loria.fr>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Non obvious recursion (Issue with Function + Can't unfold Program Fixpoint)
  • Date: Sat, 2 Sep 2023 16:12:59 +0200 (CEST)
  • Authentication-results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=dominique.larchey-wendling AT loria.fr; spf=None smtp.helo=postmaster AT zcs-store7.inria.fr

Hi all,

My 2 cents. Why not write all_parse_trees
as a fully specified term, relating the output
to the input in a way that characterizes the
output uniquely, ie

all_parse_trees : forall (l :  list A) (n : nat) (p : Regex * nat) -> { o : list parse_tree | all_parse_trees_spec l n p o }

If all_parse_trees_spec mimics the computation of all_parse_trees at the level of Prop,
this is usually an easy task to fullfil.

Then prove properties of all_parse_trees from that spec. In general, this works
around having to evaluate the proofs of the propositions that contribute to the proof
of the Acc(essibility) argument.

D.

De: "mukesh tiwari" <mukeshtiwari.iiitm AT gmail.com>
À: "coq-club" <coq-club AT inria.fr>
Envoyé: Samedi 2 Septembre 2023 13:20:08
Objet: Re: [Coq-Club] Non obvious recursion (Issue with Function + Can't unfold Program Fixpoint)
Hi everyone,

I was under the impression that Agnishom's code is not simplifying because of the opaque proof terms but I was wrong because I have turned every Qed into Defined [1] involved in the proof of wellfounded [3] and it is still not simplifying [2]. Now, I am curious about how to prove this theorem [2].

Best,
Mukesh


On Sat, Sep 2, 2023 at 9:53 AM Castéran Pierre <pierre.casteran AT gmail.com> wrote:
A version using Equations is on https://gist.github.com/Casteran/cb26e7fa8b185aa7f99f8b8048c6658e 
The remaining  Admitted should be trivial (just converting the well-roundedness of your order into an instance).

Pierre


Le 2 sept. 2023 à 03:26, Agnishom Chattopadhyay <agnishom AT cmi.ac.in> a écrit :

Hi all;
I have a function I am trying to define whose well-foundedness is not obvious. I am trying to do it in two different ways: (1) using Program Fixpoint and (2) using Function. In both cases, I am using the fixannot {wf ...}

However,

(1) When I try Program Fixpoint, the function can be defined. But it is opaque to `simpl`. How do I get around this? I need to be able to prove things about this function.
(2) When I use Function, I am getting a strange error message. The error message is not helpful because it references some variable names which I have not used.


Any help with this would be appreciated. I originally posted this on StackExchange, but I am corssposting here because I think this would be better suited for a threaded discussion rather than a Q/A style one.

Thanks!

--Agnishom




Archive powered by MHonArc 2.6.19+.

Top of Page