def dup_rr_lcm(f, g, K):
 (fc, f) = dup_primitive(f, K)
 (gc, g) = dup_primitive(g, K)
 c = K.lcm(fc, gc)
 h = dup_quo(dup_mul(f, g, K), dup_gcd(f, g, K), K)
 return dup_mul_ground(h, c, K)

def dup_rr_lcm ( f , g , K ) : ( fc , f ) = dup_primitive ( f , K ) ( gc , g ) = dup_primitive ( g , K ) c = K . lcm ( fc , gc ) h = dup_quo ( dup_mul ( f , g , K ) , dup_gcd ( f , g , K ) , K ) return dup_mul_ground ( h , c , K )
computes polynomial lcm over a ring in k[x] .