0

Based on intuitionistic number theory as defined in https://plato.stanford.edu/entries/logic-intuitionistic/#IntNumTheHeyAri, I'm trying to prove that if $x < 1 \Rightarrow x = 0$ (with $1 = S(0)$ being the successor of $0$).

By the definition of comparison, I get $\exists z: (S(z) + x = S(0))$, which allows me to easily prove that $\neg\neg(x = 0)$ using the characterization of $0$ as the least natural number. But I can't seem to find a proof for the positive form of the conclusion.

Since it cannot be proven by contradiction, I assume I would have construct a proof of being equal to $0$ for any number that fits.

Any ideas?

ternary
  • 371

2 Answers2

0

One way you could go about it is to prove that addition is commutative. (Hint: Show that $0+y=y$ for all $y$ by induction, so that $0+y=y+0$ for all $y.$ Then, suppose that there is some $x$ such that $x+y=y+x$ for all $y,$ and show that $S(x)+y=y+S(x)$ for all $y.$ Conclude by induction.)

Next, you could show that the relation given by $$x\le y\iff\exists z:(z+x=y)$$ is antisymmetric using the comparative law $$\forall x\forall y,(x<y\vee x=y\vee y<x).$$ Then by commutativity, you have $$x+S(z)=S(0),$$ so that $$S(x+z)=S(0)$$ by the recursive definition, so that $$x+z=0$$ by one-to-one, so $$z+x=0$$ by commutativity, and so $$x\le 0,$$ and since $$0\le x$$ is readily provable, then antisymmetry of $\le$ gives $$x=0.$$


Added: I'm not sure whether we can prove antisymmetry of $\le$ without the Law of the Excluded Middle, but at any rate, there's another way we can go.

First, I will prove a logical form that holds in constructive logic. I will use Modus Ponens and the axioms $$\neg A\to(A\to B)\tag{1}$$ and $$(A\to C)\to\Bigl((B\to C)\to\bigl((A\vee B)\to C\bigr)\Bigr)\tag{2}$$ from section 2.1 of the link you posted, together with the result $$A\to A\tag{3}$$ from section 2.2.

Lemma $1$: $\bigl((A\vee B)\wedge\neg B)\to A$

Proof:

  • Assume $A\vee B$ and assume $\neg B.$

  • By $(3),$ we have $$A\to A.$$

  • By $(1),$ we have $$\neg B\to(B\to A),$$ so since $\neg B,$ then by Modus Ponens, we have $$B\to A.$$

  • By $(2),$ we have $$(A\to A)\to\Bigl((B\to A)\to\bigl((A\vee B)\to A\bigr)\Bigr),$$ so since $A\to A,$ then by Modus Ponens, we have $$(B\to A)\to\bigl((A\vee B)\to A\bigr),$$ so since $B\to A,$ then by Modus Ponens, we have $$(A\vee B)\to A,$$ so since we have $A\vee B,$ then by Modus Ponens, we have $A.$ $\Box$

Next, consider the following statement of Heyting Arithmetic:

$$A(z):=(z=0)\vee\Bigl(\exists y:\bigl(S(y)=z\bigr)\Bigr).$$

Lemma $2$: $\forall z,A(z)$

Proof: Clearly, $A(0).$

Given any $z,$ it is also clear that $A\bigl(S(z)\bigr).$ Thus, by the axiom $$A\to(B\to A),$$ we see that $$A(z)\to A\bigl(S(z)\bigr).$$ We conclude by induction. $\Box$

Finally, we conclude the desired result.

Claim: $(x<1)\to(x=0).$

Proof:

  • Assume that $x<1,$ meaning that the following (equivalent) conditions hold: $$\exists z:S(z)+x=1\\\exists z:S(z)+x=S(0)\\\exists z:x+S(z)=S(0)\\\exists z:S(x+z)=S(0)\\\exists z:x+z=0$$

  • Applying Lemma $2$, we conclude that the following equivalent conditions hold: $$(x+0=0)\vee\Bigl(\exists y:\bigl(x+S(y)=0\bigr)\Bigr)\\(x=0)\vee\Bigl(\exists y:\bigl(x+S(y)=0\bigr)\Bigr)\\(x=0)\vee\Bigl(\exists y:\bigl(S(x+y)=0\bigr)\Bigr).$$

  • Since $\neg\bigl(S(x)=0\bigr),$ then $\neg\Bigl(\exists y:\bigl(S(x+y)=0\bigr)\Bigr),$ and so by Lemma $1$, we conclude that $x=0.$ $\Box$

Cameron Buie
  • 102,994
  • This looks good, but I haven't yet had success proving the antisymmetry of $\leq$ constructively. I tried to do a case analysis using the comparative law, but then I end up only being able to do a (non-constructive) proof by contradiction for the inequal cases. – ternary May 07 '19 at 10:47
  • Drat! You're right. I'll have to think on whether there's a way around that. – Cameron Buie May 07 '19 at 11:14
  • Still thinking on it, and now I have to get ready for work, but I've had an idea that might be worth exploring. From the least element axiom, we see that $\neg\bigl(S(0)=0\bigr).$ I wonder if one can demonstrate by induction that $\forall x\neg\bigl(S(x)=x\bigr).$ If so, there are a few ways I might try to proceed from there. I'll keep thinking on it! – Cameron Buie May 07 '19 at 12:17
  • I (think I) found a way around it! Let me know if you have any other doubts/questions about what I've put here. – Cameron Buie May 08 '19 at 02:15
  • @CameronBuie All of the standard relational operators are decidable and you can prove the full trichotomy law. The naturals aren't particularly weird constructively. One way to have intuit this is that if you can write a program to decide something, then it's probably constructively valid. – Derek Elkins left SE May 08 '19 at 03:39
  • @CameronBuie: $\forall x \neg (S(x) = x)$ can be proven by induction using the least element axiom for the induction start, and the axiom characterizing the successor function as one-to-one in the induction step. But I don't see yet how it gets us farther than before since it seems to be only yet another lemma that allows to prove contradictions. But see my other comment. – ternary May 08 '19 at 10:28
  • @CameronBuie: If we accept $\neg A \Rightarrow (A \Rightarrow B)$, then I think it is indeed possible to prove the antisymmetry of $\leq$ using the case analysis from the comparative law. And as far as I see now, it is indeed commonly accepted by constructivists, not being the same as a proof by contradiction since the contradiction is proven for the antecedent of the implication, not for the conclusion. So your initial answer was probably right, although I didn't see it then. My apologies for the confusion, although I found thinking it all through pretty enlightening. – ternary May 08 '19 at 10:29
  • @ternary: You're right. We can prove antisymmetry in that same way. As for the confusion, no worries! It gave me an excuse to get to know constructive logic better, and to gain a new appreciation for it. :-) – Cameron Buie May 08 '19 at 11:52
0

You can trivially prove $\forall n.n=0\lor\exists m.n=S(m)$ with induction.

You then want to prove that $(\exists n.S(n)+x=S(0))\to x=0$. Equivalently, $\forall n. S(n)+x=S(0)\to x=0$. We do a case analysis on the above lemma instantiated to $x$ to get either $x=0$, in which case we're done, or $\forall n.S(n)+S(m)=S(0)\to S(m)=0$. By definition of addition, the premise is equivalent to $S(S(n)+m)=S(0)$ and, by injectivity and extensionality of $S$, this is equivalent to $S(n)+m=0$. (The remainder of this is essentially a proof that $\forall n.n\not<0$.) We can apply our lemma again to $m$ to get either $m=0$ producing $S(n)=0$ (via the definition of addition) which is a contradiction with $0$ being the least natural, or we get $S(n)+S(m')=0$ where we again use the definition of addition to get $S(S(n)+m')=0$ which is also a contradiction for the same reason, and we're done.

  • By using contradiction, I'm also able to prove it, but the proof by contradiction isn't valid in constructive math. – ternary May 07 '19 at 10:44
  • @ternary There is no use of proof by contradiction in the proof I listed. There is a use of the principle of explosion though which is constructively valid. You have a very common confusion that any use of the word "contradiction" means a proof by contradiction is happening. See http://math.andrej.com/2010/03/29/proof-of-negation-and-proof-by-contradiction/ for a fairly detailed explanation of the difference. – Derek Elkins left SE May 07 '19 at 17:01
  • I actually didn't object about the word "contradiction", but about the fact that contradiction of the antecedent was used to prove the conclusion ($(A \Rightarrow \bot) \Rightarrow (A \Rightarrow B)$). I see that there is indeed an important difference between this (principle of explosion) and doing a proof by contradiction. So you might be right. Still, I am not sure about this because it somehow mismatched my intuition. I was under the impression that a constructive proof of an implication $A \Rightarrow B$ should be possible to be regarded as a mechanism that transforms a... – ternary May 08 '19 at 10:26
  • ...proof of $A$ to a proof of $B$. Which I don't see when all that is done is to prove $\bot$ from $A$, but no positive result gets proven for the particular case. I guess that I should accept your answer since it seems to be formally correct to me, but I have to rethink whether the constructive approach to logic and math actually does what I expect it to do. – ternary May 08 '19 at 10:27
  • @ternary I'd recommend working in a constructive type theory such as Agda to get a feel for how this actually plays out. The idea behind the principle of explosion is that since you can't produce a value of type $\bot$, a function $\bot\to B$ is fine since you can't call it on its bluff. In the BHK interpretation this corresponds to the fact that there is a function from the empty set to any set (or more generally an arrow from the initial object to any object). To that end, proving $A\to\bot$ means there are no values of $A$. A more computational interpretation is that explosion corresponds.. – Derek Elkins left SE May 08 '19 at 17:37
  • ... to a procedure that terminates the program like a kernel panic. It's safe to say it returns anything because it never returns. It being executed also means something has gone horribly wrong. The use of explosion is to handle impossible cases in a case analysis. A paraconsistent logic is one that doesn't have the principle of explosion. Minimal logic is an example of a constructive, paraconsistent logic. It effectively just doesn't have negation. To this end, if you ever want to constructively prove a positive statement that depends on the least number axiom, explosion will be necessary. – Derek Elkins left SE May 08 '19 at 17:37