def wide_okb
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/curve25519/mulw.bend:105
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/mulw.bend as Mulw
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/curve25519/field.bend as F
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/nat.bend as N
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/word.bend as WD
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/limbs.bend as LM
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/poly.bend as PL
105def wide_okb(+one: Nat, +h1: {one == 1n : Nat}, +zs: List<&2, U32>, +hl: {LM.lea(zs, WD.sc(21n, one)) == True{} : Bool}, +hge: {PL.len_ge(32n, zs) == True{} : Bool}, +hle: {PL.len_le(64n, zs) == True{} : Bool}) -> {LM.okb(32n, F.wide(zs), WD.sc(28n, one)) == True{} : Bool}:
106 +k21 = WD.sc(21n, one)
107 +T = F.take(32n, zs)
108 +D = F.drop(32n, zs)
109 +okT = PL.take_okb(32n, zs, k21, hge, hl)
110 +leD = PL.drop_lea(32n, zs, k21, hl)
111 +lnD = PL.drop_len_le(32n, 32n, zs, hle)
112 +leS = PL.scal_lea(one, h1, 38, D, 38n, k21, N.le_refl(38n), leD, m38_lt(one, h1))
113 +lnS = PL.scal_len_le(32n, 38, D, lnD)
114 +e = PL.addl_okb(one, h1, 32n, T, F.scal(38, D), k21, Nat.mul(38n, k21), okT, leS, lnS, wsum_lt(one, h1))
115 PL.okb_mono(32n, F.addl(T, F.scal(38, D)), Nat.add(k21, Nat.mul(38n, k21)), WD.sc(28n, one), wsum_le(one, h1), e)