Re: [isabelle-dev] top and bot

2010-05-03 Thread Florian Haftmann
Hi Brian

 Every time I use the overloaded constants top and bot (defined in
 Orderings.thy), Isabelle prints them out as top_class.top and
 bot_class.bot, instead of just top and bot. I find this
 annoying, so I tried to find out the reason for this.

 class top = preorder +
   fixes top :: 'a
   assumes top_greatest [simp]: x \le top

 class bot = preorder +
   fixes bot :: 'a
   assumes bot_least [simp]: bot \le x

The fact that both class predicate and class operation have the same
base name is indeed confusing.  Meanwhile it should be possible to
insert a non-mandatory qualifier into the name binding of the class
predicate, e.g. pred, or even class.  Any objections?

Florian

-- 

Home:
http://www.in.tum.de/~haftmann

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



signature.asc
Description: OpenPGP digital signature
___
Isabelle-dev mailing list
Isabelle-dev@mailbroy.informatik.tu-muenchen.de
https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev


Re: [isabelle-dev] top and bot

2010-05-03 Thread Brian Huffman
On Mon, May 3, 2010 at 4:55 AM, Florian Haftmann
florian.haftm...@informatik.tu-muenchen.de wrote:
 class top = preorder +
   fixes top :: 'a
   assumes top_greatest [simp]: x \le top

 class bot = preorder +
   fixes bot :: 'a
   assumes bot_least [simp]: bot \le x

 The fact that both class predicate and class operation have the same
 base name is indeed confusing.  Meanwhile it should be possible to
 insert a non-mandatory qualifier into the name binding of the class
 predicate, e.g. pred, or even class.  Any objections?

Let me see if I understand your proposal correctly.

Currently, the declaration for class top defines two constants:

class predicate: Orderings.top
overloaded constant: Orderings.top_class.top

In your proposed scheme, these would be changed to

class predicate: Orderings.pred.top
overloaded constant: Orderings.top_class.top

So in the new system, term top would still print out as
top_class.top. But it would be possible to write pred.top to
unambiguously refer to the class predicate (which is not currently
possible), and in turn this would enable us to use the hide_const
like this:

hide_const (open) Orderings.pred.top

which would make top just print out as top. Is this right?

It sounds like a sensible idea to me, although we should make sure we
understand how it would affect the situation with class finite. It
would be best if any change we make avoids ugly workarounds in all
situations (top/bot as well as finite).

- Brian
___
Isabelle-dev mailing list
Isabelle-dev@mailbroy.informatik.tu-muenchen.de
https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev