*To*: "cl-isabelle-users at lists.cam.ac.uk" <cl-isabelle-users at lists.cam.ac.uk>*Subject*: [isabelle] Make all selectors measure_functions?*From*: Joachim Breitner <breitner at kit.edu>*Date*: Fri, 05 Feb 2016 14:59:40 +0100

Dear Isabelle list, I was surprised to find that one function definition involving a type (t1ÂÃ t2) would work, but the equivalent function definition involving a custom data type isomorphic to (t1ÂÃ t2) (i.e. one constructor with two fields) would not work. See http://stackoverflow.com/questions/35225110/termination-checking-for-product-types for the example. The reason is, of course, that the selectors of the pair type are set up as measure functions: lemma measure_fst[measure_function]: "is_measure f â is_measure (Îp. f (fst p))" by (rule is_measure_trivial) lemma measure_snd[measure_function]: "is_measure f â is_measure (Îp. f (snd p))" by (rule is_measure_trivial) and doing something similar for my custom type solves the problem. But it was still surprising, so I wonder if there is a reason not to register a similar measure function for product data types by default. Concrete proposal for your consideration: For product data types datatype t = C tâ ... tâ automatically generate the equivalent of Â Âlemma measure_t[measure_function]: Â Â Â"is_measure f â is_measure (Î t. case t of C tâ ... tâÂâ (tâ,...,tâ)".. Greetings, Joachim -- Dipl.-Math. Dipl.-Inform. Joachim Breitner Wissenschaftlicher Mitarbeiter http://pp.ipd.kit.edu/~breitner

**Attachment:
signature.asc**

**Follow-Ups**:**Re: [isabelle] Make all selectors measure_functions?***From:*Dmitriy Traytel

- Previous by Date: Re: [isabelle] strong and weak premises
- Next by Date: Re: [isabelle] Isabelle2016-RC3 -- jEdit build fails when session loaded from different directory
- Previous by Thread: Re: [isabelle] strong and weak premises
- Next by Thread: Re: [isabelle] Make all selectors measure_functions?
- Cl-isabelle-users February 2016 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