Movatterモバイル変換


[0]ホーム

URL:


Wikipedia

Partial function

(Redirected fromTotal function)
Not to be confused with thepartial application of a function of several variables, by fixing some of them.
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(August 2014) (Learn how and when to remove this message)

Inmathematics, apartial functionf from asetX to a setY is afunction from asubsetS ofX (possibly the wholeX itself) toY. The subsetS, that is, thedomain off viewed as a function, is called thedomain of definition ornatural domain off. IfS equalsX, that is, iff is defined on every element inX, thenf is said to be atotal function.

In other words, a partial function is abinary relation over twosets that associates to every element of the first setat most one element of the second set; it is thus aunivalent relation. This generalizes the concept of a (total)function by not requiringevery element of the first set to be associated to an element of the second set.

A partial function is often used when its exact domain of definition is not known, or is difficult to specify. However, even when the exact domain of definition is known, partial functions are often used for simplicity or brevity. This is the case incalculus, where, for example, thequotient of two functions is a partial function whose domain of definition cannot contain thezeros of the denominator; in this context, a partial function is generally simply called afunction.

Incomputability theory, ageneral recursive function is a partial function from the integers to the integers; noalgorithm can exist for deciding whether an arbitrary such function is in fact total.

Whenarrow notation is used for functions, a partial functionf{\displaystyle f} fromX{\displaystyle X} toY{\displaystyle Y} is sometimes written asf:XY,{\displaystyle f:X\rightharpoonup Y,}f:XY,{\displaystyle f:X\nrightarrow Y,} orf:XY.{\displaystyle f:X\hookrightarrow Y.} However, there is no general convention, and the latter notation is more commonly used forinclusion maps orembeddings.[citation needed]

Specifically, for a partial functionf:XY,{\displaystyle f:X\rightharpoonup Y,} and anyxX,{\displaystyle x\in X,} one has either:

For example, iff{\displaystyle f} is thesquare root function restricted to theintegers

f:ZN,{\displaystyle f:\mathbb {Z} \to \mathbb {N} ,} defined by:
f(n)=m{\displaystyle f(n)=m} if, and only if,m2=n,{\displaystyle m^{2}=n,}mN,nZ,{\displaystyle m\in \mathbb {N} ,n\in \mathbb {Z} ,}

thenf(n){\displaystyle f(n)} is only defined ifn{\displaystyle n} is aperfect square (that is,0,1,4,9,16,{\displaystyle 0,1,4,9,16,\ldots }). Sof(25)=5{\displaystyle f(25)=5} butf(26){\displaystyle f(26)} is undefined.

Basic concepts

edit
 
An example of a partial function that isinjective.
 
An example of afunction that is not injective.

A partial function arises from the consideration of maps between two setsX andY that may not be defined on the entire setX. A common example is the square root operation on the real numbersR{\displaystyle \mathbb {R} } : because negative real numbers do not have real square roots, the operation can be viewed as a partial function fromR{\displaystyle \mathbb {R} }  toR.{\displaystyle \mathbb {R} .}  Thedomain of definition of a partial function is the subsetS ofX on which the partial function is defined; in this case, the partial function may also be viewed as a function fromS toY. In the example of the square root operation, the setS consists of the nonnegative real numbers[0,+).{\displaystyle [0,+\infty ).} 

The notion of partial function is particularly convenient when the exact domain of definition is unknown or even unknowable. For a computer-science example of the latter, seeHalting problem.

In case the domain of definitionS is equal to the whole setX, the partial function is said to betotal. Thus, total partial functions fromX toY coincide with functions fromX toY.

Many properties of functions can be extended in an appropriate sense of partial functions. A partial function is said to beinjective,surjective, orbijective when the function given by the restriction of the partial function to its domain of definition is injective, surjective, bijective respectively.

Because a function is trivially surjective when restricted to its image, the termpartial bijection denotes a partial function which is injective.[1]

An injective partial function may be inverted to an injective partial function, and a partial function which is both injective and surjective has an injective function as inverse. Furthermore, a function which is injective may be inverted to a bijective partial function.

The notion oftransformation can be generalized to partial functions as well. Apartial transformation is a functionf:AB,{\displaystyle f:A\rightharpoonup B,}  where bothA{\displaystyle A}  andB{\displaystyle B}  aresubsets of some setX.{\displaystyle X.} [1]

Function spaces

edit

For convenience, denote the set of all partial functionsf:XY{\displaystyle f:X\rightharpoonup Y}  from a setX{\displaystyle X}  to a setY{\displaystyle Y}  by[XY].{\displaystyle [X\rightharpoonup Y].}  This set is the union of the sets of functions defined on subsets ofX{\displaystyle X}  with same codomainY{\displaystyle Y} :

[XY]=DX[DY],{\displaystyle [X\rightharpoonup Y]=\bigcup _{D\subseteq X}[D\to Y],} 

the latter also written asDXYD.{\textstyle \bigcup _{D\subseteq {X}}Y^{D}.}  In finite case, its cardinality is

|[XY]|=(|Y|+1)|X|,{\displaystyle |[X\rightharpoonup Y]|=(|Y|+1)^{|X|},} 

because any partial function can be extended to a function by any fixed valuec{\displaystyle c}  not contained inY,{\displaystyle Y,}  so that the codomain isY{c},{\displaystyle Y\cup \{c\},}  an operation which is injective (unique and invertible by restriction).

Discussion and examples

edit

The first diagram at the top of the article represents a partial function that isnot a function since the element 1 in the left-hand set is not associated with anything in the right-hand set. Whereas, the second diagram represents a function since every element on the left-hand set is associated with exactly one element in the right hand set.

Natural logarithm

edit

Consider thenatural logarithm function mapping thereal numbers to themselves. The logarithm of a non-positive real is not a real number, so the natural logarithm function doesn't associate any real number in the codomain with any non-positive real number in the domain. Therefore, the natural logarithm function is not a function when viewed as a function from the reals to themselves, but it is a partial function. If the domain is restricted to only include thepositive reals (that is, if the natural logarithm function is viewed as a function from the positive reals to the reals), then the natural logarithm is a function.

Subtraction of natural numbers

edit

Subtraction ofnatural numbers (in whichN{\displaystyle \mathbb {N} }  is the non-negativeintegers) is a partial function:

f:N×NN{\displaystyle f:\mathbb {N} \times \mathbb {N} \rightharpoonup \mathbb {N} } 
f(x,y)=xy.{\displaystyle f(x,y)=x-y.} 

It is defined only whenxy.{\displaystyle x\geq y.} 

Bottom element

edit

Indenotational semantics a partial function is considered as returning thebottom element when it is undefined.

Incomputer science a partial function corresponds to a subroutine that raises an exception or loops forever. TheIEEE floating point standard defines anot-a-number value which is returned when a floating point operation is undefined and exceptions are suppressed, e.g. when the square root of a negative number is requested.

In aprogramming language where function parameters arestatically typed, a function may be defined as a partial function because the language'stype system cannot express the exact domain of the function, so the programmer instead gives it the smallest domain which is expressible as a type and contains the domain of definition of the function.

In category theory

edit

Incategory theory, when considering the operation ofmorphism composition inconcrete categories, the composition operation:hom(C)×hom(C)hom(C){\displaystyle \circ \;:\;\hom(C)\times \hom(C)\to \hom(C)}  is a total function if and only ifob(C){\displaystyle \operatorname {ob} (C)}  has one element. The reason for this is that two morphismsf:XY{\displaystyle f:X\to Y}  andg:UV{\displaystyle g:U\to V}  can only be composed asgf{\displaystyle g\circ f}  ifY=U,{\displaystyle Y=U,}  that is, the codomain off{\displaystyle f}  must equal the domain ofg.{\displaystyle g.} 

The category of sets and partial functions isequivalent to but notisomorphic with the category ofpointed sets and point-preserving maps.[2] One textbook notes that "This formal completion of sets and partial maps by adding “improper,” “infinite” elements was reinvented many times, in particular, in topology (one-point compactification) and intheoretical computer science."[3]

The category of sets and partial bijections is equivalent to itsdual.[4] It is the prototypicalinverse category.[5]

In abstract algebra

edit

Partial algebra generalizes the notion ofuniversal algebra to partialoperations. An example would be afield, in which the multiplicative inversion is the only proper partial operation (becausedivision by zero is not defined).[6]

The set of all partial functions (partialtransformations) on a given base set,X,{\displaystyle X,}  forms aregular semigroup called the semigroup of all partial transformations (or the partial transformation semigroup onX{\displaystyle X} ), typically denoted byPTX.{\displaystyle {\mathcal {PT}}_{X}.} [7][8][9] The set of all partial bijections onX{\displaystyle X}  forms thesymmetric inverse semigroup.[7][8]

Charts and atlases for manifolds and fiber bundles

edit

Charts in theatlases which specify the structure ofmanifolds andfiber bundles are partial functions. In the case of manifolds, the domain is the point set of the manifold. In the case of fiber bundles, the domain is the space of the fiber bundle. In these applications, the most important construction is thetransition map, which is the composite of one chart with the inverse of another. The initial classification of manifolds and fiber bundles is largely expressed in terms of constraints on these transition maps.

The reason for the use of partial functions instead of functions is to permit general global topologies to be represented by stitching together local patches to describe the global structure. The "patches" are the domains where the charts are defined.

See also

edit

References

edit
  • Martin Davis (1958),Computability and Unsolvability, McGraw–Hill Book Company, Inc, New York. Republished by Dover in 1982.ISBN 0-486-61471-9.
  • Stephen Kleene (1952),Introduction to Meta-Mathematics, North-Holland Publishing Company, Amsterdam, Netherlands, 10th printing with corrections added on 7th printing (1974).ISBN 0-7204-2103-9.
  • Harold S. Stone (1972),Introduction to Computer Organization and Data Structures, McGraw–Hill Book Company, New York.

Notes

edit
  1. ^abChristopher Hollings (2014).Mathematics across the Iron Curtain: A History of the Algebraic Theory of Semigroups. American Mathematical Society. p. 251.ISBN 978-1-4704-1493-1.
  2. ^Lutz Schröder (2001). "Categories: a free tour". In Jürgen Koslowski and Austin Melton (ed.).Categorical Perspectives. Springer Science & Business Media. p. 10.ISBN 978-0-8176-4186-3.
  3. ^Neal Koblitz; B. Zilber; Yu. I. Manin (2009).A Course in Mathematical Logic for Mathematicians. Springer Science & Business Media. p. 290.ISBN 978-1-4419-0615-1.
  4. ^Francis Borceux (1994).Handbook of Categorical Algebra: Volume 2, Categories and Structures. Cambridge University Press. p. 289.ISBN 978-0-521-44179-7.
  5. ^Marco Grandis (2012).Homological Algebra: The Interplay of Homology with Distributive Lattices and Orthodox Semigroups. World Scientific. p. 55.ISBN 978-981-4407-06-9.
  6. ^Peter Burmeister (1993). "Partial algebras – an introductory survey". In Ivo G. Rosenberg; Gert Sabidussi (eds.).Algebras and Orders. Springer Science & Business Media.ISBN 978-0-7923-2143-9.
  7. ^abAlfred Hoblitzelle Clifford; G. B. Preston (1967).The Algebraic Theory of Semigroups. Volume II. American Mathematical Soc. p. xii.ISBN 978-0-8218-0272-4.
  8. ^abPeter M. Higgins (1992).Techniques of semigroup theory. Oxford University Press, Incorporated. p. 4.ISBN 978-0-19-853577-5.
  9. ^Olexandr Ganyushkin; Volodymyr Mazorchuk (2008).Classical Finite Transformation Semigroups: An Introduction. Springer Science & Business Media. pp. 16 and 24.ISBN 978-1-84800-281-4.

[8]ページ先頭

©2009-2025 Movatter.jp