Function

A function from a set to a set , denoted is a relation that satisfies the following ( is well-defined)

  1. (all the in 1. is unique) or
    Let be a relation on sets and i.e. . Then is a function from to iff
    or

    or
    A function from to is a mapping from each element of to exactly one element of
    i.e. in the function diagram, there is only one arrow coming out from every element of and every element of has an arrow coming out of it
    or
    A function is well-defined (exists), if it has the following property:

Definitions

  • let be a function. iff
  • is the argument of
  • is the image of under
  • If then is a preimage of
  • is the domain of
  • is the co-domain of
  • range is all possible outputs of , or the setwise image of under
  • two functions can be derived from
    • is the setwise image of
    • is the setwise preimage of
    • if , then let
    • if , then let
    • is the setwise image of , and is the setwise preimage of under
    • note: here is not an inverse function although they have the same symbol. can also be written
    • e.g. defined . and because and
    • Setwise preimage function always exists

Equality of Functions

and are equal () iff:

  1. and , and

Properties of Functions

  • An injection (or injective function)
    • one-to-one or or equivalently (contrapositive),
    • f is not injective iff
  • A surjection (or surjective function or “onto”)
    • all elements in the co-domain have an input that result in it (range = co-domain)
  • A bijection (or bijective function)
    • one-to-one correspondence (all elements in co-domain has exactly one item that results in it)
    • a function is bijective iff it is both injective and surjective
    • If a function has an inverse, then it is bijective
  • Inverse
    • for , is an inverse of iff
    • inverse of is denoted
    • inverse functions are unique
    • There exists an inverse iff it is bijective (theorem 7.2.3)

Composing Functions

Let and
The composition of f and g, is defined as:
From tutorial 6 Q2,

Identity Functions

The identity function on a set , , is the function from to defined by for all let Theorem 7.3.1:

Inverse Function

Composing a function ith its inverse results in the identity function: Theorem 7.3.2 (let )

Properties

  • Composing a function with its inverse results in the identity function (Theorem 7.3.2). Let
  • Function composition is associative
    • for , and , then
  • Function composition is not commutative
    • Apart from special cases,
  • If and are both injective, then is injective (Theorem 7.3.3)
  • If and are both surjective, then is surjective (Theorem 7.3.4)

Functions on

  • is the set of equivalence classes on mod- Congruence Relations.
    • In terms of functions, it can be taken that the domain is bounded to integer values
  • Addition and multiplication functions on are well-defined (the “same” input will result in the “same” output (mod-n))
    • Let be the mod-n function, and means mod
      • is defined as
      • well defined means: for all and all :
    • Same for multiplication

Representing Sequences and Strings

Sequence (infinite)

  • A sequence can be represented by a function whose domain is that satisfies for all
    • Therefore, any function whose domain is for some represents a sequence
  • Sequences can be denoted
    • i.e. all the elements of the sequence can be found in

String (finite)

  • A string is a finite sequence
  • A string or word over set is an expression of the form where and
  • is the length of the string. The empty string is the string of length
  • Strings can be denoted
    • i.e. all the elements of the string can be found in

Equality

  • Sequences and
    • if their corresponding elements are equal, or for every
  • Strings
    • if their lengths are equal and their corresponding elements are equal, or for all