def okb_len_ge

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

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

79def okb_len_ge(+n: Nat, +xs: List<&2, U32>, +b: Nat, +e: {LM.okb(n, xs, b) == True{} : Bool}) -> {len_ge(n, xs) == True{} : Bool}:
80  match n xs:
81    case 0n Nil{}:
82      {==}
83    case 0n Con{y, yt}:
84      {==}
85    case 1n+m Nil{}:
86      Empty.absurd({len_ge(1n+m, Nil{}) == True{} : Bool}, L.false_true(e))
87    case 1n+ +m Con{+y, +yt}:
88      okb_len_ge(m, yt, b, LM.okb_tail(m, y, yt, b, e))

Uses (9)

Used by (2)