Autosave: 2022-12-26 11:00:04

This commit is contained in:
thomasabishop 2022-12-26 11:00:04 +00:00
parent d3341a1a1d
commit 450889d285
6 changed files with 130 additions and 123 deletions

View file

@ -83,12 +83,15 @@ _Prove_ $\vdash (\lnot A \lor \lnot B) \leftrightarrow \lnot(A \land B)$
**Lines 1-12**
- Our auxiliary goal is to prove $\lnot (A \lor B) \rightarrow \lnot (A \land B)$.
- Our starting assumption is to a disjunction. Thus we can apply [Disjunction Elimination](/Logic/Proofs/Disjunction_Elimination.md) to show that our goal sentence $\sim(A & B)$ follows from each of the disjuncts ($\sim A$ and $\sim B$) in dedicated subproofs. If we can do this, we have the right to derive $\sim (A & B$).
- In both cases($\sim A \vdash \sim (A & B$) and ($\sim B \vdash \sim (A & B$) we require another subproof to reach the target as there is no easy path available. So we derive a negation from $A & B$ so that we can negate it as $\sim (A & B$).
- Having done this, we can discharge the [Disjunction Elimination](Disjunction%20Elimination.md) subproofs and derive $\sim (A & B$) from $\sim A \lor \sim B$
- Our starting assumption is to a disjunction. Thus we can apply [Disjunction Elimination](/Logic/Proofs/Disjunction_Elimination.md) to show that our goal sentence $\lnot(A \land B)$ follows from each of the disjuncts ($\lnot A$ and $\lnot B$) in dedicated sub-proofs. If we can do this, we have the right to derive $\lnot (A \land B)$.
- In both cases($\lnot A \vdash \lnot (A \land B)$) and ($\lnot B \vdash \lnot (A \land B)$ we require another sub-proof to reach the target as there is no easy path available. So we derive a negation from $A \land B$ so that we can negate it as $\lnot (A \land B)$.
- Having done this, we can discharge the [Disjunction Elimination](/Logic/Proofs/Disjunction_Elimination.md) sub-proofs and derive $\lnot (A \land B)$ from $\lnot A \lor \lnot B$
**Lines 13-26**
- Our auxiliary goal is to prove $\sim (A & B) \supset \sim A \lor \sim B$. This will require a different approach to the above because we are not working from a disjunction anymore, we have a negated conjunction.
- We will do this by assuming the negation of what we want to prove ($\sim (\sim A \lor \sim B)$) and then apply [Negation Elimination](Negation%20Elimination.md) to get $\sim A \lor \sim B$.
- This requires us to derive a contradiction. We get this on lines 23 and 24. This requires as previous steps that we have two subproofs that use [Negation Elimination](Negation%20Elimination.md) to release $A$ and $B$
- Our auxiliary goal is to prove $\lnot (A \land B) \rightarrow \lnot A \lor \lnot B$. This will require a different approach to the above because we are not working from a disjunction anymore, we have a negated conjunction.
- We will do this by assuming the negation of what we want to prove ($\lnot (\lnot A \lor \lnot B)$) and then apply [Negation Elimination](/Logic/Proofs/Negation_Elimination.md) to get $\lnot A \lor \lnot B$.
- This requires us to derive a contradiction. We get this on lines 23 and 24. This requires as previous steps that we have two sub-proofs that use [Negation Elimination](/Logic/Proofs/Negation_Elimination.md) to release $A$ and $B$

View file

@ -0,0 +1,53 @@
---
categories:
- Logic
tags: [propositional-logic]
---
# Atomic and molecular propositions
Propositions are expressions **that have truth values**, either true or false.
We call a proposition which does not contain a logical connective (or 'sentential connective') a **simple proposition**.
We call a proposition that does contain a logical connective, a **compound proposition**.
Simple propositions are represented within a formal language of sentential logic with a single character, customarily _P_ or _Q_. When we refer to the formal representation of such propositions in our system of sentential logic (SL) we call them **atomic propositions**.
Compound propositions consist in single characters for each atomic proposition that they comprise, combined with a symbol for the logical connective. When we refer to the formal representation of such propositions in SL we call them **molecular propositions**.
### Demonstration
Atomic proposition:
```
Socrates was a philosopher.
(P)
```
Molecular proposition:
```
Socrates was a philosopher and a drinker.
(P & Q)
```
Connectives in natural language often obscure the logical basis of the proposition being expressed (where such a proposition contains a proposition, i.e. excluding propositions that are _logically indeterminate_. The molecular proposition is above is such an example. In this instance the proposition can be expressed more precisely as:
```
Socrates was a philosopher and Socrates was a drinker.
```
Where propositions in natural language cannot be elucidated by the addition of implied logical connectives in the manner above, they must be treated not as molecular propositions but as atomic proposition. Example:
```
Two splashes of gin and a few drops of vermouth make a great martini.
```
If we were to formalise this as:
```
Two splashes of gin make a great martini and a few drops of vermouth make a great martini.
```
We would lose the sense of the original and we would not be uncovering any logic that is in the original.

View file

@ -1,51 +0,0 @@
---
categories:
- Mathematics
tags: [logic]
---
Sentences or propositions (we will use 'sentences' for consistency) are expressions **that have truth values**, either true or false.
We call a sentence which does not contain a logical connective (or 'sentential connective') a **simple sentence**.
We call a sentence that does contain a logical connective, a **compound sentence**.
Simple sentences are represented within a formal language of sentential logic with a single character, customarily _P_ or _Q_. When we refer to the formal representation of such sentences in our system of sentential logic (SL) we call them **atomic sentences**.
Compound sentences consist in single characters for each atomic sentence that they comprise, combined with a symbol for the logical connective. When we refer to the formal representation of such sentences in SL we call them **molecular sentences**.
### Demonstration
Atomic sentence:
```
Socrates was a philosopher.
(P)
```
Molecular sentence:
```
Socrates was a philosopher and a drinker.
(P & Q)
```
Connectives in natural language often obscure the logical basis of the proposition being expressed (where such a sentence contains a proposition, i.e. excluding sentences that are _logically indeterminate_. The molecular sentence is above is such an example. In this instance the sentence can be expressed more precisely as:
```
Socrates was a philosopher and Socrates was a drinker.
```
Where sentences in natural language cannot be elucidated by the addition of implied logical connectives in the manner above, they must be treated not as molecular sentences but as atomic sentence. Example:
```
Two splashes of gin and a few drops of vermouth make a great martini.
```
If we were to formalise this as:
```
Two splashes of gin make a great martini and a few drops of vermouth make a great martini.
```
We would lose the sense of the original and we would not be uncovering any logic that is in the original.

View file

@ -0,0 +1,66 @@
---
categories:
- Logic
tags: [propositional-logic]
---
# Syntax of propositional logic
## Syntax of formal languages versus semantics
> The syntactical study of a language is the study of the expressions of the language and the relations among them _without regard_ to the possible interpretations or 'meaning' of these expressions.
Syntax is talking about the order and placement of propositions relative to connectives and what constitutes a well-formed expression in these terms. Semantics is about what the connectives mean, in other words: truth-functions and truth-values and not just placement and order.
## Formal specification of the syntax of the language of Sentential Logic
### Vocabulary
Propositions in SL are capitalised Roman letters (non-bold) with or without natural number subscripts. We may call these proposition letters. For example:
```plain
P, Q, R...P1, Q1, R1...
```
The connectives of SL are the five truth-functional connectives:
```
~, &, v, ⊃, ≡
```
The punctuation marks of SL consist in the left and right parentheses:
```
( )
```
### Grammar
1. Every proposition letter is a proposition.
1. If **P** is a proposition then **~P** is a proposition.
1. If **P** and **Q** are propositions, then **(P & Q)** is a proposition
1. If **P** and **Q** are propositions, then **(P v Q)** is a proposition
1. If **P** and **Q** are propositions, then **(P ⊃ Q)** is a proposition
1. If **P** and **Q** are propositions, then **(P ≡ Q)** is a proposition
1. Nothing is a proposition unless it can be formed by repeated application of clauses 1-6
### Additional syntactic concepts
We also distinguish:
- the **main connective**
- **immediate sentential components**
- **sentential components**
- **atomic components**
These definitions provide a formal specification of the concepts of atomic and molecular propositions _introduced earlier_.
1. If **P** is an atomic proposition, **P** contains no connectives and hence does not have a main connective. **P** has no immediate sentential components.
1. If **P** is of the form **~Q** where **Q** is a proposition, then the main connective of **P** is the tilde that occurs before **Q** and **Q** is the immediate sentential component of **P**.
1. If P is of the form:
1. **Q & R**
1. **Q v R**
1. **Q ⊃ R**
1. **Q ≡ R**
where **Q** and **R** are propositions, then the main connective of **P** is the connective that occurs between **Q** and **R** and **Q** and **R** are the immediate sentential components of **P**.

View file

@ -1,64 +0,0 @@
---
categories:
- Mathematics
tags: [logic]
---
## Syntax of formal languages versus semantics
> The syntactical study of a language is the study of the expressions of the language and the relations among them _without regard_ to the possible interpretations or 'meaning' of these expressions.
Syntax is talking about the order and placement of propositions relative to connectives and what constitutes a well-formed expression in these terms. Semantics is about what the connectives mean, in other words: truth-functions and truth-values and not just placement and order.
## Formal specification of the syntax of the language of Sentential Logic
### Vocabulary
Sentences in SL are capitalised Roman letters (non-bold) with or without natural number subscripts. We may call these sentence letters. For example:
```plain
P, Q, R...P1, Q1, R1...
```
The connectives of SL are the five truth-functional connectives:
```
~, &, v, ⊃, ≡
```
The punctuation marks of SL consist in the left and right parentheses:
```
( )
```
### Grammar
1. Every sentence letter is a sentence.
1. If **P** is a sentence then **~P** is a sentence.
1. If **P** and **Q** are sentences, then **(P & Q)** is a sentence
1. If **P** and **Q** are sentences, then **(P v Q)** is a sentence
1. If **P** and **Q** are sentences, then **(P ⊃ Q)** is a sentence
1. If **P** and **Q** are sentences, then **(P ≡ Q)** is a sentence
1. Nothing is a sentence unless it can be formed by repeated application of clauses 1-6
### Additional syntactic concepts
We also distinguish:
- the **main connective**
- **immediate sentential components**
- **sentential components**
- **atomic components**
These definitions provide a formal specification of the concepts of atomic and molecular sentences _introduced earlier_.
1. If **P** is an atomic sentence, **P** contains no connectives and hence does not have a main connective. **P** has no immediate sentential components.
1. If **P** is of the form **~Q** where **Q** is a sentence, then the main connective of **P** is the tilde that occurs before **Q** and **Q** is the immediate sentential component of **P**.
1. If P is of the form:
1. **Q & R**
1. **Q v R**
1. **Q ⊃ R**
1. **Q ≡ R**
where **Q** and **R** are sentences, then the main connective of **P** is the connective that occurs between **Q** and **R** and **Q** and **R** are the immediate sentential components of **P**.

View file

@ -3,7 +3,7 @@
# This script returns a random topic for me to revise
# Choose source directories...
DIRS_TO_PARSE="../Computer_Architecture ../Electronics_and_Hardware ../Operating_Systems ../Programming_Languages/Shell "
DIRS_TO_PARSE="../Computer_Architecture ../Electronics_and_Hardware ../Operating_Systems ../Programming_Languages/Shell ../Logic"
# Return array of all files belonging to source dirs...
for ele in $DIRS_TO_PARSE; do
@ -14,4 +14,4 @@ done
RANDOM_FILE_INDEX=$(( $RANDOM % ${#FILE_MATCHES[@]} + 0 ))
# Return file matching that index...
echo "Revise this topic: ${FILE_MATCHES[$RANDOM_FILE_INDEX]}"
echo "Revise this topic: ${FILE_MATCHES[$RANDOM_FILE_INDEX]}"