You get a bonus - 1 coin for daily activity. Now you have 1 coin

Logic syntax

Lecture



The syntax of propositional logic defines admissible statements. Atomic utterances (indivisible syntactic elements) consist of one propositional symbol . Each such symbol denotes a statement that can be either true or false. To denote such symbols in this section, capital letters are used: P, Q, R , etc. These designations are arbitrary, but are often chosen so that they have some mnemonic meaning for the reader. For example, the symbol W 1,3, can be used to designate a statement, according to which the vampus is in the square [1,3]. (Recall that symbols, W 1,3, like are atomic; this means that W, 1 and 3 should not be viewed as meaningful parts of this symbol.) There are two propositional symbols that have a constant meaning: True is the identically true statement, and False - identically false statement.

Complex sentences are formed from simpler statements using logical connectives . The five logical tangles described below are widely used.

  • ¬ (no). A statement such as ¬W 1,3 is called the negation of a statement W 1,3 . A literal is either an atomic statement ( positive literal ) or a negative atomic statement ( negative literal ).
  • ˆ (i). A statement whose main bundle is ˆ, such as W 1,3 ˆ P 3,1 , is called a conjunction ; its parts are called conjuncts. The symbol ˆ resembles the letter "A" in the word "And" - "And".)
  • v (or). A statement that uses a bunch of v, such as (W 1,3 ˆ P 3,1 ) v W 2,2 , is called a disjunction (W 1,3 ˆ P 3,1 ) and W 2,2 . (Historically, the designation v comes from the Latin word "vel", which means "or". Most people find that the shape of this bundle is easiest to remember as an inverted ˆ.)
  • => (entails). A statement like (W 1,3 ˆ P 3,1 ) => ¬W 2,2 is called implication (or a conditional statement). Its premise , or antecedent , is (W 1,3 ˆ P 3,1 ), and its conclusion , or sequential , is ¬W 2,2 . Implications are also called rules, or if - then statements (if - that). In other sources, the implication character is sometimes written as →.
  • <=> (if and only if). A statement like W 1,3 <=> W 2,2 is called a two-way implication .

The formal grammar of propositional logic is shown in the listing;


Grammar of propositions of propositional logic in the form of BNF (Backus-Naur Form - Backus-Naur form)
Sentence -> AtomicSentence | Complexsentence
AtomicSentence -> True | False | Symbol
Symbol -> P | Q | R | ...
ComplexSentence -> UlSentence
| (Sentence a Sentence)
| (Sentence v Sentence)
| (Sentence => Sentence)
| (Sentence <=> Sentence)


Please note that this grammar has strict requirements for the use of parentheses: each statement formed using binary bundles must be enclosed in parentheses. This ensures complete syntax consistency. This requirement also means that you should write, for example, ((A ˆ B) => C), for example, instead of A ˆ B => C. But for readability, we will often omit the parentheses, relying instead on the use of precedence order bundles. This is similar to the precedence rules used in arithmetic, for example, the expression ab + c is read as ((ab) + c), and not as a (b + c), since the multiplication operation has a higher priority than addition. The order of precedence in the propositional logic (from the highest to the lowest) is as follows: ¬, ˆ, v, => and <=>. Therefore saying
¬P v Q И R => S is equivalent to the statement (( ¬P) v (Q И R)) => S

Determining the priority order does not eliminate ambiguity when reading statements such as A И B И C , which can be read as (((A И B ) И C ) or (A И ( B И C )). But since these two readings, according to the semantics described in the next section, mean the same thing, statements like A И B И C are allowed .

Statements like A v B v C and A <=> B <=> C are also allowed. And statements such as A => B => C are not allowed, since for them the corresponding two readings have a different meaning; we insist that in this case round brackets should be used. Finally, sometimes, instead of parentheses, square brackets are used, if this allows a little easier understanding of this statement.

created: 2014-09-23
updated: 2021-03-13
132481



Rating 9 of 10. count vote: 2
Are you satisfied?:



Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Logics

Terms: Logics