ArticlePDF Available

Abstract and Figures

A shallow semantical embedding of free logic in classical higher-order logic is presented, which enables the off-the-shelf application of higher-order interactive and automated theorem provers for the formalisation and verification of free logic theories. Subsequently, this approach is applied to a selected domain of mathematics: starting from a generalization of the standard axioms for a monoid we present a stepwise development of various, mutually equivalent foundational axiom systems for category theory. As a side-effect of this work some (minor) issues in a prominent category theory textbook have been revealed. The purpose of this article is not to claim any novel results in category theory, but to demonstrate an elegant way to “implement” and utilize interactive and automated reasoning in free logic, and to present illustrative experiments.
Content may be subject to copyright.
Noname manuscript No.
(will be inserted by the editor)
Automating Free Logic in HOL, with an
Experimental Application in Category Theory
Christoph Benzm¨uller and Dana S. Scott
Received: date / Accepted: date
Abstract A shallow semantical embedding of free logic in classical higher-
order logic is presented, which enables the off-the-shelf application of higher-
order interactive and automated theorem provers for the formalisation and
verification of free logic theories. Subsequently, this approach is applied to a
selected domain of mathematics: starting from a generalization of the standard
axioms for a monoid we present a stepwise development of various, mutually
equivalent foundational axiom systems for category theory. As a side-effect of
this work some (minor) issues in a prominent category theory textbook have
been revealed.
The purpose of this article is not to claim any novel results in category the-
ory, but to demonstrate an elegant way to “implement” and utilize interactive
and automated reasoning in free logic, and to present illustrative experiments.
Keywords Free Logic ·Classical Higher-Order Logic ·Category Theory ·
Interactive and Automated Theorem Proving
1 Introduction
Partiality and undefinedness are prominent challenges in various areas of math-
ematics and computer science. Unfortunately, however, modern proof assistant
systems and automated theorem provers based on traditional classical or intu-
itionistic logics provide rather inadequate support for these challenge concepts.
Benzm¨uller received funding from the German National Research Foundation DFG under
Heisenberg grant Towards Computational Metaphysics (BE 2501/9-2) and from Volkswa-
genStiftung under grant Consistent Rational Argumentation in Politics (CRAP).
Christoph Benzm¨uller
Freie Universit¨at Berlin, Berlin, Germany & University of Luxembourg, Luxembourg
E-mail: c.benzmueller@gmail.com
Dana S. Scott
Visiting Scholar at University of California, Berkeley, USA
E-mail: dana.scott@cs.cmu.edu
2 Christoph Benzm¨uller and Dana S. Scott
Free logic [24,25,30,32] offers a theoretically appealing solution, but it has been
considered as rather unsuited towards practical utilization.
In the first part of this article (§2 and §3) we show how free logic can be
elegantly “implemented” in any theorem proving system for classical higher-
order logic (HOL) [8]. The proposed solution employs a semantic embedding of
free logic in HOL. We present, as an example, one implementation of this idea
in the proof assistant Isabelle/HOL [29]. Various state-of-the-art first-order
and higher-order automated theorem provers and model finders are integrated
(modulo suitable logic translations) with Isabelle via the Sledgehammer tool
[15], so that our solution can be utilized, via Isabelle as foreground system, with
a whole range of other background reasoners, such as SMT solvers and first-
order and higher-order automated theorem provers.1As a result we obtain an
elegant and powerful implementation of an interactive and automated theorem
proving (and model finding) system for free logic.
To demonstrate the practical relevance of our new system, we present in
§4 a stepwise development of axioms systems for category theory by general-
izing the standard axioms for a monoid to a partial composition operation.
Our purpose is not to make or claim any contribution to category theory but
rather to show how formalizations involving the kind of logic required (free
logic) can be implemented and validated within modern proof assistants such
as Isabelle/HOL. We also address the relation of our axiom systems to al-
ternative proposals from the literature, including an axiom set proposed by
Freyd and Scedrov in their textbook “Categories, Allegories” [22] for which
we reveal a technical flaw: either all operations, e.g. morphism composition,
are total or their axiom system is inconsistent. The repair for this problem is
quite straightforward, however. The solution essentially corresponds to a set
of axioms proposed by Scott [33] in the 1970s.
Our exploration has been significantly supported by series of experiments
in which automated reasoning tools have been called from within the proof as-
sistant Isabelle/HOL via the Sledgehammer tool. Moreover, we have obtained
very useful feedback at various stages from the model finder Nitpick [16], sav-
ing us from making several mistakes.
At the conceptual level this paper exemplifies a new style of explorative
mathematics which rests on a significant amount of human-machine interac-
tion with integrated interactive-automated theorem proving technology. The
experiments we have conducted are such that the required reasoning is of-
ten too tedious and time-consuming for humans to be carried out repeatedly
with highest level of precision. It is here where cycles of formalization and
experimentation efforts in Isabelle/HOL provided significant support. More-
over, the technical inconsistency issue for axiom system VII was discovered
by automated theorem provers, which further emphasizes the added value of
automated theorem proving in this area.
The content of article is based on the contributions reported in two previous
papers [9, 10].
1Cf. §4.4 for further information.
Automating Free Logic in HOL 3
2 Preliminaries
2.1 Free Logic
Free logic (respectively inclusive logic) [24,25,30,32] refers to a class of logic for-
malisms that are free of basic existence assumptions regarding the denotation
of terms.2Remember that terms in e.g. traditional classical and intuitionistic
predicate logics always denote an (existing) object in a given (non-empty) do-
main D, and that Dis also exactly the set the quantifiers range over. In free
logic these basic assumptions are abolished. Terms do still denote objects in a
(non-empty) domain D, but a (possibly empty) set EDis chosen to charac-
terize the subdomain of “existing” resp. “defined” objects in D. Quantification
is now restricted to set Eof existing/defined objects only.
It is obvious how this can be used to model undefideness and partiality:
problematic terms, e.g. division by zero or improper definite descriptions, still
denote, but they refer to undefined objects, that is, objects din D\Elying
outside of the scope of quantification. Moreover, a function fis total if and
only if for all xwe have ExE(fx).3For partial functions fwe may have
some xsuch that Exbut not E(fx). A function fis called strict if and only
if for all xDwe have E(f x)Ex.
The particular version of free logic as exploited in the remainder of this
article was proposed by Scott [32]. A graphical illustration of this notion of
free logic is presented in Fig. 1. It employs a distinguished undefined object
?.4
We next formally introduce the syntax and semantics of free logic as to be
used in the remainder of this article. We refer to this logic as FFOL.
Definition 1 (Syntax of FFOL) We start with a denumerable set V of
variable symbols, a denumerable set F of n-ary function symbols (n0),
and a denumerable set P of n-ary predicate symbols (n0).
The terms and formulas of FFOL are formally defined as the smallest sets
such that:
1. each variable xV is a term of FFOL,
2. given any n-ary (n0) function symbol fF and terms t1, . . . , tnof
FFOL, then f(t1, . . . , tn)is a term of FFOL,
3. given terms t1and t2of FFOL, then t1=t2is an (atomic) formula of
FFOL,
4. given any n-ary (n0) predicate symbol pP and terms t1, . . . , tnof
FFOL, then p(t1, . . . , tn)is an (atomic) formula of FFOL,
5. given formulas rand sof FFOL, then ¬r,rsand x r are (compound)
formulas of FFOL, and
6. given a formula rof FFOL, then
ι
x r is a term of FFOL (definite descrip-
tion).
2Calculi for free logic are presented in [30]; see also the references therein.
3The predication Exrepresents that xis a member of E.
4The ?symbol is not to be confused with any other symbol in Isabelle/HOL.
4 Christoph Benzm¨uller and Dana S. Scott
E: existing objects
values of bound variables
D: raw objects
values of free variables
?
undefined
Fig. 1 Illustration of the Semantical Domains of Free Logic
Further terms and formulas of FFOL, including various defined notions of
equality, can be introduced as abbreviations.
Avariable assignment gmaps variables xVto elements in D.g[d/x]
denotes the assignment that is identical to g, except for variable x, which is
now mapped to d.
Regarding the semantics different options have been proposed in the liter-
ature. For example, instead of a possible empty set of existing objects E, we
could postulate non-emptiness of E. In fact, our approach below can be easily
adapted for different variants of free and inclusive logic. Here we closely follow
the notion of free logic as proposed by Scott [32].
Definition 2 (Model of FFOL) Amodel (structure) for FFOL consists of
a quadruple M=hD, E, I , ?i, where Dis a non-empty raw domain of objects,
EDa possible empty set of existing/defined objects, and Ian interpretation
function mapping 0-ary function symbols (constants) to defined objects d
E, 0-ary predicate symbols (propositions) to True or False, n-ary function
symbols (for n1) to n-ary functions D× · · · × DDand n-ary predicate
symbols (for n1) to n-ary relations D× · · · × D. True or False denote
truth and falsehood respectively. Finally, ?D\E is a designated (non-
existing/undefined) object.
Definition 3 (Evaluation Function for FFOL) The value kskM,g of a
term or formula sFFOL in a model M=hD, E, I , ?iunder assignment
gdefined in the following way:
Terms
1. kxkM,g =g(x)for variable symbols xV
2. kckM,g =I(c), where cF is an 0-ary function symbol
Automating Free Logic in HOL 5
3. kf(t1, . . . , tn)kM,g =I(f)(kt1kM,g ,...,ktnkM,g), where fF is an
n-ary (n1) function symbol
4. k
ι
x rkM,g =dE , such that krkM,g[d/x]=True and krkM,g[d0/x]=
False for all d06=dE (i.e. dis the unique existing object for which r
holds); if there is no such dE, then k
ι
x rkM,g =?
Formulas
5. kqkM,g =I(q), where qP is an 0-ary predicate symbol
6. kt1=t2kM,g =True if and only if kt1kM,g =kt2kM ,g (this basic notion
of primitive equality on Dimplies that equations between “undefined”
terms such as 1/0=1/0are evaluated to True; later, in §4, we will
define and utilize further notions of equality, including Kleene equality
and existing equality, which behave differently).
7. kp(t1, . . . , tn)kM,g =True if and only if (kt1kM,g ,...,ktnkM,g)I(p)
for n-ary (n1) predicate symbols pP
8. rkM,g =True if and only if krkM,g =False
9. krskM,g =True if and only if krkM,g =False or kskM ,g =True
10. k∀x rkM,g =True if and only if for all dE we have krkM ,g[d/x]=
True
Definition 4 (Validity) A formula sois true in model Munder assignment
gif and only if ksokM,g =T rue; this is also denoted as M, g |=FFOL so. A
formula sois called valid in M, which is denoted as M|=FFOL so, if and only
if M, g |=FFOL sofor all assignments g. Finally, a formula sois called valid,
which we denote by |=FFOL so, if and only if sois valid for all M.
2.2 Classical Higher-Order Logic
Simple type theory, also referred to as classical higher-order logic (HOL) [2], is
an expressive logic formalism which is based on the simply typed λ-calculus [3].
HOL has its origin in the work of Church [19].
For a detailed discussion of the syntax, semantics and automation of HOL
we refer to the literature (see e.g. [2,6, 8] and the references therein). Below we
introduce a variant of HOL with primitive equality and definite descriptions.
Definition 5 (Types) The set Tof simple types is freely generated from a
set of basic types {o,i}using the function type constructor .ois the type
of Booleans and iis the type of individuals. We may avoid parentheses if the
structure of a complex type is clear in context.
Definition 6 (Syntax of HOL) The terms of HOL with primitive equality
and definite description are defined by the following grammar:5
s,t::= pα|Xα|(λXαsβ)αβ|(sαβtα)β|sα=tα|¬ooso|
((oooso)to)|(αo)o(λXαso)|
ι
(αo)α(λXαso)
5It is well known that we could work with a much smaller set of logical connectives, see
e.g. §1.4 of Andrews’s overview article [2]. The choice here closely reflects the set of primitive
connectives as chosen in higher-order automated theorem provers such as LEO-II [13], Leo-
III [12], and Satallax [18].
6 Christoph Benzm¨uller and Dana S. Scott
where α,βT.pαdenotes typed constants and Xαtyped variables (distinct
from pα). Complex typed terms are constructed via abstraction and applica-
tion. The type of each term is given as a subscript. Terms soof type oare called
formulas. The logical connectives of choice are ¬oo,ooo,=ααo,
(αo)oand
ι
(αo)α(where αT). Type subscripts may be dropped if
irrelevant or obvious. Similarly, parentheses may be avoided. Binder notation
Xαsoand
ι
Xαsois used as shorthand for (λXαso)and
ι
(λXαso),
and infix notation stis employed instead of ((s)t). From the above con-
nectives, other logical connectives, such as >,,,,and , can be de-
fined in the usual way. For example, can be defined as λXoλYo¬XY
and as λXoλYo¬(¬X∨ ¬Y).
We assume familiarity with λ-conversion (e.g. α-renaming and βη-
reduction) and βη-normal forms [3].
Avariable assignment gmaps variables Xαto elements in Dα.g[d/W ]
denotes the assignment that is identical to g, except for variable W, which is
now mapped to d.
Definition 7 (Frame for HOL) Aframe Dis a collection {Dα}αTof
nonempty sets Dα, such that Do={True,False}(where, as before, True
and False denote truth and falsehood). The Dαβare collections of functions
mapping Dαinto Dβ.
Definition 8 (Model for HOL) Amodel (structure) for HOL is a tuple
M=hD, Ii, where Dis a frame, and Iis a family of typed interpretation
functions mapping constant symbols pαto appropriate elements of Dα, called
the denotation of pα(the logical connectives ¬,, and are always given
the standard denotations, see below). Moreover, we assume that the domains
Dααocontain the respective identity relations.
Definition 9 (Evaluation Function for HOL) The value ksαkM,g of a
HOL term sαon a model M=hD, Iiunder assignment gis an element
dDαdefined in the following way:
1. kpαkM,g =I(pα)
2. kXαkM,g =g(Xα)
3. k(sαβtα)βkM,g =ksαβkM,g (ktαkM,g)
4. k(λXαsβ)αβkM,g =the function ffrom Dαto Dβsuch that f(d)=
ksβkM,g[d/Xα]for all dDα
5. ksα=tαkM,g =True if and only if ksαkM,g =ktαkM,g
6. k(¬ooso)okM,g =True if and only if ksokM,g =False
7. k((oooso)to)okM,g =True if and only if ksokM,g =True or
ktokM,g =True
8. k((αo)o(λXαso))okM,g =True if and only if for all dDαwe
have ksokM,g[d/Xα]=True
9. k(
ι
(αo)α(λXαso))okM,g =dif there exists a unique dDαsuch
that ksokM,g[d/Xα]=True, otherwise k(
ι
(αo)α(λXαso))okM,g =e
for an arbitrary element eDα
Automating Free Logic in HOL 7
Definition 10 (Standard and Henkin models) A model M=hD, Iiis
called a standard model if and only if for all α, β Twe have Dαβ=
{f|f:DαDβ}. In a Henkin model function spaces are not necessarily
full. Instead it is only required that Dαβ⊆ {f|f:DαDβ}(for all
α, β T) and that the valuation function k · kM,g from above is total (i.e.,
every term denotes). Any standard model is obviously also a Henkin model.
We consider Henkin models in the remainder. For more details on Henkin
semantics, its proof theory and examples of sound and complete calculi we
refer to the literature (e.g. [6, 7]).
Definition 11 (Validity) A formula sois true in model Munder assign-
ment gif and only if ksokM,g =True; this is also denoted as M, g |=HOL so.
A formula sois called valid in M, which is denoted as M|=HOL so, if and
only if M, g |=HOL sofor all assignments g. Finally, a formula sois called
valid, which we denote by |=HOL so, if and only if sois valid for all M.
3 Shallow Semantical Embedding of FFOL in HOL
We now present a shallow embedding of FFOL in HOL by identifying the
language constructs of FFOL with corresponding terms of HOL. In this em-
bedding the raw domain Dof a FFOL model is identified with the domain of
individuals Diin a corresponding HOL model. The subdomain Eof existing
objects is characterized in the embedding by a HOL predicate Eof type io.
Hence, we assume in the remainder that a respective uninterpreted constant
symbol Eiois given in the signature of HOL. Moreover, we assume that an
uninterpreted constant symbol ?of type iis in the signature of HOL. Finally,
we assume that kE ?ikM,g =Ffor all M, g, i.e. that the element denoted
by ?iis not an element of the domain of existing objects denoted by Eio
(technically this can be achieved by postulating a respective axiom).
Definition 12 (Embedding of FFOL in HOL) Given a formula s
FFOL. We map sto a corresponding term bsof HOL. This mapping is de-
fined as follows:
8 Christoph Benzm¨uller and Dana S. Scott
bx:= Xifor all xV
d
f(t1, . . . , tn):= (b
fb
t1. . . b
tn)for all n-ary fF(n0)
where b
f=fis an uninterpreted
constant symbol of type i. . . i
| {z }
no
i
d
s=t:= bs=b
t
d
p(t1, . . . , tn):= (bpb
t1. . . b
tn)for all n-ary pP(n0)
where bp=pis an uninterpreted
constant symbol of type i. . . i
| {z }
no
o
c¬s:= ¬bs
dsr:= bsbr
d
x r := XiEXibr
d
ι
x r := IfThenElse
(XiEXbr(Yi(EY((λXibr)Y)) Y=X))
(
ι
Xibr)
?
where IfThenElse is an abbreviation for the term
λSoλXiλYi
ι
Zi(SoZ=X)(¬SoZ=Y)
The above mapping induces mappings from the sets b
V,b
Fand b
Pof FFOL
to corresponding variables (of type i), uninterpreted function symbols and
uninterpreted predicate symbols in HOL, respectively.
To prove soundness and completeness6for the embedding, a mapping from
FFOL models into Henkin models is employed. This mapping utilizes a map-
ping of F F OL variable assignments ginto corresponding HOL variable assign-
ments g(remember that FFOL domains Dare identified with HOL domains
Di, i.e. b
D=Di): let gbe a variable assignment for FFOL. Then bg:b
V7→ b
Dfor
HOL is defined such that bg(Xi) = bg(bx) = g(x) for all Xib
V. Finally, bgis ex-
tended to an assignment for arbitrary variables by choosing bg(Yα) = dDα
arbitrary whenever Yα/b
V.
Definition 13 (Henkin model c
Mfor FFOL model M)Given a FFOL
model M=hD, E, I, ?i. The Henkin model c
M=h{Dα}αT, Iifor Mis
defined as follows:
Di=D
Do={True,False}
Dαβare chosen as (not necessarily full) collections of functions from Dα
to Dβ. Remember, however, that the choice of Dαβmust always ensure
that the evaluation function k · k
c
M,b
gbelow remains total, i.e. that all terms
denote. In particular, it is required that Diocontains the element IEio
as characterized below.
The interpretation function Iof c
Mis chosen as follows:
6Similar soundness and completeness proofs for shallow semantical embeddings have been
presented in [4] and [5].
Automating Free Logic in HOL 9
I?i=?Di
For all dDiwe have: (IEio)(d) = Tif and only if dE. Note
that this implies (IEio)(?i) = F.
For all f=b
fb
Fwe have: (If)(d1,...,dn)=(If)(d1,...,dn)for
all diDi(i= 1, . . . , n and n0).
For all p=bpb
Pwe have: (Ip)(d1,...,dn) = Tif and only if
(d1,...,dn)(Ip)for all diDi(i= 1, . . . , n and n0).
For all other constants cα, choose IcαDαarbitrary.7
It is not hard to verify that c
Mis a Henkin model.8
Lemma 14 Let c
Mbe a Henkin model for FFOL model M. For all terms and
formulas sFFOL and variable assignments gwe have kskM,g =kbsk
c
M,bg.
Proof The proof is by induction on the structure of s.
For s=xVthe claim follows from the definition of bg. For s=cF,
where cis 0-ary, we get the claim by the choice of Iin c
M, and for s=
f(t1, . . . , tn), where fFis n-ary (n1), we additionally need to apply the
induction hypothesis. The arguments for s=qP, where qis 0-ary, and
for s=p(t1, . . . , tn), where pPis n-ary (n1), are similar. The most
complicated case is when s=
ι
x r. We here consider two cases. We either have
dEwith krkM,g[d/x]=True and krkM,g[d0/x]=False for all d06=dE (i.e.
dis the unique existing object for which rholds) or there is no such dE . In
the former case we have k
ι
x rkM,g =dE . By the definition of the embedding
b
·, definition of c
Mand bg,λ-conversion, induction hypothesis and a series of
evaluation steps in HOL we get kd
ι
x rk
c
M,bg=k
ι
xbrk
c
M,bg=dE (for the very
same das above). In the second case we have k
ι
x rkM,g =?. Again we apply
the definition of the embedding b
·, the definition of c
Mand bg,λ-conversion,
induction hypothesis and a series of tedious evaluation steps in HOL to verify
that kd
ι
x rk
c
M,bg=?=?. The remaining cases are similar (actually simpler)
and left to the reader. 2
Theorem 15 (Soundness and Completeness of the Embedding)
For all formulas sF F OL we have |=FFOL sif and only if |=HOL bs.
Proof (Soundness, ) The proof is by contraposition. Assume 6|=FFOL s, i.e,
there is a FFOL model Mand an assignment gsuch that kskM,g =False. By
Lemma 14 we have kbsk
c
M,bg=False. Hence, we get 6|=HOL bs.
(Completeness, ) Analogous to above by contraposition and Lemma 14.
7In fact, it may be safely assumed that there are no other constant symbols given in a
HOL signature, except for the symbols in
b
Fand
b
P, the symbols Eioand ?iand the logical
connectives.
8The fixings introduced in
c
Mare not in conflict with any of the requirements regarding
frames and interpretations. The existence of a valuation function Vfor an HOL inter-
pretation crucially depends on how sparse the function spaces have been chosen in frame
{Dα}αT. Andrews [1] discusses criteria that are sufficient to ensure the existence of a
valuation function; in
c
Mthese requirements are met.
10 Christoph Benzm¨uller and Dana S. Scott
The above results enable the employment of any theorem prover that sup-
ports HOL with definite description to reason with FFOL, including TPTP
THF [34] compliant systems such as Satallax, Nitpick, LEO-II and Leo-III.
Alternatively, this theory can be encoded in interactive proof assistants such
as Isabelle/HOL, which is the option we have chosen here. We thereby sig-
nificantly benefit from the powerful proof automation means as provided in
Isabelle/HOL, in particular, from the integrated model finder Nitpick, the
SMT solvers CVC4 [20] and Z3 [28], and the first-order theorem provers E [31]
and Spass [17].
The different properties of FFOL could now be experimentally explored
with automated reasoning tools for HOL. We have conducted such experiments
in an earlier paper [9]. These experiments confirm the illustrative examples
discussed in Scott’s paper [32].
4 Exploring Axioms Systems for Category Theory
In an experimental theory-exploration study, utilizing the free logic reasoning
framework from above, we have shown how Scott’s [33] axiom system for cat-
egory theory can be derived from a notion of partial monoids. These axioms
systems are presented in Table 1.
The stepwise evolution has been described in detail in [10]. Below we sum-
marize these experiments. However, first we describe some basic modeling
decisions for the technical encoding in Isabelle/HOL.
The sources of our experiments as conducted here are avail-
able at http://christoph-benzmueller.de/papers/2018-JAR-sources.
zip. These sources contain an embedding of full free logic in Isabelle/HOL,
that is, with ?and definite description (cf. Fig. 2). In [10], ?and definite
description were still avoided; they are in fact not really relevant for the con-
ducted experiments.
Figure 2 displays (parts of) the embedding of FFOL in HOL, encoded in
Isabelle/HOL, that we have employed in our experiments.9An excerpt of these
experiments is shown in Fig. 3.
4.1 Modeling of basic concepts
Morphisms in the category are modeled as objects in D(respectively, Di). We
introduce three partial functions, dom (domain), cod (codomain), and ·(mor-
phism composition). Partiality of composition is handled exactly as expected:
we generally may have non-existing compositions x·y(i.e. ¬(E(x·y))) for
some existing morphisms xand y(i.e. Exand Ey).
9In the remainder of this article, and inline with our text so far, we present the formulas
of FFOL in non-boldface font. These formulas have been encoded in Isabelle/HOL using the
abbreviations as introduced in Fig. 2. In the actual source encoding, however, the usage of
boldface and non-boldface is (for technical reasons) reversed.
Automating Free Logic in HOL 11
Axioms Set I
SiE(x·y)(ExEy)
EiE(x·y)(ExEy(z z ·z
=zx·z
=xz·y
=y))
Aix·(y·z)
=(x·y)·z
CiyiIii·y
=y
DixjIjx·j
=x
Axioms Set II
Sii E(x·y)(ExEy)(E(dom x)Ex)(E(cod y)Ey)
Eii E(x·y)(ExEy(z z ·z
=zx·z
=xz·y
=y))
Aii x·(y·z)
=(x·y)·z
Cii Ey(I(cod y)(cod y)·y
=y)
Dii Ex(I(dom x)x·(dom x)
=x)
Axioms Set III
Siii E(x·y)(ExEy)(E(dom x)Ex)(E(cod y)Ey)
Eiii E(x·y)(dom x
=cod yE(cod y)))
Aiii x·(y·z)
=(x·y)·z
Ciii Ey(I(cod y)(cod y)·y
=y)
Diii Ex(I(dom x)x·(dom x)
=x)
Axioms Set IV
Siv E(x·y)(ExEy)(E(dom x)Ex)(E(cod y)Ey)
Eiv E(x·y)(dom x
=cod yE(cod y)))
Aiv x·(y·z)
=(x·y)·z
Civ (cod y)·y
=y
Div x·(dom x)
=x
Axioms Set V (Scott 79, [33])
S1E(dom x)Ex
S2E(cod y)Ey
S3E(x·y)dom x'cod y
S4x·(y·z)
=(x·y)·z
S5 (cod y)·y
=y
S6x·(dom x)
=x
Table 1 Stepwise evolution of Scott’s [33] axiom system for category theory from partial
monoids. The axiom names are motivated as follows: Sstands for strictness, Efor existence,
Afor associativity, Cfor codomain, Dfor Domain. The free variables x,y,zrange over the
raw domain D. The quantifiers in Axioms Sets I and II are free logic quantifiers, that is,
they range over the domain Eof existing objects.
12 Christoph Benzm¨uller and Dana S. Scott
Fig. 2 Isabelle/HOL encoding of FFOL (with ?and definite description).
For composition ·we assume set-theoretical composition here (i.e., func-
tional composition from right to left). This means that
(cod x)·(x·(dom x))
=x
and that
(x·y)a
=x(ya) when dom x'cod y
The equality symbol
=denotes Kleene equality and it is defined as follows
(where = is identity on all objects, existing or non-existing, of type i):
x
=y:= (ExEy)x=y
Existing identity 'is defined as:
x'y:= ExEyx=y
Automating Free Logic in HOL 13
Fig. 3 Encoding of Axioms Set V in Isabelle/HOL utilizing the embedded logic FFOL;
Axioms Set V is proven equivalent to Axioms Set IV.
=is an equivalence relation. ', in contrast, is only symmetric and transi-
tive, and lacks reflexivity. These observations are quickly confirmed by Sledge-
hammer in Isabelle.
Next, we define the identity morphism predicate Ias follows:
Ii:= (xE(i·x)i·x
=x)(xE(x·i)x·i
=x)
This definition was suggested by an exercise in the textbook by Freyd and
Scedrov [22] on p. 4. In earlier experiments we used a longer definition which
can be proved equivalent on the basis of the other axioms. For monoids, where
composition is total, Iimeans iis a two-sided identity — and such are unique.
For categories the property is much weaker.
14 Christoph Benzm¨uller and Dana S. Scott
4.2 Consistency
The model finder Nitpick confirms consistency for all of the axioms sets from
Table 1. For example, when asked to consider at least one defined and one un-
defined object, then Nitpick generates for all cases the following model (called
M1in the remainder): D={ii, i2}and E={i1};i1·i1is i1, and i2in all other
cases; cod and dom are identity on D. Without constraining the request, Nit-
pick generates an even simpler model (called M0in the remainder): D={ii}
and E=;i1·i1is i1;cod and dom are identity on D. It is trivial to check that
these models indeed confirm the consistency of all axioms sets from Table 1.
4.3 Axioms Sets I and II
Axioms Set I is our most basic set of axioms for category theory generalizing
the axioms for a monoid to a partial composition operation. Remember that
a monoid is an algebraic structure (S, ), where is a binary operator on set
S, satisfying the following properties:
Closure: a, b S a bS
Associativity: a, b, c S a (bc)=(ab)c
Identity: idSSaS idSa=a=aidS
That is, a monoid is a semigroup with a two-sided identity element.
Axioms Set I generalizes the notion of a monoid by introducing a partial,
strict binary composition operation ·. The existence of left and right identity
elements is addressed in the last two axioms. The notions of dom (domain)
and cod (codomain) abstract from their common meaning in the context of
sets. In category theory we work with just a single type of objects (the type
iin our setting) and therefore identity morphisms are employed to suitably
characterize their meanings.
We can prove that the iin axiom Ciand the jin axiom Diare unique. The
proofs and the dependencies can be found automatically by Sledgehammer.
yiIii·y
=y(j(Ijj·y
=y)i
=j) (by Ai, Ci, Si)
xjIjx·j
=x(i(Iix·i
=x)j
=i) (by Ai, Di, Si)
However, the iand jneed not be equal. Using existential variables Cand
D, this can be encoded in our formalization as follows:
CD(yI(Cy)(Cy)·y
=y)(xI(Dx)x·(Dx)
=x)D6=C
The model finder Nitpick confirms that this formula is satisfiable: e.g.
choose domain D={i1, i2}and E={i2};i2·i2returns i2, and i1in all
other cases; variable Dis identity on domain D, but Cmaps both i1and i2
to i2.
Axioms Set II is developed from Axioms Set I by Skolemization of the
existentially quantified variables iand jin axioms Ciand Di. We can argue
Automating Free Logic in HOL 15
semantically that every model of Axioms Set I has such functions. Hence, we
get a conservative extension of Axioms Set I. This could be done for any theory
with an “xi”-axiom. The strictness axiom Sis extended, so that strictness
is now also postulated for the new Skolem functions dom and cod. Note that
the values of Skolem functions outside Ecan just be given by the identity
function.
The left-to-right direction of existence axiom Eii is implied.
E(x·y)(E x Ey (z z ·z
=zx·z
=xz·y
=y)) (by Aii, Cii, Sii )
Axioms Cii and Dii, together with Sii , show that dom and cod are total
functions, as intended:
Ex E(dom x) (by Dii, Sii)
Ex E(cod x) (by Cii, Sii )
The proofs are found by the Sledgehammer tool and automatically re-
constructed in Isabelle/HOL. Further information on these experiments are
provided in §4.4 below. Using Sledgehammer we have also shown that Axioms
Set II implies Axioms Set I. Vice versa, Axioms Set I also implies Axioms Set
II. This can easily be shown by semantical means on the meta-level.
4.4 Remark on the Experiments
All proofs above and all proofs in the rest of this paper (unless stated other-
wise) have been obtained fully automatically in very reasonable time (typically
just a few seconds) with the Sledgehammer tool in Isabelle/HOL (version Is-
abelle2017). This tool interfaces to prominent first-order automated theorem
provers such as CVC4 [20], Z3 [28], E [31] and Spass [17]. Remotely, also
provers such as Vampire [23], or the higher-order provers Satallax [18] and
LEO-II [13] can be reached. For example, to prove axiom Eiii from Axioms
Set II, we have called Sledgehammer on all axioms of Axioms Set II. The
provers then, via Sledgehammer, suggested to call trusted/verified tools in Is-
abelle/HOL with the exactly required dependencies they detected, in this case
Cii,Dii ,Eii and Sii. With the provided dependency information the trusted
tools in Isabelle/HOL were then able to reconstruct the external proofs on
their own. This way we obtain a verification of our claims in Isabelle/HOL, in
which all the proofs have nevertheless been contributed by automated theorem
provers. For further information on the use and functioning of Sledgehammer
we refer to the literature [14,15].
In our experiments we have also made use of the Isabelle/HOL’s smt
method, which “translates the conjecture and any user-supplied facts to the
SMT solvers’ many-sorted first-order logic, invokes a solver, and (depending
on the solver) either trusts the result or attempts to reconstruct the proof in
16 Christoph Benzm¨uller and Dana S. Scott
Isabelle.” [15, p. 5].10 For quite some time the use of the smt method has been
controversially discussed in the Isabelle/HOL community, and there is in fact
a significant difference between using the smt method in combination with Z3
or with CVC4, as we prefer. When setting the solver to CVC4, the contributed
proofs are accepted and being trusted without replaying them in the Isabelle
kernel. Proofs contributed by Z3, in contrast, are never trusted and always
replayed in Isabelle’s kernel. For the work presented here this community in-
ternal discussion is of minor relevance, so that we decided to continue working
with CVC4 in order to keep our formalisation concise and also because CVC4
performed surprisingly well in our experiments.11
4.5 Axioms Sets III, IV and V
In Axioms Set III the existence axiom Eii from Axioms Set II is simplified by
taking advantage of the two new Skolem functions dom and cod.
The left-to-right direction of existence axiom Eiii is implied.
E(x·y)(dom x
=cod yE(cod y)) (by Aiii, Ciii , Diii, Siii)
Axioms Set IV simplifies the axioms Ciii and Diii. However, as it turned
out, these simplifications also require the existence axiom Eiii to be strength-
ened into an equivalence.
Axioms Set V has been proposed by Scott [33] in the 1970s. This set of
axioms is equivalent to the axioms set presented by Freyd and Scedrov in
their textbook “Categories, Allegories” [22], when encoded in free logic, cor-
rected/adapted and further simplified. Their axioms set is technically flawed
when encoded in our given context. This issue has been detected by automated
theorem provers with the same technical infrastructure as employed so far. See
§5 for more details.
Axioms Sets II, III, IV and V are equivalent; this has been automatically
confirmed by the automated theorem provers and verified in Isabelle/HOL.
5 Assessment of the Axiom System by Freyd and Scedrov
In this section we study the axioms set of Freyd and Scedrov from their text-
book “Categories, Allegories” [22]. In §5.1 we show that their axioms set,
replicated in Table 2 as Axioms Set FS-I, becomes inconsistent in our free
logic setting if we assume non-existing objects in D, respectively, if we assume
that the operations are non-total.
10 Technical remark: We have selected CVC4 in our experiments as the default SMT solver,
since we did run into errors when working with Z3. These errors can easily be reconstructed
in the provided source files when switching back to Z3 as default.
11 An expert reviewer of this article, to whom we are very grateful, provided alternative
proofs which can be fully replayed in the kernel of Isabelle.
Automating Free Logic in HOL 17
Axioms Set FS-I: Freyd and Scedrov in original notation (with issues)
A1E(xy)(x2
=2y)
A2a((2x)2)
=2x
A2b2(x2)
=2x
A3a(2x)x
=x
A3b x (x2)
=x
A4a2(xy)
=2(x(2y))
A4b(xy)2
=((x2)y)2
A5x(yz)
=(xy)z
Axioms Set FS-II: Freyd and Scedrov in our notation (with issues)
A1E(x·y)dom x
=cod y
A2acod (dom x)
=dom x
A2bdom (cod y)
=cod y
A3a x ·(dom x)
=x
A3b(cod y)·y
=y
A4adom (x·y)
=dom ((dom x)·y)
A4bcod (x·y)
=cod (x·(cod y))
A5x·(y·z)
=(x·y)·z
Axioms Set VI: Freyd and Scedrov in our notation (corrected)
A10E(x·y)dom x'cod y
A2acod (dom x)
=dom x
A2bdom (cod y)
=cod y
A3a x ·(dom x)
=x
A3b(cod y)·y
=y
A4adom (x·y)
=dom ((dom x)·y)
A4bcod (x·y)
=cod (x·(cod y))
A5x·(y·z)
=(x·y)·z
Table 2 The axioms set of Freyd and Scedrov in their and our notation, together with a
proposed correction.
Note, however, that the free variables in this first study range over the
existing and non-existing objects in D. One may argue, that this is not the
intention of Freyd and Scedrov. Therefore, we add a second study in §5.2,
in which we restrict the variables to range only over existing objects in E.
However, also in this case the axiom system of Freyd and Scedrov remains
18 Christoph Benzm¨uller and Dana S. Scott
unsatisfactory. Now it turns out incomplete, since strictness conditions/axioms
are required which are not mentioned in the textbook.
Freyd and Scedrov employ a different notation for dom xand cod x. They
denote these operations by 2xand x2. Moreover, they employ diagrammatic
composition (fg)x
=g(fx) (functional composition from left to right) instead
of the set-theoretic definition (f·g)x
=f(gx) (functional composition from
right to left) used so far. We leave it to the reader to verify that their Axioms
Set FS-I corresponds to Axioms Set FS-II modulo an appropriate conversion
of notation.12
5.1 Constricted Inconsistency in Free Logic Setting
A main difference in the system by Freyd and Scedrov to our Axioms Set V
from Table 1 concerns axiom S3, respectively A1. Namely, instead of the non-
reflexive existing identity ', they use Kleene equality
=, cf. definition 1.11 on
page 3 of their textbook [22].13 The difference seems minor, but in our free
logic setting it has the effect to cause the mentioned constricted inconsistency
issue.14
The (constricted) inconsistency of Axioms Set FS-I, respectively Axioms
Set FS-II, from Table 2 has been detected first by the model finder Nitpick.
When we asked Nitpick to generate a model with at least one non-existing
object, it claimed that there is no such model. However, a model can still be
constructed if we do not make any assumptions about non-existing objects.15
In fact, the model presented by Nitpick for this case consists of a single, existing
morphism.
However, one can see directly that Axiom A1 is problematic as written: If
xand yare undefined, then (presumably) dom xand cod yare undefined as
well, and by the definition of Kleene equality, dom x
=cod y.A1 stipulates
that x·yshould be defined in this case, which appears unintended.
As we will demonstrate now, the consequences of this version of the axiom
are even stronger. It implies that all objects are defined, that is, composition
(as well as dom and cod) become total operations. The theory described by
these axioms “collapses” to the theory of monoids: If all objects are defined,
then one can conclude from A1 that dom x
=dom y(resp. dom x
=cod y
12 A recipe for this translation is as follows: (i) replace all xyby y·x, (ii) rename the
variables to get them again in alphabetical order, (iii) replace ϕ2by cod ϕand 2ϕby
dom ϕ, and finally (iv) replace cod y
=dom x(resp. cod y'dom x) by dom x
=cod y
(resp. dom x'cod y).
13 Def. 1.11 in Freyd Scedrov: “The ordinary equality sign = [i.e., our
=] will be used in
the symmetric sense, to wit: if either side is defined then so is the other and they are equal.
...”
14 This could perhaps be an oversight, or it could indicate that Freyd and Scedrov actually
mean the Axioms Set discussed in §5.2 below.
15 For this we have to inactivate the axiom that postulates that ?is an undefined/non-
existing object.
Automating Free Logic in HOL 19
and cod x
=cod y), and according to 1.14 of [22], the category reduces to a
monoid provided that it is not empty.
In fact, the automated theorem provers, via Sledgehammer, quickly prove
falsity from Axioms Sets FS-II and FS-I when assuming a non-existing object
of type i:
(x¬Ex)F alse
The provers identify the axioms A1, A2aand A3ato cause the problem
under this assumption. A corresponding human-intuitive proof argument is as
follows:
Let aDbe an undefined object, that is, assume ¬Ea. By instantiating
axiom A3awith awe have a·(dom a)
=a. From this and definition of
=we
know that a·(dom a) is not defined. This is easy to see, since if a·(dom a) were
defined, we also had that ais defined, which is not the case by assumption.
Hence, ¬E(a·(dom a)). Next, we instantiate A1 with aand dom ato obtain
E(a·(dom a)) dom a
=cod (dom a). Moreover, by instantiating A2a
with awe obtain cod (dom a)
=dom a, which we use (modulo symmetry and
transitivity of
=) to rewrite the former result into E(a·(dom a)) dom a
=
dom a. By reflexivity of
=we thus get E(a·(dom a)), i.e. that a·(dom a) is
defined, which contradicts ¬E(a·(dom a)). 2
As a corollary from the above constricted inconsistency result we get that
all morphisms (objects in D) must be defined: x Ex.
Obviously Axioms Sets FS-I and FS-II are also redundant, and we have
previously reported on respective redundancies [9].16 For the corrected Axioms
Set VI we still get redundancies. The different options to reduce this system
are reported in Table 3.
Attempts to remove axioms A1’, A3a, A3b, and A5 from Axiom Set VI
failed. Nitpick shows that they are independent.
However, when assuming strictness of dom and cod , the axioms A2a, A2b,
A4a and A4b are all implied. Hence, under this assumptions, the reasoning
tools quickly identify (A1’ A3a A3b A5) as a minimal axiom set, which then
exactly matches the Axioms Set V of Scott from Table 1.17
5.2 Missing Strictness Axioms in Alternative Setting
We study the axiom system by Freyd and Scedrov once again. However, this
time we restrict the free variables in their system to range over existing objects
only. In the context of algebraic theories, it could be argued that this is the
16 The discussion in our releated conference paper [9] was before the discovery of the above
constricted inconsistency issue, which tells us that the system (in our setting) can even be
reduced to axioms A1, A2a, and A3a (when we assume undefined objects).
17 This minimal set of axioms has also been mentioned by Freyd in a note [21] and at-
tributed to Martin Knopman. However, the proof sketch presented there seems to fail when
the adapted version of A1 (with ') is employed.
20 Christoph Benzm¨uller and Dana S. Scott
Freyd and Scedrov in our notation (corrected and reduced I)
A10E(x·y)dom x'cod y
A3a x ·(dom x)
=x
A3b(cod y)·y
=y
A4adom (x·y)
=dom ((dom x)·y)
A4bcod (x·y)
=cod (x·(cod y))
A5x·(y·z)
=(x·y)·z
Freyd and Scedrov in our notation (corrected and reduced II)
A10E(x·y)dom x'cod y
A2acod (dom x)
=dom x
A2bdom (cod y)
=cod y
A3a x ·(dom x)
=x
A3b(cod y)·y
=y
A5x·(y·z)
=(x·y)·z
Freyd and Scedrov in our notation (corrected and reduced III)
S1
vE(dom x)Ex
S2
vE(cod y)Ey
A10E(x·y)dom x'cod y
A3a x ·(dom x)
=x
A3b(cod y)·y
=y
A5x·(y·z)
=(x·y)·z
Table 3 Reduced variants of Axioms Set VI.
preferred reading of free variables. By employing the free logic universal quan-
tifier , which realizes such a restriction, we thus modify Axioms Set FS-II
into Axioms-Set FS-III as displayed in Table 4.
For Axioms Set FS-III the consistency checks with Nitpick succeed, even
if we assume undefined objects. However, this axioms set is obviously weaker
than Axioms Set V from Table 1. In fact, as has been shown by Nitpick, none
of the axioms of this set are implied. The situation changes when we explicitly
postulate strictness of dom,cod and ·. Doing so we obtain Axioms Set FS-
IV from Table 4, which, as Nitpick confirms, is consistent even if we assume
undefined objects. And the automated theorem provers via Sledgehammer
confirm that Axioms Set FS-IV is equivalent to Axioms Set V, as intended.
Automating Free Logic in HOL 21
Axioms Set FS-III: Freyd and Scedrov in our notation (with issues)
B1xyE(x·y)dom x
=cod y
B2axcod (dom x)
=dom x
B2bydom (cod y)
=cod y
B3ax x ·(dom x)
=x
B3by(cod y)·y
=y
B4axydom (x·y)
=dom ((dom x)·y)
B4bxycod (x·y)
=cod (x·(cod y))
B5xyz x ·(y·z)
=(x·y)·z
Axioms Set FS-IV: Freyd and Scedrov in our notation (without issues)
B0aE(x·y)(ExEy)
B0bE(dom x)Ex
B0bE(cod x)Ex
B1xyE(x·y)dom x
=cod y
B2axcod (dom x)
=dom x
B2bydom (cod y)
=cod y
B3ax x ·(dom x)
=x
B3by(cod y)·y
=y
B4axydom (x·y)
=dom ((dom x)·y)
B4bxycod (x·y)
=cod (x·(cod y))
B5xyz x ·(y·z)
=(x·y)·z
Table 4 The axioms set of Freyd and Scedrov in our notation and with variable restriction
to existing objects only.
Unfortunately, however, respective strictness conditions are not mentioned in
the textbook by Freyd and Scedrov.
6 Summary and Further Work
We have developed a new reasoning framework for free logic, and we have
experimentally applied it for some first experiments in category theory. We
have demonstrated how modern proof assistants and theorem provers for clas-
sical higher-order logic may well support the reasoning in free logic. More
concretely, we have applied our new free logic reasoning framework for the
systematic exploration of axiom systems for category theory. Without tools,
support of such experiments would be extremely tedious and error prone. In
the course of our experiments, automated theorem provers have revealed some
(minor) issue in the textbook of Freyd and Scedrov [22], which we were able to
22 Christoph Benzm¨uller and Dana S. Scott
correct. The correction essentially corresponds to the axiom system by Scott
proposed earlier [32]. All our findings were achieved directly by or in close
interaction with automated reasoning tools. Perhaps the lesson to be learned
here is that, when working with partial functions, it is natural — out of caution
— to assume too much, and the automated reasoning tools, as we have shown
here, can help find in what ways the axioms might be reduced or simplified.
Comparisons with other theorem provers for free logic are not possible at
this stage, since we are not aware of any other existing systems.
Further work includes the extension of our work towards an embedding of
free higher-order logic, the continuation of our formalization studies in cate-
gory theory (especially extensions of the theory involving functors) and the
application of free logic to various other mathematical domains, including, for
example, projective geometry. Regarding extensions towards free higher-order
logic some first steps have already been taken [27,35], and a recent continua-
tion of our formalisation studies [11] now also includes an early axiom system
for category theory by Saunders MacLane [26].
Moreover, as an alternative to always unfolding the mapping from FFOL
to HOL, abstract level proof tactics could be provided e.g. in Isabelle/HOL
to support intuitive interaction (and even automation) in FFOL on top the
semantical embedding.
Acknowledgements We thank G¨unter Rote, Lutz Schr¨oder and and Emil Weydert for
their comments to [10], which together with [9] forms the basis for this article.
We also want to express our gratitude to the reviewers of this article. Their fruitful
feedback definitely helped to improve the final version.
References
1. Andrews, P.: General models and extensionality. Journal of Symbolic Logic 37(2),
395–397 (1972)
2. Andrews, P.: Church’s type theory. In: E. Zalta (ed.) The Stanford Encyclopedia of
Philosophy, spring 2014 edn. (2014)
3. Barendregt, H., Dekkers, W., Statman, R.: Lambda Calculus with Types. Perspectives
in Logic. Cambridge University Press (2013)
4. Benzm¨uller, C.: Automating quantified conditional logics in HOL. In: F. Rossi (ed.)
Proc. of IJCAI-23. Beijing, China (2013)
5. Benzm¨uller, C.: Cut-elimination for quantified conditional logic. Journal of Philosoph-
ical Logic (2016)
6. Benzm¨uller, C., Brown, C., Kohlhase, M.: Higher-order semantics and extensionality.
Journal of Symbolic Logic 69(4), 1027–1088 (2004)
7. Benzm¨uller, C., Brown, C., Kohlhase, M.: Cut-simulation and impredicativity. Logical
Methods in Computer Science 5(1:6), 1–21 (2009)
8. Benzm¨uller, C., Miller, D.: Automation of higher-order logic. In: J. Siekmann, D. Gab-
bay, J. Woods (eds.) Handbook of the History of Logic, Volume 9 — Logic and Com-
putation. Elsevier (2014)
9. Benzm¨uller, C., Scott, D.: Automating free logic in Isabelle/HOL. In: G.M. Greuel,
T. Koch, P. Paule, A. Sommese (eds.) Mathematical Software – ICMS 2016, 5th Inter-
national Congress, Proceedings, LNCS, vol. 9725, pp. 43–50. Springer, Berlin, Germany
(2016)
10. Benzm¨uller, C., Scott, D.S.: Axiomatizing category theory in free logic. CoRR
abs/1609.01493 (2016)
Automating Free Logic in HOL 23
11. Benzm¨uller, C., Scott, D.S.: Axiom systems for category theory in free logic.
Archive of Formal Proofs (2018). URL https://www.isa-afp.org/entries/
AxiomaticCategoryTheory.html
12. Benzm¨uller, C., Steen, A., Wisniewski, M.: Leo-III version 1.1 (system description). In:
T. Eiter, D. Sands (eds.) Logic for Programming, Artificial Intelligence, and Reasoning
(LPAR) — Short Papers, Kalpa Puplications. EasyChair, Maun, Botswana (2017). To
appear
13. Benzm¨uller, C., Sultana, N., Paulson, L.C., Theiss, F.: The higher-order prover Leo-II.
Journal of Automated Reasoning 55(4), 389–404 (2015)
14. Blanchette, J.C.: Hammering Away – A User’s Guide to Sledgehammer for Is-
abelle/HOL. Institut f¨ur Informatik, Technische Universit¨at M¨unchen (2018).
URL https://isabelle.in.tum.de/doc/sledgehammer.pdf. With contributions from
Lawrence C. Paulson
15. Blanchette, J.C., B¨ohme, S., Paulson, L.C.: Extending Sledgehammer with SMT solvers.
Journal of Automated Reasoning 51(1), 109–128 (2013)
16. Blanchette, J.C., Nipkow, T.: Nitpick: A counterexample generator for higher-order logic
based on a relational model finder. In: M. Kaufmann, L.C. Paulson (eds.) Interactive
Theorem Proving, First International Conference, ITP 2010, Edinburgh, UK, July 11-14,
2010. Proceedings, Lecture Notes in Computer Science, vol. 6172, pp. 131–146. Springer
(2010)
17. Blanchette, J.C., Popescu, A., Wand, D., Weidenbach, C.: More SPASS with Isabelle –
Superposition with Hard Sorts and Configurable Simplification. In: L. Beringer, A.P.
Felty (eds.) Interactive Theorem Proving - Third International Conference, ITP 2012,
Princeton, NJ, USA, August 13-15, 2012. Proceedings, Lecture Notes in Computer Sci-
ence, vol. 7406, pp. 345–360. Springer (2012)
18. Brown, C.E.: Satallax: An automatic higher-order prover. In: B. Gramlich, D. Miller,
U. Sattler (eds.) Automated Reasoning - 6th International Joint Conference, IJCAR
2012, Manchester, UK, June 26-29, 2012. Proceedings, Lecture Notes in Computer Sci-
ence, vol. 7364, pp. 111–117. Springer (2012)
19. Church, A.: A formulation of the simple theory of types. Journal of Symbolic Logic 5,
56–68 (1940)
20. Deters, M., Reynolds, A., King, T., Barrett, C.W., Tinelli, C.: A tour of CVC4: How
it works, and how to use it. In: K. Claessen, V. Kuncak (eds.) Formal Methods in
Computer-Aided Design, FMCAD 2014, Lausanne, Switzerland, October 21-24, 2014,
p. 7. IEEE (2014)
21. Freyd, P.: Amplifications, Diminutions, Subscorings for Categories, Allegories (2016).
University of Pennsylvania. Unpublished. Available at https://www.math.upenn.edu/
~pjf/amplifications.pdf; (accessed in August 2016)
22. Freyd, P., Scedrov, A.: Categories, Allegories. North Holland (1990)
23. Kov´acs, L., Voronkov, A.: First-Order Theorem Proving and Vampire. In: N. Sharygina,
H. Veith (eds.) Computer Aided Verification - 25th International Conference, CAV 2013,
Saint Petersburg, Russia, July 13-19, 2013. Proceedings, Lecture Notes in Computer
Science, vol. 8044, pp. 1–35. Springer (2013)
24. Lambert, K.: The definition of e(xistence)! in free logic. In: Abstracts: The Interna-
tional Congress for Logic, Methodology and Philosophy of Science. Stanford: Stanford
University Press (1960)
25. Lambert, K.: Free Logic: Selected Essays. Cambridge: Cambridge University Press
(2002)
26. MacLane, S.: Groups, categories and duality. Proceedings of the National Academy of
Sciences 34(6), 263–267 (1948)
27. Makarenko, I.: Automatisierung von Freier Logik in Logik h¨oherer Stufe (2016). Bach-
elorarbeit, Institut f¨ur Informatik, Freie Universit¨at Berlin
28. de Moura, L.M., Bjørner, N.: Z3: An Efficient SMT Solver. In: C.R. Ramakrishnan,
J. Rehof (eds.) Tools and Algorithms for the Construction and Analysis of Systems,
14th International Conference, TACAS 2008, Held as Part of the Joint European Con-
ferences on Theory and Practice of Software, ETAPS 2008, Budapest, Hungary, March
29-April 6, 2008. Proceedings, Lecture Notes in Computer Science, vol. 4963, pp. 337–
340. Springer (2008)
24 Christoph Benzm¨uller and Dana S. Scott
29. Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL: A Proof Assistant for Higher-
Order Logic. No. 2283 in LNCS. Springer (2002)
30. Nolt, J.: Free logic. In: E.N. Zalta (ed.) The Stanford Encyclopedia of Philosophy,
winter 2014 edn. (2014)
31. Schulz, S.: System description: E 1.8. In: K.L. McMillan, A. Middeldorp, A. Voronkov
(eds.) Logic for Programming, Artificial Intelligence, and Reasoning - 19th International
Conference, LPAR-19, Stellenbosch, South Africa, December 14-19, 2013. Proceedings,
Lecture Notes in Computer Science, vol. 8312, pp. 735–743. Springer (2013). DOI
10.1007/978-3- 642-45221- 5. URL http://dx.doi.org/10.1007/978- 3-642- 45221-5
32. Scott, D.: Existence and description in formal logic. In: R. Schoenman (ed.) Bertrand
Russell: Philosopher of the Century, pp. 181–200. George Allen & Unwin, London (1967).
(Reprinted with additions in: Philosophical Application of Free Logic, edited by K.
Lambert. Oxford Universitry Press, 1991, pp. 28 - 48)
33. Scott, D.: Identity and existence in intuitionistic logic. In: M. Fourman, C. Mulvey,
D. Scott (eds.) Applications of Sheaves: Proceedings of the Research Symposium on
Applications of Sheaf Theory to Logic, Algebra, and Analysis, Durham, July 9–21,
1977, Lecture Notes in Mathematics, vol. 752, pp. 660–696. Springer Berlin Heidelberg
(1979)
34. Sutcliffe, G., Benzm¨uller, C.: Automated reasoning in higher-order logic using the TPTP
THF infrastructure. Journal of Formalized Reasoning 3(1), 1–27 (2010)
35. Wisniewski, M., Steen, A., Benzm¨uller, C.: TPTP and beyond: Representation of quan-
tified non-classical logics. In: C. Benzm¨uller, J. Otten (eds.) ARQNL 2016. Automated
Reasoning in Quantified Non-Classical Logics, vol. 1770, pp. 51–65. CEUR Workshop
Proceedings, http://ceur-ws.org (2016)
... The following proposal of a positive semantics for free higher-order logic combines two sophisticated concepts that go back to Benzmüller and Scott [10] and Farmer [14]. ...
... For experiments and tests, and for the Isabelle/HOL sources, see Makarenko [25]. 10 10 The Isabelle/HOL sources are also available at https://github.com/stilleben/ Free-Higher-Order-Logic. ...
... As shown by Farmer and Schütte[31], it is possible to give a Henkin-style completeness proof for free higher-order logic defined based on a partial valuation function.9 A similar translation, although for free first-order logic, was provided and proved to be sound and complete by Meyer and Lambert[26] and Benzmüller and Scott[10]. ...
Conference Paper
Full-text available
Free logics are a family of logics that are free of any exis-tential assumptions. Unlike traditional classical and non-classical logics, they support an elegant modeling of nonexistent objects and partial functions as relevant for a wide range of applications in computer science, philosophy , mathematics, and natural language semantics. While free first-order logic has been addressed in the literature, free higher-order logic has not been studied thoroughly so far. The contribution of this paper includes (i) the development of a notion and definition of free higher-order logic in terms of a positive semantics (partly inspired by Farmer's partial functions version of Church's simple type theory), (ii) the provision of a faithful shallow semantical embedding of positive free higher-order logic into classical higher-order logic, (iii) the implementation of this embedding in the Isabelle/HOL proof-assistant, and (iv) the exemplary application of our novel reasoning framework for an automated assessment of Prior's paradox in positive free quantified propositional logics, i.e., a fragment of positive free higher-order logic.
... We use an axiomatic approach to category theory based on free logic [8,9,14]. As demonstrated by Benzmüller and Scott [2], this approach enables the encoding of category theory in Isabelle/HOL. Their encoding work is extended below to cover also inverse categories. ...
... Hence a composition of morphisms, that does not satisfy (4), will result in . We refer to Benzmüller and Scott [2] for more information on the encoding of free logic in Isabelle/HOL. Based upon this groundwork, a category in Isabelle/HOL is defined as follows. ...
... Using our encoding of inverse categories in Isabelle/HOL, we are currently extending this encoding work to cover also categorical modeloids and their derivatives. This naturally extends the framework established by Benzmüller and Scott so far [2]. Furthermore, an investigation of the generalized Ehrenfeucht-Fraïssé games in terms of applicability has to be conducted. ...
Chapter
A modeloid, a certain set of partial bijections, emerges from the idea to abstract from a structure to the set of its partial automorphisms. It comes with an operation, called the derivative, which is inspired by Ehrenfeucht-Fraïssé games. In this paper we develop a generalization of a modeloid first to an inverse semigroup and then to an inverse category using an axiomatic approach to category theory. We then show that this formulation enables a purely algebraic view on Ehrenfeucht-Fraïssé games.
... We use an axiomatic approach to category theory based on free logic [14,8,9]. As demonstrated by Benzmüller and Scott [2], this approach enables the encoding of category theory in Isabelle/HOL. Their encoding work is extended below to cover also inverse categories. ...
... Hence a composition of morphisms, that does not satisfy (4), will result in . We refer to Benzmüller and Scott [2] for more information on the encoding of free logic in Isabelle/HOL. ...
... Using our encoding of inverse categories in Isabelle/HOL, we are currently extending this encoding work to cover also categorical modeloids and their derivatives. This naturally extends the framework established by Benzmüller and Scott so far [2]. Furthermore, an investigation of the generalized Ehrenfeucht-Fraïssé games in terms of applicability has to be conducted. ...
Conference Paper
Full-text available
A modeloid, a certain set of partial bijections, emerges from the idea to abstract from a structure to the set of its partial automor-phisms. It comes with an operation, called the derivative, which is inspired by Ehrenfeucht-Fra¨ısséFra¨ıssé games. In this paper we develop a generalization of a modeloid first to an inverse semigroup and then to an inverse category using an axiomatic approach to category theory. We then show that this formulation enables a purely algebraic view on Ehrenfeucht-Fra¨ısséFra¨ıssé games.
... We use an axiomatic approach to category theory using free logic [13,7,8] enabling an implementation in Isabelle/HOL which was proposed by Benzmller and Scott [2]. This encoding is extended to represent an inverse category. ...
... Due to the achievement of finding a shallow embedding of free logic in Isabelle/HOL by Benzmller and Scott, first order axiomatic category theory could also be implemented. We refer to [2] for more information. ...
... Using the inverse category presented in Isabelle/HOL, we are currently working on implementing a categorical modeloid together with its derivative operation. This naturally results in formulating basic definitions from category theory in the framework established so far [2]. Furthermore, an investigation of the, in a sense, generalized Ehrenfeucht-Frass games in terms of applicability has to be conducted. ...
Preprint
Full-text available
A modeloid, a certain set of partial bijections, emerges from the idea to abstract from a structure to the set of its partial automor-phisms. It comes with an operation, called the derivative, which is inspired by Ehrenfeucht-Fraisse games. In this paper we develop a generalization of a modeloid first to an inverse semigroup and then to an inverse category using an axiomatic approach to category theory. We then show that this formulation enables a purely algebraic view on Ehrenfeucht-Fraisse games.
... Davidson builds upon Quine's account of radical translation [51], which is an account of how it is possible for an interpreter to understand someone's words and actions without relying on any prior understanding of them. 11 Since the radical interpreter cannot count on a shared language for communication nor the help of a translator, she cannot directly ask for any kind of explanations. She is thus obliged to conceive interpretation hypotheses (theories) and put them to the test by gathering 'external-world' evidence regarding their validity. ...
... The language L thereby corresponds to the idiolect of the speaker (natural language), and the target language is constituted by formulas of our chosen logic of formalization (some expressive logic XY ) plus the meta-logical turnstyle symbol XY signifying that an inference (argument or argument step) is valid in logic XY. As an 11 In this sense, Davidson has emphatically made clear that he does not aim at showing how humans actually interpret let alone acquire natural language. This being rather a subject of empirical research (e.g. in cognitive science and linguistics) [25]. ...
... The semantic embeddings approach gives us two important benefits: (i) we can reuse existing automated theorem proving technology for HOL and apply it for automated reasoning in non-classical logics (e.g. free [11], modal [10], intu- itionistic [9] and deontic [8] logics); and (ii) the logic of formalization becomes another degree of freedom in the development of a logical theory and thus can be fine-tuned dynamically by adding or removing axioms (which are encoded using HOL as a meta-language). ...
Chapter
Full-text available
We present a computer-supported approach for the logical analysis and conceptual explicitation of argumentative discourse. Computational hermeneutics harnesses recent progresses in automated reasoning for higher-order logics and aims at formalizing natural-language argumentative discourse using flexible combinations of expressive non-classical logics. In doing so, it allows us to render explicit the tacit conceptualizations implicit in argumentative discursive practices. Our approach operates on networks of structured arguments and is iterative and two-layered. At one layer we search for logically correct formalizations for each of the individual arguments. At the next layer we select among those correct formalizations the ones which honor the argument’s dialectic role, i.e. attacking or supporting other arguments as intended. We operate at these two layers in parallel and continuously rate sentences’ formalizations by using, primarily, inferential adequacy criteria. An interpretive, logical theory will thus gradually evolve. This theory is composed of meaning postulates serving as explications for concepts playing a role in the analyzed arguments. Such a recursive, iterative approach to interpretation does justice to the inherent circularity of understanding: the whole is understood compositionally on the basis of its parts, while each part is understood only in the context of the whole (hermeneutic circle). We summarily discuss previous work on exemplary applications of human-in-the-loop computational hermeneutics in metaphysical discourse. We also discuss some of the main challenges involved in fully-automating our approach. By sketching some design ideas and reviewing relevant technologies, we argue for the technological feasibility of a highly-automated computational hermeneutics.
... The quantifiers above correspond, in fact, to the usual way of defining quantifiers for shallow embeddings of normal modal logics as introduced in [5] for the unrestricted case; cf. also [6] for restricted (or 'free') quantification. In fact, these quantifiers and the infinitary BA operations (supremum and infimum) are closely related: taking suprema and infima over the range Ra(⋅) of a propositional function (restricted to a domain ) is equivalently codified by using (restricted) quantifiers. ...
... Recall that a point belonging to set is called isolated (w.r.t. ) if it is not a limit point of , i.e. there exists a neighborhood of which does not contain any other points of .6 Note that  cannot be defined in terms of other operators and is, in this sense, fundamental. ...
Preprint
Full-text available
We encode a topological semantics for paraconsistent and paracomplete logics enriched with recovery operators, by drawing upon early works on topological Boolean algebras (by Kuratowski, Zarycki, McKinsey & Tarski, etc.). This work exemplarily illustrates the shallow semantical embedding approach using Isabelle/HOL and shows how we can effectively harness theorem provers, model finders and "hammers" for reasoning with quantified non-classical logics.
... The following proposal of a positive semantics for free higher-order logic combines two sophisticated concepts that go back to Benzmüller and Scott [10] and Farmer [14]. ...
... As shown by Farmer and Schütte[31], it is possible to give a Henkin-style completeness proof for free higher-order logic defined based on a partial valuation function.9 A similar translation, although for free first-order logic, was provided and proved to be sound and complete by Meyer and Lambert[26] and Benzmüller and Scott[10]. ...
Chapter
Free logics are a family of logics that are free of any existential assumptions. Unlike traditional classical and non-classical logics, they support an elegant modeling of nonexistent objects and partial functions as relevant for a wide range of applications in computer science, philosophy, mathematics, and natural language semantics. While free first-order logic has been addressed in the literature, free higher-order logic has not been studied thoroughly so far. The contribution of this paper includes (i) the development of a notion and definition of free higher-order logic in terms of a positive semantics (partly inspired by Farmer’s partial functions version of Church’s simple type theory), (ii) the provision of a faithful shallow semantical embedding of positive free higher-order logic into classical higher-order logic, (iii) the implementation of this embedding in the Isabelle/HOL proof-assistant, and (iv) the exemplary application of our novel reasoning framework for an automated assessment of Prior’s paradox in positive free quantified propositional logics, i.e., a fragment of positive free higher-order logic.
... We note that the corresponding semantical constraints on N 1 2 , R 1 and R 2 , when encoded in the host language, L F (S STT ), give rise to a faithful SSE ). Among several others, faithful SSEs also exist for quantified conditional logics (Benzmüller 2017), as well as for I/O logic (Benzmüller et al. 2019), and free logic (Benzmüller and Scott 2020). ...
Preprint
Full-text available
We present an approach towards the deep, pluralistic logical analysis of argumentative discourse that benefits from the application of state-of-the-art automated reasoning technology for classical higher-order logic. Thanks to its expressivity this logic can adopt the status of a uniform \textit{lingua franca} allowing the encoding of both formalized arguments (their deep logical structure) and dialectical interactions (their attack and support relations). We illustrate this by analyzing an excerpt from an argumentative debate on climate engineering. Another, novel contribution concerns the definition of abstract, language-theoretical foundations for the characterization and assessment of shallow semantical embeddings (SSEs) of non-classical logics in classical higher-order logic, which constitute a pillar stone of our approach. The novel perspective we draw enables more concise and more elegant characterizations of semantical embeddings of logics and logic combinations, which is demonstrated with several examples.
Conference Paper
Full-text available
An approach to universal (meta-)logical reasoning in classical higher-order logic is employed to explore and study simplifications of Kurt Gödel's modal ontological argument. Some argument premises are modified, others are dropped, modal collapse is avoided and validity is shown already in weak modal logics K and T. Key to the gained simplifications of Gödel's original theory is the exploitation of a link to the notions of filter and ultrafilter in topology. The paper illustrates how modern knowledge representation and reasoning technology for quantified non-classical logics can contribute new knowledge to other disciplines. The contributed material is also well suited to support teaching of non-trivial logic formalisms in classroom.
Article
Full-text available
Computational philosophy is the use of mechanized computational techniques to unearth philosophical insights that are either difficult or impossible to find using traditional philosophical methods. Computational metaphysics is computational philosophy with a focus on metaphysics. In this paper, we (a) develop results in modal metaphysics whose discovery was computer assisted, and (b) conclude that these results work not only to the obvious benefit of philosophy but also, less obviously, to the benefit of computer science, since the new computational techniques that led to these results may be more broadly applicable within computer science. The paper includes a description of our background methodology and how it evolved, and a discussion of our new results.
Conference Paper
Full-text available
Leo-III is an automated theorem prover for (polymorphic) higher-order logic which supports all common TPTP dialects, including THF, TFF and FOF as well as their rank-1 polymorphic derivatives. It is based on a paramodulation calculus with ordering constraints and, in tradition of its predecessor LEO-II, heavily relies on cooperation with external first-order theorem provers. Unlike LEO-II, asynchronous cooperation with typed first-order provers and an agent-based internal cooperation scheme is supported. In this paper, we sketch Leo-III's underlying calculus, survey implementation details and give examples of use.
Conference Paper
Full-text available
The practical employment of automated deduction systems requires the user to input problem statements in a well-formed string representation. While this presentation is usually fixed by the respective system, the various language dialects of the TPTP library are meanwhile accepted as a de-facto standard for all current automated theorem provers based on classical logics. In the context of reasoning in non-classical logics, however, only a few limited standardization approaches exist, with QMLTP being the most notable exception. To move standardization forward, we outline conservative extensions to the TPTP language that allow systematic syntax definitions for various expressive, non-classical logics. These logics include higher-order versions of modal logics, conditional logics, hybrid logics, free logics, and many-valued logics. We are convinced that a standard syntax for prominent non-classical logics will not only facilitate their deployment but also support the development and comparability of corresponding theorem proving systems.
Article
Full-text available
Starting from a generalization of the standard axioms for a monoid we present a stepwise development of various, mutually equivalent foundational axiom systems for category theory. Our axiom sets have been formalized in the Isabelle/HOL interactive proof assistant, and this formalization utilizes a semantically correct embedding of free logic in classical higher-order logic. The modeling and formal analysis of our axiom sets has been significantly supported by series of experiments with automated reasoning tools integrated with Isabelle/HOL. We also address the relation of our axiom systems to alternative proposals from the literature, including an axiom set proposed by Freyd and Scedrov for which we reveal a technical flaw: either all operations, e.g. morphism composition, are total or their axiom system is inconsistent. The repair for this problem is quite straightforward, however.
Conference Paper
Full-text available
We present an interactive and automated theorem prover for free higher-order logic. Our implementation on top of the Isabelle/HOL framework utilizes a semantic embedding of free logic in classical higher-order logic. The capabilities of our tool are demonstrated with first experiments in category theory.
Article
Full-text available
A semantic embedding of quantified conditional logic in classical higher-order logic is utilized for reducing cut-elimination in the former logic to existing results for the latter logic. The presented embedding approach is adaptable to a wide range of other logics, for many of which cut-elimination is still open. However, special attention has to be payed to cut-simulation, which may render cut-elimination as a pointless criterion.
Article
Full-text available
Leo-II is an automated theorem prover for classical higher-order logic. The prover has pioneered cooperative higher-order–first-order proof automation, it has influenced the development of the TPTP THF infrastructure for higher-order logic, and it has been applied in a wide array of problems. Leo-II may also be called in proof assistants as an external aid tool to save user effort. For this it is crucial that Leo-II returns proof information in a standardised syntax, so that these proofs can eventually be transformed and verified within proof assistants. Recent progress in this direction is reported for the Isabelle/HOL system.
Conference Paper
Full-text available
Sledgehammer for Isabelle/HOL integrates automatic theorem provers to discharge interactive proof obligations. This paper considers a tighter integration of the superposition prover SPASS to increase Sledgehammer’s success rate. The main enhancements are native support for hard sorts (simple types) in SPASS, simplification that honors the orientation of Isabelle simp rules, and a pair of clause-selection strategies targeted at large lemma libraries. The usefulness of this integration is confirmed by an evaluation on a vast benchmark suite and by a case study featuring a formalization of language-based security.
Article
This handbook with exercises reveals in formalisms, hitherto mainly used for hardware and software design and verification, unexpected mathematical beauty. The lambda calculus forms a prototype universal programming language, which in its untyped version is related to Lisp, and was treated in the first author's classic The Lambda Calculus (1984). The formalism has since been extended with types and used in functional programming (Haskell, Clean) and proof assistants (Coq, Isabelle, HOL), used in designing and verifying IT products and mathematical proofs. in this book, the authors focus on three classes of typing for lambda terms: Simple types, recursive types and intersection types. it is in these three formalisms of terms and types that the unexpected mathematical beauty is revealed. The treatment is authoritative and comprehensive, complemented by an exhaustive bibliography, and numerous exercises are provided to deepen the readers' understanding and increase their confidence using types.
Article
Introduction 1. Russell's version of the theory of definite descriptions 2. Existential import, 'E!' and 'the' 3. The reduction of two paradoxes and the significance thereof 4. The Hilbert-Bernays theory of definite descriptions 5. Foundations of the hierarchy of positive free definite description theories 6. Predication and extensionality 7. Nonextensionality 8. The philosophical foundations of free logic 9. Logical truth and microphysics.