isabelle

How can I easily write simple tactics at the ML level of Isabelle?

删除回忆录丶 提交于 2021-02-18 05:20:26
问题 In an Isabelle theory file, I can write simple one-line tactics such as the following: apply (clarsimp simp: split_def split: prod.splits) I find, however, when I start writing ML code to automate proofs, to produce an ML tactic object, these one-liners become rather verbose: clarsimp_tac (Context.proof_map ( Simplifier.map_ss (fold Splitter.add_split @{thms prod.splits}) #> Simplifier.map_ss (fn ss => ss addsimps [@{thm split_def}])) @{context}) 1 Is there an easier way to write the simple

Why are the following trivial self-equalities needed in the Isabelle/Isar proof?

℡╲_俬逩灬. 提交于 2021-02-15 07:35:55
问题 I am trying to learn isabelle/Isar and make sense out of the following simple proof about mod from Rings.thy . I made a copy of the type class to avoid clashing with the original: class semiring_modulo1 = comm_semiring_1_cancel + divide + modulo + assumes div_mult_mod_eq: "a div b * b + a mod b = a" begin Then this is the lemma whose proof confuses me. The first line makes sense as it uses a previous theorem and rewrites it by symmetry. But the next two lines look really strange. Each of them

Why are the following trivial self-equalities needed in the Isabelle/Isar proof?

谁说我不能喝 提交于 2021-02-15 07:34:41
问题 I am trying to learn isabelle/Isar and make sense out of the following simple proof about mod from Rings.thy . I made a copy of the type class to avoid clashing with the original: class semiring_modulo1 = comm_semiring_1_cancel + divide + modulo + assumes div_mult_mod_eq: "a div b * b + a mod b = a" begin Then this is the lemma whose proof confuses me. The first line makes sense as it uses a previous theorem and rewrites it by symmetry. But the next two lines look really strange. Each of them

Casting int to nat in Isabelle

一笑奈何 提交于 2021-02-11 12:38:14
问题 How can I cast an int to nat in Isabelle when I'm sure that it is positive? value "((-10)::int) mod 3" for example gives 2 and if I'm correct any application of modulo on an int should result in a nat. Unfortunately the type signature of modulo is 'a => 'a => 'a so I cannot fix 3 to a nat beforehand and the result will be an int. 回答1: You can use value "nat (((-10)::int) mod 3)" . 来源: https://stackoverflow.com/questions/57027062/casting-int-to-nat-in-isabelle

Why is Isabelle/HOL 2018 showing error without error message?

隐身守侯 提交于 2021-02-10 16:41:38
问题 For a uni project I'm working on a proof with Iabelle/HOL 2018. I'm getting an error when applying obvious results. However, this error is not stating anything about what is going wrong. At first I thought it was an unification problem. But when I simplified it turned out to be a behavior I totally don't understand. I have a minimal example which is as follows: I define proposition formulas as type1 and then I have a tail-recursive function that simply collects each sub formula. There are

Isabelle Server on another machine?

岁酱吖の 提交于 2021-02-07 20:17:10
问题 I want to use Isabelle on weaker laptops and delegate the heavy theorem search/proving to a server on the network. I would guess that this has been done before but I could not find tutorials or reports for this task. The Isabelle System Manual describes how to run the Isabelle backend on its own. However I don't understand from the manual how to connect one of the existing frontends (e.g. Isabelle/jEdit) to such a process. The setup should ideally work for multiple users (and with theory

Fixing type variables in locale extensions

≡放荡痞女 提交于 2021-02-07 20:14:36
问题 Given this code locale A = fixes foo :: "'a" locale B = A + fixes bar :: "'a × 'a" locale C' = A + fixes baz :: "'a" begin sublocale B foo "(foo, baz)". end I get Type unification failed Failed to meet type constraint: Term: (foo, baz) :: 'b × 'a Type: 'b × 'b so it seems that Isabelle does not understand that baz and foo should be of the same type. Is there a way to fix this? 回答1: The problem is with your declaration of locales B and C . The declaration for B is equivalent to the following

Fixing type variables in locale extensions

北战南征 提交于 2021-02-07 20:09:55
问题 Given this code locale A = fixes foo :: "'a" locale B = A + fixes bar :: "'a × 'a" locale C' = A + fixes baz :: "'a" begin sublocale B foo "(foo, baz)". end I get Type unification failed Failed to meet type constraint: Term: (foo, baz) :: 'b × 'a Type: 'b × 'b so it seems that Isabelle does not understand that baz and foo should be of the same type. Is there a way to fix this? 回答1: The problem is with your declaration of locales B and C . The declaration for B is equivalent to the following

hiding operators to avoid ambiguities in the AST

半世苍凉 提交于 2021-02-07 13:34:20
问题 I'm trying the list example from the official Isabelle tutorial. I replaced the # with : and the @ with ++ to have the same syntax as Haskell. Now I get warnings about ambiguities in the AST. I know that I can hide functions with hide_const but this doesn't work for operators in infix notation. How can I hide operators in Isabelle? The exact warning message is: Ambiguous input⌂ produces 2 parse trees: ("\<^const>HOL.Trueprop" ("\<^const>HOL.eq" ("\<^const>Map.map_add" ("/<^const>toylist.list

hiding operators to avoid ambiguities in the AST

送分小仙女□ 提交于 2021-02-07 13:33:25
问题 I'm trying the list example from the official Isabelle tutorial. I replaced the # with : and the @ with ++ to have the same syntax as Haskell. Now I get warnings about ambiguities in the AST. I know that I can hide functions with hide_const but this doesn't work for operators in infix notation. How can I hide operators in Isabelle? The exact warning message is: Ambiguous input⌂ produces 2 parse trees: ("\<^const>HOL.Trueprop" ("\<^const>HOL.eq" ("\<^const>Map.map_add" ("/<^const>toylist.list