def take_eq
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/ed25519/bytes.bend:25
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/ed25519/bytes.bend as Bytes
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/ed25519.bend as SE
import bend-collections-laws-crypto@1.0.0.0/src/crypto/curve25519/field.bend as F
25def take_eq(+n: Nat, +xs: List<&2, U32>) -> {F.take(n, xs) == SE.first(n, xs) : List<&2, U32>}:
26 match n:
27 case 0n:
28 {==}
29 case 1n+ +m:
30 match xs:
31 case Nil{}:
32 {==}
33 case Con{+x, +xt}:
34 Equal.cong(List<&2, U32>, List<&2, U32>, z => Con{x, z}, F.take(m, xt), SE.first(m, xt), take_eq(m, xt))