Sorry for the delayed answer. On Fri, Jun 15, 2012 at 12:37 PM, Harold Erbin <[email protected]> wrote: >>> The main gap in this approach is that unit and quantity are almost >>> the same things, since the factor of the unit can be moved to the >>> quantity, and vice versa. I'm thinking how to improve this, maybe >>> by keeping in the factor's unit only what is necessary to give 1 >>> when expressed in terms of base units, or when it's a special unit >>> (like liter...). >> Why should there be a difference between a quantity and unit at all? >> >> If we keep in mind the analogy with vector spaces (and I actually >> believe there's yet a stronger correlation), the bases or generating >> sets of a vector (sub)space consist of vectors, just as the whole >> vector space. Thus, I think that it is actually good that unit and >> quantity are almost the same (in fact, a unit should be just a >> quantity with some additional properties). > > In fact, the unit system written "naturally" by using the multiplied > base units are not a vector space but a group: the vector space > representation is obtained with the exponents, and in this case, > multiplication of units corresponds to addition of vector, power to > multiplication. For example J = m**2 kg s**-2 is a group element, and > the vector representation is (2, 1, -2). > So the usual representation as product is not a vector space and > multiplication by a number is something different. Some articles speaks > about this [1].
Oh, thank you for the explanation! Unfortunately, I do not have an account in the online library to which the links in [1] point, so I cannot read the articles, which means that my further comments will still bear the noob flag :-) > It can be useful to have a distinction between quantities and units for > several reasons, e.g.: from the "philosophical" point a view, an unit is > something really fixed and defined, whereas a quantity is just a > temporary object. Moreover, we can then define quantity with > uncertainties with are clearly not units. In the same way, logarithmic > units or units with offset (like °C) are not simple "number" as a > quantity. So it could be useful to have a difference. > On the other hand, I think that constant should really be viewed as the > almost the same thing as an unit (we can subclass to say that the status > is a little different). Yes, I guess I agree. I'm not happy with a philosophical distinction, obviously, however, quantities with uncertainty do indeed show that a quantity is something more than a unit. And I totally approve of the idea of subclassing quantities from units. I'm still not sure what point you are trying to make with logarithmic units or units with offset, however. In fact, to me it looks like an extra argument that quantities and numbers *are* similar ;-) That is, you can do very much the same operations on units as you can on numbers. Sergiu -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
