Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get a complete list of all kinds of operators/constructors of Isabelle?

Tags:

isabelle

For example, Isabelle can represent "and" as "^", "or" as "v".....Is there a way to get a complete list of all of these kinds of operators/constructors?

like image 568
Q.Yang Avatar asked Aug 30 '20 03:08

Q.Yang


2 Answers

There is the print_syntax command, but its output might look a bit intimidating. But, for instance, the following line

logic(55) = logic(55) "∘" logic(56) ⇒ "\<^const>Fun.comp

tells you that the symbol is an infix operator with precedence 55 that maps to the constant Fun.comp. The corresponding declaration is this:

definition comp :: "('b ⇒ 'c) ⇒ ('a ⇒ 'b) ⇒ 'a ⇒ 'c"  (infixl "∘" 55)
  where "f ∘ g = (λx. f (g x))"

The more usual way to discover these notations is to either

  1. try the obvious notation (for many things, it is just what one would expect, as is the case for the function composition above).

  2. Find out what the constant is called and then look around the place where it is defined to see what notation is set up for it.

like image 115
Manuel Eberl Avatar answered Oct 17 '22 17:10

Manuel Eberl


Not that I know of.

A good starting point is the list of all symbols in Main. However, that does not contain all symbols and does not provide a mapping from symbols to definitions.

In general, it is not that useful to find how things are abbreviated:

  • If you have the symbol, you can click on it to find the definition.
  • If you have the symbol and don't know how to type it, you can go the symbol panel of Isabelle/jEdit to see how to type it.
  • If you have the definition, just type term "and a b" and the output shows you the version with the symbol.

So the real question is how to find the right definition, not how to find the right symbol. But that is a lot harder.

like image 40
Mathias Fleury Avatar answered Oct 17 '22 16:10

Mathias Fleury