Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2, pp. 600–601 and 604 — make heap, find min and meld leave the potential unchanged; insert raises it by one

Proved
FibHeap.Amort.potential_makeHeap_findMin_insert_meld

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

amortized-analysisfibonacci-heapp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1potential-function

Let Φ\PhiΦ be the potential of a collection of F-heaps: the number of trees plus twice the number of marked nonroot nodes. If a collection S\mathcal SS becomes S′\mathcal S'S′ by one operation, then

  1. for a make heap, find min or meld operation, Φ(S′)=Φ(S)\Phi(\mathcal S') = \Phi(\mathcal S)Φ(S′)=Φ(S);
  2. for an insert operation, Φ(S′)=Φ(S)+1\Phi(\mathcal S') = \Phi(\mathcal S) + 1Φ(S′)=Φ(S)+1.

Since each of these operations costs one unit, their amortized time is O(1)O(1)O(1).

Formalization Note No reachability hypothesis is needed: the identity holds for every collection on which the operation can be performed.

Preamble
import Mathlib
import Definitions.Def_FibHeap_Amort_Model
Formal statement
namespace FibHeap.Amort
theorem potential_makeHeap_findMin_insert_meld (s s' : Coll) (op : Op) (d : StepData)
    (hstep : Step s op s' d) :
    ((op = .makeHeap ∨ (∃ h, op = .findMin h) ∨ (∃ h₁ h₂, op = .meld h₁ h₂)) →
        potential s' = potential s) ∧
      (∀ (i : ℕ) (k : ℝ) (h : ℕ), op = .insert i k h →
        potential s' = potential s + 1) := by sorry
end FibHeap.Amort
Source
Fredman and Tarjan, Fibonacci heaps and their uses in improved network optimization algorithms, J. ACM 34 (1987), pp. 600–601 and p. 604, §2
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me