1
$\begingroup$

Using

$Assumptions = Element[n, Integers] && Element[a, Vectors[n, Reals]]

I can assume that a is a n-dimensional vector of Reals. How can I assume that a is a n-dimensional vector of zeros?

I tried adding this to the assumptions

Norm[a] == 0

such that the assumptions now look like this

$Assumptions = Element[n, Integers] && Element[a, Vectors[n, Reals]] && Norm[a] == 0

Since a is a vector and only the 0 vector has a Norm of zero, mathematica should now know that a is a vector of n zeros. However,

Refine[3*a]

returns 3 a instead of 0.

$\endgroup$
  • 3
    $\begingroup$ Why not simply define your vector to be what you seek? a = Table[0,{n}] $\endgroup$ – David G. Stork May 8 '15 at 22:51
  • $\begingroup$ I suspect that the question is about cases where n is a parameter/variable? I for one am curious about how Vectors[n, Reals] even works: does Mathematica ever respect the use of a symbol for the dimensionality or is Vectors[] meant for vectors whose size you know beforehand only? $\endgroup$ – nben May 8 '15 at 23:58
  • 1
    $\begingroup$ "Since a is a vector and only the 0 vector has a Norm of zero, mathematica should now know that a is a vector of n zeros" is a very dubious assertion. $\endgroup$ – m_goldberg May 9 '15 at 4:53
  • $\begingroup$ @m_goldberg I think that assumption is strictly true. The norm is zero iff the vector is zero. But Refine simply doesn't use the norm. $\endgroup$ – Jens May 9 '15 at 5:29
  • $\begingroup$ @Jens. The dubious part of the quote is "mathematica should now know". $\endgroup$ – m_goldberg May 9 '15 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.