Today's was a definition heavy lecture. We played with left-, right-, and two-sided inverses. I also discussed some important meta points about "for all" and "there exists".

**Important note about definitions:** When we give a definition, we usually say something like "Definition: X is Y if Z". This is sometimes confusing shorthand, because what we really mean is "the definition of X being Y is Z". In particular, you should read that "if" as an "if and only if" (but **only** in the case of definitions).

**Injective**is another word for one-to-one. A one-to-one function is called an**injection**.**Surjective**is a synonym for onto. A**surjection**is a surjective function.**Bijective**means both surjective and injective.**Isomorphic**means different things in different contexts. In the context of sets, it means the same thing as bijective.We reiterated the formal definitions of injective and surjective that were given

**here**If

*f*:*A*→*B*and*g*:*B*→*C*, then the**composition of f and g**(written, and read as "*g*∘*f**g*of*f*",`\circ`

in LaTeX) is the function*g*∘*f*:*A*→*C*given by the rule*g*∘*f*:*x*↦*g*(*f*(*x*)). Note that in this case,*f*∘*g*is not defined unless*A*=*C*.For any set

*A*, the**identity function on**(written*A*), is the function*i**d*_{A}*i**d*_{A}:*A*→*A*given by*i**d*_{A}:*x*↦*x*.Two functions

*f*and*g*:*A*→*B*are**equal**if for all*x*∈*A*,*f*(*x*) =*g*(*x*).If

*f*:*A*→*B*and*g*:*B*→*A*, thenif*g*is a right inverse of*f**f*∘*g*=*i**d*_{B}.If

*f*:*A*→*B*and*g*:*B*→*A*, thenif*g*is a left inverse of*f**g*∘*f*=*i**d*_{A}.if*g*is a two-sided inverse of*f**g*is both a left and a right inverse of*f*. This is what we mean if we say that*g*is the**inverse**of*f*(without indicating "left" or "right")The symbol

**∃**means "there exists". For example, "∃*x*∈ N,*x*^{2}= 7" means "there exists an element x in the set N whose square is 7" (a statement that happens to be false).

**Note**: feel free to use these facts on the homework, even though we won't have proved them all.

We'll probably prove one of these tomorrow, the rest are similar.

- A function is one-to-one if and only if it has a left inverse
- A function is onto if and only if it has a right inverse
- A function is one-to-one and onto if and only if it has a two-sided inverse

Here is a shorter proof of one of last week's homework problems that uses inverses:

Claim: If ∣*A*∣ ≥ ∣*B*∣ then ∣*B*∣ ≤ ∣*A*∣.

Proof: Suppose ∣*A*∣ ≥ ∣*B*∣. By definition, that means there is some function *f*: *A*→*B* that is onto. Since *f* is onto, it has a right inverse *g*. By definition, this means that *f* ∘ *g* = *i**d*_{B}. Notice that this is the same as saying the *f* is a left inverse of *g*. Therefore *g* has a left inverse, and so *g* must be one-to-one. Therefore, since there exists a one-to-one function from *B* to *A*, ∣*B*∣ ≤ ∣*A*∣.

Compare this to the proof in the solutions: that proof requires us to come up with a function and prove that it is one-to-one, which is more work.

Here I add a bit more detail to an important point I made as an aside in lecture.

Suppose *P*(*x*) is a statement that depends on *x*. For example, *P*(*x*) might be "*x* has purple hair" or "*x* is a piece of chalk" or "for all *y* ∈ N, if *f*(*y*) = *x* then *y* = 7". These statements are called **"predicates"**

To prove a statement of the form "for all *x* ∈ *A*, *P*(*x*)", you must consider every possible value of *x*. To **disprove** such a statement, you only need to find *one* *x* for which *P*(*x*) does not hold.

For example, the definition of one-to-one says that "for all *x* and *y*, if *f*(*x*) = *f*(*y*) then *x* = *y*". To prove that a function is one-to-one, you must either consider every possible element of the domain, or give me a general argument that works for any element of the domain.

However, to prove that a function is **not** one-to-one, you only need to find **one** pair of elements *x* and *y* with *x* ≠ *y* but *f*(*x*) = *f*(*y*).

Summarizing this:

"not (for all x, P(x))" is equivalent to "there exists x such that not P(x)".

Similarly, to prove a statement of the form "there exists x such that P(x)", it suffices to give me a single example of an *x* having property *P*. To **disprove** such a statement, you must consider all possible counterexamples.

To disprove the claim that there is someone in the room with purple hair, you have to look at everyone in the room

To disprove the claim that there exists a bijection between the natural nubmers and the set of functions, we had to write an argument that works for

**any**possible bijection.

Summarizing this:

"not (there exists x such that P(x)) is equivalent to "for all x, not P(x)"