Questions tagged [isar]

Intelligible semi-automated reasoning (Isar) is an approach to human readable formal proof documents (as opposed to state-based scripting).

95 questions
0
votes
1 answer

Concrete Semantics Chapter 7 Question 1 structured Isar Proof

I am trying to produce a structured Isar proof for Chapter 7 Question 1 in Concrete Semantics, but I am having trouble defining the proper assumptions and induction hypotheses for the inductive cases. fun assigned :: "com ⇒ vname set"…
0
votes
0 answers

How to define the range lemma like star

Based on the repositoy in AFP, I plan to extend the library of regexp in Isabelle. Here I try to prove the range regexp in below which is similay to star. The index of star could start from zero(empty list) to infinite. The range starts from nat m…
Hongjian Jiang
  • 307
  • 1
  • 6
0
votes
1 answer

Trouble with extremely basic Isabelle/ISAR proofs

I am just starting to learn Isabelle/ISAR, and I wanted to try some basic logic proofs. My core issue is that even when I copy proofs straight out of an instruction manual, I am still getting errors. I am copying from the following pdf: Isabelle…
saltine
  • 1
  • 2
0
votes
0 answers

How to write a lemma form like implication in Isabelle

I've a LTS system below, and try to prove from a same start node to end node, the accept list would be empty. The condition is that the two nodes are both the accept node(final node), thus the idea is simple. type_synonym ('q,'a) LTS = "('q * 'a set…
Hongjian Jiang
  • 307
  • 1
  • 6
0
votes
1 answer

Isar: Failed to retrieve literal fact

I have the following code: assume H: "x ≠ xa ∧ x ∈ elems xs" (is "?H1 ∧ ?H2") hence "?H1" and "?H2" by auto from Cons.IH[OF `?H2` ] have 1: "∃ys zs. xs = ys @ x # zs ∧ x ∉ elems ys" by simp then obtain ys zs where 2: "xs = ys @ x #…
cxandru
  • 158
  • 8
0
votes
0 answers

Encoutered an error while opening isar db inspector link

I want to open isar inspector link but i'm getting an error. How i opened isar: Future openDB() async { if (Isar.instanceNames.isEmpty) { return await Isar.open( [CourseSchema, StudentSchema, TeacherSchema], …
YMIB
  • 1
0
votes
0 answers

Isar : 'try' and everything else failed to proof these lemmas

datatype alpha = a | b inductive S :: "alpha list ⇒ bool" where empty [simp]: "S []" | step1 [simp]: "S w ⟹ S (a # w @ [b])" | step2 [simp]: "⟦S w1; S w2⟧ ⟹ S (w1 @ w2)" fun balanced :: "nat ⇒ alpha list ⇒ bool" where "balanced 0 [] = True…
一十一
  • 1
  • 2
0
votes
1 answer

Isabelle: variable x occurs on right hand side only

inductive S :: "alpha list ⇒ bool" where empty : "S []" | step1 : "S w ⟹ S (a # w @ [b])" | step2 : "⟦S w1; S w2⟧ ⟹ S (w1 @ w2)" inductive T :: "alpha list ⇒ bool" where empty : "T []" | step : "⟦T w1; T w2⟧ ⟹ T (w1 @ [a] @ w2 @ [b])" fun…
一十一
  • 1
  • 2
0
votes
0 answers

Are there Isabelle/Isar proof strategies to prove lemmas about non-inductive definitions?

I have Isabelle theory with non-inductive definition (I would like to model algorithms avoiding induction as usually is done by industrial developers) and lemma that is stated for this definition: theory Maximum imports (* Main *) …
TomR
  • 2,696
  • 6
  • 34
  • 87
0
votes
1 answer

Proving basic properties of recursive "less than" definition for naturals in Isabelle

I was trying to recreate a simplified version of the natural numbers, for learning purposes (as it involves inductive definitions, recursive functions, etc...). In that process however, I got stuck in something that I thought would be very…
Luiz Martins
  • 1,644
  • 10
  • 24
0
votes
1 answer

Accumulating results while using them in Isabelle/Isar

Sometimes in a proof I find myself needing to accumulate results, but also needing use the last result, so I end up using "also then" for that purpose: proof have ... also then have ... also then have ... ultimately show ... qed I feel like…
Luiz Martins
  • 1,644
  • 10
  • 24
0
votes
1 answer

Referencing current assumptions in Isabelle

When I have a lot of assumptions, sometimes I end up with a lot of temporary names that clutter the proof. I'm talking about things like this: lemma foo: ... proof assume P: ... and Q: ... and R: ... then have ... then have ... using P ... …
Luiz Martins
  • 1,644
  • 10
  • 24
0
votes
1 answer

Isabelle "Failed to apply proof method" when working with two theory files

I have theory file Test_Func.thy which I have copied in Isabelle src/HOL and which defines function add_123: theory Test_Func imports Main begin fun add_123 :: "nat ⇒ nat ⇒ nat" where "add_123 0 n = n" | "add_123 (Suc m) n = Suc(add_123 m…
TomR
  • 2,696
  • 6
  • 34
  • 87
0
votes
1 answer

How to use the base case assumption when proving with 'induct' in Isabelle

Say I'm proving a theorem that assumes "n ≥ m" (both are natural numbers), and I apply induction on n. In the base case, the assumption is that "n = 0". With these two, we can conclude that, in the base case, "m = 0". However, I'm having trouble in…
Luiz Martins
  • 1,644
  • 10
  • 24
0
votes
1 answer

what's the distinction between `shows` and `obtains` in Isabelle Isar?

I am trying to understand the difference between the shows and obtains commands in Isar (as of Isabelle 2020). The documentation in isar-ref.pdf (pp 137.) seems to have some typo and confuses me. ... Moreover, there are two kinds of conclusions:…
thor
  • 21,418
  • 31
  • 87
  • 173