RecurrenceLaws.last_due: law of bend-kit-scheduler@0.4.1.0 Import: import bend-kit-scheduler@0.4.1.0/recurrence_laws.bend as RecurrenceLaws Lines 54-63 of bend-kit-scheduler@0.4.1.0/recurrence_laws.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-scheduler@0.4.1.0/recurrence_laws.bend&start_line=54&end_line=63 import Base # The last skipped/replayed rate tick is not in the future (when the previous # scheduled tick has completed). Together with future_deadline this proves # the returned deadline is the first future anchored tick, not just any one. law last_due: for +previous: Nat for +completion: Nat for +p: Nat for h: {Nat.is_le(previous, completion) == True{} : Bool} {Nat.is_le(Nat.add(previous, Nat.mul(Nat.div(Nat.sub(completion, previous), 1n+p), 1n+p)), completion) == True{} : Bool} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/recurrence_proof.bend&name=due_tick https://jend.leeeet.dev/definition.txt?path=bend-mathlib@0.8.1.0/nat.bend&name=le_refl