Progress

May. 17th, 2007 09:11 pm
stoutfellow: (Ben)
[personal profile] stoutfellow
In the course of the Ramble, I've talked a good deal about developments in mathematical notation, and the impact they've had on mathematical thought. My recent reading of Rahman & Schmeisser's Analytic Theory of Polynomials provides me with an opportunity to point out that this is not merely a thing of the past.

The symbol "=" was introduced by Robert Recorde in his 1557 algebra textbook The Whetstone of Witte. Unfortunately, there has always been a certain ambiguity in its use; it appears, as it were, in both the indicative and the imperative mood. That is, there is logical equality, which declares that two expressions name the same thing, and there is assignment, which sets the value of a symbol to be equal to a given expression. It isn't surprising that the same symbol should be used for both, but I've long felt that this presents an unnecessary mental hurdle for students of mathematics.

Computer scientists faced this ambiguity years ago; what a student might be able to parse with only a little difficulty, a computer cannot, and thus many computer languages use different symbols for the two. Mathematica, for example, uses "==" for logical equality and "=" and ":=" for two slightly different assignment operators. Writers of mathematical texts are, apparently, finally picking up on this; Rahman and Schmeisser use the standard "=" for logical equality and ":=" for assignment. They do this without any fuss; I don't think they even mention that they're doing it, which leads me to believe that the usage has been spreading for some time now, without my noticing it.

What is particularly nice is this. Logical equality is a symmetric relation; if expr1=expr2, then expr2=expr1. Assignment is not symmetric; it must be made clear which expression is already meaningful and which is being defined. The beauty is that the operator ":=" is asymmetrical, and allows for the variant "=:". That is, there are times when you'll want to say "Here is the symbol symbol, which we will give the meaning expression", and you'll use ":="; on the other hand, you might construct the expression and then assign the symbol to it, using "=:". This is more flexible, and parallels natural language constructions. (Compare, somewhat loosely, the use of the passive voice, or topicalization techniques as in "Peanut butter, now, I really don't like".)

This is a good thing. There are still some problems with the use of the equals sign, especially in connection with limits and indefinite integrals; perhaps someday we'll get notation which reflects the semantic peculiarities of those concepts better. Meanwhile, I'm happy with this step forward.

Date: 2007-05-18 08:13 am (UTC)
From: [identity profile] toraks.livejournal.com

I seem to remember a difference in the two when I learned math which was a while ago now. However, I can't remember what the difference was! The logical equality was of course "=", but I'm not remembering what the other was. For some reason, I'm thinking "=>" but I don't think that's right, that was for "if, then" things when we did logic type stuff maybe? It's been too long. Maybe I'm just making it up. Oh well.

The ":=" seems like a great idea to me!

Date: 2007-05-19 09:02 pm (UTC)
From: [identity profile] stoutfellow.livejournal.com
Yeah, "=>" and the variants "<=", "<=>" are used for implication in either or both directions.

Date: 2007-05-21 07:29 am (UTC)
From: [identity profile] toraks.livejournal.com

Right, that is what I'm remembering then, as far as symbols.

I do remember there was a difference, but probably just that I had to always keep it mind so as not to get it mixed up.

Date: 2007-05-18 09:55 am (UTC)
From: [identity profile] akatsukami.livejournal.com
In C and some derivative languages (C++ certainly; D and Java I don't know well enough to say for certain) "=" is used solely for assignment, and "==" for logical equality.

In weakly-typed languages, such as classical PL/I, the ambiguity is a serious problem; the statement "A=B=C" is syntatically and semantically acceptable ("assign to A the truth value of 'B=C', applying conversion as necessary").

Date: 2007-05-19 09:05 pm (UTC)
From: [identity profile] stoutfellow.livejournal.com
Mathematica allows such constructions as you describe, including mixes of the logical and assignment operators. It enables some nifty things, including time-space tradeoffs on recursions (one of the assignment operators assigns the value of the right-hand expression; the other assigns the expression itself, which must be re-evaluated every time), but keeping straight just what's going on can be confusing. Me, I've selected a handful of set forms that I understand, and don't experiment with anything else.

Profile

stoutfellow: Joker (Default)
stoutfellow

April 2020

S M T W T F S
    1 2 34
5 6 789 1011
12 13 14 1516 17 18
19202122232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 22nd, 2026 11:19 pm
Powered by Dreamwidth Studios