isabelle

Isabelle: transpose a matrix that includes a constant factor

元气小坏坏 提交于 2019-12-08 10:04:34
问题 In my Isabelle theory I have a matrix with a constant factor: ... k :: 'n and c :: 'a (χ i j. if j = k then c * (A $ i $ j) else A $ i $ j) I can calculate the transposed matrix: (transpose (χ i j. if j = k then c * (A $ i $ j) else A $ i $ j)) In my eyes the latter should be equivalent to (χ i j. if i = k then c * (A $ j $ i) else A $ j $ i)) by the definition of transpose . But this is not true. What is my error here? By the way, the definition of transposed is: definition transpose where "

How type casting is possible in isabelle

橙三吉。 提交于 2019-12-08 09:52:43
问题 Supose I have the following code in Isabelle: typedecl type1 typedecl type2 typedecl type3 consts A::"type1 set" B::"type2 set" When I want to use union operation with A and B as bellow: axiomatization where c0: "A ∪ B = {}" Since A and B are sets of different types, I get an error of clash of types which makes sense! As a workaround I want to type cast A and B to both become sets of type "type3", so I can apply union operations to them. How this type casting is possible in isabelle in this

Isabelle: getting three different results with sledgehammer for what seems to be identical lemmas

家住魔仙堡 提交于 2019-12-08 06:40:29
问题 You need this to have my imports: (* tested with Isabelle2013-2 *) theory Notepad imports Main "~~/src/HOL/Library/Polynomial" begin notepad begin I have three almost identical lemmas. Version1: { fix a :: "('a:: comm_ring_1) poly" have "degree((monom 1 1) -CONST pCons a 0) =1" sledgehammer Version2: { fix a :: "('a:: comm_ring_1) poly" def p ≡ "(monom 1 1) - CONST pCons a 0" from p_def have "degree p = 1" Version3: { fix a :: "('a:: comm_ring_1) poly" have "p ≡ (monom 1 1) - CONST pCons a 0

Fix a field with characteristic different from 2 in Isabelle

只谈情不闲聊 提交于 2019-12-08 04:43:20
问题 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? 回答1: 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

Isabelle - exI and refl behavior explanation needed

血红的双手。 提交于 2019-12-08 00:27:30
问题 I am trying to understand the lemma below. Why is the ?y2 schematic variable introduced in exI ? And why it is not considered in refl (so: x = x )? lemma "∀x. ∃y. x = y" apply(rule allI) (* ⋀x. ∃y. x = y *) thm exI (* ?P ?x ⟹ ∃x. ?P x *) apply(rule exI) (* ⋀x. x = ?y2 x *) thm refl (* ?t = ?t *) apply(rule refl) done UPDATE (because I can't format code in comments): This is the same lemma with a different proof, using simp . lemma "∀x. ∃y. x = y" using [[simp_trace, simp_trace_depth_limit =

What is a Quotient type pattern in Isabelle?

和自甴很熟 提交于 2019-12-07 16:36:12
问题 What is a "Quotient type pattern" in Isabelle? I couldn't find any explanation over the internet. 回答1: It would be better if you would quote a little from where you saw the phrase. I know of "pattern matching," and I know of "quotient type," but I don't know of "quotient type pattern." I prefer not to ask for clarification, and then wait, so I pick two of the three words, "quotient type." If I'm on the wrong track, it's still a worthy subject, and a big and important part of Isabelle/HOL.

Isabelle and Scala [closed]

…衆ロ難τιáo~ 提交于 2019-12-07 16:20:56
问题 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 3 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. 回答1: For posterity, quoting myself from an older answer: Isabelle

Defining overloaded constants in Isabelle

大兔子大兔子 提交于 2019-12-07 06:46:04
问题 How can one define a function in Isabelle that has a different definition depending on either the type of its argument, or the type of the context it is used in? For example, I might want to define a functions is_default with type 'a ⇒ bool , where each different type 'a has a potentially different "default value". (I am also assuming, for the sake of argument, that existing concepts such as zero are not suitable.) 回答1: This kind of overloading looks like a perfect fit for type classes. First

Isabelle: getting three different results with sledgehammer for what seems to be identical lemmas

泪湿孤枕 提交于 2019-12-07 03:04:28
You need this to have my imports: (* tested with Isabelle2013-2 *) theory Notepad imports Main "~~/src/HOL/Library/Polynomial" begin notepad begin I have three almost identical lemmas. Version1: { fix a :: "('a:: comm_ring_1) poly" have "degree((monom 1 1) -CONST pCons a 0) =1" sledgehammer Version2: { fix a :: "('a:: comm_ring_1) poly" def p ≡ "(monom 1 1) - CONST pCons a 0" from p_def have "degree p = 1" Version3: { fix a :: "('a:: comm_ring_1) poly" have "p ≡ (monom 1 1) - CONST pCons a 0 ⟹ degree p = 1" Here is the result of running sledgehammer, showing only the e theorem-prover results;

Drop a premise in a goal in apply style

♀尐吖头ヾ 提交于 2019-12-07 02:25:37
问题 let's assume I want to show the following lemma lemma "⟦ A; B; C ⟧ ⟹ D" I get the goal 1. A ⟹ B ⟹ C ⟹ D However, I don't need B . How can I transfer my goal to something like 1. A ⟹ C ⟹ D I don't want to alter the original lemma statement, just the current goal in apply style. 回答1: What you want is apply (thin_tac B) . However, the last time I did this, Peter Lammich shouted "Oh god, why are you doing this!" in disgust and rewrote my proof in order to get rid of the thin_tac. So using this