Re: [isabelle] primrec of datatype containing fset



Hi Jeremy and Lars,


Special care is needed when recursing through permutative structures like sets and multisets. For example, the primrec version discussed here is _not_ equal to the 'fun' version of 'count', since it recursively collapses the numbers coming from subtrees that happen to have the same count. The 'fun' version is the correct one.


All the best,


Andrei


________________________________
From: cl-isabelle-users-bounces at lists.cam.ac.uk <cl-isabelle-users-bounces at lists.cam.ac.uk> on behalf of Lars Hupel <hupel at in.tum.de>
Sent: 09 July 2017 11:28
To: Siek, Jeremy
Cc: cl-isabelle-users at lists.cam.ac.uk
Subject: Re: [isabelle] primrec of datatype containing fset

> Thank you for your very thorough answer! It looks like option 1 will
suite
> my needs.

On second thought, I realised that your use of "ffold" is merely to
compute the sum of some things in a set. Luckily, we can make "function"
cope with that. See attachment for a possible solution (also a version with
"primrec" that doesn't use "ffold").

Cheers
Lars



This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.