def addl_len_ge

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

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

157def addl_len_ge(+n: Nat, +xs: List<&2, U32>, +ys: List<&2, U32>, +e: {len_ge(n, xs) == True{} : Bool}) -> {len_ge(n, F.addl(xs, ys)) == True{} : Bool}:
158  match n xs ys:
159    case 0n _ _:
160      {==}
161    case 1n+m Nil{} _:
162      Empty.absurd({len_ge(1n+m, ys) == True{} : Bool}, L.false_true(e))
163    case 1n+m Con{x, xt} Nil{}:
164      e
165    case 1n+ +m Con{x, +xt} Con{y, +yt}:
166      addl_len_ge(m, xt, yt, e)

Uses (8)

Used by (1)