fundamentals\Logic

We should always analyze and seek to understand the situation given. This often calls for attributes we cannot learn in a book, such as insight and creativity. Merely trying to apply formulas or invoke rules will not get us very far either in proving result or doing enumeration problems.

 

rules

We do not regard sentences such as the exclamation or the comman.

Statements(or propositions), are declarative sentences that are either true or false.

There is no way to break them down into anything simpler, are considered to be primitive statements.

Not p, which denotes its negation and is read “Not p”.

Combine two or more statements into a compound statement, using the following logical connectives.

Conjunction:

    The connectives but and and convey meaning, Consequently , this sentence may be represented as u conjunction s.

Disjunction

Implication:

  1. If p, then q.
  2. p is sufficient for q(充分的)
  3. p is a sufficient condition for q
  4. q is necessary for p(必要的)
  5. q is a necessary condition for p
  6. p only if q

statement p is called the hypothesis of the implication; q is called the conclusion;

 

s -> t: If you do your homework, then you will get to watch the baseball game.

t -> s: You will get to watch the baseball game only if you do your homework.

 

s has the truth value 0, q has the truth value 1. Means is you do not do your homework, but still watch the baseball game. Perhaps you watch the game because you mother not at home. Or maybe other reason. You has not gone against the resolution s->t. we accept this compound statement as true, assigning it the truth value 1.

Biconditional:

p if and only if q as p iff q

In computer science:

// For p false, the computer goes to the next instruction in the program sequence.

if(hypothesis expression logical statement has truth value 0 or 1) {

        executable statement; // q is not one of the logical statements

}

The decision structure if p then q else r, q is executed when p is true and r is executed when p is false.

We must avoid Writing a compound statement such as p disjunction q conjunction r, Without parentheses to indicate which of the connectives disjunction and conjunction should be applied first. We are dealing with p disjunction (q conjunction r) or (p disjunction q) conjunction r

T­0 to denote any tautology and the symbol F0 to denote any contradiction.

We try to show that the conclusion q follows logically from these given statements:

 (p1 ∧ p2 ∧ p3 ∧ …… ∧ pn) –> q

 

Logical Equivalence: Develop an idea of when two such entities are essentially the same.

Two statements s1, s2 are said to be logically equivalent, and we write s1 <=> s2, when the statement s1 is true(respectively, false) if and only if the statement s2 is true(respectively, false)

DeMorgan’s Laws:

¬ (p ∧ q) <=> ¬ p ¬q

The Laws of Logic:

¬¬ p <=> p                                         Law of Double Negation

¬ (p q) <=> ¬ p ∧ ¬q                      DeMorgan’s Laws

¬ (p ∧ q) <=> ¬ p ¬q

p q <=> q ∨ p                                 Commutative Laws

p q <=> q p

p (q ∨ r) <=> (p ∨ q) ∨ r                 Associative Laws

p (q r) <=> (p q) r

p (q ∧ r) <=> (p q) ∧ (p r)        Distributive Laws

p (q r) <=> (p ∧ q) (p ∧r)

p p <=> p                                         Idempotent Laws

p ∧ p <=> p

p F0 <=> p                                      Identity Laws

p ∧ T0 <=> p

p ¬ p <=> T0                                   Inverse Laws

p ∧ ¬ p <=> F0

p T0 <=> T0                                     Domination Laws

p F0 <=> F0

p (p ∧ q) <=> p                                 Absorption Laws

p (p q) <=> p

 

the dual of s, denoted s­d

s: (p ¬ q) (r ∧ T0)  the dual of s is

sd: (p ¬ q) (r ∨ F0)

If s <=> t then sd <=> td fall naturally into pairs.(pairs 思想)

We replace one or more occurrences of p by q. Then this replacement yields the compound statement P1. Under these circumstances P1 <=> P(replacement 思想)

Contrapositive:(充要条件)

(q -> p) <=> (¬ q -> ¬ p)  

(q -> p) <≠> (q -> q)

p -> ¬ q) <≠> (¬ q -> ¬ p)

Using the laws of logic, we may simplify this statement.

Argument  (p1 ∧ p2 ∧ p3 ∧ …… ∧ pn) –> q

p1,p2,…,pn are called the premises of the argument, and the statement q is the conclusion for the argument

the truth of the conclusion q is deduced or inferred from the truth of the premises p1,p2

if p, q are arbitrary statements such that p -> q is a tautology, then we say that p logically implies q and we write p => q to denote this situation.

constructing truth tables to valid argument, we want to avoid even larger tables, we are persuaded to develop a list of techniques called rules of inference that will help us:

to consider only the cases wherein all the premises are true.

the rules of inference are fundamental in the development of a step-by-step validation of how the conclusion q logically follows from the premises p1,p2,…,pn in an implication of the form (p1 ∧ p2 ∧ p3 ∧ …… ∧ pn) –> q

rule of detachment:Modus Ponens:

[p ∧ (p -> q)] -> q,

p

    p -> q

   --------------

  ∴q

law of the syllogism:

[(p ->q) ∧ (q -> r)] -> (q -> r)

    p -> q

        q -> r

       ------------

       ∴p -> r

modus tollens:

       p -> q

       ¬ q

      -----------

      ∴ ¬p

Rule of Conjunction:

        p

        q

      ----------------

       ∴p ∧ q

Rule of Disjunctive Syllogism:

[(p q) ∧ ¬ p] -> q,

   p q

   ¬ p

  ---------------

   ∴q

Rule of Contradiction:

      ¬ p -> F0

---------------------

  ∴p

Proof by Contradiction:

(p1 ∧ p2 ∧ p3 ∧ …… ∧ pn) –> q

we can establish the validity of the logically equivalent argument

(p1 ∧ p2 ∧ p3 ∧ …… ∧ pn ∧ ¬ q) –> F0

Rule of Conjunctive Simplification:

(p ∧ q) -> p

   p ∧ q

---------------------

   ∴p

Rule of Disjunctive Amplification:

p -> p ∨ q

   p

----------------

 ∴p ∨ q

Rule of Conditional Proof:

[(p ∧ q ) ∧ [p -> ( q -> r)]] -> r

   p ∧ q

   p -> (q -> r)

 -----------------------

  ∴r

Rule for Proof by Cases:

[(p -> r) ∧ (q -> r)] -> [(p ∨ q) -> r]

   p -> r

   q -> r

 --------------------

  ∴(p ∨ q) -> r

Rule of the Constructive Dilemma:

[(p -> q) ∧ (r -> s) ∧ (p ∨ r)] -> ( q ∨ s)

  p -> q

  r -> s

  p ∨ r

---------------------

∴ q ∨ s

Rule of the Destructive Dilemma:

[(p -> q) ∧ (r -> s) ∧ (¬ p ∨ ¬ r)] -> (¬ q ∨ ¬ r)

p -> q

  r -> s

  ¬ p ∨ ¬ s

---------------------

∴ ¬q ∨ ¬ r

In order to establish the validity of the argument

       p1                  consider                               p1

       p2                                                               p2

       …                             …

       pn                                                                pn

   ----------------------------                                       p

     ∴ q -> r                                                  -----------------

                                                                          ∴ r

to cover the cases(cover 的概念)

open statement:

The number x+2 is an even integer, we find it is an open statement that contains the single variable x.

These allowable choices constitue what is called the universe or universe of discourse for the open statement.

eg: q(x, y): The numbes y+2, x-y, and x+2y are all even integers.

Many postulates, definitions, and theorems in mathematics involve statements that are quantified open statements.

These result from the two types of quantifiers, which are called the existential and the universal quantifiers .

x is said to be a bound variable – it is bound by the existential quantifier or ∀.

we write x[p(x) => q(x)] and say that p(x) logically implies q(x).

statement

true

false

x p(x)

For some(at least one) a in the universe,p(a) is true.

For every a in the universe,p(a) is false.

x p(x)

For every replacement a from the universe, p(a) is true.

There is at least one replacement a from the universe for which p(a) is false

x ¬p(x)

For at least one choice a in the universe, p(a) is false, so its negation ¬p(a) is true

For every replacement a in the universe, p(a) is true.

x ¬p(x)

For every replacement a in the universe, p(a) is false, so its negation ¬p(a) is true

There is at least one replacement a from the universe for which ¬p(a) is false and p(a) is true.

For a prescribed universe and any open statements p(x), q(x) in the variable x:

x [p(x) ∧ q(x)] => [∃x p(x) ∧ x q(x)]

x [p(x) ∨ q(x)] <=> [∃x p(x) ∨ x q(x)]

x [p(x) ∧ q(x)] <=> [∀x p(x) ∧ x q(x)]

[∀x p(x) ∨ x q(x)] => ∀x [p(x) ∨ q(x)]

¬ [x p(x)] <=> x ¬ p(x)

¬ [x p(x)] <=> x ¬ p(x)

¬ [x ¬ p(x)] <=> x ¬ ¬ p(x) <=> x p(x)

¬ [x ¬ p(x)] <=> x ¬ ¬ p(x) <=> x p(x)

when a statement involve both existential and universal quantifiers, however, we must be careful about the order in which the quantifiers are written.

x ∃y p(x, y) consequently ∀y ∃x p(x, y)

Translating mathematical statements:

be very careful and precise about the meanings of statements

After we translate a mathematical statement into symbolic form, the rules we have learned should then apply when we want to determine such related statements as the negation.

For every integer n we call n even if it is divisible by 2

p(n): n is an even integer       q(n):  n is divisible by 2

x [q(n) -> p(n)]

the given quantified statement (in the preceding definition) is an implication. However, the situation here. What appears to be stated is not what is intended. The intention is for the reader to interpret the given definition as

 ∀x [q(n) <-> p(n)]

eg:接受offer -> 入职流程 <--> 开始工作(别问我为啥有这个,所以本人接受offer后被拒之门外了,入职没完成 `-_-)

the method of exhaustion: If we are confronted with a situation in which the universe is larger but within the range of a computer that is available to us, then we might write a program to check all of the individual cases.

Certain of these consequences that follw rather immediately from a theorem are termed corollaries.

The Rule of Universal Specification:If an open statement becomes true for all replacement by the members in a given universe, then that open statement is true for each specific individual member in that universe.(A bit more symbolically –if p(x) is an open statement for a given universe, and if x p(x) is true, then p(a) is true for each a in the universe.)

The word generic is applied to the element c here because it indicates that our choice(for c) must share all of the common characteristics of the elements for the given universe.

The Rule of Universal Generalization: If an open statement p(x) is proved to be true when x is replaced by any arbitrarily chosen element c from our universe, then the universally quantified statement x p(x) is true. Furthermore, the rule extends beyond a single variable. So if, for example, we have an open statement q(x, y) that is proved to be true when x and y are replaced by arbitrarily chosen elements from the same universe, or their own respective universes, then the universally quantified statement ∀x ∀y q(x, y) [or, ∀x,y q(x,y)] is true. Similar result hold for the cases of three or more varables.

eg: Let n be an integer. We call n even if n is divisible by 2—that is , if there exists an integer r so that n=2r. If n is not even , then we call n odd and find for this case that there exists an integer s where n=2s+1

 

Assumption

Result Derived

Contraposition

¬ q(m)

¬ p(m)

Contradiction

p(m) and ¬ q(m)

F0

 

好的,同理,我们举个栗子:

         because it will provide us with a framework to fall back on whenever we doubt whether a given attempt at a proof really dose the job If in doubt, we have our study of logic to supply us with a somewhat  mechanical but strictly objective means to help us decide

        我们为什么要学习数学的推理论证呢?因为当我们怀疑某个证明是否真的有效时,它为我们提供了一个可以依靠的论证方法。当我们有疑问时,我们对逻辑的研究为我们提供了某种机械但严格的客观手段来帮助我们作出决定。

比如如下对话:

问:“我觉着工作有点太low了!”

答:“你应该找更有挑战的工作,这样才能让自己有利。”

这个回答让我很疑惑,也很不开心,但是这句话本身并没有问题啊,明明是很客气的话啊。

 

所以我需要一个论证:

x l(x) 这份工作有点low,我不太想做。

x f(x) 工作x具有挑战。

y p(y) 我去找具有挑战的工作x。

         (挑战:鼓动对方跟自己竞赛,跟自己竞赛。)

y q(y) 这样找工作x对自己有益。

y [p(y) ]-> q(y)

我们使用

y [p(y) ∧ ¬ q(y) ] -> F0                                      (by Contradiction)

<=> y p(y) ∧ y ¬ q(y) -> F0                            (by x [p(x) ∧ q(x)] <=> [∀x p(x) ∧ x q(x)])

         <=> 所有去找具有挑战性的工作的付出,这种努力不能让自己从中受益->F0。 

        <=>  false                                                    (by 找工作的付出 受什么益啊?)

        所以 y p(y) -> q(y) 为false 

嗯,有点意思了,你说让我挑战我就去挑战哦,傻子哦?。

 

我们换一种论证方法:

         by Specification and Generalization

         假设:找到了一份有挑战的工作 换个说法 = 未来对自己提出挑战。

         可以挑战的对象:有专业技能,有工作,有人生。对专业技能的挑战还是有意义的。

         但是人家现在说的是挑战工作的事儿。

                  Result

                  挑战后,我的失败几率增加了。

                  工作上挑战成功:

  •                       我每天搬了更多的砖,对老板有利。???
  •                       经过我的努力,我成功的成为了码农中的类人猿,结果太有挑战被boss终结了,俺继续俺的无业游民。

                  工作上挑战失败:

                              无业游民 !!!!

          结论:任意的对工作的挑战,不一定自己没有益处。

证明完毕,别给我挖坑啊,找有挑战的工作还有一线生机,我要是挑战,找工作,还是挑战,工作,那不是!!!我到底挑战啥? 我晕了,您想挑战我么?,我并不总是有时间和论证您的每一句话。拜托好好说话!!!

猜你喜欢

转载自blog.csdn.net/u012296499/article/details/82404320