[Agda] Does the order of patterns matter?
Altenkirch Thorsten
psztxa at exmail.nottingham.ac.uk
Thu Sep 27 13:06:51 CEST 2012
On 27/09/2012 11:51, "Martin Escardo" <m.escardo at cs.bham.ac.uk> wrote:
>Already in definitions by pattern matching on natural
>numbers there is a departure from Martin-Lof type theory, because in
>MLTT you need an inductive definition to even compute the predecessor
>function.
I don't understand this remark.
Certainly we can define
pred : Nat -> Nat
pred 0 = 0
pred (suc n) = n
without any difficulties.
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 send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
More information about the Agda
mailing list