## Introduction

In the previous chapter, we got an introduction to logic — mainly mathematical logic. We learnt what is propositional logic and its most fundamental concept — propositions.

Now in this chapter, we shall unravel the two categories of propositions: simple and compound. Let's begin!

## What are atomic propositions?

As the name clearly suggests:

An atomic proposition is a proposition that can't be divided any further.

It's the simplest of sentences.

For example here are a handful of atomic propositions:

1. C++ is easy.
2. JavaScript was created by Brendan Eich.
3. CSS stands for Cascading Style Sheets.
4. HTML is a web standard.

Why are they atomic? Simply because we can't divide them any further. They are the simplest they could be.

Atomic propositions, also known as primitive propositions, are the primitive, building blocks of propositional logic. They sit right at its foundation.

The opposite of atomic propositions are compound propositions. Let's see what are they...

## What are compound propositions?

Simply:

A compound proposition is a proposition that can be divided into simpler, atomic propositions.

It is said to be composed of atomic propositions.

Compound propositions are also known as molecular propositions (analagous to the concept of a molecule in chemistry which is comprised of atoms).

But how do we combine simple propositions together to form a compound?

Well, we use something called connectives.

The idea of connectives is one of the building blocks of logic. We'll explore it in the next chapter.

Following the most intuitive way to think about it, how can you combine the following two sentences (propositions) into one single sentence, just in plain English:

1. Java is low-level.
2. London is the capital of England.

Well, one way is to use the word 'and'.

Here's the compound sentence we could form by using 'and' and the two aforementioned sentences.

Notice how we can divide this sentence into further simpler sentences. There is room for extracting out simpler sentences from this statement.

Let's consider another example:

This time, we've used the word 'or' which is another common connective used in English. What we have is, clearly, a compound statement.

Now that we know this, let's make more compound statements...

## Long compound propositions

Let's say you are given the following atomic propositions:

1. C is easy.
2. Python is high-level.
3. Java is challenging.

and have been asked to create a compound sentence using all of them and the word 'and'. What sentence would you get in the end?

Simple as it is, you'll get the following:

C is easy and Python is high-level and Java is challenging.

Easy, wasn't it?

Now, let's take it to another level. Suppose you have the following ten sentences and have to do the same thing — create a compound sentence using all of them:

1. C is easy.
2. Java is challenging.
3. Python is high-level.
4. Maths is easy.
5. Computers are intelligent.
6. AI stands for Artificial Intelligence.
7. CodeGuage is a free learning platform.
8. London is the capital of England.
9. Ruby is a strongly-typed language.
10. Python is simple to use.

Let's form the sentence:

C is easy and Java is challenging and Python is high-level and Maths is easy and Computers are intelligent and AI stands for Artificial Intelligence and CodeGuage is a free learning platform and London is the capital of England and Ruby is a strongly-typed language and Python is simple to use.

As you can realise, things start to become quite long. We are losing simplicity, yet what we have here is a really simple-to-understand sentence — it's a mere connection of simple statements using the connective 'and'.

Imagine, having 20 or 30 such propositions, or the same number of propositions but longer in length... Where would we end up?

In complete mess..

Any solutions? Well, yes — use propositional variables.

## What are propositional variables?

A propositional variable is similar in idea to variables that we use in algebra in that it also holds on to something.

In algebra, the variables hold numbers or expressions, but in propositional logic, the variables hold propositions. So simple!

So, let's define the idea formally:

A propositional variable holds a proposition.

Conventionally, the symbols $p, q, r, s, t, ...$ are used as propositional variables.

But there is absolutely no one stopping you from using $a, b, c, ...$, or Greek symbols such as $\phi, \delta, \sigma$, or even some abbreviations, or short phrases, such as $\mathrm{PLEasy}$ for 'Propositional Logic is easy'.

Let's see how can we use propositional variables to simplify the last task that we had to do above of joining the given ten statements.

We'll start by assigning each of the given propositions to a variable:

1. $\pmb{p}$:  C is easy.
2. $\pmb{q}$:  Java is challenging.
3. $\pmb{r}$:  Python is high-level.
4. $\pmb{s}$:  Maths is easy.
5. $\pmb{t}$:  Computers are intelligent.
6. $\pmb{u}$:  AI stands for Artificial Intelligence.
7. $\pmb{v}$:  CodeGuage is a free learning platform.
8. $\pmb{w}$:  London is the capital of England.
9. $\pmb{x}$:  Ruby is a strongly-typed language.
10. $\pmb{y}$:  Python is simple to use.

Next, we'll take each of these variables and combine them together using the word 'and':

$\pmb{p}$  and  $\pmb{q}$  and  $\pmb{r}$  and  $\pmb{s}$  and  $\pmb{t}$  and  $\pmb{u}$  and  $\pmb{v}$  and  $\pmb{w}$  and  $\pmb{x}$  and  $\pmb{y}$

See how simple the sentence now looks. It is still the same compound proposition as the one shown above; it's just that this time it's expressed in terms of variables.

And it's not just about working with these sentences in English that variables help us in — when we start to manipulate propositions algebraically, or represent the semantics (meaning) of operators using truth tables, having variables can be extremely handy.

It can save us from having to rewriting the propositions again and again, thus making the whole process of working with propositions a lot lot more intuitive and easier.

## Moving on...

In the next chapter, we would explore in detail the things that help in combining atomic propositions together into compound propositions; formally known as logical operators. Here we only saw two of them — 'and' and 'or' — and they too were not explored formally to the core.

All this discussion awaits us in the next chapter, so let's keep going!