Discernment is all you need
We explore the expressive power of HOL, a system of higher-order logic, and its relationship to the simply-typed lambda calculus and Church's simple theory of types, arguing for the potential of HOL as a unifying logical framework, capable of encodin…
Authors: David Fuenmayor
Discernmen t is all y ou need ∗ Da vid F uenma yor AI Systems Engineering Univ ersity of Bamberg Abstract W e explore the expressive p o wer of HOL, a system of higher-order logic, and its relationship to the simply-typed lam b da calculus and Ch urch’s simple theory of t yp es, arguing for the p otential of HOL as a unifying logical framew ork, capable of encoding a broad range of logical systems, including modal and non-classical logics. Along the w ay , w e emphasize the essen tial role of disc ernment , the ability to tell things apart, as a language primitiv e; highlighting how it endows HOL with practical expressivity su- p erpow ers while elegantly enriching its theoretical prop erties. 1 F unktionenk alk ¨ ul and Logical Incompatibilit y On Decem b er 7, 1920, at a meeting of the G¨ ottingen Mathematical So ciet y , Moses Sc h¨ onfinkel (then w orking in Hilbert’s group) presented a talk titled El- emente der L o gik . Sev eral years later, in March 1924, the conten ts of that talk were written up for publication in the Mathematische A nnalen as a pap er en titled ¨ Ub er die Bausteine der mathematischen L o gik . 1 That paper is a mas- terw ork of clarity and depth and deserv es to b e summarized here in order to set the context. In tending to la y out a minimalistic theory of atomic building blo cks for math- ematical logic in its most general conception, Sc h¨ onfinkel’s paper [73] starts ( § 1) b y recalling the conceptual econom y that Sheffer’s stroke (in terpreted as incom- patibilit y , i.e. non-conjunction) brought to the propositional calculus [76], and prop oses to extend this idea to the predicate calculus in the form of a v ariable- binding infix connective “ | x ” representing incompatibility ( Unvertr¨ aglichkeit ). Th us A ( x ) | x B ( x ) ∗ Dedicated to Marcelo Coniglio in his 60 th anniversary . Marcelo’s en thusiasm for algebraic methods in logic sparked m y own lasting fascination with equations, symmetries, and identit y . 1 The pap er had to be finished by one of his colleagues (Heinrich Behmann), since Sch¨ onfinkel had meanwhile left G¨ ottingen—apparently for Moscow. In fact, few p eople, if any , knew ab out Sch¨ onfinkel’s whereab outs after those years. Stephen W olfram has recently carried out research on what ma y have happ ened; see [83]. 1 b ecomes interpreted as “As and Bs are incompatible”, in the sense of A and B b eing mutually exclusiv e (as classes 2 ), or, maybe more collo quially , as stating that if a thing is an A then it is certainly not a B (and vice versa). This can b e seen as the strongest wa y of telling As and Bs apart: no-thing is ever b oth. Sc h¨ onfink el then digresses into the developmen t of a v ariable-free F unktio- nenkalk¨ ul . This is the part that is often credited with in tro ducing the concept of (what later b ecame known as) “com binators”, 3 and which can be seen, with the b enefit of hindsigh t, as an early and remark ably spare formalism for univ ersal computation, well b efore T uring’s seminal pap er. Sc h¨ onfink el F unktionenkalk¨ ul starts ( § 2) with an exposition of the under- lying extensional understanding of the concept of (mathematical) function as “a corresp ondence b etw een the elements of some domain of quantities, the ar- gumen t domain, and those of a domain of function v alues”, while emphasizing their higher-order nature “permitting functions themselves to app ear as argu- men t v alues and also as function v alues”. It is here that Sch¨ onfink el presen ts the tec hnique of arit y reduction b y iterated application, allo wing for the systematic reduction of n -ary functions to unary ones, by treating an n -place function as returning, up on application to its first argumen t, an ( n − 1)-place function, so that expressions such as F xy z are parsed as (( F x ) y ) z . 4 This technique naturally enables the introduction of some “ p articular func- tions of a very general nature” ( § 3) by means of defining equations (used as rewriting rules), such as the identit y function I with I x = x , the con- stancy function C with C xy = x , the interc hange (“V er t ausch ung”) func- tion T with T f xy = f y x , the comp osition (“ Z usammensetzung”) function Z with Z f g x = f ( g x ), and the fusion (“V er s c hmelzung”) function S with S f g x = f x ( g x ). 5 Sc h¨ onfink el shows ( § 4) how they are all definable in terms of S and C only . The previous conceptual reduction is applied ( § 5) to a “sp ecial case”, namely , that of a “calculus of logic in which the basic elements are individuals and the functions are prop ositional functions.” This b ecomes p ossible by introduc- ing “an additional particular function, which is p eculiar to this calculus”, and 2 F or Sch¨ onfinkel, classes are sp ecial sorts of functions, namely pr op ositional functions , whose v alues are truth v alues. 3 It was around 1928 that Haskell Curry , then a graduate student at Princeton, (re)discov ered Sch¨ onfinkel’s work and decided to mov e to G¨ ottingen to complete his PhD dissertation (titled “Grundlagen der kom binatorischen Logik”) within Hilbert’s group. Ini- tially , Curry had hop ed to work with Sch¨ onfinkel, but was informed by Pa vel Alexandroff (then visiting Princeton) that Sch¨ onfinkel had already left—apparently never to return (see [83]). Nev ertheless, Curry mov ed to G¨ ottingen to w ork with Paul Bernays, one of the few scholars there who had work ed with Sch¨ onfinkel. 4 This mo ve has b een dubbed “Currying” in modern literature, due to Curry’s prominent use of it. Quine, who wrote the preface to the English translation of Sch¨ onfinkel’s pap er [74], states in it that this device was anticipated by F rege in [44, § 36]. 5 W e hav e used Sch¨ onfinkel’s original notation. These “particular functions” (excepting S ) had been independently disco vered by Curry in the late 1920’s, who named them: I (identit y), K (constancy), C (interc hange), B (composition). Curry kept his own notation in his PhD thesis, and ever since, they ha ve been kno wn under those names, collectively , as “com binators”. 2 presen ts U f g = f x | x g x as the defining equation of the incompatibility (“Unv ertr¨ aglichk eit”) function U ; commenting: “It is a r emarkable fact, now, that every formula of lo gic c an b e expr esse d by me ans of our p articular functions I , C , T , Z , S , a nd U alone, henc e, in p artic- ular, by me ans solely of C , S , and U .” Sc h¨ onfink el has essen tially sho wn how to reduce logic to a calculus of func- tions ( F unktionenkalk¨ ul ) extended with a primitiv e notion of incompatibilit y , and, even more impressiv ely , to do so in what is kno wn to da y as a point-free (i.e. v ariable-free, comp osition-driven) style; at the time epitomized b y P eirce’s 1870s algebra of absolute and relative terms. T o get an idea of the scop e of Sc h¨ onfink el’s contribution, we shall quote Quine in his preface of the English translation [74]: “It was by letting functions admit functions gener al ly as ar guments that Sch¨ onfinkel was able to tr ansc end the b ounds of the algebr a of classes and r ela- tions and so to ac c ount c ompletely for quantifiers and their variables, as c ould not b e done within that algebr a. The same exp e dient c arrie d him, we se e, far b e- yond the b ounds of quantific ation the ory in turn; al l set the ory was his pr ovinc e.” Ho wev er, Sch¨ onfinkel’s presentation is still programmatic and leav es imp or- tan t pieces either implicit or only sk etched: for instance, the f ormal status of the defining equations (as axioms vs. rewrite rules), the metatheory of the result- ing equational calculus (confluence, normalization, consistency , etc.), and the systematic relationship b etw een the v ariable-free function calculus and familiar logical formalisms are not w ork ed out in an ything like mo dern detail. These gaps w ere filled only later through the w ork of Curry (combinatory logic) and Ch urch ( λ -calculus, unt yp ed and later typed), together with the contributions of their studen ts and collab orators; see, e.g., [37, 75, 59] for detailed discussion. Sc h¨ onfink el’s w ork provides a paradigmatic example of the idea of a calculus of functions ( F unktionenkalk¨ ul ) as fundamental ‘plumbing’ or ‘wiring’ on top of whic h logical theories can be stated (and reasoned with) by adding the corre- sp onding logical constan ts as primitiv e symbols (and axiomatizing them accord- ingly). Arguably , this idea had also been anticipated by F rege in his Be griff- sschrift , where logical inference is gov erned b y an explicit function–argument structure and a precise notation for the represen tation of inferen tial steps. How- ev er, F rege’s system remains tied to a sp ecific logical vocabulary and proof calcu- lus, and do es not y et isolate the purely functional ‘plum bing’ as an autonomous la yer that can b e reused and extended in a fully comp ositional wa y . Sc h¨ onfink el’s further insight, inspired by Sheffer’s, was that a primitive no- tion of incompatibility (on top of a F unktionenkalk ¨ ul ) can play a foundational role for (classical) predicate logic. 6 Indeed, the recen t w ork of Coniglio and T oledo on lo gics of formal inc omp atibility [36] illustrates this p ersp ectiv e in a 6 Such an insight has been in the air for a long time (the author dimly recalls related remarks b y mediev al logicians). More recently , it has also been discussed by philosophers of logic, cf. [23], [69]. 3 con temp orary setting, b y taking incompatibility as a primitiv e binary connec- tiv e (written ↑ ) that lo calizes “explosion”. Roughly: A ↑ B , together with A and B , trivializes deduction (i.e. anything follo ws— se quitur quo d lib et ). More- o ver, they show that the familiar “consistency op erator” of the lo gics of formal inc onsistency (LFIs [31]) arises as a sp ecial case of incompatibilit y , by setting ◦ A to b e (or to b ehav e lik e) A ↑ ¬ A , thereb y exhibiting incompatibility as a gen- uine generalization of the notion of (in)consistency , and providing corresp onding seman tics and decision pro cedures for the resulting logical systems. F rom a more abstract p oint of view, the notions of incompatibilit y at work in b oth Sch¨ onfink el’s prop osal (classical) and in the con temp orary lo gics of formal inc omp atibility of Coniglio and T oledo (paraconsistent) can b e seen as a sp ecial case of a more general notion of disc ernment . T o av oid getting trapp ed in philosophical or etymological terrain, we shall now clarify that by disc ernment w e essen tially mean the capacit y to tell (differen t) things apart: the red from the green, the go o d from the bad, etc. 7 Incompatibilit y , on this reading, is simply one v ery harsh w a y of dra wing suc h lines; it is not merely the failure of joint satisfiability , but a logical to ol for marking distinctions: to sa y that A and B are incompatible is to treat them as mutually excluding options, and thereb y to imp ose a discriminating structure on the space of assertions. In this sense, incompatibilit y can b e taken as a primitive wa y of carving logical space, prior to (and more general than) negation or consistency . Sch¨ onfink el’s idea was that these basic discriminations could serv e as foundational building blo c ks for logic (on top of a neutral F unktionenkalk ¨ ul ); Coniglio and T oledo’s w ork, in turn, illustrate ho w this p ersp ective can be made precise within mo dern pro of-theoretic and semantic frameworks, in a paraconsistent setting. Seen this w ay , incompatibility is best understo o d not as an isolated con- nectiv e, but as one concrete manifestation of disc ernment : the capacit y of a logical system to articulate meaningful distinctions among its conten ts, on top of which notions of inference, consistency , and negation can then b e built. The next sections aim at introducing HOL, a classical higher-order logic, as a calcu- lus of functions (the simply typed λ -calculus) extended with a primitive symbol of discernmen t (equality , or, if preferred, disequalit y). Before turning to that dev elopment, how ev er, we still need to cov er some more background. 2 Logic in T yp ed λ -Calculi What is no w called the λ -calculus w as introduced b y Alonzo Ch urch in the early 1930s as part of his program in the foundations of logic and mathematics. In fact, his initial formalism was not presented as a “calculus” but rather as “a set of p ostulates for the foundation of logic” [33] where “rules of procedure” 7 In some con texts, this ability can also b e referred to as “perception”. Without delving too deeply into psychological terrain, one could argue that it is, in a sense, an intuitiv e “System 1”-type ability , which makes it reasonable to treat as primitive (i.e. undefinable) within a logical system. As is often noted in contemporary AI, this is precisely the kind of thing neural netw orks are very go o d at. 4 (later called λ -conv ersion) were introduced together with logical constants, in- terrelated via “formal p ostulates”, with the aim of serving as a foundation for logic and, by extension, mathematics. It w as this lo gic al system (i.e. λ -con version plus the additional logical ap- paratus) that Ch urch’s students, S. Kleene and J.B. Rosser, famously show ed to b e inconsisten t in 1935. Indeed, once one strips aw a y the logical constan ts and logical p ostulates, the remaining formal ‘plum bing’, the pure theory of λ - terms with con version (ak a. unt yp ed λ -calculus), constitutes a consistent equa- tional/reduction system in its own right that quic kly prov ed to ha ve extensive indep enden t applications (notably as a framework for computation). Moreo ver, it is worth emphasizing that Ch urch’s original presen tation of λ -con version w as intensional , 8 since it did not build functional extensionalit y in to the conv ersion rules; e.g., it did not employ anything like rule ζ ( M x = N x / M = N ) nor η -conv ersion ( λx. M x = M ). 9 This stands in a contrast to Sch¨ onfink el’s F unktionenkalk ¨ ul , where the extensional viewp oint is built into the in tended interpretation and the wa y the defining equations are used (e.g. his implicit use of rule ζ ). It is fair to say , as is often stated in the literature, that the (unt yp ed) λ - calculus is a c alculus of functions , conceived in their most idealized form: total, deterministic, and recursiv e. With the b enefit of hindsigh t, it is p erhaps unsur- prising that early efforts by logicians (e.g., Ch urch, Curry , and their students) to build systems of lo gic on top of this conception of unrestricted, free-spirited functions ran into inconsistencies. Here, so the story go es, the attempt to obtain consistent systems of logic based on such calculi of functions bifurcated into t wo main directions: the “simple theory of types” of Ch urch, and the (primarily unt yp ed) “combinatory logic” pioneered by Curry . In this pap er we shall fo cus on the former. W e refer the reader to [75] for a discussion of the historical dev elopment of b oth com binatory logic and λ -calculus. 2.1 The Simple Theory of T yp es In the present writing, a starring role is pla yed b y Churc h’s “simple theory of t yp es” (STT), so we shall briefly recall its presen tation b elo w (see [20] for a prop er discussion). The set T of STT’s t yp es is inductively generated, starting from a set of t yp e constan ts T C = { o, ι } by applying the binary type constructor → (written as a right-associative infix op erator; see Fig. 1) F or instance, o , o → o , ι → ι and ι → ι → o are all well-formed types. STT can b e seamlessly extended by assuming a larger set of t yp e constants T C ⊇ { o, ι } as needed for applications. It is worth noting that the axioms of STT (see [20]) 8 Maybe the right wording would b e hyperintensional , dep ending who you ask—whether linguists or (mo dal) logicians. 9 The usual proviso applies that x do es not app ear free in M nor N . In the early days, the η and ζ conv ersion rules did not app ear explicitly; they were isolated later on and shown equiv alent to functional extensionality , cf. [37, § 3D] [59, § 7A]. 5 α, β ::= τ ∈ T C | α → β s, t ::= c α ∈ C onst | x α ∈ V ar | ( λx α . s β ) α → β | ( s α → β t α ) β Figure 1: Informal grammar for STT types and terms. place enough constrain ts such that, semantically sp eaking, the type o ends up ha ving exactly t wo differen t inhabitants (modulo interderiv ability), and thus they are called “Bo olean” truth-v alues. By contrast, the type ι is left uncon- strained (often intuitiv ely in terpreted as the t yp e of “individuals”). Note that Ch urch’s original form ulation of STT includes functional extensionality as an explicit but optional axiom, which w e adopt here. STT terms are inductiv ely defined starting from a collection of typed con- stan t sym b ols ( C onst ) and typed v ariable symbols ( V ar ) using the constructors function abstr action and function applic ation , by ob eying the corresp onding t yp e constraints (see Fig. 1). T yp e subscripts and parentheses are usually omit- ted to impro ve readabilit y , if ob vious from the context or irrelev ant. In contrast to predicate logic, in STT there is no distinction b etw een terms and formulas . W e observ e that STT terms of t yp e ‘ o ’ are customarily referred to as “prop osi- tions”, and sometimes as “formulas” to o. In the original STT presentation b y Ch urch [34], and also the one by Henkin [55], an infinite num b er of logical constants are introduced (to b e constrained b y axiom schemata). W e gather them in a set C onst . 10 C onst = { not o → o , or o → o → o } ∪ {∀ α ( α → o ) → o | α ∈ T } ∪ { ι α ( α → o ) → α | α ∈ T } The families ∀ α and ι α represen t quantifier and definite description predicates for all types α ∈ T . 11 The other Bo olean connectiv es are introduced as ab- breviations in the expected fashion. The customary infix notation for binary connectiv es ( ∨ , → , etc.) is also introduced. It is worth reminding the reader that the term constructor function abstr ac- tion (ak a. λ -abstraction) is the only v ariable-binding construct av ailable in the STT. The customary binder notation for quantifiers and definite descriptions is in tro duced as an abbreviation (‘syntactic sugar’): ∀ α x α . s o : ≡ ∀ α ( α → o ) → o ( λx α . s o ) for each α ∈ T ι α x α . s o : ≡ ι α ( α → o ) → α ( λx α . s o ) for each α ∈ T Ch urch introduces equality in STT as a family of abbreviations, following 10 Churc h (and Henkin) actually employ ed the symbols N , A , and Π for not , or , and ∀ , respectively . W e cannot follow Church in all of his notational choices in this pap er. 11 In fact, b oth Churc h and Henkin seamlessly employ schematic type meta-v ariables ( α , β , etc.) when listing their constants and axiom schemata (via a less subtle abuse of notation than ours), somehow anticipating the need for schematic type-p olymorphism, as featured in the STLC (to b e discussed in § 2.2). 6 Leibniz’s principle of identity of indisc ernibles : 12 Q α α → α → o : ≡ λx α .λy α . ∀ α → o f α → o . ( f x → f y ) for each α ∈ T Using the previously defined equality symbol Q (with infix notation =), Ch urch prop oses tw o axiom schemata for the constants ι α , namely , the “axioms of descriptions” f α → o x α → ( ∀ y α . f y → x = y ) → f ( ι α ( α → o ) → α f ) and the “axioms of choice” f α → o x α → f ( ι α ( α → o ) → α f ) noting that the former clearly follo w from the latter. Ch urch’s inten tion was to allo w the use of ι α as definite description op erators without necessarily commit- ting to “c hoice” principles (in whic h case ι α effectiv ely b ecomes a choice/selection op erator ` a la Hilb ert’s ε ). Indeed, the later sc hema directly entails the follo w- ing (more stereot ypical) formulation of the “axiom of choice” in mathematics, whereb y every indexed family of non-empty sets (i.e. left-total relation) R β → γ → o has a choice function g β → γ (corresp onding to λx β . ι γ ( γ → o ) → γ ( R x )): ∀ R β → γ → o . ( ∀ x β . ∃ y γ . R x y ) → ( ∃ g β → γ . ∀ x β . R x ( g x )) Moreo ver, Churc h mentions that the terms ι α ( α → o ) → α (in tended as definite descriptions 13 ) are definable inductiv ely for an y functional t yp e α of form β → γ . Th us, if ι γ ( γ → o ) → γ is already defined, we can define: ι β → γ (( β → γ ) → o ) → β → γ : ≡ λh ( β → γ ) → o . λx β . ι γ y γ . ∃ f β → γ . h f ∧ y = γ f x So it seems lik e we only need to take definite descriptions for the base type constan ts ( { ι, o } for STT) as primitives. As it happ ens, only ι ι ( ι → o ) → ι is required, since we can in fact define: 14 ι o ( o → o ) → o : ≡ Q o → o ( λx o . x ) It is worth noting that, in k eeping with the Zeitgeist, Churc h did not in tro- duce a “semantics” for STT. This o ccurred ten y ears later at the hands of Leon 12 Observe that this formulation can b e shown equiv alent to the one employing double- implication (by con trap osition, noting that quan tifiers range ov er al l predicates, including their negations). As it happens, this definition, often called “Leibniz-equality”, while intended to denote the identit y relation, might fail to do so in some “non-standard” mo dels. W e will elaborate on this issue later on (see § 2.3), since first we need to introduce some basics of STT semantics. 13 Unfortunately , Ch urch do es not elab orate on this point. Later on Henkin [57] and Andrews [10, § 53–5309 γ ] verify this claim when ι α are axiomatized via the “axiom of descriptions” above. How ever, when ι α are interpreted/axiomatized as choice operators (i.e. Hilbert’s ε ), the p ossibilit y of such a reduction collides with later theoretical results (see [84] [20, § 1.3.5]). 14 This w as noted later on b y Henkin [57]. Andrews [9] also provides several suc h definitions. 7 Henkin (another of Churc h’s students), to whom we ow e the first completeness pro of for a calculus of STT. F or our current purp oses, 15 it shall suffice to men- tion that in Henkin’s gener al mo dels [55] (a paradigmatic set-based approach to STT semantics) eac h mo del is based up on a fr ame : a collection { D α } α ∈T of non-empt y sets, called domains (for eac h type α ). D o is c hosen as a tw o-element set, say { T , F } , in order to make STT classical, whereas D ι ma y ha ve arbitrar- ily many elements (ak a. “individuals”). As exp ected, the set D α → β consists of functions with domain D α and co domain D β . In so-called “s tandard” mo dels [20], these domain sets are assumed to b e ful l , i.e. they contain al l functions from D α to D β . F amously , Henkin [55] enlarged the class of STT models to also include “non-standard” ones, where domains D α → β are not full, y et contain all functions ‘named’ by an STT term, b y means of a suitably defined denotation function ( | · | ) whic h interprets each term s α as an elemen t | s α | of D α (its denotation ). As exp ected, a denotation function w orthy of its name must resp ect the in tended seman tics of STT as a lo gic of functions . Th us, | s α → β t α | ∈ D β denotes the v alue of the function | s α → β | ∈ D α → β when applied to | t α | ∈ D α , and | λx α . s β | ∈ D α → β denotes the corresp onding function from D α to D β (see e.g. [20, § 2] for details on what this means in terms of substitutions and the like). Denotations of terms are defined inductively , in the exp ected wa y , starting with the term constants, whic h in STT are not , or , and ∀ . 2.2 The Simply-T yp ed Lambda Calculus It should be noted that what computer scientists no wada ys call the “simply- t yp ed lam b da calculus” (STLC) has arisen as an a p osteriori distillation of Ch urch’s STT. In its basic v ersion, it can be defined similarly to STT but with all t yp e- and term-constants remo ved (as w ell as their constraining axioms), lea ving only the functional plum bing/wiring. Seen from this p erspective, it might also b e fair to say that STLC is a calculus (but not yet a logic) of typ e d functions, i.e., functions with a clearly delimited domain and co domain. Moreov er, we shall adopt here an extensional understanding of functions (e.g. b y assuming η - con version). After all, we w ant the STLC to pla y the role of a F unktionenkalk¨ ul . Lac king type constants (suc h as ι and o ), mo dern presentations of the STLC emplo y schematic type v ariables (cf. r ank-1 or ‘prenex’ t yp e polymorphism in the literature). This is very useful in practice, for instance, it makes best sense to define a function: applyTwice : ≡ λf . λx. f ( f x ) that applies a given function t wice, as having the type ( α → α ) → ( α → α ) parametric in the t yp e α (think of it as a sc hema v ariable). Essentially , this 15 F or a prop erly detailed presentation of STT semantics, we refer the reader to [20, 10]. 8 means that such a schematic-t yp e-p olymorphic function only needs to b e defined once, and it will work uniformly for any type α chosen b y the caller. 16 In practical applications (e.g., in programming languages), the STLC plays the role of a formal framework that can be extended (or instan tiated) by adding domain-sp ecific t yp e- and term-constants (as well as constraining axioms) as needed. Seen from this persp ective, the STT c ould b e understo o d, quite anachro- nistically of course, as an instantiation of the STLC, as applied to the domain of logic. 17 There is a great deal of literature on the expressiv e strengths (and w eak- nesses) of the STLC, so w e shall not delve into it here. Instead, w e restrict ourselv es to revisiting a traditional classro om exercise for λ -calculus students; namely , defining terms that b ehav e lik e the Boolean constants true and false , and then using these to define terms that b ehav e like pairs, conditionals, and Bo olean-lik e connectives suc h as conjunction and disjunction (which w e p edan- tically denote with an asterisk as a reminder that they are not quite the real thing). W e start with true ∗ : ≡ λx. λy. x false ∗ : ≡ λx. λy. y Next, we enco de pairs as ⟨ x, y ⟩ : ≡ λf . f x y so we can extract the first and second comp onents using pro jections π 1 : ≡ λp. p true ∗ π 2 : ≡ λp. p false ∗ th us getting 18 π 1 ⟨ x, y ⟩ ∼ = x resp. π 2 ⟨ x, y ⟩ ∼ = y . As it happ ens, a conditional op erator can b e defined in terms of pairs if ∗ : ≡ λc. λt. λe. ⟨ t, e ⟩ c ∼ = λc. λt. λe. c t e so that if ∗ true ∗ t e ∼ = ⟨ t, e ⟩ true ∗ ∼ = π 1 ⟨ t, e ⟩ ∼ = t if ∗ false ∗ t e ∼ = ⟨ t, e ⟩ false ∗ ∼ = π 2 ⟨ t, e ⟩ ∼ = e Using the previous definitions we can define some ‘Bo olean-like’ connectives 16 This feature of t yp e systems turned out to b e of such tremendous importance for program- ming that ev en mainstream ob ject-oriented languages like Jav a and Go ended up implementing it (as so-called “generics”) after y ears of programmers’ protests. 17 This mo dern understanding of the STLC is difficult to trace back to the work of some particular individual(s), so Churc h is usually credited due to his intellectual influence. 18 The notation ∼ = means that b oth expressions reduce to the same normal form according to the β - and η -con version rules of the λ -calculus. 9 not ∗ : ≡ λb. if ∗ b false ∗ true ∗ ∼ = λb. b false ∗ true ∗ and ∗ : ≡ λb 1 . λb 2 . if ∗ b 1 b 2 false ∗ ∼ = λb 1 . λb 2 . b 1 b 2 false ∗ or ∗ : ≡ λb 1 . λb 2 . if ∗ b 1 true ∗ b 2 ∼ = λb 1 . λb 2 . b 1 true ∗ b 2 so that the exp ected (trivial) equiv alences are satisfied, for instance: not ∗ true ∗ ∼ = false ∗ not ∗ false ∗ ∼ = true ∗ and ∗ true ∗ b ∼ = b and ∗ false ∗ b ∼ = false ∗ or ∗ true ∗ b ∼ = true ∗ or ∗ false ∗ b ∼ = b Hence the definitions ab ov e seem to capture the usual op erational b ehavior of pairs, conditionals and basic logical operations within the λ -c alculus , and can b e adapted straightforw ardly to the simply t yp ed setting (STLC) b y adding the appropriate type annotations. Ho wev er, as useful as the ab ov e encodings are (e.g. in the theory of program- ming languages), to the practicing logician they hav e the feeling of b eing not more than an ersatz . Things quic kly start to break down the momen t we try more serious logic stuff. F or instance, consider the following claim, corresp ond- ing to the De Morgan la w: not ∗ ( and ∗ a b ) ∼ = or ∗ ( not ∗ a ) ( not ∗ b ) . The ab ov e do es not hold unrestrictedly under arbitrary v alues for the v ari- ables a and b . There is the implicit constrain t that they must b e instantiated only with v alues ( λ -expressions) from the set { true ∗ , false ∗ } for this to hold. On a related note (to the dismay of the unaw are reader), we shall note that ⟨ π 1 p , π 2 p ⟩ ≇ p. F urther red flags arise when w e attempt to assign types to expressions fea- turing the ab ov e enco dings. While the giv en definitions are simple enough to ha ve well-formed types in the STLC, strange things happ en with more complex expressions. F or example, when instantiating the previous form ulation of De Morgan’s law with the pseudo-Bo olean terms true ∗ and false ∗ , they end up ha ving ne c essarily distinct t yp es (and quite conv oluted ones, indeed). Similarly , w e would intuitiv ely exp ect the λ -expressions and ∗ and or ∗ ab o ve to hav e the same type (after all, they are b oth ‘dual’ binary Bo olean connectives). W ell, they don’t. 2.3 Equalit y as Primitiv e and the System Q 0 So, back to the notion of a lo gic of functions (like STT), in contrast to a mere c alculus of functions (like STLC), we see that the idea of equalit y (identit y) as the primitive fundamental logical connectiv e (notion) is certainly not new. It w as apparently in the air at the b eginning of the last cen tury , and b eing activ ely 10 w orked on by Ramsey , p ossibly inspired by the philosophical views of Wittgen- stein, as w e can infer from this passage from Ramsey’s “The F oundations of Mathematics” 19 “The pr e c e ding and other c onsider ations le d Wittgenstein to the view that mathematics do es not c onsist of tautolo gies, but of what he c al le d ‘e quations’, for which I would pr efer to substitute ‘identities’ . . . (It) is inter esting to se e whether a the ory of mathematics c ould not b e c onstructe d with identities for its foundation. I have sp ent a lot of time developing such a the ory, and found it was fac e d with what se eme d to me insup er able difficulties.” As noted by Leon Henkin in his pap er “Iden tity as a logical primitive” [58], Alfred T arski, as early as 1923 [80], had already noted that, in the con text of higher-order logic (which he calls “la Logistique” hea vily influenced by the Prin- cipia ), one can define propositional connectives in terms of logical equiv alence and quantifiers. W e take the opp ortunity to extract from that pap er by Henkin our working definition of identit y: 20 “By the r elation of identity we me an that binary r elation which holds b etwe en any obje ct and itself, and which fails to hold b etwe en any two distinct obje cts.” [58, p. 31] In that pap er (to which we refer the reader in terested in a deeper treatmen t), Henkin credits Quine [70, 71] with ha ving shown how b oth quantifiers and con- nectiv es can b e defined in terms of equality and the abstraction op erator λ in the context of Ch urch’s type theory . Henkin later came up (indep enden tly [57]) with an analogous formulation and pro vided the corresp onding axiom system, whic h also benefited from further simplifications by P eter Andrews (another studen t of Churc h) [5, 11]. The main definitions are presented as follo ws (with other connectives introduced as abbreviations in the exp ected wa y): true o : ≡ ( λx o . x ) = o → o ( λx o . x ) false o : ≡ ( λx o . x ) = o → o ( λx o . true ) not o → o : ≡ ( λx o . false = o x ) ∀ α ( α → o ) → o : ≡ ( λP α → o . P = α → o ( λx α . true )) and o → o → o : ≡ ( λx o . λy o . ( λf o → o .f x = o y ) = ( o → o ) → o ( λg o → o . g true )) Let us try to understand the ab o ve enco ding. The constant true can b e an arbitrary tautology , like claiming that something (e.g. the iden tity function) is self-iden tical. The constant false can b e an arbitrary absurdity or imp os- sibilit y , like claiming of tw o different things that they are identical. Negation b ecomes self-explanatory once w e observ e that the axioms constrain the seman- tical domain for type ‘ o ’ to contain exactly tw o inhabitants (the denotations of true and false ). The universal quantifier basically tells of a giv en predicate 19 Quoted in [11], where Andrews recalls Henkin’s development of a formulation of type theory based on equality , and the significance of this contribution. 20 The terms “identit y” and “equalit y” are used in the literature almost in terchangeably . W e prefer to think of “equality” as a connective (syntax) and “identity” as the denoted relational concept (semantics). 11 whether it holds alwa ys true for any input. Conjunction is admittedly not very in tuitive; ma yb e this prompted Andrews to introduce the follo wing alternativ e definition (see [6, § 1.1] and also [20, § 1.4], [10, § 51]): and o → o → o : ≡ ( λx o . λy o . ( λf o → o → o . f x y ) = ( o → o → o ) → o ( λf o → o → o . f true true )) The ab ov e is basically an encoding of the corresponding truth table (re- calling the ordered pair encoding from STLC in § 2.2, it can b e written as: λx.λy . ⟨ x, y ⟩ = ⟨ true , true ⟩ ). This simplified system featuring equality as the sole (primitive) logical con- stan t would later giv e rise to the system Q 0 in Andrews’ do ctoral dissertation [6], where it is introduced as the foundational subsystem for his transfinite t yp e system Q . Ever since, Q 0 has become a standard foundational reference for higher-order automated reasoning and interactiv e theorem proving. 21 Finally , we note that Q 0 (follo wing STT) features a family of functions ι α ( α → o ) → α axiomatized to behav e as inv erses of equality , i.e., for any y α w e hav e 22 ( ι α x α . y α = α x ) ∼ = ι α ( α → o ) → α ( λx α . y α = α x ) ∼ = ι α ( Q α y α ) = α y α Recalling from § 2.1, w e observe that, from the ab ov e family , only ι ι ( ι → o ) → ι needs to b e taken as primitiv e. In fact, b eing the inv erse op eration to Q α , ι α can b e seen as yet another instance of discernment. 23 It is w orth men tioning that Andrews’ p ostulation of equalit y (resp. iden- tit y) as a logical primitiv e go es b eyond an y minimalistic or aesthetic app eal, as it ultimately b ecomes a mathematical b ypro duct (resp. necessity) of Henkin’s notion of general mo dels (see discussion in § 3.2). More sp ecifically , Andrews constructs in [8] a general (and non-standard) mo del in which functional ex- tensionalit y fails to hold. 24 His diagnostic is basically that sets (i.e. elements of D α → o ) in such a (non-standard) mo del may b e so sparse that the denotation of Leibniz-equalit y is not the actual identit y relation. In fact, Andrew’s result en tails that Henkin’s soundness theorem for STT [55, Theorem 2] is “tec hni- cally incorrect” (in Andrews’ words), yet Henkin’s completeness result remains unaffected. As Andrews aptly p oints out [8], the issue is more conceptual than mathematical, and it is resolved by mo difying the definition of general mo dels to include the requirement that D α → o con tains all singleton sets. Moreo ver, Andrews further argues in [8] that, since the identit y relation has no w made its wa y into the semantic definition of STT, the most natural next step is to introduce it to o into the syn tax as a primitive connective, namely 21 Notably as the basis of Andrews’ TPS/ETPS line of provers and closely related to the HOL family; see [10] for a detailed textb ook presen tation and metatheoretic developmen t. 22 This axiom sc hema is equiv alent to the previously discussed “axioms of descriptions” in Churc h’s STT. Andrews also presents “axioms of choice” as optional extensions to his system. 23 By extension, the same can be said of Hilb ert’s ε . Choice is a facet of discernment. 24 His is in fact a quite concrete mo del with | D ι | = 3. Adopting equalit y as primitive has the added benefit of eliminating finite non-standard mo dels [10, § 54], and thus any generated finite (counter)model is necessarily “standard”. 12 equalit y , while p ossibly defining the rest in terms of it, as illustrated in Q 0 . 25 In fact, later work in the context of automated theorem proving in HOL do es indeed in tro duce equality as primitiv e—for go o d practical reasons (see [17] and references therein). 3 HOL as an Univ ersal (Meta-)Language 3.1 What is HOL? It is often said, half-jokingly , that formal logic sits somewhat uncomfortably b et ween the philosophy and computer science c hairs—with only the o ccasional excursion into mathematics. Perhaps the same could be said of the acronym HOL, whic h, at this p oin t, w e can only describ e as standing for “higher-order logic”. But what exactly is HOL? In philosoph y (and sometimes mathematics departments), p eople tend to think of HOL, usually under the influence of set theory , quite literally as “ α - order logic”, for some ordinal α , meaning that it features quantifiers ranging ov er α − 1-order predicates, all the w ay do wn to second-order logic (which features quan tifiers ranging o ver goo d-old first-order predicates). This view has the b enefit of reusing an arguably w ell kno wn conceptual framew ork (predicates, quan tifiers, relations, etc.). In computer science, HOL is employ ed as an umbr el la term for a family of classic al higher-order logics, built up on STLC, and featuring some kind of w eak t yp e polymorphism, like the schematic (‘prenex’) one disc ussed previously . More specifically , in theorem proving [17], HOL is employ ed to refer to logical languages used in sev eral mathematical pro of assistants (Isab elle/HOL, HOL- Ligh t, HOL4, etc.) descending from the v enerable HOL system [54]. In this text w e will abstract aw ay the particular implementation-specific differences b et ween HOL ‘flav ors’. Th us, w e present HOL as an ide alize d logical (family of ) system(s) which feature the b est of STLC and Q 0 w orlds: They support sc hematic t yp e-p olymorphism and use it to in tro duce a primitiv e term constan t Q having type α → α → o parametric on an arbitrary t yp e α . 26 Th us, HOL is not only a higher-or der functional calculus (i.e. it allows for functions that take other functions as arguments and/or return functions) but also b ecomes a higher-or der lo gic : w e can define quan tifiers that range o ver pred- icate v ariables (of type α → o ) and, more generally , arbitrary function v ariables (t yp e α → β ). When it comes to expressivity , higher-order logic (HOL) has b een attack ed 25 Of course, an alternative approach would b e to sacrifice extensionality instead; cf. [16], who systematically explore generalizations of general models, among them mo dels where functional extensionality and so-called Boole an extensionality ( | D o | = 2) fail. 26 Of course, pragmatic implementation details diverge among systems. F or instance Gor- don’s HOL [54] introduces implication as an additional primitive connective (instead of defin- ing it using equality). Others also feature primitive quantifiers. These design choices are mostly made to b o ost p erformance (e.g. calculi rules often feature implication and quantifiers directly). 13 from b oth sides: to o muc h (e.g. b eing undecidable) and to o little (having a to o ‘simple’ t yp e system in which even type inference is decidable). W e shall take this as goo d evidence that HOL indeed reaches an expressivity sweet sp ot. T o be fair, FOL prop onents can also conco ct an analogous sweet-spot argumen t, and ma yb e they are right to o. After all, HOL (with an appropriate semantics 27 ) and man y-sorted FOL (and th us v anilla FOL) are equally expressiv e from a Lindstr¨ om’s theorem p ersp ectiv e [64, 39]. Y et, the pragmatics of formalizing and proving in FOL and HOL couldn’t feel more different. In terms of practical applications, HOL seems to hav e the upp er hand, as witnessed by the fact that all full-fledged mathematical pro of assistan ts are based on (some v ariation of ) HOL 28 . In a sense, the main thesis of the presen t writing essen tially claims that HOL (understo o d as STLC plus equalit y/disequality) is “all you need”. Still, as with lo ve, p eople sometimes cra ve additional expressivit y . F or them, 29 a natural extension of HOL featuring dep endent types has recently b een dev elop ed. This system is fittingly called dep endently-typ e d HOL (DHOL). Nonetheless, HOL is expressiv e enough to embed DHOL [72]. This p ossibility is not surprising if we recall the well-kno wn analogous enco ding of HOL into (man y-sorted) FOL. 3.2 On Completeness It is not uncommon to hear in logic folklore that HOL is “incomplete”. Of course, without further elab oration, suc h a statement sounds as puzzling as it is meaningless. P eople who say this (when they are not quoting hearsa y) are usually referring to the notion of “G¨ odel incompleteness” (aptly dubb ed “essen tial incompleteness” b y Andrews [10]), or p erhaps more appropriately , “incompletabilit y”. Indeed, this metaph ysical prop ert y is proudly worn b y HOL as a badge of honor: it testifies that HOL is capable of expressing the most in teresting kinds of problems. 30 Another, more do wn-to-earth notion of (in)completeness is a relational prop- ert y of a given calculus with resp ect to an intended semantics (e.g. a class of mathematical structures). When showing that a particular calculus is incom- plete (with resp ect to a semantics), w e pro vide evidence of a blind spot—usually 27 One with respect to which sound and complete calculi exist. Suc h a semantics being e.g. Henkin’s general mo dels [55], under which HOL satisfies first-order model-theoretical properties (compactness, L¨ owenheim-Sk olem, etc.). W e refer the reader to [4] and [64, 65] for an extended discussion. 28 Systems lik e ACL2, Mizar and Metamath b eing the kind of exceptions that confirm the rule, as they add additional syn tactic HOL-like sugar: ACL2 provides functional syn tax and type-like guards, while Mizar also emulates ‘types’ and higher-order functions via schemes (among others). Moreov er, Mizar and Metamath are based on set-theory (“HOL in wolf ’s clothing”). Still these systems are not as p opular as their HOL-based cousins. 29 Many of whom are researchers w orking on the formalization of mathematics using dependently-typed pro of assistants like PVS, Co q, Lean, etc. 30 Philosophical sp eculations around “G¨ odel incompleteness” ab ound, and it is not our aim to give them further platform. W e refer the i n terested reader to [27] for own sp eculations, or [43] for a sob er p ersp ective. 14 a ‘bug’ in the pro of pro cedure. 31 This is a problem that can, in principle, b e fixed—e.g., by adding more axioms or rules of inference. By contrast, “G¨ odel incompleteness” is, by its very nature, unfixable. It is therefore not a ‘bug’, but rather a feature. Sound and complete STT- and HOL-calculi hav e existed since at least Henkin’s seminal 1950 pap er [55]. They are plentiful, so we refer the reader to [17] for a somewhat dated but very insightful surv ey . Henkin’s main insigh t consists in disco vering an appropriate seman tics for in terpreting STT (and th us HOL), so that complete calculi exist (cf. [4] for a discussion). The reader shall note that this semantics is often qualified with the adjectiv e “general” in the literature (e.g. Henkin’s gener al mo dels ), whereas the traditional (inadequate) one often gets the qualification “standard”. 32 Recall from our previous discussion ( § 2.1) that, broadly sp eaking, in HOL’s “standard” semantics, the domain sets D α → β (whic h interpret functional types) are ful l , i.e. they are supposed to contain al l functions with domain D α and co domain D β ; and th us they are completely determined b y the c hoice of domains for the base type constan ts (e.g. D ι for STT). This conv enient prop erty comes at the cost of metaph ysical opacity (e.g. what exactly is in D ι → o for infinite D ι ?). By contrast, in general mo dels, the domains D α → β are not necessarily ful l , but still con tain enough elements (functions) to guaran tee that any term s α → β has a denotation. In other w ords, the only requirement for the domains D α → β is that they con tain, at least, all name able functions. 33 On the flip side, the family of domains D τ (called a “frame”) is no longer determined b y the choice of domains for base types. So far, it seems this is the conceptual bullet w e hav e to bite in order to define an appropriate HOL seman tics, that is, one that allo ws for the p ossibility of a complete calculus. But maybe we can hav e our cake and eat it too. T o wards the end of the aforemen tioned article [58], Henkin discusses “Bo olean models” for HOL, 34 in whic h, he claims, this conv enient situation arises. In B - mo dels (as Henkin names them) the domain D o can b e an arbitrary c omplete Bo ole an algebr a B (not nec- essarily the 2-v alued one from b efore). More sp ecifically , he introduces B -mo dels for a relational version of STT, as b eing completely determined by choosing a non-empt y domain D ι and a function q which associates to each pair of individ- uals x , y in D ι a v alue q ( x, y ) in the complete Bo olean algebra B . As Henkin further explains, “this function q may b e thought of as measuring ‘the degree of equality’ of x and y ”. 35 31 In automated reasoning, it is not uncommon to consciously add optimizations that break completeness of calculi in exchange for improv ed efficiency . The lost completeness will ideally make it to the backlog as ‘technical debt’. 32 As in “standard movie”, “standard excuse”, or “standard deontic logic” 33 This can b e equated to a nominalist p osition, as opp osed to an arguably platonist one in the case of “standard” mo dels; cf. [56, 41]. 34 In a footnote, Henkin men tions that this w ork w as originally presen ted at a symposium on The ory of Mo dels held in Berkeley in 1963, but the corresp onding pap er was never published (no reason given). He do es not pro vide any pro ofs, which he assures will be given “in a forthcoming pap er”—which the presen t author has not been able to locate. 35 As expected, this function q m ust satisfy sp ecial equiv alence-like prop erties: It must be 15 Once D ι and q are c hosen, all other domains are determined: W e take as D o the carrier set of B , and interpret Q ( o,o ) (equalit y among prop ositions) 36 as the op eration ⇔ of double-implication in B ; Q ( ι,ι ) denotes q ; finally , Q ( β ,β ) for β = ( α 1 , . . . α n ) denotes the function q β ( r , s ) = V ( r ( x 1 , . . . , x n ) ⇔ s ( x 1 , . . . , x n )) for all x i ∈ D α i . As in standard mo dels of STT, D ( α 1 ,...,α n ) is defined to b e the ful l domain of relations among domain sets D α i for i ≤ n . F urthermore, Henkin teases in [58] with the existence of a stronger completeness result: “There is a sp e cific complete Boolean algebra B ∗ , such that for every formula A o w e hav e | = B ∗ A o if, and only if, ⊢ A o .” W e finish this discussion by noting that standard models are subsumed under general models, and th us HOL form ulas prov en v alid with resp ect to the general seman tics are also v alid in the standard sense. Moreo ver, we shall observe that (classes of only) non-standard models cannot b e characterized via HOL form ulas [10, § 55]. As a consequence, it is not clear how (if at all) the results deliv ered by HOL calculi migh t ever differ from the “standard” ones. In the words of Andrews [10, p. 255]: “One who sp e aks the language of [HOL] c annot tel l whether he lives in a standar d or nonstandar d world, even if he c an answer al l the questions he c an ask.” 3.3 Mo dal and Non-classical Logics in HOL A tec hnique called shal low semantic al emb e ddings [15, 18] has b een dev elop ed to enco de (quantified) mo dal and non-classical logics in to HOL as a meta-language, in suc h a w ay that ob ject-logical form ulas corresp ond to HOL terms. This is realized by directly encoding in HOL the truth conditions (seman tics) for ob ject-logical connectives as syn tactic abbreviations (definitions), essentially in the same wa y as they app ear in textb o oks. In a sense, this is not muc h differen t from what logicians ha ve been do- ing since the inv ention of mo del-theoretical seman tics, where traditional logic exp ositions can b e seen as ‘em b edding’ the seman tics of ob ject logics into nat- ural language (e.g., English plus mathematical shorthand) as a meta-language. The difference now is that the meta-language, HOL, is itself a formal system of logic. 37 This w ay we can carry out semi-automated ob ject-logical reasoning by trans- lation in to a formal meta-logic (HOL) for whic h go o d automation supp ort ex- ists [17]. As argued, e.g., in [15], such a shal low embedding allo ws us to reuse state-of-the-art automated theorem pro vers and model generators for reason- ing with (and ab out) many differen t sorts of non-classical logical systems in a very efficient wa y (a voiding, e.g., inductiv e definitions and pro ofs as in de ep commutativ e, and it should v alidate q ( x, x ) = 1, as well as q ( x, y ) · q ( x, z ) ≤ q ( y , z ) for all x, y, z ∈ D ι (corresponding to v ariants of symmetry , reflexivity and Euclideanness). 36 In this relational v ariant of STT, a relational type ( α 1 , . . . , α n ) corresponds to an n -ary relation among D α i for i ≤ n . It can b e paraphrased (via Currying) as the functional type α 1 → · · · → α n → o in STT. 37 This is, in fact, the idealized situation T arski envisioned in his seminal pap er [81]. He had to fall back on natural language for technical reasons (he w as clearly ahead of his time!). 16 em b eddings). 38 The idea of emplo ying HOL as meta-logic to enco de quantifie d non-classical logics has b een exemplarily discussed b y Benzm ¨ uller & Paulson in [18] for the case of normal m ulti-mo dal logics featuring first-order and propositional quan ti- fiers. Their approac h dra ws up on the “prop ositions as sets of w orlds” paradigm from mo dal logic, b y adding the twist of enco ding sets as their characteristic functions, i.e., as total functions with a (2-v alued) Bo olean co domain, in such a wa y that a set S becomes enco ded as the function s of type α → o such that for any x of type α w e hav e that x ∈ S iff ( s x ) = true . As has b een discussed in [45], this basically corresp onds to Stone-t yp e represen tations of Bo ole an Al- gebr as with Op er ators [61] as algebras of sets. F or the sake of illustration, we recall the corresp onding definitions in HOL (see [45] for details), employing ι for the type of ‘worlds’ (and thus ι → o for prop ositions). U ι → o : ≡ λw ι . true ∅ ι → o : ≡ λw ι . false − ( ι → o ) → ι → o : ≡ λP ι → o . λw ι . ¬ ( P w ) ∪ ( ι → o ) → ( ι → o ) → ι → o : ≡ λP ι → o . λQ ι → o . λw ι . ( P w ) ∨ ( Q w ) ∩ ( ι → o ) → ( ι → o ) → ι → o : ≡ λP ι → o . λQ ι → o . λw ι . ( P w ) ∧ ( Q w ) ⇒ ( ι → o ) → ( ι → o ) → ι → o : ≡ λP ι → o . λQ ι → o . λw ι . ( P w ) → ( Q w ) ↽ ( ι → o ) → ( ι → o ) → ι → o : ≡ λP ι → o . λQ ι → o . λw ι . ( P w ) ∧ ¬ ( Q w ) [ (( ι → o ) → o ) → ι → o : ≡ λS ( ι → o ) → o . λw ι . ∃ P ι → o . ( S P ) ∧ ( P w ) \ (( ι → o ) → o ) → ι → o : ≡ λS ( ι → o ) → o . λw ι . ∀ P ι → o . ( S P ) → ( P w ) ⊆ ( ι → o ) → ( ι → o ) → o : ≡ λP ι → o . λQ ι → o . ∀ w ι . ( P w ) → ( Q w ) In this w ay , after in terpreting Bo olean connectives ( ˙ ⊤ , ˙ ⊥ , ˙ ∨ , ˙ ∧ , ˙ → , etc.) 39 as their corresp onding set op erations, mo dalities b ecome easily enco ded as sho wn b elo w—not unlik e the well-kno wn standar d tr anslation of mo dal logic in to first- order logic. 40 □ ( ι → ι → o ) → ( ι → o ) → ι → o : ≡ λR ι → ι → o . λP ι → o . λw ι . ∀ v ι . ( R w v ) → ( P v ) ♢ ( ι → ι → o ) → ( ι → o ) → ι → o : ≡ λR ι → ι → o . λP ι → o . λw ι . ∃ v ι . ( R w v ) ∧ ( P v ) On top of this, Benzm ¨ uller & Paulson [18] hav e sho wn how to encode ob ject- logical quantifiers (first-order and prop ositional) b y lifting the meta-logical ones. ˙ ∀ ( α → ι → o ) → ι → o : ≡ λφ α → ι → o . λw ι . ∀ x α . ( φ x w ) ˙ ∃ ( α → ι → o ) → ι → o : ≡ λφ α → ι → o . λw ι . ∃ x α . ( φ x w ) 38 W e refer the reader to [53] for a discussion of the differences (and similarities) between deep and shallow embeddings. 39 W e shall sometimes add a dot to differen tiate b etw een ob ject-logical and HOL connectives. 40 Note that they are further parameterized with an argument R of type ι → ι → o in the role of accessibility relation. Hence the present enco ding corresp onds in fact to multi-modal logic. 17 Binder notation can also b e introduced in the usual w ay , where ˙ ∀ x. φ stands for ˙ ∀ ( λx. φ ) and ˙ ∃ x. φ stands for ˙ ∃ ( λx. φ ). F ollowing Benzm ¨ uller & Paulson work, a series of pap ers ha ve b een brought forw ard to substantiate the claim that HOL can truly serve as a univ ersal meta- logic for man y differen t systems of non-classical logic. F or instance, w e hav e paracomplete & paraconsistent logic [45], deontic logics [50, 68], epistemic and dynamic logic [19], conditional and defeasible logic [14, 68], among many others sp ecimens in the non-classical logics zo o. F or the sak e of illustration, we provide b elow a selection (necessarily out of con text) of some non-classical connectives, just to giv e the reader a sense of ho w their HOL enco dings look. W e refer to the corresp onding papers for con text and discussion. Also note that we omit p edantic t yp e-annotations—for readabilit y , and b ecause, in practice, they can b e automatically inferred (e.g. b y Isab elle/HOL): Constan t- resp. v ariable-domain univ ersal quantifiers, parameterized with a set E resp. relation E representing ‘existing’ ob jects (see [48], and [45, § 3.8]). ˙ ∀ con : ≡ λE . λφ. λw . ∀ x. ( E x ) → ( φ x w ) ˙ ∀ var : ≡ λ E . λφ. λw . ∀ x. ( E x w ) → ( φ x w ) Bo olean-based LFIs’ [26] paraconsistent negation and its corresponding con- sistency recov ery operator, assuming a unary set-op eration B ( α → o ) → α → o as (ax- iomatized) constant representing the top ological notion of “b order” (see [45]). ˙ ¬ : ≡ λP . λx. ¬ ( P x ) ∨ ( B P x ) i.e. λP . − P ∪ ( B P ) ◦ : ≡ λP . λx. ¬ ( B P x ) i.e. λP . − ( B P ) F usion and its residual implications (e.g. as in Lam b ek calculus and also some relev ance logics) via “Routley-Meyer-st yle” semantics, 41 assuming a ternary re- lation R α → α → α → o as constant (duly axiomatized). ⊗ : ≡ λP . λQ. λz . ∃ x. ∃ y . ( P x ) ∧ ( Q y ) ∧ ( R x y z ) \ : ≡ λP . λQ. λy . ∀ x. ∀ z . ( R x y z ) → ( P x ) → ( Q z ) / : ≡ λP . λQ. λx. ∀ y . ∀ z . ( R x y z ) → ( Q y ) → ( P z ) In the ab o ve examples, prop ositions denoted sets (more sp ecifically , elemen ts of a complete Bo olean algebra of sets 42 ), and op erations denoted set op erations (e.g. ‘left-image’ as in the unary ♢ or the binary ⊗ ), but in principle, prop osi- tions can denote elem en ts in any algebraic structure as long as it admits a suit- able ordering for defining “lo cal” (ak a. “degree-preserving” [42]) consequence 43 41 W e refer the reader to [12] for explanations ab out this kind of semantics in the context of relev ance logic, and analogously to [66, § 2] for the Lambek calculus. Isab elle/HOL encodings of these systems can b e consulted in [47, examples/substructural logics ]. 42 Even more sp ecifically , in HOL (and Q 0 ) such a Bo olean algebra is also atomic, with singletons (i.e. denotations of Q x for an y x ) pla ying the role of atoms. 43 Otherwise, w e can still put our creativity to work and try to come up with an adequate “global consequence” definition, e.g., using generalized matrices and the like; cf. [82, 42] for a discussion. The literature on many-v alued logics has quite some go o d examples. 18 and features suitably interrelated op erations (e.g. adjunction/residuation con- ditions enabling things like mo dus p onens, deduction theorem, and the lik e). Related to the mo dal “propositions as sets (of states)” paradigm, w e can also conceive of an analogous “prop ositions as relations (on states)” one. Un- derstanding prop ositions as sets of transitions b etw een states offers an enric hing, dynamic p ersp ectiv e. In order to do this, we shall first enco de an algebra of re- lations qua set-v alued functions. Seman tically speaking, a relation with source D α and target D β is represen ted as the function R ∈ D α → β → o (via Currying). F rom this p ersp ectiv e, relations inherit the structures of b oth sets and functions, and enrich them in manifold w ays. Literature on relational algebra informally classifies relational connectiv es in to t wo groups: a so-called “Boolean” (ak a. additive) and a “Peircean” (ak a. m ultiplicative) structure. When seen as set-v alued functions, we can see that the former is in fact inherited from sets, while the latter comes from their generalized (i.e., partial and non-deterministic) functional structure. W e start with the former, by doing essentially the same ‘in tensionalization’ mov e as for sets b efore (and again omitting t yp e annotations): U r : ≡ λw . λv . true ∅ r : ≡ λw . λv . false − r : ≡ λR. λw . λv . ¬ ( R w v ) (also notation: R − ) ∪ r : ≡ λR 1 . λR 2 . λw . λv . ( R 1 w v ) ∨ ( R 2 w v ) ∩ r : ≡ λR 1 . λR 2 . λw . λv . ( R 1 w v ) ∧ ( R 2 w v ) ⇒ r : ≡ λR 1 . λR 2 . λw . λv . ( R 1 w v ) → ( R 2 w v ) ↽ r : ≡ λR 1 . λR 2 . λw . λv . ( R 1 w v ) ∧ ¬ ( R 2 w v ) [ r : ≡ λS. λw . λv . ∃ R. ( S R ) ∧ ( R w v ) \ r : ≡ λS. λw . λv . ∀ R. ( S R ) → ( R w v ) ⊆ r : ≡ λR 1 . λR 2 . ∀ w . ∀ v . ( R 1 w v ) → ( R 2 w v ) The algebraic structure ab ov e is essentially the same as that for sets (complete atomic Bo olean algebra). Th us, in the con text of HOL, relations can seamlessly b e employ ed in the same roles sets are (unsurprisingly , since they are, after all, isomorphic to sets of pairs). More interesting is their “Peircean” structure: 44 ⌣ : ≡ λR . λw . λv . ( R v w ) (also notation: R ⌣ ) ⌢ : ≡ λR . λw . λv . ¬ ( R v w ) (also notation: R ⌢ ) ; : ≡ λR 1 . λR 2 . λw . λv . ∃ u. ( R 1 w u ) ∧ ( R 2 u v ) † : ≡ λR 1 . λR 2 . λw . λv . ∀ u. ( R 1 w u ) ∨ ( R 2 u v ) ▷ : ≡ λR 1 . λR 2 . λw . λv . ∀ u. ( R 1 u w ) → ( R 2 u v ) ◀ : ≡ λR 1 . λR 2 . λw . λv . ∀ u. ( R 2 v u ) → ( R 1 w u ) 44 W e refer to [47] for a discussion, and several applications of these relational notions. 19 F rom the op erations on relations ab ov e, the first t wo are unary: ⌣ is trans- p osition (ak a. “conv erse”, “reverse”, etc.), ⌢ is cotransp osition (conv erse-of- complemen t/complement-of-con verse); and the rest are binary op erations (writ- ten as infix notation): ; is comp osition, † is dual-comp osition, and ▷ resp. ◀ are residuals ‘on the right’ resp. ‘on the left’ (wrt. comp osition). 45 As we can see, HOL is not only a lo gic of functions , but also hides a v ery p o werful lo gic of r elations . As an example, we can use the previous insigh ts to pro vide a shallow semantical em b edding for cyclic line ar lo gic , 46 basically by asso ciating ob ject-logical connectives to relational op erations as follows: 47 1 : ≡ Q and 0 : ≡ ∅ r ⊥ : ≡ D and ⊤ : ≡ U r ⊗ : ≡ ; and ⊕ : ≡ ∪ r & : ≡ † and & : ≡ ∩ r ⊸ : ≡ ▷ and • − : ≡ ◀ Finally , “exp onentials” are also enco ded as unary op erations on relations: ! : ≡ λR . R ∩ r Q and ? : ≡ λR . R ∪ r D 3.4 A Recip e for Enco ding Logics in HOL W e provide b elow an informal recip e w e hav e b een following to enco de logics in HOL. W e hav e w orked mostly with the Isabelle/HOL pro of assistant, but the approac h transfers seamlessly to other systems (HOL-Light, Co q, Lean, etc.). • Make a decision: What shall prop ositions denote—sets, relations, cate- gories, finite field elements or p olynomials? This c hoice constrains many future decisions. • Get acquainted with the corresp onding background mathematical theory for the seman tics, whic h is t ypically part of some library for the proof assistan t in question (and usually includes algebra, set theory , top ology , category theory , etc.). • State the signature for ob ject-logical connectives and map arities to t yp es. F or instance, if your prop ositions hav e type α , your candidate concepts for unary and binary connectives migh t ha ve t yp es of the form α → α and α → α → α , respectively—or maybe β → α → α and β → α → α → α in case they tak e an additional argumen t of t yp e β (e.g., as in relation-indexed mo dalities in multi-modal logics). 45 Note that: R † S = ( R − ; S − ) − . W e sp eak of residuals, in the sense that: R ; S ⊆ r T iff S ⊆ r R ▷ T iff R ⊆ r T ◀ S . Moreov er, we hav e that R ▷ S = R ⌢ † S and R ◀ S = R † S ⌢ . 46 This linear logic v ariant was in tro duced in [38]. See [47, examples/substructural logics ] for the corresp onding Isab elle/HOL enco ding. 47 Note that D corresp onds to disequality , which can b e enco ded as: λx.λy . ¬ ( x = y ). 20 – Use these types to searc h for (or generate) candidate concepts in the bac kground mathematical theory to interpret the connectiv es in question (e.g. ♢ resp. ⊗ are interpreted as unary resp. binary left- image set-op erators for a binary resp. ternary relation). – Decide on the type of entailmen t: v alue- vs. degree-preserving (ak a. global vs. lo cal) [42]. Provide notation (e.g., in mo dal logics lo cal consequence ends up b eing syntactic sugar for subset ordering). – Enco de seman tic axioms (e.g., frame conditions in mo dal logic). – Carry out some tests. They can be ‘p ositive’ lik e v erifying axioms/rules and kno wn theorems (using pro of automation, e.g. Sle dgehammer [21]). They can also be ‘negative’ like finding coun terexamples to exp ected non-theorems (using a mo del generator, e.g., Nitpick [22]). – Go back to some previous step as required, and iterate . . . 48 After surveying the previous, more or less sophisticated, enco dings of mo dal and other “non-classical” logics in HOL, we migh t wonder where HOL’s en- hanced expressivity comes from, as compared with the p o or-man logic enco ding hac ks of the STLC (as discussed in § 2.2). As we hav e seen, the secret sauce is disc ernment : all you need. 4 Discernmen t and Dualit y: Prosp ects W e hav e previously men tioned that b y disc ernment we essentially mean the capacit y to tell (differen t) things apart: the red from the green, the go o d from the bad, etc. It can b e mathematically mo delled, quite naturally , as a relation, in tw o dual w ays, dep ending on where we wan t to place the fo cus. They are: • Equality/iden tity: The relation denoted by Q (infix =). • Disequality/difference: The dual relation denoted by D (infix =). The concept of (classical) negation serves as a mediator in this duality: a = b iff ¬ ( a = b ), and a = b iff ¬ ( a = b ). P erhaps this reveals its most essen tial c haracteristic: a bridge b et ween sameness and difference. W e sa w before ho w Q added to STLC, thus giving rise to HOL, is enough to define all other logical connectiv es and quantifiers. W e also briefly mentioned the shal low semantic al emb e ddings tec hnique [18, 15], whereby HOL can embed all kinds of logics as fragments. 49 Hence, after unfolding definitions in the 48 As an instance of the “problem of formalization”, the logic embedding pro cess is inter- pretative, and thus iterative and virtuously circular: it shall conv erge to a state of “reflective equilibrium”. See previous work on c omputational hermeneutics [49, 51] for a discussion. 49 The univ ersalistic claim is, in fact, as strong as it sounds. W e are not aw are of an y systems of non-classical logic that cannot b e embedded in HOL—sometimes in a quite natural and elegant wa y . W e are, of course, very much interested in obtaining concrete evidence of the limits of this approach. 21 men tioned HOL enco dings, all w e are left with is Q plus the functional STLC wiring. 50 Iden tity is all y ou need. W e also saw ho w adding Q (or its evil twin D ) as a term-constant to the STLC (to obtain HOL) presupposes the existence of a “Bo olean” t yp e constan t ‘ o ’ to o. That this type constant is interpreted as a domain set D o ha ving exactly tw o elements, do es not only follow tradition, but also corresp onds to an in tuitive “all or nothing” understanding of identit y (difference). How ever, we sa w from Henkin’s efforts [58] describ ed ab ov e, that a more general, algebraic understanding of “Bo olean” is also p ossible in this context, and thus identit y (difference) can also be understo od in “shades of grey”, ev en rendering arguably more elegant completeness results. Th us, enco ding logical connectives using discernmen t as primitive, either as iden tity or as difference, gives rise to the pair of dual translations b elow: Via p ositiv a: true : ≡ Q = Q false : ≡ ( λx. true ) = ( λx. x ) not : ≡ ( λx. x = false ) and : ≡ ( λx. λy . ( λf . f x y ) = ( λf . f true true )) ∀ α : ≡ ( λP . P = ( λx α . true )) . . . Via negativ a: false : ≡ D = D true : ≡ ( λx. false ) = ( λx. x ) not : ≡ ( λs. s = true ) or : ≡ ( λs. λt. ( λf . f s t ) = ( λf . f false false )) ∃ α : ≡ ( λP . P = ( λx α . false )) . . . In fact, the notion of duality , as it app ears throughout logic and lattice theory (among others), can often b e traced back to the fundamental dualit y (mediated b y negation) b et ween Q and D . If you hav e an axiom, definition, or conjecture, and wish to find its ‘dual’, you can reduce it to STLC plus discernment, and then simply switch Q s with D s. 51 It is interesting to consider whether duality can serv e as a lighthouse, guiding future inv estigations into lattice-v alued mo d- els for HOL or Bo olean-v alued mo dels for (co-)set theory (e.g., with coinduction 50 Some Isab elle/HOL enco dings in tro duce additional constan ts that are constrained by axioms, e.g., as in the case of accessibility relations in mo dal logics (but their role is actually that of free v ariables). Still, Q (resp. D ) remains the sole logical constant in the language. 51 Advertisemen t: This insight has b een instrumen tal in constructing the Combinatory L o gic Bricks Isab elle/HOL library [47], aimed at providing a one-stop shop for formalized mathe- matical notions commonly used in modal and non-classical logics. 22 treated as a first-class citizen). A first in teresting exercise would b e to recon- struct the results (and proofs) claimed b y Henkin for his Bo olean(-v alued) HOL mo dels, 52 in terms of b oth Q and D (e.g. with D o → o → o in terpreted as symmetric- difference/xor) and all definitions suitably dualized. A further interesting line of w ork concerns HOL mo dels based on Bo olean algebras (or lattices) “with op erators” [61]. Previous work [45] flirts with this idea in the context of T op olo gic al Bo ole an Algebr as (TBAs), featuring top olog- ically motiv ated unary op erators like closure, interior, frontier, border, and the lik e. More concretely , in the area of algebraic fuzzy logic, there has b een some mo del-theoretical w ork w orth highlighting, suc h as No v´ ak’s F uzzy T yp e The- ory (FTT) [67], in which the domain set D o corresp onds to an IMTL-algebr a , namely , a residuated lattice (satisfying prelinearity and double negation) ex- tended by the Baaz delta op eration [60]. In that spirit, B ˇ ehounek [24] in tro duces “a minimalistic many-v alued theory of t yp es” ( T T 0 ), whic h also generalizes STT b y allowing arbitrary algebras of truth-v alues, providing a foundational, mo du- lar framew ork into which Nov´ ak’s FTT fits as an (algebraically richer) instance fo cused on graded truth and fuzzy equality . In a similar, though less algebraic, spirit, the w ork of Kohlhase and Sc heja [62] builds up on Sm ullyan’s [77] abstr act c onsistency technique (as later extended to STT by Andrews [7] and to multi-v alued first-order logics by Carnielli [30]) to pro vide a systematic treatment of completeness in resolution calculi for many- v alued v ariants of STT (in whic h D o is a finite set). A v ery in teresting possibility in this regard adds an algebraic touch to suc h finite-many-v alued approaches b y lev eraging insights from the theory of finite (ak a. Galois) fields; in particular, b y treating an n -v alued algebra of truth-v alues as a field of order n (provided n is a prime-p ow er), or more simply as the field of integers mo dulo n (when n is prime). Dualit y insights can help ensure a smo oth transition from the classical case ( F 2 ) to higher ones and guide the choice of definitions throughout the pro- cess. Consequently , (meta-)logical in vestigations can profit from the arsenal of algebraic to ols associated with (Galois) fields, like equational solving tec hniques, Gr¨ obner bases, Lagrange in terp olation, etc., 53 as well as from nice uniqueness results (lik e p olynomials ha ving unique normal forms, unique factorizations, etc.). These insigh ts hav e b een applied to propositional (see e.g. [32, 25, 29, 2]), mo dal [1, 3], and first-order [28] logics, but not yet to higher-order ones. 54 Finally , there is a substan tial bo dy of work on extensions of STT with partial 52 As an interesting side remark, as stated in [58], Henkin developed these mo dels in 1963— the same year in which Cohen published his famous pap er introducing the “forcing” metho d. Boolean-valued mo dels were developed by Solov ay and Scott a couple of years later, and reportedly , there was a man uscript by Scott circulating in 1966 titled “Boolean-v alued Mo dels for Higher-Order Logic” (p ossibly part of the infamously unpublished “Scott–Solov ay pap er”). Moreov er, Scott mentions in his foreword to [13] that “in September of 1951, in a pap er of Alonzo Churc h [35] delivered at the Mexican Scientific Conference, a suggestion for Bo olean- v alued models of t yp e theory had already been made.” 53 F or example, form ulas (and also connectives) can b e represented as p olynomials, and (at least in the propositional case) satisfiability/pro vabilit y amounts to c hecking whether (sets of ) p olynomials hav e (common) ro ots. 54 More adv ertising: Some preliminary Isabelle/HOL sources formalizing this approach (and interfacing with c omputer algebr a systems ) are av ailable in GitHub [46]. 23 functions, whic h we shall not surv ey here, as it is quite extensive and not directly aligned with our fuzzy-algebraic p ersp ectiv e. 55 In a sense, it should come as no surprise to claim that (v anilla) HOL, as discussed here, can shallo wly embed all the higher-order systems men tioned ab o ve as fragmen ts as well, muc h in the same spirit as previously presented em b eddings of intensional-modal HOL [48, 52] or dep endently-t yp ed HOL [72]. Whether it can do so in a practically effectiv e w a y (e.g., for the purp oses of automated reasoning), how ever, ma y require less a mathematical pro of and more a technological (and so ciological) one. 56 References [1] J. C. Agudelo and W. Carnielli. Polynomial ring calculus for mo dal logics: a new semantics and pro of metho d for mo dalities. The R eview of Symb olic L o gic , 4(1):150–170, 2011. [2] J. C. Agudelo-Agudelo, C. A. Agudelo-Gonz´ alez, and O. E. Garc ´ ıa- Quin tero. On p olynomial seman tics for propositional logics. Journal of Applie d Non-Classic al L o gics , 26(2):103–125, 2016. [3] J. C. Agudelo-Agudelo and S. Ec heverri-V alencia. P olynomial seman tics for mo dal logics. Journal of Applie d Non-Classic al L o gics , 29(4):430–449, 2019. [4] H. Andr´ ek a, J. v an Benthem, N. Bezhanishvili, and I. N´ emeti. Changing a semantics: Opp ortunism or courage? In M. Manzano, I. Sain, and E. Alonso, editors, The Life and Work of L e on Henkin: Essays on His Contributions , pages 307–337. Springer In ternational Publishing, Cham, 2014. [5] P . B. Andrews. A reduction of the axioms for the theory of prop ositional t yp es. F undamenta Mathematic ae , 52(3):345–350, 1963. [6] P . B. Andrews. A T r ansfinite T yp e The ory with T yp e V ariables , volume 37 of Studies in L o gic and the F oundations of Mathematics . North-Holland Publishing Company , Amsterdam, 1965. [7] P . B. Andrews. Resolution in t yp e theory . The Journal of Symb olic L o gic , 36(3):414–432, 1971. [8] P . B. Andrews. General mo dels and extensionalit y . The Journal of Symb olic L o gic , 37(2):395–397, 1972. 55 Interested readers ma y consult recent work suc h as [40] and [63], and the references therein. 56 Indeed, some empirical evidence for the effectiveness of semantic embeddings in HOL has been shown recently b y Steen et al. [79], using Steen’s logic embedding tool [78], in the context of a comparative study of automated reasoners for quantified modal logics. As it turns out, despite legitimate concerns ab out the indirection ov erhead of HOL embeddings, it was shown that the latter can often outperform native reasoning systems. 24 [9] P . B. Andrews. General mo dels, descriptions, and c hoice in type theory . The Journal of Symb olic L o gic , 37(2):385–394, 1972. [10] P . B. Andrews. An Intr o duction to Mathematic al L o gic and T yp e The- ory: T o T ruth Thr ough Pr o of , volume 27 of Applie d L o gic Series . Springer Netherlands, Dordrech t, 2002. 2nd edition (1st edition 1986). [11] P . B. Andrews. A bit of history related to logic based on equalit y . The Life and Work of L e on Henkin: Essays on His Contributions , pages 67–71, 2014. [12] J. Beall, R. Brady , J. M. Dunn, A. P . Hazen, E. Mares, R. K. Meyer, G. Priest, G. Restall, D. Ripley , J. Slaney , et al. On the ternary relation and conditionality . Journal of philosophic al lo gic , 41:595–612, 2012. [13] J. L. Bell. Bo ole an-value d mo dels and indep endenc e pr o ofs in set the ory , v olume 47 of Oxfor d L o gic Guides . Oxford Universit y Press, 1977. [14] C. Benzm ¨ uller. Automating quantified conditional logics in HOL. In F. Rossi, editor, 23r d International Joint Confer enc e on Artificial Intel- ligenc e (IJCAI-13) , pages 746–753, Beijing, China, 2013. AAAI Press. [15] C. Benzm ¨ uller. Univ ersal (meta-)logical reasoning: Recent successes. Sci- enc e of Computer Pr o gr amming , 172:48–62, 2019. [16] C. Benzm ¨ uller, C. Bro wn, and M. Kohlhase. Higher-order semantics and extensionalit y . Journal of Symb olic L o gic , 69(4):1027–1088, 2004. [17] C. Benzm ¨ uller and D. Miller. Automation of higher-order logic. In Hand- b o ok of the History of L o gic, V olume 9 — Computational L o gic , pages 215– 254. North Holland, Elsevier, 2014. [18] C. Benzm¨ uller and L. C. P aulson. Quantified multimodal logics in sim- ple type theory . L o gic a Universalis (Sp e cial Issue on Multimo dal L o gics) , 7(1):7–20, 2013. [19] C. Benzm¨ uller and S. Reic he. Automating public announcement logic with relativized common kno wledge as a fragment of HOL in LogiKEy. Journal of L o gic and Computation , 33(6):1243–1269, 2023. [20] C. Benzm¨ uller and P . Andrews. Ch urc h’s T yp e Theory . In E. N. Zalta and U. No delman, editors, The Stanfor d Encyclop e dia of Philosophy . Meta- ph ysics Research Lab, Stanford Universit y , Summer 2025 edition, 2025. [21] J. C. Blanchette, C. Kaliszyk, L. C. Paulson, and J. Urban. Hammering to wards qed. Journal of F ormalize d R e asoning , 9(1):101–148, 2016. [22] J. C. Blanchette and T. Nipk ow. Nitpic k: A coun terexample generator for higher-order logic based on a relational mo del finder. In International c onfer enc e on inter active the or em pr oving , pages 131–146. Springer, 2010. 25 [23] R. B. Brandom. Incompatibility , mo dal semantics, and intrinsic logic. In Betwe en Saying and Doing: T owar ds an Analytic Pr agmatism . Oxford Uni- v ersity Press, Oxford, 2008. [24] L. B ˇ ehounek. A minimalistic man y-v alued theory of t yp es. Journal of L o gic and Computation , 27(5):1307–1332, 03 2016. [25] W. Carnielli. P olynomial ring calculus for many-v alued logics. In 35th International Symp osium on Multiple-V alue d L o gic (ISMVL’05) , pages 20– 25. IEEE, 2005. [26] W. Carnielli, M. E. Coniglio, and D. F uenmay or. Logics of formal inconsis- tency enriched with replacement: an algebraic and mo dal accoun t. R eview of Symb olic L o gic , 15(3):771–806, 2022. [27] W. Carnielli and D. F uenmay or. G¨ odel’s incompleteness theorems from a paraconsisten t persp ective. In A. Costa-Leite, editor, Abstr act Conse quenc e and L o gics: Essays in Honor of Edelcio G. de Souza , pages 173–198. College Publications, 2020. [28] W. Carnielli, H. Luiz Mariano, and M. Matulovic. Reconciling first-order logic to algebra. Contr adictions, fr om c onsistency to inc onsistency , pages 273–305, 2018. [29] W. Carnielli and M. Matulovic. Non-deterministic semantics in polynomial format. Ele ctr onic Notes in The or etic al Computer Scienc e , 305:19–34, 2014. [30] W. A. Carnielli. Systematization of finite many-v alued logics through the metho d of tableaux. The Journal of Symb olic L o gic , 52(2):473–493, 1987. [31] W. A. Carnielli and M. E. Coniglio. Par ac onsistent L o gic: Consistency, Contr adiction and Ne gation , volume 40 of L o gic, Epistemolo gy, and the Unity of Scienc e . Springer, Cham, 2016. [32] J. Chazarain, A. Riscos, J. Alonso, and E. Briales. Multi-v alued logic and Gr¨ obner bases with applications to mo dal logic. Journal of Symb olic Computation , 11(3):181–194, 1991. [33] A. Ch urch. A set of p ostulates for the foundation of logic. Annals of Mathematics , 33(2):346–366, 1932. [34] A. Ch urch. A formulation of the simple theory of types. The Journal of Symb olic L o gic , 5(2):56–68, 1940. [35] A. Churc h. Non-normal truth-tables for the prop ositional calculus. Boletin de la So cie dad Matematic a Mexic ana , 10(1,2):41–52, 1953. [36] M. E. Coniglio and G. V. T oledo. F rom inconsistency to incompatibility . L o gic and L o gic al Philosophy , 32(2):181–216, Sep. 2022. 26 [37] H. B. Curry and R. F eys. Combinatory L o gic , v olume 1. North-Holland Publishing Company , Amsterdam, 1958. [38] J. Desharnais, B. Ho dgson, and J. Mullins. Linear logic. In C. Brink, W. Kahl, and G. Schmidt, editors, R elational Metho ds in Computer Sci- enc e , pages 106–114. Springer Vienna, Vienna, 1997. [39] W. M. F armer. The sev en virtues of simple t yp e theory . Journal of Applie d L o gic , 6(3):267–286, 2008. [40] W. M. F armer. Simple typ e the ory: a pr actic al lo gic for expr essing and r e asoning ab out mathematic al ide as . Springer, 2023. [41] D. P . F ernandes. Henkin on nominalism and higher-order logic. Principia: an international journal of epistemolo gy , 26(2):233–255, 2022. [42] J. M. F ont. On substructural logics preserving degrees of truth. Bul letin of the Se ction of L o gic , 36(3/4):117–129, 2007. [43] T. F ranz´ en. G¨ odel’s The or em: An Inc omplete Guide to Its Use and Abuse . CR C Press, 2005. [44] G. F rege. Grundgesetze der Arithmetik , volume 1. Hermann Pohle, Jena, 1893. [45] D. F uenmay or. Semantical in vestigations on non-classical logics with re- co very op erators: negation. L o gic Journal of the IGPL , 33(5), 2023. [46] D. F uenmay or. Algebraic theorem proving, 2024. GitHub rep ository: https://github.com/davfuenmayor/algebraic- theorem- proving . [47] D. F uenma yor. Com binatory logic bricks, 2024. GitHub repository: https: //github.com/davfuenmayor/logic- bricks . [48] D. F uenma yor and C. Benzm ¨ uller. Automating emendations of the on tolog- ical argument in in tensional higher-order mo dal logic. In G. Kern-Isb erner, J. F ¨ urnkranz, and M. Thimm, editors, KI 2017: A dvanc es in Artificial In- tel ligenc e , pages 114–127. Springer International Publishing, Cham, 2017. [49] D. F uenmay or and C. Benzm ¨ uller. A computational-hermeneutic approach for conceptual explicitation. In ´ A. Nep omuceno-F ern´ andez, L. Magnani, F. J. Salguero-Lamillar, C. Bar´ es-G´ omez, and M. F on taine, editors, Mo del- Base d R e asoning in Scienc e and T e chnolo gy , pages 441–469. Springer In- ternational Publishing, Cham, 2019. [50] D. F uenmay or and C. Benzm ¨ uller. Harnessing higher-order (meta-)logic to represen t and reason with complex ethical theories. In A. C. Nay ak and A. Sharma, editors, PRICAI 2019: T r ends in Artificial Intel ligenc e , pages 418–432. Springer International Publishing, Cham, 2019. 27 [51] D. F uenmay or and C. Benzm ¨ uller. A case study on computational hermeneutics: E. J. Lo we’s mo dal ontological argumen t. In R. S. Sil- v estre, B. P . G¨ ock e, J.-Y. B ´ eziau, and P . Bilimoria, editors, Beyond F aith and R ationality: Essays on L o gic, R eligion and Philosophy , pages 195–228. Springer International Publishing, Cham, 2020. [52] D. F uenmay or and C. Benzm ¨ uller. Types, T ableaus and G¨ odel’s Go d in Isab elle/HOL. Ar chive of F ormal Pr o ofs , 2017. https://isa- afp.org/ entries/Types_Tableaus_and_Goedels_God.html . [53] J. Gibb ons and N. W u. F olding domain-sp ecific languages: deep and shal- lo w em b eddings (functional pearl). In J. Jeuring and M. M. T. Chakra v arty , editors, Pr o c e e dings of the 19th ACM SIGPLAN International Confer enc e on F unctional Pr o gr amming, Gothenbur g, Swe den, Septemb er 1-3, 2014 , pages 339–347. ACM, 2014. [54] M. Gordon. HOL - a machine oriented form ulation of higher order logic. T echnical Rep ort 68, Universit y of Cam bridge - Computer Laboratory , July 1985. [55] L. Henkin. Completeness in the theory of types. The Journal of Symb olic L o gic , 15(2):81–91, 1950. [56] L. Henkin. Some notes on nominalism. The Journal of Symb olic L o gic , 18(1):19–29, 1953. [57] L. Henkin. A theory of prop ositional types. F undamenta Mathematic ae , 52(3):323–344, 1963. [58] L. Henkin. Iden tity as a logical primitive. Philosophia , 5(1):31–45, 1975. [59] J. R. Hindley and J. P . Seldin. L amb da-c alculus and c ombinators: an in- tr o duction . Cambridge Univ ersity Press, 2008. [60] P . H´ ajek. Metamathematics of F uzzy L o gic , volume 4 of T r ends in L o gic . Springer Science+Business Media, Dordrech t, 1998. [61] B. J´ onsson and A. T arski. Bo olean algebras with op erators. part i. Amer- ic an journal of mathematics , 73(4):891–939, 1951. [62] M. Kohlhase and O. Sc heja. Higher-order multi-v alued resolution. Journal of Applie d Non-Classic al L o gics , 9(4):455–477, 1999. [63] M. Manzano, A. Huertas, P . Blackburn, M. Martins, and V. Aranda. Hy- brid partial type theory . The Journal of Symb olic L o gic , pages 1–43, 2023. [64] M. Manzano and M. C. Moreno. Iden tity , equalit y , nameabilit y and com- pleteness. Bul letin of the Se ction of L o gic , 46(3/4):169–195, 2017. [65] M. Manzano and M. C. Moreno. Iden tity , equalit y , nameabilit y and com- pleteness. Part I I. Bul letin of the Se ction of L o gic , 47(3):141–158, 2018. 28 [66] M. Mo ortgat. Typelogical Grammar. In E. N. Zalta, editor, The Stanfor d Encyclop e dia of Philosophy . Metaphysics Research Lab, Stanford Univer- sit y , Spring 2014 edition, 2014. [67] V. Nov´ ak. On fuzzy type theory . F uzzy Sets and Systems , 149(2):235–273, 2005. [68] X. Paren t and C. Benzm ¨ uller. Conditional normative reasoning as a frag- men t of HOL. Journal of Applie d Non-Classic al L o gics , 34(4):561–592, 2024. [69] J. P eregrin. Logic as based on incompatibility . The L o gic a Y e arb o ok , pages 157–168, 2010. [70] W. Quine. Logic based on inclusion and abstraction. The Journal of Sym- b olic L o gic , 2(4):145–152, 1937. [71] W. Quine. Unification of universes in set theory . The Journal of Symb olic L o gic , 21(3):267–279, 1956. [72] C. Rothgang, F. Rabe, and C. Benzm¨ uller. Theorem proving in dep enden tly-typed higher-order logic. In B. Pientk a and C. Tinelli, editors, A utomate d De duction - CADE 29. CADE 2023 , volume 14132 of L e ctur e Notes in Artificial Intel ligenc e , page 438–455, Cham, 2023. Springer. [73] M. Sch¨ onfink el. ¨ Ub er die Bausteine der mathematisc hen Logik. Mathema- tische annalen , 92(3):305–316, 1924. [74] M. Sc h¨ onfink el. On the building blo cks of mathematical logic. In J. v an Heijeno ort, editor, F r om F r e ge to G¨ odel: A Sour c e Bo ok in Mathematic al L o gic, 1879–1931 , pages 355–366. Harv ard Univ ersity Press, Cam bridge, MA, 1967. [75] J. P . Seldin. Ch urch and Curry: the lambda calculus and combinatory logic. Handb o ok of the History of L o gic , 5, 2008. [76] H. M. Sheffer. A set of five indep enden t p ostulates for b oolean algebras, with application to logical constants. T r ansactions of the Americ an Math- ematic al So ciety , 14(4):481–488, 1913. [77] R. M. Sm ullyan. A unifying principal in quantification theory . Pr o c e e d- ings of the National A c ademy of Scienc es of the Unite d States of Americ a , 49(6):828–832, 1963. [78] A. Steen. An extensible logic embedding to ol for light weigh t non-classical reasoning. In B. Konev, C. Schon, and A. Steen, editors, Pr o c e e dings of the 8th Workshop on Pr actic al Asp e cts of Automate d R e asoning (P AAR 2022) , v olume 3201 of CEUR Workshop Pr o c e e dings . CEUR-WS.org, 2022. 29 [79] A. Steen, G. Sutcliffe, and C. Benzm ¨ uller. Solving quantified mo dal logic problems by translation to classical logics. Journal of L o gic and Computa- tion , 35(4), 2025. [80] A. T arski. Sur le terme primitif de la logistique. F undamenta Mathematic ae , 4:196–200, 1923. Original name: Alfred T a jtelbaum. [81] A. T arski. Der W ahrheitsb egriff in den formalisierten Sprachen. Studia Philosophic a , 1:261–405, 1933. [82] R. W´ ojcicki. Some remarks on the consequence op eration in senten tial logics. F undamenta Mathematic ae , 68(1), 1970. [83] S. W olfram. Where did combinators come from? Hunting the story of Moses Sc h¨ onfink el. arXiv pr eprint , 2021. . [84] M. Y asuhara. The axiom of c hoice in Ch urch’s type theory . Notic es of the A meric an Mathematic al So ciety , 22:A34, Jan. 1975. Abstract. 30
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment