# Function

**Type:** Concept  
**Domain:** Foundations & Logic  
**Codex URL:** /mathematics/foundations-logic/function/  
**Entry status:** Live — v1.0 (2026-05-27)

## Summary
A rule assigning exactly one output to each input. Formally, f:A→B is a subset of A×B such that every a∈A has exactly one b∈B with (a,b)∈f.

## Key properties
- Injective (one-to-one): different inputs → different outputs
- Surjective (onto): every codomain element is reached
- Bijective: both — has an inverse

## Historical development
Leibniz (1673) coined "function." Euler (1748) gave algebraic definition. Dirichlet (1837) gave the modern general definition, allowing functions like the Dirichlet function with no algebraic formula.

## Sources
### Tier 1
- Enderton, H.B. (1977). *Elements of Set Theory*. Academic Press.
- Kline, M. (1972). *Mathematical Thought from Ancient to Modern Times*. Oxford University Press.
### Tier 2
- Mac Lane, S. (1998). *Categories for the Working Mathematician*. 2nd ed. Springer.

---
*Mathematics Codex entry v1.0 — added 2026-05-27 — thecodex.expert/mathematics/*
