{"id":28,"date":"2024-02-04T02:38:33","date_gmt":"2024-02-04T02:38:33","guid":{"rendered":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/?p=28"},"modified":"2024-02-04T07:35:41","modified_gmt":"2024-02-04T07:35:41","slug":"discussing-isabelle-hol-a-proof-assistant-for-higher-order-logic","status":"publish","type":"post","link":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/2024\/02\/04\/discussing-isabelle-hol-a-proof-assistant-for-higher-order-logic\/","title":{"rendered":"Discussing &#8220;Isabelle\/HOL: A Proof Assistant for Higher-Order Logic&#8221;"},"content":{"rendered":"\n<p><a href=\"https:\/\/www21.in.tum.de\/~nipkow\/LNCS2283\/\">(Link)<\/a><\/p>\n\n\n\n<p><strong>Authors: <\/strong>Tobias Nipkow (Technical University of Munich), Lawrence C. Paulson (University of Cambridge), and Markus Wenzel (Technical University of Munich)<\/p>\n\n\n\n<p><strong>Reference:<\/strong> The original is Nipkow, Tobias, Markus Wenzel, and Lawrence C. Paulson. Isabelle\/HOL: a proof assistant for higher-order logic. Vol. 2283 of Lecture Notes in Computer Science. Springer, 2002; I am reading <a href=\"http:\/\/isabelle.in.tum.de\/doc\/tutorial.pdf\">the updated 2023 version<\/a><\/p>\n\n\n\n<p><strong>Why this paper?<\/strong> Cited by <a href=\"https:\/\/arxiv.org\/abs\/2401.10553\">Single-set cubical categories and their formalisation with a proof assistant<\/a> and <a href=\"https:\/\/dl.acm.org\/doi\/abs\/10.1145\/3636501.3636945\">Formalizing the \u221e-Categorical Yoneda Lemma<\/a><\/p>\n\n\n\n<p>In the world of interactive theorem provers two systems stand out for their maturity and wide adoption. One is Rocq, until recently known as Coq, <a href=\"https:\/\/updatedscholar.blogspot.com\/2023\/03\/discussing-coq-proof-assistant.html\">about which I have written previously<\/a>; Isabelle\/HOL, the topic of this week\u2019s reading, is the other. Rocq is one of a number of systems (for example, <a href=\"https:\/\/updatedscholar.blogspot.com\/2023\/02\/discussing-lean-theorem-prover-system.html\">Lean<\/a>) based on <a href=\"https:\/\/updatedscholar.blogspot.com\/2023\/01\/discussing-intuitionistic-theory-of.html\">Martin-L\u00f6f\u2019s dependent type theory<\/a>, whereas Isabelle\/HOL is one of a number of systems based on the alternative foundation of higher order logic (HOL). These are not the only two options \u2013 <a href=\"http:\/\/mizar.uwb.edu.pl\/\">Mizar<\/a>, which is older still, takes another route \u2013 but I think it is fair to call them the most prominent.<\/p>\n\n\n\n<p>Dependent type theory (as usually implemented) and higher order logic have some similarities, as both are built on total functional programming languages with advanced type features such as parametric polymorphism and type operators: approximately, <a href=\"https:\/\/en.wikipedia.org\/wiki\/System_F#System_F.CF.89\">System F\u03c9<\/a> in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lambda_cube\">the lambda cube<\/a>. Note that while a more conventional programming language like Haskell also has these features, it is not total. Totality is required here because it avoids non-terminating programs that would, considered as definitions, lead to logical inconsistency: if <em>foo<\/em> could be defined to be equal to <em>foo + 1<\/em>, then we could subtract foo from each side to conclude that <em>0 = 1<\/em>. While dependent type theory travels still further up the lambda cube to include types that depend on terms, allowing mathematical statements to be expressed as types, HOL instead adds a separate layer of logic on top of the base calculus. A more subtle distinction is that while types with no elements are a core part of dependent type theory \u2013 every false mathematical statement corresponds to such a type \u2013 we are not permitted such types in HOL, as the usual rules of logic with quantifiers require the domain(s) of variables to be non-empty. This does not mean we cannot talk about the empty set of mathematics; instead, we must remember that sets and types are not to be conflated in HOL, and nor (unlike in <a href=\"https:\/\/updatedscholar.blogspot.com\/2022\/08\/discussing-homotopy-type-theory.html\">the HoTT version of dependent type theory<\/a>) are the sets included in the types.<\/p>\n\n\n\n<p>Isabelle is a generic system for implementing logical systems, and HOL is by far its most celebrated instance. This book, first published in 2002 but much updated since, provides a beginner\u2019s tutorial to this system, assuming only some basic logical notation and functional programming. In keeping with the HOL separation of programming and logic, we start with the basics of Isabelle\/HOL as a programming language. The interesting point here, returned to several times through the text, is the machinery used to ensure that program definitions are terminating. These techniques range from primitive recursion, where we are forced to write our program in a style that marches at each step towards a base case, to automated tools that can, for example, prove the termination of the notorious thorny <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ackermann_function\">Ackermann\u2019s function<\/a>.<\/p>\n\n\n\n<p>Moving to theorem proving, the basic machinery is based on natural deduction, implemented in a \u2018non-dogmatic\u2019 way to prioritise usefulness over the elegance or parsimony of the underlying proof theory. The major emphasis, as is also true for Rocq but perhaps holds even more so for Isabelle\/HOL, is on tactics that automatically try to generate proofs. For example unification, <a href=\"http:\/\/updatedscholar.blogspot.com\/2013\/07\/unifying-nominal-unification.html\">a variant of which I\u2019ve blogged about before<\/a>  , is key here to automatically match generic logical or rewrite rules to a particular situation, although this tutorial of course does not labour the implementation details of the underlying algorithms. We instead see some extended examples, mostly from computer science, with the most pleasing to me being a reconstruction of a proof about context-free grammars from <a href=\"http:\/\/infolab.stanford.edu\/~ullman\/ialc.html\">the classic textbook of Hopcroft and Ullman<\/a> which nicely reveals the gaps in the original proof.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the world of interactive theorem provers two systems stand out for their maturity and wide adoption. One is Rocq, until recently known as Coq, about which I have written previously; Isabelle\/HOL, the topic of this week\u2019s reading, is the other. Rocq is one of a number of systems (for example, Lean) based on Martin-L\u00f6f\u2019s dependent type theory, whereas Isabelle\/HOL is one of a number of systems based on the alternative foundation of higher order logic (HOL). These are not the only two options \u2013 Mizar, which is older still, takes another route \u2013 but I think it is fair to call them the most prominent.<\/p>\n","protected":false},"author":10,"featured_media":30,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_share_on_mastodon":"0","_share_on_mastodon_status":"%title% : it's been a bit of a busy week, but I've managed to write a few paragraphs on my #blog about #IsabelleHOL %permalink% #ITP"},"categories":[5],"tags":[25,26,28,27,21,22,29,23,20,24],"class_list":["post-28","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-summaries","tag-25","tag-26","tag-higher-order-logic","tag-isabelle-hol","tag-lawrence-c-paulson","tag-markus-wenzel","tag-proof-assistant","tag-technical-university-of-munich","tag-tobias-nipkow","tag-university-of-cambridge"],"share_on_mastodon":{"url":"https:\/\/fediscience.org\/@RanaldClouston\/111870890073740594","error":""},"_links":{"self":[{"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":3,"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/posts\/28\/revisions\/34"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/media\/30"}],"wp:attachment":[{"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.fediscience.org\/the-updated-scholar\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}