Proving Something is a Rank-4 Tensor Whilst going over my undergraduate notes on General Relativity, I came across the Quotient Rule for tensors: Briefly, if $\mathbf{X \, A} = \mathbf{B}$ with $\mathbf{B}$ being a non-zero tensor and $\mathbf{A}$ any arbitrary tensor, then $\mathbf{X}$ is a tensor as well. For now, we can assume all tensors considered are Cartesian. I am trying to apply this rule to the following example.
Let's say the components of $\mathbf{B}$ are given by
$$ B_{ij} = X_{ijkl} A_{kl}.$$ I want to verify that $\mathbf{X}$ is a tensor as well. I start off by writing out the transformation of $\mathbf{B}$ under a "rotation" to new, primed coordinates:
$$ B_{ij}' = X_{ijkl}' A_{kl}'.$$ Since $\mathbf{A}$ and $\mathbf{B}$ are rank-2 tensors, their components transform like so:
$$B_{ij}' = a_{i p } a_{j q} B_{pq} \\ A_{kl}' = a_{kx } a_{ly} A_{xy}.$$ I substitute these into the previous equation to get
$$X_{ijkl}' a_{kx}a_{ly} A_{xy} = a_{ip}a_{jq}B_{pq},$$ and I further substitute in $\mathbf{B}$, so I have
$$X_{ijkl}' a_{kx}a_{ly} A_{xy} = a_{ip}a_{jq}X_{pqkl}A_{kl}.$$ Here, I am unsure how to proceed. I believe the problem is well-defined, and I know that in order to show $\mathbf{X}$ is a tensor, I need to show it transforms something like
$$X_{ijkl}' = (\mathrm{four \, terms})\, X_{pqkl}$$ with 4 free indices. How do I get these extra terms? Any help is greatly appreciated.
 A: So, when you applied the equation $B_{ij}=X_{ijkl}A_{kl}$ to get $X_{ijkl}' a_{kx}a_{ly} A_{xy} = a_{ip}a_{jq}X_{pqkl}A_{kl}$, note that in the expression $X_{ijkl}A_{kl}$, $k$ and $l$ are essentially dummy indices, and can be renamed to whatever we want. In particular, the next step is much clearer if we rename them to $x$ and $y$!
Then we instead get
$$X_{ijkl}' a_{kx}a_{ly} A_{xy} = a_{ip}a_{jq}X_{pqxy}A_{xy}$$
Now, we use the fact that this equation is assumed to hold for an arbitrary tensor $A$, and so holds componentwise for all $x,y$. (Explicitly, you can imagine getting each equation for each particular $x,y$ by considering $A$ to be a basis tensor, i.e. such that it is $1$ in its $xy$ component and $0$ otherwise.) So we have, for every $x,y$,
$$X_{ijkl}' a_{kx}a_{ly} = a_{ip}a_{jq}X_{pqxy}$$
Now we use the fact that these are Cartesian tensors, and so $a_{ij}$ is the inverse of $a_{ji}$, i.e. $\delta_{ik}=a_{ij}a^{-1}_{jk}=a_{ij}a_{kj}$. (This is much clearer with upper and lower indices and in a coordinate basis, so you can essentially use only one symbol, and not need to worry about transposes!) So, we have
$$\begin{align} X_{ijkl}' a_{kx}a_{ly}a_{mx}a_{ny} &= a_{ip}a_{jq}X_{pqxy}a_{mx}a_{ny} \\
X_{ijkl}' \delta_{km}\delta_{ln} &= a_{ip}a_{jq}a_{mx}a_{ny}X_{pqxy}\\
X_{ijmn}' &= a_{ip}a_{jq}a_{mx}a_{ny}X_{pqxy}\end{align}$$
and we're done. (The swap in the order of $X$ and $a$ on the rhs from step 1 to 2 is just commutativity of ordinary multiplication for a nice layout, not any meaningful tensor operation.)
You might find this PDF helpful, which slips in the inversion at a slightly different step! (For them, $X$ is $A$, and $A$ is $\xi$.)
