6
$\begingroup$

Summary

My question is about how (i) a certain presentation of pure type systems in the $\lambda$-cube, bears on (ii) a standard definition of consistency in pure type systems. In short, I'm presenting pure type systems to an audience familiar with presentations of first-order logic, but not with presentations of typed languages that invoke typing contexts (for brevity, I won't explain why here). As a result, I think my presentation of pure type systems has weird implications for the standard definition of consistency, according to which a system is consistent just in case not all types are inhabited. And all this raises some interesting issues concerning the relationship between two different definitions of consistency, namely, the standard one, and one closer to the original definition from e.g. first-order logic. That's what I'd like to ask about.

Presentation

Most of what follows is based on (Barendregt, 1992). Let $V$ be an infinite collection of variables, and let $C$ be an infinite collection of constants. The pseudo-expressions $\mathcal{T}$ are generated as follows.

\begin{equation*} \mathcal{T}= V \mid C \mid \mathcal{T}\mathcal{T} \mid \lambda V{:}\mathcal{T}.\mathcal{T} \mid \Pi V{:}\mathcal{T}.\mathcal{T} \end{equation*}

Now for the rules and axioms that describe expressions, which for present purposes, are strings of the form $\phi\mathbin{:}\psi$ (which can be derived from the empty typing context). My audience is familiar with presentations of first-order logic languages that invoke clauses like “For all natural numbers $n$, there are infinitely many predicates $P^{1}$, $P^{2}$, and so on, of arity $n$.” So I have formulated principles for pure type systems that are structurally similar. Here is an example. Let $S=\{\ast,\Box\}\subseteq C$ be the set of sorts. Then consider the principles below. (For brevity, in what follows, I omit additional clauses guaranteeing that each constant/variable gets associated with a unique pseudo-expression.)

Constants. For every sort $\mathfrak{s}$ and every pseudo-expression $\phi$ such that $\phi\mathbin{:}\mathfrak{s}$ is an expression, there are infinitely many constants $\kappa_{1}$, $\kappa_{2}$, and so on, such that $\kappa_{1}\mathbin{:}\phi$, $\kappa_{2}\mathbin{:}\phi$, and so on, are expressions.

Variables. For every sort $\mathfrak{s}$ and every pseudo-expression $\phi$ such that $\phi\mathbin{:}\mathfrak{s}$ is an expression, there are infinitely many variables $\nu_{1}$, $\nu_{2}$, and so on, such that $\nu_{1}\mathbin{:}\phi$, $\nu_{2}\mathbin{:}\phi$, and so on, are expressions.

Two Questions

Consistency is often defined, in pure type systems, like this: a pure type system is consistent just in case the type $\bot$ is not inhabited, where $\bot$ is usually taken to be something like $\Pi x\mathbin{:}\ast.x$. Call this the ‘standard definition’ of consistency.

But of course, given the principles Constants and Variables, $\bot$ is trivially inhabited. For as can be proved using the other rules of certain pure type systems, $(\Pi x\mathbin{:}\ast.x)\mathbin{:}\ast$ is an expression (can be derived from the empty typing context). Since $\ast$ is a sort, Constants implies that there are infinitely many constants $\kappa_{1}$, $\kappa_{2}$, and so on, such that $\kappa_{1}\mathbin{:}(\Pi x\mathbin{:}\ast.x)$, $\kappa_{2}\mathbin{:}(\Pi x\mathbin{:}\ast.x)$, and so on, are expressions. And analogously for Variables.

So my first question is: do I have that right? If principles like Constants and Variables are used in a presentation of pure type systems, will that trivially violate the standard definition of consistency?

My second question concerns the fact that, for my audience, trivially violating the standard definition of consistency isn't actually a bad thing. My audience cares more about using pure type systems to formulate logical principles that are terms with proposition type (again, for brevity, I can't explain why…it is based on a different interpretation of the Curry–Howard correspondence from the standard interpretation…this is part of what makes my presentational task difficult). Those principles need to be consistent, but just in the following sense: given a collection of terms with proposition type, and given a collection of inference rules among those terms specifically, there is no way to derive a contradiction. This other definition of consistency — call it the ‘second definition’ — is, of course, different from the standard definition given above.

So my second question is: when higher-order logical principles — i.e. terms of proposition type which invoke higher-order quantification, etc. — are formulated using the pure type systems in the $\lambda$-cube, are the resulting formal systems consistent in the second sense? For instance, are there collections of higher-order logical principles, formulated in the calculus of constructions, which (i) formalize things like “Every term, of every type, is self-identical” in a single sentence, (ii) include lots of other standard classical axioms and inference rules, and (iii) are consistent in the sense of the second definition?

$\endgroup$
1
  • $\begingroup$ You might look at Roorda's masters' thesis for a good introduction to PTS. It is linked from his paper with Jeuring: web.archive.org/web/20111002055103/http://people.cs.uu.nl/… Added: bah, it is not in archive.org, maybe there is some other way to get it. I found it worth reading. $\endgroup$
    – none
    Commented Sep 18, 2023 at 5:02

1 Answer 1

9
$\begingroup$

I think this awkwardness is coming from your “principle of constants”, which is not standard, and doesn’t seem justified by the motivation you give.

You say it’s meant to correspond to the practice (from predicate logic) of having infinitely many predicates symbols available on any sort. But this is a mismatch in two ways. On the one hand, it’s not necessary at all, and not usually assumed — in type theory, that role is usually fulfilled by variables of predicate type (of which you can always assume arbitrarily finitely many, which is usually all that’s wanted), or for the rarer occasions when you really do want infinitely many predicates at once, then you can add them as constants just of those specific types. Which brings us to the flip side of the mismatch: the “principle of constants” as you’ve given it is vastly stronger than just adding predicates on each sort, since it adds constants of every type, including (the Curry–Howard analogue of) axioms that every possible proposition holds. And given that last observation, it’s no surprise that it’s inconsistent under the standard definition — in predicate logic, adding every proposition as an axiom is also certainly inconsistent!

Your “second definition” of consistency is pretty much precisely restricting your nonstandard presentation, to bring it in line with more standard presentations. You restrict your unlimited constants to “given a collection of terms with proposition type, and given a collection of inference rules among those terms specifically…”, and then consider just what can be derived from these — but this restricted “collection” of terms/rules fits into Barendregt’s framework (or other standard presentations) as the axioms of a given PTS. So your sense of “A PTS (with unlimited constants) is consistent w.r.t the restricted collection of terms/rules $A$” corresponds exactly to Barendregt’s “The PTS with axioms given by $A$ is consistent (in the standard sense)”.

In sum, the mismatch isn’t in the definitions of consistency, it’s in how you’re mapping your definition of a PTS onto Barendregt’s; and with that mismatch fixed, your second definition of consistency is just the standard one.

(I’m assuming throughout that the Barendregt 1992 you mean is Lambda calculi with types, and I’m following his definition of a PTS in Def. 5.2.1 there.)

$\endgroup$
6
  • $\begingroup$ Thank you, this is very helpful. Two follow-ups. First: the problem which motivated my first question seems to arise even if Consistency is denied. Variables also implies that there is a variable $\nu$ such that $\nu\mathbin{:}(\Pi x\mathbin{:}\ast.\ast)$ is an expression; so $(\Pi x\mathbin{:}\ast.\ast)$ is inhabited; and so once again, the standard definition of consistency is violated. Do I have that right? $\endgroup$
    – Spaceka13
    Commented Sep 11, 2023 at 4:11
  • $\begingroup$ Second, on your second bolded point...My audience generally uses typed languages like this: first specify what the vocabulary is, along with each bit of vocabulary's grammatical category; then use that vocabulary to formulate grammatical expressions of type t which comprise a formal theory of something. It sounds like you're saying that the way this would go, in comp sci, is more `all at once': specify both the vocabulary and associated grammatical categories in a way which (implies terms of type t which?) comprises a formal theory of that same something. Is that right? $\endgroup$
    – Spaceka13
    Commented Sep 11, 2023 at 4:26
  • 1
    $\begingroup$ @Spaceka13: On your first comment — No, variables don’t give inconsistency, because use of variables is tracked by the context saying what variables you’re currently assuming — so you have $v \colon \bot \vdash v \colon \bot$, but you don’t have $\vdash v \colon \bot$ in the empty context — and the definition of inconsistency is proving $\bot$ in the empty context. The explicit use of contexts throughout is fundamental to how most type theories work — be careful not to disregard them! $\endgroup$ Commented Sep 11, 2023 at 8:13
  • $\begingroup$ Perfect, that's what I was thinking; thank you for clarifying. $\endgroup$
    – Spaceka13
    Commented Sep 11, 2023 at 8:14
  • $\begingroup$ @Spaceka13: On your second comment — This is subtle and depends a bit on the type theory. Conceptually, most type theorists I know do think of theories in a “stratified” way, with parts of the syntax introduced before others, not all-at-once. But formally, the presentation of the system isn’t stratified so straightforwardly. E.g. in predicate logic, types (if any) can be presented first, then terms (generated from atomic ones), then propositions (generated from atomic predicates), then proofs (generated from axioms). [cont’d] $\endgroup$ Commented Sep 11, 2023 at 8:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .