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.

✓ 4 results · all verified · 1 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. The 3 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Automatic differentiation and computational graphs — Examples

1 · Prerequisites

2 · Summary

These examples trace the same real-arithmetic rules used on the main page. They show a shared intermediate used twice, reverse propagation through a two-step Euler trajectory, an adjoint formula for a parameter-dependent linear solve, and the status returned when an absolute-value branch is not strict.

3 · Logical flowchart

4 · Definitions, theorems and proofs

None yet.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passOpen item page →

Branchwise AD for absolute value and the nondifferentiable switch

Example

The primitive f(x)=∣x∣ has two strict branches: f(x)=x for x>0 and f(x)=−x for x<0. Branchwise AD returns derivative 1 on the positive branch and −1 on the negative branch. At the switch x=0 it returns NONDIFFERENTIABLE.

Facts & Assumptions

Given: The absolute-value primitive with the two strict branch formulas.

[F1]

Finite straight-line computational programs and real-arithmetic tapes: a piecewise primitive uses the derivative of its unique strict active branch and returns NONDIFFERENTIABLE at a branch boundary.

Proof

technique · one-sided difference quotients
1.1F1givenalgebra

For x>0, the active formula is f(x)=x, whose derivative is 1; for x<0, the active formula is f(x)=−x, whose derivative is −1. These are the two derivatives used by the strict-branch rule in [F1].

1.2givenalgebra

At zero, the right difference quotient is (∣h∣−0)/h=1 for h>0, while the left quotient is (∣h∣−0)/h=−1 for h<0. Since the one-sided limits differ, the derivative does not exist at zero.

2.1F1step 1.2∎

By [F1], the branch boundary therefore returns NONDIFFERENTIABLE and no derivative; selecting a generalized derivative would require a separately supplied rule.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passOpen item page →

An implicit linear solve and its adjoint gradient

Example

Let A(θ)=[1θ01], b=(2,1)T, and define u(θ) by A(θ)u(θ)=b. For the scalar objective J(θ)=[11]u(θ), at θ=0 the exact derivative and the adjoint formula both equal −1.

Facts & Assumptions

Given: A square linear residual with an invertible state Jacobian and a scalar objective.

[F1]

Implicit differentiation and adjoint formulas under a nonsingular residual Jacobian: if Rz is nonsingular, the branch derivative is −Rz−1Rθ and the objective gradient can be computed from RzTλ=JzT as Jθ−λTRθ.

[F2]

Certified inverse defects and primal residuals bound linear-solve Jacobian and pullback errors supplies the certified fixed-map derivative discrepancy from inverse defects and primal residuals.

Verification

technique · direct solve and adjoint substitution
1.1givenalgebra

The system gives u2=1 and u1+θu2=2, hence u(θ)=(2−θ,1)T and J(θ)=3−θ. Therefore J′(0)=−1.

2.1givenstep 1.1algebra

Write R(u,θ)=A(θ)u−b. At θ=0, u=(2,1)T, Ru=A(0)=I, Rθ=Aθu=(1,0)T, and Ju=(1,1). The adjoint equation RuTλ=JuT gives λ=(1,1)T.

3.1F1step 2.1algebra

The objective has no explicit θ dependence, so Jθ=0; the adjoint formula gives Jθ−λTRθ=−(1,1)⋅(1,0)=−1.

4.1step 1.1step 3.1

The adjoint result agrees with the direct derivative in step 1.1, verifying this nonsingular linear-solve instance.

5.1F2step 1.1step 2.1step 3.1algebra∎

In any arithmetic satisfying the operationwise model and representing 0,1,2,3, with these small operations in range, at θ=0 the primal and basis solves give x^=(2,1)T and B=I exactly. Their inverse defect and primal residual are zero. The certified solve-Jacobian result Certified inverse defects and primal residuals bound linear-solve Jacobian and pullback errors therefore gives zero fixed-map discrepancy; the actual dot and product operations here are also exact, and return derivative −1.

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

Reverse-mode differentiation of an Euler trajectory tape

Example

Take two explicit Euler updates for x′=αx with step h=1/2, initial state x0=1, and scalar output J=x2: xk+1=xk+hαxk,k=0,1. At α=1, the tape has x1=3/2 and x2=9/4; reverse mode returns dJ/dα=3/2.

Facts & Assumptions

Given: The two-step Euler graph, x0=1, h=1/2, α=1, and output J=x2.

[F1]

Reverse-mode automatic differentiation for a scalar graph output: for each transition, reverse mode applies its local transpose derivative to the incoming cotangent and adds parameter contributions.

[F2]

Reverse mode computes the exact gradient of the real-arithmetic graph: the returned parameter cotangent equals the exact derivative of this scalar graph.

Verification

technique · direct recurrence and reverse tape
1.1givenalgebra

Substitution into the two Euler updates gives x1=1+(1/2)(1)(1)=3/2 and x2=(3/2)+(1/2)(1)(3/2)=9/4. As a function of α, J(α)=(1+hα)2x0, so J′(1)=2h(1+h)x0=3/2.

2.1F1step 1.1algebra

Seed xˉ2=1. At step k=1, ∂x2/∂x1=1+hα=3/2 and ∂x2/∂α=hx1=3/4, so xˉ1=3/2 and the accumulated αˉ=3/4.

3.1F1step 2.1algebra

At step k=0, ∂x1/∂x0=3/2 gives xˉ0=(3/2)(3/2)=9/4, while ∂x1/∂α=hx0=1/2 adds (1/2)(3/2)=3/4 to αˉ. Thus the total parameter cotangent is 3/2.

4.1F2step 1.1step 3.1∎

The reverse result equals the direct derivative in step 1.1, and [F2] identifies it as the derivative of the finite trajectory map.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passOpen item page →

Forward and reverse derivatives on a shared-expression graph

Example

Consider the real-arithmetic graph z1=x+y,z2=z1z1,z3=xy,f=z2+z3. At (x,y)=(1,2) it has output f=11. Both forward and reverse mode should give gradient (8,7); the repeated parent slot in z2 tests that its two edge contributions are both accumulated.

Facts & Assumptions

Given: The graph and input (x,y)=(1,2).

[F1]

Finite straight-line computational programs and real-arithmetic tapes: repeated parent slots count as separate edges in the finite real-arithmetic graph.

[F2]

Forward mode computes the exact directional derivative of the real-arithmetic graph: forward mode returns Df(x,y)(u,v) for any direction (u,v).

[F3]

Reverse mode computes the exact gradient of the real-arithmetic graph: reverse mode returns the exact input gradient of the scalar graph output.

Proof

technique · direct tape evaluation
1.1F1givenalgebra

The primal values are z1=1+2=3, z2=3⋅3=9, z3=1⋅2=2, and f=z2+z3=11.

2.1F1F2step 1.1algebra

For direction (u,v), forward mode gives z˙1=u+v, z˙2=z1z˙1+z˙1z1=6(u+v), z˙3=yu+xv=2u+v, hence f˙=8u+7v. By [F2], the gradient is (8,7).

2.2F1F3step 1.1algebra

In reverse mode, seed fˉ=1, so zˉ2=zˉ3=1. The product z3=xy adds 2 to xˉ and 1 to yˉ. The repeated slots in z2=z1z1 add z1+z1=6 to zˉ1; then z1=x+y adds 6 to each input. The total input cotangents are (8,7), consistent with [F3].

3.1step 1.1step 2.1step 2.2∎

The forward value 11 and both derivative calculations agree with the stated output and gradient.

Sources