Alphabeta Math
Pipeline-generated
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.

✓ 3 results · all verified · 3 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs; all 3 also cleared it.

Automatic differentiation and backpropagation — Examples

1 · Prerequisites

2 · Logical flowchart

3 · Definitions, theorems and proofs

None yet.

4 · Examples, counterexamples and false statements

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

Checkpointed reverse sweep recomputes an intermediate

Example

For x∈R, take the two-transition real-arithmetic computation x1=F1(x)=x2, x2=F2(x1)=sin⁡(x1), with scalar output f(x)=x2. Both transitions are C1 on R. Run the uniform-block checkpoint schedule with T=2 and one saved-state slot m=1. The schedule stores the initial state, recomputes x1 when reversing F2, and returns the same derivative as an uncheckpointed reverse pass: f′(x)=2xcos⁡(x2).

Facts & Assumptions

Given: The two C1 transitions, initial state x, and uniform-block schedule with T=2 and m=1.

[F1]

Uniform-block and binomial checkpoint schedules for reverse sweeps: uniform-block mode saves its scheduled checkpoints, restores a block start, replays the transitions needed to reach each step, records that step's local tape, and reverses the step.

[F2]

Uniform-block and binomial checkpoint schedules preserve reverse adjoints with stated costs: when deterministic replays stay in the declared domains, uniform-block checkpointing returns the same terminal value and initial-state cotangent as the uncheckpointed reverse sweep.

[F3]

The chain rule for total derivatives: D(g∘f)(a)=Dg(f(a))∘Df(a): the derivative of a composition of totally differentiable maps is the ordered composition of their total derivatives.

[F4]

Chain sum product and composition rules for Banach derivatives: on the real Banach space R, multiplication (a,b)↦ab is bounded bilinear because ∣ab∣≤∣a∣∣b∣, and the identity map has Fréchet derivative 1. Applying the bounded-bilinear product rule to two identity maps gives D(x↦x2)=2x, a continuous derivative.

[F5]

The derivatives of sine and cosine are cosine and minus sine: on R, D(sin⁡u)=cos⁡u and D(cos⁡u)=−sin⁡u for every u∈R; these one-dimensional derivatives are total derivatives.

[F6]

Total differentiability gives a local O(∥h∥2) increment bound and therefore continuity: a totally differentiable map on R is continuous; in particular, cos⁡ is continuous because it is differentiable by [F5], so u↦sin⁡u is C1.

Verification

1.1F1givenconstructalgebra

Here q=⌈T/m⌉=2, so the uniform-block schedule stores only x0=x and has one block [0,2]. In the reverse pass it first restores x0 and replays F1, obtaining x1=x2 before recording the local tape for F2; it then restores x0 again to process F1. Both transitions are defined on all of R, so every replay stays in its declared domain.

2.1F1F4F5step 1.1algebra

Starting with output cotangent xˉ2=1, the local derivative of F2 gives xˉ1=cos⁡(x2) by [F5], and the local derivative of F1 gives xˉ0=2xcos⁡(x2) by [F4]. This includes x=0, where the derivative is 0, and x=1, where it is 2cos⁡(1).

3.1F2F3step 2.1algebraF6∎

The deterministic replay preserves the local inputs and reverse rules, so [F2] identifies the returned cotangent with the uncheckpointed derivative; [F3] gives f′(x)=F2′(F1(x))F1′(x)=cos⁡(x2) 2x, the same value. The example shows a recomputation trade-off and asserts no schedule optimality.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

A ReLU kink has no classical backpropagated derivative

Example

Let r(u)=max⁡{0,u}, with r(0)=0, and consider the one-step scalar objective J(θ)=r(θ) represented by initial state h0(θ)=θ, transition h1=r(h0), and loss ℓ(θ,h1)=h1. The ReLU transition is C1 on each of the open regions u<0 and u>0, with its value specified at u=0. At θ=0, J has no classical derivative, and the stated forward-, reverse-, and recurrence-backpropagation procedures return NONDIFFERENTIABLE with no tangent or gradient rather than selecting a subgradient.

Facts & Assumptions

Given: The one-step graph at θ=0 with ReLU transition r(u)=max⁡{0,u}.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: for a piecewise-C1 primitive, a branch-boundary input returns NONDIFFERENTIABLE; the definition does not silently choose a subgradient or generalized derivative.

[F2]

Backpropagation through a finite shared-parameter recurrence: on a piecewise-C1 map the recurrence procedure uses a derivative only on a unique strict active branch and returns NONDIFFERENTIABLE at a boundary.

[F3]

Forward-mode automatic differentiation on a finite computational graph: a forward-mode input on a branch boundary returns NONDIFFERENTIABLE and no tangent.

[F4]

Reverse-mode automatic differentiation for a scalar graph output: a reverse-mode input on a branch boundary returns NONDIFFERENTIABLE and no gradient.

Verification

1.1givenchoosealgebra

Since J(0)=0, for every h<0 the difference quotient (J(h)−J(0))/h equals 0, while for every h>0 it equals 1. The two one-sided limits differ, so J is not differentiable at 0.

1.2F1given

The executed ReLU primitive receives h0=0, the boundary between its u<0 and u>0 branches. By [F1] this input has no selected strict branch.

2.1F2F3step 1.2

At that boundary, the recurrence procedure in [F2] and the forward procedure in [F3] both return NONDIFFERENTIABLE and no derivative value.

2.2F4step 1.2

The reverse procedure in [F4] also returns NONDIFFERENTIABLE and no gradient at this boundary.

3.1step 1.1step 2.1step 2.2∎

This boundary status agrees with step 1.1: there is no classical derivative for these procedures to propagate, and their specified output does not invent one.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

Backpropagation through a two-layer network with a shared weight

Example

Take a scalar-input, one-hidden-unit, scalar-output two-layer feedforward network with identity activations and zero biases, and constrain both layer weights to be the same real parameter θ. For input x∈R, its hidden value is h1=θx, its output is y=θh1=θ2x, and the scalar loss is J(θ)=12y2. Backpropagation accumulates the two uses of θ and returns dJdθ=2θ3x2, including the zero cases x=0 or θ=0.

Facts & Assumptions

Given: The two-layer scalar network, the tied layer weight θ, input x, identity activations, zero biases, and loss J=12y2.

[F1]

Finite feedforward computation graphs and layered MLPs: a layered perceptron evaluates a finite acyclic graph by applying each vertex's activation to its bias plus the weighted sum of its parents; output vertices may use the identity activation.

[F2]

Backpropagation through a finite shared-parameter recurrence: for a repeated transition using the same θ, reverse mode adds each transition's parameter pullback to a single parameter-gradient accumulator.

[F3]

Reverse accumulation sums gradients over shared parameter uses: the reverse recurrence returns the loss's direct parameter derivative plus all transition-use contributions and the initial-state contribution.

[F4]

Chain sum product and composition rules for Banach derivatives: on the real Banach space R, multiplication (a,b)↦ab is bounded bilinear because ∣ab∣≤∣a∣∣b∣. The coordinate projections on R2 are bounded linear, hence Fréchet differentiable. Applying the product rule to the projections of (θ,h) gives DθΦt=ht−1 and DhΦt=θ; applying it to ℓ(θ,z)=12z2 gives Dθℓ=0 and Dzℓ=z. These derivative factors are continuous, so the transitions and loss satisfy the recurrence's C1 premise.

Verification

1.1F1givenconstructalgebra

The network is the two-step recurrence h0=x, h1=Φ1(θ,h0)=θh0, h2=Φ2(θ,h1)=θh1, with loss J=12h22. Hence h1=θx, h2=θ2x, and J=12θ4x2.

2.1F2F3F4step 1.1algebra

By [F4], the loss gives λ2=h2 and its direct parameter contribution is zero; both transition pullbacks have DθΦt=ht−1 and DhΦt=θ. Thus the t=2 use adds h1h2, the t=1 use adds h0(θh2), and h0=x has zero parameter derivative. Their sum is θ3x2+θ3x2=2θ3x2, including x=0 or θ=0.

3.1F3F4step 1.1step 2.1algebra∎

Applying the product rule [F4] repeatedly to the scalar expression from step 1.1 gives J′(θ)=2θ3x2, equal to the reverse accumulation in step 2.1. For x=1 and θ=1, both calculations give 2.