Search the corpus

    Logic and proof

    The negation of \(\forall x\,\exists y\,P(x,y)\) is \(\exists x\,\forall y\,\neg P(x,y)\). An implication \(P\Rightarrow Q\) is equivalent to its contrapositive \(\neg Q\Rightarrow\neg P\), and in general not to its converse \(Q\Rightarrow P\). A map \(f\colon X\to Y\) is injective if \(f(x)=f(x')\) implies \(x=x'\) for all \(x,x'\in X\), and surjective if for every \(y\in Y\) there exists \(x\in X\) with \(f(x)=y\). An equivalence relation on a set \(X\) determines the partition of \(X\) into its equivalence classes, and every partition of \(X\) arises from exactly one equivalence relation. Induction proves \(P(n)\) for all integers \(n\ge n_0\) from \(P(n_0)\) and the implications \(P(n)\Rightarrow P(n+1)\); the problems apply it to summation identities, divisibility statements, and counting formulas such as \(\binom{n}{k}=\binom{n-1}{k-1}+\binom{n-1}{k}\).

    Evaluating and negating compound logical statements

    1. Suppose \(A\) and \(B\) are false statements. Is the statement \[(A \implies B) \implies (A \vee B)\] true or false? (“\(\vee\)” denotes “or.”)

    2. Give the negation of the statement

    If all blockoids are split and some blockoid is nontrivial, then there is a short blockoid.

    Solution

    Part (a).

    <1>1. \(A \implies B\) is true.

    \(A\) is false, and a false antecedent makes an implication true.

    <1>2. \(A \vee B\) is false.

    both \(A\) and \(B\) are false.

    <1>3. Hence \((A \implies B) \implies (A \vee B)\) is \(\text{true} \implies \text{false}\), which is false.

    an implication with a true antecedent and false consequent is false.

    <1>4. Q.E.D.

    <1>3.

    Part (b).

    <1>1. The statement is of the form \(P \implies Q\), where \(P = (\text{all blockoids are split}) \wedge (\text{some blockoid is nontrivial})\) and \(Q = (\text{there is a short blockoid})\).

    parse the statement.

    <1>2. The negation of \(P \implies Q\) is \(P \wedge \neg Q\).

    \(\neg(P \implies Q) \equiv P \wedge \neg Q\).

    <1>3. Hence the negation is: “All blockoids are split, and some blockoid is nontrivial, and there is no short blockoid.”

    <1>1 and <1>2.

    <1>4. Q.E.D.

    <1>3.

    $\forall x(P\Rightarrow Q)$ implies $(\forall x\,P)\Rightarrow(\forall x\,Q)$, but not conversely

    Let \(P(x)\) and \(Q(x)\) be open sentences containing the variable \(x\), and consider the following statements. \[A: \forall x, (P(x) \Rightarrow Q(x)) \quad \text{and} \quad B: (\forall x, P(x)) \Rightarrow (\forall x, Q(x))\]

    1. Prove that \(A \Rightarrow B\).
    2. Give an example of open sentences \(P(x)\) and \(Q(x)\) to show that \(B \Rightarrow A\) need not be true.
    Solution

    <1>1. Assume \(A\), and suppose \(\forall x\,P(x)\).

    <1>2. Then \(\forall x\,Q(x)\).

    Let \(x\) be arbitrary. From \(\forall x\,P(x)\) we have \(P(x)\). From \(A\) we have \(P(x)\Rightarrow Q(x)\). Therefore \(Q(x)\). Since \(x\) was arbitrary, \(\forall x\,Q(x)\).

    <1>3. Hence \(A\Rightarrow B\).

    Under the assumption \(A\), <1>1–<1>2 prove the implication \[ (\forall x\,P(x))\Rightarrow(\forall x\,Q(x)), \] which is exactly \(B\).

    <1>4. The converse can fail. Take the universe to be \(\mathbb Z\), and define \[ P(x): x=0, \qquad Q(x): x=1. \]

    <1>5. For these predicates, \(B\) is true but \(A\) is false.

    The antecedent \(\forall x\,P(x)\) of \(B\) is false, so \(B\) is true. But at \(x=0\), the statement \(P(0)\) is true and \(Q(0)\) is false; therefore \(P(0)\Rightarrow Q(0)\) is false, so \(A\) is false.

    Negation of uniform convergence and a pointwise but nonuniform example

    A sequence \(\{f_n:\mathbb R\to\mathbb R\}_{n=1}^{\infty}\) converges uniformly to \(f:\mathbb R\to\mathbb R\) if, for every \(\varepsilon>0\), there is a positive integer \(N\) such that \[ n>N\quad\Longrightarrow\quad |f_n(x)-f(x)|<\varepsilon \] for all \(x\in\mathbb R\).

    1. What must one check to show that a sequence does not converge uniformly?

    2. Give an example such that \(f_n(x)\) converges to \(f(x)\) for every \(x\in\mathbb R\), but the sequence does not converge uniformly.

    Solution

    The negation of uniform convergence is \[ \exists\varepsilon_0>0\ \forall N\in\mathbb N\ \exists n>N\ \exists x\in\mathbb R: |f_n(x)-f(x)|\geq\varepsilon_0. \]

    For example, let \(f_n(x)=x/n\) and \(f(x)=0\). For each fixed \(x\), one has \(x/n\to0\). The convergence is not uniform. Take \(\varepsilon_0=1\). For every \(N\), choose \(n=N+1\) and \(x=n\). Then \[ |f_n(x)-f(x)|=1. \]

    Contrapositive and converse of: a local minimum at $a$ implies $f'(a)=0$ or nondifferentiability at $a$

    Let \(f:\mathbb{R}\to\mathbb{R}\) be a function and let \(a\) be a real number. Let \(S\) be the statement “If \(f\) has a local minimum at \(a\), then \(f'(a)=0\) or \(f\) is not differentiable at \(a\)”.

    1. Write the contrapositive of \(S\).
    2. Write the converse of \(S\).
    3. Which of the statements in (a) and (b) are true? If either statement is false, give a counterexample.
    Solution

    Write \[ P:\ f\text{ has a local minimum at }a, \qquad Q:\ f'(a)=0\text{ or }f\text{ is not differentiable at }a. \] The contrapositive is \(\neg Q\Rightarrow\neg P\), namely:

    If \(f\) is differentiable at \(a\) and \(f'(a)\ne0\), then \(f\) does not have a local minimum at \(a\).

    This is true because it is logically equivalent to the original statement \(S\).

    The converse is \(Q\Rightarrow P\), namely:

    If \(f'(a)=0\) or \(f\) is not differentiable at \(a\), then \(f\) has a local minimum at \(a\).

    This is false. For example, \(f(x)=x^3\) at \(a=0\) has \(f'(0)=0\) but no local minimum there. Also \(f(x)=x^{1/3}\) is not differentiable at \(0\) and has no local minimum there.

    Contrapositive and negation of "if all birds swim or some fish fly, then no whales walk"

    Write the following statement in symbolic form, and then give (in symbolic form and in English) its contrapositive and its negation:

    “If all birds can swim or some fish can fly, then no whales can walk”

    Solution

    <1>1. Let the universe be all animals, and let \[ B(x),S(x),F(x),Y(x),W(x),K(x) \] mean respectively that \(x\) is a bird, can swim, is a fish, can fly, is a whale, and can walk.

    <1>2. The original statement is \[ \left[(\forall x\,(B(x)\Rightarrow S(x)))\lor(\exists x\,(F(x)\land Y(x)))\right] \Rightarrow \left[\forall x\,(W(x)\Rightarrow \neg K(x))\right]. \]

    <1>3. Its contrapositive is \[ \left[\exists x\,(W(x)\land K(x))\right] \Rightarrow \left[(\exists x\,(B(x)\land\neg S(x)))\land (\forall x\,(F(x)\Rightarrow\neg Y(x)))\right]. \]

    Write the original implication as \((A\lor C)\Rightarrow D\). Its contrapositive is \[ \neg D\Rightarrow\neg(A\lor C), \] and De Morgan’s law gives \(\neg(A\lor C)=\neg A\land\neg C\). Moreover, \[ \neg\forall x(B(x)\Rightarrow S(x)) \equiv \exists x(B(x)\land\neg S(x)), \] \[ \neg\exists x(F(x)\land Y(x)) \equiv \forall x(F(x)\Rightarrow\neg Y(x)), \] and \[ \neg\forall x(W(x)\Rightarrow\neg K(x)) \equiv \exists x(W(x)\land K(x)). \]

    <1>4. In English, the contrapositive is: “If some whale can walk, then some bird cannot swim and no fish can fly.”

    <1>5. The negation of the original statement is \[ \left[(\forall x\,(B(x)\Rightarrow S(x)))\lor(\exists x\,(F(x)\land Y(x)))\right] \land \left[\exists x\,(W(x)\land K(x))\right]. \]

    The negation of an implication \(P\Rightarrow Q\) is \(P\land\neg Q\). Apply this with the antecedent and consequent from <1>2, and use the final equivalence in <1>3.

    <1>6. In English, the negation is: “All birds can swim or some fish can fly, and some whale can walk.”

    Negation of two quantified statements

    Negate the following statements without using the word “not.”

    1. For every real number \(x\), there is a real number \(y\) such that \(|x-y|\geq2017\).

    2. The function \(f:\mathbb R\to\mathbb R\) is continuous.

    Solution

    The first negation is: \[ \text{There is an }x\in\mathbb R\text{ such that }|x-y|<2017 \text{ for every }y\in\mathbb R. \]

    Using the pointwise definition of continuity on \(\mathbb R\), the second negation is: \[ \exists x\in\mathbb R\ \exists\varepsilon>0\ \forall\delta>0\ \exists y\in\mathbb R: |x-y|<\delta\ \text{ and }\ |f(x)-f(y)|\geq\varepsilon. \]

    Smooth negations of a quantified inequality, the extreme value theorem, and a biconditional

    Write the negations of these sentences in as “smooth” a way as possible. (In particular, you may not simply append “It is not the case that …”. Also, you should make explicit any “hidden” quantifiers.)

    1. There is a real number \(x\) such that for every real number \(y\), \(|x-y|>1\).
    2. A real-valued function that is continuous on a closed interval attains a minimum value on that interval.
    3. \(3n+1\) is even if and only if \(n^2+4\) is prime.
    Solution
    1. The negation is: \[ \text{For every real }x\text{ there exists a real }y\text{ such that }|x-y|\le1. \]

    2. Making the hidden quantifiers explicit, the original assertion says that for every closed interval \([a,b]\) and every continuous \(f:[a,b]\to\mathbb R\), there exists \(x\in[a,b]\) such that \(f(x)\le f(y)\) for every \(y\in[a,b]\). Its negation is therefore: \[ \text{There exist }a\le b\text{ and continuous }f:[a,b]\to\mathbb R\text{ such that for every }x\in[a,b] \] \[ \text{there exists }y\in[a,b]\text{ with }f(y)<f(x). \]

    3. Interpreting \(n\) as an arbitrary integer, the negation of the biconditional is that there exists an integer \(n\) for which exactly one side holds; equivalently, \[ \text{either }3n+1\text{ is even and }n^2+4\text{ is composite,} \] or \[ 3n+1\text{ is odd and }n^2+4\text{ is prime.} \]

    Negation of a mixed-quantifier statement and a flawed inductive characterization

    1. Suppose that for each positive integer \(m\), we have a set \(S_m\) of real numbers, a real number \(\alpha_m\), and a real function \(f_m\). Formulate the negation of this statement: “There exists a positive integer \(m\) such that for every \(x \in S_m\), \(x \ge \alpha_m\) and \(f_m(x) = 0\).”
    2. The following statement is not valid: “For any positive integer \(m\), if \(T\) is a set of positive integers such that (1) \(m \in T\) and (2) \(n \in T\) implies \(n+1 \in T\), then \(T = \{\text{positive integers } n : n \ge m\}\).” Explain and correct the flaw.
    Solution

    For part (a), the statement is \[ \exists m\in\mathbb Z_{>0}\;\forall x\in S_m, \bigl(x\ge \alpha_m\ \text{and}\ f_m(x)=0\bigr). \] Negating successively gives \[ \forall m\in\mathbb Z_{>0}\;\exists x\in S_m \quad\text{such that}\quad x<\alpha_m\ \text{or}\ f_m(x)\ne0. \]

    For part (b), the flaw is that conditions (1) and (2) force \(T\) to contain every integer \(n\ge m\), but they do not forbid \(T\) from also containing positive integers smaller than \(m\). For example, with \(m=3\), the set of all positive integers satisfies (1) and (2), but is not \(\{n:n\ge3\}\).

    The correct conclusion from (1) and (2) is \[ \{n\in\mathbb Z_{>0}:n\ge m\}\subseteq T. \] Indeed, induction on \(r\ge0\) gives \(m+r\in T\). To obtain equality, add the hypothesis \[ T\subseteq\{n\in\mathbb Z_{>0}:n\ge m\}. \] Then the two inclusions give \[ T=\{n\in\mathbb Z_{>0}:n\ge m\}. \]

    Negation, converse, and contrapositive of "if there exists a purple apple, then all lemons are pink"

    Consider the statement:

    “If there exists a purple apple, then all lemons are pink.”

    1. Give the negation, the converse, and the contrapositive of the statement above.
    2. Assuming the statement is true, which (ones, if any) of the statements formulated in part (A) must necessarily be true?
    Solution

    Let \(P\) = “there exists a purple apple” and \(Q\) = “all lemons are pink”. The statement is \(P \Rightarrow Q\).

    Part (a).

    <1>1. Negation: \(\neg(P \Rightarrow Q) \equiv P \wedge \neg Q\).

    the only way an implication is false is when the hypothesis holds and the conclusion fails.

    <1>2. Hence the negation is: “There exists a purple apple, and some lemon is not pink.”

    <1>1, translating \(\neg Q\) as “not all lemons are pink”.

    <1>3. Converse: \(Q \Rightarrow P\).

    the converse swaps hypothesis and conclusion.

    <1>4. Hence the converse is: “If all lemons are pink, then there exists a purple apple.”

    <1>3.

    <1>5. Contrapositive: \(\neg Q \Rightarrow \neg P\).

    the contrapositive negates and swaps.

    <1>6. Hence the contrapositive is: “If some lemon is not pink, then there is no purple apple.”

    <1>5.

    Part (b).

    <1>1. The contrapositive is logically equivalent to the original statement.

    \(P \Rightarrow Q \equiv \neg Q \Rightarrow \neg P\).

    <1>2. Hence the contrapositive must be true.

    <1>1 and the assumption that the statement is true.

    <1>3. The converse is not necessarily true.

    \(Q \Rightarrow P\) is not equivalent to \(P \Rightarrow Q\) (e.g. \(P\) false, \(Q\) true makes \(P \Rightarrow Q\) true but \(Q \Rightarrow P\) false).

    <1>4. The negation is false.

    the negation is the opposite of the true statement.

    <1>5. Q.E.D.

    <1>2, <1>3, <1>4.

    True-or-false: constructible roots, finite-field extensions, and Galois composita

    Indicate whether each of the following if-then statements is true, and give a brief explanation to support your answer. If the statement is false, and there is a reasonable addition to the hypotheses that would make it true, please indicate that as well.

    1. If \(f\) is an irreducible 4th degree polynomial with rational coefficients then the roots of \(f\) are constructible numbers.

    2. If \(g\) is an irreducible 6th degree polynomial with rational coefficients then the roots of \(g\) are constructible numbers.

    3. If \(E\) and \(F\) are finite fields and \(F\subset E\) then \(E/F\) is Galois.

    4. If \(E/F\) and \(K/F\) are both Galois extensions then \(EK/F\) is a Galois extension.

    5. If \(E\) and \(F\) are finite fields and \(|F|\) divides \(|E|\) then \(E\) has a subfield isomorphic to \(F\).

    Solution

    The answers are false, false, true, true, false. We use the quadratic-tower criterion for straightedge-and-compass constructibility [@DF04]. In particular, a constructible algebraic number lies in a finite tower of quadratic extensions of \(\mathbf Q\), and its degree divides \(2^m\) for some \(m\). Finitely many constructible numbers lie in a common such tower: adjoin their quadratic generators successively, noting that each new extension has degree at most \(2\). Their sums and products are therefore constructible as well.

    <1>1. Part (a) is false. An explicit counterexample is \[ f(x)=x^4-4x^2+x+1. \]

    <2>1. Modulo \(2\), this polynomial becomes \(x^4+x+1\). It has no root in \(\mathbf F_2\). The only monic irreducible quadratic over \(\mathbf F_2\) is \(x^2+x+1\), and modulo that quadratic one has \(x^3=1\), so \(x^4+x+1\equiv1\). Thus the quartic has neither a linear nor a quadratic factor over \(\mathbf F_2\), proving irreducibility there and hence over \(\mathbf Q\) by Gauss’s lemma [@DF04]. It also has four real roots: its values at \(-3,-2,0,1,2\) are respectively \(43,-1,1,-1,3\), giving a root in each of the four intervening intervals.

    <2>2. Write its roots as \(\alpha_1,\ldots,\alpha_4\) and put \[ \beta_1=\alpha_1\alpha_2+\alpha_3\alpha_4,\quad \beta_2=\alpha_1\alpha_3+\alpha_2\alpha_4,\quad \beta_3=\alpha_1\alpha_4+\alpha_2\alpha_3. \] If \(e_i\) are the elementary symmetric functions of the \(\alpha_j\), Vieta’s identities give \((e_1,e_2,e_3,e_4)=(0,-4,-1,1)\). Expanding the three displayed expressions gives \[ \begin{aligned} \sum_i\beta_i&=e_2=-4,\\ \sum_{i<j}\beta_i\beta_j&=e_1e_3-4e_4=-4,\\ \beta_1\beta_2\beta_3&=e_3^2+e_1^2e_4-4e_2e_4=17. \end{aligned} \] Consequently each \(\beta_i\) is a root of \[ h(y)=y^3+4y^2-4y-17. \] Modulo \(3\) this is \(y^3+y^2+2y+1\), whose values at \(0,1,2\) are \(1,2,2\). A cubic without a root over its coefficient field is irreducible. Hence \(h\) is irreducible over \(\mathbf Q\), and each \(\beta_i\) has degree \(3\).

    <2>3. If all four \(\alpha_i\) were constructible, their products and sums would make the \(\beta_i\) constructible. Their degree \(3\) contradicts the quadratic-tower criterion. Thus an irreducible quartic need not have constructible roots, even when all its roots are real.

    A sufficient additional hypothesis is that the quartic is biquadratic: \(f(x)=a x^4+b x^2+c\) with \(a,b,c\in\mathbf Q\) and \(a\ne0\). Then every root is obtained by the two successive square-root operations \[ x=\pm\sqrt{\frac{-b\pm\sqrt{b^2-4ac}}{2a}}, \] so all roots are constructible (with complex numbers interpreted as points in the plane).

    <1>2. Part (b) is false, and in fact no root of an irreducible sextic over \(\mathbf Q\) is constructible.

    For every root \(\alpha\), irreducibility gives \([\mathbf Q(\alpha):\mathbf Q]=6\). If \(\alpha\) lay in a quadratic tower of total degree \(2^m\), the tower law would give \(6\mid2^m\), which is impossible. Thus no additional hypothesis compatible with irreducibility and degree \(6\) makes this assertion true.

    <1>3. Part (c) is true.

    Let \(|F|=q\) and \([E:F]=d\), so \(|E|=q^d\). Every element of \(E\) satisfies \(x^{q^d}=x\): for nonzero elements this follows from the order \(q^d-1\) of the multiplicative group, and it also holds at zero. Hence \(E\) is the splitting field over \(F\) of \(x^{q^d}-x\). The derivative of this polynomial is \(-1\), so its roots are distinct. Thus the extension is normal, and the minimal polynomial of every element divides a separable polynomial and is itself separable. Therefore \(E/F\) is Galois.

    <1>4. Part (d) is true, with \(E\) and \(K\) viewed in a common algebraic closure \(\overline F\).

    The compositum \(EK\) is algebraic and separable over \(F\). Indeed, each of its elements belongs to a field generated by finitely many separable elements of \(E\cup K\), and a finite extension generated by separable elements is separable [@DF04]. Every \(F\)-embedding \(\sigma:EK\to\overline F\) restricts to embeddings of \(E\) and \(K\). Their normality gives \(\sigma(E)=E\) and \(\sigma(K)=K\), so \[ \sigma(EK)=\sigma(E)\sigma(K)=EK. \] Thus \(EK/F\) is normal and separable, hence Galois. The same argument applies when \(E/F\) and \(K/F\) have infinite degree.

    <1>5. Part (e) is false. For \(|F|=p^a\) and \(|E|=p^b\), the field \(E\) has a subfield isomorphic to \(F\) if and only if \(a\mid b\).

    <2>1. Take \(F=\mathbf F_4\) and \(E=\mathbf F_8\). For explicit models use \(\mathbf F_2[x]/(x^2+x+1)\) and \(\mathbf F_2[y]/(y^3+y+1)\); the polynomials have no root in \(\mathbf F_2\) and are therefore irreducible in degrees \(2\) and \(3\). Although \(4\mid8\), a field embedding \(F\to E\) would embed the multiplicative group of order \(3\) into one of order \(7\), contradicting Lagrange’s theorem.

    <2>2. More generally, an embedding of \(F\) into \(E\) identifies their prime fields. The tower law then gives \[ b=[E:\mathbf F_p]=[E:F]\,[F:\mathbf F_p]=[E:F]a, \] so \(a\mid b\) is necessary.

    Conversely, suppose \(b=ar\). In characteristic \(p\) the identity \[ X^{p^{ar}}-X=\sum_{j=0}^{r-1}(X^{p^a}-X)^{p^{aj}} \] shows that \(X^{p^a}-X\) divides \(X^{p^b}-X\). The latter splits into distinct linear factors over \(E\), so the former has exactly \(p^a\) distinct roots in \(E\). Its root set is closed under addition, subtraction, multiplication, and inverses of nonzero elements, since it is the fixed set of the \(p^a\)-power Frobenius map. It is therefore a subfield of order \(p^a\). It is isomorphic to \(F\): both are splitting fields of \(X^{p^a}-X\) over \(\mathbf F_p\), and splitting fields are unique up to an isomorphism fixing the coefficient field [@DF04]. Thus the additional exponent-divisibility hypothesis is both necessary and sufficient.

    Negations of statements about odd integers and a sequential limit

    Negate each of the following statements in the most informative way possible (i.e., without using the words “no” or “not”).

    1. There is an integer \(x\) so that \(x + y\) is odd for each integer \(y\).
    2. If \(x\) is an odd integer, then \(xy\) is odd for every integer \(y\).
    3. Given \(\varepsilon > 0\), there is \(N \in \mathbb{N}\) so that whenever \(n > N\), we have \(\left| \dfrac{2+n}{1+n} - 1 \right| < \varepsilon\).
    Solution
    1. The negation is: \[ \text{For every integer }x\text{ there is an integer }y\text{ such that }x+y\text{ is even.} \]

    2. The negation is: \[ \text{There is an odd integer }x\text{ and an integer }y\text{ such that }xy\text{ is even.} \]

    3. The negation is: \[ \text{There exists }\varepsilon>0\text{ such that for every }N\in\mathbb N \text{ there is }n>N\text{ with } \left|\frac{n+2}{n+1}-1\right|\ge\varepsilon. \] These follow by replacing each quantifier by its opposite and negating the final predicate.

    Composition of injective maps is injective

    Suppose \(f\) and \(g\) are injective maps of a set \(S\) into itself. Show that the composite function \(f\circ g\) is also injective.

    Solution
    1. Lemma: \(f\) is injective \(\iff f\) has a left inverse \(\inverseof{f}\) satisfying \(\inverseof{f} f(a) = a\).

      Suppose \(f,g: A \to A\) are injective and \(x,y \in A\), we want to show that \((f\circ g)(x) = (f\circ g)(y) \implies x = y\). So suppose \(f(g(x)) = f(g(y))\). Since \(f\) is injective, \(f\) has a left inverse, so \(g(x) = g(y)\), and since \(g\) is injective \(x = y\). \(\qed\)

    Solution

    Goal: Prove that if \(A\) is a set and \(f, g: A \to A\) are injective functions, then their composition \(f \circ g: A \to A\) is injective.

    <1>1. Definition: A function \(h: A \to A\) is injective if for all \(x, y \in A\), \(h(x) = h(y) \implies x = y\).

    By the standard definition of injectivity.

    <1>2. Assume \(f: A \to A\) and \(g: A \to A\) are injective functions. Let \(x, y \in A\) and assume \((f \circ g)(x) = (f \circ g)(y)\).

    By setting up the hypothesis of the implication in <1>1 for \(h = f \circ g\).

    <1>3. \(f(g(x)) = f(g(y))\).

    By definition of function composition, \((f \circ g)(x) = f(g(x))\) and \((f \circ g)(y) = f(g(y))\), so this follows from <1>2.

    <1>4. \(g(x) = g(y)\).

    By <1>2, \(f\) is injective.

    Applying the definition of injectivity to the elements \(g(x), g(y) \in A\) with \(f(g(x)) = f(g(y))\) from <1>3 yields \(g(x) = g(y)\).

    <1>5. \(x = y\).

    By <1>2, \(g\) is injective.

    Applying the definition of injectivity to \(x, y \in A\) with \(g(x) = g(y)\) from <1>4 yields \(x = y\).

    <1>6. Conclusion: \(f \circ g\) is injective.

    We showed in <1>2–<1>5 that for all \(x, y \in A\), \((f \circ g)(x) = (f \circ g)(y) \implies x = y\).

    By <1>1, \(f \circ g\) is injective. Q.E.D.

    A left inverse forces $f$ injective and $g$ surjective, but neither need be bijective

    Let \(X\) and \(Y\) be sets, and let \(f:X\to Y\) and \(g:Y\to X\) satisfy \[ g(f(x))=x \] for every \(x\in X\).

    1. Show that \(f\) is injective.

    2. Show that \(g\) is surjective.

    3. Give an example in which neither \(f\) nor \(g\) is bijective.

    Solution

    If \(f(x_1)=f(x_2)\), then applying \(g\) gives \[ x_1=g(f(x_1))=g(f(x_2))=x_2. \] Thus \(f\) is injective.

    For each \(x\in X\), the element \(f(x)\in Y\) satisfies \(g(f(x))=x\). Thus \(g\) is surjective.

    Let \(X=\{1\}\), \(Y=\{1,2\}\), \(f(1)=1\), and \(g(1)=g(2)=1\). Then \(g\circ f=\operatorname{id}_X\), while \(f\) is not surjective and \(g\) is not injective.

    $f^{-1}(f(S))=S$ for all $S$ iff $f$ is injective

    Let \(f:X\to Y\) be a map of sets. Give, with proof, necessary and sufficient conditions for \[ f^{-1}(f(S))=S \] for every subset \(S\subseteq X\).

    Solution

    The condition is that \(f\) is injective.

    For every map and every \(S\subseteq X\), one has \(S\subseteq f^{-1}(f(S))\). If \(f\) is injective and \(x\in f^{-1}(f(S))\), then \(f(x)=f(s)\) for some \(s\in S\). Injectivity gives \(x=s\), so \(x\in S\). Thus equality holds.

    Conversely, suppose the equality holds for every \(S\subseteq X\). If \(f(a)=f(b)\), then \[ b\in f^{-1}(f(\{a\}))=\{a\}, \] so \(b=a\). Hence \(f\) is injective.

    Equivalence relation $x\sim y$ iff $x^2-4x=y^2-4y$

    Take \(A = \{0, 1, 2, 3, 4, 5\}\). Define a relation \(R\) on \(A\) by \(x\, R\, y\) if and only if \(x^2 - 4x = y^2 - 4y\).

    1. Prove that \(R\) is an equivalence relation.

    2. Exhibit the partition of \(A\) whose members are the equivalence classes of \(R\).

    Solution

    We need to show that \(R\) is reflexive, transitive, and symmetric. 1. Reflexive: this would say that \(x\sim x \iff x^2-4x = x^2-4x\), which is true. 2. Transitive: suppose \(x\sim y\) and \(y\sim z\), we want to show \(x\sim z\). But we have \[ x^2 - 4x = y^2-4y ~\&~ y^2-4y = z^2-4z \implies x^2-4x = y^2-4y = z^2-4z \] 1. We want to show \(x\sim y \implies y \sim x\), which follows because \(x^2-4x = y^2-4y \iff y^2-4y = x^2-4x\). 2. The equivalence classes: \[\begin{align*} x^2-4x &= 0: &\theset{0, 4}\\ x^2-4x &= -3: &\theset{1,3} \\ x^2-4x &= -4: &\theset{2} \\ x^2-4x &= 5: &\theset{5} \end{align*}\]

    Composition of surjections is surjective, but the converse fails

    Suppose \(A\), \(B\), and \(C\) are sets, and \(f: B \to C\) and \(g: A \to B\) are functions.

    1. Prove that if \(f\) and \(g\) are surjective (onto), then so is \(f \circ g\).

    2. Prove or give a counterexample: If \(g\) is not surjective, then \(f \circ g\) is not surjective.

    Solution

    If \(f\) and \(g\) are surjective and \(c\in C\), choose \(b\in B\) with \(f(b)=c\), then choose \(a\in A\) with \(g(a)=b\). Hence \((f\circ g)(a)=c\), so \(f\circ g\) is surjective.

    The converse claim is false. Let \[ A=\{0\},\qquad B=\{0,1\},\qquad C=\{0\}, \] let \(g(0)=0\), and let \(f\) be the unique map \(B\to C\). Then \(g\) is not surjective, while \(f\circ g:A\to C\) is surjective.

    The identity $\sum_{m=k}^n\binom{m}{k}=\binom{n+1}{k+1}$

    Let \(k\) be a nonnegative integer. Prove by mathematical induction that for all \(n \geq k\) we have \[\sum_{m=k}^{n} \binom{m}{k} = \binom{n+1}{k+1}.\]

    Solution

    For \(n=k\), \[ \sum_{m=k}^{k}\binom{m}{k}=\binom{k}{k}=1=\binom{k+1}{k+1}. \] Assume \[ \sum_{m=k}^{n}\binom{m}{k}=\binom{n+1}{k+1}. \] Then Pascal’s identity gives \[ \sum_{m=k}^{n+1}\binom{m}{k} =\binom{n+1}{k+1}+\binom{n+1}{k} =\binom{n+2}{k+1}. \] Thus the identity holds for all \(n\ge k\) by induction.

    The binomial theorem, $(x+y)^5\equiv x^5+y^5\pmod{5}$, and $(x+y)^{5^n}\equiv x^{5^n}+y^{5^n}\pmod{5}$

    1. State the binomial theorem.
    2. Prove that \((x+y)^5 \equiv x^5 + y^5 \pmod 5\).
    3. Prove by mathematical induction that \((x+y)^{5^n} \equiv x^{5^n} + y^{5^n} \pmod 5\) for every \(n \in \mathbb{N}\).
    Solution

    The binomial theorem states \[ (x+y)^m=\sum_{j=0}^m\binom mj x^{m-j}y^j. \] For \(m=5\), each intermediate binomial coefficient \(\binom5j\), \(1\le j\le4\), is divisible by \(5\). Hence \[ (x+y)^5\equiv x^5+y^5\pmod5. \]

    We prove the final congruence by induction on \(n\). The case \(n=1\) is the preceding identity. If \[ (x+y)^{5^n}\equiv x^{5^n}+y^{5^n}\pmod5, \] then raising both sides to the fifth power preserves congruence, and applying the case \(m=5\) with \(X=x^{5^n}\) and \(Y=y^{5^n}\) gives \[ (x+y)^{5^{n+1}} \equiv (x^{5^n}+y^{5^n})^5 \equiv x^{5^{n+1}}+y^{5^{n+1}}\pmod5. \] Thus the claim holds for every \(n\ge1\).

    Consecutive Fibonacci numbers are relatively prime

    Recall that the Fibonacci numbers are defined by \(F_0 = 1, F_1 = 1\), and then \[F_n = F_{n-1} + F_{n-2} \quad \text{for integers } n \geq 2.\]

    Prove that any two successive Fibonacci numbers \(F_n, F_{n+1}\) are relatively prime.

    Solution

    <1>1. For every \(n\ge1\), \[ \gcd(F_{n+1},F_n)=\gcd(F_n,F_{n-1}). \]

    Since \(F_{n+1}=F_n+F_{n-1}\), \[ \gcd(F_{n+1},F_n) =\gcd(F_n+F_{n-1},F_n) =\gcd(F_{n-1},F_n), \] using the Euclidean identity \(\gcd(a+b,b)=\gcd(a,b)\).

    <1>2. Iterating <1>1 gives \[ \gcd(F_{n+1},F_n)=\gcd(F_1,F_0)=1 \] for every \(n\ge0\).

    For \(n=0\), this is immediate from \(F_0=F_1=1\). For \(n\ge1\), repeated application of <1>1 lowers the indices until the pair \((F_1,F_0)\) is reached.

    <1>3. Hence every two successive Fibonacci numbers are relatively prime.

    The sum of cubes of three consecutive positive integers is divisible by $9$

    Prove by induction that the sum of the cubes of 3 consecutive positive integers is divisible by 9.

    Solution

    For \(n\ge1\), let \[ S_n=n^3+(n+1)^3+(n+2)^3. \] We prove by induction that \(9\mid S_n\).

    For \(n=1\), \[ S_1=1+8+27=36, \] which is divisible by \(9\).

    Assume \(9\mid S_n\). Then \[ S_{n+1}-S_n=(n+3)^3-n^3 =9(n^2+3n+3), \] which is divisible by \(9\). Hence \(S_{n+1}\) is divisible by \(9\). By induction, the sum of the cubes of any three consecutive positive integers is divisible by \(9\).

    $\sum_{i=1}^n i^3 = \bigl(\sum_{i=1}^n i\bigr)^2$

    Use induction to prove that, for every positive integer \(n\), \[ 1^3+2^3+\cdots+n^3=(1+2+\cdots+n)^2. \]

    Solution
    1. Use the fact that \(\sum_{i=1}^n i = \frac 1 2 n(n+1)\), so \[\begin{align*} \sum_{i=1}^{n+1} i^3 &= \sum_{i=1}^{n} i^3 + (n+1)^3 \\ &= \left( \sum_{i=1}^{n} i \right)^2 + (n+1)^3 \\ &= \left( \frac 1 2 n(n+1) \right)^2 + (n+1)^3 \\ &= \frac 1 4 n^2(n+1)^2 + (n+1)(n+1)^2 \\ &= \frac 1 4 (n+1)^2 (n^2 + 4(n+1)) \\ &= \frac 1 4 (n+1)^2(n+2)^2 \\ &= \left( \frac 1 2 (n+1)(n+2)\right)^2 \\ &= \left( \sum_{i=1}^{n+1} i \right)^2. \qed \end{align*}\]

    $\int_0^\infty x^n e^{-x}\,dx = n!$

    Prove, for every nonnegative integer \(n\), that \[ \int_0^\infty x^ne^{-x}\,dx=n!. \]

    Solution

    For \(n=0\), \[ \int_0^\infty e^{-x}\,dx=1=0!. \]

    For the inductive step, integration by parts gives \[ \int_0^\infty x^ne^{-x} = -x^ne^{-x}\bigg\rvert_0^\infty - \int_0^\infty -nx^{n-1}e^{-x} = -x^ne^{-x}\bigg\rvert_0^\infty + n \int_0^\infty x^{n-1}e^{-x} \\ \equalsbecause{I.H.} -x^ne^{-x}\bigg\rvert_0^\infty + n (n-1)! \\ \equalsbecause{L.H.$\times n$}0 + n(n-1)! = n!. \qed \]

    $\sum_{k=0}^{n-1}a^k=(a^n-1)/(a-1)$

    Let \(a\) be a real number other than 1. Use induction to show that for each positive integer \(n\), \[\sum_{k=0}^{n-1} a^k = (a^n-1)/(a-1).\]

    Solution

    For \(n=1\), \[ \sum_{k=0}^{0}a^k=1=\frac{a-1}{a-1}. \] Assume \[ \sum_{k=0}^{n-1}a^k=\frac{a^n-1}{a-1}. \] Then \[ \sum_{k=0}^{n}a^k =\frac{a^n-1}{a-1}+a^n =\frac{a^{n+1}-1}{a-1}. \] Thus the formula holds for all positive integers \(n\) by induction.

    The sequence $a_{n+1}=\frac{a_n}{3}+5$ with $a_1=1$ is increasing, bounded by $10$, and converges to $\frac{15}{2}$

    Let \((a_n)\) be a sequence defined recursively by \(a_1 = 1\) and \(a_{n+1} = \frac{a_n}{3} + 5\) for \(n \geq 1\). Prove inductively that \(a_n \leq a_{n+1} \leq 10\) for each positive integer \(n\). Then explain why the sequence \((a_n)\) converges and find its limit.

    Solution

    Base case: for \(n=1\), we have \(a_1 = 1 \leq a_2 = \frac{16} 3 \leq 10.\) Suppose this holds for \(k < n\), then \[ a_{n-1} \leq a_n = \frac{a_{n-1}}{3} + 5 \implies 3a_{n-1} \leq a_{n-1} + 15 \implies a_{n-1} \leq \frac{15}{2} \]

    and thus we have \[ a_{n+1} = \frac{a_n}{3} + 5 = \frac{1}{3}(a_n + 15) \\ = \frac{1}{3}((\frac{a_{n-1}}{3} + 5) + 15) \\ = \frac{a_{n-1} + 60}{9} \\ \leq \frac{\frac{15}{2} + 60}{9} \\ = \frac{150}{18} \\ < \frac{180}{18} = 10, \]

    and \(a_{n+1} \leq 10\). Moreover, note that the relation \(a_{n+1} = \frac{a_n}{3} + 5\) can be rewritten as \[ a_n = 3a_{n+1} - 15, \\ a_{n-1} = 3a_n - 15. \] Using the inductive hypothesis \(a_{n-1} \leq a_n\), we can thus write \[ 3a_n - 15 = a_{n-1} \leq a_n = 3a_{n+1} - 15, \] from which we get \(3a_{n} - 15 \leq 3a_{n+1} - 15\) and thus \(a_{n} \leq a_{n+1}\).

    To compute \(\lim_{n\to\infty}a_n\), perhaps there are easier ways, but we can just use generating functions. Note that the limit exists by the Monotone Convergence Theorem. Let \(A(x) = \sum_{n=0}^\infty a_n x^n\) where \(a_0 = 0\). Then applying the magic sauce, we have \[\begin{align*} a_n = \frac{1}{3}a_{n-1} + 5 &\implies \sum_{n=1}^\infty a_nx^n = \frac{1}{3}\sum_{n=1}^\infty a_{n-1}x^n + 5\sum_{n=1}^\infty x^n \\ &\implies A(x) - a_0 = \frac 1 3 xA(x) + 5\left( \frac 1 {1-x} - 1\right) \\ &\implies A(x)\left(1 - \frac x 3\right) = 5\left( \frac x {1-x}\right) \\ &\implies A(x) = 15\left(\frac 1 {3-x} \right)\left(\frac x {1-x} \right) \\ &\implies A(x) = \frac{15x}{(3-x)(1-x)} \\ &\implies A(x) = \frac{-\frac{45}{2}}{3-x} + \frac{\frac{15}{2}}{1-x} \\ &\implies A(x) = \frac 3 2 \left(-5 \left( \frac{1}{1-\frac x 3} \right) + 5\left( \frac 1 {1-x}\right) \right) \\ &\implies A(x) = \frac{15}{2} \sum_{n=0}^\infty \left(1 - \left( \frac 1 3\right)^n\right)x^n \\ &\implies a_n = \frac {15} 2 \left(1 - \left( \frac 1 3\right)^n\right) \end{align*}\]

    and so we find \[ \lim_{n\to\infty}a_n = \lim_{n\to\infty}\frac {15} 2 \left(1 - \left( \frac 1 3\right)^n\right) = \frac{15}{2}. \qed \] > Alternatively: \[ a_{n+1} = \frac 1 3 a_n + 5 \implies \lim_{n\to\infty} a_{n+1} = \lim_{n\to\infty} \frac 1 3 a_n + 5 \\ \implies L = \frac 1 3 L + 5 \implies \frac 2 3 L = 5 \implies L = \frac {15} 2 \]

    Permutations, combinations, and the number of injections from a $k$-set to an $n$-set

    Let \(k\) and \(n\) be positive integers with \(k \le n\). Give the definitions for the permutations and for the combinations of \(k\) elements from an \(n\)-element set, and state formulas for the numbers of these. Derive a formula for the number of one-to-one functions from a \(k\)-element set to an \(n\)-element set.

    Solution

    A permutation of \(k\) elements chosen from an \(n\)-element set is an ordered list of \(k\) distinct elements. Its number is \[ P(n,k)=n(n-1)\cdots(n-k+1)=\frac{n!}{(n-k)!}. \]

    A combination of \(k\) elements from an \(n\)-element set is an unordered \(k\)-element subset. Its number is \[ \binom nk=\frac{n!}{k!(n-k)!}. \]

    Let \(X\) be a \(k\)-element set and \(Y\) an \(n\)-element set. Fix an ordering \(x_1,\ldots,x_k\) of \(X\). An injective function \(f:X\to Y\) is determined uniquely by the ordered list \[ (f(x_1),\ldots,f(x_k)), \] whose entries must be distinct. Conversely every ordered list of \(k\) distinct elements of \(Y\) defines an injection. Therefore the number of injections is \[ P(n,k)=\frac{n!}{(n-k)!}. \]