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
1
vote
1 answer
Recall Isabelle's "Go to the definition" command. (Isar, JEdit)
There exists a shortcut or command which allows one to go straight to the definition of symbol or lemma. (Like "ALT+," in GTAGS for Emacs)
It is quite handy contrary (just imho) to the Coq's one, where one have to do Search command in an IDE.
I…

ged
- 687
- 7
- 19
1
vote
1 answer
How to pass assumptions to interpretation of locale
I would like to use some properties of my structure in the proof required by a locale interpretation
As an example, suppose I defined the predicate P and proved some lemmas (add is a closed binary operation, add is associative and there exists zero…

edoput
- 1,212
- 9
- 17
1
vote
1 answer
Isar proof of conjunction
I'm trying to prove something using Isar; so far, I've gotten to a goal that looks like this:
(∀P Q. P ≠ Q ⟶ (∃!l. plmeets P l ∧ plmeets Q l)) ∧
(∀P l. ¬ plmeets P l ⟶ (∃!m. affine_plane_data.parallel plmeets l m ∧ plmeets P m)) ∧
(∃P Q. P ≠ Q ∧…

John
- 509
- 1
- 6
- 18
1
vote
2 answers
Access elements of data types
Is it possible in Isabelle to access the individual elements of a data type? Let's say I have the following data type:
datatype foo = mat int int int int
and (e.g. in a lemma)
fixes A :: foo
Is it possible to access the single elements of A? Or…

Benedikt
- 67
- 4
1
vote
1 answer
How can I prove the lemma in Exercise 4.6 in “Programming and Proving in Isabelle/HOL”?
I am trying to solve Exercise 4.6 in “Programming and Proving in Isabelle/HOL”. It asks to define a function elems :: "'a list ⇒ 'a set" that converts a list into a set, and to prove the lemma "x ∈ elems xs ⟹ ∃ ys zs . xs = ys @ x # zs ∧ x ∉ elems…

Wolfgang Jeltsch
- 781
- 5
- 10
1
vote
1 answer
How can I efficiently prove existential propositions with multiple variables in Isabelle/Isar?
Say I want to prove the lemma ∃ n m k . [n, m, k] = [2, 3, 5] in Isabelle/Isar. If I go ahead as suggested in the Isabelle/HOL tutorial on page 45, my proof looks as follows:
lemma "∃ n m k . [n, m, k] = [2, 3, 5]"
proof
show "∃ m k . [2, m, k] =…

Wolfgang Jeltsch
- 781
- 5
- 10
1
vote
1 answer
Reordering goals (Isabelle)
I would like to know how to reorder goals in the following situation:
lemma "P=Q"
proof (rule iffI, (*here I would like to swap goal order*), rule ccontr)
oops
I would like a solution that doesn't involve changing the lemma statement. I realise…

IIM
- 533
- 3
- 11
1
vote
1 answer
Proof by induction with three base cases (Isabelle)
I want to be able to prove a statement by induction on n (of type nat). It consists of a conditional whose antecedent is only true for n >= 2. A conditional whose antecedent is false is always true. So I'd like to prove the cases n=0, n=1 and n=2…

IIM
- 533
- 3
- 11
1
vote
2 answers
Intro rule for "∀r>0" in Isabelle
When I have a goal such as "∀x. P x" in Isabelle, I know that I can write
show "∀x. P x"
proof (rule allI)
However, when the goal is "∀x>0. P x", I cannot do that. Is there a similar rule/method that I can use after proof in order to simplify my…

IIM
- 533
- 3
- 11
1
vote
1 answer
Sledgehammer gives insufficient proof tactic
I have
theory Even
imports Main
begin
inductive
structural_even :: "nat ⇒ bool"
where
"structural_even 0"
| "structural_even n ⟹ structural_even (Suc(Suc n))"
fun
computational_even :: "nat ⇒ bool"
where
"computational_even 0 = True"
|…

Gergely
- 6,879
- 6
- 25
- 35
1
vote
1 answer
Defining a quotient_type in Isabelle
I'm still trying to reason over semantic equality in Isabelle.
I want to compare two formula and see whether they are equal. I've been told before, that i need quotienttypes for this.
So i tried to define myself a quotiernttype, but apperently my…

TKler
- 135
- 7
1
vote
2 answers
Proving a simple arithmetic statement with rewriting in Isabelle
I am trying to prove a big case distinction in Isabelle for some (conceptually) simple arithmetic statement. During the proof, I stumbled upon the following subgoal.
⋀d l k. 0 < d ⟹
¬ 2 * k + 1 ≤ 2 * l ⟹
2 * l ≠ 1 ⟹ - (2 * l) < 2…

HdM
- 169
- 1
- 11
1
vote
1 answer
Defining disjoint union of different types in Isabelle and more
I asked a series of question to get to the point I can define the following simple model in Isabelle, But I still stuck in getting what I wanted. I try to very briefly describe the problem with an example:
Example:
Suppose I have two classes Person…

qartal
- 2,024
- 19
- 31
1
vote
2 answers
Case names for locale interpretation
Some of my locals have quite a few assumptions, very much resembling inductions over data types (that’s where the assumptions come from). When interpreting such a locale, having named cases would be very handy. How do I achieve that the following…

Joachim Breitner
- 25,395
- 6
- 78
- 139
1
vote
3 answers
How to use obtain in existential proofs?
I tried to prove an existential theorem
lemma "∃ x. x * (t :: nat) = t"
proof
obtain y where "y * t = t" by (auto)
but I could not finish the proof. So I have the necessary y but how can I feed it into the original goal?

Gergely
- 6,879
- 6
- 25
- 35