I haven't been able to find a good explanation of how these are different and relate to each other. I know that $\to$ is part of HOL and $\Rightarrow$ and $\Longrightarrow$ part of Isabelle, but it seems that they are basically doing the same thing and we could just have one object $\to$? (Taking into account the CH correspondence). Why does Isabelle/HOL have 3 operators for essentially the same thing? How are they different?
1 Answers
I haven't been able to find a good explanation of how these are different and relate to each other. I know that → is part of HOL and ⇒ and ⟹ part of Isabelle, but it seems that they are basically doing the same thing and we could just have one object →? (Taking into account the CH correspondence).
The basic answer is because it depends on whether you want implication in the metalanguage ($\Longrightarrow$ or ==>) or the object language (all other arrows), since Isabelle is a "metalogical framework" for reasoning within a specific "object logic".
Curry-Howard is relevant for the metalogic. If you try to use Curry-Howard with the object logic, you get an "object level" correspondence, which is already implicit in the object logic.
According to the documentation:
- $P\to Q$ (ascii
P --> Q) is for "object language" logical implication "$P$ implies $Q$", i.e., implication in the object logic (encoding, e.g., implication in HOL); this is not part of the Isabelle's underlying "meta" logic; - $\tau_{1}\Rightarrow\tau_{2}$ (ascii
tau => tau) is used in Isabelle/HOL for the [total] function HOL type from HOL type $\tau_{1}$ to produce a HOL term of HOL type $\tau_{2}$; - $\Longrightarrow$ (ascii
==>) is the "meta-implication", i.e., the implication in the "metalogical framework" [i.e., the Pure language]. It's used for encoding "object logic" inference rules; if used for stating theorems, then those theorems may be used directly with forward or backward chaining (whereas theorems stated using-->needs to invoke implication inference rules), as Paulson tells us.
Really, you should use "$\Longrightarrow$" (==>) as much as possible when stating theorems. But there are times when you want to state in the object logic "$P$ implies $Q$"...and that requires "$\to$" (-->).
Further useful reading:
- Taming meta implication in Isar proofs
- Chapter 2 of Part I in the Old Introduction to Isabelle
- For more on the technical fine points about "metalogical frameworks", the original paper The Foundation of a Generic Theorem Prover is worth reading
- 163
- 9