The standard way of doing logic in type theory uses the BHK interpretation. In particular, a proposition A is translated to a type A, and the proposition "NOT A" is translated to the type A->0. This requires the empty type. I was wondering about a somewhat different way of doing logic, which doesn't require the empty (or unit) type or an explosion principle. Namely, instead of representing a proposition A by one type, we translate it to two types PA, NA (or, if you wish, a tuple (PA,NA)). An inhabitant of PA is supposed to imply that A is true, and one of NA is supposed to imply that A is false. In the end, this seems to be enough to do propositional (and I think also predicate) calculus to me. For a start, we can still define (using non-nullary coproduct, product, dependent pair, dependent function types) any logical connectives we like:
-given A=(PA, NA) and B=(PB, NB), define A & B:==(PA x PB, NA+NB)==(PC,NC) (with == denoting judgmental equality). Then an inhabitant of PC can be constructed iff we have inhabitants of PA and PB (i.e. if we know that both A and B are true), and one of NC iff we know that one of them is false.
-similarly, for OR define A v B :==(PA + PB,NA x NB).
-NOT A :==(NA, PA).
-forall x A(x) gets translated to (\Pi_{x} PA(x), \Sum_{x} NA(x)),
-exists x A(x) to (\Sum_{x} PA(x), \Pi_{x} NA(x)).
I was interested in this for some specific reason (which I hope to discuss soon). But more generally, the reason this might be interesting from a philosophical (or maybe also technical) point of view is that it gives us more flexibility when one wants to assume that A is false. If NOT A is translated to the function type A->0, as far as I understand the only way one could add the assumption that A is false would be by setting A:==0 itself (and then using 0-recursion to construct q:0->0). In contrast, if NA could be any type, we can add the assumption that it is inhabited and still consider PA, NA as interesting objects with internal structure. This seems to be in accordance with the homotopy philosophy, where one wants to be able to say that things are "nontrivially the same" (two statements are false) but not "trivially the same" (two statements are judgmentally equal to the empty type).
I am sure that such an approach must have appeared in the literature somewhere, in some form, already - but I didn't find anything on Google. I also didn't get an answer when posting something similar on
tcs.sx. Could someone give me a pointer?
Thinking about it, I claim the following (I'll go into more details/try to produce Coq if there is interest and noone quickly points me to a paper that discusses this):
1. In this formalization, the asymmetry between LEM and absurdity which is present in the full BHK interpretation would be reduced. In BHK, "forall P (P v NOT P)" is nontrivial and can't be derived from 1. The categorically opposite statement about absurdity, "exists P (P ^ NOT P)", is trivially wrong, i.e. can be used to derive 0. In the formalization above, LEM and ABS can't be derived from nothing resp. be used to derive anything, and constructions involving them are roughly related to each other by reversing the arrows (and exchanging products with coproducts). For example:
Denote by LEM(A)==LEM((PA,NA)) the type PA + NA, and by ABS(A)==ABS((PA,NA)) the type PA x NA. Then whenever we have defined a new type C==(PC,NC) by a Boolean expression from A and B as A ^ B, A v B, or NOT A as above, (I claim that) we can use the recursors of +,x to define a function l_C:(LEM(A) x LEM(B))->LEM(C) resp. l_C:LEM(A)->LEM(C). In words, if we know that LEM holds for A and B, we can conclude that it must hold for C as well. We can also define "categorically opposite" functions r_C:ABS(C)->(ABS(A)+ABS(B)) resp. r_C:ABS(C)->ABS(A), i.e. if the constructed proposition is absurd, then one of the propositions used in the construction must already have been absurd.
For quantification (which, I have to point out, I checked less thoroughly, as I was mainly interested in the PK proof system), the situation seems to be less symmetric: Deriving absurdity still works easily; we can e.g. construct
r_C: ((\Pi_{x} PA(x)) x (\Sum_{x} NA(x)) -> (\Sum_{x} (PA(x) x NA(x))),
but I don't see how one could directly define a function
l_C: (\Pi_{x} (PA(x) + NA(x))) -> (\Pi_{x} PA(x)) + (\Sum_{x} NA(x)).
But nevertheless, I think it's possible to construct such an l_C "along the way" when we are constructing the dependent types PA: P->U and NA: P->U from more elementary types using +, x (i.e. when we are defining PA and NA using + and x-recursion, or possibly recursion over other types such as an integer type).
1.5 By concatenating the functions l and r above, we can efficiently construct l_P: LEM(A_1)xLEM(A_2)xLEM(A_3)x...->LEM(P) whenever we build a Boolean expression P out of some atomic type tuples A_1,A_2,A_3,... Conversely, an absurdity in P can be converted to an absurdity of one of the atomic type tuples.
2. We can efficiently convert an arbitrary PK sequent calculus proof (without a symbol representing absurdity) into type theory in this interpretation. I think this also works for LK proofs, but I didn't check it carefully enough so far to claim anything. This works as follows:
-For each atomic proposition A_i appearing in the proof (of which there will be finitely many), we assume a tuple of types A_i==(PA_i,NA_i):U x U (equivalently, all objects constructed are dependent functions taking A_i as input).
We also define the types LEM_0:==LEM(A_0)xLEM(A_1)x..., ABS_0:==ABS(A_0)+ABS(A_1)+..., expressing LEM resp. absurdity for the atomic propositions.
-Any Boolean expression P appearing in the proof is translated to a constructed type as in 1. While performing these constructions, we construct the LEM/ABS functions l_B:LEM_0->LEM(B), r_B:ABS(B)->ABS_0 along the way as in 1.5.
-A sequent of the form A_1,A_2,... |- B_1,B_2,... gets translated to a function (LEM_0 x PA_1 x PA_2 x ...) -> (PB_1 + PB_2 + ... + ABS_0). In words, we take LEM (over the atomic propositions) as additional required assumption, and add an absurdity in one of the atomic propositions as additional possible conclusion.
Then for each admissible deduction of sequents, one can write down a corresponding well-typed construction in type theory. The non-intuitionistic rules (NOT-introduction) will use the LEM_0 assumption (when NOT is introduced on the right side) or consider ABS_0 as a possible conclusion (when NOT is introduced on the left side), using the constructed l_B rest. r_B functions for the expression B that changes the side of the sequent.
I finally have the following question that I couldn't answer: A deduction of a Boolean tautology in PK, i.e. a sequent of the form |- B, would correspond to construction of a function f:LEM_0->A+ABS_0. If B is a tautology, it will actually be possible to construct a function f':LEM->B by "brute force" (i.e. case distinction over all possible inhabitants of LEM, which can be interpreted as a case distinction over all possible assignments of truth values to the atomic propositions). But this generally requires an exponential number of steps in the number of atomic propositions. Is there an efficient way to translate any PK proof |-A into a construction f:LEM_0->A? I found one way which works for all rules except cuts, but because cut elimination can introduce an exponential overhead, this is not enough.