Logic and Proof Logic Propositional Equivalence Predicates and
- Slides: 94
강의 내용 Logic and Proof 논리(Logic) 명제의 동치(Propositional Equivalence) 술어와 한정기호(Predicates and Quantifiers) 중첩된 한정기호(Nested Quantifiers) 증명 방법(Methods of Proof) 가설(Conjectures) Page 2 Discrete Mathematics by Yang-Sae Moon
명제(Proposition) Logic 명제의 정의 • 명제란 참(true, T) 또는 거짓(false, F)을 판정할 수 있는 선언적 문장을 말한다. • A proposition (p, q, r, s, …) is a declarative statement that is either true (T) or false (F), but not both. 명제의 예제 • 1 + 1 = 2. (T) • 2 + 2 = 5. (F) • Seoul is the capital of Korea. • 11213 is prime. 명제가 아닌 예제 • Who is there? (not declarative, question) • Just do it! (command) • x + 2 = 5. (non-constant value, variable) Page 4 Discrete Mathematics by Yang-Sae Moon
논리 연산자(Logical Operator) (2/2) Logic Boolean Operator의 예 명칭(영어) 명칭(한글) Nickname Arity Symbol Negation operator 부정 연산자 NOT Unary ¬ Conjunction operator 논리곱 연산자 AND Binary Disjunction operator 논리합 연산자 OR Binary XOR Binary IMPLIES Binary IFF Binary ↔ Exclusive-OR operator 배타적OR 연산자 Implication operator 함축 연산자 Biconditional operator 상호조건 연산자 Page 6 Discrete Mathematics by Yang-Sae Moon
부정(Negation) (1/2) Logic 부정의 정의 • p가 명제이면, “It is not the case that p” 역시 명제이며, 이를 p의 부정 (negation)이라 하며, ¬p(not p)로 표기한다. • The unary negation operator “¬” (NOT) transforms a proposition into its logical negation. 부정 명제의 예제 • 명제(p) “I have brown hair. ”의 부정 명제(¬p)는 “I do NOT have brown hair. ” 이다. • 명제 “Today is Sunday. ”의 부정 명제는 “Today is NOT Sunday. ”이다. Page 7 Discrete Mathematics by Yang-Sae Moon
부정(Negation) (2/2) Logic Negation operator의 truth table p ¬p T F F T Operand column Result column Page 8 Discrete Mathematics by Yang-Sae Moon
논리곱(Conjunction) (1/2) Logic 논리곱의 정의 • p와 q가 명제이면, “p and q”도 명제이며, 이를 p와 q의 논리곱(conjunction) 이라 하고, p q라 표기한다. 이 명제는 p, q가 모두 참일 때만 참이 되며, 그 외는 모두 거짓이 된다. • The binary conjunction operator “ ” (AND) combines two propositions to form their logical conjunction. 논리곱 사용의 예제 • p = “I will have salad for lunch. ”, q = “I will have a steak for dinner. ” • p q = “I will have salad for lunch and I will have steak for dinner. ” Page 9 Discrete Mathematics by Yang-Sae Moon
논리곱(Conjunction) (2/2) Logic Conjunction operator의 truth table p T T F F q T F p q T F F F Page 10 Discrete Mathematics by Yang-Sae Moon
논리합(Disjunction) (1/2) Logic 논리합의 정의 • p와 q가 명제이면, “p or q”도 명제이며, 이를 p와 q의 논리합(disjunction)이라 하고, p q라 표기한다. 이 명제는 p, q가 모두 거짓일 때만 거짓이 되며, 그 외는 모두 참이 된다. • The binary disjunction operator “ ” (OR) combines two propositions to form their logical disjunction. 논리합 사용의 예제 • p = “My car has a bad engine. ”, q = “My car has a bad carburetor. ” • p q = “My car has a bad engine, or my car has a bad carburetor. ” Page 11 Discrete Mathematics by Yang-Sae Moon
논리합(Disjunction) (2/2) Logic Disjunction operator의 truth table p T T F F q T F p q T T T F Page 12 Discrete Mathematics by Yang-Sae Moon
배타적-OR (Exclusive-OR) (1/2) Logic 배타적-OR의 정의 • p와 q가 명제이면, “p exclusive-or q”도 명제이며, 이를 p와 q의 배타적OR(exclusive-or)라 하고, p q라 표기한다. 이 명제는 p, q 중 어느 하나만이 참일 때만 참이, 그 외는 모두 거짓이 된다. • The binary exclusive-or operator “ ” (XOR) combines two propositions to form their logical “exclusive or”. 배타적-OR 사용의 예제 • p = “I will earn an A in this course. ”, q = “I will drop this course. ” • p q = “I will either earn an A for this course, or I will drop it (but not both!). ” Page 13 Discrete Mathematics by Yang-Sae Moon
배타적-OR (Exclusive-OR) (2/2) Logic Exclusive-OR operator의 truth table p T T F F q T F p q F T T F Page 14 Discrete Mathematics by Yang-Sae Moon
함축 (Implication) (1/2) Logic 함축의 정의 • p와 q가 명제이면, 함축(implication) “p q”도 명제이며, 이 명제는 p가 참 이고 q가 거짓일 경우에만 거짓이 되며, 그 외는 모두 참이 된다. 이때, p를 hypothesis, antecedent라 부르고, q를 conclusion, consequent 라 부른다. • The implication p q states that p implies q. That is, if p is true, then q is true; but p is not true, then q could be either true or false. 함축 사용의 예제 • p = “You study hard. ”, q = “You will get a good grade. ” • p q = “If you study hard, then you will get a good grade. ” (else it could go either way) Page 15 Discrete Mathematics by Yang-Sae Moon
함축 (Implication) (2/2) Logic Implication operator의 truth table p T T F F q T F p q T F T T “p q”를 표현하는 영어 문장 • • • p implies q. If p, then q. p only if q. p is sufficient for q. q is necessary for p. Page 16 Discrete Mathematics by Yang-Sae Moon
역(converse), 이(inverse), 대우(contrapositive) Logic 역, 이, 대우의 정의 • 역(converse): q p • 이(inverse): ¬p ¬q • 대우(contrapositive): ¬q ¬p 역, 이, 대우의 예제 • 명제: “If it is raining, then the home team wins. ” • 역: “If the home team wins, then it is raining. ” 동치(equivalent) • 이: “If it is not raining, then the home team does not win. ” • 대우: “If the home team does not win, then it is not raining. ” Converse/Inverse/Contrapositive의 truth table p T T F F q T F ¬p F F T T ¬q F T p q T F T T q p T T F T Page 17 ¬p ¬q T T F T ¬q ¬p T F T T Discrete Mathematics by Yang-Sae Moon
상호조건명제 (Biconditional) (1/2) Logic 상호조건명제의 정의 • p와 q가 명제이면, “p↔q”를 상호조건명제(biconditional)라 하고, p와 q가 동일한 진리 값을 가질 때 참이 되며, 다른 진리 값을 가지면 거짓이 된다. • The biconditional p↔q states that p is true if and only if (IFF) q is true. • p↔q (p q) (q p) ¬(p q) 상호조건명제의 사용의 예제 • p = “You can take the flight. ”, q = “You buy a ticket. ” • p↔q = “You can take the flight if and only if you buy a ticket. ” Page 18 Discrete Mathematics by Yang-Sae Moon
상호조건명제 (Biconditional) (2/2) Logic Biconditional operator의 truth table p T T F F q T F p↔q T F F T “p↔q”를 표현하는 영어 문장 • p if and only if q. • p is necessary and sufficient for q. • q is necessary and sufficient for p. Page 19 Discrete Mathematics by Yang-Sae Moon
Some Alternative Notations Page 21 Logic Discrete Mathematics by Yang-Sae Moon
Logic and Bit Operations Logic 비트(bit)란 binary digit(이진수)에서 따온 단어임 • 비트는 1(true)과 0(false)의 값을 가짐 • True 혹은 false를 값으로 갖는 변수(variable)를 Boolean variable이라 함 Bit operator(OR, AND, XOR)의 truth table p 0 0 1 1 q 0 1 p q 0 1 1 1 p q 0 0 0 1 p q 0 1 1 0 Bit operation의 예제 (refer to bitwise. c) 01 1011 0110 11 0001 11 1011 1111 bitwise OR 01 0001 0100 bitwise AND 10 1011 bitwise XOR Page 22 Discrete Mathematics by Yang-Sae Moon
강의 내용 Logic and Proof 논리(Logic) 명제의 동치(Propositional Equivalence) 술어와 한정기호(Predicates and Quantifiers) 중첩된 한정기호(Nested Quantifiers) 증명 방법(Methods of Proof) 가설(Conjectures) Page 23 Discrete Mathematics by Yang-Sae Moon
항진(Tautology)과 부정(Contradiction) Propositional Equivalence 항진 명제 • 복합명제를 구성하는 단위명제의 진리 값이 어떠한 값을 가진다 하여도 해당 복합명제가 항시 참이면 이를 항진(tautology) 명제라 한다. • A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are! p ¬p p ¬p • 예제: p ¬p T F F T T F 부정 명제 • 복합명제를 구성하는 단위명제의 진리 값이 어떠한 값을 가진다 하여도 해당 복합명제가 항시 거짓이면 이를 부정(contradiction) 명제라 한다. • A contradiction is a compound proposition that is false no matter what the truth values of its atomic propositions are! • 예제: p ¬p 항진도 부정도 아닌 경우 불확정 명제(contingency)라 함 Page 24 Discrete Mathematics by Yang-Sae Moon
논리적 동치(Logical Equivalence) (1/2) Propositional Equivalence 동치의 정의 • 만일 p↔q가 항진이면, p와 q는 논리적으로 동치이며, p q 혹은 p q라 표기한다. • Compound proposition p is logically equivalent to compound proposition q, written p q, IFF the compound proposition p↔q is a tautology. Truth Table을 이용한 동치 판정 방법 • 예제 1: Prove that ¬(p q) ¬p ¬q [De Morgan’s Law] p T T F F q T F p q T T T F ¬(p q) F F F T ¬p F F T T ¬q F T ¬p ¬q F F F T 2개의 단위 명제로 구성된 경우, 4(=22)개의 행이 필요 Page 25 Discrete Mathematics by Yang-Sae Moon
논리적 동치(Logical Equivalence) (2/2) Propositional Equivalence Truth Table을 이용한 동치 판정 방법 (계속) • 예제 2: Prove that p (q r) (p q) (p r) [Distributive Law] p T T F F q T T F F r T F T F q r T F F F p (q r) T T T F F F p q T T T F F p r T T T F (p q) (p r) T T T F F F 3개의 단위 명제로 구성된 경우, 8(=23)개의 행이 필요 • 복합명제가 n개의 단위명제로 구성되는 경우, 동치를 증명하기 위해 2 n개의 행이 필요 Too much space!, Too expensive! 동치 법칙(Equivalence Laws)을 활용 Page 26 Discrete Mathematics by Yang-Sae Moon
동치 법칙 (Equivalence Laws) (1/4) Propositional Equivalence 기본 법칙 동치 종류 법칙 이름 p T p, p F p Identity laws p T T, p F F Domination laws p p p, p p p Idempotent laws ¬(¬p) p Double negation law p q q p Commutative laws (교환 법칙) (p q) r p (q r) Associative laws (결합 법칙) p (q r) (p q) (p r) Distributive laws (분배 법칙) Page 27 Discrete Mathematics by Yang-Sae Moon
동치 법칙 (Equivalence Laws) (2/4) Propositional Equivalence 기본 법칙 법칙 이름 동치 종류 ¬(p q) ¬p ¬q De Morgan’s laws p (p q) p Absorption laws (흡수 법칙) (집합의 Venn Diagram으로 생각하면 쉽게 이해됨) p ¬p T p ¬p F Negation laws Page 28 Discrete Mathematics by Yang-Sae Moon
동치 법칙 (Equivalence Laws) (3/4) Propositional Equivalence 함축을 포함한 논리적 동치 • p q ¬p q • p q ¬p q • p q ¬(p ¬q) [try it!] • (p q) (p r) p (q r) • (p r) (q r) (p q) r Page 29 Discrete Mathematics by Yang-Sae Moon
동치 법칙 (Equivalence Laws) (4/4) Propositional Equivalence 상호조건을 포함한 논리적 동치 • p ↔ q (p q) (q p) • p ↔ q ¬p ↔ ¬q [try it!] (대우 활용) • p ↔ q (p q) (¬p ¬q) Page 30 Discrete Mathematics by Yang-Sae Moon
An Example Problem Propositional Equivalence Prove that ¬(p (¬p q)) ¬p ¬q ¬(p (¬p q)) ¬p ¬(¬p q)) De Morgan’s laws ¬p (¬(¬p) ¬q) De Morgan’s laws ¬p (p ¬q) Double negation law optional (¬p p) (¬p ¬q) Distributive laws F (¬p ¬q) Negation laws (¬p ¬q) F Commutative laws ¬p ¬q Identity laws Page 31 optional Discrete Mathematics by Yang-Sae Moon
강의 내용 Logic and Proof 논리(Logic) 명제의 동치(Propositional Equivalence) 술어와 한정기호(Predicates and Quantifiers) 중첩된 한정기호(Nested Quantifiers) 증명 방법(Methods of Proof) 가설(Conjectures) Page 32 Discrete Mathematics by Yang-Sae Moon
술어(Predicate), 명제 함수(Propositional Function) Predicates and Quantifiers “x is greater than 3. ” 변수(variable) = x 명제 함수 (propositional function) 술어(predicate) = P P(x) = “x is greater than 3. ” Q(x, y) = “x = y + 3” R(x, y, z) = “x + y = z” 일반적으로 n개의 변수 x 1, x 2, x 3, …, xn을 포함하는 명제 함수는 P(x 1, x 2, x 3, …, xn) 으로 표기한다. Page 33 Discrete Mathematics by Yang-Sae Moon
한정기호(Quantifiers) Predicates and Quantifiers 명제 함수를 명제로 만드는 방법 1. 변수에 특정 값을 할당하는 방법 2. 한정(quantification)을 적용하는 방법 (1) 변수에 특정 값을 할당하는 방법 • P(x) = “x > 3” • 만일 x = 4라면 P(x)는 true가 되고, x = 2라면 P(x)는 false가 된다. (2) Quantification을 적용하는 방법 • P(x) = “x > 3” • x의 정의역(domain)이 “ 4 이상인 모든 실수”라면, P(x)는 true가 된다. • The collection of values that a variable x can take is called x’s domain or universal of discourse. Page 34 Discrete Mathematics by Yang-Sae Moon
Universal Quantifier (1/3) Predicates and Quantifiers 정의 P(x)의 Universal Quantifier란 “정의역(domain)에 속하는 모든 값 x에 대하여 P(x)가 참이다. ”라는 명제이다. Universal Quantifier의 표기 및 읽기 • 표기: x. P(x) • 읽기: “for all x in P(x)” 혹은 “for every x in P(x)” Page 35 Discrete Mathematics by Yang-Sae Moon
Universal Quantifier (2/3) Predicates and Quantifiers Universal Quantifier의 개념적 이해 • Domain의 모든 값을 x 1, x 2, …, xn으로 나열할 수 있다면, x. P(x)는 다음과 동일하다. P(x 1) P(x 2) . . P(xn) Universal Quantifier의 사용 예 • 예 1: P(x)가 “x < 2”이고 domain이 모든 실수라 할 때, x. P(x)의 진리 값은? 거짓 • 예 2: Q(x)가 “x 2 0”이고 domain이 모든 실수라 할 때, x. Q(x)의 진리 값은? 참 Page 36 Discrete Mathematics by Yang-Sae Moon
Existential Quantifier (1/2) Predicates and Quantifiers 정의 P(x)의 Existential Quantifier란 “Domain에 속하는 적어도 하나의 값 x에 대하여 P(x)가 참이다. ”라는 명제이다. Existential Quantifier의 표기 및 읽기 • 표기: x. P(x) • 읽기: “for some x in P(x)” 혹은 “there is an x such that P(x)” Page 38 Discrete Mathematics by Yang-Sae Moon
Existential Quantifier (2/2) Predicates and Quantifiers Existential Quantifier의 개념적 이해 • Domain의 모든 값을 x 1, x 2, …, xn으로 나열할 수 있다면, x. P(x)는 다음과 동일하다. P(x 1) P(x 2) . . P(xn) Existential Quantifier의 사용 예 • 예 1: P(x)가 “x > 3”이고 domain이 모든 실수라 할 때, x. P(x)의 진리 값은? 참 • 예 2: Q(x)가 “x = x+1”이고 domain이 모든 실수라 할 때, x. Q(x)의 진리 값은? 거짓 Page 39 Discrete Mathematics by Yang-Sae Moon
Quantifier 개념 요약 Statement Predicates and Quantifiers When true? When false? x. P(x) is true for every x. P(x) There is an x for which P(x) is true. P(x) is false for every x. There is an x for which P(x) is false. Page 40 Discrete Mathematics by Yang-Sae Moon
Binding Variables Predicates and Quantifiers Binding Variables vs. Free Variables • 변수 x에 quantifier가 적용되거나 특정 값이 할당되면, x를 binding variable이라 한다. • 변수 x에 quantifier가 적용되지 않거나 특정 값이 할당되지 않았으면, x를 free variable이라 한다. • Quantifier가 적용되는 부분을 quantifier의 범위(scope)라 한다. binding variable x. P(x, y) free variable x(P(x) Q(x)) x. R(x) scope of x Page 41 Discrete Mathematics by Yang-Sae Moon
Negation with Quantifiers (1/2) Predicates and Quantifiers Negation 예제 • x = student, P(x) = “x in the class has taken a course in calculus. ” • x. P(x) = “Every student in the class has taken a course in calculus. ” • ¬ x. P(x) = “It is not the case that every student in the class has taken a course in calculus. ” = “There is a student in the class who has not taken a course in calculus. ” = x¬P(x) Page 42 Discrete Mathematics by Yang-Sae Moon
Negation with Quantifiers (2/2) Predicates and Quantifiers Negation 관련 법칙 ¬ x. P(x) x¬P(x) Negation 관련 예제 • x(x 2 > x)의 부정 ¬ x(x 2 > x) x¬(x 2 > x) x(x 2 x) • x(x 2 = 2)의 부정 ¬ x(x 2 = 2) x¬(x 2 = 2) x(x 2 2) Page 43 Discrete Mathematics by Yang-Sae Moon
강의 내용 Logic and Proof 논리(Logic) 명제의 동치(Propositional Equivalence) 술어와 한정기호(Predicates and Quantifiers) 중첩된 한정기호(Nested Quantifiers) 증명 방법(Methods of Proof) 가설(Conjectures) Page 44 Discrete Mathematics by Yang-Sae Moon
Nested Quantifiers Statements (1/3) Nested Quantifiers Variable x와 y의 domain이 실수(all real numbers)라 했을 때, • x y(x + y = y + x)를 번역하면, “For every real number x and for every real number y, x + y = y + x. ”이고, 이는 실수의 덧셈에 있어서 교환법칙을 의미한다. • x y(x + y = 0)를 번역하면, “For every real number x, there is a real number y such that x + y = 0. ” (항등원과 역원을 의미한다. ) • x y z(x + (y + z) = (x + y) + z)를 번역하면, “For every real number x, for every real number y, and for every real number z, x + (y + z) = (x + y) + z. ”이고, 이는 실수의 덧셈에 있어서 결합법칙을 나타낸다. Page 45 Discrete Mathematics by Yang-Sae Moon
Nested Quantifiers Statements (2/3) Nested Quantifiers 예제 • Variable의 domain이 모두 실수일 때, 다음을 번역하라. x y((x > 0) (y < 0) (xy < 0)) • 풀이: “For every real number x and for every real number y, if x > 0 and y < 0, then xy < 0. ” Page 46 Discrete Mathematics by Yang-Sae Moon
Nested Quantifiers Statements (3/3) Nested Quantifiers 예제 • C(x) = “x has a computer. ”, F(x, y) = “x and y are friends. ”이고, x와 y의 domain이 “all students in your school. ”일 때, 다음을 번역하라. x(C(x) y((C(y) F(x, y))) • 풀이: “For every student x in your school, x has a computer, or there is a student y (in your school) such that y has a computer and x and y are friends. ” Page 47 Discrete Mathematics by Yang-Sae Moon
Statements Nested Quantifiers (1/2) Nested Quantifiers 예제 • “If a person is female and is a parent, this person is someone’s mother. ”를 predicate, domain = “all people”인 quantifier, logic operator로 표현하라. • 풀이 − 상기 문장은 다음과 같이 다시 쓸 수 있다. “For every person x, if person x is female and person x is a parent, then there exists a person y such that person x is the mother of person y. ” − 명제 함수로 표현: F(x) = “x is female. ” P(x) = “x is a parent. ” M(x, y) = “x is the mother of y. ” − 상기 명제 함수를 사용하여 표현하면 다음과 같다. x((F(x) P(x)) y. M(x, y)) Page 48 Discrete Mathematics by Yang-Sae Moon
Statements Nested Quantifiers (2/2) Nested Quantifiers 예제 • “Everyone has exactly one best friend. ”를 predicate, domain = “all people”인 quantifier, logic operator로 표현하라. • 풀이 − 상기 문장은 다음과 같이 다시 쓸 수 있다. “For every person x, person x has exactly one best friend. ” = “ x(person x has exactly one best friend)” − 명제 함수로 표현: B(x, y) = “y is the best friend of x. ” − “person x has exactly one best friend. ”를 명제 함수를 사용하여 표현: y(B(x, y) z((z y) ¬B(x, z))) 상기 명제 함수를 사용하여 표현하면 다음과 같다. x y(B(x, y) z((z y) ¬B(x, z))) Page 49 Discrete Mathematics by Yang-Sae Moon
Order of Quantifiers (3/3) Nested Quantifiers 변수가 두 개인 경우의 Quantifier 순서의 영향 Statement x y. P(x, y) y x. P(x, y) When true? P(x, y) is true for every pair x and y. x y. P(x, y) For every x, there is a y for which P(x, y) is true. x y. P(x, y) There is an x for which P(x, y) is true for every y. x y. P(x, y) y x. P(x, y) There is a pair x and y for which P(x, y) is true. 모든 x에 대해서 적어도 P(x, y)를 true로 하는 y가 존재하면, 해당 식은 true가 된다. 어떤 x에 대해 모든 y가 P(x, y)를 true로 하면, 해당 식은 true가 된다. Page 53 Discrete Mathematics by Yang-Sae Moon
유용한 Equivalence Laws Nested Quantifiers x. P(x) ¬ x¬P(x) • 상기 두 표현 식은 앞서 소개한 Quantifier 정의를 이용해 증명이 가능하다. (try it!) • (Remind) Quantifier의 정의: x. P(x) P(x 1) P(x 2) . . . . P(xn) x(P(x) Q(x)) ( x. P(x)) ( x. Q(x)) • 상기 표현 식 역시 Quantifier 정의를 이용해 증명이 가능하다. (try it!) Page 54 Discrete Mathematics by Yang-Sae Moon
강의 내용 Logic and Proof 논리(Logic) 명제의 동치(Propositional Equivalence) 술어와 한정기호(Predicates and Quantifiers) 중첩된 한정기호(Nested Quantifiers) 증명 방법(Methods of Proof) 가설(Conjectures) Page 55 Discrete Mathematics by Yang-Sae Moon
증명의 중요성 Methods of Proof 수학에서 증명이란 • 수학적 문장의 진실성을 정밀하고 부정할 수 없도록 설명하는 정확(correct)하고 완전 (complete)한 기술이다. • A correct (well-reasoned, logically valid) and complete (clear, detailed) argument that rigorously and undeniably establishes the truth of a mathematical statement 증명에서의 기본적 사항 • 정확성: Correctness prevents us from fooling ourselves. • 완전성: Completeness allows anyone to verify the result. Page 56 Discrete Mathematics by Yang-Sae Moon
용어(Terminology) (1/3) Methods of Proof 정리(theorem) • 정리란 참(true)으로 밝혀진 명제이다. • A statement that has been proven to be true. 공리(axiom, postulates) • 증명된 정리 혹은 증명하고자 하는 정리의 가정/명제이다. (증명이 불필요한) • Assumptions (often unproven) defining the structures about which we are reasoning. (예: n이 짝수라면 n = 2 k라 나타낼 수 있다. ) 추론 규칙(rules of inference) • 논리적으로 유효한 주장(logically valid deductions)을 사용하여, 가정을 결론 으로 이끌어가는 증명의 과정이다. • Patterns of logically valid deductions from hypotheses to conclusions. Page 58 Discrete Mathematics by Yang-Sae Moon
용어(Terminology) (2/3) Methods of Proof 보조정리(lemma) • 다른 정리를 증명하는데 사용하는 간단한 정리이다. • A minor theorem used as a stepping-stone to proving a major theorem. “복잡한 내용이 정리이고, 간단한 내용이 보조정리”를 의미하는 것은 아님에 유의! 따름정리(corollary) • 어떤 정리가 증명되면, 이에 의하여 자연스럽게 증명되는 정리이다. • A minor theorem proved as an easy consequence of a major theorem. Page 59 Discrete Mathematics by Yang-Sae Moon
용어(Terminology) (3/3) Methods of Proof 가설(conjecture) • 증명되지는 않았지만 참으로 믿어지는 명제이다. • A statement whose truth values has not been proven. (A conjecture may be widely believed to be true, regardless. ) 이론(theory) • 주어진 공리(axiom)로부터 증명이 가능한 모든 정리(theorem)의 집합이다. • The set of all theorems that can be proven from a given set of axioms. Page 60 Discrete Mathematics by Yang-Sae Moon
추론 규칙 (Inference Rules) (2/2) Methods of Proof 각 추론 규칙은 “항진 명제인 함축(implication)”에 해당한다. ant. 1 ant. 2 … con. 에 해당하는 tautology는 “((ant. 1 ant. 2 … ) con. ”이다. Page 62 Discrete Mathematics by Yang-Sae Moon
추론 규칙 예제 (1/2) Methods of Proof 예제 • “It is below freezing now. Therefore, it is either below freezing or raining now. ”가 참인 것은 어떤 추론 규칙에 근거하는가? • 풀이 − p = “It is below freezing now. ”, q = “It is raining now. ” − 주어진 문장은 다음과 같은 추론 규칙에 근거하며, 이를 addition rule이라 한다. p p q Page 63 Discrete Mathematics by Yang-Sae Moon
추론 규칙 예제 (2/2) Methods of Proof 예제 • “If it rains today, then we will not have a barbecue today. If we do not have a barbecue today, then we will have a barbecue tomorrow. Therefore, if it rains today, then we will have a barbecue tomorrow. ”의 추론 근거는? • 풀이 − p = “It is raining today. ” − q = “We will not have a barbecue today” − r = “We will have a barbecue tomorrow. ” p q q r p r Hypothetical syllogism (삼단논법) Page 64 Discrete Mathematics by Yang-Sae Moon
추론 규칙 종류 (1/2) Rule of inference Methods of Proof Tautology Name p p q p (p q) Addition p q p (p q) p Simplification p q ((p) (q)) (p q) Conjunction p p q q (p q)) q Modus ponens (긍정 논법) (the mode of affirming) (¬q (p q)) ¬p Modus tollens (부정 논법) (the mode of denying) ¬q p q ¬p p q가 true이면, 당연히 p와 q 모두 true이다. p가 true인 상태에서 p q가 true이면, 당연히 q는 true이다. Page 65 Discrete Mathematics by Yang-Sae Moon
추론 규칙 종류 (2/2) Rule of inference Methods of Proof Tautology Name p q q r p r ((p q) (q r)) (p r) Hypothetical syllogism (삼단 논법) p q ¬p q ((p q) ¬p) q Disjunctive syllogism p q ¬p r q r ((p q) (¬p r)) (q r) Resolution (분해) p가 false이고 p q이 true이면, 당연히 q는 true이다. Page 66 Discrete Mathematics by Yang-Sae Moon
Formal Proofs (1/2) Methods of Proof Formal Proof의 정의 • Formal proof란 주어진 가정(antecedent)에 기반하여 추론 규칙을 적용한 일 련의 단계(step)를 거쳐서 결론(consequent)을 도출하는 과정이다. − A formal proof of a conclusion C, given antecedents p 1, p 2, …, pn consists of a sequence of steps, each of which applies some inference rule to antecedents or to previously proven statements to yield a new true statement (the consequent). • 증명(proof)은 주어진 모든 가정이 true일 때 결론이 true임을 보이는 과정이다. − A proof demonstrates that if the antecedents are true, then the conclusion is true. Page 67 Discrete Mathematics by Yang-Sae Moon
Formal Proofs (2/2) Methods of Proof 예제 • 다음 가정이 “We will be home by sunset. ”이라는 결론을 도출함을 보여라. − “It is not sunny this afternoon and it is colder than yesterday. ” − “We will go swimming only if it is sunny. ” ( If we will go swimming, then it is sunny this …) − “If we do not go swimming, then we will take a canoe trip. ” − “If we take a canoe trip, then we will be home by sunset. ” • 풀이 − p = “It is sunny this afternoon. ” − q = “It is colder than yesterday. ” − r = “We will go swimming. ” − s = “We will take a canoe trip. ” − t = “We will be home by sunset. ” p p q q ¬q p q ¬p Modus ponens Modus tollens 단계 1 2 3 4 5 6 7 8 Page 68 과정 ¬p q ¬p r p ¬r ¬r s s s t t 이유 가정 단계 1의 simplification 가정 단계 2, 3 기반의 Modus tollens 가정 단계 4, 5 기반의 Modus ponens 가정 단계 6, 7 기반의 Modus ponens Discrete Mathematics by Yang-Sae Moon
Inference Rules for Quantifiers (2/3) Methods of Proof Quantifier 사용 명제의 추론 규칙 정리 Rule of inference x. P(x) P(c) for an arbitrary c x. P(x) P(c) for some c x. P(x) Tautology Name x. P(x) P(c) Universal instantiation P(c) for an arbitrary c x. P(x) Universal generalization x. P(x) P(c) for some c Existential instantiation P(c) for an some c x. P(x) Existential generalization Page 70 Discrete Mathematics by Yang-Sae Moon
Inference Rules for Quantifiers (3/3) Methods of Proof 예제 • 다음 가정이 “Maria has taken a course in computer science. ”이라는 결론을 도출함을 보여라. − “Everyone in this discrete mathematics class has taken a course in computer science. ” − “Maria is a student in this class. ” • 풀이 − D(x) = “x is in this discrete mathematics class. ” − C(x) = “x has taken a course in computer science. ” − 가정: x(D(x) C(x)), D(Maria) − 결론: C(Maria) − 추론 과정 단계 1 2 3 4 과정 x(D(x) C(x)) D(Maria) C(Maria) D(Maria) C(Maria) 이유 가정 단계 1의 universal instantiation 가정 단계 2, 3 기반의 Modus ponens Page 71 Discrete Mathematics by Yang-Sae Moon
Summary of Proof Methods of Proof 함축(implication) p q의 증명을 위하여, 다음 방법들을 사용한다. • Direct proof: Assume p is true, and prove q. • Indirect proof: Assume ¬q, and prove ¬p. (대우의 증명에 해당) • Vacuous proof: Prove ¬p by itself. (가정이 false임을 증명하면, p q는 true) • Trivial proof: Prove q by itself. (결론이 항시 true임을 증명) • Proof by cases: To prove (p 1 p 2 . . pn) q, prove ((p 1 q) (p 2 q) . . (pn q)) Page 72 Discrete Mathematics by Yang-Sae Moon
Direct Proof (직접 증명) Methods of Proof Implication p q의 증명을 위하여, p가 true라 가정하고 여러 규칙과 기 존에 true로 증명된 정리를 사용하여 q가 true임을 증명한다. 예제 • Definition: An integer n is called odd iff n=2 k+1 for some integer k; n is even iff n=2 k for some k. • Axiom: Every integer is either odd or even. • Theorem: (For all numbers n) If n is an odd integer, then n 2 is an odd integer. • Proof: − If n is odd, then n = 2 k+1 for some integer k. − Thus, n 2 = (2 k+1)2 = 4 k 2 + 4 k + 1 = 2(2 k 2 + 2 k) + 1. − Therefore, n 2 is of the form 2 j + 1 (with j the integer 2 k 2 + 2 k), thus n 2 is odd. □ Page 73 Discrete Mathematics by Yang-Sae Moon
Indirect Proof (간접 증명) Methods of Proof Implication p q 대신 이의 대우인 ¬q ¬p를 증명한다. 예제 • Theorem: (For all integers n) If 3 n+2 is odd, then n is odd. • Proof: − Suppose that the conclusion is false, i. e. , n is even. − Then n=2 k for some integer k. − Then 3 n+2 = 3(2 k)+2 = 6 k+2 = 2(3 k+1). − Thus 3 n+2 is even, because it equals 2 j for integer j = 3 k+1. − So 3 n+2 is not odd. − We have shown that ¬(n is odd)→¬(3 n+2 is odd), thus its contra-positive (3 n+2 is odd) → (n is odd) is also true. □ Page 74 Discrete Mathematics by Yang-Sae Moon
Vacuous Proof (무의미한 증명) Methods of Proof 가정(p)이 false임을 보임으로서, p q가 true임을 증명한다. 예제 • Theorem: (For all n) If n is both odd and even, then n 2 = n + n. • Proof: − The statement “n is both odd and even” is obviously false since no number can be both odd and even. − So, theorem is vacuously true. □ Page 75 Discrete Mathematics by Yang-Sae Moon
Trivial Proof (자명한 증명) Methods of Proof Implication p q에서, 결론(q)이 trivial하게 true임을 증명한다. 예제 • Theorem: (For integers n) If n is the sum of two prime numbers, then either n is odd or n is even. • Proof: − Any integer n is either odd or even. − So the conclusion of the implication is true regardless of the truth of the antecedent. − Thus the implication is true trivially. □ Page 76 Discrete Mathematics by Yang-Sae Moon
Proof by Cases (사례에 의한 증명) (2/2) Methods of Proof 예제 • Theorem: |xy| = |x||y|, where x and y are real numbers. (|x| = x if x 0, |x| = -x if x < 0) • Proof: − p = x and y are real numbers, q = |xy| = |x||y| − p = {x 0, y 0} {x 0, y < 0} {x < 0, y < 0} ▫ {x 0, y 0} q: |xy| = xy = |x||y| ▫ {x 0, y < 0} q: |xy| = -xy = x(-y) = |x||y| ▫ … − All the possible cases are proven to true, and thus, theorem is proven. □ Page 80 Discrete Mathematics by Yang-Sae Moon
Proof of Equivalence (동치 증명) Methods of Proof 상호조건 p ↔ q(“p if and only if q”)을 증명하기 위해서는 다음과 같은 tautology를 사용한다. (p ↔ q) ((p q) (q p)) • 즉, (p q)를 증명하고 (q p)를 증명함으로써, (p ↔ q)를 증명한다. Page 81 Discrete Mathematics by Yang-Sae Moon
Existence Proof (존재 증명) (1/2) Methods of Proof 증명하고자 하는 문장에 x. P(x) 형태의 quantifier/predicate가 포함된 경 우를 존재 증명(existence proof)이라 한다. If the proof of a statement of the form x. P(x) is called an existence proof. Page 82 Discrete Mathematics by Yang-Sae Moon
Existence Proof (존재 증명) (2/2) Methods of Proof 예제 • Theorem: There exists a positive integer n that is the sum of two perfect cubes in two different ways. (두 수의 세제곱의 합을 두 가지 방법으로 나타낼 수 있는 정수가 존재한다. ) (In other words, there exists a positive integer n such that n = j 3 + k 3 = l 3 + m 3, where j, k, l, and m are positive integers, and {j, k} {l, m}. ) • Proof: Consider n = 1729, j = 9, k = 10, l = 1, m = 12. Now just check that the equalities hold. □ Page 83 Discrete Mathematics by Yang-Sae Moon
Mistakes in Proofs Methods of Proof 예제 (mistakes in proof) • Theorem: Prove 1 = 2. • Proof: − Let a and b be the same positive integers. − a=b [주어진 정의] − a 2 = ab [양변에 a를 곱함] − a 2 - b 2 = ab - b 2 [양변에서 b 2를 뺌] − (a – b)(a + b) = b(a – b) [인수분해] − a+b=b [양변을 (a-b)로 나눔] − 2 b = b [since a = b] − 2 = 1. [양변을 b로 나눔] What is wrong? (a – b) is zero since a = b, and thus, we cannot use (a – b) as a divisor. Page 85 Discrete Mathematics by Yang-Sae Moon
강의 내용 Logic and Proof 논리(Logic) 명제의 동치(Propositional Equivalence) 술어와 한정기호(Predicates and Quantifiers) 중첩된 한정기호(Nested Quantifiers) 증명 방법(Methods of Proof) 가설(Conjectures) Page 86 Discrete Mathematics by Yang-Sae Moon
The Halting Problem (정지 문제) (1/2) - skip Conjectures Alan Turing discovered in the 1930’s that there are problems unsolvable by any algorithm. (튜링은 “어떠한 알고리즘으로도 풀 수 없는 문제가 있음”을 밝혔다. ) • The desired function is H(P, I) = the truth value of the statement “Program P, given input I, eventually halts”. (H(P, I) = “프로그램 P와 P의 입력 I가 주어졌을 때, 이 프로그램 P가 정지하는지”의 여부 를 판단하는 함수) • 튜링은 이러한 함수 H(P, I)가 존재하지 않음을 증명하였다. • Implies general impossibility of predictive analysis of arbitrary computer programs. (임의의 프로그램에 대한 예측 분석이 일반적으로 불가능함을 의미한다. ) Page 91 Discrete Mathematics by Yang-Sae Moon
강의 내용 Logic and Proof 논리(Logic) 명제의 동치(Propositional Equivalence) 술어와 한정기호(Predicates and Quantifiers) 중첩된 한정기호(Nested Quantifiers) 증명 방법(Methods of Proof) 가설(Conjectures) Page 93 Discrete Mathematics by Yang-Sae Moon
Homework #1 Logic and Proof Page 94 Discrete Mathematics by Yang-Sae Moon
- First order logic vs propositional logic
- First order logic vs propositional logic
- First order logic vs propositional logic
- Unit 2 logic and proof homework 1
- Algebraic proofs examples
- Pros and cons of propositional logic
- Horseshoe logic
- Propositional logic examples and solutions
- Propositional and first order logic
- Propositional logic
- Propositional logic examples
- Negation math
- Xor in propositional logic
- Propositional logic notation
- Implies in propositional logic
- Prolog propositional logic
- Propotional logic dapat digunakan untuk..
- Implies in propositional logic
- Contradiction formula
- Logic
- Discrete math propositional logic
- Logical equivalence table
- De morgan's laws logic
- Xor in propositional logic
- Predicate logic example
- Fluent7
- Valid arguments in propositional logic
- Parse tree example
- Tautology contingency or contradiction
- Horn clause
- Propositional logic exercises
- Propositional logic exercises
- What is logically equivalent
- Logic in mathematics
- ___________ is the limitation of propositional logic
- Aima ai slides
- Simple proposition
- Prologiv
- P double implies q is equivalent to
- Magnetically equivalent protons
- Examples of formal equivalence
- Indirect proof assumption
- Direct proof and indirect proof
- Proof
- Direct proof and indirect proof
- Equivalence in difference jakobson
- Segment proofs
- Chapter 2 reasoning and proof answer key
- Language, proof and logic
- Language proof and logic solutions chapter 11
- Unit 2 logic and proof homework 3 conditional statements
- Pqppp
- Formal quantifiers
- Simple subject and complete subject
- Simple vs compound subject
- Unit 1: subjects, predicates, and sentences answer key
- Example of a compound predicate
- Not proposition example
- Logical equivalence
- Logic equivalence
- Discrete structures
- Logic equivalence checker
- Predicate logic equivalence
- Draw a line between the complete subject and predicate
- Subjects and predicates
- What is the topic of the song
- Quantifiers
- Computable predicates in ai
- Unit 5 quick quiz 1
- Lesson 4 compound subjects and predicates
- Applications of predicates and quantifiers
- Transition and transfer predicates
- Transition and transfer predicates
- Word level
- What are simple predicates
- Simple predicet
- Com_min algorithm
- Propositional equivalences
- Propositional network
- Propositional functions examples
- Generic knowledge
- Propositional network
- How a predicate function become a propositional function?
- Propositional calculus
- Propositional
- Combinational logic vs sequential logic
- Tw
- 캠블리 단점
- Majority circuit
- Combinational logic sequential logic 차이
- Logic chapter three
- Directional equivalence
- Catford formal correspondence and textual equivalence
- Fractions equivalent to 1/4
- Money time relationship and equivalence