coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: scott constable <sdconsta AT syr.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Induction over two non-mutual inductive terms
- Date: Wed, 23 Mar 2016 23:29:50 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=sdconsta AT syr.edu; spf=None smtp.mailfrom=sdconsta AT syr.edu; spf=None smtp.helo=postmaster AT smtp1.syr.edu
- Ironport-phdr: 9a23:aUfu8xBZy9gyIRhLhl5HUyQJP3N1i/DPJgcQr6AfoPdwSP74osbcNUDSrc9gkEXOFd2CrakU26yP7Ou9CCQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTnkbntsMCCKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46FppIZ8VvDxeL19RrhFBhwnNXo07Yvlr0rtVwyKs2AXVXkK2hFPBRPZ5Rv+U9+lqSfxsexmxCCyJtzsC704RGLxvO9QVBb0hXJfZHYC+2bNh5kogQ==
Thank you all so much for the responses. Roux Cody was indeed correct that what I was trying to prove was false; I revised my eval function accordingly. It turned out that the right approach to begin the proof was to generalize tm, then induct over i, and then proceed by (non-inductive) cases over tm.
~Scott
On Wed, Mar 9, 2016 at 4:05 AM, Guillaume Melquiond <guillaume.melquiond AT inria.fr> wrote:
On 08/03/2016 21:41, scott constable wrote:
> Hi All,
>
> I have a simple recursive programming language implemented in coq with
> an evaluate function "eval". Since the language is non-normalizing, eval
> is recursively defined over a nat counter, "i" (I'm following the
> strategy given in the ImpCEvalFun chapter of SF). I'm currently trying
> to prove that whenever a term "tm" in the language is well-formed, no
> error can occur during a computation. So the theorem is as follows:
>
> Theorem NoFail : forall i tm, well_formed tm -> eval i tm <> Error.
>
> It seems that I need to induct over both i and tm, but doing something like
>
> induction i as [|i'], tm.
I must admit that I didn't even know it was possible to pass two
arguments to induction. I am not quite sure what the semantics could be.
Anyway, in your case, I would simply have first done an induction on i,
and then an induction on tm.
> always leads to unprovable subgoals, such as
>
> IHi' : eval i' (t_Plus t1 t2) <> Error
> ============================
> eval (S i') (t_Plus t1 t2) <> Error
>
> when what I really want would be something like
>
> IH1 : eval i' t1 <> Error
> IH2 : eval i' t2 <> Error
> ============================
> eval (S i') (t_Plus t1 t2) <> Error
My suggestion above would give
IHi : forall tm : t, well_formed tm -> eval i tm <> Error
=========================================================
well_formed (t_Plus t1 t2) -> eval (S i) (t_Plus t1 t2) <> Error
which seems much closer to what you are expecting.
Best regards,
Guillaume
- [Coq-Club] Induction over two non-mutual inductive terms, scott constable, 03/08/2016
- Re: [Coq-Club] Induction over two non-mutual inductive terms, Per Lindgren, 03/08/2016
- Re: [Coq-Club] Induction over two non-mutual inductive terms, scott constable, 03/08/2016
- Re: [Coq-Club] Induction over two non-mutual inductive terms, roux cody, 03/08/2016
- Re: [Coq-Club] Induction over two non-mutual inductive terms, scott constable, 03/08/2016
- Re: [Coq-Club] Induction over two non-mutual inductive terms, Guillaume Melquiond, 03/09/2016
- Re: [Coq-Club] Induction over two non-mutual inductive terms, scott constable, 03/24/2016
- Re: [Coq-Club] Induction over two non-mutual inductive terms, Per Lindgren, 03/08/2016
Archive powered by MHonArc 2.6.18.