def okb_lea
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/curve25519/limbs.bend:79
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/limbs.bend as Limbs
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/logic.bend as L
79def okb_lea(+n: Nat, +xs: List<&2, U32>, +b: Nat, +e: {okb(n, xs, b) == True{} : Bool}) -> {lea(xs, b) == True{} : Bool}:
80 match n xs:
81 case 0n Nil{}:
82 {==}
83 case 0n Con{x, xt}:
84 Empty.absurd({lea(Con{x, xt}, b) == True{} : Bool}, L.false_true(e))
85 case 1n+m Nil{}:
86 Empty.absurd({lea(Nil{}, b) == True{} : Bool}, L.false_true(e))
87 case 1n+ +m Con{+x, +xt}:
88 L.and_intro(Nat.is_le(v(x), b), lea(xt, b), okb_head(m, x, xt, b, e), okb_lea(m, xt, b, okb_tail(m, x, xt, b, e)))