[Agda] Strangeness with corecursion
Thorsten Altenkirch
Thorsten.Altenkirch at nottingham.ac.uk
Sun Mar 3 13:16:10 CET 2019
Hi,
I just set the exercise to define multiplication for conats for my course on type theory. So please don’t blurt put the solution – see the attached code. The following is not a solution because agda doesn’t see that the definition is productive (even though it is):
prd∞ (m *∞ n) with prd∞ m
prd∞ (m *∞ n) | (just pm) = prd∞ (n +∞ (pm *∞ n))
prd∞ (m *∞ n) | nothing = nothing
but after the following change
prd∞ (m *∞ n) with prd∞ m
prd∞ (m *∞ n) | (just pm) with (pm *∞ n)
prd∞ (m *∞ n) | (just pm) | x = prd∞ (n +∞ x)
prd∞ (m *∞ n) | nothing = nothing
agda seems to accept is. Actually even if +∞ is not contractive.
Is this a known bug? Otherwise can somebody remind e how to report this?
Cheers,
Thorsten
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.
Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/agda/attachments/20190303/d2e719eb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex04-bug.agda
Type: application/octet-stream
Size: 1916 bytes
Desc: ex04-bug.agda
URL: <http://lists.chalmers.se/pipermail/agda/attachments/20190303/d2e719eb/attachment.obj>
More information about the Agda
mailing list