Questions tagged [hol]

The HOL interactive theorem prover is a proof assistant for higher-order logic: a programming environment in which theorems can be proved and proof tools implemented.

The HOL interactive theorem prover is a proof assistant for higher-order logic: a programming environment in which theorems can be proved and proof tools implemented.

36 questions
1
vote
0 answers

How to use OpenTheory to transfer theorems in HOL-light format to theorems in Isabelle format

Currently, I have several theorems in HOL-light formats (along with proof) and I would like to transfer them into theorems in Isabelle formats. I know OpenTheory (http://www.gilith.com/opentheory/) could make it, but I have no idea where to start…
Q.Yang
  • 173
  • 1
  • 5
1
vote
1 answer

Is it possible to write non-automatic formalizations in Isar?

I have the following: lemma assumes p: "P" assumes pimpq: "P⟶Q" shows "P∧Q" proof - from pimpq p have q: "Q" by (rule impE) from p q show ?thesis by (rule conjI) qed I have thought that this is down to basic inference rules but reading…
Gergely
  • 6,879
  • 6
  • 25
  • 35
1
vote
2 answers

How does one define a if then else expression in Isabelle?

It complains to me I have a parsing error but I can't find in the manual what the right syntax is suppose to be... | "my_function x b (Cons3 y) = if x=y then b else (Cons3 y)" error: Inner syntax error⌂ Failed to parse prop
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
1
vote
1 answer

Isabelle: verify tautological formula

I want to create a function F in Isabelle that is given a formula formula = pr int | neg formula | imp formula formula and yields True if the formula is tautological and False otherwise. For example: F( φ ⇒ φ ) = True F( φ ⇒ (ψ ⇒ φ) ) =…
Babado
  • 135
  • 5
1
vote
1 answer

Translating from HOL interpreter to TAC_PROOF with THENL

The steps in the THENL brackets work correctly if I type them sequentially into the HOL interpreter. But when I combine them with TAC_PROOF using THENL, I get an error. I think I understand the difference between THEN and THENL (all subgoals versus…
hackerCMU
  • 13
  • 3
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
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

Type Unification failed for bool * bool ⇒ bool * bool

I wrote a simple function which should perform the function of a halfadder. fun halfadder :: "bool * bool ⇒ bool * bool" where "halfadder (a,b) = ( let s = xor a b in let cout = and a b in (cout,s))" However, I get the following…
fred
  • 105
  • 6
0
votes
2 answers

Unification problem with HOL-style alpha-conversion in Coq (matching the equality)

I am experimenting with possibility of embedding of HOL4 proofs in Coq. In HOL it is possible to give definition like fun ALPHA t1 t2 = TRANS (REFL t1) (REFL t2) Is it possible to somehow define this function in Coq in similar way? My attempt fails…
ged
  • 687
  • 7
  • 19
0
votes
1 answer

Isabelle combinatoric proof Cayley's formula

I am getting started with Isabelle HOL and want to try to construct a combinatorial proof of some kind. I took Cayley's formula for the start. Here it is: For every positive integer n, the number of trees on n labeled vertices is n^{n-2}. How would…
Eva
  • 35
  • 2
0
votes
1 answer

How to introduce forall in Isabelle

I am trying to prove the following inference rule in Isabelle (2021) from a previous question: In particular, I tried to prove this in a forward manner, by first using the two assumptions to get A(y) and B(y), and therefore A(y) /\ B(y), for an…
thor
  • 21,418
  • 31
  • 87
  • 173
0
votes
1 answer

Isabelle labeled graph definition

I am trying to define some vertex labels in Isabelle HOL and have a problem with the successor definition: record ('v,'w) graph = nodes :: "('v×'w) set" edges :: "(('v×'w) × ('v×'w)) set" definition succ :: "('v,'w) graph ⇒'v ⇒ ('v,'w)…
Eva
  • 35
  • 2
0
votes
1 answer

cases vs case_tac/induct vs induct_tac

I've been working with Isabelle/HOL for a few months now, but I've been unable to figure out the exact intention of the use of _tac. Specifically, I'm talking about cases vs case_tac and induct vs indut_tac (although it would be nice to know the…
Darsen
  • 119
  • 6
0
votes
1 answer

Specifying direction of rule in Isabelle/HOL

I have found the same problem when proving several lemmas: rules with an equality sometimes only work in one direction. For instance, I'd like to use append_assoc to get from xs @ ys @ zs to (xs @ ys) @ zs, but since append_assoc is defined as (xs @…
Darsen
  • 119
  • 6
0
votes
0 answers

How to write expansion rules in Isabelle?

I encountered some problems while learning Isabelle's expansion rules. I hope someone can answer them, thank you. I need to import Isabella's built-in HOL library to introduce some defined quantifiers. When I use Isabella2017 to open…
W_zw
  • 1
  • 1