Search code examples
maple

Assuming several variables in Maple


I trying to make a constraints for the variables in Maple 17. But it works unpredictably. As you can see there are no constraints for the variables N and r. So what is a problem?

assume(m::integer, m > 0);
assume(N::integer, N > 0);
assume(r::integer, r > 0, r >= m, r <= N-m);
assume(k::integer, k >= 0, k <= m);
about(m, k, N, r);

Originally m, renamed m~:
  Involved in the following expressions with properties
    -m+k assumed RealRange(-infinity,0)
  is assumed to be: real
  also used in the following assumed objects
  [-m+k] assumed RealRange(-infinity,0)

Originally k, renamed k~:
  Involved in the following expressions with properties
    -m+k assumed RealRange(-infinity,0)
  is assumed to be: AndProp(integer,RealRange(0,infinity))
  also used in the following assumed objects
  [-m+k] assumed RealRange(-infinity,0)

Originally N, renamed N~:
  nothing known about this object

Originally r, renamed r~:
  nothing known about this object

Solution

  • I found the answer:

    assume(m::integer, m > 0);
    assume(k::integer, k >= 0);
    additionally(k <= m);
    assume(N::integer, N > 0);
    assume(r::integer, r > 0);
    additionally(r >= m);
    additionally(r <= N-m);