*To*: Steve W <s.wong.731 at gmail.com>, isabelle-users <isabelle-users at cl.cam.ac.uk>*Subject*: Re: [isabelle] Type as argument*From*: Brian Huffman <brianh at cs.pdx.edu>*Date*: Fri, 13 May 2011 10:20:49 -0700*In-reply-to*: <BANLkTinYY-raTBNuUT6i-t9pX48g7BU9nQ@mail.gmail.com>*References*: <BANLkTin0NNwByvPfmmnMZGMo0Wm0yrXCBw@mail.gmail.com> <BANLkTinT-2mQ7--5Y9ADLDCOrt9uW_dbVw@mail.gmail.com> <BANLkTinYY-raTBNuUT6i-t9pX48g7BU9nQ@mail.gmail.com>*Sender*: huffman.brian.c at gmail.com

On Fri, May 13, 2011 at 9:55 AM, Steve W <s.wong.731 at gmail.com> wrote: > Thanks. If I change f to a binary function: > class foo = > fixes f :: "int => 'a itself => int" > and with the following instantiation: > instantiation nat :: foo > begin > definition "f 0 (t::nat itself) = 0" > instance .. > end > I get an error on "0::int". It works if 0 is replaced by a free variable > though. Why's that? > Thanks > Steve The "definition" command only allows a single equation with variables for function arguments on the left-hand side. If you want to write definitions with patterns and/or multiple equations, use "fun", "function", "primrec", etc. - Brian

**References**:**[isabelle] Type as argument***From:*Steve W

**Re: [isabelle] Type as argument***From:*Brian Huffman

**Re: [isabelle] Type as argument***From:*Steve W

- Previous by Date: Re: [isabelle] Type as argument
- Next by Date: [isabelle] structured induction
- Previous by Thread: Re: [isabelle] Type as argument
- Next by Thread: Re: [isabelle] Type as argument
- Cl-isabelle-users May 2011 archives indexes sorted by: [ thread ] [ subject ] [ author ] [ date ]
- Cl-isabelle-users list archive Table of Contents
- More information about the Cl-isabelle-users mailing list