isabelle

proof (rule disjE) for nested disjunction

余生颓废 提交于 2019-12-07 01:01:06
问题 In Isar-style Isabelle proofs, this works nicely: from `a ∨ b` have foo proof assume a show foo sorry next assume b show foo sorry qed The implicit rule called by proof here is rule conjE . But what should I put there to make it work for more than just one disjunction: from `a ∨ b ∨ c` have foo proof(?) assume a show foo sorry next assume b show foo sorry next assume c show foo sorry qed 回答1: While writing the question, I had an idea, and it turns out to be what I want: from `a ∨ b ∨ c` have

Fix a field with characteristic different from 2 in Isabelle

巧了我就是萌 提交于 2019-12-06 16:22:23
I did a proof for elliptic curves taking as a base field the reals. Now I want to change the reals by an arbitrary field which has characteristic different from 2, so that from the equation 2x = 0 one can deduce that x = 0. How does one phrase this in a proof assistant like Isabelle? In essence, you can use class ell_field = field + assumes zero_ne_two: "2 ≠ 0" For example, see The Group Law for Elliptic Curves by Stefan Berghofer . I assume that you wish to work with the class field from the main library of the object logic HOL. Unfortunately, I am not aware of a general treatment of the ring

Trying to generalize a bit vector that uses typedef, bool list, and nat length

僤鯓⒐⒋嵵緔 提交于 2019-12-06 11:08:52
I investigated Coq a little, with its dependent types. I have only the foggiest idea about it all, but now I have in mind that I want a bit vector as a bool list , in which the length of the vector is part of the type. (This question is the possible predecessor of another question. In the next question, if I ask it, I'll ask whether I can recover what I lose, when I use typedef as below.) (For this question, the question is at the bottom) Here are the requirements for the type I want: It has to use bool list , so that I can directly or indirectly do pattern matching and recursion on the list,

Isabelle: maximum value in a vector

邮差的信 提交于 2019-12-06 08:00:55
问题 I would like to find the maximum in a vector of natural numbers. Vector (i.e., ‘vec’), however, is a different type than Set or List. I thought about several ideas that did not work, like leveling or lifting the type of vec or the definition of a recursive function. What solution do you suggest to get the maximum value in a vector? (* IMPORTS: "~~/src/HOL/Algebra/Ring" "~~/src/HOL/Library/Numeral_Type" "~~/src/HOL/Library/Permutations" "~~/src/HOL/Library/Polynomial" "~~/src/HOL/Big_Operators

What is the difference between primrec and fun in Isabelle/HOL?

只愿长相守 提交于 2019-12-06 03:16:06
问题 I'm reading the Isabelle tutorial and been trying to clear my concept on use of primrec and fun. With what I've searched so far, including the answer here; I understand that constructor inside primrec can have only one equation and primrec has [simp] by default whereas fun can have multiple equations and the automation tactics need to be specified explicitly. However, I still struggle to understand it clearly. Anyone kind enough to explain with some examples? 回答1: primrec does primitive

`find_theorems` in the AFP

只愿长相守 提交于 2019-12-05 21:58:20
How can I use the find_theorems mechanism to search the whole Archive of Formal Proofs (AFP)? I have downloaded the archive to my machine, and I am able to import theories from it. For instance, if I write imports Kleene_Algebra.Kleene_Algebra_Models then all the theorems in that theory are successfully made available to me. But if I then type find_theorems <expression> , I only get search results from the specific theory I imported. What if I want to search the whole archive? For instance, perhaps somebody has proved a theorem that is useful to me, but I don't know what they called their

How to use persistent heap images to make loading of theories faster in Isabelle/jEdit?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 20:27:36
Let's assume I have a directory isabelle_afp where a lot of theories are stored. This directory is a library and I do not plan to change the files in it. I want to speed up the start-up time of Isabelle/jEdit (by default, all theories in isabelle_afp my current theory depends on are processed anew). How can I skip this step? The system manual tells me to build a persistent heap image . What is the easiest way to do so? And how can I tell Isabelle/jEdit to load this heap image? Isabelle/jEdit in Isabelle2013 already takes care of building your heap images, by a relatively basic mechanism that

Isabelle and Scala [closed]

懵懂的女人 提交于 2019-12-05 19:57:04
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I am looking at creating an Eclipse PDE and need to communicate with with Isabelle. I do find some publication stating that Scala can be used to communicate to Isabelle. I am looking for an example how to use Scala to create proves in Isabelle. For posterity, quoting myself from an older answer : Isabelle itself is implemented in Standard ML, but for communicating with the external world, it uses a protocol

'real_of_int' and 'real' in Isabelle?

岁酱吖の 提交于 2019-12-05 19:33:40
What are real_of_int , real and int in Isabelle? They sound a bit like types, but usually types are written something like x ::real and these are written like real x . I am having trouble proving the following statement, "S ((n*x)+(-x)) = S (n*x)*C (-x) + C (n*x)*S (-x)" and I noticed that Isabelle writes it as: S (real_of_int (int (n * x) + - int x)) = S (real (n * x)) * C (real_of_int (- int x)) + C (real (n * x)) * S (real_of_int (- int x)) so I'd like to be able to understand what these mean. Johannes When one uses Complex_Main (or a logic based on it like HOL-Analysis , HOL-Probability

How do I generate LaTeX from Isabelle/HOL? [closed]

一笑奈何 提交于 2019-12-05 15:51:03
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How can I use Isabelle/HOL to automatically generate LaTeX from my source theory files? Isabelle/HOL's tutorial.pdf is very beautiful. I'm going to write a paper in LaTeX with a lot of Isabelle code in it. 回答1: You should first have a look at the existing documentation and come back with more specific questions