there is some kind of priorities for the elements in propositional logic ?
for example : p ∧¬q → r , given this ,we there may be two options
(p ∧¬q) → r OR p ∧ (¬q → r) , which one is the correct ?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community
If you look at formal definitions of the syntax of propositional logic, you will find that
$\qquad p \land \lnot q \to r$
is not a proper sentence; parentheses are needed to avoid exactly the ambiguity you mention.
Operator precedences can be used for implicit parenthesisation. You seem to be asking if there are agreed-upon operator precedences in logic.
I don't think formal logics contains this concept; formal grammars just do not lend themselves to model precedences (or any ambiguity) very well. In practice (by which I mean both blackboard writing and implemented logic parsers), we do use precedences; usual conventions include
in decreasing order of precedence. Using these, your example is equivalent to
$\qquad (p \land (\lnot q)) \to r$.
David's warning is apt, though: if you want to be clear, don't rely on implicit precedences. Typesetting can help -- you can e.g. group terms with spacings -- but in case of doubt, just put the parentheses. In a larger body of work, you can also state your convention once and safe symbols afterwards, provided you stick to your own rules.
It seems to be conventional that $\neg$ binds to the object immediately following it, so $\neg A \land B$ means $(\neg A) \land B$, rather than $\neg(A \land B)$.
Beyond that, the safest option is to treat all other operators as having equal precedence and use enough parentheses to force the reading you intend. In the past, authors frequently asserted or assumed precedence rules because syntax was seen as being more interesting in and of itself. However, such rules are rather arbitrary. For example, one might assert that $\land$ is multiplication modulo 2 and $\lor$ is addition modulo 2 so $\land$ should have higher precedence. But this doesn't help much because $\land$ and $\lor$ have different distributivity properties to $\times$ and $+$, at least in the non-modular setting that we're used to.
Nowadays, except for negation, it seems more common to just disambiguate by bracketing. If you see a modern author asserting or, worse, assuming precedence rules, I suggest poking them with a stick until they stop.