28 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
156
views
Generate as short as possible boolean formula from a given truth table [closed]
Given a truth table, maybe 3-vars, 5-vars or even 10-vars, i can write its formula in DNF or CNF, and simplify it using K-Map or Quine-McCluskey algorithm. But it is based on {NOT, AND, OR}. Now the ...
1
vote
1
answer
78
views
Binary Tree Propositional Calculator in C language
I am trying to implement a post-order propositional calculator using a binary tree in a recursive fashion. T represents True, F false, N not, A and, and O or. I tried running the code with GDB, but ...
0
votes
0
answers
48
views
Propositional Logic in Prolog - Incorrect Representations
There are certain premises which I am unable to represent correctly in prolog, which are as follows:
"I can only sleep well if I am neither in a noisy environment nor have caffeine before ...
0
votes
1
answer
167
views
Express each of these statements in terms of C(x), D(x), F(x), quantifiers, and logical connectives
Let C(x) be the statement "x has a cat,"
let D(x) be the statement "x has a dog,"
let F(x) be the statement "x has a ferret."
Express each of these statements in terms of C(x), D(x), F(x), quantifiers,...
-6
votes
1
answer
254
views
How to create an algorithm that takes as input a propositional logic expression without parentheses and encloses the same in parentheses in Python
I'd like to create an algorithm that takes as input a propositional logic expression without parentheses and outputs the same expression enclosed in parentheses in all possible ways depending on the ...
0
votes
2
answers
110
views
Max of a list of vectors of Boolean using z3 for resolution of SAT problem
I am working on a Sat project, one of my subtasks is to compute the max of a list of a vectors of boolean, each of them is a number. An example of the vector is [False,True,True,False], it represents ...
0
votes
1
answer
238
views
Material Conditional and Equivalence in Programming
I have just started reading into propositional calculus/logic, and have realised that a lot of the foundational concepts in this area are similar to those encountered in programming. That is, ...
0
votes
0
answers
89
views
Proposition formula splitting method? -Truth table generator(py)
I have been working on this project and came to this trouble on the process of obtaining the parts of the formula for a separate evaluation.
Like for example: (~p>~q)^(~(p^q))
I should get:
(~p)
(~...
2
votes
1
answer
511
views
How to determine if two propositional formulas are equivalent in Prolog?
I'm new to Prolog and have some doubts.
I need to write a function form_equiv(A,B) that tells us if if B is equivalent to A
where A and B are supposed to be propositions.
I know that two propositions ...
0
votes
2
answers
116
views
Python - dictionary with propositions (replace string values)
I have some dictionary e.g. of form:
my_dictionary = {'A': '¬(p)', 'B': '→(q, ∧(¬(p), ∨(y, z)))', 'Aim': ['p', '→(p, q)']}
Is their a simple way to replace all strings appearing in the dictionary ...
1
vote
3
answers
80
views
Python - join propositions
I have an list of strings which illustrate propositions. E.g.
L = ['(A∧B)', 'A', 'B']
My aim is to join each element with the string '∧' and brackets "()", which results in following string:...
2
votes
2
answers
110
views
Coq: a vicious circle with two identical subgoals
Sorry for overcomplicated example. I have
Lemma test : forall x y z : Prop,
(
(((x → (y ∨ z)) → (x ∨ y)) ↔ (x ∨ y))
∧ (((y → (x ∨ z)) → (x ∨ y)) ↔ (x ∨ y))
∧ ((y → (x ∨ z)) → (x ∨ (x → (y ...
-1
votes
1
answer
199
views
Propositional logic, logical equivalent
a) Determine whether the following statement forms are logically equivalent:
p -> (q -> r) and (p -> q) -> r
b) Use the logical equivalence established in part (a) to rewrite the ...
0
votes
1
answer
176
views
Is satisfiability related to a set of sentences of a single sentence?
While going through online resources, I have noticed that satisfiability is taken differently.
Sometimes resources ask for showing that a given proposition is satisfiable or not?
However, sometimes ...
-2
votes
1
answer
159
views
Difficulty with propositional logic in prolog [closed]
I need to convert the following propositions into prolog code and I have do not understand how the operators work. I usually use java.
"Jeans are only casual, dress pants are only formal, kakis ...