5

In axiomatic propositional calculus the following axiom schema captures constructive dilemma: $\newcommand{\lif}{\supset} \renewcommand{\land}{\&}$

\begin{equation} (a \lif c) \lif ((b \lif c) \lif ((a \lor b) \lif c)) \tag{1} \end{equation}

In a bicartesian closed category representing a logic, disjunctions are coproducts, and this simple form of the constructive dilemma is captured by the coproduct arrow, such that given arrows $f\colon A \to C$ and $g\colon B \to C$, there is a unique arrow $[f,g]\colon A \lor B \to C$. Now, since $(1)$ is a theorem of the propositional calculus, we expect there to be an arrow of the following form in the bicartesian closed category:

\begin{equation} \top \to (a \lif c) \lif ((b \lif c) \lif ((a \lor b) \lif c)) \tag{2} \end{equation}

I've got a derivation of this arrow, but it seems much more complicated than it needs to be. In fact, of all the axioms in one of the axiom systems shown on Wikipedia, this is the most complicated to derive an arrow for. I'm wondering if this can be simplified in some way that I'm missing. Here's the derivation that I've got. We start with:

$$ A \land ((A \lif C) \land (B\lif C)) \xrightarrow{\langle{\pi\pi',\pi\rangle}} (A\lif C)\land A \xrightarrow{\mathrm{eval}} C $$

Currying this, we get

$$ A \xrightarrow{\lambda(\mathrm{eval}\langle{\pi\pi',\pi\rangle})} ((A \lif C) \land (B\lif C)) \lif C \tag{3} $$

Similarly for $B$:

$$ B \land ((A \lif C) \land (B\lif C)) \xrightarrow{\langle{\pi'\pi',\pi\rangle}} (B \lif C)\land B \xrightarrow{\mathrm{eval}} C $$

Currying this, we get

$$ B \xrightarrow{\lambda(\mathrm{eval}\langle{\pi'\pi',\pi\rangle})} ((A \lif C) \land (B\lif C)) \lif C \tag{4} $$

With $(3)$ and $(4)$ we can get a coproduct arrow:

$$ A \lor B \xrightarrow{[(3),(4)]} ((A \lif C) \land (B\lif C)) \lif C \tag{5} $$

To bring $\top$ into the picture, we can compose $(5)$ with a projection:

$$ \top \land (A \lor B) \xrightarrow{(5)\pi'} ((A \lif C) \land (B\lif C)) \lif C \tag{6} $$

Now, since this is a (bi)cartesian closed category, we can uncurry $(6)$ to get:

$$ (\top \land (A \lor B)) \land ((A \lif C) \land (B\lif C)) \xrightarrow{\lambda^{-1}((5)\pi')} C \tag{7} $$

Now, products are commutative, so it's not hard to get

\begin{multline} ((\top \land (A \lif C)) \land (B\lif C)) \land (A \lor B) \to \\ (\top \land (A \lor B)) \land ((A \lif C) \land (B\lif C)) \tag{8} \end{multline}

which through composition gives us:

$$ ((\top \land (A \lif C)) \land (B\lif C)) \land (A \lor B) \xrightarrow{(\lambda^{-1}((5)\pi'))(8)} C \tag{9} $$

We can curry $(9)$ three times to get the desired theorem arrow:

\begin{equation} \top \xrightarrow{\lambda\lambda\lambda(9)} (a \lif c) \lif ((b \lif c) \lif ((a \lor b) \lif c)) \tag{10} \end{equation}

Phew! This all seems rather convoluted, given how trivial some of the theorem arrows are to derive. E.g., the projects and injections are trivial:

\begin{gather*} \lambda\pi\colon \top \to (p \land q) \lif p \qquad \lambda\pi'\colon \top \to (p \land q) \lif q \\ \lambda\iota\colon \top \to p \lif (p \lor q) \qquad \lambda\iota'\colon \top \to q \lif (p \lor q) \end{gather*}

Some of the arrows for the other connectives are a bit trickier, but this one is by far the most complicated, and I wonder if I've missed some easier way to do this. Is there some more canonical, simpler way?

This is a pretty simple proof in natural deduction systems, along the lines of:

  • 1. Assume $a \lif c$.
    • 2. Assume $b \lif c$.
      • 3. Assume $a \lor b$.
      • 4. $c$ by $\lor$-elimination with 1, 2, 3.
      • 5. $(a\lor b) \lif c$ by $\lif$-introduction 3–4.
    • 6. $(b\lif c) \lif ((a \lor b) \lif c)$ by $\lif$ introduction 2–5.
  • 7. $(a\lif c) \lif ((b\lif c) \lif ((a \lor b) \lif c))$ by $\lif$ introduction 1–6.

The difficulty in the categorical treatment seems that there's no way to do $\lor$-elimination (i.e., to construct a coproduct arrow) in a context where there are other assumptions. So the arrow derivation I've given above actually makes the $\lor$-elimination one of the last steps, analogous to:

  • Assume $a$
    • Assume $a \lif c$
      • Assume $b \lif c$
        • $c$ by modus ponens
  • $\vdots$
  • $a \lif ((a \lif c) \lif ((b \lif c) \lif c))$ by …
  • $\vdots$ (similarly for $b$)
  • $b \lif ((a \lif c) \lif ((b \lif c) \lif c))$ by …
  • Assume $a \lor b$
    • $((a \lif c) \lif ((b \lif c) \lif c))$ by $\lor$-elimination
  • $(a \lor b) \lif ((a \lif c) \lif ((b \lif c) \lif c))$ yb $\lif$-introduction
  • $\vdots$ rearranging antecedents
  • $(a \lif c) \lif ((b \lif c) \lif ((a \lor b) \lif c))$
Willie Wong
  • 73,139
Joshua Taylor
  • 2,481
  • 16
  • 35
  • I don't know category theory. But I do have to wonder if it's easier to prove that ⊤→(a⊃c)→((b⊃c)⊃(((a⊃b)⊃b)⊃c)) than the formula you gave (or the "OR-3" formula of wikipedia). Also, do "→" and "⊃" differ here? – Doug Spoonwood Jun 30 '14 at 03:20
  • @DougSpoonwood Yes, $\to$ and $\supset$ are different. I'm using $\to$ to designate arrows, and $\supset$ to designate conditionals. A category has arrows, each of which has one source/domain and one target/codomain, so I'm afraid that "⊤→(a⊃c)→((b⊃c)⊃(((a⊃b)⊃b)⊃c))" isn't really intelligible here. That said, it did make me look at my question again and notice some nasty typos in the first two formulae (now fixed). – Joshua Taylor Jun 30 '14 at 03:56
  • @DougSpoonwood The short version of category theory as it relates here is that a category is a mathematical structure with objects and arrows. A logic can be a category when we take its formulae as objects and its proofs as arrows (where an arrow $f\colon A \to B$ is a proof of $B$ from $A$). E.g., $\pi\colon A & B \to A$ and $\pi' \colon A & B \to B$ are the canonical proofs of $A$ and $B$ from $A & B$. For each proof $f\colon A & B \to C$, there's a proof $\lambda f\colon A \to B \supset C$. I'm trying to find out whether there's a simpler proof of OR-3 than the one I've found. – Joshua Taylor Jun 30 '14 at 04:03
  • @DougSpoonwood Some of the claims in the previous comment (e.g., for each $f$ there's a $\lambda f$) actually depend on the particular structure that the category has (in this case, that the category is cartesian closed (which is implied by it being bicartesian closed)). So take them as true for this question, but not as general principles. – Joshua Taylor Jun 30 '14 at 04:05
  • It seems to me that "currying" corresponds to the use of "exportation"... in Polish notation CCKpqrCpCqr, and "uncurrying" corresponds to the use of "importation" CCpCqrCKpqr. Anyways, rephrasing my question, I have to wonder if it's easier to prove that [⊤→((a⊃c)⊃((b⊃c)⊃(((a⊃b)⊃b)⊃c)))]? Correspondingly a disjunction (a V b) would get defined as ((a⊃b)⊃b). I can't say I understand your difficulty here since you've linked proofs and arrows so closely. If (a⊃c)⊃((b⊃c)⊃((a∨b)⊃c)) is a theorem of a propositional calculus, then by schema THEN-1 we can infer... – Doug Spoonwood Jun 30 '14 at 04:42
  • $\vdash$$\phi$⊃(a⊃c)⊃((b⊃c)⊃((a∨b)⊃c)), where $\phi$ is any proposition including ⊤. Since we have the rule of detachment, it follows that ⊤ $\vdash$ (a⊃c)⊃((b⊃c)⊃((a∨b)⊃c)). In words this can get read as "⊤ proves (a⊃c)⊃((b⊃c)⊃((a∨b)⊃c))". So, if a proof is an arrow, then it would seem to me that you have your arrow here immediately. I probably don't understand what you're doing here quite right. – Doug Spoonwood Jun 30 '14 at 04:50
  • @Doug To be honest, I think you'll need to absorb a bit more category theory before approaching this question. The proofs of the formula are pretty simple. That's why I'm so surprised that it seems so hard to get a relatively simple arrow here. It doesn't help if another arrow is easier to derive; the context here is that I'm trying to demonstrate a mapping from a category capturing the axiomatic propositional calculus to a bicartesian closed category. I need to show that there's an arrow $\top \to (a \lif c) \lif ((b \lif c) \lif ((a \lor b) \lif c))$. That part's not an option. – Joshua Taylor Jun 30 '14 at 13:09
  • @Doug I've updated the question with the corresponding nice natural deduction proof and the natural deduction proof (sketch) that corresponds to the arrow that I'm actually able to derive. But, as I say, deriving a different formula isn't an option. The question here is whether there's a simpler derivation of the arrow that I need. – Joshua Taylor Jun 30 '14 at 13:26
  • What are the rules you can use for this problem? Do you have any axioms for the system? How do you know that each step, including the first one, qualifies as valid? Stating them might help to find a shorter proof, or to know that a proof greater (or less than) to a certain length doesn't exist. – Doug Spoonwood Jul 01 '14 at 02:00
  • 1
    @DougSpoonwood The only arrows that there are to work with are those that are specified by a bicartesian closed category. Have a look at an excellent overview: Bicartesian closed categories and logic. – Joshua Taylor Jul 01 '14 at 02:15
  • Do you know of anyway that you might code everything here into a theorem prover and search for a shorter proof via the theorem prover? – Doug Spoonwood Jul 08 '14 at 17:21
  • @DougSpoonwood That's actually a pretty interesting approach. I've got a simple encoding in Prover9 at the moment, and while I can derive some "smaller" arrows, I'm not having all that much luck with one as complex as this one. – Joshua Taylor Jul 08 '14 at 21:21
  • Could I see what your input file here looks like? Maybe you could put it up as part of your answer... or if you prefer my e-mail is [email protected] – Doug Spoonwood Jul 09 '14 at 02:16

3 Answers3

2

$\newcommand{\lif}{\supset} \renewcommand{\land}{\&}$After chugging away on this for a while, I do think that the difficulty comes in keeping any “in-scope assumptions” available in each of the cases. The proof I outlined in the question does this by making the codomain of the coproduct arrow an exponential. That is, in trying to show $C$ from the assumptions $A \lor B$, $A \lif C$, and $B \lif C$, I ended up deriving arrows of the form

\begin{gather} f\colon A \to ((A \lif C) \land (B \lif C)) \lif C \\ g\colon B \to ((A \lif C) \land (B \lif C)) \lif C \end{gather}

in order to get a coproduct arrow

$$ [f,g]\colon A \lor B \to ((A \lif C) \land (B \lif C)) \lif C $$

It seems like the an (the?) alternative to this is to embed the assumptions in each of the alternatives. That is, getting $f$ and $g$ like:

\begin{gather} f\colon A \land (A \lif C) \land (B \lif C) \to C \\ g\colon B \land (A \lif C) \land (B \lif C) \to C \\ \end{gather}

to get a coproduct arrow:

$$ [f,g]\colon (A \land (A \lif C) \land (B \lif C)) \lor (B \land (A \lif C) \land (B \lif C)) \to C $$

The disjunction has much more complicated disjuncts, but it's not all that hard to derive the arrow that distributes conjunction over disjunction. (In fact, I asked a question about this about a year ago, probably when working on a similar problem, distribution of categorical product (conjunction) over coproduct (disjunction).)

\begin{multline} \top \land (A \lif C) \land (B \lif C) \land (A \lor B) \to \\ (A \land (A \lif C) \land (B \lif C)) \lor (B \land (A \lif C) \land (B \lif C)) \tag{11} \end{multline}

and with composition we get:

$$\top \land (A \lif C) \land (B \lif C) \land (A \lor B) \to C$$

Currying twice, we get

$$\top \to (A \lif C) \lif ((B \lif C) \lif ((A\lor B) \lif C))$$

I'm not sure whether this is simpler or not, especially since it does some hand waving with regard to $(11)$. It does avoid the need for "uncurrying" from the most interesting parts of the proof, which I find appealing, though there's still one case of it in the justification of $(11)$.

Joshua Taylor
  • 2,481
  • 16
  • 35
  • I think I like this one better than the one in the question, but it still seems a bit more complicated than I'd like, so I'm going to hold off on accepting it for the time being; hopefully someone else will find a better solution. – Joshua Taylor Jun 30 '14 at 18:42
0

You can prove it in Sequent Calculus as described in the pdf mentioned in the comments (http://zll22.user.srcf.net/talks/2011-12-01-CategoricalLogic.pdf )

1  A                     |- A                               Identity
2  B                     |- B                               Identity
3  C                     |- C                               Identity
4  A, A -> C             |- C                               1,3 Modus ponens
5  B, B -> C             |- C                               2,3 Modus ponens
6  A v B, A -> C, B -> C |- C                               4,5 Disjunction elimination
7  A -> C, B -> C, A v B |- C                               6 reshuffeling antecedents
8  A -> C, B -> C,       |- (A v B) -> C                    7 Conditional proof
9  A -> C                |- (B->C)->((A v B) -> C)          8 Conditional proof
10                       |- (A->C)->((B->C)->((A v B)->C))  9 Conditional Proof 

So if you can replace every line with its categorical equivalent you are done :)

(Ps line 3 is used twice, and i do take some liberties with the structural rules , but these rules aren't mentioned in the pdf)

Good luck

ADDED later:

I made a maybe a better proof:

1  A                     |- A                               Identity
2  B                     |- B                               Identity
3  C                     |- C                               Identity
4  A, A -> C             |- C                               1,3 Modus ponens
5  A                     |- (A -> C) -> C                   4  Conditional proof
6  A, B -> C             |- (A -> C) -> C                   5  weakening
7  A                     |- (B -> C) -> ((A -> C) -> C)     6  Conditional proof  
8  B, B -> C             |- C                               2,3 Modus ponens
9  B, B -> C, A -> C     |- C                               8  weakening
10 B, B -> C             |- (A -> C) -> C                   9  Conditional proof
11 B                     |- (B -> C) -> ((A -> C) -> C)     10 Conditional proof
12 A v B                 |- (B -> C) -> ((A -> C) -> C)     7,11 Disjunction elimination
13 B -> C                |- B -> C                          Identity
14 A v B, B -> C         |- (A -> C) -> C                   12,13 Modus ponens
15 A -> C                |- A -> C                          Identity
16 A v B, B -> C, A -> C |- C                               14,15 Modus ponens
17 A -> C, B -> C, A v B |- C                               16 reshuffeling antecedents
18 A -> C, B -> C        |- (A v B) -> C                    17 Conditional proof
19 A -> C                |- (B->C)->((A v B) -> C)          18 Conditional proof
20                       |- (A->C)->((B->C)->((A v B)->C))  19 Conditional Proof 

Not sure if the rule of weakening (line 6 and 9) is allowed again this is a structural rule.

Ps if you refer to this proof refer to it as proof 2

Willemien
  • 6,582
  • Thank you for your input, although I'm afraid it doesn't help me all that much here. As I've mentioned, part of the problem I'm having is that this is a pretty simple natural deduction proof, but that the categorical construction is elusive. Lines 1–5 all have direct categorical equivalents. The disjunction elimination rule, though, is that "Given arrows $f\colon A \to C$ and $g\colon B \to C$, there is an arrow $[f,g]\colon A \lor B \to C$. The domains of the "cases" have to be the disjuncts exactly. That means that getting from 4 and 5 to 6 is much harder. From 4 and 5, what you get… – Joshua Taylor Jul 07 '14 at 11:35
  • …would be $(A\land(A\lif C))\lor (B\land(B\lif C)) \to C$. That doesn't end up being all that helpful, though, because conditional introduction (which works in both directions) has the form "Given $f\colon A \land B \to C$, there is an arrow $\lambda f\colon A \to B \lif C$." There's nothing in this case to apply it to, unfortunately. Each arrow is a "complete" proof that doesn't depend on any other assumptions; I think that means that we will always have either to use either $A \lor B \to ((A\lif C)\land(B\lif C))\lif C)$, where the conditionals are "baked into the codomain" or… – Joshua Taylor Jul 07 '14 at 11:47
  • $(A\land(A \lif C)\land(B\lif C))\lor(B\land(A\lif C)\land(B\lif C)) \to C$, where the conditionals are "baked into the domain". – Joshua Taylor Jul 07 '14 at 11:49
  • I did have a look at intuitionistic logic , looking how they deduce it, but in intuitionistic logic it (or an quite similar formula) is an axiom, also I was wondering is the problem really in getting from 4 and 5 to 6, (which is a rule as the pdf says that "+ is precisely the logical connective $\lor$" ,rephrased see chaper 4) Is the problem not in getting from 6 to 7? , also had a browse about catagory theory, but could not find a clear exposition on the coproduct (+) rules or axioms – Willemien Jul 07 '14 at 11:57
  • 6 to 7 is pretty easy actually. There's an arrow $\langle\langle\pi'\pi,\pi'\rangle,\pi\pi\rangle\colon (X\land Y)\land Z \to (Y\land Z)\land X$. – Joshua Taylor Jul 07 '14 at 15:14
  • Getting from 4 and 5 to 6 is the hard part, because arrows in the category are complete proofs, and the inference rules/arrow schemata are based on arrows. 4 is basically an arrow $f\colon A \land (A \lif C) \to C$, and 5 is an arrow $g\colon B \land (B \lif C)$, and the categorical version of disjunction elimination (a coproduct arrow) just gives us $[f,g]\colon (A \land (A \lif C)) \lor (B \land (B\lif C)) \to C$, which isn't all that helpful here. – Joshua Taylor Jul 07 '14 at 15:19
  • can you give a good link with info over coproducts? – Willemien Jul 07 '14 at 19:56
  • Well, page 3 of the PDF link I provided (http://zll22.user.srcf.net/talks/2011-12-01-CategoricalLogic.pdf) gives a definition of coproducts. There's Wikipedia article on coproducts, as well. There's a Wikiversity entry, Introduction to Category Theory/Products and Coproducts that may or may not help (it's a bit sketchy),… – Joshua Taylor Jul 07 '14 at 20:06
  • added a new proof maybe this helps :) – Willemien Jul 07 '14 at 20:26
  • The new proof is much closer to the category theory construction, but I think it's pretty much what I did in the original question already, isn't it? (See my answer for some more discussion.) You show that $(B \lif C) \lif ((A \lif C) \lif C)$ follows from both $A$ and $B$, and thus that it follows from $A \lor B$, whereas I showed that $((B \lif C) \land (A \lif C)) \lif C$ follows from both $A$ and $B$, and thus from $A \lor C$. It's pretty much the same. So it's certainly accurate, but I'm not clear that it's a simplification. – Joshua Taylor Jul 07 '14 at 20:41
  • you will have problems getting rid of the $\land$ 's my proof can just use identity and modus ponens, you also need conjunction elimination and introductions, i prefer no unnneeded connectives – Willemien Jul 07 '14 at 20:53
  • No, it doesn't end up much simpler, because we need that $A \lor B$ in the inner most conditional, and that means uncurrying the right hand side of $A\lor B\to(A\lif C)\lif((B\lif C)\lif C)$ to get $((A\lor B)\land(A\lif C))\land(B\lif C) \to C$, and then shuffling all the conjunctions on the left hand side and re-currying the result. I think this ends up being a little bit more complex because of the multiple uncurryings. – Joshua Taylor Jul 07 '14 at 21:26
  • sorry, I am not familiar with catagory logic (And i only know curry as something hot to eat) hoped i could help a bit at least you now have the proof in proper sequent calculus, when are uncurryings needed? is ith with modus ponens or with conditional proof , but i am wondering if it can be done more efficient. – Willemien Jul 09 '14 at 08:55
-1

I'll put up a resolution proof here. It probably doesn't help.

assumption 1 ANac
assumption 2 ANbc
assumption 3 Aab
R 1, 3     4 Abc
R 2, 4     5 c
  • It doesn't help; there's no question about how to prove the result; there's a question about a shorter proof in what's essentially a specific proof system (the categorical presentation). By the time a problem is clausified, almost all of the structural issues (commutativity) have been wiped away. The question is essentially, what's the easiest way to prove $(A \lif C) \lif ((B\lif C)\lif ((A\lor B)\lif C)))$ in a natural deduction system where constructive dilemma/disjunction elimination can't be used within the scope of assumptions. This doesn't (attempt to) help with that. – Joshua Taylor Jul 14 '14 at 15:25
  • Thank you for the attention (and the suggestion to encode the categorical structure and use an automated reasoner was helpful, though hasn't found a solution yet), but -1 as "This answer is not useful" and that's explicitly acknowledged in the answer. – Joshua Taylor Jul 14 '14 at 15:27
  • @JoshuaTaylor How did you encode the assumptions of category theory into the automated reasoner? Did you use any hints or weight any formulas? Did you have any resonators or weight any subformulas? Did you have any demodulators? What rule(s) of inference did you let the automated reasoner use? – Doug Spoonwood Jul 14 '14 at 16:26
  • 1
    Here's a gist of the latest Prover9 input, proof.in. It's just configured with set(auto) at the moment. I tried some various term weightings, but that's really sort of black magic to me, especially when the proofs I've found by hand require so much currying and uncurrying. The comments have some notes about some lemmas that can help, and the sometimes utility of having uncurry as a function. If you can get any better results from this than I can, that'd almost certainly be a helpful result. – Joshua Taylor Jul 14 '14 at 16:44
  • @JoshuaTaylor You've used "arrow" as a trinary predicate. I don't know if that's better or worse than using arrow as a binary predicate and including a product function more often. Also, when I ran Prover9 it used UR resolution. I don't know if linked UR resolution would work better or not. – Doug Spoonwood Jul 14 '14 at 17:58
  • How would you use it as a binary predicate? Each arrow has a source/domain, target/codomain, and a label. arrow(x,y,z) says "there's an arrow from x to y with label z". I also experimented with treating arrows as objects (with domain and codomain) functions, e.g., codomain(product(f,g)) = and(codomain(f),codomain(g)), but had less luck in that approach. Some good term weighting might make an equational approach better, though. Did you have any luck in that route? – Joshua Taylor Jul 14 '14 at 18:07
  • @JoshuaTaylor Have you tried weighting each/some of the steps of your original proof at a low number like 0? I didn't realize that arrows had a label. – Doug Spoonwood Jul 14 '14 at 18:23
  • I haven't tried all that much at all, to be honest. The rest of the answers I was getting from Prover9 were exactly the ones I'd generate by hand. After a while of wrestling with this, after I'd already got a mostly satisfactory result by hand, it didn't seem likely that I was going to get a much better answer from the prover. – Joshua Taylor Jul 14 '14 at 18:26
  • @JoshuaTaylor Sorry, I haven't done much with term-weighting. I thought I might use the steps of your original proof as weight templates, but I'm not sure exactly what they are. Also, if we already have a proof with steps (a$_1$, ..., a$_n$), then one method of finding a shorter proof that I read in Larry Wos's notebooks consists in doing n runs. The first run has all of the steps (a$_2$, ..., a$_n$) weighted low (a$_1$ might need weighted high), the second run has (a$_1$, a$_3$, ..., a$_n$) weighted low, the third run has (a$_1$, a$_2$, a$_4$, ..., a$_n$) weighted low and so on. – Doug Spoonwood Jul 20 '14 at 23:09