Skip to main content

Homework 2

Exercise: Let A,B,CA,B,C be sets and let f:AB,g:BCf:A\rightarrow B, g:B\rightarrow C be functions. The composite function gf:ACg\circ f:A\rightarrow C is defined as follows: gf(x)=g(f(x))g\circ f(x)=g(f(x)). Prove:

  1. If ff and gg are injective, then gfg\circ f is injective.
  2. If gfg\circ f is injective, then gfg\circ f is injective.
  3. If ff is onto BB and gg is onto CC, then gfg\circ f is onto CC.
  4. If gfg\circ f is onto CC, then gg is onto CC.
  5. If gfg\circ f is injective and ff is onto BB, then gg is injective.
  6. If gfg\circ f is onto CC and gg is injective, then ff is onto BB.

Proof (general idea). To prove a function is an injection, always pick two elements in its domain whose values are the same and try to use the given conditions to show these two elements coincide with each other. On the other hand, to show a function is surjective onto a certain set, try to find the pre-image for everyone in that set.

Exercise: Let AA be a set, and let f:AAf:A\rightarrow A be a function such that for all functions g:AAg: A\rightarrow A, the identity fg=gff\circ g=g\circ f holds. Prove that f:idAf:id_A.

Proof. Pick any element aAa\in A, and let gg be the constant function which maps everything to aa. As fg=gff\circ g=g\circ f, we have f(a)=af(a)=a.

Exercise: Show the relation \sim (two sets are equivalent if there exists a 1-1 mapping from one onto the other) is an equivalence relation.

Proof. (Sketch) For reflexivity, think of the identity function. For symmetry, consider the inverse function. For transitivity, use the fact that the composite of two bijections is a bijection.

Exercise: Are the following sets finite, countable or uncountable? Explain your answer in each case.

  1. {(x,y)N×Rxy=1}\left\{(x,y)\in\mathbb{N}\times\mathbb{R}\:xy=1\right\}
  2. (1/4,3/4)(1/4,3/4)
  3. {x=a+b2:a,bQ}\left\{x=a+b\sqrt{2}:a,b\in\mathbb{Q}\right\}
  4. R\Q\mathbb{R}\backslash\mathbb{Q}
  5. n=1(1/n,1/n)\bigcap^\infty_{n=1}(-1/n, 1/n)
  6. {AN:A is finite, or N\A is finite}\left\{A\subset\mathbb{N}:A \text{ is finite, or } \mathbb{N}\backslash A \text{ is finite}\right\}
  7. P(N):={AN}\mathcal{P}(\mathbb{N}):=\{A\subset\mathbb{N}\}

Proof. (Sketch)

  1. The projection that maps (x,y)(x, y) to its first coordinate xx is a bijection from the given set to the natural numbers. Thus its countable.
  2. Suppose (1/4,3/4)(1/4,3/4) is finite or countable (or say at most countable), then we can express the reals as the countable union of translations of (1/4,3/4)(1/4,3/4). To be specific, they are (1/4,3/4)(1/4,3/4). Thus the reals are countable which contradicts with the fact that the reals are uncountable. Another way to prove is to give an explicit bijection form (1/4,3/4)(1/4,3/4) to R\mathbb{R}. One of them those bijection is xtan((2x1)π)x\mapsto\tan((2x-1)\pi).
  3. Define a function from Q×Q\mathbb{Q}\times\mathbb{Q} to the given set such that (a,b)(a,b) is mapped to a+b2a+b\sqrt{2} and prove it’s a bijection.
  4. Suppose the irrationals are countable, plus the fact that rationals are countable, as reals are the union of rationals and irrationals, we get a contradiction.
  5. It’s {0}\{0\}, so it’s finite.
  6. The given set is the union of the set FF that consists of all finite subsets of natural numbers and the set CFCF that consists of all co-finite subsets of natural numbers. There is a natural bijection between FF and CFCF which is AN\AA\mapsto \mathbb{N}\backslash A. Thus to prove the given set is countable, enough to show FF is countable. Notice that every finite subset of N\mathbb{N} is included in {1,2,,n}\{1,2,\ldots, n\} for some nNn\in\mathbb{N}, so FF can be written as the set of all subsets of {1}\{1\} union the set of all subsets of {1,2}\{1,2\} union the set of all subsets of {1,2,3}\{1,2,3\} and so forth. So FF is the union of countably many finite sets, thus countable. This concludes the proof.
  7. Assume that there exists a bijection f ⁣:NP(N)f\colon\mathbb{N}\rightarrow\mathcal{P}(\mathbb{N}) and consider the set A={nN:nf(n)}A=\{n\in\mathbb{N}:n\notin f(n)\}. Let aNa\in\mathbb{N} such that f(a)=Af(a)=A. Then aAaf(a)aAa\in A \Leftrightarrow a\in f(a) \Leftrightarrow a\notin A, contradiction.