# Questions tagged [logic]

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

115 questions
Filter by
Sorted by
Tagged with
132 views

### Incorrect result by DSolve

For real $x$ consider the trivial equation $$|y'(x)|=-|x|.$$ Since the left side is always positive and the right always negative, there is no solution. Let's try ...
43 views

### Axiomatizing naturals

Trying to implement the naturals in Mathematica, I follow E. Mendelson, Introduction to Mathematical Logic, Ch. 3, Par. 1. Here is my code for the axioms (exept the induction axiom) ...
32 views

### How to check if solution to NSolve exists?

I'm trying to created a table where the entries are values of x, either given by x/.NSolve[...][] or a fixed value x0 if there is no numerical solution. Is there a way to find the truth value for ...
49 views

### perform logical or on sublist of a list efficiently

Given a huge list x of 0s and 1s and an increasing list i...
36 views

### First Order/Higher Order Logical Forward reasoning in Mathematica (Mathematica for FOL/HOL knowledge base)?

I am trying to develop Artificial Intelligence system that can automatically discover and apply reasoning patterns, templates, strategies (there is even theory for that - Cognitive Task Analysis). ...
55 views

### Natural deduction with FindEquationalProof

Out of curiosity, I'm trying to implement a natural deduction prover in Mathematica using FindEquationalProof. So far, I've implemented a few of the easier rules: <...
40 views

### Solving a ForAll optimization problem in Mathematica

I am trying to solve the following optimization problem in Mathematica: Minimize[{y0 + y2 m2, ForAll[x, y0+y2 x^2 >= Boole[x>0]]}, {y0,y2}] Unfortunately, ...
105 views

### count conditional items in list

I have a list of the form: {1,1, (1 if x>y, -1 if y>=x), -1} I want to count the number of 1's in the list. The output I'm looking for is something of the ...
36 views

54 views

### Help with actions in EventHandler

I am trying to write a program where the user types on the keyboard in a specified location, and Mathematica outputs what you are currently typing, plus a prediction that is updated in real time of ...
33 views

### List of elements joined by OR condition

A simple command Or[f, f, f] gives f || f || f How this can be done automatically? I try ...
467 views

### Given list of associations, generate a list of all common associations

Given a list of parameters and associated values, how can I generate a list of all common associations? For instance, given ...
163 views

### Apply Complement to a list of matrices

With a list of defined matrices list={a,b,c,d} How can I apply Complement to obtain Complement[list,{b,c}]=={a,d}
46 views

### Speeding up multiple conditional summations

I have situation where I have a matrix H, and want to build a set of ODEs dependent on the values of the eigenvalues, let me illustrate: ...