def cauchy_conj_components(v, z, w):
    """ Assumes z is pure imaginary (as in S4 with bilinear) """

    expr_num = 'Imag2Complex(zi*vr) - Real2Complex(vr*wr + vi*wi)'
    expr_denom = 'Real2Complex(Square(wr)+Square(wi)-Square(zi)) - Imag2Complex(IntCst(2)*zi*wr)'
    cauchy_mult = Genred(
        f'ComplexDivide({expr_num}, {expr_denom})',
        [
            'vr = Vj(1)',
            'vi = Vj(1)',
            'wr = Vj(1)',
            'wi = Vj(1)',
            'zi = Vi(1)',
        ],
        reduction_op='Sum',
        axis=1,
    )

    v, z, w = _broadcast_dims(v, z, w)
    v = v.unsqueeze(-1)
    z = z.unsqueeze(-1)
    w = w.unsqueeze(-1)

    v_r, v_i = v.real.contiguous(), v.imag.contiguous()
    w_r, w_i = w.real.contiguous(), w.imag.contiguous()
    z_i = z.imag.contiguous()

    r = 2*cauchy_mult(v_r, v_i, w_r, w_i, z_i, backend='GPU')
    return _r2c(r)
 Assumes z is pure imaginary (as in S4 with bilinear) 
analyze/convnexts4nd/src/models/functional/cauchy.py