-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunction.math
More file actions
179 lines (147 loc) · 4.44 KB
/
function.math
File metadata and controls
179 lines (147 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
::[function.on.A.to.B]
## Functions
Functions are a fundamental concept of mathematics that describe mappings
between mathematical structures. The distinctive characteristic of a function
is that it maps an input to a *unique* output.
::
[\function:on{A}:to{B}]
Describes: f(x)
when: 'A, B is \set'
specifies:
. 'x [.in.]: A'
. 'f(x) [.in.]: B'
satisfies:
. forAll: a
where: 'a [.in.]: A'
then:
. existsUnique: b
where: 'b [.in.]: B'
suchThat: 'f(a) = b'
Documented:
. written: "A? \rightarrow B?"
. called: "function on A? to B?"
. overview: "::function.on.A.to.B"
------------------------------------------
Id: "dd66298e-4e01-400b-897b-712c4c0892a1"
::[injective.function]
## Injective Functions
In general, a function can map two distinct inputs to the same output. If a
particular function always maps distinct inputs to distinct outputs it is
called an *injective function*.
Note: These types of functions are also said to be *one-to-one*.
::
[\injective.function:on{A}:to{B}]
Describes: f(x)
when: 'A, B is \set'
extends: 'f is \function:on{A}:to{B}'
satisfies:
. forAll: x1, x2
where: 'x1, x2 [.in.]: A'
then:
. if: 'f(x1) = f(x2)'
then: 'x1 = x2'
Documented:
. written:
. "\textrm{injective function on } A? \textrm{ to } B?"
. "\textrm{one-to-one function on } A? \textrm{ to } B?"
. called: "injective function on $A?$ to $B?$"
. overview: "::injective.function"
------------------------------------------
Id: "84e7fd56-af43-441b-bc58-8b6093b14443"
::[surjective.function]
Similarly, in general, for the function $f$ where $f$ is a function on $A$ to
$B$ it is possible for there to be an element $b \in B$ such that there doesn't
exist any $a \in A$ that maps to $b$, i.e. $f(a) = b$.
If a particular function has the property that every output is mapped to by
at least one input, it is called a **surjective function**.
A surjective function on $A$ to $B$ satisfies the property
that for every element $b \in B$ there exists at least one element in
$A$ that maps to $b$. Note, though, that there may be more than one
element. Surjective functions are also said to be *onto*.
::
[\surjective.function:on{A}:to{B}]
Describes: f(x)
when: 'A, B is \set'
extends: 'f is \function:on{A}:to{B}'
satisfies:
. forAll: b
where: 'b [.in.]: B'
then:
. exists: a
where: 'a [.in.]: A'
suchThat: 'f(a) = b'
Documented:
. written:
. "\textrm{surjective function on } A? \textrm{ to } B?"
. "\textrm{onto function on } A? \textrm{ to } B? "
. called: "surjective function on $A?$ to $A?$"
. overview: "::surjective.function"
------------------------------------------
Id: "0e38e388-ca17-482f-aec3-8c5c4ff87e12"
::
Functions that are both one-to-one and onto are special because they can be
"undone", and are called bijective functions.
::
[\bijective.function:on{A}:to{B}]
Describes: f(x)
when: 'A, B is \set'
extends:
. 'f is \injective.function:on{A}:to{B}'
. 'f is \surjective.function:on{A}:to{B}'
Documented:
. written: "\textrm{bijective function on } A? \text{ to } B?"
. called: "bijective function on $A?$ to $B?$"
------------------------------------------
Id: "d7b1e64f-1769-4385-a075-fcb4ac6d90a1"
::
The inverse of a function is a function that "undoes" that function.
::
[\function.inverse:of{f}]
Defines: g(x)
using: A, B
when: 'f is \function:on{A}:to{B}'
means: 'g is \function:on{B}:to{A}'
expresses:
. forAll: a
where: 'a [.in.]: A'
then: 'g(f(a)) = a'
. forAll: b
where: 'b [.in.]: B'
then: 'f(g(b)) = b'
Documented:
. written: "f+?^{-1}"
. called: "inverse of $f?$"
------------------------------------------
Id: "bc3d179e-0d30-4a25-98f9-0a4200d68806"
::
Function composition is a basic method for building functions out of other
functions.
::
[f \.function.compose./ g]
Defines: h(x)
using: A, B, C
when:
. 'g is \function:on{A}:to{B}'
. 'f is \function:on{B}:to{C}'
means: 'h is \function:on{A}:to{C}'
expresses: 'h(x) := f(g(x))'
Documented:
. written: "f+? \circ g+?"
. called: "function composition"
------------------------------------------
Id: "85db5d32-e2a8-4951-94b3-be9093ccf3b0"
::
Some types of functions need more structure, such as a group or ring structure,
to define, but the identify function on a set $A$ does not need any such
structure.
::
[\identity.function:on{A}]
Defines: f(x)
when: 'A is \set'
means: 'f is \function:on{A}:to{A}'
expresses: 'f(x) := x'
Documented:
. written: "\textrm{id}_{A?}"
. called: "identify function on $A?$"
------------------------------------------
Id: "a28941e4-23f3-44e9-bc22-eb7cd53bb819"