isabelle

“Extra type variables in representing set” while defining type in Isabelle

♀尐吖头ヾ 提交于 2020-03-26 06:57:26
问题 I'm working on a theory that uses topology and it would be helpful to have a type of open sets. I tried the following: context topology begin typedef openset = "{U. U ∈ T}" end where topology is a locale and the context command correctly gives the output locale topology = fixes T :: "'a set set" assumes "topology T" However, I get the following error: Extra type variables in representing set: "'a" The error(s) above occurred in typedef "openset" What does it mean? Here T is just a set of sets

The foundations of Isabelle [closed]

微笑、不失礼 提交于 2020-03-18 18:58:40
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . I started programming proofs in Isabelle one year and a half ago. Back then I mostly wrote Isabelle/Isar proofs. More recently, I have been doing a little of programming at the Isabelle/ML level. I found very inspiring this PhD thesis that describes the construction of Isar. I was wondering if there

The foundations of Isabelle [closed]

白昼怎懂夜的黑 提交于 2020-03-18 18:58:33
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . I started programming proofs in Isabelle one year and a half ago. Back then I mostly wrote Isabelle/Isar proofs. More recently, I have been doing a little of programming at the Isabelle/ML level. I found very inspiring this PhD thesis that describes the construction of Isar. I was wondering if there

Refining a definition in Isabelle

一世执手 提交于 2020-02-04 08:58:57
问题 I have the following definition in Isabelle (for details see here): definition gluing :: "(((real × real) × bit) × (real × real) × bit) set" where "gluing = {(((x0,y0),l),((x1,y1),j)). ((x0,y0) ∈ e_circ ∧ (x1,y1) = τ (x0,y0) ∧ j = l+1) ∨ (x0 = x1 ∧ y0 = y1 ∧ l = j)}" Now, this gluing is supposed to be defining an equivalence relation over the set: e_aff × (range Bit) So I would like to refine the type: (real × real) × bit to this. If I do it directly on the definition of gluing I get:

Isabelle/HOL: What does the THE construct denote?

丶灬走出姿态 提交于 2020-01-30 05:50:07
问题 I saw the construct THE x. A in the source code of the Isabelle/HOL standard library. What does this construct denote? It seems to be similar to SOME x. A . 回答1: THE is a description operator like SOME , but with a weaker axiomatization. THE x. P x denotes the unique value that satisfies the predicate P provided that such a unique value exists. If not, THE x. P x is unspecified. It is also known as Russell's description operator. So if you use THE , then whenever you want to prove anything

Partially applied constant on left hand side of code equation

不羁的心 提交于 2020-01-16 09:03:09
问题 I need to use nat_plus_commute.fold_set_fold_remdups code equation instead of Finite_Set.fold_def : interpretation nat_plus_commute: comp_fun_commute "plus :: nat ⇒ nat ⇒ nat" by standard auto declare Finite_Set.fold_def [code del] declare nat_plus_commute.fold_set_fold_remdups [code] The problem is that the first equation is defined only for plus operation and so I get the following warning: Partially applied constant "Groups.plus_class.plus" on left hand side of equation, in theorem: Finite

What is an Isabelle/HOL subtype? What Isar commands produce subtypes?

橙三吉。 提交于 2020-01-10 02:53:24
问题 I'd like to know about Isabelle/HOL subtypes. I explain a little about why it's important to me in my partial answer to my last SO question: Trying to Treat Type Classes and Sub-types Like Sets and Subsets Basically, I only have one type, so it might be useful to me if I could exploit the power of HOL types through subtypes. I've done searches in the Isabelle documentation, on the Web, and on the Isabelle mailing lists. The word "subtype" is used, though not much, and it seems like it's not a

Generating code from locales without interpretation

 ̄綄美尐妖づ 提交于 2020-01-06 23:57:29
问题 I would love to generate code from locale definitions directly, without interpretation. Example: (* A locale, from the code point of view, similar to a class *) locale MyTest = fixes L :: "string list" assumes distinctL: "distinct L" begin definition isInL :: "string => bool" where "isInL s = (s ∈ set L)" end The assumptions to instantiate MyTest are executable and I can generate code for them definition "can_instance_MyTest L = distinct L" lemma "can_instance_MyTest L = MyTest L" by(simp add

How to generate code for the existential quantifier

孤者浪人 提交于 2020-01-05 12:52:54
问题 Here is a sample theory: datatype ty = A | B | C inductive test where "test A B" | "test B C" inductive test2 where "¬(∃z. test x z) ⟹ test2 x" code_pred [show_modes] test . code_pred [show_modes] test2 . values "{x. test2 A}" The generated code tries to enumerate over ty . And so it fails. I'm tring to define an executable version of test predicate: definition "test_ex x ≡ ∃y. test x y" definition "test_ex_fun x ≡ Predicate.singleton (λ_. False) (Predicate.map (λ_. True) (test_i_o x))" lemma

How to lift a transitive relation from elements to lists?

落花浮王杯 提交于 2020-01-05 06:43:55
问题 I'm trying to prove that a transitive relation on elements of lists is equivalent to a transitive relation on lists (under some conditions). Here is a first lemma: lemma list_all2_rtrancl1: "(list_all2 P)⇧*⇧* xs ys ⟹ list_all2 P⇧*⇧* xs ys" apply (induct rule: rtranclp_induct) apply (simp add: list.rel_refl) by (smt list_all2_trans rtranclp.rtrancl_into_rtrancl) And here is a symmetric lemma: lemma list_all2_rtrancl2: "(⋀x. P x x) ⟹ list_all2 P⇧*⇧* xs ys ⟹ (list_all2 P)⇧*⇧* xs ys" apply (erule