def lcm
import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as Naturalimport Base
62def lcm(+a: Nat, +b: Nat) -> Nat:
63 match a b:
64 case 0n _:
65 0n
66 case 1n+ap 0n:
67 0n
68 case 1n+ +ap 1n+ +bp:
69 Nat.mul(Nat.div(1n+ap, gcd(1n+ap, 1n+bp)), 1n+bp)
Uses (4)
Used by (23)
- bend-collections-laws-math@1.0.0.0/spec/math/generic:lcm_go
- bend-collections-laws-math@1.0.0.0/spec/math/generic:Lcm.checked
- bend-collections-laws-math@1.0.0.0/src/math/natural:lcm_all_go
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/lcm:lcm_pos
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/lists:lw_acc
- …