Open sethaxen opened 3 years ago
I just had a look at this and got really confused. So I think this needs someone who's thought more about derivatives of dimensional quantities to take care of this and is not after all a good first issue.
e.g. what should the units of (co)tangents be? A tangent of x
is dx/dt
for some upstream real x
, so it should have units of x/t
, but a cotangent of x
is ds/dx
for some downstream real s
, so it should have units of s/x
. A few checks.
The Jacobian J
of f: x ↦ y
has units of y/x
. So ẏ = J * ẋ
has units of y/x * x/t = y/t
. We also have x̄ = J' * ȳ
with units of s/y * y/x = s/x
. All good.
Then we have <ẋ, x̄>
with the desired units <dx/dt, ds/dx>
= ds/dt
.
This would imply that the units of (co)tangents are dependent on more than just the units of the primal, unless we explicitly define (co)tangents as being wrt dimensionless reals s
and t
. Then the tangent has the same units as the primal, while the cotangent's units are the inverse of the primal's.
Am I missing something here?
I suspect some of the scalar rules should be using
oneunit
instead ofone
. For example,sign
.