0

I'm currently showing a few things about $\mathbb{N}$ in the proof assistant Coq, with the goal to take these proofs and turn them into deductions in the first-order theory of PA.

One of the open goals right now is the implication "irreducible $\Rightarrow$ prime". Looking for proofs on this site and elsewhere on the web, I have so far only found proofs using the $\operatorname{gcd}$ plus Bézout's Lemma or ideals, everything taking place in $\mathbb{Z}$. The fact that they are shown for $\mathbb{Z}$ is not per se a problem, since it should be possible to show something like this: $$ PA \vdash \forall x y ~ \exists ab ~~a x = by \, + \, \operatorname{gcd}(x,y) ~\lor ~ ay = bx \, + \, \operatorname{gcd}(x,y) $$ which would be a translation of Bézout into PA. One could then continue from there.

However I feel that PA should be strong enough to circumvent the necessity to define and develop results about the $\operatorname{gcd}$ just to prove this implication. Since my attempts so far have not been fruitful, any hint for a different approach would be very welcome.

Bonus points if the proof is in Heyting Artihmetic instead of PA.

Léreau
  • 3,015
  • 1
    $\Bbb N$ is not a ring, so $\Bbb Z$ is more natural. I am not sure why you want to avoid Bezout? Irreducible is equivalent to prime in the ring $\Bbb Z$. Using the units $\pm 1$, we could just view this for $\Bbb N$, and you don't have to show anything? – Dietrich Burde Mar 08 '21 at 19:57
  • @DietrichBurde The reason for staying in $\mathbb{N}$ is that I want a proof that can in the end be done in the first-order theory of PA using a natural deduction system. – Léreau Mar 08 '21 at 20:16
  • 1
    An irreducible $,p,$ is prime in any gcd domain since $,p\mid ab,, p\nmid a\Rightarrow \color{#c00}{(p,a)=1},$ so $,p\mid pb,ab\Rightarrow p\mid (pb,ab)=\color{#c00}{(p,a)}b = b,$ (up to associates). – Bill Dubuque Mar 08 '21 at 21:03
  • @BillDubuque I am looking for a proof which can easily be turned into a deduction in PA. So in particular not using that $\mathbb{Z}$ is a gcd domain. – Léreau Mar 09 '21 at 17:59
  • You shouldn't make major changes to the question after you've already received comments/answers. – Bill Dubuque Mar 09 '21 at 18:03
  • 1
    @BillDubuque I disagree that it is a major change. In the original post I already pointed out that I am not looking for proofs that are done in $\mathbb{Z}$. The comments then showed me that this was not clear enough. Hence the edit. – Léreau Mar 09 '21 at 18:05
  • 2
    Note that we can interpret $\mathbb{Z}$ in $\mathbb{N}$, and so develop properties of the integers in $\mathsf{PA}$, via an appropriate equivalence relation on pairs of naturals. Developing this formally of course will take work, but in my opinion will be worth it, since it will be frequently useful: a natural deduction proof of a theorem about naturals in the "$\mathbb{Z}$-analogue" of $\mathsf{PA}$ (= ordered ring axioms + induction with "is everything" replaced by "contains all nonnegatives") can then be more-or-less immediately translated into a $\mathsf{PA}$ proof via this interpretation. – Noah Schweber Mar 09 '21 at 18:05
  • @NoahSchweber That is certainly one option and certainly the one to use if I wanted to transport more then one result from $\mathbb{Z}$ to $\mathbb{N}$. – Léreau Mar 10 '21 at 12:28
  • @NoahSchweber One question that popped into my head though, and maybe you can say more about it: What natural deduction proofs of a theorem about naturals in the "$\mathbb{Z}$-analogue" can be translated to $\mathsf{PA}$? It should be possible to show that any natural number has an inverse in the "$\mathbb{Z}$-analogue", but that result should not translate (unchanged). I guess I'm basically asking about more details one the "more-or-less". – Léreau Mar 10 '21 at 12:34
  • 2
    @Lereau Any statement with all quantifiers bounded to $\mathbb{N}$ will translate (the "more-or-less" refers to "immediately"); this is what "theorem about naturals" meant. "Every natural number has an inverse" doesn't fit this pattern; "every natural number has an inverse which is a natural number" does, but of course isn't a theorem of the $\mathbb{Z}$-analogue of $\mathsf{PA}$. – Noah Schweber Mar 10 '21 at 14:07
  • @NoahSchweber Ah yes! I was missing that the quantifiers should of course all be restricted. That immediately clarifies it. – Léreau Mar 11 '21 at 07:35

1 Answers1

0

I now found a proof in this document (Proposition $1.4$) which uses strong induction. The statement on which the induction is used can be simplified slightly, which I will present here for completeness. The proof also needs Euclid's lemma and the following fact about divisibility which can be shown by induction on $a$:

Lemma: $~~~n \vert (an + b) ~\Longleftrightarrow~ n\vert b$.


Proof: Assume that $x$ is irreducible and try to show $x \vert a b ~\Rightarrow~ x \vert a ~\lor ~ x \vert b~$ by strong induction on $a$. We distinguish two cases:

  • ($x \leq a$) By Euclid we have $a = d x +r$, with $r < x$ implying $r < a$. Since we have $$ x \vert ab ~\Longrightarrow~ x \vert (dxb + r b) ~\stackrel{\text{Lemma}}{\Longrightarrow}~ x \vert rb $$ the induction hypothesis can be applied on $r$ giving us $~x \vert r ~\lor~ x \vert b~$, which shows $~x \vert a ~\lor~ x \vert b$.

  • ($x > a$) It is trivial for $a = 0$, so assume $a > 0$. In this case Euclid gives us $x = da +r$ with $r<a$. Since $~x \vert ab~$ there is a $k$ with $kx = ab$. So we have $$ x \vert xb ~\Longrightarrow ~ x \vert (dab + rb) ~\Longrightarrow~ x \vert (dkx + rb) ~\stackrel{\text{Lemma}}{\Longrightarrow}~ x \vert rb $$ again making it possible to apply the induction hypothesis on $r$ to get $~x \vert r ~\lor~ x \vert b~$. If $~x\vert b~$ we are done. If $~x \vert r~$ we must actually have $r = 0$ since $r < a < x$. Thus $x = da$ and by the irreducibility of $x$ we get $a = x ~\lor~ a = 1$ showing $~ x \vert a ~\lor~ x \vert b$ respectively.


tl;dr of the proof: Depending on whether $x \leq a$ or $x > a$ we do the divisions $a / x$ or $x / a$ with remainder and use strong induction on the remainder.

Léreau
  • 3,015