Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Mutual induction schemes and recursive function arguments

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Mutual induction schemes and recursive function arguments


Chronological Thread 
  • From: Pierre Courtieu <pierre.courtieu AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Mutual induction schemes and recursive function arguments
  • Date: Tue, 16 Apr 2019 10:41:03 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=pierre.courtieu AT gmail.com; spf=Pass smtp.mailfrom=pierre.courtieu AT gmail.com; spf=None smtp.helo=postmaster AT mail-it1-f170.google.com
  • Ironport-phdr: 9a23:Uxq8ih0tWjk6glfGsmDT+DRfVm0co7zxezQtwd8ZseIVKPad9pjvdHbS+e9qxAeQG9mCsrQf0qGO7uigATVGvc/Z9ihaMdRlbFwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfQV6Kf7oFYHMks+5y/69+4HJYwVPmTGxfa5+IA+5oAnMq8Uam4VvJrs+xhfVonZDZuBayX91KV6JkBvw+9u88IR//yhMvv4q6tJNX7j9c6kkV7JTES4oM3oy5M3ltBnDSRWA634BWWgIkRRGHhbI4gjiUpj+riX1uOx92DKHPcLtVrA7RS6i76ZwRxD2jioMKiM0/3vWisx0i6JbvQ6hqhliyIPafI2ZKPxzdb7GcNgEWWROQNpeVy1ZAoO9cYQPCfYBPf1FpIX5vlcCsAeyCRWpCO7p1zRGhGL53bci3usuHwHJ3gwuEdwNvnrJstv6KKgcXPupzKnR1zjPc+9a1Sv/5YXObxsvoeuMXbV1ccfJ00cvFh3Kjk+KqYP7IjiYyOMNs3WB7+p8VOKglXMnoBx2rzi3x8cjlJPJhpgLxVze6Sp5x5s1JcekSE56f9GkDYBdty6fN4RsQ8MiR3tktzo9yr0DoJO2ejUBxpc/xxPHdfCLb4yF7gjgWeuROzt0mXNodbOlixqv80Ws1uvxXdSu3llQtCpKiNzMu2gN1xPN7siHTeNw/kK71jaO0wDf8+BEIVwpmabCJZ4t37w9moYJvUTMGS/2n0r2jKuIeUk+5ueo7OHnbq3npp+aKYB0lhnzProylsG7G+g1MQgDU3KG9em91bDv51D1TbdWgvEul6nWqpHaJcAVpq6jBA9V154u6w6+Dzi4ytQYh2cIIEhZdxKAkojpIU3OIPHmAveimFmsnzJryOrHPr3lGJnCMn/DkLL5cbZn90Fc0BYzzcxY559MFr4BJ+vzVlbtu9zcEx82KBe5w/3nCdV4zoMRQ3iDAq6fMKPIsF+H/PgjI+eWZNxdhDGoAP88r9XqkHVxzVQaZOyi2YYdQHG+BPVvZUuDNynCmNAERF8LsxAkQaTBj0CYTT9eej7mR6Mx/Cs2TomhEJ3fR42wqLOE1Sa/WJZRYzYVWRi3DX70etDcCL83YyWIL5oky2RcDOnze8oazRir8TTC5f9iJ+vQ9DcfsMu6htdw7uzX0xo18G4tVpjP4yS2V2hx21gwaXouxqkm+B5yz16C1e5zhPkKTYUOtcMMaR8zMNvn98I/C932XVifLNKASVLjQ8n/RD9oEYp3zNgJbEJwXd6li0Kb0g==

Hi,

In general Function does not deal well with higher order except in
very simple cases. However in your case you are hitting a limit of
inductive scheme generation of coq itself if i understand well.

Function generates the graph of foo (Print R_foo) correctly imho, but
the induction scheme of R_foo does not have the recursion hypothesis
you want either.

I suppose you can give a try to the Equation plugin (but higher order
may lead to axioms?) or prove you scheme by hand.


Le mar. 16 avr. 2019 à 09:13, John Wiegley
<johnw AT newartisans.com>
a écrit :
> ...
> Function foo' (h : Higher) : Higher :=
> match h with
> | Ctor f => Ctor (fun x => foo' (f x))
> | Neg x => Rec (bar' x)
> | Rec x => Rec (foo' x)
> end
> with
> bar' (h : Higher) : Higher :=
> match h with
> | Ctor f => Ctor (fun x => bar' (f x))
> | Neg x => Rec (foo' x)
> | Rec x => Rec (bar' x)
> end.
>
> (** Why does it now fail to build the graph?

This time you hit a limtation of Function itself with higher order.

Hope this helps,
Pierre

> Warning: Cannot define graph(s) for foo', bar'
> [funind-cannot-define-graph,funind]



Archive powered by MHonArc 2.6.18.

Top of Page