def lcm_dw
import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lcm.bend as Lcmimport Base
import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/gcd.bend as G
191# the quotient m / lcm(a, b) for a common multiple m == x a == y b
192def lcm_dw(+a: Nat, +b: Nat, +m: Nat, +x: Nat, +y: Nat) -> Nat:
193 match a b:
194 case 0n _:
195 0n
196 case 1n+ap 0n:
197 0n
198 case 1n+ +ap 1n+ +bp:
199 G.dw(Nat.mul(m, 1n+bp), Nat.mul(m, 1n+ap), Nat.mul(m, 1n+bp), y, x)
Uses (3)
Used by (5)
- bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lists:lw_mul
- bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lcm:lcm_dvd
- bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lcm:lcm_dvd_pos
- bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/lists:l_mul
- bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/proof:least