Questions on the functionality of Mathematica for Boolean computation.

learn more… | top users | synonyms

39
votes
7answers
5k views

Intersecting graphics

Does the Mathematica graphics system have any concept of intersecting graphics? I've not found much in the documents so far. For example, if I want to show the intersection of two shapes: ...
19
votes
8answers
692 views

Applying And to lists of Booleans

I'd like to take {True,True,False} and {True,False,False} and apply And to get ...
27
votes
5answers
2k views

Are there “All” and “Any” functions in Mathematica?

In Python, there is a function all which returns true if all of its arguments are true, and any which returns true if at least ...
2
votes
1answer
237 views

Convert boolean test function to pattern?

What is a "reverse" to MatchQ? MatchQ converts pattern into boolean function. So how to convert back? Suppose I want to use ...
12
votes
2answers
790 views

Simplify assumes Boolean 1 and 0 in logical expressions

Per this chat discussion and this previous question where I encountered the strange behaviour: ...
1
vote
2answers
368 views

3D Contour Plot parts of sphere with gradient less than 0, equal to 0 and more than 0

I want to plot only parts of the sphere of radius 1 where the gradient $\frac{\partial z}{\partial x}$ is < 0, = 0 and > 0. The full sphere is given by: ...
4
votes
3answers
372 views

Fast method for combining two lists

I have two lists, v1 and v2. Each element of the lists may be positive or negative. I want to create a list ...
5
votes
2answers
169 views

How to get the boolean value of an inequality involving an InterpolatingFunction?

Here's the code: yan = FunctionInterpolation[x^2, {x, -1, 1}]; FullSimplify[yan[x] > -1, -1 < x < 1] Needless to say, what I expect to see in the output ...
4
votes
0answers
156 views

Can I define an axiomatic (Boolean algebra) system and prove theorems using Mathematica?

The general question is Can I define an axiomatic system and prove theorems using Mathematica? The more concrete one is about Boolean algebra. I consider this axiomatic Boolean algebra system ...
4
votes
3answers
139 views

Is there an equivalent of Sum for And?

Is there an equivalent to Sum for And? That is, just like instead of ...
4
votes
1answer
323 views

Using Boole to integrate over region

I have a complex and long piecewise function to integrate, so I have written a Mathematica script that cuts the whole range of integration, evaluates the integrand in each region and then integrates ...
1
vote
2answers
72 views

Discrete Measure between Binary Vectors

I would like a discrete distance measure between two binary vectors (or strings). Like HammingDistance but I want the vectors to be considered closer if they have ...
1
vote
1answer
142 views

Conditionals slower than operators?

I want to make my application faster. I tried to replace an If condition with operators. The If condition is ...