coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?
Chronological Thread
- From: Erik Silkensen <eriksilkensen AT gmail.com>
- To: Chris Dams <chris.dams.nl AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?
- Date: Sat, 2 Nov 2013 11:11:45 -0400
Ok, thanks. I don’t know if this makes a difference, but anyway for context my goal is to define a step-indexed semantics in Coq where one of the rules looks kind of like
(forall k,
k <= k’ ->
eval term val k -> P) ->
-----------------------------
eval term val (S k')
so there’s a premise with a negative occurrence of eval. I thought, if I can’t write this as an Inductive relation, maybe I could write it as a Fixpoint, where I could tell Coq k is the decreasing argument, and then that’s where I ran into wanting to recur with some k <= k’ and tried to extract that into the first code I sent.
On Nov 2, 2013, at 6:58 AM, Chris Dams <chris.dams.nl AT gmail.com> wrote:
Thanks for such a quick reply and for the pointer to well_founded_induction lt_wf. Does this mean I should be using the Fix tactic? Or Function or Program Fixpoint? I think I’m getting stuck on how syntactically it should look for this basic example. Thanks again.
I would not use fix or Fixpoint in that case. I would just apply well_founded_induction lt_wf by either using the apply tactic or providing it with arguments by typing them by hand.
- [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Erik Silkensen, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Chris Dams, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Erik Silkensen, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, AUGER Cédric, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Erik Silkensen, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Chris Dams, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Erik Silkensen, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Rui Baptista, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Erik Silkensen, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, AUGER Cédric, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Erik Silkensen, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Adam Chlipala, 11/02/2013
- Re: [Coq-Club] Writing a recursive function that's not quite structurally recursive?, Chris Dams, 11/02/2013
Archive powered by MHonArc 2.6.18.