Logic Representation

Facts are the general statements that may be either True or False. Thus, logic can be used to represent such simple facts. 
To build a Logic-based representation: 

·         User has to define a set of primitive symbols along with the required semantics.

·         The symbols are assigned together to define legal sentences in the language for representing TRUE facts.

·         New logical statements are formed from the existing ones. The statements which can be either TRUE or false but not both , are called propositions. A declarative sentence expresses a statement with a proposition as content; 
Example: The declarative "Cotton is white" expresses that Cotton is white. So, the sentence "Cotton is white" is a true statement.

What is Propositional Logic (PL)?

·         Propositional logic is a study of propositions.

·         Each proposition has either a true or a false value but not both at a time.

·         Propositions is represented by variables.
For example: Symbols 'p' and 'q' can be used to represent propositions.

There are two types of propositions:

1. Simple Preposition 
2. compound Prepositions.

1. A simple preposition:

It does not contain any other preposition. 
For example: Rocky is a dog.
2. A compound preposition:

It contains more than one prepositions.
For example: Surendra is a boy and he likes chocolate.
      
Connectives and the truth tables of compound prepositions are given below: 
Consider 'p' and 'q' are two prepositions then, 

1. Negation (¬p) indicates the opposite of p. 
Truth table for negation:

p

¬p

0

1

1

0


2. Conjunction (p q) indicates that p and q both and are enclosed in parenthesis. So, p and q are called conjuncts .
Truth table for conjunction: 

p

q

p q

0

0

0

0

1

0

1

0

0

1

1

1


3. Disjunction (p q) indicates that either p or q or both are enclosed in parenthesis. Thus, p and q are called disjuncts. 
Truth table for disjunction:


p

q

p q

0

0

0

0

1

1

1

0

1

1

1

1


4. Implication (p q) consists of a pair of sentences separated by the operator and enclosed in parentheses. The sentence to the left of the operator is called as an antecedent, and the sentence to the right is called as the consequent. 
Truth table for implication:


p

q

p q

0

0

1

0

1

1

1

0

0

1

1

1


5. Equivalence (p q) is a combination of an implication and a reduction. 
Truth table for Equivalence: 


p

q

p q

0

0

1

0

1

0

1

0

0

1

1

1