Ask Your Question
3

assume a variable has two possible values

asked 2016-01-02 23:53:00 +0200

daniele gravatar image

Hi,

how can I assume that a variable admits only a finite number of possible values? E.g., the variable x can only be 0 or 1. I could assume that

x*(x-1)==0

but I am looking whether there is a straightforward way, too.

thanks in advance

edit retag flag offensive close merge delete

Comments

The assumption system is not working well (some assumptions are not taken into account during some computations). Could you please tell us about your initial problem ? Perhaps this first problem could solved with a non-symbolic approach.

tmonteil gravatar imagetmonteil ( 2016-01-04 15:36:34 +0200 )edit

dear Thierry, what kind of assumptions are not taken into account? and what do you mean by "not taken into account"? the problem is related to a reseach problem I'm studying. I should try to write a sample example. Roughly speaking, I have objects in a Lie algebra (whose structure equations may depend on parameters), and I am declaring objects with variable coefficients. Some additional properties add constraints on the possible values of the coefficients. I am using assume() to take into account the several properties. Thanks in advance, all the best,

daniele gravatar imagedaniele ( 2016-01-04 17:48:08 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-04 15:18:44 +0200

slelievre gravatar image

You could assume x is integer, and x >= 0, and x <= 1.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-02 23:53:00 +0200

Seen: 387 times

Last updated: Jan 04 '16