Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] why does simpl fail?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] why does simpl fail?


Chronological Thread 
  • From: Jeremy Dawson <Jeremy.Dawson AT anu.edu.au>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] why does simpl fail?
  • Date: Sat, 25 Apr 2020 21:46:17 +1000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=anu.edu.au; dmarc=pass action=none header.from=anu.edu.au; dkim=pass header.d=anu.edu.au; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TkpW9W1AgdFpWMXjcJGuAfnnQLGpI9r/XKzKClxZg1o=; b=N9wmivoTxiGSDjqWBI6iI7cZbUwDX5P2v4QXWjBWEs0/eb5O+wNN4IMIOqa8BL+O8zPmie3IrBHtAFtEpNAn17pQChEyKDb/AfE2fOhSz9rpu3Xl8oijgrT5NhG4vjayep97DxilhalK2G9tx3YWK9FMvgNjid8+zgK8MXamGBqdOZr03dxYC35TEe58Kn6BBx7ge/n66eBcRTSGSMWX93nQWNy8wg6q/IvBdTtCSY5O4sLd1Yk0mi9MtLYrUADt/v8IXvs2QW4dtmGZlpgkJO08BnCn77/yNOLbznadjdBsUjL5qd2PumqnefW8w2mhzQui7PUBaV/4JsuiEXR95g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jtt3Eat1DXMhh6HYkf+4YzJ5OP/0IlJ0gEFPAuyXTlWVjjPb1eAKFS93v3gVF0nDbFCFLuahsrUNQL4thRuDEMZZX3krrAFTvpflyTdhOZxlK4CkPe3YqdbCOp0VmR6q+fg+covLc4mV/rLUNoT553PjfJ+yHyBmaKx4AGC70sJMYvlspm6yvne4AfqG7WceecTdJ9z+8Maln36BCotsVkArSSqT0nEv1b0QGkEXMmxqy3nWrfKBwEaGaHHC6wUNymTXZOE1bTiGOMatIFrrG7NM/H84/G9c1EXp5yX3h4r1NxhwuGL2R3B/SmvsXjhcFW1BlppuPAHyFcUycWNUQQ==
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=Jeremy.Dawson AT anu.edu.au; spf=Pass smtp.mailfrom=Jeremy.Dawson AT anu.edu.au; spf=Pass smtp.helo=postmaster AT AUS01-ME1-obe.outbound.protection.outlook.com
  • Ironport-phdr: 9a23:uF6fvBCGJ7zoeajtDVQ0UyQJP3N1i/DPJgcQr6AfoPdwSPT7pMbcNUDSrc9gkEXOFd2Cra4d1qyL7+u5CSQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagYb5+NhW7oAreusULgoZpN7o8xAbOrnZUYepd2HlmJUiUnxby58ew+IBs/iFNsP8/9MBOTLv3cb0gQbNXEDopPWY15Nb2tRbYVguA+mEcUmQNnRVWBQXO8Qz3UY3wsiv+sep9xTWaMMjrRr06RTiu86FmQwLuhSwaNTA27XvXh9RtgqxFrhKvpx9xzYDab46XKPVwcazSfdIBSGpdXctcTTBNDp+yYoYNCecKIOZWr5P6p1sLtRawARejBPnxxT9Nhn79wKM03P4vEAHd2wwgGc8FvXPQotrrLqcdT+W1zanSwTvNdfxX1yz96I/Och06u/6MW69wfdDPxkYyCgPJlE+fqZH8Mj6Ty+8DsHCb4vJvWO6zkWIrth19rzq1yssxhITEh5gZx1TL+Clhz4s4Ice0RFN4bNK4CpddtS+XO5FrTs88X21lvjsxxKcctp6hZicKzYwqxx7BZPyDdIiF+g7uW+iMLztkmX5pYbWxiRmv/US5ze3zTde73ExNripYjtnDrXcN1wHV6seaUPd95l2h2TGT1w/N9u5EPUE0la3dK5I7xb4wi4YTsUDEHi/xm0X6lrOZdkIh+uSw6uTnZKvppoOEOoJ7lg3yKLkiltC9DOgiLwQDUWmW9f642bDs5UH5Ra9FjvwykqnXqpDaIsEbq7a9DQBLyIYs9RO/Dje83NoWh3YGIklFeBWBj4XyIV7OJu34Ae2hjFuxjTdn3erJPqD5DpXXMnfDiKvhfap660NE1AUzyslf64tIBbEFPfL8QVT8tMfYDx88Kwy72fzrCNR71oMEWGKAGLWVMK3IsQzA2uV6KO6VIYQRpTzVKv4/5veog2Vqt0UaePyL0IEabWHwMv15OEKfKS7Oj80MFHZMkgMhV+vsoFSETHhea2v0Vr9qtWJzM56vEYqWHtPlu7eGxiruRsQHNFADMUiFFDLTT6vBXv4NbCyIJco4yG4NU6XnRoM8kxiz5lajl+hXa9HM8yhdjqrNkcBv7rSJxxg06Hp5A9nb2nzfFzgpzFNNfCc/2eVEmWI4ylqH1vQn0dVlLoQKotZkC0I9P5OayPFmAdfvXA6HZs2OVFutXtShB3c2U841xNgNJU16Hof7gw==

Thanks very much! Each of these solutions would work.

Cheers,

Jeremy

On 25/4/20 9:03 pm, Théo Winterhalter wrote:
Even a fixpoint with no recursive call, has a recursive argument.
This argument is then used a syntactic guard to block reduction, unless it is
a constructor.

If you print your term you will see that the recursive argument is probably
not ders but the first argument that is of an inductive type.
You can fix this as Pierre-Léo suggest by using Definition instead of
Fixpoint, or by explicitly saying that ders is the recursive argument by
adding {struct ders} before the :=.

Le 25 avr. 2020 à 12:58, BEGAY Pierre-leo
<pbegay AT ens-cachan.fr>
a écrit :

Hello,

I've had the same issue recently, the problem was that I used a Fixpoint where a
Definition was sufficient. I guess simpl does not perform "terminal
computations" on Fixpoints, but only tries to simplify the recursive call, maybe
someone else can elaborate on that.

As far as I can tell, you do not need to use a Fixpoint either, so that may
be the source of your problem.

Cheers,
Pierre-Léo Bégay


Jeremy Dawson
<Jeremy.Dawson AT anu.edu.au>
a écrit :

Hi,

I have a definition

Fixpoint dersrec_hd X rules prems c cs
(ders : @dersrec X rules prems (c :: cs)) :=
match ders with
| dlCons d ds => d
end.

but when I try do prove the following, I would expect the simpl step to
simplify it to d = d

Lemma dersrec_hd_eq X rs ps c cs
(d : @derrec X rs ps c) (ds : @dersrec X rs ps cs) :
dersrec_hd (dlCons d ds) = d.
Proof. simpl. (* does nothing *)

What could be the reason for failure here?

Thanks

Jeremy Dawson







Archive powered by MHonArc 2.6.18.

Top of Page