def bitw.ffs_low

bend-osdev-algo@0.1.0.0 · PROOF.bend:251

import bend-osdev-algo@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-algo@0.1.0.0/algo.bend as A

251def bitw.ffs_low(n: Nat, w: Word(n), j: Nat) -> {Bool.and(bitw.below(j, A.bitw.ffs(n, w)), A.bitw.test(n, w, j)) == False{} : Bool}:
252  match n:
253    case 0n:
254      {==}
255    case 1n+ +p:
256      match w j:
257        case WCon{True{}, t} 0n:
258          {==}
259        case WCon{True{}, t} 1n+q:
260          {==}
261        case WCon{False{}, t} 0n:
262          bitw.ffs_low.z(A.bitw.ffs(p, t))
263        case WCon{False{}, +t} 1n+ +q:
264          bitw.ffs_low.s(p, t, A.bitw.ffs(p, t), q, bitw.ffs_low(p, t, q))

Uses (10)

Used by (1)