# Tree-level completions of dimension-six SMEFT operators

## Generating the operator set

We want to generate an overcomplete set of operators to pass into our algorithm. Since we explicitely don't want to account for redundancies from IBP and field redefinitions through EOM, this is a relatively simple task.

```python
from neutrinomass.tensormethod import D, eps, delta, invariants, colour_singlets
from neutrinomass.tensormethod.sm import L, H, Q, db, ub, eb
from neutrinomass.completions import operator_completions, deriv_operator_completions, collect_models, EffectiveOperator
from neutrinomass.completions.completions import derivative_combinations
from neutrinomass.utils import remove_equivalent

from collections import defaultdict
from IPython.display import display
```

We define an auxiliary function to find the invariants and call it on the field content of each of the operators. Some of the invariants may be equivalent up to index relabellings, but this will be clear when we come to match these onto the Warsaw basis.

```python
def sm_singlets(*fields):
    su2_singlets = invariants(*fields, ignore=("u", "d", "c"))
    return colour_singlets(su2_singlets, overcomplete=True)
```

```python
OPERATORS = {
    "O5": sm_singlets(L, L, H, H),
    "Oll": sm_singlets(L, L, L.conj, L.conj),
    "Oqq": sm_singlets(Q.conj, Q, Q.conj, Q),
    "Olq": sm_singlets(L, Q, L.conj, Q.conj),
    "Oee": sm_singlets(eb, eb, eb.conj, eb.conj),
    "Ouu": sm_singlets(ub, ub, ub.conj, ub.conj),
    "Odd": sm_singlets(db, db, db.conj, db.conj),
    "Oud": sm_singlets(ub, ub.conj, db, db.conj),
    "Oeu": sm_singlets(ub, ub.conj, eb, eb.conj),
    "Oed": sm_singlets(db, db.conj, eb, eb.conj),
    "Ole": sm_singlets(L, L.conj, eb, eb.conj),
    "Oqe": sm_singlets(Q, Q.conj, eb, eb.conj),
    "Olu": sm_singlets(L, L.conj, ub, ub.conj),
    "Old": sm_singlets(L, L.conj, db, db.conj),
    "Oqu": sm_singlets(Q, Q.conj, ub, ub.conj),
    "Oqd": sm_singlets(Q, Q.conj, db, db.conj),
    "Oledq": sm_singlets(L.conj, eb.conj, db, Q),
    "Oquqd": sm_singlets(Q, ub, Q, db),
    "Olequ": sm_singlets(L, eb, Q, ub),
    "Ophi6": sm_singlets(H, H, H, H.conj, H.conj, H.conj),
    "Oephi": sm_singlets(L, eb, H, H.conj, H.conj),
    "Ouphi": sm_singlets(Q, ub, H, H, H.conj),
    "Odphi": sm_singlets(Q, db, H, H.conj, H.conj),
    # ... Baryon number violating
}

_deriv_operators = {
    "OphiD": sm_singlets(D(H, "11"), D(H, "11"), H.conj, H.conj), # stands in for OphiBox as well
    "Ophil": sm_singlets(D(H, "11"), H.conj, L.conj, L),
    "Ophie": sm_singlets(D(H, "11"), H.conj, eb.conj, eb),
    "Ophiq": sm_singlets(D(H, "11"), H.conj, Q.conj, Q),
    "Ophiu": sm_singlets(D(H, "11"), H.conj, ub.conj, ub),
    "Ophid": sm_singlets(D(H, "11"), H.conj, db.conj, db),
    "Ophiud": sm_singlets(D(H, "11"), H, db, ub.conj),
}

DERIV_OPERATORS = defaultdict(list)
for op_label, ops in _deriv_operators.items():
    for op in ops:
        for deriv_pos in derivative_combinations(op):
            DERIV_OPERATORS[op_label].append(deriv_pos)
```

```python

```

## Exploding the operators

### Non-derivative operators

Below, we find the completions and print them out nicely. We also save them to a dictionary called `COMPLETIONS` which maps the operator label in the `OPERATORS` dictionary to another dictionary which maps an integer counting the different singlets to the models that generate that singlet operator.

The fields are printed with a character, either S or F distinguishing a scalar or fermion, then a 3-tuple containing the transformation properties under the SM gauge group, and finally $3B$ (three times the baryon number) in parentheses on the end.

```python
%%time

# Takes about 2 minutes to run
COMPLETIONS = {k: {} for k, _ in OPERATORS.items()}
for label, op_list in OPERATORS.items():
    for i, op in enumerate(op_list):
        print(f"Completions of {label}_{i}")
        display(op)

        # The `operator_completions` function wants an EffectiveOperator object
        eff_op = EffectiveOperator(label, op)
        # Find completions and cast to list
        comps = list(operator_completions(eff_op))
        # Collect models by particle content
        models = collect_models(comps)

        model_fields = ["+".join(f for f in m.exotic_numbers) for m in models]
        print("; ".join(model_fields))
        print("\n")

        COMPLETIONS[label][i] = models
```

    Completions of O5_0

$L^{\alpha i} L^{\beta j} H^{k} H^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 3, 1)(0); F(1, 1, 0)(0); F(1, 3, 0)(0)

    Completions of Oll_0

$L^{\alpha i} L^{\beta j} \tilde{L}^{\dot{\alpha} k} \tilde{L}^{\dot{\beta} l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 3, 1)(0)

    Completions of Oll_1

$L^{\alpha i} L^{\beta j} \tilde{L}^{\dot{\alpha} k} \tilde{L}^{\dot{\beta} l}  \cdot  \epsilon_{i j} \epsilon_{k l}$

    S(1, 1, 1)(0)

    Completions of Oqq_0

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i k} \epsilon_{j l}$

    S(6, 1, 1/3)(2)

    Completions of Oqq_1

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a d} \delta_{b c} \epsilon_{i k} \epsilon_{j l}$

    S(6, 1, 1/3)(2)

    Completions of Oqq_2

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \epsilon_{a c e} \epsilon_{b d e} \epsilon_{i k} \epsilon_{j l}$

    S(3b, 1, 1/3)(2)

    Completions of Oqq_3

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i l} \epsilon_{j k}$

    S(6, 3, 1/3)(2)

    Completions of Oqq_4

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a d} \delta_{b c} \epsilon_{i l} \epsilon_{j k}$

    S(6, 3, 1/3)(2)

    Completions of Oqq_5

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \epsilon_{a c e} \epsilon_{b d e} \epsilon_{i l} \epsilon_{j k}$

    S(3b, 3, 1/3)(2)

    Completions of Oqq_6

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i j} \epsilon_{k l}$

    S(6, 3, 1/3)(2)

    Completions of Oqq_7

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a d} \delta_{b c} \epsilon_{i j} \epsilon_{k l}$

    S(6, 3, 1/3)(2)

    Completions of Oqq_8

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \epsilon_{a c e} \epsilon_{b d e} \epsilon_{i j} \epsilon_{k l}$

    S(3b, 3, 1/3)(2)

    Completions of Olq_0

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} Q^{\beta a k} \tilde{Q}^{\dot{\beta} b l}  \cdot  \delta_{a b} \epsilon_{i j} \epsilon_{k l}$

    S(3b, 3, 1/3)(-1)

    Completions of Olq_1

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} Q^{\beta a k} \tilde{Q}^{\dot{\beta} b l}  \cdot  \delta_{a b} \epsilon_{i l} \epsilon_{j k}$

    S(3b, 3, 1/3)(-1)

    Completions of Olq_2

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} Q^{\beta a k} \tilde{Q}^{\dot{\beta} b l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

    S(3b, 1, 1/3)(-1)

    Completions of Oee_0

$\bar{e}^{\alpha} \bar{e}^{\beta} {\bar{e}^{\dagger}}^{\dot{\alpha}} {\bar{e}^{\dagger}}^{\dot{\beta}}$

    S(1, 1, 2)(0)

    Completions of Ouu_0

$\bar{u}^{\alpha a} \bar{u}^{\beta b} {\bar{u}^{\dagger}}^{\dot{\alpha} c} {\bar{u}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a c} \delta_{b d}$

    S(6, 1, 4/3)(2)

    Completions of Ouu_1

$\bar{u}^{\alpha a} \bar{u}^{\beta b} {\bar{u}^{\dagger}}^{\dot{\alpha} c} {\bar{u}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a d} \delta_{b c}$

    S(6, 1, 4/3)(2)

    Completions of Ouu_2

$\bar{u}^{\alpha a} \bar{u}^{\beta b} {\bar{u}^{\dagger}}^{\dot{\alpha} c} {\bar{u}^{\dagger}}^{\dot{\beta} d}  \cdot  \epsilon_{a b e} \epsilon_{c d e}$

    S(3b, 1, 4/3)(2)

    Completions of Odd_0

$\bar{d}^{\alpha a} \bar{d}^{\beta b} {\bar{d}^{\dagger}}^{\dot{\alpha} c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a c} \delta_{b d}$

    S(6b, 1, 2/3)(-2)

    Completions of Odd_1

$\bar{d}^{\alpha a} \bar{d}^{\beta b} {\bar{d}^{\dagger}}^{\dot{\alpha} c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a d} \delta_{b c}$

    S(6b, 1, 2/3)(-2)

    Completions of Odd_2

$\bar{d}^{\alpha a} \bar{d}^{\beta b} {\bar{d}^{\dagger}}^{\dot{\alpha} c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \epsilon_{a b e} \epsilon_{c d e}$

    S(3, 1, 2/3)(-2)

    Completions of Oud_0

$\bar{u}^{\alpha a} {\bar{u}^{\dagger}}^{\dot{\alpha} b} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a b} \delta_{c d}$

    S(6, 1, 1/3)(2)

    Completions of Oud_1

$\bar{u}^{\alpha a} {\bar{u}^{\dagger}}^{\dot{\alpha} b} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a d} \delta_{b c}$

    S(6, 1, 1/3)(2)

    Completions of Oud_2

$\bar{u}^{\alpha a} {\bar{u}^{\dagger}}^{\dot{\alpha} b} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \epsilon_{a c e} \epsilon_{b d e}$

    S(3b, 1, 1/3)(2)

    Completions of Oeu_0

$\bar{e}^{\alpha} {\bar{e}^{\dagger}}^{\dot{\alpha}} \bar{u}^{\beta a} {\bar{u}^{\dagger}}^{\dot{\beta} b}  \cdot  \delta_{a b}$

    S(3b, 1, 1/3)(-1)

    Completions of Oed_0

$\bar{e}^{\alpha} {\bar{e}^{\dagger}}^{\dot{\alpha}} \bar{d}^{\beta a} {\bar{d}^{\dagger}}^{\dot{\beta} b}  \cdot  \delta_{a b}$

    S(3b, 1, 4/3)(-1)

    Completions of Ole_0

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} \bar{e}^{\beta} {\bar{e}^{\dagger}}^{\dot{\beta}}  \cdot  \epsilon_{i j}$

    S(1, 2, 1/2)(0)

    Completions of Oqe_0

$\bar{e}^{\alpha} {\bar{e}^{\dagger}}^{\dot{\alpha}} Q^{\beta a i} \tilde{Q}^{\dot{\beta} b j}  \cdot  \delta_{a b} \epsilon_{i j}$

    S(3, 2, 7/6)(1)

    Completions of Olu_0

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} \bar{u}^{\beta a} {\bar{u}^{\dagger}}^{\dot{\beta} b}  \cdot  \delta_{a b} \epsilon_{i j}$

    S(3, 2, 7/6)(1)

    Completions of Old_0

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} \bar{d}^{\beta a} {\bar{d}^{\dagger}}^{\dot{\beta} b}  \cdot  \delta_{a b} \epsilon_{i j}$

    S(3, 2, 1/6)(1)

    Completions of Oqu_0

$Q^{\alpha a i} \tilde{Q}^{\dot{\alpha} b j} \bar{u}^{\beta c} {\bar{u}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i j}$

    S(8, 2, 1/2)(0)

    Completions of Oqu_1

$Q^{\alpha a i} \tilde{Q}^{\dot{\alpha} b j} \bar{u}^{\beta c} {\bar{u}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a c} \delta_{b d} \epsilon_{i j}$

    S(1, 2, 1/2)(0)

    Completions of Oqu_2

$Q^{\alpha a i} \tilde{Q}^{\dot{\alpha} b j} \bar{u}^{\beta c} {\bar{u}^{\dagger}}^{\dot{\beta} d}  \cdot  \epsilon_{a d e} \epsilon_{b c e} \epsilon_{i j}$

    S(8, 2, 1/2)(0)

    Completions of Oqd_0

$Q^{\alpha a i} \tilde{Q}^{\dot{\alpha} b j} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i j}$

    S(8, 2, 1/2)(0)

    Completions of Oqd_1

$Q^{\alpha a i} \tilde{Q}^{\dot{\alpha} b j} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a c} \delta_{b d} \epsilon_{i j}$

    S(1, 2, 1/2)(0)

    Completions of Oqd_2

$Q^{\alpha a i} \tilde{Q}^{\dot{\alpha} b j} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \epsilon_{a d e} \epsilon_{b c e} \epsilon_{i j}$

    S(8, 2, 1/2)(0)

    Completions of Oledq_0

$\tilde{L}^{\dot{\alpha} i} {\bar{e}^{\dagger}}^{\dot{\beta}} Q^{\alpha a j} \bar{d}^{\beta b}  \cdot  \delta_{a b} \epsilon_{i j}$

    S(1, 2, 1/2)(0)

    Completions of Oquqd_0

$Q^{\alpha a i} Q^{\beta b j} \bar{u}^{\gamma c} \bar{d}^{\delta d}  \cdot  \delta_{a c} \delta_{b d} \epsilon_{i j}$

    S(1, 2, 1/2)(0); S(8, 2, 1/2)(0); S(6, 1, 1/3)(2)

    Completions of Oquqd_1

$Q^{\alpha a i} Q^{\beta b j} \bar{u}^{\gamma c} \bar{d}^{\delta d}  \cdot  \delta_{a d} \delta_{b c} \epsilon_{i j}$

    S(8, 2, 1/2)(0); S(1, 2, 1/2)(0); S(6, 1, 1/3)(2)

    Completions of Oquqd_2

$Q^{\alpha a i} Q^{\beta b j} \bar{u}^{\gamma c} \bar{d}^{\delta d}  \cdot  \epsilon_{a b e} \epsilon_{c d e} \epsilon_{i j}$

    S(8, 2, 1/2)(0); S(3b, 1, 1/3)(2)

    Completions of Olequ_0

$L^{\alpha i} \bar{e}^{\beta} Q^{\gamma a j} \bar{u}^{\delta b}  \cdot  \delta_{a b} \epsilon_{i j}$

    S(1, 2, 1/2)(0); S(3, 2, 7/6)(1); S(3b, 1, 1/3)(-1)

    Completions of Ophi6_0

$H^{i} H^{j} H^{k} \tilde{H}^{l} \tilde{H}^{m} \tilde{H}^{n}  \cdot  \epsilon_{i l} \epsilon_{j m} \epsilon_{k n}$

    S(1, 2, 1/2)(0); S(1, 4, 1/2)(0); S(1, 4, 3/2)(0); S(1, 1, 0)(0)+S(1, 3, 1)(0); S(1, 3, 1)(0); S(1, 1, 0)(0)+S(1, 3, 0)(0); S(1, 1, 0)(0); S(1, 3, 0)(0)+S(1, 3, 1)(0); S(1, 3, 0)(0); S(1, 3, 1)(0)+S(1, 4, 1/2)(0); S(1, 3, 0)(0)+S(1, 4, 1/2)(0); S(1, 2, 1/2)(0)+S(1, 3, 0)(0); S(1, 3, 1)(0)+S(1, 4, 3/2)(0); S(1, 2, 1/2)(0)+S(1, 3, 1)(0); S(1, 1, 0)(0)+S(1, 2, 1/2)(0); S(1, 3, 0)(0)+S(1, 3, 1)(0)+S(1, 4, 1/2)(0); S(1, 1, 0)(0)+S(1, 2, 1/2)(0)+S(1, 3, 1)(0); S(1, 2, 1/2)(0)+S(1, 3, 0)(0)+S(1, 3, 1)(0); S(1, 1, 0)(0)+S(1, 2, 1/2)(0)+S(1, 3, 0)(0)

    Completions of Oephi_0

$L^{\alpha i} \bar{e}^{\beta} H^{j} \tilde{H}^{k} \tilde{H}^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 2, 1/2)(0); S(1, 2, 1/2)(0)+S(1, 3, 1)(0); S(1, 2, 1/2)(0)+S(1, 3, 0)(0); S(1, 1, 0)(0)+S(1, 2, 1/2)(0); F(1, 2, 1/2)(0)+F(1, 3, 0)(0); F(1, 2, 1/2)(0)+F(1, 3, 1)(0); F(1, 1, 1)(0)+F(1, 2, 1/2)(0); F(1, 2, 3/2)(0)+F(1, 3, 1)(0); F(1, 1, 1)(0)+F(1, 2, 3/2)(0); F(1, 2, 3/2)(0)+S(1, 3, 1)(0); F(1, 2, 1/2)(0)+S(1, 3, 0)(0); F(1, 2, 1/2)(0)+S(1, 1, 0)(0); F(1, 3, 1)(0)+S(1, 3, 0)(0); F(1, 1, 1)(0)+S(1, 1, 0)(0); F(1, 3, 0)(0)+S(1, 3, 1)(0)

    Completions of Ouphi_0

$Q^{\alpha a i} \bar{u}^{\beta b} H^{j} H^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

    S(1, 2, 1/2)(0); S(1, 2, 1/2)(0)+S(1, 3, 1)(0); S(1, 2, 1/2)(0)+S(1, 3, 0)(0); S(1, 1, 0)(0)+S(1, 2, 1/2)(0); F(3, 2, 1/6)(1)+F(3b, 3, 1/3)(-1); F(3, 2, 1/6)(1)+F(3, 3, 2/3)(1); F(3, 1, 2/3)(1)+F(3, 2, 7/6)(1); F(3, 2, 7/6)(1)+F(3, 3, 2/3)(1); F(3, 1, 2/3)(1)+F(3, 2, 1/6)(1); F(3, 2, 7/6)(1)+S(1, 3, 1)(0); F(3, 2, 1/6)(1)+S(1, 3, 0)(0); F(3, 3, 2/3)(1)+S(1, 3, 0)(0); F(3, 2, 1/6)(1)+S(1, 1, 0)(0); F(3b, 3, 1/3)(-1)+S(1, 3, 1)(0); F(3, 1, 2/3)(1)+S(1, 1, 0)(0)

    Completions of Odphi_0

$Q^{\alpha a i} \bar{d}^{\beta b} H^{j} \tilde{H}^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

    S(1, 2, 1/2)(0); S(1, 2, 1/2)(0)+S(1, 3, 1)(0); S(1, 2, 1/2)(0)+S(1, 3, 0)(0); S(1, 1, 0)(0)+S(1, 2, 1/2)(0); F(3, 2, 1/6)(1)+F(3, 3, 2/3)(1); F(3b, 2, 5/6)(-1)+F(3b, 3, 1/3)(-1); F(3, 2, 1/6)(1)+F(3b, 1, 1/3)(-1); F(3, 2, 1/6)(1)+F(3b, 3, 1/3)(-1); F(3b, 1, 1/3)(-1)+F(3b, 2, 5/6)(-1); F(3, 2, 1/6)(1)+S(1, 1, 0)(0); F(3, 2, 1/6)(1)+S(1, 3, 0)(0); F(3b, 2, 5/6)(-1)+S(1, 3, 1)(0); F(3b, 1, 1/3)(-1)+S(1, 1, 0)(0); F(3b, 3, 1/3)(-1)+S(1, 3, 0)(0); F(3, 3, 2/3)(1)+S(1, 3, 1)(0)

    CPU times: user 8min 7s, sys: 7.1 s, total: 8min 14s
    Wall time: 8min 29s

```python
def get_completions(op_label: str, completions=COMPLETIONS) -> dict:
    """Function to invert the `COMPLETIONS` dictionary. It returns a dictionary
    mapping fields to the operator structures they generate for a specific
    operator.

    """
    model_dict = defaultdict(list)
    contraction_dict = completions[op_label]
    for op_number, models in contraction_dict.items():
        for model in models:
            field = model.exotic_numbers[0]
            model_dict[field].append(f"{op_label}_{op_number}")

    return dict(model_dict)
```

We can now use this function to see what the completions of the operator are, and exactly what structure is generated by each field. E.g.

```python
get_completions("Oquqd")
```

    {'S(1, 2, 1/2)(0)': ['Oquqd_0', 'Oquqd_1'],
     'S(8, 2, 1/2)(0)': ['Oquqd_0', 'Oquqd_1', 'Oquqd_2'],
     'S(6, 1, 1/3)(2)': ['Oquqd_0', 'Oquqd_1'],
     'S(3b, 1, 1/3)(2)': ['Oquqd_2']}

### Derivative operators

```python
%%time

# Takes about 2 minutes to run
DERIV_COMPLETIONS = {k: {} for k, _ in DERIV_OPERATORS.items()}
for label, op_list in DERIV_OPERATORS.items():
    for i, op in enumerate(op_list):
        print(f"Completions of {label}_{i}")
        display(op)

        # The `operator_completions` function wants an EffectiveOperator object
        eff_op = EffectiveOperator(label, op)
        # Find completions and cast to list
        comps = list(operator_completions(eff_op))
        # Collect models by particle content
        models = collect_models(comps)

        model_fields = ["+".join(f for f in m.exotic_numbers) for m in models]
        print("; ".join(model_fields))
        print("\n")

        DERIV_COMPLETIONS[label][i] = models
```

    Completions of OphiD_0

$(DH)^{\alpha \dot{\alpha} i} (DH)^{\beta \dot{\beta} j} \tilde{H}^{k} \tilde{H}^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 3, 1)(0)

    Completions of OphiD_1

$(DH)^{\alpha \dot{\alpha} i} H^{j} (D\tilde{H})^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 1, 0)(0)

    Completions of OphiD_2

$(DH)^{\alpha \dot{\alpha} i} H^{j} \tilde{H}^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 3, 0)(0)

    Completions of OphiD_3

$H^{i} (DH)^{\alpha \dot{\alpha} j} (D\tilde{H})^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 3, 0)(0)

    Completions of OphiD_4

$H^{i} (DH)^{\alpha \dot{\alpha} j} \tilde{H}^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 1, 0)(0)

    Completions of OphiD_5

$H^{i} H^{j} (D\tilde{H})^{\alpha \dot{\alpha} k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    S(1, 3, 1)(0)

    Completions of Ophil_0

$\tilde{L}^{\dot{\alpha} i} L^{\alpha j} (DH)^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    F(1, 3, 0)(0); F(1, 1, 1)(0)

    Completions of Ophil_1

$\tilde{L}^{\dot{\alpha} i} L^{\alpha j} H^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    F(1, 1, 1)(0); F(1, 3, 0)(0)

    Completions of Ophil_2

$(D\tilde{L})^{\alpha i} L^{\beta j} H^{k} \tilde{H}^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    F(1, 1, 1)(0); F(1, 3, 0)(0)

    Completions of Ophil_3

$\tilde{L}^{\dot{\alpha} i} (DL)^{\dot{\beta} j} H^{k} \tilde{H}^{l}  \cdot  \epsilon_{i k} \epsilon_{j l}$

    F(1, 1, 1)(0); F(1, 3, 0)(0)

    Completions of Ophil_4

$\tilde{L}^{\dot{\alpha} i} L^{\alpha j} (DH)^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \epsilon_{i l} \epsilon_{j k}$

    F(1, 3, 1)(0); F(1, 1, 0)(0)

    Completions of Ophil_5

$\tilde{L}^{\dot{\alpha} i} L^{\alpha j} H^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \epsilon_{i l} \epsilon_{j k}$

    F(1, 3, 1)(0); F(1, 1, 0)(0)

    Completions of Ophil_6

$(D\tilde{L})^{\alpha i} L^{\beta j} H^{k} \tilde{H}^{l}  \cdot  \epsilon_{i l} \epsilon_{j k}$

    F(1, 3, 1)(0); F(1, 1, 0)(0)

    Completions of Ophil_7

$\tilde{L}^{\dot{\alpha} i} (DL)^{\dot{\beta} j} H^{k} \tilde{H}^{l}  \cdot  \epsilon_{i l} \epsilon_{j k}$

    F(1, 3, 1)(0); F(1, 1, 0)(0)

    Completions of Ophil_8

$\tilde{L}^{\dot{\alpha} i} L^{\alpha j} (DH)^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \epsilon_{i j} \epsilon_{k l}$

    F(1, 3, 0)(0); F(1, 3, 1)(0)

    Completions of Ophil_9

$\tilde{L}^{\dot{\alpha} i} L^{\alpha j} H^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \epsilon_{i j} \epsilon_{k l}$

    F(1, 3, 0)(0); F(1, 3, 1)(0)

    Completions of Ophil_10

$(D\tilde{L})^{\alpha i} L^{\beta j} H^{k} \tilde{H}^{l}  \cdot  \epsilon_{i j} \epsilon_{k l}$

    F(1, 3, 0)(0); F(1, 3, 1)(0)

    Completions of Ophil_11

$\tilde{L}^{\dot{\alpha} i} (DL)^{\dot{\beta} j} H^{k} \tilde{H}^{l}  \cdot  \epsilon_{i j} \epsilon_{k l}$

    F(1, 3, 0)(0); F(1, 3, 1)(0)

    Completions of Ophie_0

${\bar{e}^{\dagger}}^{\dot{\alpha}} \bar{e}^{\alpha} (DH)^{\beta \dot{\beta} i} \tilde{H}^{j}  \cdot  \epsilon_{i j}$

    F(1, 2, 1/2)(0); F(1, 2, 3/2)(0)

    Completions of Ophie_1

${\bar{e}^{\dagger}}^{\dot{\alpha}} \bar{e}^{\alpha} H^{i} (D\tilde{H})^{\beta \dot{\beta} j}  \cdot  \epsilon_{i j}$

    F(1, 2, 3/2)(0); F(1, 2, 1/2)(0)

    Completions of Ophie_2

$(D{\bar{e}^{\dagger}})^{\alpha} \bar{e}^{\beta} H^{i} \tilde{H}^{j}  \cdot  \epsilon_{i j}$

    F(1, 2, 3/2)(0); F(1, 2, 1/2)(0)

    Completions of Ophie_3

${\bar{e}^{\dagger}}^{\dot{\alpha}} (D\bar{e})^{\dot{\beta}} H^{i} \tilde{H}^{j}  \cdot  \epsilon_{i j}$

    F(1, 2, 3/2)(0); F(1, 2, 1/2)(0)

    Completions of Ophiq_0

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} (DH)^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

    F(3b, 1, 1/3)(-1); F(3, 3, 2/3)(1)

    Completions of Ophiq_1

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} H^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

    F(3b, 1, 1/3)(-1); F(3, 3, 2/3)(1)

    Completions of Ophiq_2

$(D\tilde{Q})^{\alpha a i} Q^{\beta b j} H^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

    F(3, 3, 2/3)(1); F(3b, 1, 1/3)(-1)

    Completions of Ophiq_3

$\tilde{Q}^{\dot{\alpha} a i} (DQ)^{\dot{\beta} b j} H^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

    F(3, 3, 2/3)(1); F(3b, 1, 1/3)(-1)

    Completions of Ophiq_4

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} (DH)^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i l} \epsilon_{j k}$

    F(3, 1, 2/3)(1); F(3b, 3, 1/3)(-1)

    Completions of Ophiq_5

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} H^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \delta_{a b} \epsilon_{i l} \epsilon_{j k}$

    F(3b, 3, 1/3)(-1); F(3, 1, 2/3)(1)

    Completions of Ophiq_6

$(D\tilde{Q})^{\alpha a i} Q^{\beta b j} H^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i l} \epsilon_{j k}$

    F(3b, 3, 1/3)(-1); F(3, 1, 2/3)(1)

    Completions of Ophiq_7

$\tilde{Q}^{\dot{\alpha} a i} (DQ)^{\dot{\beta} b j} H^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i l} \epsilon_{j k}$

    F(3, 1, 2/3)(1); F(3b, 3, 1/3)(-1)

    Completions of Ophiq_8

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} (DH)^{\beta \dot{\beta} k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i j} \epsilon_{k l}$

    F(3b, 3, 1/3)(-1); F(3, 3, 2/3)(1)

    Completions of Ophiq_9

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} H^{k} (D\tilde{H})^{\beta \dot{\beta} l}  \cdot  \delta_{a b} \epsilon_{i j} \epsilon_{k l}$

    F(3b, 3, 1/3)(-1); F(3, 3, 2/3)(1)

    Completions of Ophiq_10

$(D\tilde{Q})^{\alpha a i} Q^{\beta b j} H^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i j} \epsilon_{k l}$

    F(3b, 3, 1/3)(-1); F(3, 3, 2/3)(1)

    Completions of Ophiq_11

$\tilde{Q}^{\dot{\alpha} a i} (DQ)^{\dot{\beta} b j} H^{k} \tilde{H}^{l}  \cdot  \delta_{a b} \epsilon_{i j} \epsilon_{k l}$

    F(3b, 3, 1/3)(-1); F(3, 3, 2/3)(1)

    Completions of Ophiu_0

${\bar{u}^{\dagger}}^{\dot{\alpha} a} \bar{u}^{\alpha b} (DH)^{\beta \dot{\beta} i} \tilde{H}^{j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3, 2, 1/6)(1); F(3, 2, 7/6)(1)

    Completions of Ophiu_1

${\bar{u}^{\dagger}}^{\dot{\alpha} a} \bar{u}^{\alpha b} H^{i} (D\tilde{H})^{\beta \dot{\beta} j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3, 2, 7/6)(1); F(3, 2, 1/6)(1)

    Completions of Ophiu_2

$(D{\bar{u}^{\dagger}})^{\alpha a} \bar{u}^{\beta b} H^{i} \tilde{H}^{j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3, 2, 1/6)(1); F(3, 2, 7/6)(1)

    Completions of Ophiu_3

${\bar{u}^{\dagger}}^{\dot{\alpha} a} (D\bar{u})^{\dot{\beta} b} H^{i} \tilde{H}^{j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3, 2, 1/6)(1); F(3, 2, 7/6)(1)

    Completions of Ophid_0

${\bar{d}^{\dagger}}^{\dot{\alpha} a} \bar{d}^{\alpha b} (DH)^{\beta \dot{\beta} i} \tilde{H}^{j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3b, 2, 5/6)(-1); F(3, 2, 1/6)(1)

    Completions of Ophid_1

${\bar{d}^{\dagger}}^{\dot{\alpha} a} \bar{d}^{\alpha b} H^{i} (D\tilde{H})^{\beta \dot{\beta} j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3, 2, 1/6)(1); F(3b, 2, 5/6)(-1)

    Completions of Ophid_2

$(D{\bar{d}^{\dagger}})^{\alpha a} \bar{d}^{\beta b} H^{i} \tilde{H}^{j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3b, 2, 5/6)(-1); F(3, 2, 1/6)(1)

    Completions of Ophid_3

${\bar{d}^{\dagger}}^{\dot{\alpha} a} (D\bar{d})^{\dot{\beta} b} H^{i} \tilde{H}^{j}  \cdot  \delta_{a b} \epsilon_{i j}$

    F(3b, 2, 5/6)(-1); F(3, 2, 1/6)(1)

    CPU times: user 28.7 s, sys: 372 ms, total: 29.1 s
    Wall time: 29.7 s

### Topologies and lagrangians

```python
COMPLETIONS["Oqq"][8][0].completions[0].draw_diagram()
```

```python
COMPLETIONS["Oqq"][8][0].completions[0].terms[1]
```

$Q^{\alpha a i} Q^{\beta b j} \phi^{c k l}  \cdot  \epsilon_{\alpha \beta} \epsilon_{a b c} \epsilon_{i l} \epsilon_{j k}$

## Matching onto the Warsaw basis

If one is only interested in finding new models, then the results of this notebook until here are sufficient. Below we show how to match our overcomplete set of operators at dimension six onto the Warsaw basis. In doing so, we reconstruct the dictionary of completions.

Throughout this section we often suppress flavour indices.

```python
UV_DICT = defaultdict(set)
```

We will make extensive use of the following identities

\begin{align}
&[\sigma_\mu]_{\alpha \dot{\alpha}} [\sigma^\mu]_{\beta \dot{\beta}} = 2 \epsilon_{\alpha \beta} \epsilon_{\dot{\alpha} \dot{\beta}} \\
&[\tau^I]_i^j [\tau^I]_k^l = 2 \delta_i^l \delta_k^j - \delta_i^j \delta_k^l \\
&[\lambda^A]^a_b [\lambda^A]^c_d = 2 \delta^a_d \delta^c_b - \tfrac{2}{3} \delta^a_b \delta^c_d = \tfrac{4}{3} \delta^a_d \delta^c_b - \tfrac{2}{3} \epsilon_{bde} \epsilon^{ace} \\
&\epsilon_{i j} \epsilon_{kl} + \epsilon_{ik} \epsilon_{lj} + \epsilon_{il}\epsilon_{jk} = 0
\end{align}

as well as the flavour symmetries of the couplings of the exotic fields to SM fermions.

### $\mathcal{O}_{ll}$

In this case there is only one operator, so all fields need to generate it.

```python
UV_DICT["Oll"] = set(get_completions("Oll"))
UV_DICT["Oll"]
```

    {'S(1, 1, 1)(0)', 'S(1, 3, 1)(0)'}

### $\mathcal{O}_{qq}$

Here there are two operators:
\begin{align}
    \mathcal{O}_{qq}^{(1)} &= (Q^{ai}_r \sigma_\mu Q^{\dagger}_{sai})(Q^{bj}_t \sigma^\mu Q^{\dagger}_{ubj}) \\
    \mathcal{O}_{qq}^{(3)} &= (Q^{ai}_r \sigma_\mu [\tau^I]_i^j Q^{\dagger}_{saj})(Q^{bk}_t \sigma^\mu [\tau^I]_k^l Q^\dagger_{ubl})
\end{align}

After Fierz transformations, these become:
\begin{align}
    \mathcal{O}_{qq}^{(1)} &= 2(Q^{ai}_r Q^{bj}_t)(Q^\dagger_{sai} Q^\dagger_{ubj}) \\
    \mathcal{O}_{qq}^{(3)} &= 4(Q^{ai}_r Q^{bk}_t)(Q^\dagger_{saj} Q^\dagger_{ubl}) \delta_i^l \delta_k^j - 2(Q^{ai}_r Q^{bk}_t)(Q^\dagger_{saj} Q^\dagger_{ubl}) \delta_i^j \delta_k^l
\end{align}

The completions are

```python
get_completions("Oqq")
```

    {'S(6, 1, 1/3)(2)': ['Oqq_0', 'Oqq_1'],
     'S(3b, 1, 1/3)(2)': ['Oqq_2'],
     'S(6, 3, 1/3)(2)': ['Oqq_3', 'Oqq_4', 'Oqq_6', 'Oqq_7'],
     'S(3b, 3, 1/3)(2)': ['Oqq_5', 'Oqq_8']}

And, for reference, the operator structures we work with are

```python
for i, op in enumerate(OPERATORS["Oqq"]):
    print(f"Oqq{i}")
    display(op)
```

    Oqq0

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i k} \epsilon_{j l}$

    Oqq1

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a d} \delta_{b c} \epsilon_{i k} \epsilon_{j l}$

    Oqq2

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \epsilon_{a c e} \epsilon_{b d e} \epsilon_{i k} \epsilon_{j l}$

    Oqq3

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i l} \epsilon_{j k}$

    Oqq4

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a d} \delta_{b c} \epsilon_{i l} \epsilon_{j k}$

    Oqq5

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \epsilon_{a c e} \epsilon_{b d e} \epsilon_{i l} \epsilon_{j k}$

    Oqq6

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a b} \delta_{c d} \epsilon_{i j} \epsilon_{k l}$

    Oqq7

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \delta_{a d} \delta_{b c} \epsilon_{i j} \epsilon_{k l}$

    Oqq8

$\tilde{Q}^{\dot{\alpha} a i} Q^{\alpha b j} \tilde{Q}^{\dot{\beta} c k} Q^{\beta d l}  \cdot  \epsilon_{a c e} \epsilon_{b d e} \epsilon_{i j} \epsilon_{k l}$

Breaking this down, $(\mathbf{6}, \mathbf{1}, \tfrac{1}{3})_S$ generates
\begin{align}
    &\mathcal{O}_{qq0} + \mathcal{O}_{qq1} \\
    &= (Q^{ai} Q^{bj} \epsilon_{ij})(Q^\dagger_{ck} Q^\dagger_{dl} \epsilon^{kl}) (\delta_a^c \delta_b^d + \delta_b^c \delta_a^d ) \\
    &= (Q^{ai} Q^{bj})(Q^\dagger_{ck} Q^\dagger_{dl}) (\delta_i^k \delta_j^l - \delta_i^l \delta_j^k) (\delta_a^c \delta_b^d + \delta_b^c \delta_a^d ) \\
    &= \tfrac{1}{2} \mathcal{O}_{qq}^{(1)} - \tfrac{1}{2} \mathcal{O}_{qq}^{(3)}
\end{align}

```python
UV_DICT["Oqq1"].add('S(6, 1, 1/3)(2)')
UV_DICT["Oqq3"].add('S(6, 1, 1/3)(2)')
```

The $(\mathbf{6}, \mathbf{3}, \tfrac{1}{3})_S$ will generate

\begin{align}
    &\mathcal{O}_{qq3} + \mathcal{O}_{qq4} + \mathcal{O}_{qq6} + \mathcal{O}_{qq7} \\
    &= (\tilde{Q}^{i}_{a}  \tilde{Q}^{k}_{c}) (Q^{b j} Q^{d l}) (\delta^a_{b} \delta^c_{d} + \delta^c_{b} \delta^a_{d}) (\epsilon_{i l} \epsilon_{k j} + \epsilon_{i j} \epsilon_{k l} ) \\
    &= \tfrac{3}{2} \mathcal{O}_{qq}^{(1)} + \tfrac{1}{2} \mathcal{O}_{qq}^{(3)}
\end{align}

```python
UV_DICT["Oqq1"].add('S(6, 3, 1/3)(2)')
UV_DICT["Oqq3"].add('S(6, 3, 1/3)(2)')
```

The $(\bar{\mathbf{3}}, \mathbf{1}, \tfrac{1}{3})_S$ generates
\begin{align}
    \mathcal{O}_{qq2} &= (Q^{\dagger}_{a i} Q^\dagger_{c k}) (Q^{b j} Q^{d l}) \epsilon^{a c e}  \epsilon_{b d e}  \epsilon^{i k} \epsilon_{j l} \\
    &= (Q^{b j} Q^{d l}) (Q^{\dagger}_{a i} Q^\dagger_{c k})(\delta_b^a \delta_d^c - \delta_b^c \delta_d^a) (\delta_j^i \delta_l^k - \delta_j^k \delta_l^i) \\
    &= \tfrac{1}{2} \mathcal{O}_{qq}^{(1)} - \tfrac{1}{2} \mathcal{O}_{qq}^{(3)}
\end{align}

```python
UV_DICT["Oqq1"].add('S(3b, 1, 1/3)(2)')
UV_DICT["Oqq3"].add('S(3b, 1, 1/3)(2)')
```

The $(\bar{\mathbf{3}}, \mathbf{3}, \tfrac{1}{3})_S$ generates
\begin{align}
    \mathcal{O}_{qq5} + \mathcal{O}_{qq8} &= (Q^{b j} Q^{d l}) (Q^{\dagger}_{a i} Q^\dagger_{c k})(\delta_b^a \delta_d^c - \delta_b^c \delta_d^a) (\delta_j^i \delta_l^k + \delta_j^k \delta_l^i) \\
    &= \tfrac{3}{2} \mathcal{O}_{qq}^{(1)} + \tfrac{1}{2} \mathcal{O}_{qq}^{(3)}
\end{align}

### $\mathcal{O}_{lq}$

Here there are two operators:
\begin{align}
    \mathcal{O}_{lq}^{(1)} &= (L^{i}_r \sigma_\mu L^{\dagger}_{si})(Q^{aj}_t \sigma^\mu Q^{\dagger}_{uaj}) \\
    \mathcal{O}_{lq}^{(3)} &= (L^{i}_r \sigma_\mu [\tau^I]_i^j L^{\dagger}_{sj})(Q^{ak}_t \sigma^\mu [\tau^I]_k^l Q^\dagger_{ual})
\end{align}

After Fierz transformations, these become:
\begin{align}
    \mathcal{O}_{lq}^{(1)} &= 2(L^{i}_r Q^{aj}_t)(L^\dagger_{si} Q^\dagger_{uaj}) \\
    \mathcal{O}_{lq}^{(3)} &= 4(L^{i}_r Q^{ak}_t)(L^\dagger_{sj} Q^\dagger_{ual}) \delta_i^l \delta_k^j - 2(L^{i}_r Q^{ak}_t)(L^\dagger_{sj} Q^\dagger_{ual}) \delta_i^j \delta_k^l
\end{align}

The completions are

```python
get_completions("Olq")
```

    {'S(3b, 3, 1/3)(-1)': ['Olq_0', 'Olq_1'], 'S(3b, 1, 1/3)(-1)': ['Olq_2']}

```python
for i, op in enumerate(OPERATORS["Olq"]):
    print(f"Olq{i}")
    display(op)
```

    Olq0

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} Q^{\beta a k} \tilde{Q}^{\dot{\beta} b l}  \cdot  \delta_{a b} \epsilon_{i j} \epsilon_{k l}$

    Olq1

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} Q^{\beta a k} \tilde{Q}^{\dot{\beta} b l}  \cdot  \delta_{a b} \epsilon_{i l} \epsilon_{j k}$

    Olq2

$L^{\alpha i} \tilde{L}^{\dot{\alpha} j} Q^{\beta a k} \tilde{Q}^{\dot{\beta} b l}  \cdot  \delta_{a b} \epsilon_{i k} \epsilon_{j l}$

The field $(\bar{\mathbf{3}}, \mathbf{3}, \tfrac{1}{3})$ generates

\begin{align*}
    \mathcal{O}_{lq0} + \mathcal{O}_{lq1} &= (L^{i} Q^{ak})(\tilde{L}^{j} \tilde{Q}_{a}^{l}) (\epsilon_{ij}\epsilon_{kl} + \epsilon_{il} \epsilon_{jk}) \\
    &= \tfrac{1}{2} \mathcal{O}_{lq}^{(1)} + \tfrac{1}{4} (\mathcal{O}_{lq}^{(1)} + \mathcal{O}_{lq}^{(3)}) \\
    &=  \tfrac{3}{4}\mathcal{O}_{lq}^{(1)} + \tfrac{1}{4} \mathcal{O}_{lq}^{(3)}
\end{align*}

```python
UV_DICT["Olq1"].add('S(3b, 3, 1/3)(-1)')
UV_DICT["Olq3"].add('S(3b, 3, 1/3)(-1)')
```

The remaining field is $(\bar{\mathbf{3}}, \mathbf{1}, \tfrac{1}{3})$, which gives

\begin{align*}
    \mathcal{O}_{lq2} &= (L^{i} Q^{ak})(\tilde{L}^{j} \tilde{Q}_{a}^{l}) \epsilon_{ik} \epsilon_{jl} \\
    &= (L^{i} Q^{ak})(L^{\dagger}_j Q_{al}^{\dagger}) \epsilon_{ik} \epsilon^{jl} \\
    &= (L^{i} Q^{ak})(L^{\dagger}_j Q_{al}^{\dagger}) (\delta_i^j \delta_k^l - \delta_k^j \delta_i^l) \\
    &= \tfrac{1}{2} \mathcal{O}_{lq}^{(1)} - \tfrac{1}{2} \mathcal{O}_{lq}^{(3)}
\end{align*}

```python
UV_DICT["Olq1"].add('S(3b, 1, 1/3)(-1)')
UV_DICT["Olq3"].add('S(3b, 1, 1/3)(-1)')
```

### $\mathcal{O}_{ud}$

There are two operators:
\begin{align}
    \mathcal{O}_{ud}^{(1)} &= (\bar{u}_{ra} \sigma_\mu \bar{u}^{\dagger b}_{s})(\bar{d}_{tc} \sigma^\mu \bar{d}^{\dagger d}_{u}) \\
    \mathcal{O}_{ud}^{(8)} &= (\bar{u}_{ra} \sigma_\mu [ \lambda^A ]^a_b \bar{u}^{\dagger b}_{s})(\bar{d}_{tc} \sigma^\mu [ \lambda^A ]^c_d \bar{d}^{\dagger d}_{u})
\end{align}

After Fierz transformations, these become:
\begin{align}
    \mathcal{O}_{ud}^{(1)} &= 2 (\bar{u}_{ra} \bar{d}_{tc}) (\bar{u}^{\dagger b}_{s} \bar{d}^{\dagger d}_{u}) \delta^a_b \delta^c_d \\
    \mathcal{O}_{ud}^{(8)} &= 4 (\bar{u}_{ra} \bar{d}_{tc}) (\bar{u}^{\dagger b}_{s} \bar{d}^{\dagger d}_{u}) \delta^a_d \delta^c_b - \tfrac{4}{3} (\bar{u}_{ra} \bar{d}_{tc}) (\bar{u}^{\dagger b}_{s} \bar{d}^{\dagger d}_{u}) \delta^a_b \delta^c_d
\end{align}

The completions are

```python
get_completions("Oud", completions=COMPLETIONS)
```

    {'S(6, 1, 1/3)(2)': ['Oud_0', 'Oud_1'], 'S(3b, 1, 1/3)(2)': ['Oud_2']}

```python
for i, op in enumerate(OPERATORS["Oud"]):
    print(f"Oud{i}")
    display(op)
```

    Oud0

$\bar{u}^{\alpha a} {\bar{u}^{\dagger}}^{\dot{\alpha} b} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a b} \delta_{c d}$

    Oud1

$\bar{u}^{\alpha a} {\bar{u}^{\dagger}}^{\dot{\alpha} b} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \delta_{a d} \delta_{b c}$

    Oud2

$\bar{u}^{\alpha a} {\bar{u}^{\dagger}}^{\dot{\alpha} b} \bar{d}^{\beta c} {\bar{d}^{\dagger}}^{\dot{\beta} d}  \cdot  \epsilon_{a c e} \epsilon_{b d e}$

Starting with $(\mathbf{6}, \mathbf{1}, \tfrac{1}{3})$, we have

\begin{align*}
    \mathcal{O}_{ud0} + \mathcal{O}_{ud1} &= (\bar{u}_{ra} \bar{d}_{tc}) (\bar{u}^{\dagger b}_{s} \bar{d}^{\dagger d}_{u}) ( \delta^a_b \delta^c_d + \delta^a_d \delta^c_b ) \\
    &= \tfrac{1}{2} \mathcal{O}_{ud}^{(1)} + \tfrac{1}{4} \mathcal{O}_{ud}^{(8)} + \tfrac{1}{6} \mathcal{O}_{ud}^{(1)} \\
    &=  \tfrac{2}{3} \mathcal{O}_{ud}^{(1)} + \tfrac{1}{4} \mathcal{O}_{ud}^{(8)}
\end{align*}

```python
UV_DICT["Oud1"].add('S(6, 1, 1/3)(2)')
UV_DICT["Oud8"].add('S(6, 1, 1/3)(2)')
```

For $(\bar{\mathbf{3}}, \mathbf{1}, \tfrac{1}{3})$, we have

\begin{align*}
    \mathcal{O}_{ud2} &= (\bar{u}_{ra} \bar{d}_{tc}) (\bar{u}^{\dagger b}_{s} \bar{d}^{\dagger d}_{u}) \epsilon_{bde} \epsilon^{ace} \\
    &= (\bar{u}_{ra} \bar{d}_{tc}) (\bar{u}^{\dagger b}_{s} \bar{d}^{\dagger d}_{u}) (\delta^a_b \delta^c_d - \delta^a_d \delta^c_b) \\
    &=  \tfrac{1}{2} \mathcal{O}_{ud}^{(1)} - ( \tfrac{1}{4}\mathcal{O}_{ud}^{(8)} + \tfrac{1}{6} \mathcal{O}_{ud}^{(1)} ) \\
    &= \tfrac{1}{3} \mathcal{O}_{ud}^{(1)} - \tfrac{1}{4} \mathcal{O}_{ud}^{(8)}
\end{align*}

```python
UV_DICT["Oud1"].add('S(3b, 1, 1/3)(2)')
UV_DICT["Oud8"].add('S(3b, 1, 1/3)(2)')
```

### $\mathcal{O}_{e \phi}$

The operator
\begin{equation}
    \mathcal{O}_{e\phi} = (H^\dagger H) (L \bar{e} H^\dagger)
\end{equation}
is relevant here. There are a number of additional operators that need to be considered, since many can be related to this one by integration by parts and applications of the classical equations of motion. First there are operators of the kind
\begin{align}
    \mathcal{O}_{\phi \ell 10} &= (H^\dagger H) [L (\sigma \cdot D) L^\dagger] \\
    \mathcal{O}_{\phi \ell 2} + \mathcal{O}_{\phi \ell 6} &= (H^\dagger \tau^I H) [L \tau^I (\sigma \cdot D) L^\dagger] \\
    \mathcal{O}_{\phi e 2} &= (H^\dagger H) [\bar{e} (\sigma \cdot D) \bar{e}^\dagger] \\
    \mathcal{O}^\prime_{\phi D} &= (H^\dagger H) (H^\dagger \Box H)
\end{align}

The direct completions of $\mathcal{O}_{e\phi}$ are many, there is only one single-particle model. These are:

```python
collect_models(operator_completions(EffectiveOperator("Oephi", OPERATORS["Oephi"][0])))
```

    [Model(S(1, 2, 1/2)(0)),
     Model(S(1, 2, 1/2)(0) + S(1, 3, 1)(0)),
     Model(S(1, 2, 1/2)(0) + S(1, 3, 0)(0)),
     Model(S(1, 1, 0)(0) + S(1, 2, 1/2)(0)),
     Model(F(1, 2, 1/2)(0) + F(1, 3, 0)(0)),
     Model(F(1, 2, 1/2)(0) + F(1, 3, 1)(0)),
     Model(F(1, 1, 1)(0) + F(1, 2, 1/2)(0)),
     Model(F(1, 2, 3/2)(0) + F(1, 3, 1)(0)),
     Model(F(1, 1, 1)(0) + F(1, 2, 3/2)(0)),
     Model(F(1, 2, 3/2)(0) + S(1, 3, 1)(0)),
     Model(F(1, 2, 1/2)(0) + S(1, 3, 0)(0)),
     Model(F(1, 2, 1/2)(0) + S(1, 1, 0)(0)),
     Model(F(1, 3, 1)(0) + S(1, 3, 0)(0)),
     Model(F(1, 1, 1)(0) + S(1, 1, 0)(0)),
     Model(F(1, 3, 0)(0) + S(1, 3, 1)(0))]

For the others we have written the oeprators above in our numbering scheme. We have:

```python
collect_models(operator_completions(EffectiveOperator("Ophil-10", DERIV_OPERATORS["Ophil"][10])))
```

    [Model(F(1, 3, 0)(0)), Model(F(1, 3, 1)(0))]

```python
collect_models(operator_completions(EffectiveOperator("Ophil-2", DERIV_OPERATORS["Ophil"][2])))
```

    [Model(F(1, 1, 1)(0)), Model(F(1, 3, 0)(0))]

```python
collect_models(operator_completions(EffectiveOperator("Ophil-6", DERIV_OPERATORS["Ophil"][6])))
```

    [Model(F(1, 3, 1)(0)), Model(F(1, 1, 0)(0))]

```python
collect_models(operator_completions(EffectiveOperator("Ophie-2", DERIV_OPERATORS["Ophie"][2])))
```

    [Model(F(1, 2, 3/2)(0)), Model(F(1, 2, 1/2)(0))]

For the operator labelled $\mathcal{O}^{\prime}_{\phi D}$ we need to be more careful with the completions. The appropriate models are discussed in section 2.2 of the paper. Of the structures $\mathcal{O}^{(i)}_{H^2 D^2}$ presented there, only the completions of $\mathcal{O}^{(2)}_{H^2 D^2}$ are not relevant, since this is exactly the operator $\mathcal{O}_{\phi \Box}$ in the Warsaw basis. All of the other operators listed have some component that contributes to the $\mathcal{O}_{e\phi}$ coefficient, and so the appropriate completions are

```python
(collect_models(operator_completions(EffectiveOperator("OphiD-prime", DERIV_OPERATORS["OphiD"][0])))
 + collect_models(operator_completions(EffectiveOperator("OphiD-prime", DERIV_OPERATORS["OphiD"][2]))))
```

    [Model(S(1, 3, 1)(0)), Model(S(1, 3, 0)(0))]

Because there are many models, we won't write down the matching expression onto the Warsaw basis, but the list of fields here matches those given in the literature for the completions of the operator $\mathcal{O}_{e\phi}$.

```python

```