Logic, Sets, and Functions

Y. Eddie Lu, Summer 2026

ECON 8001 course index · Lecture 1 of 8

Orientation

What problem does this solve?

Most errors in advanced mathematics are not algebra mistakes. They are failures to track a domain, a quantifier, or an implication. Before asking whether an estimator converges or an optimum exists, one must know exactly which objects are quantified over and what is claimed about them.

A useful reading habit

Read a mathematical statement as a contract. First identify the objects. Next identify the assumptions. Finally identify the conclusion and its direction. The symbols are compressed grammar, not decoration.

Where this sits

This page is a prerequisite for every other course page. In particular, the definitions of a vector space, a compact set, and a derivative all use set-builder notation and nested quantifiers.

Prerequisite retrieval

Retrieval check. Is the statement “every real number is positive” the same as “there is a positive real number”?

No. The first statement is \(\forall x\in\mathbb R: x>0\), which is false. The second is \(\exists x\in\mathbb R: x>0\), which is true, for example with \(x=1\). Changing the quantifier changes the claim.

Logic: implication is directional

Let \(P\) and \(Q\) be propositions, statements that are either true or false.

Definition: logical connectives

\[ \begin{aligned} \neg P &\text{ means “not }P\text{”},\\ P\land Q &\text{ means “}P\text{ and }Q\text{”},\\ P\lor Q &\text{ means “}P\text{ or }Q\text{”}. \end{aligned} \]

The implication \(P\Rightarrow Q\) says: whenever \(P\) holds, \(Q\) must hold. The equivalence \(P\Leftrightarrow Q\) means both \(P\Rightarrow Q\) and \(Q\Rightarrow P\).

The implication \(P\Rightarrow Q\) does not claim \(Q\Rightarrow P\). For example,

\[ x>0\Rightarrow x^2>0, \]

while \(x^2>0\Rightarrow x>0\) fails at \(x=-1\).

Invalid inference: reversing an implication

If a theorem says differentiability implies continuity, continuity alone does not give differentiability. The converse requires a separate argument and is false in general: \(f(x)=|x|\) is continuous at \(0\) but not differentiable there.

Quantifiers

Definition: universal and existential claims

For a set \(S\) and predicate \(P(s)\),

\[ \forall s\in S: P(s) \]

means that \(P(s)\) holds for every \(s\in S\), while

\[ \exists s\in S: P(s) \]

means that at least one \(s\in S\) satisfies \(P(s)\).

Negating a quantified statement reverses the quantifier:

\[ \begin{aligned} \neg\bigl(\forall s\in S: P(s)\bigr) &\Leftrightarrow \exists s\in S: \neg P(s),\\ \neg\bigl(\exists s\in S: P(s)\bigr) &\Leftrightarrow \forall s\in S: \neg P(s). \end{aligned} \]

This rule is the engine behind many counterexamples. To refute a universal statement, one example suffices. To refute an existential statement, one must rule out every candidate.

Example: an assumption audit in miniature

Consider \(\forall x\in\mathbb R\;\exists y\in\mathbb R: y>x\). Given a fixed \(x\), choose \(y=x+1\). The order is essential. The reversed claim, \(\exists y\in\mathbb R\;\forall x\in\mathbb R: y>x\), would require a largest real number and is false.

Sets and set operations

Definition: membership, inclusion, and equality

Let \(S\) and \(T\) be sets. The notation \(s\in S\) means that \(s\) is an element of \(S\). We write

\[ S\subseteq T \quad\Longleftrightarrow\quad \forall s\in S: s\in T. \]

The sets are equal precisely when \(S\subseteq T\) and \(T\subseteq S\). The empty set, containing no elements, is written \(\varnothing\).

To prove \(S=T\), prove two inclusions. Each direction begins with an arbitrary element of one set and checks that it satisfies the membership rule of the other.

Example: equality by two inclusions

For any set \(S\), \(S\cap S=S\). If \(x\in S\cap S\), then \(x\in S\), so \(S\cap S\subseteq S\). Conversely, if \(x\in S\), then \(x\in S\) twice, hence \(x\in S\cap S\) and \(S\subseteq S\cap S\).

Definition: operations on sets

\[ \begin{aligned} S\setminus T &:= \{s\in S:s\notin T\},\\ S\cap T &:= \{s:s\in S\land s\in T\},\\ S\cup T &:= \{s:s\in S\lor s\in T\},\\ S\times T &:= \{(s,t):s\in S\land t\in T\}. \end{aligned} \]

For an integer \(n\geq 1\), \(S^n:=S\times\cdots\times S\) has \(n\) factors.

The colon in \(\{s\in S:P(s)\}\) means “such that.” A useful first question is always: what is the ambient set?

Counterexample: omitting the ambient set

The descriptions \(\{x:x^2=1\}\) and \(\{x\in\mathbb R:x^2=1\}\) need not be the same. In \(\mathbb R\) both describe \(\{-1,1\}\), but the first description needs an ambient set before it determines a mathematical object.

Numbers, vectors, and coordinatewise order

We use \(\mathbb Z\) for integers, \(\mathbb N:=\{1,2,\ldots\}\) for natural numbers, \(\mathbb Q\) for rationals, \(\mathbb R\) for reals, and \(\mathbb C\) for complex numbers. The scalar field is denoted \(\mathbb F\) and, in this course, will usually be \(\mathbb R\) or \(\mathbb C\).

Definition: coordinatewise order

For \(x=(x_1,\ldots,x_n)^\top\) and \(y=(y_1,\ldots,y_n)^\top\) in \(\mathbb R^n\), \(x\geq y\) means that, for every \(i\in\{1,\ldots,n\}\),

\[ x_i\geq y_i. \]

Similarly, \(x>y\) means \(x_i>y_i\) for every coordinate \(i\). If \(S\subseteq\mathbb R\), then \(S_+:=\{s\in S:s\geq0\}\) and \(S_{++}:=\{s\in S:s>0\}\).

Coordinatewise order is only a partial order when \(n>1\). For example, \((1,0)^\top\) and \((0,1)^\top\) are incomparable: neither is coordinatewise at least as large as the other.

Common trap: \(x>y\) is not a norm comparison

The statement \(x>y\) means every coordinate of \(x\) exceeds the matching coordinate of \(y\). It does not mean \(\lVert x\rVert>\lVert y\rVert\). Indeed, \((2,0)^\top\not>(1,1)^\top\), even though its Euclidean norm is larger.

Functions: domain, codomain, image, and preimage

Definition: function and image

A function \(f:X\to Y\) assigns exactly one element \(f(x)\in Y\) to every input \(x\in X\). Here \(X\) is the domain and \(Y\) is the codomain. For \(A\subseteq X\),

\[ f(A):=\{f(x):x\in A\}\subseteq Y. \]

The image of the whole domain is \(f(X)\).

The codomain is declared as part of the function. The image is earned by calculation. This distinction becomes central for linear maps, where surjectivity means \(f(X)=Y\).

Definition: preimage

For \(B\subseteq Y\), the preimage of \(B\) is

\[ f^{-1}(B):=\{x\in X:f(x)\in B\}. \]

The notation \(f^{-1}(B)\) denotes a set even when \(f\) has no inverse function.

Example: image versus preimage

Let \(f:\mathbb R\to\mathbb R\) be \(f(x)=x^2\). For \(A=\{-2,1\}\), \(f(A)=\{1,4\}\). For \(B=\{4\}\), \(f^{-1}(B)=\{-2,2\}\). The map has no inverse function on all of \(\mathbb R\), but its preimage is still well-defined.

Proof blueprint: translate symbols into a witness

When a proof begins with a universal claim, take an arbitrary object satisfying the premise. When it has an existential conclusion, construct a named witness. When it aims to refute a claim, write the negation with its quantifiers first.

Assumption audit

For every function statement, check four items: the domain \(X\), the codomain \(Y\), the subset to which the operation applies, and whether the claim concerns an image or a preimage. A formula alone does not specify a function completely.

Exit tickets

  1. Write the negation of \(\forall x\in\mathbb R\;\exists y\in\mathbb R:x+y=0\).
  2. Give a two-inclusion proof that \(S\setminus(S\cap T)=S\setminus T\).
  3. For \(f(x)=x^2\) from \(\mathbb R\) to \(\mathbb R\), distinguish the codomain, image, and \(f^{-1}([0,1])\).
  1. The negation is \(\exists x\in\mathbb R\;\forall y\in\mathbb R:x+y\ne0\).

  2. An element \(s\) belongs to \(S\setminus(S\cap T)\) exactly when \(s\in S\) and it is not true that both \(s\in S\) and \(s\in T\). Since \(s\in S\) already holds, this is equivalent to \(s\in S\) and \(s\notin T\), namely \(s\in S\setminus T\).

  3. The codomain is \(\mathbb R\); the image is \([0,\infty)\); and \(f^{-1}([0,1])=[-1,1]\).

Mastery check

You should now be able to define a subset, image, and preimage; expand a statement with \(\forall\) and \(\exists\) into ordinary language; prove a set equality by two inclusions; and identify an invalid reversed implication. If any of these requires rereading, return to the relevant definition before starting linear algebra.

Back to top