Questions tagged [expression-test]

Questions about Mathematica's predicate functions.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
0answers
197 views

Bug in PositiveDefiniteMatrixQ?

Fixed in 10.1.0. Exists in at least 9.0.1 -- 10.0.2. This seems like a bug in PositiveDefiniteMatrixQ to me: ...
5
votes
0answers
63 views

Testing for membership with Bags?

Is there a faster way to test for membership in an Internal`Bag other than unpacking the whole thing like this? ...
2
votes
0answers
117 views
2
votes
0answers
149 views

How to test solvability of a Diophantine equation?

When applying the BRC theorem I need to test if an equation has a non-zero solution in integers. The equation is of form: $$x^2 + by^2 + cz^2 = 0$$ We could try to directly check if this equation ...
1
vote
0answers
59 views

Speed up for SequencePredictorFunction?

From Google Dive: SequencePredictorFunction is here, along with my test data. From pastbin: prediction function and data is here. Using the ...
0
votes
0answers
36 views

What is the proper way to feed this function as input and test if my statement is true?

$f(S)$ = {$n∈N$: $n=m²$ for $m∈S$} $S$ = $1,2,3$ Square each element in S Now, $S= 1, 4, 9$ All elements in $S$ are counting from $1$ to $N$. In this case $N=3$ $f(S)$ = {$n∈N$: $n=m²$ for $m∈S$} ...
0
votes
0answers
46 views

How to use === with condition?

I have two expressions, and they are same when k is positive and x is non-zero real number. Below code gives me ...
0
votes
0answers
42 views

How to test consistency of two assertions without hacking

Suppose I have a set of assumptions assum = x ∈ Reals && y ∈ Reals and I want to test an assertion like ...
0
votes
0answers
68 views

How to check if all the entries in columns of a matrix are equal?

Assume we have the following matrix/tensor. How can I test if the column has the same element? 4-6 and 8-9 columns has the same element. $ \left( \begin{array}{cccccccccc} \{2,3\} & \{2,3\} &...
0
votes
0answers
77 views

PolynomialQ always yields True?

I have a question about the PolynomialQ function in Mathematica. I have the polynomial (this is the Chebyshev's polynomial of the first kind) $$B=\frac{1}{2} ([x - \sqrt{(-1 + x^2)}]^n + [x + \sqrt{[-...