Nice catch. This looks like an issue with ufl
printing.
If you try the following:
import ufl
x = ufl.Constant(ufl.triangle)
y = ufl.Constant(ufl.triangle)
f = (1./(x*y))
print type(f)
for o in f.ufl_operands:
print o
you should see:
<class 'ufl.algebra.Division'>
1.0
w_0 * w_1
So the maths is correct, the printing is misleading.