Does isAlways Make an Unwarranted Assumption that a Variable is real?
Define a sym variable
syms v
isAlways can’t prove that v is real. Makes sense.
isAlways(in(v,’real’))
Now make an assumption
assume(v > 0); % (1)
Is that assumption a sufficient condition to imply that v is real?
isAlways(in(v,’real’)) %(2)
Apparently it does.
But we don’t see that v is real in the assumptions
assumptions(v)
as we would if stated explicitly
assumeAlso(v,’real’);
assumptions(v)
Now define v as a complex number, which clears all of the assumptions
v = sym(1+1i);
assumptions(v)
Here, v satisfies assumption (1) because symbolic gt only compares the real parts of both sides (though the doc page does not state that explicitly)
isAlways(v > 0)
But satisfying assumption (1) in this case does not imply the truth of condition (2) (thankfully)
isAlways(in(v,’real’))
Seems like the correct way for the software to interpret (1) would be Re(v) > 0, in accordance with the de facto definition of gt, which would provide no information for evaluating (2).Define a sym variable
syms v
isAlways can’t prove that v is real. Makes sense.
isAlways(in(v,’real’))
Now make an assumption
assume(v > 0); % (1)
Is that assumption a sufficient condition to imply that v is real?
isAlways(in(v,’real’)) %(2)
Apparently it does.
But we don’t see that v is real in the assumptions
assumptions(v)
as we would if stated explicitly
assumeAlso(v,’real’);
assumptions(v)
Now define v as a complex number, which clears all of the assumptions
v = sym(1+1i);
assumptions(v)
Here, v satisfies assumption (1) because symbolic gt only compares the real parts of both sides (though the doc page does not state that explicitly)
isAlways(v > 0)
But satisfying assumption (1) in this case does not imply the truth of condition (2) (thankfully)
isAlways(in(v,’real’))
Seems like the correct way for the software to interpret (1) would be Re(v) > 0, in accordance with the de facto definition of gt, which would provide no information for evaluating (2). Define a sym variable
syms v
isAlways can’t prove that v is real. Makes sense.
isAlways(in(v,’real’))
Now make an assumption
assume(v > 0); % (1)
Is that assumption a sufficient condition to imply that v is real?
isAlways(in(v,’real’)) %(2)
Apparently it does.
But we don’t see that v is real in the assumptions
assumptions(v)
as we would if stated explicitly
assumeAlso(v,’real’);
assumptions(v)
Now define v as a complex number, which clears all of the assumptions
v = sym(1+1i);
assumptions(v)
Here, v satisfies assumption (1) because symbolic gt only compares the real parts of both sides (though the doc page does not state that explicitly)
isAlways(v > 0)
But satisfying assumption (1) in this case does not imply the truth of condition (2) (thankfully)
isAlways(in(v,’real’))
Seems like the correct way for the software to interpret (1) would be Re(v) > 0, in accordance with the de facto definition of gt, which would provide no information for evaluating (2). assumption, isalways MATLAB Answers — New Questions









