AFTD Auto-Formalizing Theoretical Domains

op2130_height_step

def

One greedy update of a path cumulative-height profile at an interior site, using the supplied coin for a tie.

Statement

def op2130_height_step (h : ℕ → ℤ) (p : ℕ) (coin : Bool) : ℕ → ℤ
Source
OP-2130, path cumulative heights
Verified
23 Nov 2026
Axioms
none listed
Used by 9
  • op2130_height_clearA signed unit height between a zero height and another signed unit height is forced to zero.
  • op2130_height_majority_gateTwo isolated signed unit heights separated by one zero can be combined into a single isolated majority signal in three updates.
  • op2130_height_gateUpdating a zero height between two independent signed unit heights gives their majority with the supplied tie coin.
  • op2130_height_wireAn isolated sign moves one site to the right in two forced height updates when the adjacent three sites are zero.
  • op2130_height_two_level_resetWhen a site and its two neighbors have heights in {-1,1}, two consecutive greedy height updates replace the site with the common neighbor…
  • op2130_load_spatial_correctThe even and odd bit-loading gadgets set exactly the desired local Boolean signal and gate value while leaving every other height…
  • op2130_path_height_step_bridgeFor a left-to-right path request, the cumulative discrepancy profile after the greedy update is exactly the local height update at the…
  • op2130_height_double_localTwo consecutive updates at one path height affect only that site, and their center value is the corresponding two-step scalar gate.
  • op2130_height_clear_mirrorA signed unit height between another signed unit height and a zero height is forced to zero.

Lean source view module on GitHub

def op2130_height_step (h : ℕ → ℤ) (p : ℕ) (coin : Bool) : ℕ → ℤ := Function.update h p (h p +
    if 2 * h p < h (p - 1) + h (p + 1) then 1
    else if h (p - 1) + h (p + 1) < 2 * h p then -1
    else if coin then 1 else -1)
See it in the graphDiscuss this resultChallenge it