2.3 Gluing and Characteristic Functions
Section 2.1 made a function a graph with a codomain,
and Section 2.2 asked what a function does to its inputs
and to its codomain. This section builds new functions
out of old ones by the three simplest constructions:
cutting a function down to a smaller domain, enlarging
its domain, and assembling one function from pieces
defined on parts of the domain. The last is behind every
definition “by cases”. The section ends with the
functions that take only the values
2.3.1. A function in two pieces
School mathematics defines many functions in pieces.
The sign function is
Here is a familiar definition by cases:
So whether “one formula on this piece, another on that piece” defines a function depends on two things: whether the pieces leave any point out, and what the formulas do where the pieces meet. Before reading on: write down the condition on two formulas, on two pieces, that makes the definition a function. The gluing theorem below answers this, for any number of pieces.
2.3.2. Restriction and extension
Section 2.1 cut a function down: the restriction of
A restriction forgets part of the domain; an extension fills in the part that was missing.
Let
- (a) For
, the restriction of to is the function , , as in Section 2.1. - (b) For
, an extension of to is a function with . - (c) The
inclusion map of
into is , .
In words: the restriction keeps the codomain and
forgets the inputs outside
The article in (b) is “a”, not
“the”, and the naive expectation that an extension is
determined by
Restriction, by contrast, is predictable. The next proposition lists what it does.
Let
- (a)
. - (b)
. - (c) For every
function
, . - (d) If
is injective, then so is .
Idea. Parts (a)–(c) are equations
between functions, so we compare domains, codomains and
values. Part (d) only unwinds Definition 2.2.1, using
Proof. For (a)–(c) we use Proposition 2.1.1: in each part both sides have the same domain and codomain, and we compare values.
(a) Both sides are functions
(Definition 2.1.2). For , .(b) Both sides are functions
. For , , where the middle step uses .(c) Both sides are functions
. For , .(d) Let
with . Then , so because is injective (Definition 2.2.1).
Part (d) has no partner for surjectivity, and the next check asks why.
Quick check. Is a restriction of a surjection always surjective?
Solution. No. The function
2.3.3. Gluing
Restriction takes a function apart: it hands us the
pieces
Let
Idea (Scratch work). A function is
a graph satisfying (Fn1) and (Fn2), together with a
codomain (Definition 2.1.1). We
must produce a graph, and the only graphs in sight are
the graphs
| Givens | Goal |
|---|---|
| graphs |
a function |
| (Fn1) and (Fn2) for |
|
| (Fn1): |
|
| (Fn2): |
In the existence part each hypothesis has one job:
the cover gives (Fn1), agreement gives (Fn2). Uniqueness
is easier: two functions with the right restrictions
both take the value
Proof. For each
(Fn1). Let
(Fn2). Let
So
Uniqueness. Let
In the existence part, the proof used the cover only
for (Fn1) and agreement only for (Fn2). Each hypothesis
is needed. If a point
The theorem is used so often that its use deserves a template. Step (4) is the step that part (c) of Example (Piecewise definitions are gluings) below turns on.
Template. (1) Name the pieces and check that they cover the domain. (2) For each two pieces, find the overlap and check that the formulas agree on it; disjoint pieces need nothing. (3) Conclude by Theorem 2.3.2. (4) Prove further properties piece by piece and across pieces: for injectivity, compare a value from one piece with a value from another.
When to use it. Definitions by cases, piecewise formulas, a default value off a subset, a function given by different formulas on a subset and its complement.
The usual failure. Checking the cover and forgetting the overlaps (a boundary point lies in two pieces); checking injectivity inside each piece only.
Decide whether each definition glues to a function
- (a)
on and on . - (b)
on and on . - (c)
on and on . If it glues, is the result injective?
Solution.
(a) Step (1): the pieces cover
, since every real number is or . Step (2): the overlap is , where the formulas give and . They agree, so by Theorem 2.3.2 there is exactly one function with these restrictions: the absolute value .(b) The pieces cover
and overlap in , where the values are and . Agreement fails, so the hypothesis of Theorem 2.3.2 fails; and no function can have both restrictions, since its value at would be and . This is the rule of the hook, which is not a function.(c) A minimal change to (b): the second piece loses the point
. Now the pieces are disjoint and still cover , so step (2) has nothing to check, and they glue to a function . Inside each piece is injective ( and each force ). Across the pieces, step (4) finds a collision: and . So is not injective.
Part (c) found its collision across the pieces. Step (4) of the method box, for injectivity, is a proposition:
Let
Idea. Two different points either share a piece, where the restriction decides, or lie one in each piece outside the overlap, where the last condition decides. This is step (4) of Example (Method: define a function by gluing), and we prove injectivity in the contrapositive form given after Definition 2.2.1 (justified by Logic and Proof, Proposition 2.5.2).
Proof.
The condition across the pieces mentions only points
outside the overlap. A point of
Default values. Let
Warning. A boundary point usually
lies in two pieces. “
Quick check. Glue
Solution. The pieces cover
2.3.4. Indicator functions
A subset
Let
It is a default-value definition: the constant
The last subsection of this section proves that
To compute, we need to know what the set operations
do to indicators. Besides the operations of Definition 1.3.1 we use one
more. The symmetric difference of
Let
- (a)
; - (b)
; - (c)
; - (d)
; - (e)
if and only if for every .
Idea. For (a), (b) and (d),
membership of
Proof. Fix
(a), (b), (d). There are four cases, and in each we
read membership from Definition 1.3.1 and the
definition of
| yes | yes | 1 | 1 | yes | 1 | no | 0 | no | 0 |
| yes | no | 1 | 0 | no | 0 | no | 0 | yes | 1 |
| no | yes | 0 | 1 | no | 0 | yes | 1 | yes | 1 |
| no | no | 0 | 0 | no | 0 | yes | 1 | no | 0 |
In every row, the number in each formula column is
(c) By Theorem 1.3.1 (d) with
in the place of , . Applying (a) to the sets and , whose indicators at are and by (b), gives . Applying (b) to the set ,(d)
Suppose and let . If , then , so and . If , then since . Suppose the inequality holds at every point, and let . Then , so and . By Definition 1.2.2, .
Part (e) says the only pattern of values that
Quick check. Express
Solution. By Definition 1.3.1,
Compute with indicators. To prove an
equation
Show that
Solution. Fix
The common value is
Quick check. Let
Solution. The values of
2.3.5. Subsets are 0–1 functions
Section 2.1 stated, for every set, that subsets and
0–1 functions match, and gave both maps: send
For every set
Proof. For
Remark (Looking ahead). Chapter 4
counts the subsets of a finite set and, through this
bijection, the 0–1 functions on it; with Cantor’s
theorem it also shows that
2.3.6. Exercises
A. Check your understanding
- (a) Let
, . Is injective? Is ? - (b) Let
be distinct and let send , . How many extensions of to with codomain are there, and how many of them are injective? - (c) Let
and . Show that has an extension to if and only if or . - (d) For
, write as the list of its values at , and name the subset of whose indicator has the values .
Solution.
(a) Yes. Let
with . Then and , so as in Example (Squaring, three ways) (b), and . No: and lie in , and .(b) Three. An extension agrees with
on , so by Proposition 2.1.1 it is determined by its value at ; and each of gives one, by gluing with a constant function on (Theorem 2.3.2; the pieces are disjoint). Only gives an injective extension, since its three values are distinct; collides with , and with .(c)
If , then is an extension of itself, since . If , choose and glue with the constant function with value : the pieces and are disjoint and cover , so Theorem 2.3.2 gives with . Suppose and . Since and , some is not in ; so is non-empty, and by Proposition 2.1.2 (b) there is no function , let alone an extension of . By contraposition, an extension forces or .(d)
; the subset , the set of points where the value is .
B. Practice
Let
Solution. The three intervals cover
Every
On the first and third pieces every value is
Let
- (a) Show that
and glue to a function . - (b) Prove that
is injective, using Proposition 2.3.3. - (c) Prove that
is surjective.
Solution.
(a) The pieces cover
, since every real number is or . They overlap in , where . By Theorem 2.3.2 they glue to a function .(b) Let
and . Then is injective, since says . And is injective: with gives , as in Example (Squaring, three ways) (b). Across the pieces, let and , that is . Then , so . By Proposition 2.3.3, is injective.(c) Let
. We argue by cases (Example (Method: proof by cases)). If , then and . If , then and . So every real number is a value of , and is a bijection.
Let
- (a)
; - (b)
.
Solution. Fix
(a) By Proposition 2.3.4 (c),
, so the left side has indicator value . The right side has, by Proposition 2.3.4 (a), , using . The indicators agree at every , so the sets are equal.(b) By Proposition 2.3.4 (a) and (d), the left side has
. The sets and have indicator values and , so by Proposition 2.3.4 (d) the right side has . The indicators agree, so the sets are equal.
Prove each true statement and refute each false one with a counterexample.
- (a) If
with , and , are functions, then there is exactly one with and . - (b) If
, , and and are injective, then is injective. - (c) If
and is surjective for some , then is surjective. - (d) The definition
for , for gives a bijection . - (e) Gluing
on and on gives an injective function .
Solution.
(a) True. The family
covers , and the only overlap is empty, so agreement holds vacuously. By Theorem 2.3.2 there is exactly one such .(b) False. Let
, , and . Then , and both restrictions are injective (on each piece, with of the same sign gives ), but . The collision is across the pieces.(c) True. Let
. Since is surjective, for some . So is a value of .(d) True. The pieces
and are disjoint and cover , so is a function by Theorem 2.3.2. Injective. Inside the pieces: and each give . Across the pieces: if , and , then , so , a contradiction. Surjective. A rational is . An irrational is : here , since otherwise .(e) False. The pieces agree at the overlap
(both give ), so they glue to a function ; but .
C. Going deeper
Let
- (a) Prove
for by computing with indicators. - (b) Show that
for every , where denotes the function (its values are and ). - (c) Use (b) to show
that
without chasing elements.
Solution.
(a) Fix
and write for the values of at . By Proposition 2.3.4 (a) and (b), the left side has indicator value . By Proposition 2.3.4 (b), the sets and have indicator values and , so by Proposition 2.3.4 (c) the right side has The two sides have the same indicator, and is injective, so they are equal.(b) Both sides are functions
. At , by Proposition 2.3.4 (b), which is the value of at . By Proposition 2.1.1, .(c) Let
. Applying (b) to and then to , where the last step holds at every point because for every number . Since is injective, . Both and are functions that agree at every , so (Proposition 2.1.1). This is the identity of Example (The maps that come with sets) (d), recovered by a computation with numbers.
For each
- (a) Show that the
intervals
cover and are pairwise disjoint, so that the glue to a function . - (b) Find the range
of
, show that for every , and decide whether is injective. - (c) Do the functions
on the closed intervals , , glue to a function ?
Solution.
(a) Cover. Every
lies in , where is the integer of Example (Maps from calculus) (b). Disjoint. Suppose with integers ; since the situation is symmetric in and , we may assume . Then , because and are integers, and so , which is impossible. So no two pieces overlap, step (2) of Example (Method: define a function by gluing) has nothing to check, and Theorem 2.3.2 gives .(b) The range is
. If , then , so every value lies in ; and each lies in the piece with , so . For the shift, let . Then , the piece of , so . Hence is not injective: .(c) No. The point
lies in , where the first formula gives and the second gives . The functions disagree on an overlap, and no function can restrict to both, since its value at would be and .