*To*: cl-isabelle-users at lists.cam.ac.uk*Subject*: Re: [isabelle] Overloading causes strange clash of specifications*From*: OndÅej KunÄar <kuncar at in.tum.de>*Date*: Mon, 01 Jun 2015 14:40:10 +0200*In-reply-to*: <556C48DE.3090705@inf.ethz.ch>*References*: <556C48DE.3090705@inf.ethz.ch>*User-agent*: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hi Andreas,

The following works around the problem: overloading R' â "R :: (nat â 'a) â (nat â 'b) â bool" begin

end Ondrej On 06/01/2015 01:58 PM, Andreas Lochbihler wrote:

Dear all, I am trying to overload a constant using the overloading target. However, I get an error that my specifications clash, even though I cannot see why. Here is the minimised example: consts R :: "'a â 'b â bool" overloading R' â "R :: (nat â 'a) â (nat â 'b) â bool" begin definition R_nat_def: "R' f g = (âx. R (f x) (g x))" end overloading R' â "R :: ('a list â 'b) â ('c list â 'd) â bool" begin definition R_list_def: "R' f g = (âxs ys. R (f xs) (g ys))" end The second definition raises the error, but the two definitions should be fine as the types of the overloaded constant cannot be unified and the recursive calls to R occur only at smaller types. Interestingly, if I throw out one parameter, everything works fine: consts P :: "'a â bool" overloading P' â "P :: (nat â 'a) â bool" begin definition P_nat_def: "P' (f :: nat â 'a) = (âx. P (f x))" end overloading P' â "P :: ('b list â 'a) â bool" begin definition P_list_def: "P' (f :: 'b list â 'a) = (âx. P (f x))" end So what is going on here? Why does the two parameter-case fail? And how can I avoid the failure? Thanks in advance for any hints, Andreas

**Follow-Ups**:**Re: [isabelle] Overloading causes strange clash of specifications***From:*Andreas Lochbihler

**References**:**[isabelle] Overloading causes strange clash of specifications***From:*Andreas Lochbihler

- Previous by Date: Re: [isabelle] Isabelle style guide
- Next by Date: Re: [isabelle] Overloading causes strange clash of specifications
- Previous by Thread: [isabelle] Overloading causes strange clash of specifications
- Next by Thread: Re: [isabelle] Overloading causes strange clash of specifications
- Cl-isabelle-users June 2015 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