coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Pierre Courtieu <pierre.courtieu AT gmail.com>
- To: Matthieu Sozeau <matthieu.sozeau AT inria.fr>
- Cc: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Equations 1.2beta is out!
- Date: Mon, 11 Feb 2019 14:32:41 +0100
- 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-f171.google.com
- Ironport-phdr: 9a23:pL2gNxxorI/U8nTXCy+O+j09IxM/srCxBDY+r6Qd2+wXIJqq85mqBkHD//Il1AaPAd2Lraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HQbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDtU7s6RSqt4LtqSB/wiScIKTg58H3MisdtiK5XuQ+tqwBjz4LRZoyeKfhwcb7Hfd4CSmVBUMReWSxPDI2/coUBEfYOM+lDoonhvlsDtweyCRWwCO7tzDJDm3/43bc90+QkCQzIxg0gEMwUsHTOstr+KbkfUeeozKnS0TXDbu1Z2Srg44XPahAhoO+DXahqccXP00UgCwTFjkiKqYz5PjOayPkNvnOU7+plT+2vimonpxttrTiow8chk4/EjZ8WxFDc7Sh13po5KNmiREN4YdOoCoZcuiCbOodsX88vQXxktSAnwbMco5G7ZjIFyJE/yh7fdfOHd4+I7wrmVOmLIDd4gGtpeLOjhxqv6ESgxPDwW8up3FpQoSpFld7Mtn8J1xPN8MSIVvx9/kK51TaO0QDc9P1ELFgqmabHL5Mt2L09m5oJvUjeHyL7mV/6gLKUe0k54uSo7v7oYrTipp+SLY90jQT+P7w2msy+H+s4KBIOUHaB9eug073j4Ff5QKlLjvIoj6nUq5/aJcEBqa64Bw9ZyJos6xG6Dzu+ytQXgWEHLE5ZeBKAl4XpIFbOIfHmAvilnlShizZqx/HDPrL6GJXCNGLPkLbnfbZn6k5T0hA/zd5F55hMELEOPOrzWlPttNzfFhI2Lwu0w//+BNph0oMeRHmAD7SCMKLStF+I/vggL/ONZI8Tojb9KuIq6+TgjX8jyhchevyM1IcLaHG1A7xdJFeUaGek1tIIDXsKvwcjCvftmlCLTBZSYWyzVuQy/GdoJpihCNL7R423mrHJ9yCmBIFXa30OXkiNHG3yesOPXOoWdCOfP+dulzUFUf6qTIp3hkLmjxPz17cydrmcwSYfr5+2kYEtv7SCxyF3ziR9CoGm60/ISmh1mm0SQDpvhfJwpEV8zhGI1q0q2qUER+wW3OtAV0IBDbCZ1/ZzUomgVQfIf9PPQ1GjEI3/XGMBC+kpytpLWH5TXtWviheZgXivCr4R0r2XXdk6q/2FmXf2IMl5xjDN06xz11Q=
Yes sorry funelim does the same already.
Le jeu. 7 févr. 2019 à 09:00, Matthieu Sozeau
<matthieu.sozeau AT inria.fr>
a écrit :
>The main difference with Function is that the later allows one to write a
>non-dependent functional ...
For the record I think you meant "non-dependent functional equation".
Equations is meant to subsume strictly Function at some point. It
could even become its backend (Function being just an "ML-ish" wrapper
around the more powerful "agda-ish" Equations).
The other noticeable difference still around is that Function tries to
build elimination principles that follow the originally written
pattern-matching.
Try for instance:
Function f (n:nat): nat :=
match n with
| 10 => 0
| n => n + 1
end.
Goal forall n, f n <> 10 -> f n = n + 1.
intros n.
functional induction (f n).
(* 2 cases: 10 and not 10 *)
and:
Equations f (n:nat) : nat :=
{ f 10 := 0;
f x := x + 1}.
Goal forall n, n <> 10 -> f n = n + 1.
Proof.
intros n.
funelim (f n).
(* 11 cases: 0 1 ... 10 , more than 10 *)
Note however that this "compaction" of the elimination principle
cannot be done in general in a dependently typed pattern matching.
Best,
Pierre
- Re: [Coq-Club] Equations 1.2beta is out!, Gert Smolka, 02/06/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Laurent Thery, 02/06/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Laurent Thery, 02/06/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Pierre Courtieu, 02/06/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Jason -Zhong Sheng- Hu, 02/06/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Matthieu Sozeau, 02/07/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Pierre Courtieu, 02/11/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Matthieu Sozeau, 02/11/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Pierre Courtieu, 02/11/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Matthieu Sozeau, 02/07/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Jason -Zhong Sheng- Hu, 02/06/2019
- Re: [Coq-Club] Equations 1.2beta is out!, Pierre Courtieu, 02/06/2019
Archive powered by MHonArc 2.6.18.