How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Shape preserving piecewise polynomial interpolation
1 · Prerequisites
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Countability and Uncountability
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Limits of Real Functions
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Outward rounded interval and ball arithmetic
- Relations, Functions, and Quotients
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Suprema and Infima
- The Derivative and the Mean Value Theorems
- The ZFC Axioms and the Basic Set Constructions
- Topology of ℝ
2 · Summary
Overview
This page defines cubic Hermite pieces with explicit nodal values and slopes, proves a sufficient monotonicity region in normalized endpoint slopes, and gives the finite PCHIP slope-selection algorithm with its endpoint, flat-interval, and sign-change rules. The PCHIP proof establishes C1 matching and no overshoot on every data cell, hence monotonicity for monotone data. Its third-order value estimate is limited to uniform grids on intervals where the derivative is bounded away from zero; no third-order estimate is claimed at extrema or on arbitrary nonuniform meshes. A separate Bernstein representation proves a convex-hull and positivity guarantee from nonnegative control values. Positive samples alone do not imply positivity between them.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Piecewise cubic Hermite interpolant
Definition
Let be an integer, let be real nodes, let be values, and let be prescribed slopes. For put and on . Define The cubic Hermite piece on is The piecewise cubic Hermite interpolant is the function whose restriction to each such interval is ; adjacent pieces use their common prescribed value at a shared node. The slopes are input data, not values inferred from neighboring pieces.
Piecewise Bernstein representation
Definition
Let be an integer and let be a finite partition, and on each cell choose an integer degree and real controls . For , define the Bernstein basis polynomial where is the natural binomial coefficient from The set of -element subsets and the binomial coefficient , is the canonical embedding of The canonical natural of a field into , and finite sums use Finite sums and finite products, by recursion. The cell polynomial is . These cell polynomials form a piecewise Bernstein representation. To require continuity at a shared node, impose the additional endpoint-control condition ; continuity is not part of the representation unless that condition is imposed.
For degree two this formula reads .
Interpolation, C1 matching, and cubic reproduction for Hermite pieces
Statement
For the data in Piecewise cubic Hermite interpolant, each piece has the prescribed endpoint values and slopes: , , , and . The resulting interpolant is on (with the corresponding one-sided derivatives at the endpoints). On a single interval, if the four prescribed endpoint data are the values and derivatives of a polynomial of degree at most three, then on that interval.
Facts & Assumptions
Given: Strictly increasing real nodes, values, and prescribed slopes as in Piecewise cubic Hermite interpolant.
Piecewise cubic Hermite interpolant: on a cell, with and the four displayed cubic basis polynomials.
Sum, product, quotient, and chain rules from difference quotients: for every integer , .
Proof
The basis values are , , and , . Substitution into [F1] gives and .
Differentiating the displayed basis using [F2] gives and . Since , differentiation of [F1] therefore gives and .
At a shared node , the left and right pieces both have value by step 1.1 and both have derivative by step 1.2. Thus the piecewise function and its first derivative match there; the one-sided endpoint statements follow from the same step 1.2 calculation.
Write a degree-at-most-three polynomial in the normalized coordinate as . For , its endpoint values are and scaled slopes are ; for , they are and ; for , they are and ; and for , they are and , by [F2] and the chain rule under . Substitution in [F1] gives , , , and . The formula is linear in endpoint values and slopes, so it reproduces their linear combination .
A sufficient monotonicity square for cubic Hermite interpolation
Statement
Let be the single Hermite piece from Piecewise cubic Hermite interpolant on , with , endpoint values , slopes , and secant . If and , both lie in , then is monotone from to and stays between those values. If and , then is constant.
Facts & Assumptions
Given: One Hermite cell with , endpoint values and slopes as in the statement.
Piecewise cubic Hermite interpolant: the cell is for .
The mean value theorem, as the case of Cauchy's: for continuous on with and differentiable on there is with : continuity on a closed interval and differentiability in its interior give for some interior whenever .
Sum, product, quotient, and chain rules from difference quotients: the integer power rule holds for .
Proof
For , differentiating [F1] by [F3], using and , gives . Indeed, , , and ; substitution produces those coefficients. Direct substitution in [F1] also gives and .
For put , , , and . These are nonnegative and sum to one. The polynomial in step 1.1 is affine in , so it equals the convex combination with these weights of its values at , namely , , , and . Each of these four polynomials is nonnegative on .
step 2.1 gives throughout the cell. If , ; if , . For any two points in the cell, [F2] transfers that derivative sign to , so is monotone; step 1.1 gives its endpoint values , so every value lies between them. If , then and [F1] reduces to , since and .
Remarks
The diagram uses horizontal coordinate and vertical coordinate ; the shaded square is the sufficient region . Its four vertices are the four derivative polynomials listed in proof step 2.1. The argument above proves the claim independently of the picture.
PCHIP slope selection
Definition
Inputs: An integer , strictly increasing real nodes , and real values . All operations here are over the real numbers.
Output: Slopes and the piecewise cubic Hermite interpolant determined by these nodes, values, and slopes under Piecewise cubic Hermite interpolant.
Put and for . Write for the sign of a real number.
- If , set .
- If , for each interior node , set when . When , put , , and
- For , at the left endpoint compute Set if . Otherwise set if and ; in all remaining cases set .
- For , at the right endpoint compute Apply the preceding clip and cap rule with replaced by and replaced by .
For , the algorithm returns the Hermite pieces from the stated values and selected slopes. The two-node branch is the line through the two input points.
Bernstein control values bound a piecewise polynomial
Statement
On each cell of a representation from Piecewise Bernstein representation, the polynomial value lies between the minimum and maximum of that cell's controls. In particular, nonnegative controls imply a nonnegative polynomial throughout the cell. If every cell has nonnegative controls and adjacent endpoint controls agree, the piecewise function is continuous and nonnegative on the entire partition. This is a control-value guarantee; positivity at a finite set of sample nodes alone is not among the hypotheses.
Facts & Assumptions
Given: A finite Bernstein representation over a real interval, with integer degrees and real control values.
Piecewise Bernstein representation: each basis term is and a cell polynomial is their finite weighted sum.
The binomial theorem in : : for real and a natural , .
The set of -element subsets and the binomial coefficient : each is a natural number, and .
Trichotomy of the order on : the order on naturals is total, so a natural is zero or positive.
The canonical natural of a field: the canonical embedding sends zero to zero and sends each successor to the previous image plus one.
Canonical naturals are positive and strictly increasing: in an ordered field, the canonical image of a positive natural is positive.
Laws of finite sums and finite products: finite sums preserve termwise inequalities, and finite products of nonnegative reals are nonnegative.
Every nonempty finite set of reals has a maximum and a minimum: every nonempty finite list of real numbers has both a maximum and a minimum.
Maximum and minimum of a set: a maximum (minimum) is an element of a set that bounds it above (below).
Integer powers : for every real and natural , and , including when .
Sums, scalar multiples, products, absolute values, maxima, minima and quotients with nonvanishing denominator of continuous functions are continuous, as are constants, the identity and every polynomial function: every polynomial function is continuous on any subset of .
Multiplication by zero: : zero times any real is zero.
Proof
Fix a cell and . Both and are nonnegative, so their natural powers are nonnegative by induction using the recursive definition [F10] and closure of nonnegative reals under multiplication. By [F3]–[F4], is a natural that is either zero or positive; [F5] sends its zero case to zero, and [F6] sends its positive case to a positive real. Thus every .
Apply [F2] with and . Since , [F10] and induction give , so the displayed Bernstein basis terms sum to one.
By [F8]–[F9], let and be the minimum and maximum of the finite control list. For each , [F1], step 1.1, and [F7] give : the control differences and basis weights are nonnegative, so their products are nonnegative. Summing with [F7] and using step 1.2 gives . Therefore nonnegative controls imply . Each is a polynomial in after substituting the affine local coordinate, so it is continuous on its cell by [F11]. For , [F3], [F5], [F10], step 1.2, and [F12] give and all other endpoint basis values zero; for the sole basis term is constantly one. Thus at a shared node . Given , the minimum of the two positive continuity radii for the adjacent cell restrictions then gives continuity of the piecewise function at that node; at cell interiors continuity follows from [F11], and at the outer endpoints it follows from the single adjacent cell restriction. Applying the bound cellwise gives nonnegativity throughout the partition.
PCHIP slope selection has no zero denominator
Statement
For every admissible input to PCHIP slope selection, each branch is defined over and every selected slope is finite; in particular, the algorithm never divides by zero.
Facts & Assumptions
Given: A finite strictly increasing real node list with at least two nodes and real data values.
PCHIP slope selection: widths are positive; the only interior division by a secant occurs when the two adjacent secants have positive product; endpoint formulas divide by a sum of positive widths; and the two-node branch uses one secant.
Proof
Each is positive, so every secant is defined and finite. In the two-node branch both slopes equal the already defined secant, and neither endpoint formula is evaluated. When , the endpoint denominators and exist and are positive.
The interior harmonic-mean branch is entered only when . Thus both secants are nonzero and have the same sign; the weights and are positive. The two terms and therefore have that same nonzero sign, so their sum is nonzero and finite. The endpoint clip and cap branches only compare finite real quantities and introduce no division. Hence every output slope is defined and finite.
PCHIP endpoint slopes lie in the Hermite monotonicity square
Statement
For any input to PCHIP slope selection, consider an interval with secant . If , the selected slopes at both endpoints of that interval are zero. If , then and both belong to .
Facts & Assumptions
Given: An admissible PCHIP input, its secants, and its selected slopes.
PCHIP slope selection: interior slopes are zero when adjacent secants have nonpositive product and otherwise use the positive-weight harmonic formula; endpoint slopes are clipped when their sign disagrees with the adjacent secant and capped at three times that secant when the adjacent secants have opposite signs.
PCHIP slope selection has no zero denominator: the algorithm's harmonic denominators are nonzero, and its selected slopes are finite.
Proof
At an interior node whose adjacent secants have nonpositive product, [F1] sets . If their product is positive, write and . Dividing the harmonic formula in [F1] by gives , which is positive and at most , because . Dividing instead by gives , since .
For a nonzero first secant, put . The raw endpoint ratio is . If , this ratio is at most ; clipping makes it zero if it is nonpositive. If , the ratio is greater than , and the cap branch reduces it to exactly when it exceeds . Thus the final ratio is in . If , the raw endpoint value is either zero or has sign different from , so the clip sets it to zero. The reflected argument proves the same bound at the right endpoint.
For two nodes both selected slopes equal , so they are zero when and their ratios to are otherwise. For , if , its interior endpoint slopes are set to zero by the nonpositive-product branch, and a first or last endpoint slope is zero by the clip rule. If , each of its endpoint slopes is either an interior slope covered by step 1.1 or an endpoint slope covered by step 1.2. These cases prove both alternatives in the statement.
PCHIP slopes are second-order accurate on uniform nonstationary grids
Statement
Let , let be on an open interval containing , and suppose for every . For an integer , put and for . Let be the slopes selected by PCHIP slope selection from the values . There are constants , depending on , , and , such that for every such grid with ,
Facts & Assumptions
Given: Reals , a real function on an open neighborhood of , a positive lower bound for on , an integer , and the uniform grid with .
PCHIP slope selection: interior slopes use the weighted harmonic formula when neighboring secants have the same nonzero sign; the one-sided endpoint estimate is , followed by a sign clip and an opposite-sign cap.
PCHIP slope selection has no zero denominator: for admissible inputs every selected slope is a finite real number and every formula denominator is nonzero.
Continuity and derivative on a real interval: on an open interval means derivatives through order three exist and are continuous there.
The mean value theorem, as the case of Cauchy's: for continuous on with and differentiable on there is with : for a function continuous on a closed interval and differentiable in its interior, its secant slope equals its derivative at some interior point.
Intermediate value theorem, by bisection with a canonical left-half rule: a continuous function on takes every value between and : a continuous real function on a closed interval takes every value between its endpoint values.
Taylor's theorem with an integral remainder: if derivatives through order are continuous, the degree- Taylor polynomial at has remainder bounded by when on the segment.
A continuous real function on a compact subset of is bounded: a continuous real function on a compact subset of is bounded there.
Heine-Borel by bisection: every closed bounded interval is compact: every closed interval with is compact.
Every nonempty finite set of reals has a maximum and a minimum: every finite list of real numbers has a maximum.
Proof
By [F3], is continuous. It cannot take both a positive and a negative value on , since [F5] would then give a zero of , contradicting . Thus has one sign throughout. On each grid cell [F4] gives for some interior , so all secants have that sign and . Since and , the grid is admissible for [F1], and [F8] makes compact. Since , , and are continuous by [F3], [F7] supplies with , , and on .
Fix an interior node and set and . Applying [F6] with degree two at to and and dividing the remainders by gives and , where . Since , for sufficiently small both secants stay bounded away from zero. The identity then gives, with a uniform constant, and .
On a uniform grid the two weights in [F1] are both , so the interior slope equals . The first-order terms in step 1.2 cancel, giving . Since , the leading term has magnitude at least ; thus the denominator stays bounded away from zero for sufficiently small , and its reciprocal yields with a constant uniform in .
At the left endpoint, [F6] at gives and , by expanding and . Therefore the raw endpoint estimate in [F1] is . For small it has the sign of ; step 1.1 gives that same sign for , so neither the sign clip nor the opposite-sign cap changes it. Reflecting the expansions at gives the identical error for .
The interior and endpoint estimates above use the bounds and on the fixed interval; their constants and smallness thresholds are therefore uniform in the node index. Taking a common maximum for the error constants and a common positive minimum for the thresholds gives valid at every interior node and both endpoints. The finite list , , has a maximum by [F9], and the uniform pointwise estimate bounds it by .
PCHIP is C1, monotone on each data segment, and has no interval overshoot
Statement
For every input to PCHIP slope selection, the resulting interpolant is and interpolates all input values. On each cell with nonzero secant , the interpolant is monotone from to and stays between those endpoint values; on a cell with it is constant. In particular, if the input values are nondecreasing (respectively nonincreasing), the complete interpolant is nondecreasing (respectively nonincreasing). No matching is asserted.
Facts & Assumptions
Given: Strictly increasing real nodes with arbitrary real data and the PCHIP slopes and pieces selected by PCHIP slope selection.
PCHIP slope selection: the procedure returns the Hermite pieces determined by its input values and selected slopes.
PCHIP slope selection has no zero denominator: all selected slopes are finite and the procedure's divisions are defined.
Interpolation, C1 matching, and cubic reproduction for Hermite pieces: shared nodal values and slopes give interpolation and matching.
A sufficient monotonicity square for cubic Hermite interpolation: normalized endpoint slopes in make a nonflat Hermite segment monotone between its endpoint values; zero secant and zero endpoint slopes make it constant.
PCHIP endpoint slopes lie in the Hermite monotonicity square: PCHIP has precisely those normalized-slope bounds on every cell, including the flat-cell case.
Proof
By [F2], the algorithm defines one finite slope at each input node. Its output consists of Hermite pieces sharing the same value and selected slope at each common node, so [F3] gives interpolation and matching.
Fix a cell with . By [F5], both slopes normalized by lie in ; [F4] therefore makes this piece monotone from to and keeps it between those values.
If , [F5] gives zero slopes at both endpoints, and [F4] makes that Hermite piece constant at its common endpoint value. For nondecreasing input, every , so each nonflat cell is nondecreasing by step 1.2, the flat cells are constant by the calculation above, and the pieces agree at nodes by step 1.1; concatenating the cells gives a nondecreasing function. The nonincreasing case is identical with all inequalities reversed.
PCHIP has third-order value accuracy on uniform nonstationary grids
Statement
Let , let be on an open interval containing , and suppose on . For each integer , put and , , and let be the PCHIP interpolant to the values . There are constants , depending only on , , and , such that for every such grid with , The assertion is limited to uniform grids and intervals on which the derivative stays bounded away from zero; it makes no third-order claim at an extremum.
Facts & Assumptions
Given: Reals , the stated function and derivative bound on , an integer , and the uniform grid with .
PCHIP slope selection: PCHIP uses the prescribed nodal values and selected slopes in the cubic Hermite formula.
PCHIP slope selection has no zero denominator: those slopes and pieces are finite and well-defined.
Piecewise cubic Hermite interpolant: on a cell the Hermite formula is the linear combination of with value and slope data.
Interpolation, C1 matching, and cubic reproduction for Hermite pieces: each Hermite piece interpolates its endpoint values and slopes; the resulting interpolant is on the closed interval (with one-sided endpoint derivatives); and each piece reproduces any cubic polynomial from its endpoint values and derivatives.
PCHIP slopes are second-order accurate on uniform nonstationary grids: for all sufficiently fine uniform grids, every PCHIP nodal slope differs from by at most for a constant independent of the cell.
Taylor's theorem with an integral remainder: the degree-two Taylor polynomial of a function has remainder at most on a cell of width when there. Applied to with degree one, the same theorem bounds its remainder by .
Continuity and derivative on a real interval: on an open interval means the derivatives through order three exist and are continuous there.
A continuous real function on a compact subset of is bounded: a continuous real function on a compact subset of is bounded there.
Heine-Borel by bisection: every closed bounded interval is compact: every closed interval with is compact.
Extreme value theorem: a continuous real function on a nonempty compact subset of attains a greatest and a least value: a continuous real function on a nonempty compact subset of attains its maximum and minimum.
Real and complex modulus product and triangle inequalities: the real triangle inequality; applying it twice gives .
Proof
Since and , the grid is admissible and is compact by [F9]. By [F7] and [F8], choose with on . Fix a cell and let be the degree-two Taylor polynomial of at . By [F6], the residual satisfies and, for every , ; at the right endpoint it also satisfies and . The derivative bound is [F6] applied to with degree one.
Let be the exact-derivative Hermite piece for on this cell. The PCHIP piece and have identical endpoint values. By [F3], their difference is . Since [F2] guarantees these PCHIP slopes are defined and , , [F5] gives for every in the cell.
For this exact-derivative Hermite piece , linearity of the formula [F3] and reproduction [F4] give , where . On , and , so . Together with from step 1.1, this yields for every in the cell.
Combining steps 2.1 and 1.2 gives for every , since the cells cover the interval. The constants do not depend on or ; put . To justify the maximum in the statement, admissibility of the grid for [F1] gives , so . By [F4], is and hence continuous on ; by [F7], is continuous there. Set . For , applying the triangle inequality twice gives , so is continuous on . By [F9], is compact, and it is nonempty; [F10] therefore gives a point where attains its maximum. The pointwise bound just proved bounds that maximum by .
5 · Examples, counterexamples and false statements
None yet.
Sources
- Carl R. de Boor, A Practical Guide to Splines, revised edition, Chapter IV, pp. 39–40
- Rida T. Farouki, The Bernstein polynomial basis: a centennial retrospective, Computer Aided Geometric Design 29 (2012), pp. 379–419
- F. N. Fritsch and J. Butland, A Method for Constructing Local Monotone Piecewise Cubic Interpolants, SIAM Journal on Scientific and Statistical Computing 5 (1984), pp. 300–304
- SciPy v1.18.0, PchipInterpolator documentation, Notes