Propositional Logic Flashcards
What is logic
- Science of valid reasoning → Aristotle
- Reasoning - constructing arguments based off conclusions about them so that the arguments presented are valid
where is logic used in comp sci
- Used in computer circuit design where each digital gate is represented by a ********logical connective********
- Data model for programming languages and systems
what are the applications of logic
- deductive systems
- expert systems and AI
- correctness programs
what are deductive systems
- Rule based approaches can be developed in PROLOG (a logic programming language)
- Facts and rules declared as horn clauses
- Similar to predicate logic
- To declare new facts and rules using original facts
- Infer certain facts from previous facts and chain them together
How is logic used in expert systems and AI?
How is logic used in correctness programs?
- Semantics of programming langages such as declaration of types
- Theorem provers (To test theories correctness)
- Verification and validation of programs (Is the compiler correct)
What is propositional logic?
How do you represent proopositions?
What are simple propositions?
Simple Proposition - Cannot be broken up into sub-propositions
What are compound propositions?
Compound Propositions - Can be broken down into sub-propositions
What are logical connectives?
**Combines simple propositions → compound proposition**
How does propositonal connectives work in terms of p and q?
How does truth tables work with propositional logic?
- Help express complicated propositions
- Helps combine expressions
- Set out all possible truth value combinations for the simple components
- Then shows each value of the compound statement
How does p -> q work in a truth table?
if p … , then q …
How does p <-> q work in a truth table?
if p … then q … , and conversly