我试图对Maple 17中的变量进行约束。但是它的工作方式不可预测。如您所见,变量N
和r
没有约束。那么问题是什么?
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
答案 0 :(得分:0)
我找到了答案:
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);