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

Why can't I simplify Σ {0} = 0 in Isabelle to make them equal?

I was going through chapter 5 (Isar) and I tried doing the structural induction proof for "Σ{0..n::nat} = n*(n+1) div 2" but it fails: lemma "Σ{0..n::nat} = n*(n+1) div 2" proof (induction n) show "Σ{0..0::nat} = 0*(0+1) div 2" by simp next fix…
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
0
votes
0 answers

Isabelle : Choose assumption / Choose Goal / Specify metavariable

1)How to choose assumption that I want to apply in Isabelle/FOL theorem? There is a case of proof, where I cannot use "apply assumption". axiomatization where aax8 : ‹(A-->C)-->(B-->C)-->(A∨B-->C)› and aax11 : "A∨~A" lemma ewfw : ‹…
ged
  • 687
  • 7
  • 19
0
votes
1 answer

Isabelle FOL partial Rule application

Let's assume we have such variant of Modus Ponens lemma invDed: ‹(A-->B)==>(A==>B)› apply(rule mp) apply assumption apply assumption done Can it be applied for proving the theorem? (I mean A:=A, B:=A, and A-->A we use as if it was…
ged
  • 687
  • 7
  • 19
0
votes
0 answers

Isabelle/HOL/Isar: How do I make formulas like "∃(x::nat). (x ≠ 2 ∧ (x ≠ 2 ⟶ x = 1))" easier to prove?

My story is quite long, and my code for what I actually wanted to do is also quite long. So first I will describe what I have tried with the formula in the title, and then I will describe how I encountered something like this in practice, putting my…
Imperishable Night
  • 1,503
  • 9
  • 19
0
votes
2 answers

Basic Isabelle/Isar style (exercise 4.6)

I'm interested in using Isabelle/Isar for writing proofs which are both human-readable and machine checked, and I am looking to improve my style and streamline my proofs. prog-prove has the following exercise: Exercise 4.6. Define a recursive…
Nick Hu
  • 43
  • 3
0
votes
2 answers

Instantiating a class from a concrete object?

I'm attempting to formalize a series of proofs about topology from a book [1] in Isabelle. I want to encode the idea that a topological space (X,T) consists of a set X of "points" (elements of some arbitrary type 'a), and a set of subsets of X,…
tangentstorm
  • 7,183
  • 2
  • 29
  • 38
0
votes
1 answer

How do I refer to the current subgoal in Isar?

I am trying to solve Exercise 4.7 from Programming and Proving in Isabelle. I run into a case where I have proved False and therefore everything, but I cannot close the case because I do not know how to refer to my proof obligation. theory…
rosento
  • 3
  • 1
0
votes
1 answer

Why won't the 'linordered_field_class.frac_le' rule work? (Isabelle)

I am trying to use the rule linordered_field_class.frac_le in an Isar proof. Here is the code snippet (it may depend on the previous parts of the proof, but that is unlikely). n is of type nat. ... then have 4:"2 ≤ (2^(n+1)::real)" by simp …
IIM
  • 533
  • 3
  • 11
0
votes
1 answer

Create a quotient-lifted type with polymorphism over working set and equivalence relation in Isabelle/HOL

I would like to create a quotient type with quotient_type in Isabelle/HOL in which I would left "non-constructed" the non-empty set S and the equivalence relation ≡. The goal is for me to derive generic properties w.r.t. S and ≡ over the…
0
votes
1 answer

How to define Subtypes in Isabelle and what they mean?

The question regarding subtyping in Isabelle is very lengthy here. So my simple question is that how I can define type B to be a subtype of A if I define A as below: typedecl A By doing this I would like to make all operations and relations…
qartal
  • 2,024
  • 19
  • 31
0
votes
1 answer

Untyped set operations in Isabelle

I have the following code in Isabelle: typedecl type1 typedecl type2 consts A::"type1 set" B::"type2 set" When I want to use union operation with A and B as bellow: axiomatization where c0: "A ∩ B = {}" Since A and B are sets of different…
qartal
  • 2,024
  • 19
  • 31
0
votes
1 answer

How type casting is possible in isabelle

Supose I have the following code in Isabelle: typedecl type1 typedecl type2 typedecl type3 consts A::"type1 set" B::"type2 set" When I want to use union operation with A and B as bellow: axiomatization where c0: "A ∪ B = {}" Since A and B…
qartal
  • 2,024
  • 19
  • 31
0
votes
2 answers

Factoring out a lemma premise as a definition causes failure in proof method (auto) application in isabelle

I have the following code in Isabelle: typedecl Person consts age :: "Person ⇒ int" lemma "⟦(∀p::Person. age p > 20);p ∈ Person⟧⟹ age p > 20" apply (auto) done The auto proof method works fine and proves the lemma! when I want to factor out the…
qartal
  • 2,024
  • 19
  • 31
0
votes
1 answer

Organizing constraints in isabelle in order to model a system

Suppose that I have the following expression in Isabelle/HOL: typedecl Person typedecl Car consts age :: "Person ⇒ int" consts drives ::"(Person × Car) set" consts owns ::"(Person × Car) set" This is supposed to model Person and Car types with…
qartal
  • 2,024
  • 19
  • 31
0
votes
1 answer

Can I "map" an "OF" over a list of lemmas

I just wrote this code: lemmas gc_step_intros = normal[OF step.intros(1)] normal[OF step.intros(2)] normal[OF step.intros(3)] normal[OF step.intros(4)] normal[OF step.intros(5)] drop where step.intros really only has 5 lemmas. Is there a…
Joachim Breitner
  • 25,395
  • 6
  • 78
  • 139