docs: def rotate_down(C_in, p):
      """Redefinition of all Wilson coefficients in the JMS basis when rotating
      down-type quark fields from the flavour to the mass basis.
  
      C_in is expected to be an array-valued dictionary containg a key
      for all Wilson coefficient matrices."""
      C = C_in.copy()
      V = ckmutil.ckm.ckm_tree(p["Vus"], p["Vub"], p["Vcb"], p["delta"])
      UdL = V
      ## B conserving operators
      # type dL dL dL dL
      for k in ['VddLL']:
          C[k] = np.einsum('ia,jb,kc,ld,ijkl->abcd',
                           UdL.conj(), UdL, UdL.conj(), UdL,
                           C_in[k])
      # type X X dL dL
      for k in ['V1udLL', 'V8udLL', 'VedLL', 'VnudLL']:
          C[k] = np.einsum('kc,ld,ijkl->ijcd',
                           UdL.conj(), UdL,
                           C_in[k])
      # type dL dL X X
      for k in ['V1ddLR', 'V1duLR', 'V8ddLR', 'V8duLR', 'VdeLR']:
          C[k] = np.einsum('ia,jb,ijkl->abkl',
                           UdL.conj(), UdL,
                           C_in[k])
      # type dL X dL X
      for k in ['S1ddRR', 'S8ddRR']:
          C[k] = np.einsum('ia,kc,ijkl->ajcl',
                           UdL.conj(), UdL.conj(),
                           C_in[k])
      # type X dL X X
      for k in ['V1udduLR', 'V8udduLR']:
          C[k] = np.einsum('jb,ijkl->ibkl',
                           UdL,
                           C_in[k])
      # type X X dL X
      for k in ['VnueduLL', 'SedRR', 'TedRR', 'SnueduRR', 'TnueduRR',
                'S1udRR',  'S8udRR', 'S1udduRR',  'S8udduRR', ]:
          C[k] = np.einsum('kc,ijkl->ijcl',
                           UdL.conj(),
                           C_in[k])
      # type X X X dL
      for k in ['SedRL', ]:
          C[k] = np.einsum('ld,ijkl->ijkd',
                           UdL,
                           C_in[k])
      ## DeltaB=DeltaL=1 operators
      # type dL X X X
      for k in ['SduuLL',  'SduuLR']:
          C[k] = np.einsum('ia,ijkl->ajkl',
                           UdL,
                           C_in[k])
      # type X X dL X
      for k in ['SuudRL', 'SdudRL']:
          C[k] = np.einsum('kc,ijkl->ijcl',
                           UdL,
                           C_in[k])
      # type X dL dL X
      for k in ['SuddLL']:
          C[k] = np.einsum('jb,kc,ijkl->ibcl',
                           UdL, UdL,
                           C_in[k])
      return C