Sinofine Lotusie

Proof for associativity of semi-tensor product

Preliminaries

In this section we’d like to introduce some definitions and properties involved in the proof for associativity of the semi-tensor product.

Definition 1 (kronecker product). Let Am×n,Bp×qA \in \mathcal{M}_{m \times n}, B \in \mathcal{M}_{p \times q}, then the kronecker product ABpm×qnA \otimes B \in \mathcal{M}_{pm \times qn} is defined

AB=[a11Ba1nBam1BamnB].A \otimes B = \left[\begin{array}{ccc} a_{11} B & \ldots & a_{1 n} B\\ \vdots & \ddots & \vdots\\ a_{m 1} B & \ldots & a_{mn} B \end{array}\right] .

Lemma 1. Let Am×nA \in \mathcal{M}_{m \times n}, Bp×qB \in \mathcal{M}_{p \times q}, Cn×rC \in \mathcal{M}_{n \times r} and Dq×sD \in \mathcal{M}_{q \times s}, then

(AB)(CD)=(ACBD).(A \otimes B) (C \otimes D) = (AC \otimes BD) .

Definition 2 (semi-tensor product). Let Am×n,Bp×qA \in \mathcal{M}_{m \times n}, B \in \mathcal{M}_{p \times q}, l=lcm(n,p)l = {\operatorname{lcm}} (n, p) being least common multiple of nn and pp. The semi-tensor product \ltimes is defined

AB=(AIl/n)(BIl/p).A \ltimes B = (A \otimes I_{l / n}) (B \otimes I_{l / p}) .

Theorem 1 (prime factorization theorem). every integer nn greater than 11 can be represented uniquely as

n=i=1kpini,n = \prod_{i = 1}^k p_i^{n_i},
where p1<p2<<pkp_1 < p_2 < \cdots < p_k are primes and the nin_i are positive integers.

Corollary 1. ab=lcm(a,b)gcd(a,b)ab = {\operatorname{lcm}} (a, b) \gcd (a, b).

Associativity of the semi-tensor product

Proposition 1. Let Ap×qA \in \mathcal{M}_{p \times q}, Br×sB \in \mathcal{M}_{r \times s} and Ct×uC \in \mathcal{M}_{t \times u}, then

(AB)C=A(BC).(A \ltimes B) \ltimes C = A \ltimes (B \ltimes C) .

Considering that the form of (AB)C(A \ltimes B) \ltimes C and A(BC)A \ltimes (B \ltimes C) are not that simple, it’s not a wise idea to prove the proposition by directly calculate the results of both sides and compare them. The procedure we would take is to find some equivalent but more simple forms to test the associativity, and then obtain the associativity of the semi-tensor product from the equivalent forms.

Proof. Define 0\ltimes_0: A0B=(AIr)(BIq)A \ltimes_0 B = (A \otimes I_r) (B \otimes I_q). Then we get

{Ir=Ilcm(q,r)/qIgcd(q,r),Iq=Ilcm(q,r)/rIgcd(q,r).\left\{\begin{array}{l} I_r = I_{{\operatorname{lcm}} (q, r) / q} \otimes I_{\gcd (q, r)},\\ I_q = I_{{\operatorname{lcm}} (q, r) / r} \otimes I_{\gcd (q, r) .} \end{array}\right.
Thus
(A0B)=(AIlcm(q,r)/qIgcd(q,r))(BIlcm(q,r)/rIgcd(q,r))=(AB)Igcd(q,r).\begin{aligned} (A \ltimes_0 B) & = (A \otimes I_{{\operatorname{lcm}} (q, r) / q} \otimes I_{\gcd (q, r)}) (B \otimes I_{{\operatorname{lcm}} (q, r) / r} \otimes I_{\gcd (q, r)})\\ & = (A \ltimes B) \otimes I_{\gcd (q, r)} . \end{aligned}
Considering (A0B)0C(A \ltimes_0 B) \ltimes_0 C and A0(B0C)A \ltimes_0 (B \ltimes_0 C),
(A0B)0C=((A0B)It)(CIqs)=((AIr)(BIq)It)(CIqs)=(AIrt)(BIqt)(CIqs)=(AIrt)((BIt)(CIs)Iq)=(AIrt)((B0C)Iq)=A0(B0C),\begin{aligned} (A \ltimes_0 B) \ltimes_0 C & = ((A \ltimes_0 B) \otimes I_t) (C \otimes I_{qs})\\ & = ((A \otimes I_r) (B \otimes I_q) \otimes I_t) (C \otimes I_{qs})\\ & = (A \otimes I_{rt}) (B \otimes I_{qt}) (C \otimes I_{qs})\\ & = (A \otimes I_{rt}) ((B \otimes I_t) (C \otimes I_s) \otimes I_q)\\ & = (A \otimes I_{rt}) ((B \ltimes_0 C) \otimes I_q)\\ & = A \ltimes_0 (B \ltimes_0 C), \end{aligned}
thus the operator 0\ltimes_0 is associative.

Then we consider the relation between (A0B)0C(A \ltimes_0 B) \ltimes_0 C and (AB)C(A \ltimes B) \ltimes C.

(A0B)0C=((AB)Igcd(q,r))0C=(((AB)Igcd(q,r))C)Igcd(qs,t)=(((AB)Igcd(q,r))Ilcm(qs,t)/(qs))(CIlcm(qs,t))Igcd(qs,t)=(((AB)Igcd(q,r))It)(CIqs)=((AB)Igcd(q,r)t)(CIqs)\begin{aligned} (A \ltimes_0 B) \ltimes_0 C & = ((A \ltimes B) \otimes I_{\gcd (q, r)}) \ltimes_0 C\\ & = (((A \ltimes B) \otimes I_{\gcd (q, r)}) \ltimes C) \otimes I_{\gcd (qs, t)}\\ & = (((A \ltimes B) \otimes I_{\gcd (q, r)}) \otimes I_{{\operatorname{lcm}} (qs, t) / (qs)}) (C \otimes I_{{\operatorname{lcm}} (qs, t)}) \otimes I_{\gcd (qs, t)}\\ & = (((A \ltimes B) \otimes I_{\gcd (q, r)}) \otimes I_t) (C \otimes I_{qs})\\ & = ((A \ltimes B) \otimes I_{\gcd (q, r) t}) (C \otimes I_{qs}) \end{aligned}
For convenience, we denote I{n}:=InI \{ n \} : = I_n, and then we get
((AB)Igcd(q,r)t)=(AB)I{rlcm(slcm(q,r)r,t)slcm(q,r)}I{stlcm(q,r)gcd(q,r)rlcm(slcm(q,r)r,t)}=(AB)I{rlcm(slcm(q,r)r,t)slcm(q,r)}I{sqtlcm(slcm(q,r)r,t)}=(AB)I{rlcm(slcm(q,r)r,t)slcm(q,r)}I{gcd(q,r)gcd(slcm(q,r)r,t)},\begin{aligned} ((A \ltimes B) \otimes I_{\gcd (q, r) t}) & = (A \ltimes B) \otimes I \left\{ \frac{r {\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)}{s {\operatorname{lcm}} (q, r)} \right\} \otimes I \left\{ \frac{st {\operatorname{lcm}} (q, r) \gcd (q, r)}{r {\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} \right\}\\ & = (A \ltimes B) \otimes I \left\{ \frac{r {\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)}{s {\operatorname{lcm}} (q, r)} \right\} \otimes I \left\{ \frac{sqt}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} \right\}\\ & = (A \ltimes B) \otimes I \left\{ \frac{r {\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)}{s {\operatorname{lcm}} (q, r)} \right\} \otimes I \left\{ \gcd (q, r) \gcd \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right) \right\}, \end{aligned}
and
(CIqs)=CI{lcm(slcm(q,r)r,t)t}I{tqslcm(slcm(q,r)r,t)}.(C \otimes I_{qs}) = C \otimes I \left\{ \frac{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)}{t} \right\} \otimes I \left\{ \frac{tqs}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} \right\} .
it’s not hard to find that gcd(q,r)gcd(slcm(q,r)r,t)=tqslcm(slcm(q,r)r,t)\gcd (q, r) \gcd \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right) = \frac{tqs}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)},
gcd(q,r)gcd(slcm(q,r)r,t)=tqslcm(slcm(q,r)r,t)tqs=gcd(q,r)stlcm(q,r)rtqs=sqrtr,\begin{aligned} \gcd (q, r) \gcd \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right) = \frac{tqs}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} & \Leftrightarrow tqs = \gcd (q, r) \frac{st {\operatorname{lcm}} (q, r)}{r}\\ & \Leftrightarrow tqs = \frac{sqrt}{r}, \end{aligned}
and that’s trivial.

Thus we get (A0B)0C=((AB)C)I{gcd(q,r)gcd(slcm(q,r)r,t)}(A \ltimes_0 B) \ltimes_0 C = ((A \ltimes B) \ltimes C) \otimes I \left\{ \gcd (q, r) \gcd \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right) \right\}.

By the same method, we consider A0(B0C)A \ltimes_0 (B \ltimes_0 C).

A0(B0C)=A0((BC)I{gcd(s,t)})=(A((BC)I{gcd(s,t)}))I{gcd(q,rt)}=(AI{lcm(q,rt)q})((BC)I{gcd(s,t)lcm(q,rt)rt})I{gcd(q,rt)}=(AI{rt})((BC)I{qgcd(s,t)})\begin{aligned} A \ltimes_0 (B \ltimes_0 C) & = A \ltimes_0 ((B \ltimes C) \otimes I \{ \gcd (s, t) \})\\ & = (A \ltimes ((B \ltimes C) \otimes I \{ \gcd (s, t) \})) \otimes I \{ \gcd (q, rt) \}\\ & = \begin{aligned} &\left( A \otimes I \left\{ \frac{{\operatorname{lcm}} (q, rt)}{q} \right\} \right) \left( (B \ltimes C) \otimes I \left\{ \frac{\gcd (s, t) {\operatorname{lcm}} (q, rt)}{rt} \right\} \right)\\ &\otimes I \{ \gcd (q, rt) \} \end{aligned}\\ & = (A \otimes I \{ rt \}) ((B \ltimes C) \otimes I \{ q \gcd (s, t) \}) \end{aligned}
(AI{rt})=AI{lcm(q,rlcm(s,t)s)q}I{rtqlcm(q,rlcm(s,t)s)}\begin{aligned} (A \otimes I \{ rt \}) & = A \otimes I \left\{ \frac{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)}{q} \right\} \otimes I \left\{ \frac{rtq}{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)} \right\} \end{aligned}
and
((BC)I{qgcd(s,t)})=(BC)I{slcm(rlcm(s,t)s,q)rlcm(s,t)}I{qrtlcm(rlcm(s,t)s,q)}\begin{aligned} ((B \ltimes C) \otimes I \{ q \gcd (s, t) \}) & = (B \ltimes C) \otimes I \left\{ \frac{s {\operatorname{lcm}} \left( \frac{r {\operatorname{lcm}} (s, t)}{s}, q \right)}{r {\operatorname{lcm}} (s, t)} \right\} \otimes I \left\{ \frac{qrt}{{\operatorname{lcm}} \left( \frac{r {\operatorname{lcm}} (s, t)}{s}, q \right)} \right\} \end{aligned}
so we get
A0(B0C)=(A(BC))I{qrtlcm(q,rlcm(s,t)s)}A \ltimes_0 (B \ltimes_0 C)= (A \ltimes (B \ltimes C)) \otimes I \left\{ \frac{qrt}{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)} \right\}
.

And then we prove that qrtlcm(q,rlcm(s,t)s)=tqslcm(slcm(q,r)r,t)\frac{qrt}{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)} = \frac{tqs}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)}.

qrtlcm(q,rlcm(s,t)s)=tqslcm(slcm(q,r)r,t)rlcm(q,rlcm(s,t)s)=slcm(slcm(q,r)r,t)rlcm(slcm(q,r)r,t)=slcm(rlcm(s,t)s).\begin{aligned} \frac{qrt}{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)} = \frac{tqs}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} & \Leftrightarrow \frac{r}{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)} = \frac{s}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)}\\ & \Leftrightarrow r {\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right) = s {\operatorname{lcm}} \left( \frac{r {\operatorname{lcm}} (s, t)}{s} \right) . \end{aligned}
When q,r,s,tq, r, s, t are coprime,
slcm(slcm(q,r)r,t)=slcm(sq,t)=1qt=rprst/s=rlcm(rlcm(s,t)s,q).\begin{aligned} \frac{s}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} & = \frac{s}{{\operatorname{lcm}} (sq, t)}\\ & = \frac{1}{qt}\\ & = \frac{r}{prst / s}\\ & = \frac{r}{{\operatorname{lcm}} \left( \frac{r {\operatorname{lcm}} (s, t)}{s}, q \right)} . \end{aligned}
And when they are not coprime, Let q=i=1npiaiq = \prod_{i = 1}^n p_i^{a_i}, r=i=1npibir = \prod_{i = 1}^n p_i^{b_i}, s=i=1npicis = \prod_{i = 1}^n p_i^{c_i}, t=i=1npidit = \prod_{i = 1}^n p_i^{d_i}, and then we get
rlcm(slcm(q,r)r,t)=i=1npibilcm(i=1npimin(ai,bi)+cidi,i=1npidi)=i=1npibi+min(min(ai,bi)+cibi,di),slcm(rlcm(s,t)s)=i=1npicilcm(i=1npimin(ci,di)+bici,i=1npiai)=i=1npici+min(min(ci,di)+bici,ai).\begin{aligned} r {\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right) & = \prod_{i = 1}^n p_i^{b_i} {\operatorname{lcm}} \left( \prod_{i = 1}^n p_i^{\min (a_i, b_i) + c_i - d_i}, \prod_{i = 1}^n p_i^{d_i} \right)\\ & = \prod_{i = 1}^n p_i^{b_i + \min (\min (a_i, b_i) + c_i - b_i, d_i)},\\ s {\operatorname{lcm}} \left( \frac{r {\operatorname{lcm}} (s, t)}{s} \right) & = \prod_{i = 1}^n p_i^{c_i} {\operatorname{lcm}} \left( \prod_{i = 1}^n p_i^{\min (c_i, d_i) + b_i - c_i}, \prod_{i = 1}^n p_i^{a_i} \right)\\ & = \prod_{i = 1}^n p_i^{c_i + \min (\min (c_i, d_i) + b_i - c_i, a_i)} . \end{aligned}
It remains to prove that
bi+min(min(ai,bi)+cibi,di)=ci+min(min(ci,di)+bici,ai)bici+min(min(ai,bi)+cibi,di)=min(min(ci,di)+bici,ai)min(min(ai,bi),di+bici)=min(min(ci,di)+bici,ai)min(min(ai,bi),di+bici)=min(min(bi,di+bici),ai)min(ai,bi,di+bici)=min(bi,di+bici,ai)\begin{aligned} & b_i + \min (\min (a_i, b_i) + c_i - b_i, d_i) = c_i + \min (\min (c_i, d_i) + b_i - c_i, a_i)\\ \Leftrightarrow &b_i - c_i + \min (\min (a_i, b_i) + c_i - b_i, d_i) = \min (\min (c_i, d_i) + b_i - c_i, a_i) \\ \Leftrightarrow & \min (\min (a_i, b_i), d_i + b_i - c_i) = \min (\min (c_i, d_i) + b_i - c_i, a_i) \\ \Leftrightarrow & \min (\min (a_i, b_i), d_i + b_i - c_i) = \min (\min (b_i, d_i + b_i - c_i) , a_i) \\ \Leftrightarrow &\min (a_i, b_i, d_i + b_i - c_i) = \min (b_i, d_i + b_i - c_i, a_i) \end{aligned}
and that’s trivial.

Then by doing projection,

A0(B0C)=(A0B)0C(A0(B0C))Ψ=((A0B)0C)ΨA(BC)=(AB)C,\begin{aligned} A \ltimes_0 (B \ltimes_0 C) = (A \ltimes_0 B) \ltimes_0 C & \Leftrightarrow (A \ltimes_0 (B \ltimes_0 C)) \Psi = ((A \ltimes_0 B) \ltimes_0 C) \Psi\\ & \Leftrightarrow A \ltimes (B \ltimes C) = (A \ltimes B) \ltimes C, \end{aligned}
where
Ψ=(I{qsuqrtlcm(q,rlcm(s,t)s)}𝟏{qrtlcm(q,rlcm(s,t)s)})=(I{qsutqslcm(slcm(q,r)r,t)}𝟏{tqslcm(slcm(q,r)r,t)})\begin{aligned} \Psi &= \left( I \left\{ qsu - \frac{qrt}{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)} \right\} \otimes {\boldsymbol{1}} \left\{ \frac{qrt}{{\operatorname{lcm}} \left( q, \frac{r {\operatorname{lcm}} (s, t)}{s} \right)} \right\} \right)\\ &= \left( I \left\{ qsu - \frac{tqs}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} \right\} \otimes {\boldsymbol{1}} \left\{ \frac{tqs}{{\operatorname{lcm}} \left( \frac{s {\operatorname{lcm}} (q, r)}{r}, t \right)} \right\} \right) \end{aligned}
 ◻