Reindexing
This commit is contained in:
parent
f9d4fe165a
commit
78024ac846
77 changed files with 933 additions and 902 deletions
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
categories:
|
||||
categories:
|
||||
- DSA
|
||||
tags:
|
||||
- data-structures
|
||||
---
|
||||
|
||||
_A stack visualised vertically_
|
||||

|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Linux
|
||||
tags: [sytems-programming]
|
||||
tags: [systems-programming]
|
||||
---
|
||||
|
||||
# Monitoring processes and resources
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
categories:
|
||||
- Linux
|
||||
- Linux
|
||||
- Networks
|
||||
tags: []
|
||||
---
|
||||
|
||||
# Bluetooth
|
||||
# Bluetooth
|
||||
|
||||
## Connect to devices with `bluetoothctl`
|
||||
|
||||
|
@ -12,13 +13,15 @@ tags: []
|
|||
# Start bluetooth first
|
||||
bluetoothctl power on
|
||||
```
|
||||
Then:
|
||||
|
||||
Then:
|
||||
|
||||
```bash
|
||||
# Launch bluetoothctl
|
||||
# Launch bluetoothctl
|
||||
bluetoothctl
|
||||
```
|
||||
This initiates `[bluetooth] #` prompt. Then follow this sequence:
|
||||
|
||||
This initiates `[bluetooth] #` prompt. Then follow this sequence:
|
||||
|
||||
```bash
|
||||
[bluetooth]# agent on
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Linux
|
||||
tags: [make]
|
||||
- Linux
|
||||
tags: [compilers]
|
||||
---
|
||||
|
||||
# Compile package from source
|
||||
|
||||
1. Clone the repo from GitHub
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
categories:
|
||||
- Linux
|
||||
tags: []
|
||||
- Linux
|
||||
tags: [package-management]
|
||||
---
|
||||
|
||||
|
||||
# Pacman
|
||||
|
||||
## List all installed packages
|
||||
|
||||
```
|
||||
pacman -Qe
|
||||
```
|
||||
|
@ -16,4 +16,4 @@ pacman -Qe
|
|||
|
||||
```
|
||||
pacman -Rcns
|
||||
```
|
||||
```
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
---
|
||||
categories:
|
||||
- Linux
|
||||
tags: [journal, systemd, sytems-programming]
|
||||
- Linux
|
||||
tags: [journaling, systemd, systems-programming]
|
||||
---
|
||||
|
||||
|
||||
# `journald`
|
||||
|
||||
`journald` is a program that comes as default with [systemd](/Linux/systemd.md). It is a service fror collecting and storing system-level log data. I keeps a track of all [kernel](/Operating_Systems/The_Kernel.md) processes. It is invaluable when tracing the source of problems and errors that may arise on the system level. It keeps a track of all kernal processes.
|
||||
|
||||

|
||||
|
||||
|
||||
## `journalctl`
|
||||
## `journalctl`
|
||||
|
||||
We use `journalctl` to access the logs. The command by itself outputs the entire log which will be huge and hard to scroll through. We can refine the results with modifiers.
|
||||
|
||||
|
||||
### View logs for a specific process with pid
|
||||
|
||||
```bash
|
||||
|
@ -24,6 +21,7 @@ journalctl _PID=1234
|
|||
```
|
||||
|
||||
### View logs for a specific time period
|
||||
|
||||
This can be really helpful since you can bracket the most recent events which will be more memorable.
|
||||
|
||||
```bash
|
||||
|
@ -31,16 +29,18 @@ journalctl -S -1h
|
|||
```
|
||||
|
||||
### View logs for a specfic systemd unit
|
||||
|
||||
```bash
|
||||
journalctl -u cronie.service
|
||||
```
|
||||
|
||||
### View boot logs
|
||||
### View boot logs
|
||||
|
||||
```bash
|
||||
journalctl -b
|
||||
```
|
||||
|
||||
#### Identify specific boot
|
||||
#### Identify specific boot
|
||||
|
||||
```bash
|
||||
journalctl --list-boots
|
||||
|
@ -52,4 +52,4 @@ journalctl --list-boots
|
|||
```bash
|
||||
journalctl -k
|
||||
|
||||
```
|
||||
```
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
Sentences or propositions (we will use 'sentences' for consistency) are expressions **that have truth values**, either true or false.
|
||||
|
@ -10,42 +10,42 @@ We call a sentence which does not contain a logical connective (or 'sentential c
|
|||
|
||||
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**.
|
||||
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:
|
||||
Atomic sentence:
|
||||
|
||||
````
|
||||
```
|
||||
Socrates was a philosopher.
|
||||
(P)
|
||||
````
|
||||
```
|
||||
|
||||
Molecular sentence:
|
||||
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:
|
||||
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.
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
Give that the biconditional means that if $P$ is the case, $Q$ is the case and if $Q$ is the case, $P$ must be the case, if we have $P \equiv Q$ and $P$, we can derive $Q$ and vice versa.
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: []
|
||||
---
|
||||
The biconditional means if $P$ is the case, $Q$ is the case and if $Q$ is the case, $P$ must be the case. Thus to introduce this operator we must demonstrate both that $Q$ follows from $P$ and that $P$ follows from $Q$. We do this via two sub-proofs.
|
||||
|
||||
The biconditional means if $P$ is the case, $Q$ is the case and if $Q$ is the case, $P$ must be the case. Thus to introduce this operator we must demonstrate both that $Q$ follows from $P$ and that $P$ follows from $Q$. We do this via two sub-proofs.
|
||||
|
||||

|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
If we have a conditional and we have independently derived its antecedent, we may invoke its consequent. This is often referred to as *Modus ponens* (affirming the antecedent).
|
||||
If we have a conditional and we have independently derived its antecedent, we may invoke its consequent. This is often referred to as _Modus ponens_ (affirming the antecedent).
|
||||
|
||||

|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
If we can show that $Q$ follows from $P$ (typically via a subproof) than we can assert that P implies Q. This is also sometimes known as _Conditional Proof_
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
|
||||
If a conjunction exists, it means that both conjuncts are the case; therefore we can legitimately extract either one of them. Also known as *Simplification*.
|
||||
If a conjunction exists, it means that both conjuncts are the case; therefore we can legitimately extract either one of them. Also known as _Simplification_.
|
||||
|
||||

|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
If two conjuncts have each been independently derived then they can be conjoined. Also known more simply as *Conjunction*
|
||||
If two conjuncts have each been independently derived then they can be conjoined. Also known more simply as _Conjunction_
|
||||
|
||||

|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
## Informal definition
|
||||
|
||||
A set of sentences is consistent if and only if **it is possible for all the members of the set to be true at the same time**. A set of sentences is inconsistent if and only if it is not consistent.
|
||||
|
@ -11,54 +12,52 @@ A set of sentences is consistent if and only if **it is possible for all the mem
|
|||
|
||||
The following set of sentences form an inconsistent set:
|
||||
|
||||
````
|
||||
```
|
||||
(1) Anyone who takes astrology seriously is a lunatic.
|
||||
(2) Alice is my sister and no sister of mine has a lunatic for a husband.
|
||||
(3) David is Alice's husband and he read's the horoscope column every morning.
|
||||
(4) Anyone who reads the horoscope column every morning takes astrology seriously.
|
||||
````
|
||||
```
|
||||
|
||||
The set is inconsistent because not all of them can be true. If (1), (3), (4) are true, (2) cannot be. If (2), (3),(4) are true, (1) cannot be.
|
||||
|
||||
## Formal definition
|
||||
|
||||
>
|
||||
> A finite set of sentences $\Gamma$ is truth-functionally consistent if and only if there is at least one truth-assignment in which all sentences of $\Gamma$ are true.
|
||||
> A finite set of sentences $\Gamma$ is truth-functionally consistent if and only if there is at least one truth-assignment in which all sentences of $\Gamma$ are true.
|
||||
|
||||
### Informal expression
|
||||
|
||||
````
|
||||
```
|
||||
The book is blue or the book is brown
|
||||
The book is brown
|
||||
````
|
||||
```
|
||||
|
||||
### Formal expression
|
||||
|
||||
````
|
||||
```
|
||||
{P v Q, Q}
|
||||
````
|
||||
```
|
||||
|
||||
### Truth-table
|
||||
|
||||
````
|
||||
```
|
||||
P Q P ∨ Q Q
|
||||
T T T T *
|
||||
T F T F
|
||||
F T T T *
|
||||
F F F F
|
||||
````
|
||||
```
|
||||
|
||||
## Derivation
|
||||
|
||||
>
|
||||
> In terms of logical derivation, a finite $\Gamma$ of propositions is **inconsistent** in a system of derivation for propositional logic if and only if a sentence of the $P & \sim P$ is derivable from $\Gamma$. It is **consistent** just if this is not the case.
|
||||
> In terms of logical derivation, a finite $\Gamma$ of propositions is **inconsistent** in a system of derivation for propositional logic if and only if a sentence of the $P & \sim P$ is derivable from $\Gamma$. It is **consistent** just if this is not the case.
|
||||
|
||||
In other terms, if you can derive a contradiction from the set, the set is logically inconsistent.
|
||||
In other terms, if you can derive a contradiction from the set, the set is logically inconsistent.
|
||||
|
||||
A [contradiction](Logical%20truth%20and%20falsity.md#logical-falsity) contradiction has very important consequences for reasoning because if a set of propositions is inconsistent, every and all other propositions are derivable from that set.
|
||||
|
||||

|
||||
|
||||
*A demonstration of the the consequences of deriving a contradiction in a sequence of reasoning.*
|
||||
_A demonstration of the the consequences of deriving a contradiction in a sequence of reasoning._
|
||||
|
||||
Here we want to derive some proposition $Q$. If we can derive a contradiction from its negation as an assumption then, by the [negation elimination](Negation%20Elimination.md) rule, we can assert $Q$. This is why contradictions should be avoided in arguments, they 'prove' everything which, by association, undermines any particular premise you are trying to assert.
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
## Corresponding material conditional to show validity
|
||||
|
||||
To demonstrate *truth-functional validity* we have to construct a truth-table which contains each of the premises and the conclusion and then review each row to see if there is an assignment where both the premises and the conclusion are true.
|
||||
To demonstrate _truth-functional validity_ we have to construct a truth-table which contains each of the premises and the conclusion and then review each row to see if there is an assignment where both the premises and the conclusion are true.
|
||||
|
||||
A simpler way to get the same result is to invoke the corresponding material conditional. Here we concatenate the premises using conjunction and then join them to the conclusion using the material conditional, which then becomes the main connective. We then populate the truth table for this compound sentence. If it is logically true, the argument is valid.
|
||||
|
||||
|
@ -15,21 +16,21 @@ We will demonstrate with the following set:
|
|||
|
||||
$$ {P \equiv Q, P \lor Q, P &Q } $$
|
||||
|
||||
````
|
||||
P Q P ≡ Q P ∨ Q P & Q
|
||||
```
|
||||
P Q P ≡ Q P ∨ Q P & Q
|
||||
T T T T T *
|
||||
T F F T F
|
||||
F T F T F
|
||||
T F F T F
|
||||
F T F T F
|
||||
F F T F F
|
||||
````
|
||||
```
|
||||
|
||||
````
|
||||
P Q ( ( P ≡ Q ) & ( P ∨ Q ) ) ≡ ( P & Q )
|
||||
T T T
|
||||
T F T
|
||||
F T T
|
||||
```
|
||||
P Q ( ( P ≡ Q ) & ( P ∨ Q ) ) ≡ ( P & Q )
|
||||
T T T
|
||||
T F T
|
||||
F T T
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
We see above that the main connective, the material conditional returns true for every truth-functional assignment. In other words it is logically true. Consequently the argument is valid
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic, theorems]
|
||||
---
|
||||
|
||||
DeMorgan's laws express some fundamental equivalences that obtain between the Boolean [connectives](Truth-functional%20connectives.md):
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
This rule is sometimes also referred to as *Constructive Dilemma*. This can be a bit tricky to understand because the goal is to derive or *introduce* a new proposition separate from the disjunction you start out with. This may be disjunction, a single proposition or a proposition containing any other logical connective. You do this by constructing two sub-proofs, one for each of the disjuncts comprising the disjunction you start out with. If you can derive your target proposition as the conclusion of each subproof then you may invoke the conclusion in the main proof and take it to be derived.
|
||||
This rule is sometimes also referred to as _Constructive Dilemma_. This can be a bit tricky to understand because the goal is to derive or _introduce_ a new proposition separate from the disjunction you start out with. This may be disjunction, a single proposition or a proposition containing any other logical connective. You do this by constructing two sub-proofs, one for each of the disjuncts comprising the disjunction you start out with. If you can derive your target proposition as the conclusion of each subproof then you may invoke the conclusion in the main proof and take it to be derived.
|
||||
|
||||

|
||||
|
||||
*Here is an example where Disjunction Elimination is used to derive a new disjunction.*
|
||||
_Here is an example where Disjunction Elimination is used to derive a new disjunction._
|
||||
|
||||

|
||||
|
||||
*Here are two further examples that use Disjunction Elimination to derive singular propositions*
|
||||
_Here are two further examples that use Disjunction Elimination to derive singular propositions_
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
This rule can seem a little odd: like we are randomly introducing an additional proposition without giving any justification. However this is just a consequence of the fact if $P$ is true, so is $P \lor Q$ since disjunction is not the same as conjunction: only one disjunct needs to be true for the compound disjunction to be true. This is represented in the context of [truth-trees](Truth-trees.md#disjunction-decomposition) by the fact that truth can pass up via either branch of a disjunction pattern.
|
||||
This rule is sometimes also referred to (confusingly) as *Addition*.
|
||||
This rule can seem a little odd: like we are randomly introducing an additional proposition without giving any justification. However this is just a consequence of the fact if $P$ is true, so is $P \lor Q$ since disjunction is not the same as conjunction: only one disjunct needs to be true for the compound disjunction to be true. This is represented in the context of [truth-trees](Truth-trees.md#disjunction-decomposition) by the fact that truth can pass up via either branch of a disjunction pattern.
|
||||
This rule is sometimes also referred to (confusingly) as _Addition_.
|
||||
|
||||

|
||||
|
|
|
@ -1,65 +1,63 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
When we construct a formal proof in logic we are seeking to show that a certain proposition is **derivable** from other propositions. We use the words *derivation* and *proof* interchangeably.
|
||||
When we construct a formal proof in logic we are seeking to show that a certain proposition is **derivable** from other propositions. We use the words _derivation_ and _proof_ interchangeably.
|
||||
|
||||
>
|
||||
> A sentence $P$ is derivable in a system of propositional logic from a finite set of sentences if and only if there is a derivation in this system in which all and only the members of the set are **primary assumptions** and $P$ is the sentence on the last line.
|
||||
> A sentence $P$ is derivable in a system of propositional logic from a finite set of sentences if and only if there is a derivation in this system in which all and only the members of the set are **primary assumptions** and $P$ is the sentence on the last line.
|
||||
|
||||
We express the above symbolically as $\Gamma \vdash P$ . (Be careful not to confuse *derivable* ($\vdash$) from *entails* ($\vDash$).
|
||||
We express the above symbolically as $\Gamma \vdash P$ . (Be careful not to confuse _derivable_ ($\vdash$) from _entails_ ($\vDash$).
|
||||
|
||||
Derivability is therefore a property that a proposition can possess relative to a set.
|
||||
Derivability is therefore a property that a proposition can possess relative to a set.
|
||||
|
||||
For instance to demonstrate derivability for:
|
||||
|
||||
$$
|
||||
{\sim F \lor D, F, D \supset (G & H)} \vdash G &H
|
||||
{\sim F \lor D, F, D \supset (G & H)} \vdash G &H
|
||||
$$
|
||||
|
||||
We would establish $\sim F \lor D, F, D \supset (G & H)$ as primary assumptions and then, using the derivation rules of the system conclude with $G&H$. Every sentence in the derivation is either a **primary assumption** or an **auxiliary** assumption or justified by the rules of the derivation. An auxiliary assumption is one belonging to a sub-derivation. The primary assumptions belong to the main derivation.
|
||||
For any given derivation of the form $\Gamma \vdash P$ there may be a number of ways of demonstrating the derivation (more than one application of the rules governing the system) but only one is sufficient to establish derivability.
|
||||
We would establish $\sim F \lor D, F, D \supset (G & H)$ as primary assumptions and then, using the derivation rules of the system conclude with $G&H$. Every sentence in the derivation is either a **primary assumption** or an **auxiliary** assumption or justified by the rules of the derivation. An auxiliary assumption is one belonging to a sub-derivation. The primary assumptions belong to the main derivation.
|
||||
For any given derivation of the form $\Gamma \vdash P$ there may be a number of ways of demonstrating the derivation (more than one application of the rules governing the system) but only one is sufficient to establish derivability.
|
||||
|
||||
>
|
||||
> We will tend to use the terms *derivation* and *proof* interchangeably but we should note that there is a technical distinction in that a **proof is a derivation in which all of the assumptions have been discharged**
|
||||
> We will tend to use the terms _derivation_ and _proof_ interchangeably but we should note that there is a technical distinction in that a **proof is a derivation in which all of the assumptions have been discharged**
|
||||
|
||||
## Constructing proofs
|
||||
|
||||
We place assumptions above derivations and mark them *A* in the right-hand margin. We use a shorthand for the derivation rules and also place these in the right-hand margin.
|
||||
We place assumptions above derivations and mark them _A_ in the right-hand margin. We use a shorthand for the derivation rules and also place these in the right-hand margin.
|
||||
|
||||
We divide assumptions from derivations with a horizontal line. We number each line and use this to refer to the line we are applying the derivation to. Sub-proofs follow this structure recursively.
|
||||
This is known as *Fitch notation*
|
||||
*Schematically*
|
||||
This is known as _Fitch notation_
|
||||
_Schematically_
|
||||
|
||||

|
||||
|
||||
*Applied example*
|
||||
_Applied example_
|
||||
|
||||

|
||||
|
||||
## Sub-proofs
|
||||
|
||||
When a sub-proof is terminated, the assumption with which it starts is said to be *discharged*. It's conclusion can then be drawn upon and invoked within the main proof by reference to its start and end line number. However statements within the sub-proof cannot be referred to again from within the main proof, only its result.
|
||||
When a sub-proof is terminated, the assumption with which it starts is said to be _discharged_. It's conclusion can then be drawn upon and invoked within the main proof by reference to its start and end line number. However statements within the sub-proof cannot be referred to again from within the main proof, only its result.
|
||||
|
||||
## Derivation rules
|
||||
|
||||
Derivation rules are [syntactic](Syntax%20of%20sentential%20logic.md) rather than semantic. They are applied on the basis of their form rather than on the basis of the truth conditions of the sentences they are applied to.
|
||||
Derivation rules are [syntactic](Syntax%20of%20sentential%20logic.md) rather than semantic. They are applied on the basis of their form rather than on the basis of the truth conditions of the sentences they are applied to.
|
||||
|
||||
>
|
||||
> Derivation rules can be applied without having an interpretation of the symbols in mind. A derivation rule tells us that: given a group of symbols with a certain structure, we can write down another group of symbols with a certain structure.
|
||||
> Derivation rules can be applied without having an interpretation of the symbols in mind. A derivation rule tells us that: given a group of symbols with a certain structure, we can write down another group of symbols with a certain structure.
|
||||
|
||||
Each of the main logical connectives has an associated derivation rule. The binary connectives have pairs of rules, one for the introduction of the connective and one for its elimination.
|
||||
Each of the main logical connectives has an associated derivation rule. The binary connectives have pairs of rules, one for the introduction of the connective and one for its elimination.
|
||||
|
||||
The main derivation rules:
|
||||
The main derivation rules:
|
||||
|
||||
* [Negation Introduction](Negation%20Introduction.md)
|
||||
* [Negation Elimination](Negation%20Elimination.md)
|
||||
* [Conjunction Introduction](Conjunction%20Introduction.md)
|
||||
* [Conjunction Elimination](Conjunction%20Elimination.md)
|
||||
* [Disjunction Introduction](Disjunction%20Introduction.md)
|
||||
* [Disjunction Elimination](Disjunction%20Elimination.md)
|
||||
* [Conditional Introduction](Conditional%20Introduction.md)
|
||||
* [Disjunction Elimination](Disjunction%20Elimination.md)
|
||||
* [Biconditional Introduction](Biconditional%20Introduction.md)
|
||||
* [Biconditional Elimination](Biconditional%20Elimination.md)
|
||||
- [Negation Introduction](Negation%20Introduction.md)
|
||||
- [Negation Elimination](Negation%20Elimination.md)
|
||||
- [Conjunction Introduction](Conjunction%20Introduction.md)
|
||||
- [Conjunction Elimination](Conjunction%20Elimination.md)
|
||||
- [Disjunction Introduction](Disjunction%20Introduction.md)
|
||||
- [Disjunction Elimination](Disjunction%20Elimination.md)
|
||||
- [Conditional Introduction](Conditional%20Introduction.md)
|
||||
- [Disjunction Elimination](Disjunction%20Elimination.md)
|
||||
- [Biconditional Introduction](Biconditional%20Introduction.md)
|
||||
- [Biconditional Elimination](Biconditional%20Elimination.md)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
The vast majority of sentences in natural and formal logical languages are neither [ logically true](Logical%20truth%20and%20falsity.md#logical-truth) or [\| logically false](Logical%20truth%20and%20falsity.md#logical-falsity). This makes sense because sentences of this form are all either tautologies or contradictions and as such do not express information about the state of events in the world. We call sentences that are neither logically true or logically false, logically indeterminate sentences.
|
||||
|
@ -12,39 +12,38 @@ A sentence is logically indeterminate if it is neither logically true or logical
|
|||
|
||||
For example the sentence:
|
||||
|
||||
````
|
||||
```
|
||||
It is raining.
|
||||
````
|
||||
```
|
||||
|
||||
May be true or false thus it can it both be asserted and denied quite consistently. It is true if it actually is raining and false if it actually is not raining. There is no logical contradiction in saying it is raining when it isn't raining, this assertion is simply false. There is a contradiction in saying it is both states. Thus the sentence:
|
||||
|
||||
````
|
||||
```
|
||||
It is raining and it is not raining.
|
||||
````
|
||||
```
|
||||
|
||||
Cannot be consistently asserted as there is no possibility of the sentence being true. It is either raining or it isn't raining. Given the law for conjunction both conjuncts must be true for the sentence as a whole to be true. But in the case of this sentence if one conjunct is true, the other must be false and vice versa, hence it is not possible for the sentence to be true at all. It can *only* be false.
|
||||
Cannot be consistently asserted as there is no possibility of the sentence being true. It is either raining or it isn't raining. Given the law for conjunction both conjuncts must be true for the sentence as a whole to be true. But in the case of this sentence if one conjunct is true, the other must be false and vice versa, hence it is not possible for the sentence to be true at all. It can _only_ be false.
|
||||
|
||||
Contrariwise the sentence:
|
||||
|
||||
````
|
||||
```
|
||||
It is raining or it is not raining.
|
||||
````
|
||||
```
|
||||
|
||||
Cannot be consistently denied as there is no possibility of it being false. It is either raining or not raining. Given the law for disjunction, either disjunct can be true to make the sentence as a whole true. Given that it is either raining or not raining in either scenario, the sentence as a whole will be true. Therefore there is no possibility of it being false, it can *only* be true.
|
||||
Cannot be consistently denied as there is no possibility of it being false. It is either raining or not raining. Given the law for disjunction, either disjunct can be true to make the sentence as a whole true. Given that it is either raining or not raining in either scenario, the sentence as a whole will be true. Therefore there is no possibility of it being false, it can _only_ be true.
|
||||
|
||||
## Formal definition
|
||||
|
||||
>
|
||||
> A sentence P is truth-functionally indeterminate if and only if it is neither truth-functionally true or truth-functionally false.
|
||||
> A sentence P is truth-functionally indeterminate if and only if it is neither truth-functionally true or truth-functionally false.
|
||||
|
||||
````
|
||||
```
|
||||
P
|
||||
````
|
||||
```
|
||||
|
||||
### Truth-table
|
||||
|
||||
````
|
||||
```
|
||||
P P
|
||||
T T
|
||||
F F
|
||||
````
|
||||
```
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic, theorems]
|
||||
---
|
||||
|
||||
|
||||
> A proposition cannot be true and false at the same time.
|
||||
> $$
|
||||
> \\sim (P & \sim P)
|
||||
> $$
|
||||
> A proposition cannot be true and false at the same time.
|
||||
>
|
||||
> $$
|
||||
> \\sim (P & \sim P)
|
||||
> $$
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [theorems, logic]
|
||||
---
|
||||
|
||||
>
|
||||
> Every proposition has to be either true or false. There can be no middle ground.
|
||||
> $$
|
||||
> P \lor \sim P
|
||||
> $$
|
||||
> Every proposition has to be either true or false. There can be no middle ground.
|
||||
>
|
||||
> $$
|
||||
> P \lor \sim P
|
||||
> $$
|
||||
|
|
|
@ -1,47 +1,45 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
>
|
||||
> Two sentences, P and Q, are truth-functionally equivalent if and only if there is no truth assignment in which P is true and Q is false
|
||||
> Two sentences, P and Q, are truth-functionally equivalent if and only if there is no truth assignment in which P is true and Q is false
|
||||
|
||||
### Informal expression
|
||||
|
||||
````
|
||||
```
|
||||
P: If it is raining then the pavement will be wet.
|
||||
Q: The pavement is not wet unless it is raining.
|
||||
````
|
||||
```
|
||||
|
||||
### Formal expression
|
||||
|
||||
$$
|
||||
P \supset Q \equiv \sim P \lor Q
|
||||
P \supset Q \equiv \sim P \lor Q
|
||||
$$
|
||||
|
||||
### Truth-tables
|
||||
|
||||
````
|
||||
P Q P ⊃ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
```
|
||||
P Q P ⊃ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
````
|
||||
P Q ~ P ∨ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
```
|
||||
P Q ~ P ∨ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
### Derivation
|
||||
|
||||
>
|
||||
> Propositions $P$ and $Q$ are equivalent in a system of [derivation](Formal%20proofs%20in%20propositional%20logic.md) for propositional logic if $Q$ is derivable from $P$ and $P$ is derivable from $Q$.
|
||||
> Propositions $P$ and $Q$ are equivalent in a system of [derivation](Formal%20proofs%20in%20propositional%20logic.md) for propositional logic if $Q$ is derivable from $P$ and $P$ is derivable from $Q$.
|
||||
|
||||
Note that the property of equivalence stated in terms of derivablity above is identical to the derivation rule for the [material biconditional](Biconditional%20Introduction.md):
|
||||
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
## Logical possibility
|
||||
|
||||
In distinguishing the properties of [logical consistency](Consistency.md) and [validity](Validity%20and%20entailment.md#validity) we make tacit use of the notion of **possibility**. This is because when we consider the validity of an argument we are assessing truth-conditions and this consists in asking ourselves what could or could not be the case: were it such that *P*, then it would be the case that *Q*. It is important to understand what possibility means in the context of logic and how it differs from what we might mean ordinarily when we use the term.
|
||||
In distinguishing the properties of [logical consistency](Consistency.md) and [validity](Validity%20and%20entailment.md#validity) we make tacit use of the notion of **possibility**. This is because when we consider the validity of an argument we are assessing truth-conditions and this consists in asking ourselves what could or could not be the case: were it such that _P_, then it would be the case that _Q_. It is important to understand what possibility means in the context of logic and how it differs from what we might mean ordinarily when we use the term.
|
||||
|
||||
It is evident from the case of arguments that are valid but not sound that logic operates with a specialised notion of possibility. For example it has to be the case that the proposition *Every woman can levitate* is logically possible since the following argument is valid:
|
||||
It is evident from the case of arguments that are valid but not sound that logic operates with a specialised notion of possibility. For example it has to be the case that the proposition _Every woman can levitate_ is logically possible since the following argument is valid:
|
||||
|
||||
````
|
||||
```
|
||||
1. P: Janice is a woman.
|
||||
2. P: Every woman can levitate.
|
||||
3. C: Janice can levitate.
|
||||
````
|
||||
```
|
||||
|
||||
But we know of course that women cannot levitate. When we assert that this is impossible we are relying on a stronger notion of possibility than logical possibility. It follows that the concept of possibility can have different degrees. The scope of the concept of possibility has been the concern of logicians and philosophers since at least the time of Plato and numerous different formulations exist. The notion that we mostly work with unreflectively in everyday life is nomological possibility. This means ‘governed by the application of laws’ where these laws pertain to our current understanding of the natural world as determined by physics. Levitation is therefore nomologically impossible but logically possible.
|
||||
|
||||
|
@ -21,17 +22,16 @@ If logical possibility is not constrained by the laws of physics does it place a
|
|||
|
||||
Some examples of contradictions:
|
||||
|
||||
* There is a dog that is not a dog
|
||||
* Today is Tuesday and today is not Tuesday
|
||||
* The cat that is dead is alive
|
||||
- There is a dog that is not a dog
|
||||
- Today is Tuesday and today is not Tuesday
|
||||
- The cat that is dead is alive
|
||||
|
||||
From this we can derive the following property of logical possibility:
|
||||
|
||||
>
|
||||
> A proposition is logically possible just if it does not imply a contradiction.
|
||||
> A proposition is logically possible just if it does not imply a contradiction.
|
||||
|
||||
## Logical necessity
|
||||
|
||||
A sentence is *logically necessary* if it is true in every logically possible circumstance which is to say: true on every possible truth functional assignment. Necessity and [ logical truth](Logical%20truth%20and%20falsity.md#logical-truth) are therefore synonyms: anything that is logically true (a tautology) is true by necessity (could not be otherwise.)
|
||||
A sentence is _logically necessary_ if it is true in every logically possible circumstance which is to say: true on every possible truth functional assignment. Necessity and [ logical truth](Logical%20truth%20and%20falsity.md#logical-truth) are therefore synonyms: anything that is logically true (a tautology) is true by necessity (could not be otherwise.)
|
||||
|
||||
Further, every logical truth is logically possible but not everything that is logically possible is logically true. It is possible that it is raining but this is not logically necessary - it could be otherwise, i.e not raining. However it is not possible that it could be both raining and not raining.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
We say of certain sentences that they are logically true or logically false.
|
||||
|
@ -14,38 +14,37 @@ A sentence is logically false if and only if **it is not possible for the senten
|
|||
|
||||
**Demonstration**
|
||||
|
||||
````
|
||||
```
|
||||
There is a country that is not a country.
|
||||
Apples are fruits and apples are not fruits
|
||||
````
|
||||
```
|
||||
|
||||
Neither sentence can be true because the truth of the first clause is contradicted by the second. By the principle of [consistency](Consistency.md), it is not possible for both clauses to be true at once therefore the sentence, overall has the truth value of falsity
|
||||
Neither sentence can be true because the truth of the first clause is contradicted by the second. By the principle of [consistency](Consistency.md), it is not possible for both clauses to be true at once therefore the sentence, overall has the truth value of falsity
|
||||
|
||||
The examples above are simple sentences but logical falsity also applies to compound sentences and it is actually easier to see the logical principle at work with compound sentences since once simple sentence of the compound contradicts the other such that the overall sentence cannot be consistently asserted:
|
||||
|
||||
````
|
||||
```
|
||||
It is raining and it is not raining.
|
||||
````
|
||||
```
|
||||
|
||||
### Formal definition
|
||||
|
||||
>
|
||||
> A sentence P is truth-functionally false if and only if P is false on every truth-value assignment
|
||||
> A sentence P is truth-functionally false if and only if P is false on every truth-value assignment
|
||||
|
||||
### Formal expression
|
||||
|
||||
````
|
||||
```
|
||||
P & ~ P
|
||||
````
|
||||
```
|
||||
|
||||
### Truth-table
|
||||
|
||||
````
|
||||
```
|
||||
Can
|
||||
P P & ~ P
|
||||
T F
|
||||
P P & ~ P
|
||||
T F
|
||||
F F
|
||||
````
|
||||
```
|
||||
|
||||
## Logical truth
|
||||
|
||||
|
@ -55,55 +54,54 @@ A sentence is logically true if and only if it is not possible for the sentence
|
|||
|
||||
**Demonstration**
|
||||
|
||||
````
|
||||
```
|
||||
A rose is a rose.
|
||||
Today is Tuesday unless today is not Tuesday.
|
||||
````
|
||||
```
|
||||
|
||||
Regardless of any facts obtaining in the world, these sentences cannot be false.
|
||||
|
||||
As with logically false sentences, logical truth can also apply to compound sentences:
|
||||
|
||||
````
|
||||
```
|
||||
It is Monday and Monday is a day of the week.
|
||||
````
|
||||
```
|
||||
|
||||
### Formal definition
|
||||
|
||||
>
|
||||
> A sentence P is truth-functionally true if and only if P is true on every truth-value assignment
|
||||
> A sentence P is truth-functionally true if and only if P is true on every truth-value assignment
|
||||
|
||||
````
|
||||
```
|
||||
P v ~P
|
||||
````
|
||||
```
|
||||
|
||||
### Truth-table
|
||||
|
||||
````
|
||||
P P ∨ ¬ P
|
||||
T T
|
||||
```
|
||||
P P ∨ ¬ P
|
||||
T T
|
||||
F T
|
||||
````
|
||||
```
|
||||
|
||||
### Consequences
|
||||
|
||||
The existence of logically false and logically true sentences affects the validity and soundness of arguments in which they are used. These are technicalities that have philosophically interesting consequences.
|
||||
|
||||
* If an argument contains premises which are logically false than this argument will perforce be valid. This is because one cannot consistently assert the premises and deny the conclusion which is the definition of validity. However the *reason* why one cannot consistently assert the premises and deny the conclusions is because one cannot consistently assert the premises - they conflict with each other. Furthermore as the argument contains false premises, it cannot be sound.
|
||||
|
||||
````
|
||||
- If an argument contains premises which are logically false than this argument will perforce be valid. This is because one cannot consistently assert the premises and deny the conclusion which is the definition of validity. However the _reason_ why one cannot consistently assert the premises and deny the conclusions is because one cannot consistently assert the premises - they conflict with each other. Furthermore as the argument contains false premises, it cannot be sound.
|
||||
|
||||
```
|
||||
(P1) Russia is a country.
|
||||
(P2) Russia is not a country
|
||||
(P3) All countries have languages.
|
||||
____________________________________________
|
||||
(C) Russian is a language.
|
||||
````
|
||||
```
|
||||
|
||||
* Any argument with a logically true conclusion is valid. Because the conclusion cannot be consistently denied it follows that we cannot consistently assert the premises *and* deny the conclusion. Whether or not the argument is sound remains an open question however. If the premises happen to be true then the argument will be sound on the strength of the conclusion being logically true but if the premises are false it will be unsound regardless of the truth of the conclusion.
|
||||
|
||||
````
|
||||
- Any argument with a logically true conclusion is valid. Because the conclusion cannot be consistently denied it follows that we cannot consistently assert the premises _and_ deny the conclusion. Whether or not the argument is sound remains an open question however. If the premises happen to be true then the argument will be sound on the strength of the conclusion being logically true but if the premises are false it will be unsound regardless of the truth of the conclusion.
|
||||
|
||||
```
|
||||
(P1) Horses have legs.
|
||||
(P2) Animals with legs can move.
|
||||
____________________________________________
|
||||
(C) A horse is a horse
|
||||
````
|
||||
```
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||

|
||||
Like the [introduction](Negation%20Elimination.md) rule for negation, the elimination rule also works by deriving a contradiction. It is basically *Negation Introduction* in reverse. Instead of starting the subproof with a true proposition from which you derive a contradiction, you start with the negation of a proposition, derive a contradiction and then assert the positive of the negated proposition you started out with.
|
||||

|
||||
Like the [introduction](Negation%20Elimination.md) rule for negation, the elimination rule also works by deriving a contradiction. It is basically _Negation Introduction_ in reverse. Instead of starting the subproof with a true proposition from which you derive a contradiction, you start with the negation of a proposition, derive a contradiction and then assert the positive of the negated proposition you started out with.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
This is also known as *proof by contradiction*. You start with an assumption declared in a subproof. If you can derive a contradiction from this assumption (typically from the introduction of another proposition and its negation), then you are permitted to derive the negation of the auxiliary assumption in the main proof.
|
||||
This is also known as _proof by contradiction_. You start with an assumption declared in a subproof. If you can derive a contradiction from this assumption (typically from the introduction of another proposition and its negation), then you are permitted to derive the negation of the auxiliary assumption in the main proof.
|
||||
|
||||
[]()
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
|
||||
## Object and metalanguages
|
||||
|
||||
When we talk about a language we call that language the **object language**. A **metalanguage** is a language used to describe some object language.
|
||||
|
@ -19,14 +18,14 @@ If we talk about German in English, German in the object language and English is
|
|||
|
||||
There is an associated distinction: that of use and mention.
|
||||
|
||||
When we create an expression in a language we are said to *use* that language. When we remark upon said expression we are said to be *mentioning* the language. This distinction may correspond to the object and metalanguage difference above but doesn't have to; use and mention can happen in the same language. For example:
|
||||
When we create an expression in a language we are said to _use_ that language. When we remark upon said expression we are said to be _mentioning_ the language. This distinction may correspond to the object and metalanguage difference above but doesn't have to; use and mention can happen in the same language. For example:
|
||||
|
||||
````
|
||||
```
|
||||
'London' is the word that denotes the capital of the UK.
|
||||
````
|
||||
```
|
||||
|
||||
## Metavariables
|
||||
|
||||
A metalinguistic variable (metavariable for short) is an expression in the metalanguage that is used to talk generally about expressions of the object language. The convention in these notes will be to embolden single letters when these letters are used as metavariables.
|
||||
|
||||
For example, instead of saying *'P & Q' is an expression comprising two atomic sentences and a conjunction* we might say ***P** is an expression comprising two atomic sentences and a conjunction.* In this instance **P** is a metavariable in the metalanguage mentioning the expression P & Q in the object language
|
||||
For example, instead of saying _'P & Q' is an expression comprising two atomic sentences and a conjunction_ we might say **\*P** is an expression comprising two atomic sentences and a conjunction.\* In this instance **P** is a metavariable in the metalanguage mentioning the expression P & Q in the object language
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
**Reiteration (R)** allows us to restate any proposition already in the proof within the main proof or a more deeply nested subproof. Reiteration allows us to reuse any assumptions, or propositions derived from assumptions, without having to introduce a new dependency with another assumption.
|
||||
|
|
|
@ -1,60 +1,59 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
### Soundness
|
||||
|
||||
Recall that in the definition of [deductive validity](Validity%20and%20entailment.md#validity) we do not say: an argument is valid iff if the premises *are true* and the conclusion *is true*. We say *if it is possible for the premises to be true*. This is important: we are not interested in the actual truth of the premises or the conclusion.
|
||||
Recall that in the definition of [deductive validity](Validity%20and%20entailment.md#validity) we do not say: an argument is valid iff if the premises _are true_ and the conclusion _is true_. We say _if it is possible for the premises to be true_. This is important: we are not interested in the actual truth of the premises or the conclusion.
|
||||
|
||||
#### Demonstration
|
||||
|
||||
Therefore this argument is valid:
|
||||
|
||||
````
|
||||
```
|
||||
(P1) Oranges are the same colour as bananas.
|
||||
(P2) Bananas are yellow.
|
||||
____________________________________________
|
||||
(C) Oranges are yellow.
|
||||
````
|
||||
```
|
||||
|
||||
Of course oranges are not yellow but *were* (P1) true, then given (P2), the conclusion must also be true.
|
||||
Of course oranges are not yellow but _were_ (P1) true, then given (P2), the conclusion must also be true.
|
||||
|
||||
This argument is also valid:
|
||||
|
||||
````
|
||||
```
|
||||
(P1) Oranges are the same colour as carrots.
|
||||
(P2) Carrots are orange.
|
||||
____________________________________________
|
||||
(C) Oranges are orange in colour.
|
||||
````
|
||||
```
|
||||
|
||||
The difference here is that the premises happen to be true and, given that the argument is valid, the conclusion must also be true. What we have defined here is **soundness**: the argument is said to be sound as well as valid. This is an additional and stronger criterion of evaluation.
|
||||
|
||||
>
|
||||
> An argument is sound if and only if it is deductively valid and all it's premises are true.
|
||||
> An argument is sound if and only if it is deductively valid and all it's premises are true.
|
||||
|
||||
We must not forget that truth alone is not the sole condition for soundness. We can have arguments whose conclusion and premises are all true without the argument being sound:
|
||||
|
||||
````
|
||||
```
|
||||
(P1) London is the capital of the United Kingdom
|
||||
(P2) The capital of the United Kingdom is in the southern part of the United Kingdom.
|
||||
(P2) The capital of the United Kingdom is in the southern part of the United Kingdom.
|
||||
Can
|
||||
(P3) Cambridge is not the capital of the United Kingdom
|
||||
____________________________________________
|
||||
(C) London is south of Cambridge
|
||||
````
|
||||
```
|
||||
|
||||
All sentences are true here but the argument is not deductively valid: the premises are all true but the conclusion is false.
|
||||
|
||||
We can also have arguments which are valid but which are not sound:
|
||||
|
||||
````
|
||||
```
|
||||
(P1) Vitamin C prevents colds.
|
||||
(P2) Vitamin C does not prevent colds.
|
||||
____________________________________________
|
||||
(C) Vitamin C is harmless
|
||||
````
|
||||
```
|
||||
|
||||
This argument is valid because we cannot consistently assert the premises and deny the conclusion. In either case, the conclusion can be said to follow from the premises. The problem is that we cannot consistently assert both premises: it is not possible for both sentences to be true at the same time.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic, proofs]
|
||||
---
|
||||
|
||||
## General strategy
|
||||
|
||||
* Break complex propositions into simpler sentences by using the elimination rules
|
||||
* Recombine simple propositions into complex propositions using the introduction rules.
|
||||
- Break complex propositions into simpler sentences by using the elimination rules
|
||||
- Recombine simple propositions into complex propositions using the introduction rules.
|
||||
|
||||
## Goal analysis
|
||||
|
||||
|
@ -15,43 +15,44 @@ The approach above describes the general form of a proof but of course it will n
|
|||
|
||||
Goal analysis is a [recursive](../Algorithms%20&%20Data%20Structures/Recursion.md) strategy which proceeds by using a 'goal' proposition to guide the construction of intermediary derivations.
|
||||
|
||||
Assume that we want to show that an argument is [valid](Validity%20and%20entailment.md#validity). Then our ultimate goal is to derive the conclusion from the premises we are given. We first ask ourselves: *which propositions if we could derive them, would allow us to easily derive the conclusion*? (For example, these propositions might be two simple propositions that when combined with [Conjunction Introduction](Conjunction%20Introduction.md) give us the conclusion.) Deriving these propositions then becomes the new intermediate goal.
|
||||
Assume that we want to show that an argument is [valid](Validity%20and%20entailment.md#validity). Then our ultimate goal is to derive the conclusion from the premises we are given. We first ask ourselves: _which propositions if we could derive them, would allow us to easily derive the conclusion_? (For example, these propositions might be two simple propositions that when combined with [Conjunction Introduction](Conjunction%20Introduction.md) give us the conclusion.) Deriving these propositions then becomes the new intermediate goal.
|
||||
|
||||
If arriving at these propositions is not trivial, we then ask ourselves the question again: *which propositions would permit us to derive the intermediary propositions we need*? You keep working back in this manner until you reach a base level. Then it is just a matter or working upwards from each set of derived intermediary propositions until you reach the ultimate goal.
|
||||
If arriving at these propositions is not trivial, we then ask ourselves the question again: _which propositions would permit us to derive the intermediary propositions we need_? You keep working back in this manner until you reach a base level. Then it is just a matter or working upwards from each set of derived intermediary propositions until you reach the ultimate goal.
|
||||
|
||||
### Demonstration
|
||||
|
||||
Let's say we want to prove $(L \lor A) & D$ from the propositions $\sim N$ and $(\sim N \supset L) & (D \equiv \sim N)$.
|
||||
|
||||
First, we consider what is the easiest possible way of achieving the proposition $(L \lor A) & D$. Clearly it is to separately derive each disjunct ($L \lor A$ and $D$) and then combine them with [Conjunction Introduction](Conjunction%20Introduction.md). This provides us with our first goal: to derive each of the separate conjuncts.
|
||||
First, we consider what is the easiest possible way of achieving the proposition $(L \lor A) & D$. Clearly it is to separately derive each disjunct ($L \lor A$ and $D$) and then combine them with [Conjunction Introduction](Conjunction%20Introduction.md). This provides us with our first goal: to derive each of the separate conjuncts.
|
||||
|
||||
Let's start with $D$: where does it occur in the assumptions? It occurs in the compound $(\sim N \supset L) & (D \equiv \sim N)$, but only in the first conjunct. We can get this simply bu applying [Conjunction Elimination](Conjunction%20Elimination.md).
|
||||
|
||||
So far we have:
|
||||
So far we have:
|
||||
|
||||

|
||||
|
||||
Now we just need to get $D$ from the proposition at line 3. This is easy since we already have access to the consequent of the biconditional at line 1. Therefore we can apply [Biconditional Elimination](Biconditional%20Elimination.md) at line 3 to get $D$. We are now halfway there:
|
||||
Now we just need to get $D$ from the proposition at line 3. This is easy since we already have access to the consequent of the biconditional at line 1. Therefore we can apply [Biconditional Elimination](Biconditional%20Elimination.md) at line 3 to get $D$. We are now halfway there:
|
||||
|
||||

|
||||
|
||||
Next we need to turn our attention to deriving $L \lor A$. How can we obtain $L$ ? Well it is contained within the first conjunct of the assumption on line 2. Again, we can get this through the application of [Conjunction Elimination](Conjunction%20Elimination.md).
|
||||
Next we need to turn our attention to deriving $L \lor A$. How can we obtain $L$ ? Well it is contained within the first conjunct of the assumption on line 2. Again, we can get this through the application of [Conjunction Elimination](Conjunction%20Elimination.md).
|
||||
Now, how do we get $L$ from $(\sim N \supset L)$? Well, we already have the antecedent $\sim N$ as an assumption on the first line, so we can use [Conditional Elimination](Conditional%20Elimination.md) to derive $L$. These two steps give us:
|
||||
|
||||

|
||||
|
||||
Now we need to get from $L$ to $L \lor A$. This is really straightforward because by using [Disjunction Introduction](Disjunction%20Introduction.md) we can get from any sentence to a disjunction. Finally, having assembled all the constituent parts of the conjunction that is the conclusion, we can combine them with [Conjunction Introduction](Conjunction%20Introduction.md) as we had planned at the outset.
|
||||
Now we need to get from $L$ to $L \lor A$. This is really straightforward because by using [Disjunction Introduction](Disjunction%20Introduction.md) we can get from any sentence to a disjunction. Finally, having assembled all the constituent parts of the conjunction that is the conclusion, we can combine them with [Conjunction Introduction](Conjunction%20Introduction.md) as we had planned at the outset.
|
||||
|
||||

|
||||
|
||||
### A further example
|
||||
|
||||
We will seek to prove the following:
|
||||
|
||||
$$
|
||||
{ \sim L \equiv \[X & (\sim S \lor B)\], (E & C) \supset \sim L, (E & R) & C} \vdash X & (\sim S \lor B)
|
||||
$$
|
||||
|
||||
The requirements here could easily mislead us. We see that the target proposition is a conjunction so we might think that the best strategy is to seek to derive each conjunct and then combine them via [Conjunction Introduction](Conjunction%20Introduction.md).
|
||||
The requirements here could easily mislead us. We see that the target proposition is a conjunction so we might think that the best strategy is to seek to derive each conjunct and then combine them via [Conjunction Introduction](Conjunction%20Introduction.md).
|
||||
|
||||
Actually, if we look more closely, there is a better approach. The target proposition is contained in the first premise as the consequent to the biconditional ($\sim L \equiv \[X & (\sim S \lor B)\]$). A better approach is therefore to seek to derive the antecedent ($\sim L$) and then use [Biconditional Elimination](Biconditional%20Elimination.md) to extract the target sentence which is the consequent.
|
||||
|
||||
|
@ -63,7 +64,7 @@ When we are proving [theorems](Theorems%20and%20empty%20sets.md) we do not have
|
|||
|
||||
### Demonstration
|
||||
|
||||
\_Prove _ $\vdash (U & Y) \supset \[L \supset (U & L)\]$
|
||||
\_Prove \_ $\vdash (U & Y) \supset \[L \supset (U & L)\]$
|
||||
|
||||
Our strategy here is to identify the main connective in the proposition we want to derive (the [material conditional](Truth-functional%20connectives.md#material-conditional-a-k-a-implication)). We then assume the antecedent and attempt to derive the consequent from it.
|
||||
|
||||
|
@ -71,7 +72,7 @@ Our strategy here is to identify the main connective in the proposition we want
|
|||
|
||||
## A complex theorem proof
|
||||
|
||||
*Prove* $\vdash (\sim A \lor \sim B) \equiv \sim(A & B)$
|
||||
_Prove_ $\vdash (\sim A \lor \sim B) \equiv \sim(A & B)$
|
||||
|
||||

|
||||
|
||||
|
@ -79,13 +80,13 @@ Our strategy here is to identify the main connective in the proposition we want
|
|||
|
||||
**Lines 1-12**
|
||||
|
||||
* Our auxiliary goal is to prove $\sim (A \lor B) \supset \sim (A & B)$.
|
||||
* Our starting assumption is to a disjunction. Thus we can apply [Disjunction Elimination](Disjunction%20Elimination.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 auxiliary goal is to prove $\sim (A \lor B) \supset \sim (A & B)$.
|
||||
- Our starting assumption is to a disjunction. Thus we can apply [Disjunction Elimination](Disjunction%20Elimination.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$
|
||||
|
||||
**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 $\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$
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
In order to make assertions about the relative [consistency](Consistency.md) or inconsistency of a set of propositions we advance arguments. Consider everyday life: if we are having an argument with someone, we believe that they are wrong. A more logical way to say this is that we believe that their beliefs are inconsistent. In order to change their viewpoint or point out why they are wrong we advance an argument intended to show that belief A conflicts with belief B. Or if C is true, then you cannot believe that D.
|
||||
|
||||
In formal terms **an argument is a set of sentences comprising one or more premises and a conclusion. The conclusion is taken to be supported by the premises.**
|
||||
|
||||
>
|
||||
> The terms **argument** and **syllogism** are used interchangeably in logic to describe the above feature of a set of propositions.
|
||||
> The terms **argument** and **syllogism** are used interchangeably in logic to describe the above feature of a set of propositions.
|
||||
|
||||
### Demonstration
|
||||
|
||||
````
|
||||
```
|
||||
(P1) All men are mortal.
|
||||
(P2) Socrates is a man.
|
||||
_____________________
|
||||
(C) Socrates is mortal
|
||||
````
|
||||
```
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- 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.
|
||||
> 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.
|
||||
|
||||
|
@ -16,21 +16,21 @@ Syntax is talking about the order and placement of propositions relative to conn
|
|||
|
||||
Sentences in SL are capitalised Roman letters (non-bold) with or without natural number subscripts. We may call these sentence letters. For example:
|
||||
|
||||
````plain
|
||||
```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
|
||||
|
||||
|
@ -46,12 +46,12 @@ The punctuation marks of SL consist in the left and right parentheses:
|
|||
|
||||
We also distinguish:
|
||||
|
||||
* the **main connective**
|
||||
* **immediate sentential components**
|
||||
* **sentential components**
|
||||
* **atomic components**
|
||||
- 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*.
|
||||
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,22 +1,22 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
We know that when we construct a [derivation](Formal%20proofs%20in%20propositional%20logic.md#constructing-proofs) we start from a set of assumptions and then attempt to reach a proposition that is a consequence of the starting assumptions. However it does not always have to be the case that the starting set contains members. The set can in fact be empty.
|
||||
|
||||
*Demonstration*
|
||||
_Demonstration_
|
||||

|
||||
|
||||
We see in this example that there is no starting set and thus no primary assumptions. Instead we start with nothing other than the proposition we wish to derive. The proposition is effectively derived from itself. In these scenarios we say that we are constructing a derivation from an **empty set**.
|
||||
|
||||
Propositions which possess this property are called theorems:
|
||||
|
||||
>
|
||||
> A proposition $P$ or a system of propositions in propositional logic is a theorem in a system of derivation for that logic if $P$ is derivable from the empty set.
|
||||
> A proposition $P$ or a system of propositions in propositional logic is a theorem in a system of derivation for that logic if $P$ is derivable from the empty set.
|
||||
|
||||
We represent a theorem as:
|
||||
|
||||
$$
|
||||
\\vdash P
|
||||
$$
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
## Truth-functional connectives
|
||||
|
||||
Sentences generated from other (simple) sentences by means of sentential connectives are [compound sentences](Atomic%20and%20molecular%20sentences.md).
|
||||
|
||||
We know that logically determinant sentences express a truth value. When simple sentences are joined with a connective to make a compound sentence they also have a truth value. This is determined by the nature of the connective and the truth value of the constituent sentences. We therefore call connectives of this nature truth *functional* connectives since the **truth value of the compound is a function of the truth values of its components**.
|
||||
We know that logically determinant sentences express a truth value. When simple sentences are joined with a connective to make a compound sentence they also have a truth value. This is determined by the nature of the connective and the truth value of the constituent sentences. We therefore call connectives of this nature truth _functional_ connectives since the **truth value of the compound is a function of the truth values of its components**.
|
||||
|
||||
>
|
||||
> A sentential connective is used truth-functionally if and only if it is used to generate a compound sentence from one or more sentences in such a way that the truth value of the generated compound is wholly determined by the truth-values of those one or more sentences from which the compound is generated, no matter what the truth values may be.
|
||||
> A sentential connective is used truth-functionally if and only if it is used to generate a compound sentence from one or more sentences in such a way that the truth value of the generated compound is wholly determined by the truth-values of those one or more sentences from which the compound is generated, no matter what the truth values may be.
|
||||
|
||||
Each truth-functional connective has a characteristic **truth-table**. This discloses the conditions under which the constituent sentences have a given truth value when combined with one or more connectives.
|
||||
|
||||
|
@ -22,13 +22,13 @@ Conjunction is equivalent to the word AND in natural language. We use `&` as the
|
|||
|
||||
A molecular sentence joining two conjuncts P and Q is true iff both conjuncts are true and false otherwise:
|
||||
|
||||
````
|
||||
P Q P & Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
```
|
||||
P Q P & Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
F F F
|
||||
````
|
||||
```
|
||||
|
||||
### Disjunction
|
||||
|
||||
|
@ -36,65 +36,65 @@ Conjunction is equivalent to the word OR in natural language. We use `v` as the
|
|||
|
||||
A molecular sentence joining two disjuncts P and Q is true if either disjunct is true or if both disjuncts are true and false otherwise. This corresponds to the inclusive sense of OR in natural language.
|
||||
|
||||
````
|
||||
P Q P ∨ Q
|
||||
T T T
|
||||
T F T
|
||||
F T T
|
||||
```
|
||||
P Q P ∨ Q
|
||||
T T T
|
||||
T F T
|
||||
F T T
|
||||
F F F
|
||||
````
|
||||
```
|
||||
|
||||
### Negation
|
||||
|
||||
In contrast to the two previous connectives, negation is a unary connective not a binary connective. We use `~` to symbolise negation. It does not join two or more sentences, it applies to one sentence as a whole. This can be a simple sentence or a complex sentence. It simply negates the truth-value of whichever sentence it is applied to. Hence applied to P, it is true if P is false. And if P is false, it is true when P is true. !
|
||||
|
||||
````
|
||||
```
|
||||
P ~ P
|
||||
T F
|
||||
T F
|
||||
F T
|
||||
````
|
||||
```
|
||||
|
||||
### Material conditional (a.k.a implication)
|
||||
|
||||
The material conditional approximates the meaning expressed in natural language when we say *if* such-and-such is the case *then* such-and-such will the case. Another way of expressing the sense of the material conditional is to say that **P** implies **Q.**
|
||||
The material conditional approximates the meaning expressed in natural language when we say _if_ such-and-such is the case _then_ such-and-such will the case. Another way of expressing the sense of the material conditional is to say that **P** implies **Q.**
|
||||
|
||||
````
|
||||
```
|
||||
If it rains today the pavement will be wet.
|
||||
````
|
||||
```
|
||||
|
||||
We call the proposition that expresses the 'if' sentence the **antecedent** and the proposition that expresses the 'then' statement the **consequent**. The symbol we use to represent the material conditional is `⊃` although you may see `→` used as well.
|
||||
|
||||
The truth table is as follows:
|
||||
|
||||
````
|
||||
P Q P ⊃ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
```
|
||||
P Q P ⊃ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
The material conditional is perhaps the least intuitive of the logical connectives. The first case (TT) closely matches what we expect the connective to mean: it has rained so the pavement is wet. The antecedent is true and therefore the consequent is true. This chimes with what we tend to mean by 'if' in natural language. In the second case (TF) it also makes sense: the complex sentence is false because it rained and the pavement wasn't wet: this negates the truth of the expression. The final case (FF) is also straight forward. It didn't rain therefore the pavement wasn't wet, thus the overall assertion that rain implies wet pavements is retained.
|
||||
|
||||
FT is less intuitive:
|
||||
|
||||
````
|
||||
```
|
||||
It did not rain today. The pavement was wet.
|
||||
````
|
||||
```
|
||||
|
||||
To some degree one just has to take these statements as axioms, whether or not they have intuitive sense is a secondary, more philosophical question. The semantic issues arise because we tacitly assume the material conditional to be a causal connective: there is something about the nature of **P** that *engenders* or *brings about* **Q** but causality is not a logical concern.
|
||||
To some degree one just has to take these statements as axioms, whether or not they have intuitive sense is a secondary, more philosophical question. The semantic issues arise because we tacitly assume the material conditional to be a causal connective: there is something about the nature of **P** that _engenders_ or _brings about_ **Q** but causality is not a logical concern.
|
||||
|
||||
If we instead just focus on the simple sentences that comprise the truth value it is more plausible. In the case of FT we can say it didn't rain yet the pavement was wet does not stop the pavement being wet when it rains. The fact that I can pour a beer on the pavement thereby making it wet doesn't stop or render false the idea that the rain can also make the pavement wet. The same explanation covers the FF case: it hasn't rained and so the pavement is not wet does not contradict the assertion that when it rains the pavement will be wet.
|
||||
|
||||
Things are elucidated when we look at an equivalent expression of P ⊃ Q, ~P v Q:
|
||||
|
||||
````
|
||||
P Q ~ P ∨ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
```
|
||||
P Q ~ P ∨ Q
|
||||
T T T
|
||||
T F F
|
||||
F T T
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
A disjunction is true whenever either disjunct is true so when both are false the overall expression is false, the same as with FT and FF with the material conditional.
|
||||
|
||||
|
@ -102,19 +102,19 @@ A disjunction is true whenever either disjunct is true so when both are false th
|
|||
|
||||
The material biconditional equates to the English expression 'if and only if', as a conditional connective it therefore avoids some of the perplexity aroused by its material cousin. In this scenario both antecedent and consequent have to be true for the overall expression to be true. If either is false the complex sentence is false. Other ways of expressing the semantics of this connective is to say that one sentence implies the other or that **P** and **Q** are equivalent.
|
||||
|
||||
````
|
||||
```
|
||||
If and only if James studies every day he will pass the exam.
|
||||
````
|
||||
```
|
||||
|
||||
There is no possibility in which James passes the exam and has not studied every day. If he studies for three out of the seven days leading up to the exam he will not pass. Alternatively, there is no possibility that James studied every day yet failed the exam. The antecedent and consequent are locked, as indicated by the truth-table:
|
||||
|
||||
````
|
||||
P Q P ≡ Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
```
|
||||
P Q P ≡ Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
The last condition (FF) maybe requires some explanation: if he has not studied every day then he cannot have passed the exam. Therefore, to say that he will pass iff he studies every day is rendered true.
|
||||
|
||||
|
@ -126,35 +126,35 @@ So far we have applied connectives to simple sentences. In so doing we generate
|
|||
|
||||
For example the sentence:
|
||||
|
||||
````
|
||||
```
|
||||
Socrates was either a philosopher or a drinker but he wasn't a politician.
|
||||
````
|
||||
```
|
||||
|
||||
Can be expressed with greater logical clarity as:
|
||||
|
||||
````
|
||||
```
|
||||
Socrates was a philosopher or Socrates was a drinker and Socrates was not a politician.
|
||||
````
|
||||
```
|
||||
|
||||
Using P for 'Socrates was a philosopher', Q for 'Socrates was a drinker' and R for 'Socrates was a politician' we can express this symbolically as:
|
||||
|
||||
````
|
||||
```
|
||||
(P v Q) & ~R
|
||||
````
|
||||
```
|
||||
|
||||
Which has the truth table:
|
||||
|
||||
````
|
||||
P Q R ( P ∨ Q ) & ~ R
|
||||
T T T F
|
||||
T T F T
|
||||
T F T F
|
||||
T F F T
|
||||
F T T F
|
||||
F T F T
|
||||
F F T F
|
||||
```
|
||||
P Q R ( P ∨ Q ) & ~ R
|
||||
T T T F
|
||||
T T F T
|
||||
T F T F
|
||||
T F F T
|
||||
F T T F
|
||||
F T F T
|
||||
F F T F
|
||||
F F F F
|
||||
````
|
||||
```
|
||||
|
||||
Let's walk through each case where S stands for the overall sentence.
|
||||
|
||||
|
@ -177,109 +177,108 @@ Once we start working with complex sentences with more than one truth-functional
|
|||
|
||||
For example the sentence:
|
||||
|
||||
````
|
||||
```
|
||||
I am going to the shops and the gym.
|
||||
````
|
||||
```
|
||||
|
||||
Can obviously be expressed formally as:
|
||||
|
||||
````
|
||||
```
|
||||
P & Q
|
||||
````
|
||||
```
|
||||
|
||||
But also as:
|
||||
|
||||
````
|
||||
```
|
||||
~ (~P v ~Q)
|
||||
````
|
||||
```
|
||||
|
||||
And we know this because the truth-tables are identical:consistency
|
||||
And we know this because the truth-tables are identical:consistency
|
||||
|
||||
````
|
||||
P Q P & Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
```
|
||||
P Q P & Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
F F F
|
||||
````
|
||||
```
|
||||
|
||||
````
|
||||
```
|
||||
P Q ~ ( ~ P ∨ ~ Q )
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
F F F
|
||||
````
|
||||
```
|
||||
|
||||
Another example of equivalent expressions:
|
||||
|
||||
````
|
||||
```
|
||||
Neither Watson or Sherlock Holmes is fond of criminals
|
||||
````
|
||||
```
|
||||
|
||||
The first formalisation:
|
||||
|
||||
````
|
||||
```
|
||||
~P & ~Q
|
||||
````
|
||||
```
|
||||
|
||||
Equivalent to:
|
||||
|
||||
````
|
||||
~(P v Q)
|
||||
````
|
||||
```
|
||||
~(P v Q)
|
||||
```
|
||||
|
||||
Again the truth-tables for verification:
|
||||
|
||||
````
|
||||
P Q ~ P & ~ Q
|
||||
T T F
|
||||
T F F
|
||||
F T F
|
||||
```
|
||||
P Q ~ P & ~ Q
|
||||
T T F
|
||||
T F F
|
||||
F T F
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
`~P & ~Q`
|
||||
|
||||
````
|
||||
```
|
||||
P Q ~ ( P ∨ Q )
|
||||
T T F
|
||||
T F F
|
||||
F T F
|
||||
T T F
|
||||
T F F
|
||||
F T F
|
||||
F F T
|
||||
````
|
||||
```
|
||||
|
||||
### Important equivalences
|
||||
|
||||
The example above is a key equivalence that you will encounter a lot especially when deriving formal proofs. It goes together with another one. We have noted them both below for future reference:
|
||||
|
||||
````
|
||||
~P & ~Q = ~P v ~Q
|
||||
````
|
||||
```
|
||||
~P & ~Q = ~P v ~Q
|
||||
```
|
||||
|
||||
````
|
||||
```
|
||||
~P v ~Q = ~(P & Q)
|
||||
````
|
||||
```
|
||||
|
||||
## Enforcing binary connectives through bracketing
|
||||
|
||||
|
||||
If we had a sentence of the form
|
||||
|
||||
````
|
||||
```
|
||||
Socrates is man, is mortal and a philosopher.
|
||||
````
|
||||
```
|
||||
|
||||
We could not write this as:
|
||||
|
||||
````
|
||||
```
|
||||
P & Q & R
|
||||
````
|
||||
```
|
||||
|
||||
This would not be a well-formed sentence because at most truth functional connectives can only connect two simple sentences. It would not be possible to generate truth conditions for this sentence in its current form. Instead we introduce brackets to enforce a binary grouping of simple sentences. In this instance, the placement of the brackets does not affect the accurate interpretation of the truth conditions of the compound, so the following two formalisations are equivalent:
|
||||
|
||||
````
|
||||
(P & Q) & R
|
||||
```
|
||||
(P & Q) & R
|
||||
|
||||
P & (Q & R)
|
||||
````
|
||||
```
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
# Truth-tables
|
||||
|
||||
We are already familiar with truth-tables from the previous entry on the *truth-functional connectives* and the relationship between sentences, connectives and the overall truth-value of a sentence. Here we will look in further depth at how to build truth-tables and on their mathematical relation to binary truth-values. We will also look at examples of complex truth-tables for large compound expressions and the systematic steps we follow to derive the truth conditions of compound sentences from their simple constituents.
|
||||
We are already familiar with truth-tables from the previous entry on the _truth-functional connectives_ and the relationship between sentences, connectives and the overall truth-value of a sentence. Here we will look in further depth at how to build truth-tables and on their mathematical relation to binary truth-values. We will also look at examples of complex truth-tables for large compound expressions and the systematic steps we follow to derive the truth conditions of compound sentences from their simple constituents.
|
||||
|
||||
## Formulae for constructing truth-tables
|
||||
|
||||
For any truth-table, the number of rows it will contain is equal to $2n$ where:
|
||||
|
||||
* $n$ stands for the number of sentences
|
||||
* $2$ is the total number of possible truth values that the sentence may have: true or false.
|
||||
- $n$ stands for the number of sentences
|
||||
- $2$ is the total number of possible truth values that the sentence may have: true or false.
|
||||
|
||||
When we count the number of sentences, we mean atomic sentences. And we only count each sentence once. Hence for a compound sentence of the form $(\sim B \supset C) & (A \equiv B)$, $B$ occurs twice but there are only three sentences: $A$, $B$, and $C$.
|
||||
|
||||
Thus for the sentence $P & Q$ ,we have two sentences so $n$ is 2 which equals 4 rows (2 x 2):
|
||||
|
||||
````
|
||||
P Q P & Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
```
|
||||
P Q P & Q
|
||||
T T T
|
||||
T F F
|
||||
F T F
|
||||
F F F
|
||||
````
|
||||
```
|
||||
|
||||
For the sentence $(P \lor Q) & R$ we have three sentences so $n$ is 3 which equals 8 rows (2 x 2 x 2):
|
||||
|
||||
````
|
||||
P Q R ( P ∨ Q ) & R
|
||||
T T T T
|
||||
T T F F
|
||||
T F T T
|
||||
T F F F
|
||||
F T T T
|
||||
F T F F
|
||||
F F T F
|
||||
```
|
||||
P Q R ( P ∨ Q ) & R
|
||||
T T T T
|
||||
T T F F
|
||||
T F T T
|
||||
T F F F
|
||||
F T T T
|
||||
F T F F
|
||||
F F T F
|
||||
F F F F
|
||||
````
|
||||
```
|
||||
|
||||
For the single sentence $P$ we have one sentence so $n$ is 1 which equals 2 rows (2 x 1):
|
||||
|
||||
````
|
||||
```
|
||||
P P
|
||||
T T
|
||||
F F
|
||||
````
|
||||
```
|
||||
|
||||
This tells us how many rows the truth-table should have but it doesn't tell us what each row should consist in. In other words: how many Ts and Fs it should contain. This is fine with simple truth-tables since we can just alternate each value but for truth-tables with three sentences and more it is easy to make mistakes.
|
||||
|
||||
|
@ -55,16 +55,18 @@ To simplify this and ensure that we are including the right number of possible t
|
|||
|
||||
We can already see that there is a pattern at work by looking at the columns of the truth tables above. If we take the sentence $(P \lor Q) & R$ we can see that for each sentence:
|
||||
|
||||
* $P$ consists in two sets of ${\textsf{T,T,T,T}}$ and ${\textsf{F,F,F,F}}$ with **four** elements per set
|
||||
* $Q$ consists in four sets of ${\textsf{T,T}}$ , ${\textsf{F,F}}$, ${\textsf{T,T}}$ , ${\textsf{F,F}}$ with **two** elements per set
|
||||
* $R$ consists in eight sets of ${\textsf{T}}$, ${\textsf{F}}$, ${\textsf{T}}$, ${\textsf{F}}$, ${\textsf{T}}$, ${\textsf{F}}$, ${\textsf{T}}$, ${\textsf{F}}$ with **one** element per set.
|
||||
- $P$ consists in two sets of ${\textsf{T,T,T,T}}$ and ${\textsf{F,F,F,F}}$ with **four** elements per set
|
||||
- $Q$ consists in four sets of ${\textsf{T,T}}$ , ${\textsf{F,F}}$, ${\textsf{T,T}}$ , ${\textsf{F,F}}$ with **two** elements per set
|
||||
- $R$ consists in eight sets of ${\textsf{T}}$, ${\textsf{F}}$, ${\textsf{T}}$, ${\textsf{F}}$, ${\textsf{T}}$, ${\textsf{F}}$, ${\textsf{T}}$, ${\textsf{F}}$ with **one** element per set.
|
||||
|
||||
If we work through the formula we see that it returns 4, 2, 1:
|
||||
|
||||
$$\begin{equation} \begin{split} 2n^-1 = 3 -1 \\ = 2 \\ = 2 \cdot 2 \\ = 4 \end{split} \end{equation}$$
|
||||
|
||||
$$
|
||||
\\begin{equation} \begin{split} 2n^-2 = 3 - 2 \\ = 1 \\ = 2 \cdot 1 \\ = 2 \end{split} \end{equation}
|
||||
$$
|
||||
|
||||
$$
|
||||
\\begin{equation} \begin{split} 2n^-3 = 3 - 3 \\ = 0 \\ = 2 \cdot 0 \\ = 1 \end{split} \end{equation}
|
||||
$$
|
||||
|
@ -75,13 +77,11 @@ $$
|
|||
|
||||
When we move to complex truth-tables with more than one connective we realise that truth-tables are recursive. The truth-tables for the truth-functional connectives provide all that we need to determine the truth-values of complex sentences:
|
||||
|
||||
>
|
||||
> The core truth-tables tell us how to determine the truth-value of a molecular sentence given the truth-values of its [immediate sentential components](Syntax%20of%20sentential%20logic.md). And if the immediate sentential components of a molecular sentence are also molecular, we can use the information in the characteristic truth-tables to determine how the truth-value of each immediate component depends n the truth-values of *its* components and so on.
|
||||
> The core truth-tables tell us how to determine the truth-value of a molecular sentence given the truth-values of its [immediate sentential components](Syntax%20of%20sentential%20logic.md). And if the immediate sentential components of a molecular sentence are also molecular, we can use the information in the characteristic truth-tables to determine how the truth-value of each immediate component depends n the truth-values of _its_ components and so on.
|
||||
|
||||
### Truth-value assignment
|
||||
|
||||
>
|
||||
> A truth-value assignment is an assignment of truth-values (either T or F) to the atomic sentences of SL.
|
||||
> A truth-value assignment is an assignment of truth-values (either T or F) to the atomic sentences of SL.
|
||||
|
||||
When working on complex truth tables, we use the truth-assignment of atomic sentences to count as the values that we feed into the larger expressions at a higher level of the sentential abstraction.
|
||||
|
||||
|
@ -93,17 +93,17 @@ We talk about partial assignments of truth-values when we look at one specific r
|
|||
|
||||
The truth-table below shows all truth-value assignments for the sentence $(\sim B \supset C) & (A \equiv B)$ :
|
||||
|
||||
````
|
||||
A B C ( ~ B ⊃ C ) & ( A ≡ B )
|
||||
T T T F T T T T T T T
|
||||
T T F F T T F T T T T
|
||||
T F T T F T T F T F F
|
||||
T F F T F F F F T F F
|
||||
F T T F T T T F F F T
|
||||
F T F F T T F F F F T
|
||||
F F T T F T T T F T F
|
||||
```
|
||||
A B C ( ~ B ⊃ C ) & ( A ≡ B )
|
||||
T T T F T T T T T T T
|
||||
T T F F T T F T T T T
|
||||
T F T T F T T F T F F
|
||||
T F F T F F F F T F F
|
||||
F T T F T T T F F F T
|
||||
F T F F T T F F F F T
|
||||
F F T T F T T T F T F
|
||||
F F F T F F F F F T F
|
||||
````
|
||||
```
|
||||
|
||||
As with algebra we work outwards from each set of brackets. The sequence for manually arriving at the above table would be roughly as follows:
|
||||
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
## Rationale
|
||||
|
||||
Like [truth-tables](Truth-tables.md), truth-trees are a means of graphically representing the logical relationships that may obtain between propositions. Truth-trees and truth-tables complement each other and which method you choose depends on which logical property you are seeking to derive.
|
||||
|
||||
Whilst truth-tables have the benefit of being exhaustive - every possible truth assignment is factored into the representation - their complexity grows exponentially with each additional proposition they contain. This can make manually constructing truth tables long-winded and prone to mistakes.
|
||||
|
||||
Truth-trees are less onerous but they lack the exhaustive scope of a truth-table. They are more targeted and are best used for demonstrating *that something is the case* rather than *all the possible states that could be the case*. For example, a truth tree will tell us that a set *S is logically consistent* whereas a truth-table will tell us that *S is consistent on the following three assignments.*
|
||||
Truth-trees are less onerous but they lack the exhaustive scope of a truth-table. They are more targeted and are best used for demonstrating _that something is the case_ rather than _all the possible states that could be the case_. For example, a truth tree will tell us that a set _S is logically consistent_ whereas a truth-table will tell us that _S is consistent on the following three assignments._
|
||||
|
||||
## Logical consistency
|
||||
|
||||
|
@ -53,11 +54,9 @@ A tree with at least one completed open branch
|
|||
|
||||
Using the definitions above, we can now define truth-functional consistency and inconsistency in terms of truth trees:
|
||||
|
||||
>
|
||||
> A finite set ($\Gamma$ ) of sentences is truth-functionally inconsistent if $\Gamma$ is a closed tree
|
||||
> A finite set ($\Gamma$ ) of sentences is truth-functionally inconsistent if $\Gamma$ is a closed tree
|
||||
|
||||
>
|
||||
> A finite set ($\Gamma$ ) of sentences is truth-functionally consistent if $\Gamma$ is an open tree
|
||||
> A finite set ($\Gamma$ ) of sentences is truth-functionally consistent if $\Gamma$ is an open tree
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -69,19 +68,19 @@ The following is a truth tree for the set ${P \lor Q, \sim P }$:
|
|||
|
||||
### Interpretation
|
||||
|
||||
* We decompose the disjunction at line 1 on line 3. We tick off the compound sentence to indicate that it is now decomposed and no longer under consideration.
|
||||
* Both P and its negation exist on a single branch (at line 2 and line 3). This makes it a closed branch. We indicate this by the X beneath the branch that is closed, citing the source of the closure by line number.
|
||||
* The rightward branch is a completed open branch given the decomposition at 3 and the lack of negation of Q. Overall this makes the tree an open tree.
|
||||
- We decompose the disjunction at line 1 on line 3. We tick off the compound sentence to indicate that it is now decomposed and no longer under consideration.
|
||||
- Both P and its negation exist on a single branch (at line 2 and line 3). This makes it a closed branch. We indicate this by the X beneath the branch that is closed, citing the source of the closure by line number.
|
||||
- The rightward branch is a completed open branch given the decomposition at 3 and the lack of negation of Q. Overall this makes the tree an open tree.
|
||||
|
||||
As the set gives us an open tree, it must be truth-functionally consistent. If this is the case we should be able to determine the partial assignment in which each set member is true. Given that Q is not negated the assignment of consistency will contain Q but we have both P and ~P. This means there are two possible assignments where the set is consistent: $P, Q$ and $\sim P, Q$. This is confirmed by the truth-table:
|
||||
|
||||
````
|
||||
```
|
||||
P Q P ∨ ~ P Q
|
||||
T T T T *
|
||||
T F T F
|
||||
F T T T *
|
||||
F F T F
|
||||
````
|
||||
```
|
||||
|
||||
**Any time there is an open tree with a closed branch it will be the case that the negated sentences of the closed branch will appear both as** $S$ and $\sim S$ i**n the resultant assignment.**
|
||||
|
||||
|
@ -95,22 +94,22 @@ The following is a truth tree for the set ${A & \sim B, C, \sim A \lor \sim B }$
|
|||
|
||||
### Interpretation
|
||||
|
||||
* The two molecular set members are decomposed. The disjunction (line 3) results in a branching tree. The conjunction (line 1) results in the continuation of the trunk.
|
||||
* Both branches are completed making it a completed tree. As each branch is closed this is a closed tree.
|
||||
- The two molecular set members are decomposed. The disjunction (line 3) results in a branching tree. The conjunction (line 1) results in the continuation of the trunk.
|
||||
- Both branches are completed making it a completed tree. As each branch is closed this is a closed tree.
|
||||
|
||||
As this is a closed tree, the set is not truth-functionally consistent. This is confirmed by the truth table where there is no partial assignment where all set members are true.
|
||||
|
||||
````
|
||||
A B C A & ~ B C ~ A ∨ ~ C
|
||||
T T T F T F
|
||||
T T F F F T
|
||||
T F T T T F
|
||||
T F F T F T
|
||||
F T T F T T
|
||||
F T F F F T
|
||||
F F T F T T
|
||||
```
|
||||
A B C A & ~ B C ~ A ∨ ~ C
|
||||
T T T F T F
|
||||
T T F F F T
|
||||
T F T T T F
|
||||
T F F T F T
|
||||
F T T F T T
|
||||
F T F F F T
|
||||
F F T F T T
|
||||
F F F F F T
|
||||
````
|
||||
```
|
||||
|
||||
## Truth tree decomposition rules
|
||||
|
||||
|
@ -196,8 +195,7 @@ For a given finite set $\Gamma$, $\Gamma$ is logically consistent just if all of
|
|||
|
||||
When we wish to assess [logical falsity](Logical%20truth%20and%20falsity.md#logical-falsity) we are not focused on sets however, we are interested in a property of a sentence. However we can easily construe single sentences as unit sets: sets with a single member. With this in mind and the above accounts of consistency and logical falsity we are equipped to express logical falsity in terms of truth-trees with the following rule:
|
||||
|
||||
>
|
||||
> A sentence $P$ is logically false if and only if the unit set ${ P }$ has a closed tree
|
||||
> A sentence $P$ is logically false if and only if the unit set ${ P }$ has a closed tree
|
||||
|
||||
A logically false sentence cannot be true on any assignment. This is the same thing as an inconsistent set. Thus it will be represented in a truth tree as inconsistency which is disclosed via a closed tree.
|
||||
|
||||
|
@ -205,26 +203,23 @@ A logically false sentence cannot be true on any assignment. This is the same th
|
|||
|
||||
### Logical truth
|
||||
|
||||
For a sentence $P$ to be [logically true](Logical%20truth%20and%20falsity.md#logical-truth), there must be no possible assignment in which $P$ is false. We express this informally by saying *it is not possible to consistently deny $P$.* We know that in terms of truth trees an inconsistent set is a closed tree therefore a unit set of ${ P }$ is logically true if ${ \sim P }$ is a closed tree. This is to say: if the negation of $P$ is inconsistent.
|
||||
For a sentence $P$ to be [logically true](Logical%20truth%20and%20falsity.md#logical-truth), there must be no possible assignment in which $P$ is false. We express this informally by saying _it is not possible to consistently deny $P$._ We know that in terms of truth trees an inconsistent set is a closed tree therefore a unit set of ${ P }$ is logically true if ${ \sim P }$ is a closed tree. This is to say: if the negation of $P$ is inconsistent.
|
||||
|
||||
>
|
||||
> A sentence $P$ is logically true if and only if the set ${ \sim P }$ has a closed tree
|
||||
> A sentence $P$ is logically true if and only if the set ${ \sim P }$ has a closed tree
|
||||
|
||||
### Logical indeterminacy
|
||||
|
||||
[Indeterminacy](Indeterminacy.md) follows from the two definitions above; we do not require any additional apparatus. We recall that a sentence $P$ is logically indeterminate just if it is neither logically true or logically false. Thus the truth tree for an indeterminate sentence is straightforward:
|
||||
|
||||
>
|
||||
> A sentence $P$ is logically indeterminate if and only if neither the set ${ P }$ nor the set ${ \sim P }$ has a closed tree
|
||||
> A sentence $P$ is logically indeterminate if and only if neither the set ${ P }$ nor the set ${ \sim P }$ has a closed tree
|
||||
|
||||
This follows because a closed tree for ${ P }$ means it is not logically false and an open tree for ${ \sim P }$ means it is not logically true. So if it is neither of these things, $P$ must be indeterminate.
|
||||
|
||||
### Logical equivalence
|
||||
|
||||
Recall that $P$ and $Q$ are [logically equivalent](Logical%20equivalence.md) just if there is no truth assignment on which one is true and the other is false. We know from the [material biconditional shorthand](Corresponding%20material%20and%20biconditional.md#corresponding-material-biconditional) that this state of affairs can be expressed as $P \equiv Q$ and that if this compound sentence is true on every assignment then both simple sentences are equivalent. But ‘true on every assignment’ is another way of saying *logically true* since there is no possibility of a false assignment. We already know what logical truth looks like as a truth tree: it is a closed tree for the negation of the sentence being tested. Therefore, to test the logical equivalence of two sentences it is necessary to construct a truth tree for the negation of the sentences conjoined by the biconditional (i.e. $\sim (P \equiv Q)$ )and see if this results in a closed tree. If it does, the two sentences are logically equivalent.
|
||||
Recall that $P$ and $Q$ are [logically equivalent](Logical%20equivalence.md) just if there is no truth assignment on which one is true and the other is false. We know from the [material biconditional shorthand](Corresponding%20material%20and%20biconditional.md#corresponding-material-biconditional) that this state of affairs can be expressed as $P \equiv Q$ and that if this compound sentence is true on every assignment then both simple sentences are equivalent. But ‘true on every assignment’ is another way of saying _logically true_ since there is no possibility of a false assignment. We already know what logical truth looks like as a truth tree: it is a closed tree for the negation of the sentence being tested. Therefore, to test the logical equivalence of two sentences it is necessary to construct a truth tree for the negation of the sentences conjoined by the biconditional (i.e. $\sim (P \equiv Q)$ )and see if this results in a closed tree. If it does, the two sentences are logically equivalent.
|
||||
|
||||
>
|
||||
> Sentences $P$ and $Q$ are truth-functionally equivalent if and only if the set $\sim (P \equiv Q)$ has a closed tree
|
||||
> Sentences $P$ and $Q$ are truth-functionally equivalent if and only if the set $\sim (P \equiv Q)$ has a closed tree
|
||||
|
||||

|
||||
|
||||
|
@ -234,8 +229,6 @@ Let’s remind ourselves of the meaning of truth-functional [entailment](Validit
|
|||
|
||||
As with the previous properties, to express validity and entailment in terms of truth trees we need to express these concepts in the language of logical consistency. $\Gamma$ entails $P$ just if one cannot consistently assert $\Gamma$ whilst denying $P$. This is to say that the set $\Gamma \cup {\sim P}$ is inconsistent. So we just need a closed truth tree for $\Gamma \cup {\sim P}$ to demonstrate the validity of this set.
|
||||
|
||||
>
|
||||
> A finite set of sentences $\Gamma$ truth-functionally entails a sentence $P$ if and only if the set $\Gamma \cup {\sim P}$ has a closed truth tree.
|
||||
> A finite set of sentences $\Gamma$ truth-functionally entails a sentence $P$ if and only if the set $\Gamma \cup {\sim P}$ has a closed truth tree.
|
||||
|
||||
>
|
||||
> An argument is truth functionally valid if and only if the set consisting of the premises and the negation of the conclusion has a closed truth tree.
|
||||
> An argument is truth functionally valid if and only if the set consisting of the premises and the negation of the conclusion has a closed truth tree.
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional-logic]
|
||||
- Mathematics
|
||||
tags: [logic]
|
||||
---
|
||||
|
||||
## Validity
|
||||
|
||||
### Informal definition
|
||||
|
||||
In order to say whether an argument is 'good' or 'bad' we must have criteria of evaluation. in logic there are different criteria of evaluation:
|
||||
|
||||
* **Deductive validity**
|
||||
|
||||
- **Deductive validity**
|
||||
|
||||
An **argument is deductively valid if and only if it is not possible for the premises to be true and the conclusion false**. Linking to consistency: it is not possible to consistently assert all of the premises but deny the conclusion.
|
||||
|
||||
* **Inductive strength**
|
||||
|
||||
- **Inductive strength**
|
||||
|
||||
We do not say that inductive arguments have 'validity' because despite inductive premises being true, the conclusion may be falsifiable. Therefore we say inductive 'strength' rather than 'validity'. An argument is inductively strong if and only if the conclusion is probably true given the premises.
|
||||
|
||||
#### Demonstration
|
||||
|
@ -23,27 +24,24 @@ The Socrates demonstration above is an example of deductive validity.
|
|||
|
||||
The following is an example of an argument that is inductively strong:
|
||||
|
||||
````
|
||||
```
|
||||
99% of deaf persons have no musical talent.
|
||||
Beethoven was deaf.
|
||||
___________________________________________
|
||||
Beethoven had no musical talent.
|
||||
````
|
||||
```
|
||||
|
||||
The test for a strong inductive argument is not whether the conclusion is true, rather it concerns the evidence the premises provide in support of the conclusion.
|
||||
|
||||
>
|
||||
> In propositional logic we are concerned solely with deductive validity or invalidity.
|
||||
> In propositional logic we are concerned solely with deductive validity or invalidity.
|
||||
|
||||
### Formal definition
|
||||
|
||||
>
|
||||
> An argument is truth-functionally valid if and only if there is no truth-assignment on which all the premises are true and the conclusion is false.
|
||||
> An argument is truth-functionally valid if and only if there is no truth-assignment on which all the premises are true and the conclusion is false.
|
||||
|
||||
Linking this to [derivation](Formal%20proofs%20in%20propositional%20logic.md), we say:
|
||||
|
||||
>
|
||||
> In a system of derivation in propositional logic, an argument is valid if the conclusion of the argument is derivable within the system of derivation from the set consisting of the premises, and invalid otherwise.
|
||||
> In a system of derivation in propositional logic, an argument is valid if the conclusion of the argument is derivable within the system of derivation from the set consisting of the premises, and invalid otherwise.
|
||||
|
||||
### Demonstration
|
||||
|
||||
|
@ -51,47 +49,46 @@ The inference from the set ${P, P \supset Q}$ to $Q$ is valid
|
|||
|
||||
### Truth-table
|
||||
|
||||
````
|
||||
P Q P ⊃ Q P Q
|
||||
```
|
||||
P Q P ⊃ Q P Q
|
||||
T T T T T *
|
||||
T F F T F
|
||||
F T T F T
|
||||
F F T F F
|
||||
````
|
||||
```
|
||||
|
||||
## Entailment
|
||||
|
||||
### Informal definition
|
||||
|
||||
Entailment as a concept is almost identical to validity. We say that a proposition is entailed by a set of propositions if it is not possible for every member of this set to be true and the proposition to be false.
|
||||
Entailment as a concept is almost identical to validity. We say that a proposition is entailed by a set of propositions if it is not possible for every member of this set to be true and the proposition to be false.
|
||||
|
||||
The difference with validity resides in the fact that the propositions are distinguished in terms of whether they are premises or a conclusion. So, technically, validity is a subclass of entailment. A case of entailment where we distinguish propositions in terms of whether they are premises or conclusions. A proposition may be entailed by a given set without that proposition being the *conclusion* of the set and where the set is a syllogism.
|
||||
The difference with validity resides in the fact that the propositions are distinguished in terms of whether they are premises or a conclusion. So, technically, validity is a subclass of entailment. A case of entailment where we distinguish propositions in terms of whether they are premises or conclusions. A proposition may be entailed by a given set without that proposition being the _conclusion_ of the set and where the set is a syllogism.
|
||||
|
||||
### Formal definition
|
||||
|
||||
>
|
||||
> A finite set of sentences $\Gamma$ $\vdash$ $P$ if and only if there is no truth-assignment in which every member of $\Gamma$ is true and $P$ is false.
|
||||
> A finite set of sentences $\Gamma$ $\vdash$ $P$ if and only if there is no truth-assignment in which every member of $\Gamma$ is true and $P$ is false.
|
||||
|
||||
#### Informal demonstration
|
||||
|
||||
````
|
||||
```
|
||||
It is raining.
|
||||
If it is raining then the pavement will be wet.
|
||||
The pavement is wet.
|
||||
````
|
||||
```
|
||||
|
||||
#### Formal demonstration
|
||||
|
||||
````
|
||||
```
|
||||
{P, P ⊃ Q} ⊨ Q
|
||||
````
|
||||
```
|
||||
|
||||
#### Truth-table
|
||||
|
||||
````
|
||||
P Q P ⊃ Q P Q
|
||||
```
|
||||
P Q P ⊃ Q P Q
|
||||
T T T T T *
|
||||
T F F T F
|
||||
F T T F T
|
||||
F F T F F
|
||||
````
|
||||
```
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
- division
|
||||
---
|
||||
|
@ -10,7 +11,7 @@ tags:
|
|||
|
||||
## Adding/ subracting fractions with common denominators
|
||||
|
||||
For two fractions $\frac{a}{c}$ and $\frac{b}{c}$ with a common denominator, their sum is defined as:
|
||||
For two fractions $\frac{a}{c}$ and $\frac{b}{c}$ with a common denominator, their sum is defined as:
|
||||
|
||||
$$
|
||||
\frac{a}{c} + \frac{b}{c} = \frac{a + b}{c}
|
||||
|
@ -28,27 +29,23 @@ $$
|
|||
\frac{a}{c} - \frac{b}{c} = \frac{a - b}{c}
|
||||
$$
|
||||
|
||||
|
||||
## Adding/ subracting fractions without common denominators
|
||||
|
||||
* Find the lowest common denominator for the two fractions
|
||||
* Use this to create two equivalent fractions
|
||||
* Add/subtract
|
||||
* Reduce
|
||||
|
||||
|
||||
- Find the lowest common denominator for the two fractions
|
||||
- Use this to create two equivalent fractions
|
||||
- Add/subtract
|
||||
- Reduce
|
||||
|
||||
### Lowest common denominator and lowest common multiple
|
||||
|
||||
Given the symmetry between [factors and divisors](/Mathematics/Prealgebra/Factors_and_divisors.md) these properties are related. Note however that the LCM is more generic: it applies to any set of numbers not just fractions. Whereas the LCD is explicitly to do with fractions (hence 'denominator').
|
||||
|
||||
- For two fractions $a, b$ (or a set), the LCD is the smallest number divisble by both the denominator of $a$ and the denominator of $b$ (or each member of the set).
|
||||
|
||||
* For two fractions $a, b$ (or a set), the LCD is the smallest number divisble by both the denominator of $a$ and the denominator of $b$ (or each member of the set).
|
||||
|
||||
|
||||
* For two fractions $a, b$ (or a set), the LCM is the smallest number that is a multiple of the denominator of $a$ and the denominator of $b$ (or each member of the set).
|
||||
- For two fractions $a, b$ (or a set), the LCM is the smallest number that is a multiple of the denominator of $a$ and the denominator of $b$ (or each member of the set).
|
||||
|
||||
In order to find the LCM of the set $\{12, 16\}$ we list the multiples of both:
|
||||
|
||||
$$
|
||||
12, 24, 36, 48 \\
|
||||
16, 32, 48
|
||||
|
@ -56,11 +53,10 @@ $$
|
|||
|
||||
Until we identify the smallest number common to both lists. In this case it is 48. Thus the LCM of 12 and 16 is 48.
|
||||
|
||||
The relationship between LCM and LCD is that _the least common denominator is the least common multiple of the fractions' denomintors_.
|
||||
|
||||
|
||||
The relationship between LCM and LCD is that _the least common denominator is the least common multiple of the fractions' denomintors_.
|
||||
|
||||
### Demonstration: addition
|
||||
|
||||
We can now use this to calculate the addition of two fractions without common denominators: $\frac{4}{9} + \frac{1}{6}$.
|
||||
|
||||
First identify the common multiples of 9 and 6:
|
||||
|
@ -79,7 +75,7 @@ $$
|
|||
\frac{4}{9 \cdot 2} = \frac{4}{18}
|
||||
$$
|
||||
|
||||
But what we do to the denominator, we must also do to the numerator, hence:
|
||||
But what we do to the denominator, we must also do to the numerator, hence:
|
||||
|
||||
$$
|
||||
\frac{4 \cdot 2}{9 \cdot 2} = \frac{8}{18}
|
||||
|
@ -99,7 +95,7 @@ $$
|
|||
|
||||
### Demonstration: subtraction
|
||||
|
||||
Calculate:
|
||||
Calculate:
|
||||
|
||||
$$
|
||||
\frac{3}{5} - \frac{2}{3}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- theorems
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
# The Property of Additive Identity
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- theorems
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
**Let $a$ represent any member of $\mathbb{Z}$. Then there is a unique member of $\mathbb{Z}$ $-a$ such that:**
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- theorems
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
# The Associative Property of Addition and Multiplication
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- theorems
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
# The Commutative Property of Addition and Multiplication
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- theorems
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
# The Distributive Property of Multiplication
|
||||
|
@ -15,16 +16,16 @@ $$ a \cdot (b + c) = a \cdot b + a \cdot c $$
|
|||
|
||||
When faced with $4(2\cdot3)$ we may proceed with the official order of operations in algebra, namely:
|
||||
|
||||
````
|
||||
```
|
||||
4 x (2 + 3) = 4 x (5)
|
||||
= 20
|
||||
````
|
||||
```
|
||||
|
||||
In other words we find the sum of the values in parentheses and then multiply this by the value outside of the brackets.
|
||||
|
||||
When we use distributive property we *distribute* each value in the parentheses against the value outside of the parentheses:
|
||||
When we use distributive property we _distribute_ each value in the parentheses against the value outside of the parentheses:
|
||||
|
||||
````
|
||||
```
|
||||
4 x (2 + 3) = (4 x 2) + (4 x 3)
|
||||
8 + 12 = 20
|
||||
````
|
||||
```
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
- division
|
||||
---
|
||||
|
@ -43,7 +44,7 @@ Note that we omit the numerator but that technically the answer would be $\frac{
|
|||
We combine the foregoing (that it is easier to divide by fractional amounts using multiplication) with the concept of a [reciprocol](Reciprocals.md) to arrive at a definitive method for dividing two fractions.
|
||||
It boils down to: _invert and multiply_:
|
||||
|
||||
If $\frac{a}{b}$ and $\frac{c}{d}$ are fractions then:
|
||||
If $\frac{a}{b}$ and $\frac{c}{d}$ are fractions then:
|
||||
$$\frac{a}{b} \div \frac{c}{d} = \frac{a}{b} \cdot \frac{d}{c}$$
|
||||
|
||||
We invert the divisor (the second factor) and change the operator from division to multiplication.
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
---
|
||||
|
||||
Two fractions are equivalent if they represent the same value.
|
||||
Two fractions are equivalent if they represent the same value.
|
||||
To begin with we can represent this visually:
|
||||
|
||||

|
||||
|
||||
*Each shaded area is taking up the same proportion of the whole.*
|
||||
_Each shaded area is taking up the same proportion of the whole._
|
||||
|
||||
The same properties can be represented arithmetically by multiplying the numerator and denominator at each step by 2. Thus:
|
||||
|
||||
|
@ -20,8 +21,7 @@ $$
|
|||
|
||||
Therefore the following rule obtains:
|
||||
|
||||
>
|
||||
> If you start with a fraction and multiply both its numerator and denominator by the same value, the resulting fraction is equivalent to the original fraction.
|
||||
> If you start with a fraction and multiply both its numerator and denominator by the same value, the resulting fraction is equivalent to the original fraction.
|
||||
|
||||
$$
|
||||
\\frac{a}{b} = \frac{a \cdot x}{b \cdot x}
|
||||
|
@ -35,8 +35,7 @@ $$
|
|||
|
||||
Thus:
|
||||
|
||||
>
|
||||
> If you start with a fraction and divide both its numerator and denominator by the same value, the resulting fraction is equivalent to the original fraction.
|
||||
> If you start with a fraction and divide both its numerator and denominator by the same value, the resulting fraction is equivalent to the original fraction.
|
||||
|
||||
$$
|
||||
\\frac{a}{b} = \frac{a / x}{b / x}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
---
|
||||
|
||||
Being asked to express a natural number as a fraction seems confusing at first but you need to just know that for any whole number $n$, you express it as a fraction with $\frac{n}{1}$.
|
||||
|
||||
*Express 8 as an equivalent fraction having the denominator 5*
|
||||
_Express 8 as an equivalent fraction having the denominator 5_
|
||||
|
||||
$$
|
||||
8 = \frac{8}{1} = \frac{8 \cdot 5}{1 \cdot 5} = \frac{40}{5}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- factors
|
||||
- divisors
|
||||
---
|
||||
|
@ -12,26 +13,26 @@ The terms **factor** and **divisor** are used interchangeably. They are differen
|
|||
|
||||
### Divisors
|
||||
|
||||
>
|
||||
> For a number $n$, its divisor is any number that divides $n$ evenly without remainder: $$ \frac{a}{b} = 0 $$
|
||||
> For a number $n$, its divisor is any number that divides $n$ evenly without remainder: $$ \frac{a}{b} = 0 $$
|
||||
|
||||
In this operation, $a$ is the **divisor**, $b$ is the **dividend** and $0$ is the **quotient**.
|
||||
|
||||
### Factors
|
||||
|
||||
>
|
||||
> For a given number $n$, its factors are any pair of numbers that when multiplied together return $n$ as the product: $$ a \cdot b = n $$
|
||||
> For a given number $n$, its factors are any pair of numbers that when multiplied together return $n$ as the product: $$ a \cdot b = n $$
|
||||
|
||||
We can see the relationship consists in the fact that factors are associated with multiplication and divisors are associated with division: two different perspectives on the same number relationships.
|
||||
|
||||
For example, 6 is both a factor and divisor of 18 and 24. To be precise, it is the greatest common divisor of these two numbers.
|
||||
|
||||
As a divisor:
|
||||
As a divisor:
|
||||
|
||||
$$
|
||||
\\frac{18/6}{24/6} = \frac{3}{4}
|
||||
$$
|
||||
|
||||
As a factor:
|
||||
|
||||
$$
|
||||
\\frac{3 \cdot 6}{4 \cdot 6} = \frac{18}{24}
|
||||
$$
|
||||
|
@ -40,14 +41,13 @@ When we divide by the common divisor is acts as a divisor. When we multiply by t
|
|||
|
||||
## Greatest common divisor
|
||||
|
||||
>
|
||||
> For two two integers $a, b$, $D$ is a common divisor of $a$ and $b$ if it is a divisor of both. The greatest common divisor is the largest value that $D$ can be whilst remaining a divisor to both $a$ and $b$.
|
||||
> For two two integers $a, b$, $D$ is a common divisor of $a$ and $b$ if it is a divisor of both. The greatest common divisor is the largest value that $D$ can be whilst remaining a divisor to both $a$ and $b$.
|
||||
|
||||
### Demonstration
|
||||
|
||||
*Find the greatest common divisor of $18$ and $24$*
|
||||
_Find the greatest common divisor of $18$ and $24$_
|
||||
|
||||
The divisors of 18:
|
||||
The divisors of 18:
|
||||
$$1, 2, 3, 6, 9, 18$$
|
||||
|
||||
The divisors of 24:
|
||||
|
@ -56,7 +56,7 @@ $$ 1, 2, 3, 4, 6, 8, 12, 24$$
|
|||
Thus the common divisors are:
|
||||
$$ 1, 2, 3, 6 $$
|
||||
|
||||
The largest value in the above set is 6, thus 6 is the greatest common divisor.
|
||||
The largest value in the above set is 6, thus 6 is the greatest common divisor.
|
||||
|
||||
## Heuristics for finding divisors
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
## Grouping symbols
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- prealgebra
|
||||
- theorems
|
||||
---
|
||||
|
||||
|
||||
>
|
||||
> Every integer greater than one is either a prime number itself or is product of a unique combination of primes.
|
||||
> Every integer greater than one is either a prime number itself or is product of a unique combination of primes.
|
||||
|
||||
This is also known as the **Unique Factorisation Theorem**.
|
||||
|
||||
'Unique' means that there is not more than one way to derive the whole number. Once you reduce the factorisation to primes, there can only be one set of numbers that results in the target number.
|
||||
'Unique' means that there is not more than one way to derive the whole number. Once you reduce the factorisation to primes, there can only be one set of numbers that results in the target number.
|
||||
|
||||
For example, $24$ has the following factors: ${12, 24}$ and $6, 4$ but these are composite numbers. The unique factorisation combination for 24 is $2, 2, 3$.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
- negative-numbers
|
||||
---
|
||||
|
||||
# Negative fractions
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
- divisors
|
||||
---
|
||||
|
||||
Given the equivalence between factors and divisors we can increase fractions to higher terms in a very similar way to when we reduce fractions. In the latter case we are dividing by divisors to reduce. In the former, we are multiplying by factors to increase.
|
||||
|
||||
>
|
||||
> Whenever we increase a fraction, the resultant fraction will always be [equivalent](Equivalent%20fractions.md) to the fraction we started with.
|
||||
> Whenever we increase a fraction, the resultant fraction will always be [equivalent](Equivalent%20fractions.md) to the fraction we started with.
|
||||
|
||||
## Demonstration
|
||||
|
||||
*Express $\frac{3}{4}$ as an equivalent fraction having the denominator 20*
|
||||
_Express $\frac{3}{4}$ as an equivalent fraction having the denominator 20_
|
||||
|
||||
$$
|
||||
\\frac{3 \cdot 4}{5 \cdot 4} = \frac{12}{20}
|
||||
$$
|
||||
|
||||
*Express $\frac{2}{3}$ as an equivalent fraction having the denominator 21*
|
||||
_Express $\frac{2}{3}$ as an equivalent fraction having the denominator 21_
|
||||
|
||||
$$
|
||||
\\frac{2 \cdot 7}{3 \cdot 7} = \frac{14}{21}
|
||||
|
@ -27,7 +27,7 @@ $$
|
|||
|
||||
## Increasing fractions with variables to higher terms
|
||||
|
||||
*Express $\frac{2}{9}$ as an equivalent fraction having the denominator 18a*
|
||||
_Express $\frac{2}{9}$ as an equivalent fraction having the denominator 18a_
|
||||
|
||||
In these cases, just append the variable to the factor:
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
Come back to as many back links
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- operators
|
||||
---
|
||||
|
||||
## Addition, subtraction
|
||||
|
||||
Addition is the inverse of subtraction:
|
||||
$$(x - a) + a = x$$
|
||||
$$(x - a) + a = x$$
|
||||
$$ (6 - 2) + 2 = 6 $$
|
||||
|
||||
Subtraction is the inverse of addition:
|
||||
$$(x + a) - a = x$$
|
||||
$$(x + a) - a = x$$
|
||||
$$ (3 + 2) - 2 = 3$$
|
||||
|
||||
Division is the inverse of multiplication
|
||||
$$ \frac{a \cdot x}{a} = x$$
|
||||
$$ \frac{a \cdot x}{a} = x$$
|
||||
$$ \frac{6 \cdot 3}{6} = 3$$
|
||||
|
||||
Multiplication is the inverse of division
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
---
|
||||
|
||||
|
@ -9,22 +10,25 @@ tags:
|
|||
|
||||
## Improper fractions
|
||||
|
||||
* Proper fraction:
|
||||
* The numerator is smaller than the denominator
|
||||
* E.g. $\frac{2}{3}$, $-\frac{5}{10}$
|
||||
* Improper fraction
|
||||
* The numerator is greater than the denominator
|
||||
* E.g. $\frac{3}{2}$, $-\frac{5}{4}$
|
||||
- Proper fraction:
|
||||
- The numerator is smaller than the denominator
|
||||
- E.g. $\frac{2}{3}$, $-\frac{5}{10}$
|
||||
- Improper fraction
|
||||
- The numerator is greater than the denominator
|
||||
- E.g. $\frac{3}{2}$, $-\frac{5}{4}$
|
||||
|
||||
## Mixed fractions
|
||||
|
||||
A mixed fraction is part whole number, part fraction. For example: $5 \frac{3}{4}$.
|
||||
|
||||
It means, in effect: $5 + \frac{3}{4}$
|
||||
|
||||
## Converting mixed fractions into improper fractions
|
||||
|
||||
Mixed fractions are hard to calculate with. We need some way to convert them to fractions. We can do this by converting them to improper fractions.
|
||||
|
||||
With the example $4 \frac{7}{8}$, we know this means $4 + \frac{7}{8}$. We need to express the amount 4 in terms of eighths. It would be 4 lots of $\frac{8}{8}$ given that 4 is a whole number not a fractional amount. Thus the process would be:
|
||||
|
||||
$$
|
||||
\frac{8}{8} + \frac{8}{8} + \frac{8}{8} + \frac{8}{8} + \frac{7}{8}
|
||||
$$
|
||||
|
@ -34,21 +38,24 @@ But we know that when we [add fractions with a common denominator](./Add_Subtrac
|
|||
$$
|
||||
\frac{8 + 8 + 8 + 8 + 7}{8} = \frac{39}{8}
|
||||
$$
|
||||
|
||||
|
||||
Addition helps to explain the concepts underlying the procedure but it is more efficient to use multiplication.
|
||||
|
||||
The procedure is as follows:
|
||||
|
||||
1. Multiply the whole number part by the denominator
|
||||
2. Add the numerator
|
||||
3. Place the result over the denominator
|
||||
|
||||
Thus:
|
||||
|
||||
$$
|
||||
4 \frac{7}{8} = \frac{(4 \cdot 8) + 7 }{8}
|
||||
$$
|
||||
|
||||
## Converting improper fractions into mixed fractions
|
||||
It is quite obvious how to reverse the process and turn an improper fraction into a mixed fraction.
|
||||
## Converting improper fractions into mixed fractions
|
||||
|
||||
It is quite obvious how to reverse the process and turn an improper fraction into a mixed fraction.
|
||||
|
||||
Take $\frac{27}{5}$. We work out how many times the numerator is divisible by the denominator and make that the whole number. The remainder is then left as the fractional part.
|
||||
|
||||
|
@ -60,54 +67,58 @@ $$
|
|||
\end{split}
|
||||
$$
|
||||
|
||||
## Multiplying and dividing by mixed fractions
|
||||
Now that we know how to convert mixed fractions into improper fractions, it is straight forward to multiply and divide with them. We convert the mixed fraction into an improper fraction and then divide and multiply as we would with a proper fraction.
|
||||
## Multiplying and dividing by mixed fractions
|
||||
|
||||
Now that we know how to convert mixed fractions into improper fractions, it is straight forward to multiply and divide with them. We convert the mixed fraction into an improper fraction and then divide and multiply as we would with a proper fraction.
|
||||
|
||||
### Demonstration of multiplication
|
||||
|
||||
Calculate $-2\frac{1}{12} \cdot 2 \frac{4}{5}$:
|
||||
|
||||
1. First convert each mixed fraction into an improper fraction:
|
||||
$$
|
||||
\begin{split}
|
||||
-2\frac{1}{12} = -2 \cdot -12 \\
|
||||
= 24 + 1 \\
|
||||
= - \frac{25}{12}
|
||||
\end{split}
|
||||
$$
|
||||
$$
|
||||
\begin{split}
|
||||
-2\frac{1}{12} = -2 \cdot -12 \\
|
||||
= 24 + 1 \\
|
||||
= - \frac{25}{12}
|
||||
\end{split}
|
||||
$$
|
||||
|
||||
$$
|
||||
\begin{split}
|
||||
2 \frac{4}{5} =2 \cdot 5 \\
|
||||
= 10 + 4 \\
|
||||
= \frac{14}{5}
|
||||
\end{split}
|
||||
$$
|
||||
$$
|
||||
\begin{split}
|
||||
2 \frac{4}{5} =2 \cdot 5 \\
|
||||
= 10 + 4 \\
|
||||
= \frac{14}{5}
|
||||
\end{split}
|
||||
$$
|
||||
|
||||
2. Then carry out the multiplication [using factorization](./Multiplying_fractions.md#prime-factorisation-in-place):
|
||||
$$
|
||||
\begin{split}
|
||||
- \frac{25}{12} \cdot \frac{14}{5} = \\
|
||||
- \frac{(5 \cdot 5) \cdot (7 \cdot 2)}{(3 \cdot 2 \cdot 2) \cdot (5)} = - \frac{5 \cdot 7 }{2 \cdot 3} \\
|
||||
\end{split}
|
||||
$$
|
||||
|
||||
$$
|
||||
\begin{split}
|
||||
- \frac{25}{12} \cdot \frac{14}{5} = \\
|
||||
- \frac{(5 \cdot 5) \cdot (7 \cdot 2)}{(3 \cdot 2 \cdot 2) \cdot (5)} = - \frac{5 \cdot 7 }{2 \cdot 3} \\
|
||||
\end{split}
|
||||
$$
|
||||
|
||||
3. Then simplify:
|
||||
$$
|
||||
- \frac{35}{6}
|
||||
$$
|
||||
|
||||
$$
|
||||
- \frac{35}{6}
|
||||
$$
|
||||
|
||||
4. Finally, convert back into a mixed fraction:
|
||||
|
||||
$$
|
||||
\begin{split}
|
||||
- \frac{35}{6} = -35 \div 6 \\
|
||||
- 5 r 5 = \\
|
||||
- 5 \frac{5}{6}
|
||||
\end{split}
|
||||
$$
|
||||
|
||||
$$
|
||||
\begin{split}
|
||||
- \frac{35}{6} = -35 \div 6 \\
|
||||
- 5 r 5 = \\
|
||||
- 5 \frac{5}{6}
|
||||
\end{split}
|
||||
$$
|
||||
|
||||
## Demonstration of division
|
||||
|
||||
Again we convert the mixed fraction into an improper fraction and then follow the requisite rule, in the case of division this is to [invert and multiply]('./../Dividing_fractions.md#formal-specification-of-how-to-divide-fractions').
|
||||
|
||||
Calculate $-4 \frac{4}{5} \div 5 \frac{3}{5}$.
|
||||
|
@ -117,7 +128,7 @@ Calculate $-4 \frac{4}{5} \div 5 \frac{3}{5}$.
|
|||
\begin{split}
|
||||
-4 \cdot 5 = \\
|
||||
-20
|
||||
\end{split}
|
||||
\end{split}
|
||||
$$
|
||||
|
||||
## Adding and subtracting mixed fractions
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- prealgebra
|
||||
- theorems
|
||||
---
|
||||
|
||||
# The Property of Multiplicative Identity
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- prealgebra
|
||||
- theorems
|
||||
---
|
||||
|
||||
# The Multiplicative Property of Negative One
|
||||
|
||||
>
|
||||
> **Let $a$ represent any member of $\mathbb{Z}$, then:**
|
||||
> **Let $a$ represent any member of $\mathbb{Z}$, then:**
|
||||
|
||||
$$ (-1) \cdot a = -a $$
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
- multiplication
|
||||
---
|
||||
|
||||
# Multiplying fractions
|
||||
# Multiplying fractions
|
||||
|
||||
To find the product of two fractions $\frac{a}{b}$ and $\frac{c}{d}$ multiply their numerators and denominators and then reduce:
|
||||
|
||||
$$\frac{a}{b} \cdot \frac{c}{d} = \frac{a \cdot c}{b \cdot d}$$
|
||||
To find the product of two fractions $\frac{a}{b}$ and $\frac{c}{d}$ multiply their numerators and denominators and then reduce:
|
||||
|
||||
### Example
|
||||
$$\frac{a}{b} \cdot \frac{c}{d} = \frac{a \cdot c}{b \cdot d}$$
|
||||
|
||||
### Example
|
||||
|
||||
$$
|
||||
\frac{1}{3} \cdot \frac{2}{5} = \frac{1 \cdot 2}{3 \cdot 5} = \frac{2}{15}
|
||||
|
@ -23,17 +24,17 @@ $$
|
|||
The example above did not require a reduction, so here is a more complex example:
|
||||
|
||||
$$
|
||||
\frac{14}{15} \cdot \frac{30}{140} = \frac{420}{2100}
|
||||
\frac{14}{15} \cdot \frac{30}{140} = \frac{420}{2100}
|
||||
$$
|
||||
|
||||
It would be laborious to reduce such a large product using factor trees or the repeated application of divisors, as defined in [reducing fractions](./Reducing_fractions.md). We can use a more efficient method.
|
||||
It would be laborious to reduce such a large product using factor trees or the repeated application of divisors, as defined in [reducing fractions](./Reducing_fractions.md). We can use a more efficient method.
|
||||
This method can be applied at the point at which we conduct the multiplication rather than afterwards once we have the product. We express the the initial multiplicands as prime factors:
|
||||
|
||||
$$
|
||||
\frac{14}{15} \cdot \frac{30}{140} = \frac{(2 \cdot 7) \cdot (2 \cdot 3 \cdot 5) }{(3 \cdot 5) \cdot (2 \cdot 2 \cdot 7 \cdot 5)}
|
||||
\frac{14}{15} \cdot \frac{30}{140} = \frac{(2 \cdot 7) \cdot (2 \cdot 3 \cdot 5) }{(3 \cdot 5) \cdot (2 \cdot 2 \cdot 7 \cdot 5)}
|
||||
$$
|
||||
|
||||
We now have the product in factorised form before we have applied the multiplication so we can go ahead and cancel:
|
||||
We now have the product in factorised form before we have applied the multiplication so we can go ahead and cancel:
|
||||
|
||||
$$
|
||||
\frac{\cancel{2}, \cancel{7}, \cancel{2}, \cancel{3}, \cancel{5}}{\cancel{3}, \cancel{5}, \cancel{2}, \cancel{2}, \cancel{7}, 5} = \frac{1}{5}
|
||||
|
@ -43,23 +44,24 @@ $$
|
|||
|
||||
## Example of multiplying fractions with negative fractions containing variables
|
||||
|
||||
Calculate:
|
||||
Calculate:
|
||||
$$- \frac{6x}{55y} \cdot - \frac{110y^2}{105x^2}$$
|
||||
|
||||
First multiply in place:
|
||||
$$
|
||||
First multiply in place:
|
||||
|
||||
$$
|
||||
\frac{(3 \cdot 2 \cdot x) \cdot (5 \cdot 2 \cdot 11 \cdot y \cdot y)}{(5 \cdot 11 \cdot y) \cdot (7 \cdot 5 \cdot 3 \cdot x \cdot x)}
|
||||
$$
|
||||
|
||||
Then cancel:
|
||||
Then cancel:
|
||||
|
||||
$$
|
||||
\frac{(\cancel{3} \cdot 2 \cdot \cancel{x}) \cdot (\cancel{5} \cdot 2 \cdot \cancel{11} \cdot \cancel{y} \cdot y)}{(\cancel{5} \cdot \cancel{11} \cdot \cancel{y}) \cdot (7 \cdot 5 \cdot \cancel{3} \cdot \cancel{x} \cdot x)} =
|
||||
$$
|
||||
\frac{(\cancel{3} \cdot 2 \cdot \cancel{x}) \cdot (\cancel{5} \cdot 2 \cdot \cancel{11} \cdot \cancel{y} \cdot y)}{(\cancel{5} \cdot \cancel{11} \cdot \cancel{y}) \cdot (7 \cdot 5 \cdot \cancel{3} \cdot \cancel{x} \cdot x)} =
|
||||
\frac{2 \cdot 2 \cdot y}{7 \cdot 5 \cdot x}
|
||||
$$
|
||||
|
||||
Then reduce:
|
||||
Then reduce:
|
||||
|
||||
$$
|
||||
\frac{2 \cdot 2 \cdot y}{7 \cdot 5 \cdot x} = \frac{4y}{35x}
|
||||
\frac{2 \cdot 2 \cdot y}{7 \cdot 5 \cdot x} = \frac{4y}{35x}
|
||||
$$
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
## The set of natural numbers
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
1. Evaluate expressions in **parentheses**
|
||||
1. Evaluate **exponents**
|
||||
1. Evaluate **exponents**
|
||||
1. Evaluate **multiplications and divisions** from left to right in the order that they appear
|
||||
1. Evaluate **additions and subtractions** from left to right in the order that they appear.
|
||||
|
||||
In the absence of grouping symbols, addition holds no precedence over subtraction and vice versa.
|
||||
|
||||
````
|
||||
```
|
||||
15 - 8 + 4 = 7 + 4
|
||||
= 11
|
||||
````
|
||||
```
|
||||
|
||||
````
|
||||
15 - 8 + 4 = 15 - 12
|
||||
```
|
||||
15 - 8 + 4 = 15 - 12
|
||||
= 3
|
||||
````
|
||||
```
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- factors primes
|
||||
tags:
|
||||
- prealgebra
|
||||
- factors
|
||||
- primes
|
||||
---
|
||||
|
||||
### Prime factorisation
|
||||
|
||||
Prime factorisation is the activity of expressing a composite number as the unique product of [prime numbers](Primes%20and%20composites.md). There are two main approaches to this:
|
||||
|
||||
* * factor* trees
|
||||
* repeated division by two
|
||||
- - factor\* trees
|
||||
- repeated division by two
|
||||
|
||||
>
|
||||
> **Factor trees:** we take a number $n$ and break it down into two factors of $n$. We then repeat this process with the resulting factors working recursively until the numbers we are left with are primes.
|
||||
> **Factor trees:** we take a number $n$ and break it down into two factors of $n$. We then repeat this process with the resulting factors working recursively until the numbers we are left with are primes.
|
||||
|
||||

|
||||
*The prime factors of 27 are 2, 3, 3*
|
||||
_The prime factors of 27 are 2, 3, 3_
|
||||
|
||||
it doesn't matter which products we choose as the interim factors, we should always reach the same outcome:
|
||||

|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- primes
|
||||
---
|
||||
|
||||
|
@ -9,10 +10,8 @@ tags:
|
|||
|
||||
Definition of a **prime number**:
|
||||
|
||||
>
|
||||
> For any whole number $n$ where $n \neq 1$, $n$ is prime if and only if its sole [factors](Factors%20and%20divisors.md) are $1$ and $n$
|
||||
> For any whole number $n$ where $n \neq 1$, $n$ is prime if and only if its sole [factors](Factors%20and%20divisors.md) are $1$ and $n$
|
||||
|
||||
Definition of a **composite number**:
|
||||
|
||||
>
|
||||
> For any whole number $n$, $n$ is composite just if $n$ is not prime
|
||||
> For any whole number $n$, $n$ is composite just if $n$ is not prime
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
- division
|
||||
- theorems-axioms-laws
|
||||
- theorems
|
||||
---
|
||||
|
||||
# Recipricols
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
- fractions
|
||||
- divisors
|
||||
---
|
||||
|
||||
## Reducing fractions to their lowest terms
|
||||
|
||||
>
|
||||
> A fraction is said to be *reduced to its lowest terms* if the [greatest common divisor](Factors%20and%20divisors.md#greatest-common-divisor) of the numerator and the denominator is $1$.
|
||||
> A fraction is said to be _reduced to its lowest terms_ if the [greatest common divisor](Factors%20and%20divisors.md#greatest-common-divisor) of the numerator and the denominator is $1$.
|
||||
|
||||
>
|
||||
> Whenever we reduce a fraction, the resultant fraction will always be [equivalent](Equivalent%20fractions.md) to the fraction we started with.
|
||||
> Whenever we reduce a fraction, the resultant fraction will always be [equivalent](Equivalent%20fractions.md) to the fraction we started with.
|
||||
|
||||
Thus the fraction $\frac{2}{3}$ is reduced to its lowest terms because the greatest common divisor is 1. Neither the numerator or the denominator can be reduced to any lower terms. In contrast, the fraction $\frac{4}{6}$ is not reduced to its lowest terms because the greatest common divisor of both 4 and 6 is 2, not 1.
|
||||
Thus the fraction $\frac{2}{3}$ is reduced to its lowest terms because the greatest common divisor is 1. Neither the numerator or the denominator can be reduced to any lower terms. In contrast, the fraction $\frac{4}{6}$ is not reduced to its lowest terms because the greatest common divisor of both 4 and 6 is 2, not 1.
|
||||
|
||||
### 1. Reducing with repeated application of divisors
|
||||
|
||||
|
@ -31,15 +30,16 @@ $$
|
|||
In the previous example the reduction took two steps: first we divided by two and then we divided by three. There is a more efficient way: find the [highest common divisor](Factors%20and%20divisors.md#greatest-common-divisor) of the numerator and denominator and then use this as the basis for the reduction. With this method, the reduction can be completed in a single step.
|
||||
|
||||
The greatest common divisor of 18 and 24 is 6, thus:
|
||||
|
||||
$$
|
||||
\\frac{18}{24} = \frac{18/6}{24/6} = \frac{3}{4}
|
||||
$$
|
||||
|
||||
Note how our earlier two divisors 2 and 3 are [factors](Factors%20and%20divisors.md#factors) of 6, showing the consistency between the two methods.
|
||||
Note how our earlier two divisors 2 and 3 are [factors](Factors%20and%20divisors.md#factors) of 6, showing the consistency between the two methods.
|
||||
|
||||
### 3. Reducing with factors and cancellation
|
||||
|
||||
The two methods above are not very systematic and are quite heuristic. The third approach is more systematic and relies on the [interchangeability of factors and divisors](Factors%20and%20divisors.md).
|
||||
The two methods above are not very systematic and are quite heuristic. The third approach is more systematic and relies on the [interchangeability of factors and divisors](Factors%20and%20divisors.md).
|
||||
|
||||
Instead of thinking asking what is the greatest common divisor of 18 and 24 we could ask: which single number can we multiply by to get 18 and 24? Obviously both numbers are in the six times table. This is therefore to say that 6 is a [factor](Factors%20and%20divisors.md#factors) of both: we can multiply some number by 6 to arrive at both 18 and 24. The numbers are 3 and 4 respectively:
|
||||
|
||||
|
@ -50,7 +50,7 @@ $$
|
|||
\\end{split}
|
||||
$$
|
||||
|
||||
Here, 3 and 4 are the multiplicands of the factor 6. As $\frac{3}{4}$ doesn't have a lower common factor, it is therefore defined in its lowest terms.
|
||||
Here, 3 and 4 are the multiplicands of the factor 6. As $\frac{3}{4}$ doesn't have a lower common factor, it is therefore defined in its lowest terms.
|
||||
|
||||
Once we have reached this point, we no longer need the common factor 6, we can therefore cancel it out, leaving the multiplicands as the reduced fraction:
|
||||
|
||||
|
@ -63,7 +63,7 @@ $$
|
|||
|
||||
### 4. Reducing with prime factorisation
|
||||
|
||||
This is still a bit long-winded however particularly when finding the factors of larger numbers because we have to go through the factors of both numbers to find the largest held in common.
|
||||
This is still a bit long-winded however particularly when finding the factors of larger numbers because we have to go through the factors of both numbers to find the largest held in common.
|
||||
|
||||
A better method is to utilise [prime factorization](Prime%20factorization.md) combined with the canceling technique.
|
||||
|
||||
|
@ -77,18 +77,21 @@ $$
|
|||
$$
|
||||
|
||||
We then cancel out the factors held in common between the numerator and denominator:
|
||||
|
||||
$$
|
||||
\\frac{\cancel{2} \cdot \cancel{3} \cdot 3}{\cancel{2} \cdot 2 \cdot 2 \cdot \cancel{3}}
|
||||
$$
|
||||
|
||||
This gives us:
|
||||
This gives us:
|
||||
|
||||
$$
|
||||
\\frac{3}{2 \cdot 2}
|
||||
\\frac{3}{2 \cdot 2}
|
||||
$$
|
||||
|
||||
We then simplify the fraction as normal to its lowest term (conducting any multiplications required by what is left from the prime factorization):
|
||||
|
||||
$$
|
||||
\\frac{3}{4}
|
||||
\\frac{3}{4}
|
||||
$$
|
||||
|
||||
## Reducing fractions that contain variables
|
||||
|
@ -97,7 +100,7 @@ Superficially this looks to be more difficult but in fact we can apply the same
|
|||
|
||||
### Demonstration
|
||||
|
||||
*Reduce the following fraction to its lowest terms: $$\frac{25a^3b}{40a^2b^3}$$*
|
||||
_Reduce the following fraction to its lowest terms: $$\frac{25a^3b}{40a^2b^3}$$_
|
||||
|
||||
The prime factors of the numerator and denominator:
|
||||
|
||||
|
@ -108,7 +111,7 @@ $$
|
|||
\\end{split}
|
||||
$$
|
||||
|
||||
Now we apply canceling but we include the variable parts, treating them exactly the same as the coefficients. We break them out of their exponents however.
|
||||
Now we apply canceling but we include the variable parts, treating them exactly the same as the coefficients. We break them out of their exponents however.
|
||||
|
||||
$$\frac{25a^3b}{40a^2b^3} =\frac{5 \cdot 5 \cdot a \cdot a \cdot a \cdot b}{2 \cdot 2 \cdot 2 \cdot 5 \cdot a \cdot a \cdot b \cdot b \cdot b }$$
|
||||
|
||||
|
@ -124,32 +127,32 @@ $$
|
|||
|
||||
## Reducing fractions that contain negative values
|
||||
|
||||
*Reduce the following fraction to its lowest terms: $$\frac{14y^5}{-35y^3}$$*
|
||||
_Reduce the following fraction to its lowest terms: $$\frac{14y^5}{-35y^3}$$_
|
||||
|
||||
* This fraction is an instance of a [fraction with unlike terms](Handling%20negative%20fractions.md#fractions-with-unlike-terms).
|
||||
- This fraction is an instance of a [fraction with unlike terms](Handling%20negative%20fractions.md#fractions-with-unlike-terms).
|
||||
|
||||
- Apply [Prime factorization](Prime%20factorization.md):
|
||||
|
||||
* Apply [Prime factorization](Prime%20factorization.md):
|
||||
|
||||

|
||||
|
||||
* Cancel the coefficients and variable parts
|
||||
|
||||
- Cancel the coefficients and variable parts
|
||||
|
||||
$$
|
||||
\\frac{14y^5}{-35y^3}=\frac{5 \cdot 7 \cdot 2 \cdot y \cdot y \cdot y \cdot y \cdot y}{-5 \cdot 7 \cdot y \cdot y \cdot y} = - \frac{2y^2}{5}
|
||||
\\frac{14y^5}{-35y^3}=\frac{5 \cdot 7 \cdot 2 \cdot y \cdot y \cdot y \cdot y \cdot y}{-5 \cdot 7 \cdot y \cdot y \cdot y} = - \frac{2y^2}{5}
|
||||
$$
|
||||
|
||||
*Reduce the following fraction to its lowest terms:
|
||||
$$\frac{- 12xy^2}{ - 18xy^2}$$*
|
||||
_Reduce the following fraction to its lowest terms:
|
||||
$$\frac{- 12xy^2}{ - 18xy^2}$$_
|
||||
|
||||
* This fraction is an instance of a [fraction with like terms](Handling%20negative%20fractions.md#fractions-with-like-terms).
|
||||
- This fraction is an instance of a [fraction with like terms](Handling%20negative%20fractions.md#fractions-with-like-terms).
|
||||
|
||||
* Apply [Prime factorization](Prime%20factorization.md):
|
||||
- Apply [Prime factorization](Prime%20factorization.md):
|
||||
|
||||

|
||||
|
||||
* Cancel the coefficients and variable parts
|
||||
|
||||
- Cancel the coefficients and variable parts
|
||||
|
||||
$$
|
||||
|
||||
* \\frac{12xy^2}{18xy^2}=\frac{3 \cdot 2 \cdot 2 \cdot x \cdot y \cdot y}{3 \cdot 7 \cdot 3 \cdot 2 \cdot x \cdot x \cdot y} = - \frac{2y}{3x}
|
||||
$$
|
||||
|
||||
* \\frac{12xy^2}{18xy^2}=\frac{3 \cdot 2 \cdot 2 \cdot x \cdot y \cdot y}{3 \cdot 7 \cdot 3 \cdot 2 \cdot x \cdot x \cdot y} = - \frac{2y}{3x}
|
||||
$$
|
||||
|
|
|
@ -1,105 +1,100 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
## Addition
|
||||
|
||||
### Like terms
|
||||
|
||||
>
|
||||
> Sum the absolute values and add the negative sign afterwards.
|
||||
> Sum the absolute values and add the negative sign afterwards.
|
||||
|
||||
$$
|
||||
\\begin{split}
|
||||
$$
|
||||
\\begin{split}
|
||||
-4 + -3
|
||||
\\ = 4 + 3
|
||||
\\ = 4 + 3
|
||||
\\ = -7
|
||||
\\end{split}
|
||||
\\end{split}
|
||||
$$
|
||||
|
||||
### Unlike terms
|
||||
|
||||
>
|
||||
> Subtract smaller from larger amount and then affix the sign of the larger amount to the sum.
|
||||
> Subtract smaller from larger amount and then affix the sign of the larger amount to the sum.
|
||||
|
||||
#### Negative plus positive
|
||||
|
||||
$$
|
||||
\\begin{split}
|
||||
$$
|
||||
\\begin{split}
|
||||
-8 + 5
|
||||
\\ = 8 - 5
|
||||
\\ = 3
|
||||
\\ = 8 - 5
|
||||
\\ = 3
|
||||
\\ = -3
|
||||
\\end{split}
|
||||
\\end{split}
|
||||
$$
|
||||
|
||||
#### Positive plus negative
|
||||
|
||||
$$
|
||||
\\begin{split}
|
||||
$$
|
||||
\\begin{split}
|
||||
4 + -1
|
||||
\\ = 4 - 1
|
||||
\\ = 3
|
||||
\\end{split}
|
||||
\\ = 3
|
||||
\\end{split}
|
||||
$$
|
||||
|
||||
## Subtraction
|
||||
|
||||
### Like terms
|
||||
|
||||
>
|
||||
> Turn the operator and second negative into a plus sign and execute as an addition.
|
||||
> Turn the operator and second negative into a plus sign and execute as an addition.
|
||||
|
||||
$$
|
||||
\\begin{split}
|
||||
-4 - -3 =
|
||||
$$
|
||||
\\begin{split}
|
||||
-4 - -3 =
|
||||
\\ = -4 + 3
|
||||
\\ = -1
|
||||
\\end{split}
|
||||
\\end{split}
|
||||
$$
|
||||
|
||||
### Unlike terms
|
||||
|
||||
#### Positive subtract negative
|
||||
|
||||
>
|
||||
> Turn the negative after the operator to a positive. (Same as previous.)
|
||||
> $$
|
||||
> \\begin{split}
|
||||
> 2 - -3 =
|
||||
> \\ = 2 + 3
|
||||
> \\ = 5
|
||||
> \\end{split}
|
||||
> $$
|
||||
> Turn the negative after the operator to a positive. (Same as previous.)
|
||||
>
|
||||
> $$
|
||||
> \\begin{split}
|
||||
> 2 - -3 =
|
||||
> \\ = 2 + 3
|
||||
> \\ = 5
|
||||
> \\end{split}
|
||||
> $$
|
||||
|
||||
#### Negative subtract positive
|
||||
|
||||
>
|
||||
> Start at the negative value and count backwards on the number-line
|
||||
> Start at the negative value and count backwards on the number-line
|
||||
|
||||
$$
|
||||
-2 - 3 = -5
|
||||
$$
|
||||
-2 - 3 = -5
|
||||
$$
|
||||
|
||||
## Multiplication
|
||||
|
||||
### Like terms
|
||||
|
||||
>
|
||||
> The product of two negative numbers will always be a positive number.
|
||||
> The product of two negative numbers will always be a positive number.
|
||||
|
||||
$$
|
||||
$$
|
||||
-15 \cdot -3 = 45
|
||||
$$
|
||||
|
||||
### Unlike terms
|
||||
|
||||
>
|
||||
> The product of a positive and a negative number will always be a negative number.
|
||||
> The product of a positive and a negative number will always be a negative number.
|
||||
|
||||
$$
|
||||
$$
|
||||
-3 \cdot 5 = -15
|
||||
$$
|
||||
|
||||
|
@ -109,18 +104,16 @@ $$
|
|||
|
||||
### Like terms
|
||||
|
||||
>
|
||||
> The quotient of two negative numbers will always be a positive number.
|
||||
> The quotient of two negative numbers will always be a positive number.
|
||||
|
||||
$$
|
||||
$$
|
||||
-15 / -3 = 5
|
||||
$$
|
||||
|
||||
### Unlike terms
|
||||
|
||||
>
|
||||
> The quotient of a positive and a negative number will always be a negative number.
|
||||
> The quotient of a positive and a negative number will always be a negative number.
|
||||
|
||||
$$
|
||||
$$
|
||||
-15 / 3 = -5
|
||||
$$
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
tags:
|
||||
- prealgebra
|
||||
---
|
||||
|
||||
# The set of whole numbers
|
||||
|
@ -12,8 +13,7 @@ $$ \mathbb{W} = {0, 1, 2, 3, ...} $$
|
|||
|
||||
# The properties of $\mathbb{W}$
|
||||
|
||||
>
|
||||
> In mathematics, a **property** is any characteristic that applies to a given set.
|
||||
> In mathematics, a **property** is any characteristic that applies to a given set.
|
||||
|
||||
## The commutative property
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Mathematics
|
||||
- Prealgebra
|
||||
- theorems-axioms-laws
|
||||
tags:
|
||||
- prealgebra
|
||||
- theorems
|
||||
---
|
||||
|
||||
**Let $a$ represent any member of $\mathbb{W}$ or $\mathbb{Z}$ then:**
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Operating_Systems
|
||||
- Linux
|
||||
tags:
|
||||
---
|
||||
|
||||
# Basic model of a *nix operating system
|
||||
# Basic model of a \*nix operating system
|
||||
|
||||
We can abstract the Linux OS into three operational levels or tiers, from the bottom up:
|
||||
|
||||
|
@ -37,4 +38,4 @@ We can abstract the Linux OS into three operational levels or tiers, from the bo
|
|||
</dl>
|
||||
|
||||
!! Add info on kernel mode and user mode
|
||||
https://www.geeksforgeeks.org/user-mode-and-kernel-mode-switching/
|
||||
https://www.geeksforgeeks.org/user-mode-and-kernel-mode-switching/
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Operating_Systems
|
||||
tags:
|
||||
---
|
||||
|
||||
# Daemons
|
||||
|
||||
A programme that runs in the background, performing a system function. A daemon typically starts at boot or login without having to be specifically launched and keeps running permanently or until manually stopped.
|
||||
A programme that runs in the background, performing a system function. A daemon typically starts at boot or login without having to be specifically launched and keeps running permanently or until manually stopped.
|
||||
|
||||
The custom is for the process name of daemons to end in the letter `d`.
|
||||
|
||||
> In the original Greek _daemon_ is translated as 'helper', it doesn't have the medieval connotation of a dark spirit but was used to denote the actions of a god rather than the god itself. A person could have a personal _daemon_ which determines their fate.
|
||||
> In the original Greek _daemon_ is translated as 'helper', it doesn't have the medieval connotation of a dark spirit but was used to denote the actions of a god rather than the god itself. A person could have a personal _daemon_ which determines their fate.
|
||||
|
|
|
@ -1,34 +1,39 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Linux
|
||||
- Operating_Systems
|
||||
tags:
|
||||
---
|
||||
|
||||
# Devices
|
||||
|
||||
Devices are hardware that require access to the CPU in order to function. Devices can either be external and plugged-in or internal to the motherboard. The most common type of device that you will work with are [disks](./Disks.md).
|
||||
Devices are hardware that require access to the CPU in order to function. Devices can either be external and plugged-in or internal to the motherboard. The most common type of device that you will work with are [disks](./Disks.md).
|
||||
|
||||
Devices are files but they have some different capabilities than ordianry files. There are two types: **block** and **stream**. Device files reside in the `/dev/` directory.
|
||||
|
||||
Some of the most important device files are:
|
||||
* `hda` : a harddisk on a port
|
||||
* `sda` : a harddisk on another port
|
||||
|
||||
- `hda` : a harddisk on a port
|
||||
- `sda` : a harddisk on another port
|
||||
|
||||
> Device files are an interface to a driver which accesses the hardware. A driver is therefore part of the Linux kernel.
|
||||
|
||||
So when you see `sda` listed for example, this isn't the harddisk itself, it is a file that communicates with a driver that controls how the kernel can interact with it. This is why when you add a new piece of hardware (such as a mouse for example) you have to install drivers (typically provided by the manufacturer) so that your kernel is able to interact with it and provide it with access to the CPU.
|
||||
So when you see `sda` listed for example, this isn't the harddisk itself, it is a file that communicates with a driver that controls how the kernel can interact with it. This is why when you add a new piece of hardware (such as a mouse for example) you have to install drivers (typically provided by the manufacturer) so that your kernel is able to interact with it and provide it with access to the CPU.
|
||||
|
||||
## Listing devices
|
||||
## Listing devices
|
||||
|
||||
The following `ls` within the `/dev/` directory shows my main harddrive partitions:
|
||||
|
||||
```
|
||||
brw-rw---- 1 root disk 259, 1 Jun 4 11:00 nvme0n1p1
|
||||
brw-rw---- 1 root disk 259, 2 Jun 4 11:00 nvme0n1p2
|
||||
brw-rw---- 1 root disk 259, 3 Jun 4 11:00 nvme0n1p3
|
||||
```
|
||||
> Since device files are files we can interact with them using standard file programs like `ls` and `cat`.
|
||||
|
||||
The [mode](../Programming_Languages/Shell_Scripting/File_permissions_and_execution.md#what-the-output-means) is different from ordinary files. Each device file is prepended with `b, p, c, s` before the standard permissions. These stand for the major types of devices: _block, character, pipe_ and _socket_.
|
||||
> Since device files are files we can interact with them using standard file programs like `ls` and `cat`.
|
||||
|
||||
The [mode](../Programming_Languages/Shell_Scripting/File_permissions_and_execution.md#what-the-output-means) is different from ordinary files. Each device file is prepended with `b, p, c, s` before the standard permissions. These stand for the major types of devices: _block, character, pipe_ and _socket_.
|
||||
|
||||
<dl>
|
||||
<dt>block</dt>
|
||||
<dd>Block devices transfer data as large fixed-size blocks. These are the most common device type and include harddrives and filesystems. As the data can be split up into discrete blocks of data, this facilitates quick random access from the kernel. </dd>
|
||||
|
@ -40,9 +45,8 @@ The [mode](../Programming_Languages/Shell_Scripting/File_permissions_and_executi
|
|||
<dd>The same as pipe devices, facilitating communication between processes however they can communicate with many processes at once, not just a single process.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
## /dev/null
|
||||
|
||||
`/dev/null` is a virtual device: it doesn't actually exist as a piece of hardware on the system.
|
||||
`/dev/null` is a virtual device: it doesn't actually exist as a piece of hardware on the system.
|
||||
|
||||
> ! Make notes on this. Base on : https://linuxhint.com/what_is_dev_null/
|
||||
> ! Make notes on this. Base on : https://linuxhint.com/what_is_dev_null/
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Linux
|
||||
- Operating_Systems
|
||||
tags:
|
||||
- disks
|
||||
- filesystems
|
||||
---
|
||||
|
@ -12,23 +13,24 @@ We cannot yet mount or interact with the partitions we have created. This is bec
|
|||
|
||||
> A filesytem is a form of [database](/Databases/Basic_database_concepts.md); it supplies the structure to transform a simple block device into the sophisticated hierarchy of files and subdirectories that users can understand.
|
||||
|
||||
Linux recognises many types of filesystems. The native Linux filesystem is the **ext4** (Fourth Extended Filesystem). Another common filesystem is **FAT** (File Allocation Table). Instances of this include _MSDOS_,_EXFAT_,_FAT-32_. They originate from Microsoft systems
|
||||
Linux recognises many types of filesystems. The native Linux filesystem is the **ext4** (Fourth Extended Filesystem). Another common filesystem is **FAT** (File Allocation Table). Instances of this include _MSDOS_,_EXFAT_,_FAT-32_. They originate from Microsoft systems
|
||||
|
||||
## Creating a filesystem
|
||||
|
||||
Remember we have two partitions on our external drive: `sda1` and `sda2`. We are going to use the `mkfs` utility to create an EXT4 system on both.
|
||||
Remember we have two partitions on our external drive: `sda1` and `sda2`. We are going to use the `mkfs` utility to create an EXT4 system on both.
|
||||
|
||||
```bash
|
||||
mkfs -t ext4 /dev/sda1
|
||||
mkfs -t ext4 /dev/sda2
|
||||
```
|
||||
|
||||
## Mounting a filesystem
|
||||
## Mounting a filesystem
|
||||
|
||||
We can now mount our filesystems. Whem we mount, we must specify the following criteria with the request:
|
||||
|
||||
* The name of the device we want to mount.
|
||||
* This will be the name or the partition. However the names (`sda` etc) assigned by the OS can change. In these cases and with GPT-based partitions you can use the UUID.
|
||||
* To see a list of devices and the corresponding filesystems and UUIDs on your system, you can use the **`blkid`** ('block id') program.
|
||||
- The name of the device we want to mount.
|
||||
- This will be the name or the partition. However the names (`sda` etc) assigned by the OS can change. In these cases and with GPT-based partitions you can use the UUID.
|
||||
- To see a list of devices and the corresponding filesystems and UUIDs on your system, you can use the **`blkid`** ('block id') program.
|
||||
```
|
||||
/dev/nvme0n1p3: UUID="c53577b5-92ef-4a0a-9a19-e488bfdfa39c" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="e152b9f4-7ce8-e74b-94db-2731c6fce53d"
|
||||
/dev/nvme0n1p1: UUID="9920-636A" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="50592521-d386-194a-a362-bc8562ed6c82"
|
||||
|
@ -36,10 +38,10 @@ We can now mount our filesystems. Whem we mount, we must specify the following c
|
|||
/dev/sda2: UUID="abac6e2e-e3bf-40d3-a5ba-317c53eb27ce" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4ef1b0e8-3d5b-c940-a3b1-0f85cddeca42"
|
||||
/dev/sda1: UUID="ba1e40c5-9b29-4309-a559-99bf8f68116f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b4983358-6036-df40-a1f8-793976f3dfb1"
|
||||
```
|
||||
* The filesystem type (optional)
|
||||
* The **mount point**
|
||||
* This is the place within the existing filesystem where you want to mount the partition.
|
||||
* When you mount to a directory, this directory _becomes_ the disk you have mounted, you will not see it as a subdirectory within the the mount point, you will just see the contents of the disk itself
|
||||
- The filesystem type (optional)
|
||||
- The **mount point**
|
||||
- This is the place within the existing filesystem where you want to mount the partition.
|
||||
- When you mount to a directory, this directory _becomes_ the disk you have mounted, you will not see it as a subdirectory within the the mount point, you will just see the contents of the disk itself
|
||||
|
||||
```bash
|
||||
mkdir mountpoint
|
||||
|
@ -68,6 +70,7 @@ UUID=c53577b5-92ef-4a0a-9a19-e488bfdfa39c /home ext4 rw,relatime 0 2
|
|||
/swapfile none swap sw 0 0
|
||||
|
||||
```
|
||||
|
||||
It shows my root and home filesystems and my [swap](/Operating_Systems/Disks/Swap_space.md) file. Note that we use the UUID to name the partition rather than its name in `/dev/`. The order of the parameters is as follows:
|
||||
|
||||
- Device name or UUID
|
||||
|
@ -75,7 +78,7 @@ It shows my root and home filesystems and my [swap](/Operating_Systems/Disks/Swa
|
|||
- The filesystem type (in the example there are two types (`ext4` and `swap`))
|
||||
- Options
|
||||
- Now largely irrelevant backup information, set to )
|
||||
- Filesystem integrity test order
|
||||
- Runs the `fsck` ('filesystem check') command against each filesystem
|
||||
- Filesystem integrity test order
|
||||
- Runs the `fsck` ('filesystem check') command against each filesystem
|
||||
- Put `1` against the root partition for this to be checked first
|
||||
- Put `0` for no checks to take place
|
||||
- Put `0` for no checks to take place
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Linux
|
||||
- Operating_Systems
|
||||
tags:
|
||||
- disks
|
||||
- devices
|
||||
---
|
||||
|
@ -10,9 +11,10 @@ tags:
|
|||
|
||||
A disk is divided up into [partitions](/Operating_Systems/Disks/Partitions.md) which are subsections of the overall disk. The kernel presents each partition as a [block device](/Operating_Systems/Devices.md#Devices.md) as it would with an entire disk.
|
||||
|
||||
The disk dedicates a small part of its contents to a **partition table**: this defines the different partitions that comprise the total disk space.
|
||||
The disk dedicates a small part of its contents to a **partition table**: this defines the different partitions that comprise the total disk space.
|
||||
|
||||
## Viewing current partitions
|
||||
|
||||
Whenever you install a Linux distribution on a real or virtual machine, you must partition the drive. There are three main tools to choose from: `parted`, `g(raphical)parted`, `fdisk`.
|
||||
|
||||
For a top-level overview of your disks and their main partitions you can run `lsblk` (_list block devices_):
|
||||
|
@ -21,16 +23,15 @@ For a top-level overview of your disks and their main partitions you can run `ls
|
|||
$ lsblk
|
||||
|
||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||
sda 8:0 0 465.7G 0 disk
|
||||
├─sda1 8:1 0 200M 0 part
|
||||
sda 8:0 0 465.7G 0 disk
|
||||
├─sda1 8:1 0 200M 0 part
|
||||
└─sda2 8:2 0 465.4G 0 part /run/media/thomas/ganesh
|
||||
nvme0n1 259:0 0 476.9G 0 disk
|
||||
├─nvme0n1p1 259:1 0 488M 0 part
|
||||
nvme0n1 259:0 0 476.9G 0 disk
|
||||
├─nvme0n1p1 259:1 0 488M 0 part
|
||||
├─nvme0n1p2 259:2 0 27.9G 0 part /
|
||||
└─nvme0n1p3 259:3 0 448.5G 0 part /home
|
||||
```
|
||||
|
||||
|
||||
We can use `parted -l` to view the partition table for the current machine:
|
||||
|
||||
```bash
|
||||
|
@ -38,7 +39,7 @@ Model: SKHynix_HFS512GDE9X081N (nvme)
|
|||
Disk /dev/nvme0n1: 512GB
|
||||
Sector size (logical/physical): 512B/512B
|
||||
Partition Table: gpt
|
||||
Disk Flags:
|
||||
Disk Flags:
|
||||
|
||||
Number Start End Size File system Name Flags
|
||||
1 1049kB 513MB 512MB fat32 boot, esp
|
||||
|
@ -50,7 +51,7 @@ We can use `fdisk -l` to get slightly more info:
|
|||
|
||||
```bash
|
||||
disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
|
||||
Disk model: SKHynix_HFS512GDE9X081N
|
||||
Disk model: SKHynix_HFS512GDE9X081N
|
||||
Units: sectors of 1 * 512 = 512 bytes
|
||||
Sector size (logical/physical): 512 bytes / 512 bytes
|
||||
I/O size (minimum/optimal): 512 bytes / 512 bytes
|
||||
|
@ -62,28 +63,31 @@ Device Start End Sectors Size Type
|
|||
/dev/nvme0n1p2 1001472 59594751 58593280 27.9G Linux filesystem
|
||||
/dev/nvme0n1p3 59594752 1000214527 940619776 448.5G Linux filesystem
|
||||
```
|
||||
The two tools disclose that the main harddrive is `/dev/nvme0n1` (equivalent to `sda` on older machines running Linux) and it has the standard three partitions:
|
||||
* Boot partition (`/dev/nvme0n1p1`)
|
||||
* This takes up the smallest amount of space and exists in order to bootstrap the operating system: to load the kernel into memory when the machine starts. This is where your bootloader is stored and that will be accessed by the BIOS. In Linux this will be GRUB.
|
||||
* Root dir (`/dev/nvme0n1p2`)
|
||||
* This is the domain of the [superuser](/Operating_Systems/User_Space.md#root-user-superuser). The part of the filesystem that you need sudo priveleges to access and where you manage users
|
||||
* Home dir (`/dev/nvme0n1p3`)
|
||||
* The domain of the user(s)
|
||||
|
||||
The two tools disclose that the main harddrive is `/dev/nvme0n1` (equivalent to `sda` on older machines running Linux) and it has the standard three partitions:
|
||||
|
||||
- Boot partition (`/dev/nvme0n1p1`)
|
||||
- This takes up the smallest amount of space and exists in order to bootstrap the operating system: to load the kernel into memory when the machine starts. This is where your bootloader is stored and that will be accessed by the BIOS. In Linux this will be GRUB.
|
||||
- Root dir (`/dev/nvme0n1p2`)
|
||||
- This is the domain of the [superuser](/Operating_Systems/User_Space.md#root-user-superuser). The part of the filesystem that you need sudo priveleges to access and where you manage users
|
||||
- Home dir (`/dev/nvme0n1p3`)
|
||||
- The domain of the user(s)
|
||||
|
||||
## Types of partition table
|
||||
In the Linux world there are two main types: MBR and GPT. The type of table used determines how the OS boots. So although partition tables are also responsible for the partitioning of non-bootable sectors of a disk, **they are distinguished by the boot system they implement**.
|
||||
|
||||
In the Linux world there are two main types: MBR and GPT. The type of table used determines how the OS boots. So although partition tables are also responsible for the partitioning of non-bootable sectors of a disk, **they are distinguished by the boot system they implement**.
|
||||
If we look at the output from `parted` and `fdisk` above we see that the harddrive uses the GPT partition type.
|
||||
|
||||
#### Primary, extended and logical partitions
|
||||
Most standard partition tables allow for primary, extended and logical partitions. The primary partition is the part of the harddisk that contains the operating system and is thus described as 'bootable' and may be called the 'boot partition'. During the bootstrapping process this is injected into memory as the [kernel](/Operating_Systems/The_Kernel.md).
|
||||
|
||||
The extended partition is basically everything other than the primary partition. This is typically subdivided into other partitions that are called *logical* partitions. This is because they physically reside in the same sector of the disk (the extended partition) but are treated as virtual and independent disks.
|
||||
Most standard partition tables allow for primary, extended and logical partitions. The primary partition is the part of the harddisk that contains the operating system and is thus described as 'bootable' and may be called the 'boot partition'. During the bootstrapping process this is injected into memory as the [kernel](/Operating_Systems/The_Kernel.md).
|
||||
|
||||
The extended partition is basically everything other than the primary partition. This is typically subdivided into other partitions that are called _logical_ partitions. This is because they physically reside in the same sector of the disk (the extended partition) but are treated as virtual and independent disks.
|
||||
|
||||
In our example above:
|
||||
* `/dev/nvme0n1p1` is the primary/boot partition
|
||||
* `/dev/nvme0n1p2` and `/dev/nvme0n1p3` comprise the extended partition and by themselves are each logical partitions.
|
||||
|
||||
|
||||
- `/dev/nvme0n1p1` is the primary/boot partition
|
||||
- `/dev/nvme0n1p2` and `/dev/nvme0n1p3` comprise the extended partition and by themselves are each logical partitions.
|
||||
|
||||
<dl>
|
||||
<dt>MBR</dt>
|
||||
|
@ -127,8 +131,8 @@ $ fdisk -l
|
|||
/dev/sda1 40 409639 409600 200M EFI System
|
||||
/dev/sda2 409640 976455639 976046000 465.4G Apple HFS/HFS+
|
||||
```
|
||||
(This disk was previously used as a backup disk for MacOS so in addition to the extended partition which has a proprietary file system type (Apple HFS) it has a primary partition which would load the recovery OS. In contrast to my main harddrive this uses the standard SCSI prototcol and thus the partitions are prepended with `sda`.)
|
||||
|
||||
(This disk was previously used as a backup disk for MacOS so in addition to the extended partition which has a proprietary file system type (Apple HFS) it has a primary partition which would load the recovery OS. In contrast to my main harddrive this uses the standard SCSI prototcol and thus the partitions are prepended with `sda`.)
|
||||
|
||||
#### 1. Unmount existing partitions
|
||||
|
||||
|
@ -136,7 +140,9 @@ $ fdisk -l
|
|||
umount /dev/sda1
|
||||
umount /dev/sda2
|
||||
```
|
||||
|
||||
#### 2. Deleting the existing partitions
|
||||
|
||||
```bash
|
||||
# Load the disk into fdisk
|
||||
$ sudo fdisk /dev/sda
|
||||
|
@ -167,11 +173,13 @@ w
|
|||
# Check execution:
|
||||
$ lsblk
|
||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||
sda 8:0 0 465.7G 0 disk
|
||||
sda 8:0 0 465.7G 0 disk
|
||||
```
|
||||
|
||||
So now the disk has no partitions, just the physical disk space and no mountpoints. We are ready to re-partition.
|
||||
|
||||
#### 3. Re-partition the disk
|
||||
#### 3. Re-partition the disk
|
||||
|
||||
We are going to create a GPT partition table
|
||||
|
||||
```bash
|
||||
|
@ -180,7 +188,7 @@ Command (m for help): g
|
|||
Created a new GPT disklabel (GUID: E316B1A9-6F73-FB41-8CBB-FA4E3C448F2B).
|
||||
|
||||
Command (m for help): n
|
||||
Partition number (1-128, default 1):
|
||||
Partition number (1-128, default 1):
|
||||
First sector (2048-976717790, default 2048):
|
||||
|
||||
# Just press enter here
|
||||
|
@ -189,12 +197,12 @@ First sector (2048-976717790, default 2048):
|
|||
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-976717790, default 976715775): +100G
|
||||
Created a new partition 1 of type 'Linux filesystem' and of size 100 GiB.
|
||||
|
||||
# For the second and final partition, we follow the same steps but don't add a partition size, since it will default to what is left.
|
||||
# For the second and final partition, we follow the same steps but don't add a partition size, since it will default to what is left.
|
||||
|
||||
Command (m for help): n
|
||||
Partition number (2-128, default 2):
|
||||
First sector (209717248-976717790, default 209717248):
|
||||
Last sector, +/-sectors or +/-size{K,M,G,T,P} (209717248-976717790, default 976715775):
|
||||
Partition number (2-128, default 2):
|
||||
First sector (209717248-976717790, default 209717248):
|
||||
Last sector, +/-sectors or +/-size{K,M,G,T,P} (209717248-976717790, default 976715775):
|
||||
|
||||
Created a new partition 2 of type 'Linux filesystem' and of size 365.7 GiB.
|
||||
|
||||
|
@ -224,9 +232,9 @@ We can now confirm out new partitions:
|
|||
```bash
|
||||
$ lsblk
|
||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||
sda 8:0 0 465.7G 0 disk
|
||||
├─sda1 8:1 0 100G 0 part
|
||||
└─sda2 8:2 0 365.7G 0 part
|
||||
sda 8:0 0 465.7G 0 disk
|
||||
├─sda1 8:1 0 100G 0 part
|
||||
└─sda2 8:2 0 365.7G 0 part
|
||||
```
|
||||
|
||||
> Whilst we have created our partitions we cannot yet mount them. This is because we have not yet set up a filesystem on the partitions. This is the next step.
|
||||
> Whilst we have created our partitions we cannot yet mount them. This is because we have not yet set up a filesystem on the partitions. This is the next step.
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Linux
|
||||
- Operating_Systems
|
||||
tags:
|
||||
- memory
|
||||
- disks
|
||||
- devices
|
||||
---
|
||||
|
||||
# Swap space
|
||||
|
||||
A swap partition is a partition on a disk that is not intended to be used as a filesystem. Instead, it is a part of the disk that is used to augment the main memory.
|
||||
A swap partition is a partition on a disk that is not intended to be used as a filesystem. Instead, it is a part of the disk that is used to augment the main memory.
|
||||
|
||||
If you run out of memory and have set up a swap partition, the OS will be able to move pieces of memory to and from disk storage. This is called _swapping_ because pieces of idle programs are swapped to the disk in exchange for active pieces residing on the disk.
|
||||
|
||||
## View current swap usage
|
||||
If you have a swap space established, the command `free` will show current usage:
|
||||
|
||||
If you have a swap space established, the command `free` will show current usage:
|
||||
|
||||
```bash
|
||||
free
|
||||
|
@ -23,9 +26,11 @@ Swap: 3145724 0 3145724
|
|||
```
|
||||
|
||||
## Create a swap partition
|
||||
|
||||
To use an existing disk partition as a swap you can run the command `mkswap [device]` and then `swapon [device]` to register the space with the [kernel](/Operating_Systems/The_Kernel.md).
|
||||
|
||||
### Add to `fstab`
|
||||
|
||||
You will want the swap to be activated every time the OS boots so add the following line to the [fstab](/Operating_Systems/Disks/Filesystems.md#fstab), where `/sda3` is used as the example partition:
|
||||
|
||||
```bash
|
||||
|
@ -34,4 +39,4 @@ You will want the swap to be activated every time the OS boots so add the follow
|
|||
|
||||
## Create a swap file
|
||||
|
||||
// TODO: Add info here
|
||||
// TODO: Add info here
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Linux
|
||||
- Operating_Systems
|
||||
tags:
|
||||
- disks
|
||||
- devices
|
||||
---
|
||||
|
@ -11,14 +12,16 @@ tags:
|
|||
A disk is a mass storage [block_device](/Operating_Systems/Devices.md) which we can write to and read from.
|
||||
|
||||
## SCSI
|
||||
* Small Computer System Interface, responsible for handling disk access on most Linux systems.
|
||||
* It is a protocol that allows communicaton between printers, scanners and other peripherals in addition to harddisks.
|
||||
|
||||
- Small Computer System Interface, responsible for handling disk access on most Linux systems.
|
||||
- It is a protocol that allows communicaton between printers, scanners and other peripherals in addition to harddisks.
|
||||
|
||||
## Disk schematic
|
||||
|
||||
The following diagram represents the basic anatomy of a disk device.
|
||||
|
||||

|
||||
|
||||
|
||||
* A disk is divided up into [partitions](/Operating_Systems/Disks/Partitions.md) which are subsections of the overall disk. The kernel presents each partition as a [block device](/Operating_Systems/Devices.md#Devices.md) as it would with an entire disk.
|
||||
* The disk dedicates a small part of its contents to a **partition table**: this defines the different partitions that comprise the total disk space.
|
||||
* The **filesystem** is a database of files and directories: this comprises the bulk of the partition and is what you interact with in [user space](/Operating_Systems/User_Space.md) when reading and writing data.
|
||||
- A disk is divided up into [partitions](/Operating_Systems/Disks/Partitions.md) which are subsections of the overall disk. The kernel presents each partition as a [block device](/Operating_Systems/Devices.md#Devices.md) as it would with an entire disk.
|
||||
- The disk dedicates a small part of its contents to a **partition table**: this defines the different partitions that comprise the total disk space.
|
||||
- The **filesystem** is a database of files and directories: this comprises the bulk of the partition and is what you interact with in [user space](/Operating_Systems/User_Space.md) when reading and writing data.
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
---
|
||||
tags:
|
||||
categories:
|
||||
- Operating_Systems
|
||||
- Linux
|
||||
- Linux
|
||||
tags:
|
||||
---
|
||||
|
||||
# User space
|
||||
|
||||
User space is the portion of the main memory that the kernel allocates for user processes.
|
||||
User space is the portion of the main memory that the kernel allocates for user processes.
|
||||
|
||||
There is a hierarchy within the user space with several different groups of user processes:
|
||||
|
||||
|
@ -20,13 +21,15 @@ There is a hierarchy within the user space with several different groups of user
|
|||
</dl>
|
||||
|
||||
## What is a user?
|
||||
|
||||
> A user is an entity that can run processes and own files.
|
||||
|
||||
At the level of users, a user is associated with a user name however the kernel does not manage usernames, it identifies users via numeric identifiers called **user IDs**.
|
||||
At the level of users, a user is associated with a user name however the kernel does not manage usernames, it identifies users via numeric identifiers called **user IDs**.
|
||||
|
||||
Users exist in order to support permissions and access boundaries. A user may terminate or modify the behaviour of its own processes (within limits) but cannot interfere with another user's proceses. In addition, users may own files and choose whether to share them with other users.
|
||||
Users exist in order to support permissions and access boundaries. A user may terminate or modify the behaviour of its own processes (within limits) but cannot interfere with another user's proceses. In addition, users may own files and choose whether to share them with other users.
|
||||
|
||||
### Root user (superuser)
|
||||
A Linux system normally has a number of users in addition to the ones that correspond to the real human users. The most important is **root**. The root user _can_ terminate and alter another user's processes and access any file on the local system.
|
||||
|
||||
A person who can operate as root is an administrator on a typical user system.
|
||||
A Linux system normally has a number of users in addition to the ones that correspond to the real human users. The most important is **root**. The root user _can_ terminate and alter another user's processes and access any file on the local system.
|
||||
|
||||
A person who can operate as root is an administrator on a typical user system.
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
categories:
|
||||
- Mathematics
|
||||
tags:
|
||||
- Logic
|
||||
- Set_Theory
|
||||
- theorems-axioms-laws
|
||||
- logic
|
||||
- set-theory
|
||||
- theorems
|
||||
---
|
||||
|
||||
The basic notions of set theory are defined in [Basic properties of sets](Basic%20properties%20of%20sets.md). There we introduced a formal syntax that will be utilised to define the axioms. For easy reference:
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
categories:
|
||||
- Mathematics
|
||||
tags:
|
||||
- Logic
|
||||
- Set_Theory
|
||||
- logic
|
||||
- set-theory
|
||||
---
|
||||
|
||||
## Set theory
|
||||
|
@ -10,15 +12,14 @@ Set theory is a sub-discipline of both mathematics and formal logic. In mathemat
|
|||
|
||||
It is useful because it provides tools for modelling an extraordinary variety of structures.
|
||||
|
||||
>
|
||||
> Set theory and the theory of infinite sets was created by Georg Cantor (1845-1918), a German mathematician.
|
||||
> Set theory and the theory of infinite sets was created by Georg Cantor (1845-1918), a German mathematician.
|
||||
|
||||
## Method of formalisation
|
||||
|
||||
We can use the symbols of predicate logic to simplify and clarify natural language expression of set-theoretic principles. There are different ways to do this but we will use the standard quantifiers and:
|
||||
|
||||
* variables $a,b,c,...$ to range over sets
|
||||
* variables $x,y,z$ to range over ordinary objects as well as sets.
|
||||
- variables $a,b,c,...$ to range over sets
|
||||
- variables $x,y,z$ to range over ordinary objects as well as sets.
|
||||
|
||||
More generally we will use capital Latin letters ($A, B, ...$) to denote some specific set, i.e not a generalised/quantified notion of a set.
|
||||
|
||||
|
@ -40,8 +41,7 @@ An **infinite set:**
|
|||
|
||||
$$ I = {1, 2, 3, 4, ...} $$
|
||||
|
||||
>
|
||||
> When we use braces to indicate the members of a set we are providing a **list description** of the set.
|
||||
> When we use braces to indicate the members of a set we are providing a **list description** of the set.
|
||||
|
||||
## Set membership
|
||||
|
||||
|
@ -49,9 +49,9 @@ If a set S is a collection of objects, to say that object x is a member of S is
|
|||
|
||||
We might also express this in natural language as:
|
||||
|
||||
* the object x is an element of the set S
|
||||
* the object x belongs to S
|
||||
* the set S contains the object x
|
||||
- the object x is an element of the set S
|
||||
- the object x belongs to S
|
||||
- the set S contains the object x
|
||||
|
||||
Formally, we use epsilon to express set membership:
|
||||
|
||||
|
@ -67,8 +67,7 @@ This asserts that x is not a member of the set A.
|
|||
|
||||
### Subsets
|
||||
|
||||
>
|
||||
> Set A is a subset of set B if every member of A is also a member of B.
|
||||
> Set A is a subset of set B if every member of A is also a member of B.
|
||||
|
||||
For example the set of women is a subset of the set of humans because every woman is a human. We express subset relations like so:
|
||||
|
||||
|
@ -84,8 +83,7 @@ We must not confuse the relation of being a subset with being a member. Jane is
|
|||
|
||||
There is also the notion of a **proper subset.**
|
||||
|
||||
>
|
||||
> If subset *A* of *B* is a proper subset of *B* then *B* contains some elements that are not in *A*.
|
||||
> If subset _A_ of _B_ is a proper subset of _B_ then _B_ contains some elements that are not in _A_.
|
||||
|
||||
In other words, if B contains objects other than/ in addition to A.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue