7 Logic, the art of Reasoning - JulTob/Mathematics GitHub Wiki

๐Ÿ˜ถโ€๐ŸŒซ๏ธ Logic

En los capรญtulos tomados de los libros de lรณgica, la neurosis del victoriano conformista, transferida a las construcciones mentales, muestra como el rigor de la inferencia puede desembocar en la locura; en la paradoja de los tres peluqueros y el debate entre Aquiles y la tortuga, la mentalidad del matemรกtico plantea con sorprendente lucidez algunos problemas claves de la lรณgica moderna.

"Contrariwise," continued Tweedledee, "if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic."

  • Lewis Carroll

โ˜€๏ธ Logic is a science that aims to identify principles for good and bad reasoning.

๐Ÿ”† Logic is a prescriptive study: one of its goals is to tell you how you ought to reason.

๐Ÿ” Logic is justified in understanding the world. Something illogical cannot exist.

๐Ÿ”Ž Logic is a filter for possibility.

๐Ÿ’ญ Understanding logic makes for a better understanding of the world and our thought.

๐Ÿ’ฌ To be true in the world is to be in factual Truth. To be true in thought is to be in conceptual Truth.

๐Ÿง‘๐Ÿปโ€๐Ÿซ We assign Truth values by standards of truth. We assign factual truth by evidence. We assign conceptual truth by assumptions.

๐Ÿง‘๐Ÿปโ€๐Ÿ’ป "I donโ€™t know" is always a valid truth value. We call that state Uncertainty.

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ผ We call the Certain states True and False.

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿš€ Information is gained as the actualization or determination of Truth statements.

Blue Diamond Experiment
A) I think of one of the shapes and colors
๐Ÿ”ถ๐Ÿ”ท๐ŸŸ ๐Ÿ”ต
B) If a chosen combination (colored shape) is related to my selection in either color or shape or both, I accept. Else, I reject.
C) ๐Ÿ”ถ is accepted 
What conclusions can you extract from this?
Could ๐Ÿ”ต be accepted?
Yes, I could be thinking of ๐ŸŸ .
Information is only gained by rejection.

๐Ÿ‘ท๐Ÿปโ€โ™€๏ธ Problem-solving is the process of applying logic.

๐Ÿ‘ฎ๐Ÿป Deductive thinking provides new truth values from known information. They must follow the rules of inference. It is then a Valid conclusion. The units of known information are called premises.

๐Ÿ•ต๐Ÿป A correct and valid inference is called a proof.

๐Ÿ’‚๐Ÿปโ€โ™€๏ธ A logical application on statements as discourse is called Propositional Logic. A logical application on quantitative logic is called Mathematics.

๐Ÿ‘จ๐Ÿปโ€๐Ÿซ The History

๐Ÿ›๏ธ Aristotle: ๐Ÿ“ Rules of logical deduction

๐Ÿง˜๐Ÿป Stoics

๐Ÿ‘จ๐Ÿผโ€๐Ÿซ Gottfried Leibniz ๐Ÿฅ‡ Algebraic logic

๐Ÿคต๐Ÿปโ€โ™‚๏ธ George Boole ๐Ÿช™ Binary Logic

๐Ÿง™๐Ÿปโ€โ™‚๏ธ Rev. Charles Luwidge Dogson (Lewis Carroll): ๐Ÿงœ๐Ÿปโ€โ™€๏ธ Symbolic Logic (Puzzles in statement logic)

๐Ÿ‘ฉ๐Ÿผโ€๐Ÿซ Symbolic Logic

๐Ÿ‘ฉ๐Ÿผโ€๐Ÿซ Symbolic logic is a branch of logic that represents how we ought to reason by using a formal language consisting of abstract symbols.

๐Ÿ‘ฉ๐Ÿผโ€โš–๏ธ Propositions

๐Ÿ‘ฉ๐Ÿผโ€โš–๏ธ Any declarative sentence that can be assigned a logical value, True or False.

๐Ÿ“œ Under a concrete system, is the sentence that is assigned a value.

๐Ÿท๏ธ Under an abstract system, is the expressed meaning, a reference to an object, that is true or false.

๐Ÿ—’๏ธ Both are used interchangeably as context requires.

๐Ÿ“– Context for a sentence is itself, enrichment and completion for a sentence's meaning.

"Did you eat lunch?" -- Not a sentence
"Yes"                -- Sentence by context: "I ate Lunch" == "The sentence 'I ate lunch' is True"

๐Ÿ“ฐ There's also a particular difference between what a sentence means literally and what the speaker's meaning is

Generally in logic as a subject we interpret all sentences literally.

Consistency

When one thinks of a statement as true, they therefore will sustain that claim. Consistency also means they will act upon as if it is true.

When someone acts or claims inconsistencies, by sustaining contradiction or acting in opposition to a claim, he can be utterly ignored. Sophistry focuses on winning arguments, not on finding truths. Thereโ€™s no better way to hold the appearance of winning than not to compromise to any claim, nor follow consistency nor the rules.

Also, what trust does deserve someone who betrays the truth?

๐Ÿ“ƒ Arguments

๐Ÿงพ In logic, an argument is a series of propositions in which a certain proposition (a conclusion) is represented as following from a set of premises or assumptions.

๐Ÿ“ In reverse, it is usually called an Explanation.

1. When it rains I get wet  -- Premise
2. It's raining             -- Premise
3. Then, I'm getting wet    -- Conclusion

๐Ÿ““ Assumptions are propositions that are not claimed to be true but instead are supposed to be true for the purpose of argument.

-- Problem of Evil --
1. Assume that God exists.                                   -- Assumption 
1.2. If God exists then there will be no evil in the world.  -- Inference
1.3. Thus, from above, there is no evil in the world.        -- Inference
2. But there is evil in the world!                           -- Premise
3. Therefore, God does not exist.                            -- Conclusion

๐Ÿ“‹ The conclusion of an argument follows from the premises & assumptions.

When you put forward a fact or statement as if it was true, by axiom (assumed true) it is an assumption, as when presenting postulates (scientifically demonstrated by experiment, or conclusions from former proofs) you are stating premises.

An argument (a consequence of valid logical steps) can derive into a conclusion (a final statement that is necessarily true).

๐Ÿ‘พ Logic Paradigms

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ”ฌ A fact is interpreted by a paradigm

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ”ง A model of how to think about things. Concepts and theories that frame your perspective on a topic.

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Fundamental assumptions that guide thinking and research.

๐Ÿ“ Fact: Sam is 200 ใŽ tall.
๐Ÿ˜ฏ Interpretation: Sam is a tall man

๐Ÿ––๐Ÿป Fact: 2+3 = 3+2
๐Ÿšถ๐Ÿปโ€โ™€๏ธ Interpretation: if you are two steps away and walk away three steps you are as far as if you were three steps away and walked away two.

Proof

No amount of experimentation can prove me right; a single experiment can prove me wrong.

  • Albert Einstein

A Proof is an argument that demonstrates a specific statement.

"The DNA test is proof of innocence."
"The theorem is proof for the mathematical statement"

Inductive Argument

If you get 5 white balls from a jar ๐Ÿบโšช๏ธโšช๏ธโšช๏ธโšช๏ธโšช๏ธ and you conclude the next ball will be white you are using an inductive argument.

It supports the conclusion but does not guarantee it.

Abductive argument

If you saw the five balls next to the jar ๐Ÿบโšช๏ธโšช๏ธโšช๏ธโšช๏ธโšช๏ธ and conclude the balls come from the jar, you'd be using an abductive argument. It does not support nor guarantee the conclusion, but the conclusion explains the premises

Deductive argument

A deductive argument supports and guarantees a conclusion. It is of the type:

If A then B
A
Therefore B

Validity

An argument is deductively valid if and only if, it is necessarily the case that if the premises are true, then the conclusion is true. That is, an argu- ment is deductively valid if and only if it is logically impossible for its premises/assumptions to be true and its conclusion to be false.

Impossibility

Something is logically impossible if and only if the state of affairs it proposes involves a logical contradiction.

The principle of exclusion

This principle demands that every logic unit will set to True or itโ€™s opposite, False. Thereโ€™s no simultaneous truth and falseness for a determined statement. This doesnโ€™t mean a truth canโ€™t be graduated, just that one value excludes the other.

  1. True = ~False

The principle of non contradiction

This principle demands consistency in logic. It is such as: No thing can be itself and not be itself. P & ~P = False

Where P is any claim. ~P is the negation of that claim. & is the conjunctive operation AND. = means โ€œit isโ€ or โ€œis such asโ€. And False is the certainty value already explained.

This principle is universal: it applies to all statements and facts.

Also, it is self evident. By reduction to absurdity we can see that if the principle was false, it will follow it it true.

  1. ~(P & ~P = False)
  2. P & ~P = True
  3. P & ~P = True & ~True = True (2: P= True)
  4. P & ~P = True & False
  5. P & ~P = False Therefore, even if the principle of no contradiction would be false, it will still be true. That is an example of proof by irrelevance.

Proof by Irrelevance

It is the process of induction by stating that an unknown claim will have the same implicit conclusion either being true or false.

  1. A โ†’B
  2. ~A โ†’B
  3. โ—ป๏ธŽ
  4. โˆท B โ†’ is the implication symbol (if A therefore B) (A implies B) (If A, follows B) And โˆท means the sentence is a conclusion or an induction from the previous statements.

Proof by contradiction, reduction to absurdity

Another way to be certain of a statement is a proof by absurdity. You start by assigning a truth value to the premises. If you arrive to a contradiction with a statement in your propositions, an absurd, you can discard the set of premises. If you test a single premise it may look something like following:

  1. Aโ†’B
  2. ~B
  3. :: ~A

It is noticeable that a contradiction implies the rejection of the Set of premises, as combined, not the single values by their own. AKA: Indirect proof

As such, one system that doesnโ€™t derive into a contradiction is called consistent. Consistency is a filter for factual truths.

The fallacy of exclusion

It is such fallacy where one excludes a posible state of truth.

  • Either you are with us, or against us. [I can be indifferent towards you.]

Zenoโ€™s reduction to impossible

  1. P โ†’ Q
  2. P โ†’ ~Q
  3. : : ~P

Double negative

We can prove positive conclusions by the counter negative property. From the principle of exclusion.

  1. ~ ~True = True

Euclid infinite primes proof

  1. P, the set of all primes, is finite
    1. pi is an element of P
  2. a = 1 + ฮ  pn
    1. The number a is the multiplicative product of all primes, plus one.
    2. a is defined, is not divisible by any prime in P
    3. a, or any divisible prime of a, is not in P
  3. : : P is not finite

๐Ÿ‘ฉ๐Ÿปโ€๐ŸŒพ The realm of Logic

๐š‚๐šƒ๐™ฐ๐šƒ๐™ด๐™ผ๐™ด๐™ฝ๐šƒ: { ๐šƒ๐š›๐šž๐šŽ, ๐™ต๐šŠ๐š•๐šœ๐šŽ}
๐•ƒ:= {๐šƒ๐š›๐šž๐šŽ, ๐™ต๐šŠ๐š•๐šœ๐šŽ} = {1,0}
โˆˆ{๐Ÿ,๐ŸŽ}=๐”น

๐Ÿ‘ฉ๐Ÿปโ€๐ŸŽ“ Logic Statements

๐Ÿงš๐Ÿปโ€โ™€๏ธ Those statements which can be assigned a truth value.

๐š™โˆˆ๐•ƒ

๐Ÿง™๐Ÿปโ€โ™€๏ธ Logic Operations

๐Ÿ™…๐Ÿปโ€โ™€๏ธ Negation

โŒ No, Not...

ยฌ๐Ÿ = ๐ŸŽ
ยฌ๐ŸŽ = ๐Ÿ
ยฌ๐™ฐ

๐Ÿ’๐Ÿปโ€โ™€๏ธ Conjunction

  • Series circuit
  • AND
  • &
  • Y, And...
๐™ฐ ๐™ฑ โ”ƒ ๐™ฐโ‹€๐™ฑ
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
0 0 โ”ƒ  0  
0 1 โ”ƒ  0 
1 0 โ”ƒ  0
1 1 โ”ƒ  1

๐Ÿ”‹โค๐Ÿ’กโŽฏ๐Ÿ’กโŽฏโ”
ใ€€ใ€€ใ€€ ใ€€โš

๐Ÿคท๐Ÿปโ€โ™€๏ธ Disjunction

  • Parallel circuit
  • OR
  • ||
  • O, or...
๐™ฐ ๐™ฑ โ”ƒ ๐™ฐโ‹๐™ฑ
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
0 0 โ”ƒ 0  
0 1 โ”ƒ 1 
1 0 โ”ƒ 1
1 1 โ”ƒ 1

๐Ÿ”‹
โ”œโค๐Ÿ’กโŽฏโ”€โ”
โ””โค๐Ÿ’กโ”€โŽฏโ”ดโ”
ใ€€ใ€€ใ€€ใ€€โš

๐Ÿ‘ฎ๐Ÿปโ€โ™€๏ธ Tautology

๐Ÿฆ„ A formula of statements that is always True

1 for all ๐š™
๐š™ โ”ƒ ๐š™โ‹ยฌ๐š™
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
0 โ”ƒ 1   
1 โ”ƒ 1 

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿš’ Contradiction

0 for all ๐š™
๐š™ โ”ƒ ๐š™โ‹ยฌ๐š™
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
0 โ”ƒ 0 
1 โ”ƒ 0

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ผ Equivalence

๐š™ โ”ƒ ๐šš  โ”ƒ ๐š™โ‡”๐šš
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
0 โ”‚ 0  โ”ƒ 1 
0 โ”‚ 1  โ”ƒ 0
1 โ”‚ 0  โ”ƒ 0
1 โ”‚ 1  โ”ƒ 1    

๐š™ has the same value as ๐šš for all possible truth values.

๐Ÿง‘๐Ÿปโ€๐Ÿ’ผ Formula Equivalence

๐Ÿคฆ๐Ÿปโ€โ™€๏ธ If two truth tables look the same, they are equivalent

๐™ฐ ๐™ฑ  ยฌ(๐™ฐโˆง๐™ฑ)  ยฌ๐™ฐโˆจยฌ๐™ฑ
0 0   1        1
0 1   1        1
1 0   1        1 
1 1   0        0

๐Ÿช“ De Morgan

ยฌ ๐™ฐโˆง๐™ฑ  =  ยฌ๐™ฐ โˆจ ยฌ๐™ฑ
ยฌ ๐™ฐโˆจ๐™ฑ  =  ยฌ๐™ฐ โˆง ยฌ๐™ฑ

๐Ÿ‘ฉ๐Ÿปโ€โš–๏ธ Conditional

Implication
Implica, si A entonces B, implies, if-then ...

๐š™โŸถ๐šš โ”ƒ๐š™ โ”ƒ ๐šš
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
1    โ”ƒ0 โ”‚ 0
1    โ”ƒ0 โ”‚ 1
0    โ”ƒ1 โ”‚ 0
1    โ”ƒ1 โ”‚ 1 

๐™ฐโŸถ๐™ฑ    if, then
๐™ฐโŸน๐™ฑ  implies, Implies tautologically(the conditional is always true).
๐™ฐโŸท๐™ฑ   iff
๐™ฐโŸบ๐™ฑ  tautology equivalent 

๐™ฐโŸท๐™ฑ  โŸบ  ๐™ฐโŸถ๐™ฑ  โˆง ๐™ฑโŸถ๐™ฐ
๐™ฐโŸถ๐™ฑ  โŸบ ยฌ๐™ฑโŸถยฌ๐™ฐ

โš”๏ธ Biconditional

๐š™โŸท๐šš โ”ƒ๐š™ โ”ƒ ๐šš
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
1    โ”ƒ0 โ”‚ 0
0    โ”ƒ0 โ”‚ 1
0    โ”ƒ1 โ”‚ 0
1    โ”ƒ1 โ”‚ 1 

๐Ÿคต๐Ÿปโ€โ™€๏ธ Deduction Rules

๐Ÿ”ช Modus ponens

โœ” ๐™ฐ
โœ” ๐™ฐโŸถ๐™ฑ  
โœ… ๐™ฑ  
1. ๐š™โŸถ๐šš
2. ๐š™
3. โˆด ๐šš
(๐š™โŸถ๐šš)โ‹€๐š™ โŸน ๐šš

๐Ÿ—ก๏ธ Modus Tollens

1. ๐š™โŸถ๐šš
2. ยฌ๐šš
3. โˆด ยฌ๐š™
(๐š™โŸถ๐šš)โ‹€๏ฟข๐šš โŸน ๏ฟข๐š™

โ›“๏ธ Chain Syllogism

โœ” ๐™ฐโŸถ๐™ฑ  
โœ” ๐™ฑโŸถ๐™ฒ
โœ…  ๐™ฐโŸถ๐™ฒ
1. ๐š™โŸถ๐šš
2. ๐ššโŸถ๐š›
3. โˆด ๐š™โŸถ๐š›

๐Ÿ’ฃ Reductio ad Absurdum

โœ” ๐™ฐโŸถยฌ๐™ฑ
โœ” ๐™ฐโŸถ๐™ฑ  
โœ… ยฌ๐™ฐ
1. ๐š™โŸถ๐šš
2. ๐š™โŸถยฌ๐šš
3. โˆด ยฌ๐š™
๏ฟข๐š™โŸถ(๐ššโ‹€๏ฟข๐šš) โŸบ ๐š™
๐š™โŸถ๐šš โŸบ ๏ฟข๐ššโŸถ๏ฟข๐š™
๐š™โŸท๐šš โŸบ ๏ฟข๐ššโŸท๏ฟข๐š™

๐Ÿงจ Explosive Principle

Principle of explosion - xkcd

De un antecedente falso see deduce cualquier cosa. Una proposiciรณn falsa implica cualquier cosa.

โœ” ๐ŸถโŸถ๐™ฑ 
โœ… ๐™ฑ โˆง ยฌ๐™ฑ
1. ๐š™
2. ยฌ๐š™
3. โˆด ๐šŠ, ๐š‹, ๐šŒ... 

๐Ÿ”ซ Simplification

๐š™โ‹๐š™ โŸบ ๐š™
๐š™โ‹€๐š™ โŸบ ๐š™
๐š™โŸถ๐š™ โŸบ ๐Ÿท
๐š™โŸท๐š™ โŸบ ๐Ÿท

๐š™โ‹๏ฟข๐š™ โŸบ ๐Ÿท
๐š™โ‹€๏ฟข๐š™ โŸบ ๐Ÿถ

๐š™โ‹๐Ÿถ โŸบ ๐š™
๐š™โ‹๐Ÿท โŸบ ๐Ÿท

๐š™โ‹€๐Ÿท โŸบ ๐š™
๐š™โ‹€๐Ÿถ โŸบ ๐Ÿถ

๐ŸทโŸถ๐š™ โŸบ ๐š™

๐š™โ‹๐šš โŸบ ๐ššโ‹๐š™ 
๐š™โ‹€๐šš โŸบ ๐ššโ‹€๐š™
๐š™โŸท๐šš โŸบ ๐ššโŸท๐š™ 

๐š™โŸถ๐šš โŸบ ๏ฟข๐š™ โ‹ ๐šš
๐š™โŸถ๐šš โŸบ ๏ฟข(๐š™ โ‹€ ๏ฟข๐šš)
๐š™โŸถ๐šš โŸบ ๐š™โŸท(๐š™ โ‹€ ๐šš)
๐š™โŸถ๐šš โŸบ ๐ššโŸท(๐š™ โ‹ ๐šš)

๐š™โŸท๐šš โŸบ (๐š™โŸถ๐šš)โ‹€(๐š™โŸต๐šš)

๐š™โ‹€๐šš โŸน ๐š™  -- Simplificacion conyuntiva
๐š™โ‹€๐šš โŸน ๐šš  

๐š™ โŸน ๐š™โ‹๐šš  -- Expansion disyuntiva

-- Ley de inferencia
๏ฟข๐š™ โ‹€ (๐š™โ‹๐šš) โŸน ๐šš

๐Ÿงฟ Ley Asociativa

(๐š™โ‹๐šš)โ‹๐š› โŸบ ๐š™โ‹(๐ššโ‹๐š›) โŸบ ๐š™โ‹๐ššโ‹๐š›
(๐š™โ‹€๐šš)โ‹€๐š› โŸบ ๐š™โ‹€(๐ššโ‹€๐š›) โŸบ ๐š™โ‹€๐ššโ‹€๐š›
(๐š™โŸท๐šš)โŸท๐š› โŸบ ๐š™โŸท(๐ššโŸท๐š›) โŸบ ๐š™โŸท๐ššโŸท๐š›

๐Ÿชฌ Ley Distributiva

๐š™โ‹(๐ššโ‹€๐š›) โŸบ (๐š™โ‹๐šš)โ‹€(๐š™โ‹๐š›)
๐š™โ‹€(๐ššโ‹๐š›) โŸบ (๐š™โ‹€๐šš)โ‹(๐š™โ‹€๐š›)
๐š™โŸถ(๐ššโ‹๐š›) โŸบ (๐š™โŸถ๐šš)โ‹(๐š™โŸถ๐š›)
๐š™โŸถ(๐ššโ‹€๐š›) โŸบ (๐š™โŸถ๐šš)โ‹€(๐š™โŸถ๐š›)

๐Ÿงžโ€โ™€๏ธ Cuantificadores

โˆ€    para todo, for all, todo x es ...
โˆƒ    Existe, existe algรบn, there exists, hay al menos un...

๐Ÿถ Simplification

๐Ÿญ Simplification is a kind of equivalence.

๐š™ โ”ƒ ยฌยฌ๐š™
โ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถโ•ถ
0 โ”ƒ 0   
1 โ”ƒ 1 
ยฌยฌ๐š™ โŸบ ๐š™

๐š™โ‹๐š™ โŸบ ๐š™
๐š™โ‹€๐š™ โŸบ ๐š™

๐š™โŸถ๐š™ โŸบ 1

๐š™โ‹ยฌ๐š™ โŸบ 1
๐š™โ‹€ยฌ๐š™ โŸบ 0

๐š™โ‹0 โŸบ ๐š™
๐š™โ‹1 โŸบ 1
๐š™โ‹€0 โŸบ 0
๐š™โ‹€1 โŸบ ๐š™
1โŸถ๐š™ โŸบ ๐š™

๐š™โŸถ๐šš โŸบ ยฌ๐šš โŸถ ยฌ๐š™
๐š™โŸถ๐šš โŸบ ยฌ๐š™โ‹๐šš
๐š™โŸถ๐šš โŸบ ยฌ(๐š™โ‹€ยฌ๐šš)

๐š™โ‹(๐ššโ‹€๐š›) โŸบ (๐š™โ‹๐šš)โ‹€(๐š™โ‹๐š›)
๐š™โ‹€(๐ššโ‹๐š›) โŸบ (๐š™โ‹€๐šš)โ‹(๐š™โ‹€๐š›)
๐š™โŸถ(๐ššโ‹๐š›) โŸบ (๐š™โŸถ๐šš)โ‹(๐š™โŸถ๐š›)
๐š™โŸถ(๐ššโ‹€๐š›) โŸบ (๐š™โŸถ๐šš)โ‹€(๐š™โŸถ๐š›)

Simplification
๐š™โ‹€๐šš โŸน ๐š™
Amplification
๐š™ โŸน ๐š™โ‹๐šš
Inferencial
(ยฌ๐š™โ‹๐šš)โ‹€(๐š™โ‹๐šš) โŸน ๐šš
๐š™โ‹€(ยฌ๐š™โ‹ยฌ๐šš) โŸน ยฌ๐šš

๐ŸŽ€ Conectors

p | 	0 	0 	1	1 
q | 	0 	1	0	1
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
C0 |	0	0	0	0	| ๐—™
C1 |	0	0	0	1	| โˆง
C2 |	0	0	1	0	| 
C3 |	0	0	1	1	| 
C4 |	0	1	0	0	| 
C5 |	0	1	0	1	| 
C6 |	0	1	1	0	| โ†ฎ
C7 |	0	1	1	1	| โˆจ
C8 |	1	0	0	0	| โŠฝ
C9 |	1	0	0	1	| โŸท
C10|	1	0	1	0	| 
C11|	1	0	1	1	| 
C12|	1	1	0	0	| 
C13|	1	1	0	1	| โŸถ
C14|	1	1	1	0	| 
C15|	1	1	1	1	| ๐—ง

๐Ÿง๐Ÿปโ€โ™€๏ธ Predicate logic

The statement โ€œx is greater than 3โ€ has two parts. The first part, the variable x, is the subject of the statement. The second partโ€”the predicate, โ€œis greater than 3โ€โ€”refers to a property that the subject of the statement can have. We can denote the statement โ€œx is greater than 3โ€ by P(x), where P denotes the predicate โ€œis greater than 3โ€ and x is the variable. The statement P(x) is also said to be the value of the propositional function P at x. Once a value has been assigned to the variable x, the statement P(x) becomes a proposition and has a truth value.

We can also have statements that involve more than one variable. For instance, consider the statement โ€œx = y + 3.โ€ We can denote this statement by Q(x, y), where x and y are variables and Q is the predicate. When values are assigned to the variables x and y, the statement Q(x, y) has a truth value.

๐ŸŽˆ PRECONDITIONS AND POSTCONDITIONS

Predicates are also used to establish the correctness of computer programs, that is, to show that computer programs always produce the desired output when given valid input. (Note that unless the correctness of a computer program is established, no amount of testing can show that it produces the desired output for all input values, unless every input value is tested.) The statements that describe valid input are known as preconditions and the conditions that the output should satisfy when the program has run are known as postconditions. As Example 7 illustrates, we use predicates to describe both preconditions and postconditions. We will study this process in greater detail in Section 5.5.

๐Ÿท๏ธ Quantifiers

of elements. In English, the words all, some, many, none, and few are used in quantifications. We will focus on two types of quantification here: universal quantification, which tells us that a predicate is true for every element under consideration, and existential quantification, which tells us that there is one or more element under consideration for which the predicate is true. The area of logic that deals with predicates and quantifiers is called the predicate calculus.

๐Ÿ“ฆ THE UNIVERSAL QUANTIFIER

Many mathematical statements assert that a property is true for all values of a variable in a particular domain, called the domain of discourse (or the universe of discourse), often just referred to as the domain.

Such a statement is expressed using universal quantification. The universal quantification of P(x) for a particular domain is the proposition that asserts that P(x) is true for all values of x in this domain. Note that the domain specifies the possible values of the variable x. The meaning of the universal quantification of P(x) changes when we change the domain. The domain must always be specified when a uni- versal quantifier is used; without it, the universal quantification of a statement is not defined.

The universal quantification of P(x) is the statement โ€œP(x) for all values of x in the domain.โ€

The notation โˆ€xP(x) denotes the universal quantification of P(x). Here โˆ€ is called the universal quantifier. We read โˆ€xP(x) as โ€œfor all x, P(x)โ€ or โ€œfor every x, P(x).โ€ An element for which P(x) is false is called a counterexample to โˆ€xP(x).

Note that if the domain is empty, then โˆ€xP(x) is true for any propositional function P(x) because there are no elements x in the domain for which P(x) is false.

Besides โ€œfor allโ€ and โ€œfor every,โ€ universal quantification can be expressed in many other ways, including โ€œall of,โ€ โ€œfor each,โ€ โ€œgiven any,โ€ โ€œfor arbitrary,โ€ โ€œfor each,โ€ and โ€œfor any.โ€

The statement โˆ€xP(x) is false, where P(x) is a propositional function, if and only if P(x) is not always true when x is in the domain. One way to show that P(x) is not always true when x is in the domain is to find a counterexample to the statement โˆ€xP(x). Note that a single counterexample is all we need to establish that โˆ€xP(x) is false.

The existential quantification of P(x) is the proposition โ€œThere exists an element x in the domain such that P(x).โ€ We use the notation โˆƒxP(x) for the existential quantification of P(x). Here โˆƒ is called the existential quantifier.

Besides the phrase โ€œthere exists,โ€ we can also express existential quantification in many other ways, such as by using the words โ€œfor some,โ€ โ€œfor at least one,โ€ or โ€œthere is.โ€ The existential quantification โˆƒxP(x) is read as
โ€œThere is an x such that P(x),โ€โ€จ
โ€œThere is at least one x such that P(x),โ€
โ€œFor some xP(x).โ€

If the domain is empty, then โˆƒxQ(x) is false whenever Q(x) is a propositional function because when the domain is empty, there can be no element x in the domain for which Q(x) is true.

uniqueness quantifier, denoted by โˆƒ! or โˆƒ1. โˆƒ!xP(x) [or โˆƒ1xP(x)] states โ€œThere exists a unique x such that P(x) is true.โ€

โˆ€xP(x)    P(x) is true for every x.   oโ€” There is an x for which P(x) is false. 
โˆƒxP(x)    There is an x for which P(x) is true.    oโ€” P(x) is false for every x. 

the universal quantification โˆ€xP(x) is the same as the conjunction P(x1) โˆง P(x2) โˆง โ‹ฏ โˆง P(xn),โ€จbecause this conjunction is true if and only if P(x1), P(x2), ... , P(xn) are all true.

Similarly, when the elements of the domain are x1, x2, ... , xn, where n is a positive integer, the existential quantification โˆƒxP(x) is the same as the disjunction P(x1) โˆจ P(x2) โˆจ โ‹ฏ โˆจ P(xn),โ€จbecause this disjunction is true if and only if at least one of P(x1), P(x2), ... , P(xn) is true.

๐Ÿท๏ธ Quantifiers with Restricted Domains

โˆ€x < 0 (x2 > 0) is another way of expressing โˆ€x(x < 0 โ†’ x2 > 0). 
โˆƒz > 0 (z2 = 2) is another way of expressing โˆƒz(z > 0 โˆง z2 = 2). 

The part of a logical expression to which a quantifier is applied is called the scope of this quantifier. In the statement โˆƒx(x + y = 1), the variable x is bound by the existential quantification โˆƒx, but the variable y is free because it is not bound by a quantifier and no value is assigned to this variable.

Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value no matter which predicates are substituted into these statements and which domain of discourse is used for the variables in these propositional functions. We use the notation S โ‰ก T to indicate that two statements S and T involving predicates and quantifiers are logically equivalent.

๐Ÿ”ช De Morganโ€™s laws for quantifiers

ยฌโˆ€xP(x) โ‰ก โˆƒx ยฌP(x). 
ยฌโˆƒxQ(x) โ‰ก โˆ€x ยฌQ(x). 

GrupoSujeto(Verbo/Adjetivo/Predicado)

๐Ÿ—ก๏ธ Nested Quantifiers

โˆ€xโˆƒy(x + y = 0).
is the same thing as โˆ€xQ(x), where Q(x) is โˆƒyP(x, y), where P(x, y) is x + y = 0.โ€จ

Assume that the domain for the variables x and y consists of all real numbers. The statement โˆ€xโˆ€y(x+y = y+x)โ€จsays that x + y = y + x for all real numbers x and y. This is the commutative law for addition of real numbers. Likewise, the statement โˆ€xโˆƒy(x + y = 0) says that for every real number x there is a real number y such that x + y = 0. This states that every real number has an additive inverse. Similarly, the statement โˆ€xโˆ€yโˆ€z(x+(y+z) = (x+y)+z)โ€จis the associative law for addition of real numbers.

or example, to see whether โˆ€xโˆ€yP(x, y) is true, we loop through the values for x, and for each x we loop through the values for y. If we find that for all values of x that P(x, y) is true for all values of y, we have determined that โˆ€xโˆ€yP(x, y) is true. If we ever hit a value x for which we hit a value y for which P(x, y) is false, we have shown that โˆ€xโˆ€yP(x, y) is false.

Similarly, to determine whether โˆ€xโˆƒyP(x, y) is true, we loop through the values for x. For each x we loop through the values for y until we find a y for which P(x, y) is true. If for every x we hit such a y, then โˆ€xโˆƒyP(x, y) is true; if for some x we never hit such a y, then โˆ€xโˆƒyP(x, y) is false. To see whether โˆƒxโˆ€yP(x, y) is true, we loop through the values for x until we find an x for which P(x, y) is always true when we loop through all values for y. Once we find such an x, we know that โˆƒxโˆ€yP(x, y) is true. If we never hit such an x, then we know that โˆƒxโˆ€yP(x, y) is false. Finally, to see whether โˆƒxโˆƒyP(x, y) is true, we loop through the values for x, where for each x we loop through the values for y until we hit an x for which we hit a y for which P(x, y) is true. The statement โˆƒxโˆƒyP(x, y) is false only if we never hit an x for which we hit a y such that P(x, y) is true.

Statement         When True?        When False?
โˆ€xโˆ€yP(x, y)   
 โˆ€yโˆ€xP(x, y)    
        P(x, y) is true for every pair x, y.  
                  There is a pair x, y for which P(x, y) is false.
โˆ€xโˆƒyP(x, y) 
        For every x there is a y for which P(x, y) is true. 
                   There is an x such that P(x, y) is false for every y.
โˆƒxโˆ€yP(x, y)
       There is an x for which P(x, y) is true for every y.
                    For every x there is a y for which P(x, y) is false.
โˆƒxโˆƒyP(x, y) 
 โˆƒyโˆƒxP(x, y)
         There is a pair x, y for which P(x, y) is true. 
                    P(x, y) is false for every pair x, y.

$\color{Silver}\text{ There is nothing so practical}$ $\color{Silver}\text{ as a good theory.}$

  • $\color{Silver}\text{ Israel Kleiner}$

๐Ÿ“• Mathematics isnโ€™t just about crunching numbers. It's the art of communicating ideas with exactitude. Therefor, mathematicians have developed a specialized language, that carries very precise meaning.

๐Ÿ“— This is a language designed to be precise, unambiguous, and deeply logical.

๐Ÿ“š The Language of Mathematics: $\color{cyan}Logic$

๐Ÿ“˜ Mathematicians didnโ€™t just pull this language out of thin air. They built it brick by brick using the sturdy foundations of logic: The rules that govern mathematical thinking.

๐Ÿ“™ At its core, this language is composed by $\color{cyan}\text{Logic sentences}$: statements that convey relationships between objects, properties, and types. Letโ€™s explore these building blocks.

1. Logical Sentences and Their Meanings

  • A. Objectโ€“Property Statements

    • ๐Ÿ““ Object $\color{red}a$ has property $\color{gold}P$

      • ๐Ÿ”– This sentence means that a particular object ($\color{red}a$) possesses some specific characteristic or property $\color{gold}P$.

      • $\color{red}a$: $\color{gold}P$

      • $\color{red}a$ is $\color{gold}P$

      • $\color{gold}P({\color{red}a})$

      ๐Ÿฑ The $\color{red}cat$ is $\color{gold}fluffy$

    • ๐Ÿ““ Object $\color{red}a$ has properties $\color{gold}P$ and $\color{gold}Q$

      • ๐Ÿ”– A particular object ($\color{red}a$) possesses more than one property: $\color{gold}P$ and $\color{gold}Q$.

      • $\color{red}a$: $\color{gold}P$, $\color{gold}Q$

  • B. Objectโ€“Type Membership

    • ๐Ÿ““ Object $\color{red}a$ belongs to type $\color{lime}T$
    • ๐Ÿ”– This means that $\color{red}a$ is an element of the set (or type) $\color{lime}T$.
      • We arenโ€™t saying anything about the properties of $\color{lime}T$ just yet, only that $\color{red}a$ is a member of $\color{lime}T$.
    • Object $\color{red}a$ belongs to type $\color{lime}T$
    • $\color{red}a$ is an element of $\color{lime}T$
    • $\color{red}a$ $\in$ $\color{lime}T$

    The $\color{red}cat๐Ÿฑ$ is a $\color{lime}mammal$.

  • C. Defining a Type by a Property

    • ๐Ÿ““ Type $\color{lime}T$ is defined by property $\color{gold}P$
    • This means that all objects in $\color{lime}T$ share the property $\color{gold}P$.
    • Type $\color{lime}T$ is essentially a set of objects that satisfy the condition of having property $\color{gold}P$.
    • $\color{lime}T$ is defined by property $\color{gold}P$
    • $\color{lime}T$ $\mid$ $\color{gold}P$
    • $\color{lime}T$ = { $\color{red}a$ $\mid \color{gold}P({\color{red}a})$ }
      • Read as: โ€œ $T$ is the set of objects $a$ such that $P(a)$ is trueโ€

    $\color{lime}Mammals$ are $\color{gold}Fluffy$ $\color{red}animals$.

  • D. Total Containment

    • ๐Ÿ““ Type $\color{lime}T$ contains $\color{tomato}all$ $\color{red}objects$ with property $\color{gold}P$
    • ๐Ÿ”– This is very similar to (C), but it emphasizes that $\color{lime}T$ contains $\color{tomato}ALL$ objects that meet the condition of having property $\color{gold}P$.
    • We're saying that if an object has property $\color{gold}P$, then it must belong to type $\color{lime}T$, definitely.
    • $\color{lime}T$ contains $\color{tomato}all$ $\color{red}objects$ that satisfy $\color{gold}P$
    • $\color{tomato}\forall$ $\color{red}a$: { $\color{gold}P({\color{red}a})$ $\implies$ $\color{red}a$ $\in$ $\color{lime}T$ }
  • E. Universal Properties

    • Here we assert that if an object is in $\color{lime}T$, then it necessarily has property $\color{gold}P$.

    • This universal statement ensures consistency within the type.

    • ๐Ÿ““ All objects in type $\color{lime}T$ have property $\color{gold}P$

    • ๐Ÿ”– This means that every object in type $\color{lime}T$ must have the property $\color{gold}P$. If $\color{red}a$ is in $\color{lime}T$, then $\color{gold}P({\color{red}a})$ is true.

    • All $\color{red}a$ in type $\color{lime}T$ have property $\color{gold}P$:

    • $\color{tomato}Everyโ €object$ of type $\color{lime}T$ shares a property $\color{gold}P$

    • $\color{tomato} \forall$ $\color{red}a$ $\in$ $\color{lime}T$: $\color{gold}P({\color{red}a})$

    • $\color{tomato}Every$ $\color{lime}T$ is $\color{gold}P$

    • $\color{tomato}โˆ€$ $\color{red}a$ $\color{lime}\in T$: $\color{gold}P$

    • $\color{lime}T$: $\color{gold}P({\color{red}a})$

    • $\color{tomato}โˆ€$ $\color{lime}T$ { $\color{red}a$ }: $\color{gold}P$

    $\color{tomato}Every$ $\color{lime}dog ๐Ÿ•$ $\color{gold}barks$

    $\color{lime}Dogs ๐Ÿ•$ $\color{gold}bark$

  • F. Existential Statements

    • ๐Ÿ““ Some $T$ are $P$

    • ๐Ÿ”– This means that there exists at least one object in $T$ that has the property $P$. Weโ€™re not claiming that all objects in $T$ have $P$, just that some do.

    • $\color{tomato}Thereโ €isโ €anโ €object$ of Type $\color{lime}T$ having property $\color{gold}P$

    • $\color{tomato}Someโ €objects$ in the Set $\color{lime}T$ have property $\color{gold}P$

    • Some $\color{red}a$ in type $\color{lime}T$ have property $\color{gold}P$

    • $\color{tomato}\exists$ $\color{red}a \in \color{lime}T$ : $\color{gold}P({\color{red}a})$

    • $\color{tomato}โˆƒ$ $\color{lime}T${$\color{red}a$}: $\color{gold}P$

    • $\color{tomato}โˆƒ$ $\color{red}a$: $\color{gold}P$

    • $\color{tomato}โˆƒ$ $\color{red}a$ $\in$ $\color{lime}T$: $\color{gold}P$

    • $\color{tomato}Thereโ €Exist$ in $\color{lime}T$: $\color{gold}P({\color{red}a})$

  • Conditional (IF)

    This means that whenever statement A is true, statement B must also be true.

    • ๐Ÿ““ $\color{violet}If$ statement $\color{magenta}A$, $\color{violet}then$ statement $\color{magenta}B$

    • $\color{violet}If$ $\color{magenta}A$, $\color{magenta}B$ must follow.

    • $\color{magenta}A$ $\color{violet}implies$ $\color{magenta}B$

    • $\color{magenta}A$ $\color{violet}โŸน$ $\color{magenta}B$

    • If $P$ then $Q$

    • $Q$ if $P$

    • $P$ only if $Q$

    โ€œIf it rains, then the ground is wet.โ€

  • Conjunction (AND):

    Both $\color{magenta}A$ and $\color{magenta}B$ are asserted true simultaneously

    • ๐Ÿ““ Statement $\color{magenta}A$ $\color{violet}and$ statement $\color{magenta}B$
    • $\color{magenta}A$ $\color{violet}๏ผ†$ $\color{magenta}B$
    • $\color{magenta}A$ $\color{violet}โˆง$ $\color{magenta}B$

    โ€œIt is raining and it is cold.โ€

  • Disjunction (OR)

    At least one of $\color{magenta}A$ or $\color{magenta}B$ is true (possibly both).

    • ๐Ÿ““ Statement $\color{magenta}A$ $\color{violet}or$ statement $\color{magenta}B$

    • $\color{magenta}A$ $\color{violet}โˆจ$ $\color{magenta}B$

    It can be rainy or windy today.

  • Negation

    This asserts $\color{magenta}A$ $\color{salmon}is$ $\color{salmon}false$

    • ๐Ÿ““ Statement $\color{salmon}Not$ $\color{magenta}A$
    • $\color{salmon}๏ฟข$ $\color{magenta}A$

Negated Statements

$${\color{salmon}๏ฟข ({\color{red}a}: {\color{gold}P})} = {\color{red}a}: {\color{salmon}๏ฟข}{\color{gold}P}$$ $${\color{salmon}๏ฟข({\color{red}a} \in {\color{lime}T})} = {\color{red}a} โˆ‰ {\color{lime}T}$$ $${\color{salmon}๏ฟข ({\color{lime}T} | {\color{gold}P})} = {\color{lime}T} | {\color{salmon}๏ฟข}{\color{gold}P}$$ $${\color{salmon}๏ฟข(โˆ€{\color{red}a}:{\color{gold}P})} = โˆƒa:๏ฟขP$$ $${\color{salmon}๏ฟข(โˆƒ{\color{red}a}:{\color{gold}P})} = โˆ€a:๏ฟขP$$

โš’๏ธ The beauty of math is that once you master the logical toolkit above, you can craft entire theories, proving truths that build on one another, in layers.

๐Ÿ”ฉ And the best part? Thereโ€™s no room for miscommunication. Everything is laid out with crisp, mathematical clarity.

With this logical language at your disposal, you can now construct proofs, formulate models, and develop theories that are as elegant as they are unambiguous. Each sentenceโ€”whether it asserts a property, defines a set, or connects ideas through conditionalsโ€”serves as a building block in the vast structure of mathematics.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ