def nodiv
import bend-collections-laws-math@1.0.0.0/spec/math/number.bend as Numberimport Base
65# no d in [d, d + k) divides n
66def nodiv(k: Nat, +n: Nat, +d: Nat) -> Bool:
67 match k:
68 case 0n:
69 True{}
70 case 1n+p:
71 Bool.and(Bool.not(Nat.is_eq(Nat.mod(n, d), 0n)), nodiv(p, n, 1n+d))
Uses (6)
Used by (12)
- bend-collections-laws-math@1.0.0.0/spec/math/number:prime
- bend-collections-laws-math@1.0.0.0/proofs/math/number/prime:is_prime_value
- bend-collections-laws-math@1.0.0.0/proofs/math/number/prime:at_c
- bend-collections-laws-math@1.0.0.0/proofs/math/number/prime:big
- bend-collections-laws-math@1.0.0.0/proofs/math/number/prime:c_small
- …