def scal_len_le

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/curve25519/poly.bend:239

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/poly.bend as Poly
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/logic.bend as L

239def scal_len_le(+n: Nat, +x: U32, +ys: List<&2, U32>, +e: {len_le(n, ys) == True{} : Bool}) -> {len_le(n, F.scal(x, ys)) == True{} : Bool}:
240  match n ys:
241    case 0n Nil{}:
242      {==}
243    case 0n Con{y, yt}:
244      Empty.absurd({len_le(0n, F.scal(x, Con{y, yt})) == True{} : Bool}, L.false_true(e))
245    case 1n+m Nil{}:
246      {==}
247    case 1n+ +m Con{y, +yt}:
248      scal_len_le(m, x, yt, e)

Uses (8)

Used by (2)