If the language above looks familiar, except for the role of module names, that’s because it’s one that’s often used. With search terms in place of module names, and with the usual English names for the Boolean operators in place of the symbols ∧, ∨ and ¬, it’s the language used by search engines, not just the big web search engines but also the one used to search for books or articles in our library.
This formal language, with Boolean variables in place of module names, combined with various axioms and rules of inference we’ll discuss later, forms what’s called the predicate calculus, also known as zeroeth order logic. Beyond zeroeth order logic there is first order logic, which introduces new language elements like quantifiers, and axioms and rules of inference for them. In a real module enrollment system there would be advantages to introducing at least some elements of first order logic. For example, suppose we want to implement the simple rule “You must take Probability and Statistics and no other modules.” The statement “Probability ∧ Statistics” is not a faithful translation of this rule into our formal language because it doesn’t enforce the “and no other modules part. The correct translation of this into our formal language would look like”Probability ∧ Statistics ∧ ¬ Algebra ∧ ¬ Geometry …” where the “…” continues on to list every other module offered. That’s awkward. It would be much better to be able to say something like “Probability ∧ Statistics ∧ ∀ \({ x }\) . (( \({ x }\) = Probability ) ∨ ( \({ x}\) = Statistics ) ( ∨ ¬ x ))” where ∀ is the quantifier “for all” and = is what you think it is. \({ x }\) here is a variable, which in this context is a placeholder for an arbitrary module. The disadvantage of using first order logic is that it complicates parsing input from staff, which we’ll talk more about shortly, and checking input from students, which we’ll talk about later. For purposes of this simple example we will therefore stick to zeroeth order logic and postpone any further discussion of first order logic until later in the module.
Most humans would not naturally write “and no other modules”, thinking it obvious from context. It would then be implicit in “You must take Probability and Statistics”, but might not be in other uses of the word “and”. In the sentence “Before taking Forecasting you must take Probability and Statistics” it seems unlikely that there’s an implicit “and no other modules”. The word “and” in English therefore has at least two different interpretations, which we can usefully refer to as “exclusive ‘and’” and “inclusive ‘and’”. English is far from unique in failing to distinguish between these but some other languages, like Japanese, do.