← Return to results

Function composition

On this page
  1. Mathematical statement
  2. Representative formula (exact TeX)
  3. Assumptions
  4. Symbol scope
  5. Intuition, definition, and misconceptions
  6. Adopted derivation guide
  7. Prerequisites
  8. Verification boundary
  9. Next obligation
  10. Same-source structured data

This English edition is an AI candidate and does not yet have an OCME Atlas (GPT-6) Twin closure receipt.

The composition g∘f first evaluates f and then supplies its output to g; the intermediate value must be an allowed input of g.

mko-composition · definition · v0.10.0

Mathematical statement

If f:A→B and g:B→C are total functions, then g∘f:A→C is defined by (g∘f)(x)=g(f(x)). For expressions with different domains, the permitted inputs of the composition are {x∈dom(f):f(x)∈dom(g)}.

Representative formula (exact TeX)

g(f(x))

Assumptions

  • The functions and their domains and codomains are explicitly stated.
  • For total-function composition the intermediate types are compatible; a restricted composition is evaluated only on its explicitly permitted set.

Symbol scope

  • g — outer function
  • f — inner function
  • x — input

Intuition, definition, and misconceptions

To evaluate g(f(x)), first compute f(x) and then evaluate g. The written order of the composition symbol is opposite to the order of evaluation.

If the intermediate value is not in the domain of g, the composition cannot be evaluated at that input. A finite table can list the permitted composition domain explicitly.

Function composition is generally not commutative and is not multiplication of function values. Replacing it by f(g(x)) or f(x)g(x) requires additional conditions.

Common mistakes include reading g∘f as applying g before f or omitting the domain check on the intermediate value.

Adopted derivation guide

Function composition: the permitted inputs of a restricted composition, evaluation order and non-commutativity

The original MKO is retained. The guide has its own append-only revision and verification boundaries, not a new Lean proof.

Prerequisites

Verification boundary

Finite tables and specified affine expressions can be recomputed exactly, but they do not formally prove all function identities or composition-domain laws.

not_formalized

This does not mean the content is false; it means no replayable computational or formal evidence is registered yet.

Next obligation

Bind Function.comp and the domain of composition under set restrictions, handling type conversions separately.

Same-source structured data

This page and the interactive view use the same object and existing language edition; this adds no proof or human review.

Canonical MKO JSON · Plain Markdown