# logic's questions - English 1answer

617 logic questions.

### Can the foundation of computer science be implemented to include new rules of inference so that computer can do causal reasoning?

The idea I'm thinking of is about a top-down approach for AI. I would like to know if there can be a model for computers so that they can perform causal reasoning. It seems that causal relation can be ...

### VBA code to remove cell value if call value equal to 0 [on hold]

I have some data in excel that has many formulas in, for ease I have copied and pasted the values into a block range. The formula's give an output of 0 when not applicable and the correct number when ...

### How express this short sentence in CTL?

It's possible that in some following state you have that $x,y$ are both true simultaneously. I have taken a look on Wikipedia: https://en.wikipedia.org/wiki/Computation_tree_logic and if I ...

### Propositional extentionality in the lean theorem prover?

0 answers, 12 views logic type-theory type-checking
Propositional extentionality in the lean theorem prover is stated as the following axiom: axiom proptext {a b : Prop} : (a $\iff$ b) \to a = b My confusion about this is as follows: Previously I’...

### 2 How do you correctly write this sentence as a CTL formula?

Sentence: From every reachable state it is possible to reach a state where $p$ is true. How do you write this sentence as a CTL formula? So far I only dealt with CTL syntax and trees but maybe it ...

### Type theory based automated theorem prover?

I know that there exist type theory based proof-checker, and I know that there are logic/sequent-calculus based automated theorem provers. But I haven’t heard of a type-theory based automated theorem ...

### 4 A universal operator necessarily generates $\neg x$ for input $x,…,x$

1 answers, 41 views logic boolean-algebra
I originally posted this on math.stackexchange, but then deleted it and moved it here since I think it would fit this site more. I saw a claim in a slideshow from a basic computer architecture course ...

### 1 Drawing an implication graph for 2-SAT clauses

1 answers, 3.889 views complexity-theory logic satisfiability
I am trying to convert the following 2-sat clauses to implications and then draw the implication graph. The clauses are: ...

### 4 Is there a way to convert a program into a Boolean formula?

Let's say I have a program P, in form of a binary code for x86 architecture. I want to find a Boolean formula F (in form of CNF, or something like that), such ...

### 1 Relational calculus to SQL

I am somewhat aware of the correspondence between (tuple and domain) relational calculus, relational algebra, and SQL. To the best of my understanding, one should be able to automatically convert a ...

### 1 Given a rng that outputs 0 or 1 with an equal probability, make a rng that generates 1 with a probability p

So this was an interview question I had a few weeks back that I just haven't been able to think of how to solve... Given a random number generator that returns 0 or 1 with a 50% chance of either, ...

### Logic gate which checks if the input is a negative number and changes its output based on that

1 answers, 27 views logic boolean-algebra
I need to create a HDL which will use logic gates to demonstrate if something is a negative number in two's complement. The input is 8 bits, while the output is 1 bit, and if the input is a negative ...

### 1 How to minimize large DNF formula into deeper but smaller formula?

0 answers, 24 views logic propositional-logic
I want to minimize DNF formula which has ~200k products combined into a sum. The depth of that formula is 2 - first level is the OR, and second level is AND for all conjunctions. I have tried using ...

### 5 XOR two numbers

5 answers, 1.139 views logic arithmetic xor
Is there an intuitive meaning of XOR of two numbers not involving binary and just decimal? Or is is always converted into binary and then XORed?

### 3 Detect non existence of a cycle in a graph using Datalog : SMTLIB Format for Z3

1 answers, 81 views graphs logic sat-solvers datalog
I want to detect the non existence of a cycle in a graph using Datalog (which is a declarative logic programming language). The proposed solution was: ...

### What if an $L$-complete problem has $NC^1$ circuits? More generally, what evidence is there against $NC^1=L$?

What if an $L$-complete problem has $NC^1$ circuits? More generally, what evidence is there against $NC^1=L$?

### 13 The difference between dynamic logic and temporal logic

To find the difference, I'd just encountered with assertions below about temporal logic in Wikipedia: another variant of modal logic sharing many common features with dynamic logic, differs from ...

### 2 Finiteness of the set of equivalence classes of formulas generated by boolean combination

1 answers, 31 views logic modal-logic
Define a relation $\equiv$ on the set of modal formulas by $\phi \equiv \psi \Leftrightarrow (\forall M\forall w, M,w \models \phi\Leftrightarrow M,w \models \psi)$ (so it is an equivalence relation) ...

### 3 An instance when you can eliminate propositional double negation in coq

0 answers, 33 views programming-languages logic coq
Suppose st: string -> nat and X stands for the string 'X'. Given the hypothesis ...

### 5 propositional Modal logic filtration definition

Hello I have a slightly unusual question which relates to a definition of filtration structure. The following is my current state of the definition: $\mathcal{M} = (W, R, L)$, W is a set of worlds, ...

### 1 What's the output of this algorithm?

1 answers, 34 views algorithms algorithm-analysis logic
Given the question below: Consider that, on the procedure below, the variable X is defined globally and the parameters of the vr function are passed by value ...

### Logic unification with list

0 answers, 28 views logic unification
So I am studying for an exam which includes unification. I am fairly confident in unifying and calculating the mgu. But I am having trouble understanding how to prove if the following is unifiable or ...

### Boolean Algebra Simplifying complex equation

1 answers, 24 views logic circuits algebra
I am trying to simplify the following equation and I am getting stuck on a line and I can't cut it down any further. I'm not sure if certain 'moves' are legal or not. F(A,B,C,D) = A'B'C' +ACD + A’BCD ...

### 2 How to represent symbolic knowledge using real numbers - theory about neural networks and natural/analog computing?

One can define the semantics of one definite word using the references to real world entities, relationships with the other words and other concepts and represent all this knowledge about this one ...

### Writing LTL formula for sequencing with coordination

Suppose there are 2 workers w1 and w2 who can cool a hot iron. So if iron is hot (denoted by atomic proposition ...

### 4 Logical characterization of P versus NP problem (and references for least fixed point logic)

Wikipedia says the following (and more) about the logical characterization of the P versus NP problem here: Thus, the question "is P a proper subset of NP" can be reformulated as "is existential ...

### 6 Does Provable P equal Provable NP?

2 answers, 169 views complexity-theory logic p-vs-np
My question is a very basic one. It seems feasible to believe that $\mathsf{P = NP}$, because there is some "pathological" good algorithm for SAT, yet it is impossible to prove that the algorithm is ...

### Are there any implementations of computability logic?

1 answers, 62 views computability logic
I'm currently looking into Japridze's computability logic. It looks great, but I was wondering whether any programming languages or systems implement it. Does anyone know of any implementation? ...

### 3 Represent there are infinitely many in FOL

3 answers, 75 views logic first-order-logic
How to represent in first order logic the expression: "there are infinitely many" To be honest I'm confused and not even sure whether you can represent them in first order logic.

### -1 Optimization problems and quantifiers

1 answers, 29 views optimization logic
A simple optimization problem is of form $\max_{x\in\mathcal R}f(x)$. We can quantify as $\exists x\in\mathcal R\forall y\in\mathcal R f(y)\leq f(x)$. The quantification here is $\exists\forall$. ...

### Easiest way to find y in $x \text{ xor } y = z$ with given $x \text{ and } z$

2 answers, 48 views logic bit-manipulation
Let's say we have given two numbers $x, z$, and we need to find another number $y$ such that $x \text{ xor } y = z$. The xor ( exclusive or ) is bitwise operation: xor table . I know that this can be ...

### 6 Why does the copycat strategy work for two parallel chess games?

2 answers, 1.413 views computability logic
I'm currently looking into computability logic. Japaridze explain that a game !P v P like !Chess v Chess is always winnable thanks to the copycat strategy (http://www.csc.villanova.edu/~japaridz/CL/3....

### Boolean expression to a truth table

1 answers, 40 views logic boolean-algebra
How do I fill a truth table from the following expression? I can't decide whether it is SOP or POS.Y=(A+B)C+AB+(A+C)C+(`AB)