# Tagged Questions

Questions on use and formulation of logical operations, including both functions for programming and for mathematical operations.

41 views

### Splitting Logical Expression in list of expressions

I have long results of a Reduce statement in the form of {(expr1) || (expr2) || (expr3) || ...} I am looking for a way to split ...
172 views

### Is there an easy way to do set counting in Mathematica?

I'm using counts of elements in sets, along with logic. So, for instance, I'd like to determine if Count[$a \land \neg b$] = Count [$a$] - Count[$a \land b$] ...where ...
95 views

### How to do symbolic logic in Mathematica

I'm currently in Symbolic Logic with homework assignments (not asking for people to do my homework for me) with questions such as the following: (derive the conclusion using the eighteen rules of ...
73 views

### How to use recursion to find a logical dual

I want to make a little function that goes through a propositional formula and gives it's dual. Here is what I currently have: ...
64 views

### How to prove that an equation can be divided by any n?

I'm new to Mathematica and came across with the problem. I can't prove that (for example) 2*n is always even no matter what n is....
130 views

### Logical AND of multiple patterns

Mathematica provides an equivalent for "logical OR" when pattern matching, using Alternatives or the infix | operator. For ...
53 views

### Function that outputs the dual of the formula

The exercise is simple: define a function that gives the dual of the formula. While I have experience in mathematics and logic, I do not have real experience in programming. Logic is propositional ...
69 views

### Creating Boolean expressions over a set of indexed variables

I've read lots of examples here on how to set one matrix Equal to another, but how do you nest And and ...
43 views

### Getting a set of disjoint regions from the set of overlapping regions

Suppose I have two overlapping regions $R1$ and $R2$ looking like this: ...
265 views

### TrueQ returning False on true statement

Why does TrueQ return False on the following? TrueQ[Log[2]/Log[8] == 1/3] (* False *) ...
5k views

### Elegant solution to the Zebra [logic] Puzzle (“Einstein's Riddle”)

The famous Zebra Puzzle (Wikipedia), often called "Einstein's Riddle," is a logic puzzle that can be solved deductively by applying a list of logical rules. One version of the riddle (from Wikipedia) ...
54 views

### Clues on theorem proving tools?

I'm trying to prove $[a \cup (b \cap c ) = (a\cup b)\cap (a\cup c)]$ with mathematica. But I don't know what function I should use. I've rewritten the sentence in the following way: ...
89 views

### How can I draw truth tables using Mathematica [duplicate]

For instance, the given expression p ⊕ (p v q) In the problem I'm trying to solve. There's a Mathematica answer to this: ...
65 views

### Simplifying between set theory and logical connectives

I'm trying to find out how to switch between set notation and logic, but am having difficulty. For instance, I know that the following two expressions are equivalent ...
36 views

### Solving systems of logial and set theoretic propositions

I need to allocate a couple of dozen elements into different sets, respecting some boundary conditions, and was hoping Mathematica might somehow help. A simple example: The propositions being a) a ...
422 views

### What exactly is Implies? Is it a logical test?

I ran the following to simplify my logical test (expecting something in terms of And and Or ...) ...
641 views

### How can we create Randolph diagrams in Mathematica?

I have become fascinated with Randolph Diagrams and was wondering how we would create the diagrams from logical sequences using Mathematica? It looks like it would be a combination of logic and ...
61 views

### Is there a way to make a set of all real numbers within a range? [closed]

Is there a way to create a set of all real numbers within a range? For example, the range between 1300 and 1500, including 1500 in normal distribution. Thank you very much. My problem exactly: $A$ –...
45 views

### Resolving logical statement returns statement as answer instead of boolean value? [closed]

I ran the following command: ...
55 views

### How to get Mathematica to make further simplifications to conditional expressions than it has already made?

I have the following Mathematica result under the assumption that {ax, bx, px, ay, by, py} \[Element] Reals, and after refinement by ...
56 views

### Boolean value of proposition assuming previous boolean values of parts of the proposition

Is it possible to ask Mathematica to give us the boolean value of a proposition assuming the boolean value of some parts of it? For instance, give the boolean value of $p\vee q$ assuming that $p$ is ...
148 views

### FunctionInterpolation and Which combine badly

Update 2: Got two solid answers, but had trouble implementing one, and found the other could only save me computation time by sacrificing accuracy. So I chose neither as an official answer, but they'...
157 views

### Logic programming with Mathematica

My question is: Wikipedia says that there is logic programming paradigm support in Mathematica (like In Prolog). Could anyone provide me with an example of using this paradigm in Mathematica?
100 views

### Using quantifiers with free indices as declarative conditions in equation solving

This is a toy example: Is there a way to rewrite Reduce[{Norm@{c[1], c[2], c[3]} == 1, 0 <= c[1] < c[2] < c[3]}, {c[1], c[2], c[3]}] ...
106 views

### Defining an arbitrary binary relation

I am trying to define some binary operators. A binary operator operates on a set of variables V and is defined by a subset S of pairs of those variables {Vi,Vj}. For example, "=",">",">=" are all ...