Intelligible semi-automated reasoning (Isar) is an approach to human readable formal proof documents (as opposed to state-based scripting).
Questions tagged [isar]
95 questions
3
votes
1 answer
How to use obtain to make forward elimination proofs easier to read?
I'm trying to do basic natural deduction proofs in Isabelle, following this document (particularly slide 23).
I know I can do things like
theorem ‹(A ⟶ B) ⟶ A ⟶ B›
proof -
{
assume ‹A ⟶ B›
{
assume ‹A›
with ‹A ⟶ B› have ‹B› ..
…

Nick Hu
- 43
- 3
3
votes
1 answer
In Isabelle, what do the angle brackets and double asterisks mean?
I'm trying to understand some Isabelle code, and there is some syntax I don't understand. I haven't seen them in tutorials, including the two bundled with the Isabelle2017 distribution, "Programming and Proving in Isabelle/HOL" and "The…

Alex Altair
- 3,246
- 3
- 21
- 37
3
votes
1 answer
Usage of "also have...finally have" in Isabelle
I usually think of also have as working like this:
have "P r Q1" by simp
also have "... r Q2" by simp
also have "... r Q3" by simp
...
also have "... r Qn" by simp
finally have "P r Qn+1" by simp
where "... r Qm" means "Qm-1 r Qm" and r is some…

IIM
- 533
- 3
- 11
3
votes
1 answer
Isabelle: Switching between "structured" and "apply-style" proofs
There are two styles of proof in Isabelle: the old "apply" style, where a proof is just a chain of
apply (this method)
apply (that method)
statements, and the new "structured" Isar style. Myself, I find both useful; "apply" style is more concise,…

John Wickerson
- 1,204
- 12
- 23
2
votes
1 answer
Instantiate type classes in locale contexts
Suppose I have some locale where a type-class can be inferred from the assumptions.
locale some_locale =
fixes xs :: "'x list"
assumes xs_contains_UNIV: "set xs = UNIV"
begin
lemma finite_type: "OFCLASS('x, finite_class)"
proof (intro…

mini
- 48
- 5
2
votes
1 answer
Nested cases Isar
I'm having some issues trying to do exercise 4.5 of 'Concrete Semantics' in Isar:
inductive S :: "alpha list ⇒ bool" where
Sε : "S []" |
aSb : "S m ⟹ S (a#m @ [b])" |
SS : "S l ⟹ S r ⟹ S (l @ r)"
inductive T :: "alpha list ⇒ bool" where
Tε : "T…

cxandru
- 158
- 8
2
votes
3 answers
How to write intermediate proof statements inside Coq - similar to how in Isar one has `have Statement using Lemma1, Lemma2 by auto` but in Coq?
I wanted to write intermediate lemmas inside Coq proof scripts, e.g., inside SCRIPT in Proof. SCRIPT Qed. itself - similar to how one would do in Isar. How does one do this in Coq? e.g.:
have Lemma using Lemma1, Lemma2 by auto.
I am aware of the…

Charlie Parker
- 5,884
- 57
- 198
- 323
2
votes
1 answer
Interaction with Isabelle without GUI
I am trying to implement a command line version of Isabelle/JEdit so I can
Run the Isabelle server in another docker/machine
Allow the integration of more editors like Vim or Emacs
Allow automated agents to examine and write proofs.
From this…

Martingale
- 91
- 4
2
votes
1 answer
Functor-like construction in Isabelle/Isar
Here's a small theorem in mathematics:
Suppose u is not an element of A, and v is not an element of B, and f is an injective function from A to B. Let A' = A union {u} and B' = B union {v}, and define g: A' -> B' by g(x) = f(x) if x is in A, and…

John
- 509
- 1
- 6
- 18
2
votes
1 answer
Skip a subgoal while proving in Isabelle
I am trying to prove a theorem but got stuck at a subgoal (that I prefer to skip and prove later). How can I skip this and prove the others ?
First, I tried oops and sorry but they both abort the entire proof (instead of the only subgoal). I also…

Hai Nguyen Van
- 35
- 3
2
votes
1 answer
What can one assume, what is worth assuming in Isar?
In Isar one uses assume with the premise of the goal so that she can use it building the conclusion.
The Isabelle/Isar Reference
says
assume expects to be able to unify with existing premises in the goal
Is this the only use of assume, namely, to…

Gergely
- 6,879
- 6
- 25
- 35
1
vote
0 answers
How to evaluate Rep of new type in Isabelle?
I'm trying to evaluate terms corresponding to the type t defined as follows.
typedef t = "{(0::nat)..10}" by auto
To evaluate terms of type t, I simply define Abs_t as a constructor.
lemma [code abstype]: "Abs_t (Rep_t x) = x" by (rule…

Username
- 11
- 1
1
vote
1 answer
Work backwards from goal in structured (isar) proof
I have a goal invariant (smallStep fac (i, f)) a r And am proving it by case-splitting over i. I am proving the case i = 0 and I would like to simplify the goal in that case (invariant (smallStep fac (i, f)) a r will simplify given i = 0). However,…

cxandru
- 158
- 8
1
vote
1 answer
How to proceed in Isabelle when the goal has implications and existentials?
I'm trying to write a proof in the Isabelle "structured style" and I'm not sure how to specify the value of existential variables. Specifically, I'm trying to expand the sorrys in this proof:
lemma division_theorem: "lt Zero n ⟹ ∃ q r. lt r n ∧ m =…

lacker
- 5,470
- 6
- 36
- 38
1
vote
1 answer
"Illegal schematic variable(s)" in code generated by proof (cases rule: ...)`
I defined a cases rule for case_option in the hope of making some proofs more readable.
However, when applying it with proof (cases rule: ...) and using the code snippet suggested by the proof statement,
the Isar case syntax tells me Illegal…

mini
- 48
- 5