1

I’d like to verify if my formula correctly expresses that a number is a power of $ 10 $, using the $ \sf{TNT} $ language provided by Hofstadter in his famous book Gödel, Escher, Bach: An Eternal Golden Braid. Although Hofstadter uses ‘$ b $’ to express the desired number, I’ll use ‘$ a $’ just for the sake of clarity. I’ll use common numerals for shortening the formula. Here we go: $$ \exists a: \exists b: \exists c: \exists d: \exists e: \neg \exists f: (a = 1) \\ \lor (((\neg (b = 0) \land (a = 10 \cdot b)) \supset ((b = 10 \cdot c) \lor (b = 1))) \\ \land (((c = d \cdot e) \land (d = 10 \cdot f)) \supset (d = 1))) $$

almahed
  • 51
  • 4
    why are you existentially quantifying b, if you are trying to write a prediate about b? (and I guess you meant a) –  Feb 26 '13 at 15:11
  • There are two quite different questions here: the first is how to express mathematical statements in formulae, and the second is how to express "power of 10" using the available resources. In order to separate these two questions, maybe you could first show us your attempt in expressing "a is a power of 2" in TNT. – Sean Eberhard Feb 26 '13 at 15:32
  • 2
    @Sean I disagree; I think the question is clear: Does the given formula correctly express the property of being a power of 10? – MJD Feb 26 '13 at 16:40
  • @Rodrigo: I have not heard of any simple way to express "power of 10" in TNT. All the solutions I have seen require more advanced number theory. – MJD Feb 26 '13 at 16:56
  • 2
    More clever, I'd say, not necessarily more advanced. What I think of as the standard solution, which I wrote up in the first part of this blogpost http://sbseminar.wordpress.com/2009/12/07/the-technical-part-of-godels-proof/ , uses nothing beyond the Chinese Remainder Theorem. – David E Speyer Feb 26 '13 at 17:04
  • That's the kind of solution I was thinking of, and relative to what OP is doing and to the sort of things that Hofstadter discusses, I did think it was more advanced. – MJD Feb 26 '13 at 17:09
  • 1
    Is it correct to say that you can easily define $a$ is a power of $p$ by $$\forall x,y, \exists z, a = xy \to (x = pz \wedge x=1)$$ but for composite numbers things are much more difficult? –  Feb 26 '13 at 17:13
  • 3
    @user58512 There is an easy solution for $p$ prime, and things are much more difficult for composite numbers. I think your formula might have some typos. – David E Speyer Feb 26 '13 at 17:19
  • 1
    it's just from x|a implies (p|x or x=1), but without | notation. –  Feb 26 '13 at 17:19
  • I think you want $$\forall_{x,y} : a=xy \implies ( x=1 \vee \exists_z : x=pz).$$ Oh, I see. You took this and tried to move the $\exists$ all the way to the left, but you accidentally turned $\vee$ into $\wedge$ in the process. (Notice that $x=pz \wedge x=1$ is never true.) – David E Speyer Feb 26 '13 at 17:30
  • I really sorry I didn't make clear enough that the intended "power of 10" is indeed "a". For David Spencer: 20 doesn't work, you can't make the formula true using 20, so the formula is only true if a is a power of 10. –  Feb 26 '13 at 18:48
  • In plain english, I'm trying to say that: exists an a such that it is =1 or it is multiple of 10, this implying that any other of its factors are also multiple of 10, and any other factor that is not multiple of 10 is =1 –  Feb 26 '13 at 18:52
  • @Rodrigo: If that's the formula you're after, then that's also not correct: that's the approach that you can take for primes, but it doesn't work for composite numbers: 8 is a factor of 1000, but it's clearly not a multiple of 10. – Steven Stadnicki Feb 26 '13 at 19:17
  • @StevenStadnicki I don't understand, can 8 make the formula true? If I say that ANY multiple of ANY divisor of 'a' is multiple of 10 or 1, I'm ruling out any other prime besides 2 and 5, and I also rule out any unequal exponents for 2 and 5 when writing that a=10b --> b=10c, or not? – almahed Feb 27 '13 at 14:26
  • @SeanEberhard the formula for "b is a power of 2" is simply ∀c:∀d:<b=c⋅d>⊃<<c=S0>∧∃e:<d=SS0.e>>, or ∀c:∀d:<b=c⋅d>⊃<<c=S0>∨∃e:<c=SS0.e>> – almahed Feb 27 '13 at 14:34
  • @almahed In fact only the latter formula you suggest is correct. The previous one is saying, in English, "whenever $b=c\cdot d$ we have $c=1$ and $d$ even". Of course this is not true, because I could write $2^n = 2^n\cdot 1$, and then $c\neq 1$! The latter formula states, on the other hand, "whenever $b=c\cdot d$ we have $c=1$ or $c$ is even, which indeed correctly expresses "$b$ is a power of 2". – Sean Eberhard Feb 28 '13 at 10:28
  • @SeanEberhard Correct if I'm wrong, but seems that the same objection could be done concerning the second formula. If both "c" and "d" are universally quantified, and the formula 2 works precisely because of that, how could you disprove formula 1? Considering it non-cummutative somehow? Sorry if my question seems too noobish, but it appears to me that the issue of your objection could be fixed writting ∀c:∀d:<b=c⋅d=d⋅c>⊃<<c=S0>∧∃e:<d=SS0.e>>, while I tought that symmetry was implicitly considered in TNT. – almahed Mar 01 '13 at 02:14
  • 1
    For details on how to write the required formula, see http://math.stackexchange.com/questions/312891/how-is-exponentiation-defined-in-peano-arithmetic/313049#313049 – Andrés E. Caicedo Mar 01 '13 at 03:57
  • @almahed Commutativity is not exactly the problem, since indeed $c\cdot d = d\cdot c$ and TNT "knows" that (so your new formula is no different from your old one). In English, the formula $\forall c : \forall d: (b=c\cdot d)\rightarrow ((c=1) \wedge \exists e: (d=2\cdot e))$ says precisely that whenever $b$ is expressed as a product $c\cdot d$ we must have $c=1$ and $d$ even. Now that's just not true of any number at all: e.g., if you give me $b=8$ I can write it as $b=c\cdot d$ where $c=8$ and $d=1$, or alternatively as $b=c\cdot d$ where $c=4$ and $d=2$. – Sean Eberhard Mar 01 '13 at 10:11
  • 1
    @SeanEberhard Thank yow, now I see where I was equivocated in reading these formulas. – almahed Mar 10 '13 at 03:45

1 Answers1

7

As user58512 says, I think you are trying to write a sentence for "$a$ is a power of $10$", which means you don't want an $\exists a$ at the front. In the following, I'll take the liberty of making things more readable by replacing $\supset$ with $\implies$, using $( \ )$ instead of $< \ >$ and using $\neq$.

Your sentence doesn't work. I will show that it is true for $a=20$. Take $b = 2$ and take $c$, $d$ and $e$ to be anything. Then your sentence reads

$\neg \exists f : 20=1 \vee [ (( 2 \neq 0 \wedge 20=10 \cdot 2 ) \implies (2=10 \cdot c \vee 2=1) ) \wedge \ldots] $

I can stop right there without expanding the rest. Indeed, there is no such $f$. The equality $20=1$ is false. The two conditions in the hypothesis of the implication are true; the two conditions in the conclusion of the implication are false. So we have

$\neg \exists f: FALSE \vee [ (TRUE \implies FALSE) \wedge \ldots]$

Indeed, there is no $f$ which can make this true.

Unfortunately, your sentence is garbled enough that I can't tell what you intended to write. I don't think there is any solution as short you are attempting.

Let me suggest trying to paraphrase your sentence in English first, and moving your quantifiers ($\exists$ and $\forall$) as close as possible (but not closer!) to the things they are meant to quantify. That might make the level of minor errors low enough that we could see what you are trying to do.

  • 4
    For those who are interested in the "how I found this", I rewrote the portion inside the quantifiers into DNF http://en.wikipedia.org/wiki/Disjunctive_normal_form. So the sentence wound up looking like $\cdots \neg \exists_f (A \vee B \vee C \vee D) \wedge (E \vee F \vee G \vee H)$. It was easy to choose $(b,c,d,e)$ so that $A$, $B$, $C$ and $D$ were all false: they didn't even have $f$ in them! Although DNF is much worse than a good attempt to write a clean statement, I find it is often better than a student's haphazard attempt. – David E Speyer Feb 26 '13 at 16:50