What is the best way to search through general definitions, theorems, functions, etc for Isabelle?

北慕城南 提交于 2020-05-29 02:35:49

问题


I was trying to go through the Isar chapter for Isabelle (theorem Prover) and the first statement has:

lemma "¬ surj(f :: 'a ⇒ 'a set)"

I wanted to understand what the constant surj was. I know that it's easy to look up theorems with:

thm notI

which displays:

(?P ⟹ False) ⟹ ¬ ?P

I tried googling surj but nothing useful came up.

I went to the documentation (https://isabelle.in.tum.de/documentation.html) but I couldn't find an easy way to search through it (e.g. with a search bar).

How do people search for definitions or general stuff when doing proofs? How do you look up things for Isabelle in an effective manner without having to resort to SO etc for trivial stuff (that I should probably be able to look up myself)? Like a man command or a -help flag etc?


I realized that there is a Query box at the bottom so I gave it a go. But it showed me 38 theorems. Thats good progress BUT I feel that because when I stated my lemma Isabelle knows exactly which one it is using. Is there a way to force Isabelle to reveal what definition it's using (since it obviously HAS to know what it's using).


I just noticed that:

thm surj_def

displays:

surj ?f = (∀y. ∃x. y = ?f x)

does display something...the question was worth it cuz I discovered the Query box but it would still be great how people develop in Isabelle regardless.


Edit:

it would also be nice if it linked to docs of tactics explaining what they did or something like that...


回答1:


If you have loaded the theory, you can jump to the definition by ctrl+click.

If not, and you don't know where the constant is defined, you can use the FindFacts web search (full disclaimer: I built it).

Here is a query for your surj question.



来源:https://stackoverflow.com/questions/61777833/what-is-the-best-way-to-search-through-general-definitions-theorems-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!