Main Page | Report this Page
 
   
Science Forum Index  »  Physics - Research Forum  »  Data types in physics
Page 1 of 3    Goto page 1, 2, 3  Next
Author Message
pioneer1
Posted: Mon Apr 07, 2008 10:44 am
Guest
Hi,

I submitted this question to sci.math.research but it was rejected for
being related to physics or computer science and not math perse.

I have been trying to classify data types in physics

http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics

and I am confused about what is considered string (in the sense of
computer language terminology) and what is considered number or
quantity or magnitude in physics.

More specifically, looking at F in F=ma I see something like a pointer
to an address, not the address itself. Or if ma is number in a
spreadsheet cell, F is the name of that cell.

I know this is not how physicists see it. I am looking to find the
correct mathematical terminology so that I can state the problem
clearly. Do you know a field of physics or math that studies these
things?

Thank you for the help.
Hans Aberg
Posted: Tue Apr 08, 2008 7:13 am
Guest
pioneer1 wrote:
Quote:
I have been trying to classify data types in physics

http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics

and I am confused about what is considered string (in the sense of
computer language terminology) and what is considered number or
quantity or magnitude in physics.

More specifically, looking at F in F=ma I see something like a pointer
to an address, not the address itself. Or if ma is number in a
spreadsheet cell, F is the name of that cell.

I am not sure exactly what you want to do:

But you might try Haskell <http://haskell.org/>, using say Hugs
<http://haskell.org/hugs>. One can write say:
module Physics where

type Real = Double

-- Mass, acceleration, force
data Measurable = M(Real) | A(Real) | F(Real)
deriving (Eq, Show)

instance Num Measurable where
(M m)*(A a) = F(m*a)
(A a)*(M m) = F(a*m)

This represents some measurable quantities as SI-unit floating point
numbers wrapped up as objects. Then in Hugs, for example:
Physics> (M 1.5)*(A 9.Cool
F 14.7

In a more ambitious approach, one might introduce abstract physical units:
type Real = Double

-- Mass, time, length
data Unit = M | T | L deriving (Eq, Show)

data UnitDimension = Unit:^Integer | UnitDimension:*UnitDimension
deriving (Eq)

instance Show UnitDimension where
show (x:^k) = show x ++ "^" ++ show k
show (x:*y) = show x ++ "*" ++ show y
so acceleration can be represented by:
Physics> (L:^1):*(T:^ -2)
L^1*T^-2

In this approach, the exact data types are not as important as the
functions used to define a user interface. For example, I might have
defined more directly
-- Mass, time, length
data UnitDimension = (Integer, Integer, Integer)
and if I define an operator (*) only its definition will change with the
choice of data types.

Quote:
I know this is not how physicists see it. I am looking to find the
correct mathematical terminology so that I can state the problem
clearly. Do you know a field of physics or math that studies these
things?

The stuff above does not give any chance of doing mathematics; for that,
a theorem prover. But current theorem provers do not admit doing very
advanced mathematics. An intermediate would be a symbolic algebra
propgram, i.e., which does not treat formulas axiomatically. A theorem
provers is an enhanced form of Prolog and constraint logic programs such
as CLP(R). So you might search for those words, and "automated
deduction", say in the Wikipedia.

Hans Aberg
John Forkosh
Posted: Tue Apr 08, 2008 8:22 am
Guest
pioneer1 <1pioneer1@gmail.com> wrote:
Quote:
I have been trying to classify data types in physics

http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics

and I am confused about what is considered string (in the sense of
computer language terminology) and what is considered number or
quantity or magnitude in physics.

More specifically, looking at F in F=ma I see something like a pointer
to an address, not the address itself. Or if ma is number in a
spreadsheet cell, F is the name of that cell.

I know this is not how physicists see it. I am looking to find the
correct mathematical terminology so that I can state the problem
clearly. Do you know a field of physics or math that studies these
things?

I believe you may be barking up the wrong "tree" (sorry).
I'm not aware of a field of physics that studies these things,
per se, but I believe dimensional analysis is what you're
looking for. In other words, what you call data types
is what physics calls units.
Consider your own F=ma example, and consider the rhs, ma,
as a lambda expression in a typed lambda calculus. Then "input"
would be a variable of type mass and a variable of type acceleration
(or would be other lambda expressions that reduce to these types).
Seems pretty straightforward. And I'd hazard a guess it's
already been discussed (or maybe just mentioned) somewheres,
though I'm not aware of any references.
--
John Forkosh ( mailto: j@f.com where j=john and f=forkosh )
Joseph Warner
Posted: Thu Apr 10, 2008 10:58 am
Guest
"Hans Aberg" <haberg_20080406@math.su.se> wrote in message
news:ftfn92$sjm$1@aioe.org...
Quote:
pioneer1 wrote:
I have been trying to classify data types in physics

http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics

and I am confused about what is considered string (in the
sense of
computer language terminology) and what is considered number
or
quantity or magnitude in physics.

More specifically, looking at F in F=ma I see something like a
pointer
to an address, not the address itself. Or if ma is number in a
spreadsheet cell, F is the name of that cell.

I am not sure exactly what you want to do:

But you might try Haskell <http://haskell.org/>, using say Hugs
http://haskell.org/hugs>. One can write say:
module Physics where

I not sure either of what the person wants. But he may want to do
both vectors and dimension analysis at the same time.

MathCad allows that. A variable can be assigned a dimension
whether that is a scaler, vector and an array element. Through
the manipulation of the calculations the program keeps the
dimensions correct and report it out when you want to see a
quantity.

But of data types Physics as far as I know only uses real numbers
with a certain number of digits or integers like or ladder
operators. But all of the numbers except for some constants like
pi have a dimension associated with it.

So the original poster may want to look at MathCad or similar
programming languages.
J. J. Lodder
Posted: Thu Apr 10, 2008 2:06 pm
Guest
pioneer1 <1pioneer1@gmail.com> wrote:

Quote:
I submitted this question to sci.math.research but it was rejected for
being related to physics or computer science and not math perse.

I have been trying to classify data types in physics

http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics

and I am confused about what is considered string (in the sense of
computer language terminology) and what is considered number or
quantity or magnitude in physics.

There are no data types in physics, just numbers.
For convenience one usually chooses the reals,
but (given that everyting in physics has finite precision)
the rationals or even the integers would do as well.
One can group numbers into more involved structures
(complex numbers, vectors, tensors, etc)
but that is in principle a matter of convenience
and economy of notation only.


Quote:
More specifically, looking at F in F=ma I see something like a pointer
to an address, not the address itself. Or if ma is number in a
spreadsheet cell, F is the name of that cell.

Just a multiplication here,
(if desired a vector multiplication)
whatever else you want to call it,

Jan
J. J. Lodder
Posted: Thu Apr 10, 2008 2:06 pm
Guest
John Forkosh <john@please.see.sig.for.email.com> wrote:

Quote:
pioneer1 <1pioneer1@gmail.com> wrote:
I have been trying to classify data types in physics

http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics

and I am confused about what is considered string (in the sense of
computer language terminology) and what is considered number or
quantity or magnitude in physics.

More specifically, looking at F in F=ma I see something like a pointer
to an address, not the address itself. Or if ma is number in a
spreadsheet cell, F is the name of that cell.

I know this is not how physicists see it. I am looking to find the
correct mathematical terminology so that I can state the problem
clearly. Do you know a field of physics or math that studies these
things?

I believe you may be barking up the wrong "tree" (sorry).
I'm not aware of a field of physics that studies these things,
per se, but I believe dimensional analysis is what you're
looking for. In other words, what you call data types
is what physics calls units.

Yes, provided that it is understood that units and dimensions
inherently have nothing to do with physics.
Units can in principle be chosen freely,
subject only to consistency.
Units are tools to describe reality,
to map physical quantities into numbers
and any -physical- result must be independent
of the chosen description.

Calling a dimension a data type may be misleading,
for it suggests that dimensions do have an inherent physical meaning.
This is not the case.
Systems of dimensions can be chosen freely and arbitrarily,
again subject only to consistency,

Jan
John Forkosh
Posted: Fri Apr 11, 2008 6:22 am
Guest
J. J. Lodder <nospam@de-ster.demon.nl> wrote:
Quote:
John Forkosh <john@please.see.sig.for.email.com> wrote:

pioneer1 <1pioneer1@gmail.com> wrote:
I have been trying to classify data types in physics
http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics
and I am confused about what is considered string (in the sense of
computer language terminology) and what is considered number or
quantity or magnitude in physics. I am looking to find the
correct mathematical terminology so that I can state the problem
clearly. Do you know a field of physics or math that studies these
things?

I believe you may be barking up the wrong "tree" (sorry).
I'm not aware of a field of physics that studies these things,
per se, but I believe dimensional analysis is what you're
looking for. In other words, what you call data types
is what physics calls units.

Yes, provided that it is understood that units and dimensions
inherently have nothing to do with physics.
Units can in principle be chosen freely,
subject only to consistency.
Units are tools to describe reality,
to map physical quantities into numbers
and any -physical- result must be independent
of the chosen description.

Calling a dimension a data type may be misleading,
for it suggests that dimensions do have an inherent physical meaning.
This is not the case.
Systems of dimensions can be chosen freely and arbitrarily,
again subject only to consistency,
Jan

Wandering a bit from the OP's question, but I'd think that
units are more fundamental than numbers. Just because
there are many different/equivalent "representations"
(e.g., theoretical units), doesn't mean units aren't
fundamental. On the other hand, there are no directly measurable
numbers, per se, in nature (though there are dimensionless ratios).
You can't measure "one", just one apple, one erg, etc.

Numbers, at least vis-a-vis physics, are a completely human
construction (despite Kronecker's claim that "God invented the
integers"). We find numbers very useful to describe measurements,
but maybe that's just because we first found numbers useful to calibrate
our measuring instruments in the first place. And then we find numbers
useful to formulate theories correlating our already-numerical measurements.
Now, I agree there are many holes in the above reasoning,
and I have zero idea how physics might be done without numbers.
But maybe that's just how human brains work. To that extent, we're all
trapped in Whorf's "conceptual boat" (lots of google hits for that).

By looking for numeric-like data types that are physically fundamental,
I think the OP was mistakenly elevating numeric-like entities to a
foundational level they don't really occupy. For a recent discussion
vaguely along these lines (though they aren't, as far as I can tell,
actually trying to do away with numbers), try
http://arxiv.org/abs/0803.0417/
--
John Forkosh ( mailto: j@f.com where j=john and f=forkosh )
pioneer1
Posted: Sat Apr 12, 2008 3:30 am
Guest
On Apr 8, 1:13pm, Hans Aberg <haberg_20080...@math.su.se> wrote:

Quote:
0type Real = Double

But you already defined Force as number. As I mentioned to John
Forkosh I am trying to understand if F in F=ma is type string or type
number? In programming there is no ambiguity. F is clearly defined as
number. In physics, there is an ambiguity in the equality sign. It may
mean F :: a (F is proportional to a) or it may mean F = ma (F is a
name for ma, we may substitute F for ma).
pioneer1
Posted: Sat Apr 12, 2008 3:30 am
Guest
On Apr 8, 2:22=A0pm, John Forkosh <j...@please.see.sig.for.email.com>
wrote:

Quote:
. . . what you call data types
is what physics calls units.

I am not sure because I am trying to understand if force in F=ma is
type string or type number. Only type number has units and dimensions.
The distinction between string and number is called types too, correct?
Bossavit
Posted: Sat Apr 12, 2008 3:30 am
Guest
J.J. Lodder:

Quote:
There are no data types in physics, just numbers.

This is a bit too radical, I think. The opposite stand was argued in, e.g.,

H. Whitney: "The mathematics of physical quantities, Part I:
Mathematical models for measurement", Am. Math. Monthly, 75, 2 (1968),
pp. 115-38,
H. Whitney: "The mathematics of physical quantities, Part II, Quantity
structures and dimensional analysis", Am. Math. Monthly, 75, 3 (1968),
pp. 227-56

that the OP might find useful, although Whitney did not invoke "data
types" in the modern sense.

Also relevant,

M. Parkinson: "An Axiomatic Approach to Dimensions in Physics", Am. J.
Phys., 32, 3 (1964), pp. 200-5.

J.F. Price: "Dimensional analysis of models and data sets", Am. J.
Phys., 71, 5 (2003), pp. 437-47.

AB

==============================================================================
Alain Bossavit
LGEP, CNRS,91192 Gif sur Yvette CEDEX, France
http://natrium.em.tut.fi/~bossavit/
J. J. Lodder
Posted: Sat Apr 12, 2008 12:09 pm
Guest
John Forkosh <john@please.see.sig.for.email.com> wrote:

Quote:
J. J. Lodder <nospam@de-ster.demon.nl> wrote:
John Forkosh <john@please.see.sig.for.email.com> wrote:

pioneer1 <1pioneer1@gmail.com> wrote:
I have been trying to classify data types in physics
http://www.densytics.com/wiki/index.php?title=Data_types_in_Physics
and I am confused about what is considered string (in the sense of
computer language terminology) and what is considered number or
quantity or magnitude in physics. I am looking to find the
correct mathematical terminology so that I can state the problem
clearly. Do you know a field of physics or math that studies these
things?

I believe you may be barking up the wrong "tree" (sorry).
I'm not aware of a field of physics that studies these things,
per se, but I believe dimensional analysis is what you're
looking for. In other words, what you call data types
is what physics calls units.

Yes, provided that it is understood that units and dimensions
inherently have nothing to do with physics.
Units can in principle be chosen freely,
subject only to consistency.
Units are tools to describe reality,
to map physical quantities into numbers
and any -physical- result must be independent
of the chosen description.

Calling a dimension a data type may be misleading,
for it suggests that dimensions do have an inherent physical meaning.
This is not the case.
Systems of dimensions can be chosen freely and arbitrarily,
again subject only to consistency,
Jan

Wandering a bit from the OP's question, but I'd think that
units are more fundamental than numbers. Just because
there are many different/equivalent "representations"
(e.g., theoretical units), doesn't mean units aren't
fundamental.

In my use of words human constructs are by definition not fundamental.
Only things that are dependent of the way in which they are described
can be.
I don't see how you can find levels of fundamentality here.
The way I see it a unit system (with appropriate measurement procedures)
is a mapping, for physical quantities into numbers.

Quote:
On the other hand, there are no directly measurable
numbers, per se, in nature (though there are dimensionless ratios).
You can't measure "one", just one apple, one erg, etc.

But you can count, cows, or electrons for example.
And no, he other way, with sufficient perversity
dimensionless quantities are not exempt.
You can for example measure angles either in radians (aka m/m)
or in feet/mile.
Angles need not even be dimensionless,
for you can assign a different dimension
to the feet and mile mentioned above.
(discussed here long ago as 'pilot's units'.

Quote:
Numbers, at least vis-a-vis physics, are a completely human
construction (despite Kronecker's claim that "God invented the
integers").

That's a matter for philosophers, hence off-topic here.

Quote:
We find numbers very useful to describe measurements,
but maybe that's just because we first found numbers useful to calibrate
our measuring instruments in the first place. And then we find numbers
useful to formulate theories correlating our already-numerical measurements.
Now, I agree there are many holes in the above reasoning,
and I have zero idea how physics might be done without numbers.

It seems fairly obvious that you can't.

Quote:
But maybe that's just how human brains work. To that extent, we're all
trapped in Whorf's "conceptual boat" (lots of google hits for that).

Describing reality at sufficient sophistication,
to get for example the electron g-factor
correct to ten decimal places or so,
will require setting up a very elaborate mathematical apparatus,
no matter how your brain works.
At it won't give the right answer without being equivalent.

Quote:
By looking for numeric-like data types that are physically fundamental,
I think the OP was mistakenly elevating numeric-like entities to a
foundational level they don't really occupy.

Agreed,


Jan
Hans Aberg
Posted: Sat Apr 12, 2008 12:09 pm
Guest
pioneer1 wrote:

Quote:
As I mentioned to John
Forkosh I am trying to understand if F in F=ma is type string or type
number? In programming there is no ambiguity.

You question suggests you think that physics theories already have a
natural computer language representation, but the best hope is to model
some only aspects.

Quote:
F is clearly defined as
number.

No: F is a physically measurable quantity. By fixing a unit of force
u_F, disregarding the direction that force may have, F can be measured
using a number r, as in
F = r*u_F
In theoretical physical theories, r is modeled as a real number (needing
differential equations), and in practical measurements, an approximation
thereof.

Quote:
In physics, there is an ambiguity in the equality sign. It may
mean F :: a (F is proportional to a) or it may mean F = ma (F is a
name for ma, we may substitute F for ma).

The formally correct version of this equation is
F = k m a
where k is a dimension-less constant depending only on the units chosen
for measuring the physical quantities force, mass and acceleration; by
suitable choice of measurements units, it can be chosen to be equal to 1.

Hans
John Forkosh
Posted: Sat Apr 12, 2008 12:09 pm
Guest
pioneer1 <1pioneer1@gmail.com> wrote:
Quote:
John Forkosh <j...@please.see.sig.for.email.com> wrote:
. . . what you call data types
is what physics calls units.

I am not sure because I am trying to understand if force in F=ma is
type string or type number. Only type number has units and dimensions.
The distinction between string and number is called types too, correct?

I tried to answer, as best I can, what I think you've been asking
(both here and in your parallel thread) in the comp.theory ng.
So I'll reproduce that answer (modulo a few typos) below...

Pioneer1 <1pioneer1@gmail.com> wrote:
Quote:
If I understand correctly, then in physics symbols are loaded and
they can represent either a string or a number and a physicist will
know how to interpret the symbol correctly depending on the context.
Is this correct?

Well, yes, that's kind of correct and I think it answers the
question you were originally asking. Context is important,
but it's a little more complicated than I think you're suggesting.
Consider your F=ma and alsp consider the
electrostatic force F=qE on a charge q in an electric field E.
That's two different contexts for F, in the following way.
F=ma is kind of "definitional". If you see a mass m
with an acceleration a, then you infer that there must be
some force F=ma somewhere, somehow, of some sort, acting on m.
But you have no clue what F is or where it comes from.
In this sense F might be called a "label" (like you said
in a previous comp.theory post) in the F=ma context.
F=qE is a "quantity" (like you said in that same post).
If you put a charge q in an electric field E, then that
charge q will experience an electrostatic force F=qE.
( Now, if that charge q also has mass m, then you'll
see an acceleration given by F=ma=qE so a=(q/m)E. )

Note that the physical units of F (force) are the same
regardless of "context" (in the above sense). But your
"data type" might not be invariant. That makes it
difficult for me to see what purpose it might serve.
--
John Forkosh ( mailto: j@f.com where j=john and f=forkosh )
J. J. Lodder
Posted: Sun Apr 13, 2008 8:49 am
Guest
Hans Aberg <haberg_20080406@math.su.se> wrote:

Quote:
The formally correct version of this equation is
F = k m a
where k is a dimension-less constant depending only on the units chosen
for measuring the physical quantities force, mass and acceleration; by
suitable choice of measurements units, it can be chosen to be equal to 1.

I don't understand this remark.
Are you implying that every physical formula
should be thought of as containing an invisible extra constant,
dimensionless and of value 1?

You can of course think so,
but what good would that do?

Jan
Hans Aberg
Posted: Sun Apr 13, 2008 12:59 pm
Guest
J. J. Lodder wrote:
Quote:
The formally correct version of this equation is
F = k m a
where k is a dimension-less constant depending only on the units chosen
for measuring the physical quantities force, mass and acceleration; by
suitable choice of measurements units, it can be chosen to be equal to 1.

I don't understand this remark.
Are you implying that every physical formula
should be thought of as containing an invisible extra constant,
dimensionless and of value 1?

This is how the formulas will be, if one does not settle for a specific
set of measurement units.

Quote:
You can of course think so,
but what good would that do?

In order to be formally correct, but the formulas quickly become
unreadable. As illustration:

In theoretical physics, one may set c = 1, so all lengths can be
measured in seconds. So how about buying 20 ns (nano seconds) of rope?

Hans
 
Page 1 of 3    Goto page 1, 2, 3  Next   All times are GMT - 5 Hours
The time now is Sat Oct 11, 2008 4:56 am