ELI5: Explain Like I'm 5

Well-formed formula

A well-formed formula is like a sentence in a special language used in math and logic. It's like how we have grammar rules that help us make sentences that make sense in English, like "I like pizza" or "The cat drinks milk." In math and logic, there are also rules that help us make well-formed formulas that make sense and are easy to understand.

So, let's say we have a silly language where we can only use certain words and symbols, like "p", "q", "r", "¬", "∨", and "∧". We also have rules that tell us how we can use these words and symbols to create well-formed formulas. For example:

- A letter like "p" is a well-formed formula on its own.
- If "X" and "Y" are both well-formed formulas, then so are "(X∨Y)" and "(X∧Y)".
- If "X" is well-formed, then "¬X" is well-formed too.

In other words, we can combine letters and symbols in certain ways to make well-formed formulas. And when we follow these rules, we end up with formulas that are easy to read and understand. For example, we can use these rules to make formulas like:

- "p"
- "(p∨q)"
- "¬(p∧q)"

These are all well-formed formulas because they follow the rules and make sense in our special language. And just like how we can use grammar rules to make different kinds of sentences, we can use the rules for well-formed formulas to make different kinds of logical statements in math and logic.
Related topics others have asked about: