Lrw.cr.lrw.inc: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/lrw.bend as Lrw Lines 52-62 of bend-osdev-crypto@0.1.0.0/lrw.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&start_line=52&end_line=62 import Base import bend-osdev-gf@0.1.0.0/gf128.bend as G # i + 1, modulo 2^128 def cr.lrw.inc(i: G.Gf128) -> G.Gf128: match i: case G.Gf128{w0, w1, w2, w3}: +a3 = U32.add(w3, 1) +c3 = U32.is_eq(a3, 0) +a2 = cr.lrw.carry(c3, w2) +c2 = Bool.and(c3, U32.is_eq(a2, 0)) +a1 = cr.lrw.carry(c2, w1) +c1 = Bool.and(c2, U32.is_eq(a1, 0)) G.Gf128{cr.lrw.carry(c1, w0), a1, a2, a3} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&name=cr.lrw.carry https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gf128.bend&name=Gf128