Ruby-math and "why is ** not abelian?"

I was reading the 1st thread in the ruby-math discussion at

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-math/

(it in Japanese, but Excite has an auto translater–its interesting to
see
how it translates Japanese to English).

If anyone cares, what I got was basically this.

If + is commutative, and the successor operation to + is , which is
also commutative;
(a
b = b*a), then why isn’t ab = ba since ** is successor
operation to * ?

Some discussion of induction and Peano axioms, which I didn’t think
through.

Van

Van Jacques wrote:

I was reading the 1st thread in the ruby-math discussion at

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-math/

(it in Japanese, but Excite has an auto translater–its interesting to
see
how it translates Japanese to English).

If anyone cares, what I got was basically this.

If + is commutative, and the successor operation to + is , which is
also commutative;
(a
b = b*a), then why isn’t ab = ba since ** is successor
operation to * ?

Some discussion of induction and Peano axioms, which I didn’t think
through.

Van

The problem is that ** is the ‘raise to the power of’ operator

so 23 = 8
but 3
2 = 9

So ab != ba except when a=b.

What operation did you think that ** would actually do?

Van Jacques wrote:

If + is commutative, and the successor operation to + is , which is
also commutative;
(a
b = b*a), then why isn’t ab = ba since ** is successor
operation to * ?

Some discussion of induction and Peano axioms, which I didn’t think
through.

this should probably be posted to ruby-math, it’s really quite off-topic
here.

emmanuel

Hi!

  • Van Jacques:

If + is commutative, and the successor operation to + is , which
is also commutative;
(a
b = b*a), then why isn’t ab = ba since ** is successor
operation to * ?

Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

Josef ‘Jupp’ SCHUGT

···


http://oss.erdfunkstelle.de/ruby/ - German comp.lang.ruby-FAQ
http://rubyforge.org/users/jupp/ - Ruby projects at Rubyforge
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Germany 2004: To boldly spy where no GESTAPO / STASI has spied before

Peter Hickman wrote:

The problem is that ** is the ‘raise to the power of’ operator

OK, i didn’t realise the OP didn’t know that (hence my initial
reaction)… that post wasn’t off-topic after all :O)

sorry for the noise.

emmanuel

24 = 16 = 42

:slight_smile:

scnr
s.

···

On Mon, 26 Jan 2004 21:06:51 +0900, Peter Hickman peter@semantico.com wrote:

The problem is that ** is the ‘raise to the power of’ operator

so 23 = 8
but 3
2 = 9

So ab != ba except when a=b.

Josef ‘Jupp’ SCHUGT wrote:

Hi!

  • Van Jacques:

If + is commutative, and the successor operation to + is , which
is also commutative;
(a
b = b*a), then why isn’t ab = ba since ** is successor
operation to * ?

Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

But non-groups can be commutative.

“Josef ‘Jupp’ SCHUGT” jupp@gmx.de wrote in message news:<20040126221508.GD3659@jupp%gmx.de>…

Hi!

  • Van Jacques:

If + is commutative, and the successor operation to + is , which
is also commutative;
(a
b = b*a), then why isn’t ab = ba since ** is successor
operation to * ?

Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

Josef ‘Jupp’ SCHUGT

Hi Josef,

Why is " Neither (Float, +) nor (Float, *)" a group?

Is it because of limits on Float? (I just read that all numbers in
ruby are either int or float–I have never even seen the E-n, as
1.0E5, notation in ruby, though Float(nul) = 0.0.) Are you speaking of
the inability to rep very large and small floats, (machines are not
infinite), and/or round off error here?

Mathematically, (though Z != ruby Integers, or any machine integers)

(Z,+) and (R,+) and (Q,+) are groups, though
(Z,) is not, because of no division, which is what leads to Q, so
that
(Q,
) is a group, and of course (R,*).

[a bunch of nonsense about iterated + and * deleted, as it made no
sense]

···

But why is 32 = 2 + 2 + 2 = 23 = 3 + 3 ?

Is it because a + b = b + a that xy = yx?

I don’t see it, and its starting to make my head hurt.

I must admit I haven’t thought about this and don’t really have any
insight into it–maybe its just the properties of numbers–just the
way things are.

Van

“Josef ‘Jupp’ SCHUGT” jupp@gmx.de wrote in message news:<20040126221508.GD3659@jupp%gmx.de>…

Hi!

  • Van Jacques:

If + is commutative, and the successor operation to + is , which
is also commutative;
(a
b = b*a), then why isn’t ab = ba since ** is successor
operation to * ?

Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

Josef ‘Jupp’ SCHUGT

BTW, I found that my link to the ruby-math site did not work for me. But

http://blade.nagaokaut.ac.jp/ruby/

does work (for me).

Its the 1st thread in ruby-math. Japanese intimidates me as it
is so unfamiliar to a westerner. I wish I had been taught something
about the east in school, I feel that easterners find out more about
the west than vice versa.

Sorry, I am rambling.

Van

Hi!

  • Van Jacques:

Why is " Neither (Float, +) nor (Float, *)" a group?

The associative law is violated. Using machine numbers

(a + b) + c = a + (b + c)

does not hold for all machine numbers a, b, c. Proof is by
counterexample.

Simply Assume a = 1.0 and b, c = 0.6 * eps where eps is the smallest
number that added to 1.0 results in something different from 1.0.

(a + b) results in 1.0 because b is smaller than eps and so (a + b) +
c results in 1.0 as well.

(b + c) results in a number larger than eps so a + (b + c) is larger
than 1.0.

Similar holds for multiplication (it is more complicated so I only
sketch the proof): If a is a huge number and b and c are tiny numbers
the product of b and c can be zero so that a * (b * c) is zero as
well while a * b can still be a number that multiplied by c does not
result in zero.

To put it that way: The most challenging tasks in numerical
mathematics is providing an error estimate. Unfortunately it is one
of the most important as well.

It is often important to know how precisely a value is known. What
happens if one falsely assumes a precision that is not present shows
the Mars Polar Impactor.

Josef ‘Jupp’ SCHUGT

···


http://oss.erdfunkstelle.de/ruby/ - German comp.lang.ruby-FAQ
http://rubyforge.org/users/jupp/ - Ruby projects at Rubyforge
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Germany 2004: To boldly spy where no GESTAPO / STASI has spied before