# Logic Expression

: stands for and, if both a and b are true, they are true\land \text {: stands for and, if both a and b are true, they are true}
:stand for or, if a is true or b is true, ther are true\lor: \text {stand for or, if a is true or b is true, ther are true}
¬: stand for not, if a is true, then a is false, vice versa.\lnot \text {: stand for not, if a is true, then a is false, vice versa.}
    :stands for implies, if a    bis true then when a is true, b will only be false, while when a is false, b can be either one. \implies \text {:stands for implies, if } a \implies b \text {is true then when a is true, b will only be false, while when a is false, b can be either one. }
    : stand for "if and only if" if a    b(a    b)(b    a)\iff \text {: stand for "if and only if" if } a \iff b \equiv (a \implies b) \land (b \implies a)

# Logic inference

Logic inference gives you couple number of assumptions, and a conclusion, then you need to prove whether it is valid.

# Method 1

One Method is try to prove It is correct

For example, Try to prove following argument are valid:

Taxes will increase or government spending decrease. Government spending increases or more people have jobs. If people are poor or the economy is bad, then fewer people will have jobs. Therefore, if taxes decrease, people are rich.

First , let's let
I=Taxes will invreaseI = \text {Taxes will invrease}
G=Government spending decreasesG=\text{Government spending decreases}
J=More people have jobsJ= \text {More people have jobs}
P=Prople are richP=\text {Prople are rich}
E=Economy is badE = \text{Economy is bad}

Then you will have following proposition:

{1.IG2.¬GJ3.¬PR    ¬J\begin{cases} 1. I \lor G \\ 2.\lnot G \lor J \\ 3.\lnot P \lor R \implies \lnot J \end {cases}

The conclusion will be ¬I    P\lnot I \implies P

To solve it, first let I=FI = F.
From 1. We know G=TG=T
Then, We can found J=TJ = T,
Form 3. We can deduce J    P¬R,hence P¬R=TJ \implies P \land \lnot R, hence\ P \land \lnot R = T
so P=T¬R=TP = T \land \lnot R = T
Finally we can claim that ¬I    P\lnot I \implies P

# Method 2

Another way is assuming the conclusion is false.

Having the following argument:

There are many job vacancies and the unemployment rate is low. If there are many job vacancies, then either the economy is thriving or wages are too low. If wages are not too low, then the unemployment rate is low. Therefore, the economy is thriving.

Let :
J = There are many job vacancies,
U = Unemployment rate is low
E = The economy is thriving
W = wages are too low

We have following proposition:
1.JU1. J \land U
2.J    EW2. J \implies E\lor W
3.¬W    U3. \lnot W\implies U

And conclusion is EE
Let E=FalseE = False
¬E¬W    ¬J\lnot E\land \lnot W \implies \lnot J

let W=TrueW= True
¬J=False,J=True\lnot J = False, J = True
¬W    U=True,U=True\lnot W \implies U = True, U = True
JU=TrueJ \land U = True
Hence, there exist a case that E=FalseE=False, the case is invalid.

# Mathematical Induction

We use induction to prove some theory is whether true.
It involves three steps:

  1. State out a theorem.
  2. Prove that an base case is true. (e.g. P(0))
  3. Prove that P(n)    P(n+1)=TrueP(n) \implies P(n+1) = True

For example, we try to prove $$\forall x \geq 0, 1+2+3+.....+n = \frac {n(n+1)} {2}$$
Indeed, this is what the gaussian summation is:

x0,i=1ni=n(n+1)2\forall x \geq 0, \sum^n_{i=1} i = \frac {n(n+1)} {2}

So, for the Proof, Let's try to prove P(0) is true for the theorem:
P(0)=0(n+1)2=0P(0) = \frac {0(n+1)} {2} = 0 , Which is True.

Then, We are going to proof P(n)    P(n+1)P(n) \implies P(n+1) is True
Let's assume P(n) is True for the purpose of induction:
P(n)=n(n+1)2=TrueP(n)= \frac {n(n+1)}{2} = True
If P (n) = True, Then how about P (n+1)? Let's see:
P(n+1)=i=1n+1i=P(n)+(n+1)=n(n+1)2+n+1=n2+3n+22=(n+1)(n+2)2P (n+1) = \sum^{n+1}_{i=1} i = P(n) + (n+1) = \frac {n(n+1)} {2} +n+1 =\frac {n^2 +3n+2} {2} =\frac {(n+1)(n+2)} {2}, Which is true.
Such that, P(n)    P(n+1)P(n) \implies P (n+1) stands.
And as P (0) is true, we successfully prove that x0,1+2+3+.....+n=n(n+1)2\forall x \geq 0, 1+2+3+.....+n = \frac {n (n+1)}{2}

總瀏覽次數:載入中...更新於

請我喝[茶]~( ̄▽ ̄)~*

ketsuro 微信支付

微信支付

ketsuro 支付寶

支付寶