Re: [isabelle] Converting bool to {0,1}



Hi Christoph,

> in the course of developing our auction theory toolbox (see previous
> announcement), several questions occurred.  Let me start with a trivial
> one, but harder ones will follow:
> 
> Is there a built-in function that converts {False, True} to {0, 1}, i.e.
> that would do the job of "if x then 1 else 0"?

No, there isn't (yet).  In Library/Bit.thy, there is an isomorphic type
of bits 0/1, which might be helpful in your case also.

> BTW, is there a way of searching for definitions of a given type,
> similar to find_theorems?

find_consts is your friend.

Cheers,
	Florian

-- 

PGP available:
http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_informatik_tu_muenchen_de

Attachment: signature.asc
Description: OpenPGP digital signature



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