ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 26 Sep 2022 03:11:43 +0200Failure to check simple conditions using boolean testshttps://ask.sagemath.org/question/64177/failure-to-check-simple-conditions-using-boolean-tests/ Hi folks,
I am currently designing a microeconomics course using SageMath (9.6) on CoCalc. For one exercise, I would like to use boolean tests to determine whether a production function is exhibiting increasing/constant/decreasing returns to scale.
Doing so, I ran into the following oddities (probably linked to one another), which I was hoping someone could help me with :
a = var("a")
assume(a > 1)
assume(a, "real")
# Check that 'a' is positive
print(a.is_positive()) # First oddity
# Check that sqrt(a) < a
print(bool(a**(1/2) < a)) # Second oddity
> False
> False
Both statements should obviously be true. I am getting the same results when running the code on SageMath 9.1 and SageMath 9.4. Am I missing something or are we dealing with a bug ?
Any help will be greatly appreciated.
----------
ltmbMon, 26 Sep 2022 03:11:43 +0200https://ask.sagemath.org/question/64177/