Re: Data types in physics



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

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.8)
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.

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

.



Relevant Pages

  • Re: Data types in physics
    ... Do you know a field of physics or math that studies these ... as a lambda expression in a typed lambda calculus. ...
    (sci.physics.research)
  • Re: Data types in physics
    ... and I am confused about what is considered string (in the ... computer language terminology) and what is considered number ... quantity or magnitude in physics. ... both vectors and dimension analysis at the same time. ...
    (sci.physics.research)
  • Re: Data types in physics
    ... Do you know a field of physics or math that studies these ... for it suggests that dimensions do have an inherent physical meaning. ...
    (sci.physics.research)
  • Re: Data Physics: A Nightmare in Physics
    ... living systems can detect with their sensors. ... When you look with your eyes, how many data types can you see? ... Contemporary Physics cannot answer that question and my Data Physics can. ...
    (sci.physics)
  • Re: How can I tell if F is a string or if it is a number?
    ... I see that there are similarities with data types used in computer ... types is what physics calls units. ... as a lambda abstraction in a typed lambda calculus. ... would have type force, or more accurately, it would have type ...
    (comp.theory)