isabelle

How to hide defined constants

偶尔善良 提交于 2020-01-03 17:04:08
问题 When I import theory files which come with defined constants (for recursive functions or definitions) like f , how can I hide such a constant in the current theory file? In other words, I want to make sure that f is a free variable. I do not want to change the imported files. 回答1: That is exactly the purpose of the hide_const command. E.g., hide_const f will completely remove the defined constant f from the current context (and thus make it inaccessible). If you use hide_const (open) f

Isabelle: how to work with matrices

走远了吗. 提交于 2020-01-02 09:56:37
问题 I started to learn Isabelle, the theorem prover, about 2-3 weeks ago. I am still an absolute beginner and I worked with the tutorial "Programming and Proving in Isabelle/HOL" so far. The only help on matrices I found so far was to look at the source code in the HOL library. Now I want to learn how to prove properties about matrices. The lambda syntax for matrices is still new to me. Are there any tutorials or basic/intermediate examples on using matrices in Isabelle? 回答1: Here is a more

`find_theorems` in the AFP

醉酒当歌 提交于 2020-01-02 07:53:29
问题 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,

Isabelle: Issue with setprod

為{幸葍}努か 提交于 2020-01-01 18:56:25
问题 Does the following equality hold in Isabelle: setprod f (UNIV :: 'n∷finite set) = setprod (λx. x) (f ` (UNIV :: 'n∷finite set)) If yes, how can I prove it? (* tested with Isabelle2013-2 *) theory Notepad imports Main "~~/src/HOL/Library/Polynomial" begin notepad begin{ fix f :: "'n∷finite ⇒ ('a::comm_ring_1 poly)" have "finite (UNIV :: 'n∷finite set)" by simp from this have "setprod f (UNIV :: 'n∷finite set) = setprod (λx. x) (f ` (UNIV :: 'n∷finite set))" sorry (* can this be proven ? *) 回答1

Isabelle: Issue with setprod

牧云@^-^@ 提交于 2020-01-01 18:56:08
问题 Does the following equality hold in Isabelle: setprod f (UNIV :: 'n∷finite set) = setprod (λx. x) (f ` (UNIV :: 'n∷finite set)) If yes, how can I prove it? (* tested with Isabelle2013-2 *) theory Notepad imports Main "~~/src/HOL/Library/Polynomial" begin notepad begin{ fix f :: "'n∷finite ⇒ ('a::comm_ring_1 poly)" have "finite (UNIV :: 'n∷finite set)" by simp from this have "setprod f (UNIV :: 'n∷finite set) = setprod (λx. x) (f ` (UNIV :: 'n∷finite set))" sorry (* can this be proven ? *) 回答1

How to enable “Tracing” in Isabelle/jEdit

感情迁移 提交于 2019-12-30 06:48:07
问题 I'm a vim fan, but only emacs has this Isabelle/HOL environment. jEdit is great, but I cannot use using [[simp_trace=true]] like in emacs . How to enable "Tracing" in jEdit ? 回答1: You can indeed use simp_trace in the middle of a proof in Isabelle/jEdit, like so: lemma "(2 :: nat) + 2 = 4" using [[simp_trace]] apply simp done Alternatively, you can declare it globally, like so: declare [[simp_trace]] lemma "(2 :: nat) + 2 = 4" apply simp done Both give you the simplifier's trace in the "Output

Nested recursion and `Program Fixpoint` or `Function`

我与影子孤独终老i 提交于 2019-12-30 04:49:05
问题 I’d like to define the following function using Program Fixpoint or Function in Coq: Require Import Coq.Lists.List. Import ListNotations. Require Import Coq.Program.Wf. Require Import Recdef. Inductive Tree := Node : nat -> list Tree -> Tree. Fixpoint height (t : Tree) : nat := match t with | Node x ts => S (fold_right Nat.max 0 (map height ts)) end. Program Fixpoint mapTree (f : nat -> nat) (t : Tree) {measure (height t)} : Tree := match t with Node x ts => Node (f x) (map (fun t => mapTree

Isabelle: prove that this set notation of a matrice results in a finite set

蓝咒 提交于 2019-12-25 02:06:08
问题 I am using the development version of Isabelle from the repository. I hope it is a good decicion. Sledgehammer is again greatly improved! The isabelle developpers are really great! The reason for the dev version is that Isabelle2013-2 was crashing too often. How can I prove this lemma: lemma finite_f_A: fixes A :: "('a::comm_ring_1 poly)^'n∷finite^'n∷finite" and f :: "('a::comm_ring_1 poly) ⇒ nat" shows "finite {f (A $ i $ j) | i j. True }" sorry My old proof that is no longer working with

Isabelle: prove that this set notation of a matrice results in a finite set

萝らか妹 提交于 2019-12-25 02:05:08
问题 I am using the development version of Isabelle from the repository. I hope it is a good decicion. Sledgehammer is again greatly improved! The isabelle developpers are really great! The reason for the dev version is that Isabelle2013-2 was crashing too often. How can I prove this lemma: lemma finite_f_A: fixes A :: "('a::comm_ring_1 poly)^'n∷finite^'n∷finite" and f :: "('a::comm_ring_1 poly) ⇒ nat" shows "finite {f (A $ i $ j) | i j. True }" sorry My old proof that is no longer working with

Instantiating axioms about Sequents explicitly

喜欢而已 提交于 2019-12-24 20:24:43
问题 Note: This is a re-asking of the second question here, which turned out to be less related to the first question (answered there) than I thought it would. Consider the following minimal development based on the Isabelle Sequents library: theory Test imports Pure Sequents.Sequents begin syntax "_Trueprop" :: "two_seqe" ("((_)/ ⊢ (_))" [6,6] 5) consts Trueprop :: two_seqi parse_translation ‹[ (@{syntax_const "_Trueprop"}, K (two_seq_tr @{const_syntax Trueprop})) ]› print_translation ‹[ (@{const