QueueProof.key_flip: def of bend-kit-scheduler@0.4.1.0 Import: import bend-kit-scheduler@0.4.1.0/queue_proof.bend as QueueProof Lines 57-66 of bend-kit-scheduler@0.4.1.0/queue_proof.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-scheduler@0.4.1.0/queue_proof.bend&start_line=57&end_line=66 import Base import bend-mathlib@0.7.4.0/nat.bend as MNat import bend-mathlib@0.7.4.0/bool.bend as MBool import bend-kit-scheduler@0.4.1.0/queue.bend as Q def key_flip(+d: Nat, +e: Nat, +i: Nat, +j: Nat, p: {Q.le.same(Nat.is_eq(d, e), i, j, d, e) == False{} : Bool}) -> {Q.le.same(Nat.is_eq(e, d), j, i, e, d) == True{} : Bool}: match d e: case 0n 0n: MNat.le_of_lt(j, i, MNat.lt_of_not_le(i, j, p)) case 0n 1n+q: Empty.absurd({False{} == True{} : Bool}, MBool.true_ne_false()(p)) case 1n+r 0n: {==} case 1n+r 1n+q: key_succ.conclusion(q, r, j, i, key_flip(r, q, i, j, key_succ.premise(r, q, i, j, False{}, p))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue.bend&name=le.same https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_proof.bend&name=key_succ.conclusion https://jend.leeeet.dev/definition.txt?path=bend-kit-scheduler@0.4.1.0/queue_proof.bend&name=key_succ.premise https://jend.leeeet.dev/definition.txt?path=bend-mathlib@0.8.1.0/bool.bend&name=true_ne_false https://jend.leeeet.dev/definition.txt?path=bend-mathlib@0.8.1.0/nat.bend&name=le_of_lt https://jend.leeeet.dev/definition.txt?path=bend-mathlib@0.8.1.0/nat.bend&name=lt_of_not_le