## Search

**What is logic ?**
- We can also think of logic as an "algebra" for manipulating only two value : true(T) and false (F)
We will cover :
- **Propositional logic** -- the simplest kind
**Propositional Logic**
**Propositional logic** consists of:
- The logical values **true** and **false** (**T** and **F**)
- Propositions; "sentence", which
- Are atomic (that is, they must be treated as indivisible units, with no internal structure), and
- Have a single logical value, either
**true** and** false **

** - **Operators, both unary and binary; when applied to logic values, yield logical values
- The usual operators are and, or not, and implies

**Propositional logic: Syntax**

- Propositional logic is the simplest logic -illustrates basic ideas
- The propositional symbols P1,P2 etc are sentences
- If S is sentence, -S is a sentence (negation ,not)
- If S1 and S2 are sentence S1^S2 is a sentence (conjunction, AND)
- If S1 and S2 are sentence S1vS2 is a sentence (disjunction, OR)
- If S1 and S2 are sentence S1⇒S2 is a sentence (implication, IMPLIES)
- If S1 and S2 are sentence, S1⇔S2 is a sentence (biconditional)

**Truth Table**

Logic, like arithmetic, has operators, which apply to one, two, or more values (operands)
A truth table lists the results for each possible arrangement of operands
- Order is important: **x op y** may or may not give the same result as *y op x*
The rows in a truth table list all possible sequence of truth value for n operands, and specify a result for each sequence
* - *Hence, there are 2n rows in a truth table for n operands.

**Unary Operators **

There are four possible unary operators:
Only the last of these (negation) is widely used (and has a symbol- for the operation)

**Useful binary operators**

Here are the binary operators that are traditionally used:

Notice in particular that material implication (®️) only approximately means the same as the English word "implies"
Any other binary operators can be constructed from a combination of these (along with unary not, á„€)
**Logical expressions**
All logical expressions can be computed with some combination of and (∋), or ( ( ), and not (⇽) operators
For example, logical implication can be computed this way:
Notice that ←X (Y is equivalent to X ®️Y

## No comments:

## Post a comment