0

I installed the latest Isabelle/jEdit package to my Windows computer. I used the official package from the Isabelle website. Then I opened tutorials which are on the Isabelle webpage and I started computer experiments. I realized immediately that many examples presented in these tutorials simply do not work in my installation! For example, in this tutorial on the page 5 the following very basic example of Isabelle program is presented:

theory Test imports Main begin
lemma "[a]=[b] ⟹ a=b"
sledgehammer

Nothing of this worked in my installation!

  1. Isabelle complained that the formula "[a]═[b] ⟹ a=b" has inner lexical error: "Failed to parse prop"
  2. When I replaced this formula by working one "(A & B) ⟹ A" the command 'sledgehammer' did not work. I received the message in the goals field

    goal (1 subgoal)

    1. ( A&B ⟹ A) &&& sledgehammer

instead of applying this strange sledgehammer. An attempt to call this sledgehammer by the button of jEdit also failed, I received error message "Missing print function 'sledgehammer'"

So, my question to the community. Is there any WORKING tutorial of Isabelle with Sledgehammer, latest version? Or at least a collection of WORKING examples on the beginner level.

Amateur
  • 119
  • 3
  • I hope you had better luck on the new computer. I just worked through a proof that the square root of primes cannot be rational and put together a LaTex typeset tutorial pdf for the Isabelle newbie (with plenty of screen shots), posted at my Github account: https://github.com/AncientZygote/izzie/blob/main/IsabelleTutorial.pdf (if you download instead of view online, you get hyperlinks within the document, which I find very helpful). – Dalton Bentley Feb 15 '21 at 16:08

2 Answers2

2

Both examples work without any problems on my installation of Isabelle 2015 (and I should be very surprised if it were any different on Isabelle 2014 or 2013).

The reason why Isabelle gives you a lexical error on [a]═[b] ⟹ a=b is that the first equals sign in that formula is not an equals sign, but a boy-drawing character. I have no idea how you managed to get that character in there, but if you replace it with an equals sign, it works.

In the second example, it appears that somehow, ‘sledgehammer’ was parsed as a term, not as a command. I have no idea how that can be (especially not without seeing the exact code you entered), but the following works fine on my installation:

theory Scratch
imports Main
begin

lemma "(A & B) ⟹ A"
sledgehammer

EDIT: Ah, I failed to see that you are using Isabelle for Windows. I have no experience with Isabelle for Windows, but I would guess that there is some problem with Sledgehammer and Isabelle on Windows in your case. If the example I printed before does not work on your installation, I suggest you write an email to the mailing list and report the problem, because it absolutely should work.

In any case, from what I have heard, Isabelle on Windows is somewhat painful and one should ideally use Linux or Mac OS.

On the other hand, Sledgehammer is by no means an essential component of Isabelle. You can easily use and learn Isabelle without Sledgehammer. As a tutorial, I can recommend the book Concrete Semantics. (free PDF version)

Manuel Eberl
  • 7,858
  • 15
  • 24
  • Thank you! I resolved an issue with wrong equality sign (the strange sign in my code was picked up from the list of mathematical symbols suggested by jEdit). But the issue with sledgehammer remains. And I am sorry for my French but when you write that "Sledgehammer is not an essential component of Isabelle" this sounds like "A baby-maker is not an essential component of a human body")) – Amateur Jun 04 '15 at 16:25
2

Update: Added a screenshot and a related link to the Isabelle User's List.

The purpose of the example in the Sledgehammer tutorial is to make sure your setup is working. The problem is that your setup is not working, not that the tutorial is not "WORKING".

I copied and pasted the following:

lemma "[a]=[b] ⟹ a=b"
sledgehammer

It works.

I've been using Sledgehammer extensively for over 3 years in Windows 7. It works now. It worked for me from the beginning. I've just started with Isabelle2015, but what I show below indicates everything is normal.

I pasted in this:

lemma "(A & B) ⟹ A" sledgehammer

It works. It returns

Try this: by simp (0.0 ms)

for z3, spass, cvc4, e, remote_vampire, and remote_e_sine.

It's a mystery to me why people say that Sledgehammer doesn't work on Windows. My guess is it's their anti-virus. I use Norton, and it shuts down the Isabelle installation at times, and even polyml, but never the Sledgehammer provers.

However, Sledgehammer starts external ATP provers: z3, spass, cvc4, and e, so it wouldn't be suprising that anti-virus shuts them down.

Don't Believe Me, Seeing is Believing

Here's a screenshot:

150604a_sledgehammer.png

Martini's problem with Sledgehammer on Windows

A particular Brazilian with a Ph.D in computer science has had problems with Sledgehammer not running on Windows.

Here is a link to the 2015-May threads: https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2015-May/thread.html.

Search on "Alfio Martini" in your browser to see what he has to say in the different posts. He starts it off here: Re: [isabelle] Isabelle2015-RC3 available for testing.

(Note: That's not the perfect example of his reporting problems with Sledgehammer. In another post, possibly not in May, he talked about Sledgehammer not working at all.)

Posts about problems for a release candidate can be hard to follow because multiple problems get posted under the same title.

Basically, he says that Sledgehammer has never worked for him on Windows. That is the opposite of my experience. Sledgehammer has always worked for me within reason, that is, given the normal "bugs" of a modern piece of software.

In different posts to the list, he says several things, like that he's using Windows 8.1. It appears that he had several anti-virus programs running, one of them being an "old one lying around".

The end result is that it appears he got it running, but never explained in detail what he did to get it running.

He mentioned several problems with Sledgehammer that I'm sure have nothing to do with "Sledgehammer not working at all", such as problems related to cvc4.

If Sledgehammer never returns on a simple lemma, as he describes, there's a major problem that needs to be resolved with the setup.

I have never had a major problem with Sledgehammer on Windows 7. I have had Norton shut down poly.exe and not notify me about it, which caused me a lot of grief until I figure it out.

  • Thank you for your answer! I now tried to install Isabelle/jEdit on my other Windows computer and everything works now! The difference is that the former computer has Windows Vista and the latter one has Windows 7. So probably an issue with Sledgehammer not working is related to used version of Windows. – Amateur Jun 04 '15 at 20:31