\(Subscripts_{on_{subscripts}}\)

2021 James B. Wilson, Colorado State University

\(Subscripts_{on_{subscripts}}\)

Cause: Ordering what doesn't want to be ordered.

 

\[\Gamma_{i_1\cdots i_{a}}^{j_1\cdots j_b}\]

 

\[K^{d_1\times \cdots \times d_{\ell}}\]

 

\[x_{i_1}\otimes \ldots \otimes x_{i_{\ell}}\]

 

\[K^{d_1}\otimes \cdots \otimes K^{d_{\ell}}\]

 

\(Subscripts_{on_{subscripts}}\)

In Code:  we want a command like

def MakeSpace( K, d_1, ...., d_ell )  
	... 

Above "ell" is a variable also,

but the program doesn't know this,

this cannot be programmed without very special features (dependent types, variadic inputs, etc.).

\(Subscripts_{on_{subscripts}}\)

Solution 1: assign a new variable.

 

\[K^{d_1\times \cdots \times d_{\ell}}\]

becomes

\[K^{d}, \quad where\quad d=d_1\times \cdots \times d_{\ell}\]

\(Subscripts_{on_{subscripts}}\)

Solution 2: use a set

\[K^{d_1}\otimes \cdots \otimes K^{d_{\ell}}\]

becomes

\[\bigotimes_{d\in D} K^d,\qquad D=\{d_1,\ldots,d_{\ell}\}\]

 

One step further let the set index itself:

Let \(\mathcal{V}\) be a set of spaces and consider \[\bigotimes_{V\in \mathcal{V}} V=\otimes\mathcal{V}\]

 

\(Subscripts_{on_{subscripts}}\)

// Original
def MakeSpace( K, d_1, ...., d_ell )  
	... 
   
// Create index set
ds = [1,2, 19,...]  // "..." means user filled in constants

def MakeSpace( K, ds)
	... 

Solution 2 in code

\[x_1+\cdots+x_{\ell}\]

\[\Sigma X = \sum_{x\in X} x, \qquad X=\{x_1,\ldots, x_{\ell}\}\]

xs = [ 3, -9, 541 ]
sum(xs)

// Alternatives
xs.fold(+)     // head+tail.fold(+), recursive
+&xs           // "&"="forall" + = sum

\(Subscripts_{on_{subscripts}}\)

Solution \(3-\varepsilon\):  if sub-sub-scripted, e.g.

\[\Gamma_{i_1\ldots i_a}\]

replace \(i_*=(i_1,\ldots,i_a)\)

\[\Gamma_{i_*}\]

\(Subscripts_{on_{subscripts}}\)

Asside: what is \((i_1,\ldots, i_a)\)?

\[(i_1,\ldots,i_a)\in [d_1]\times \cdots \times [d_{\ell}]\]

where \([n]=\{1,\ldots,n\}\)

 

Generally

\[(x_1,\ldots,x_a)\in X_1\times \cdots \times X_{a}\]

That is...

\[x\in \Pi \mathcal{X}=\prod_{X\in \mathcal{X}} X\]

\(Subscripts_{on_{subscripts}}\)

Solution 3: use functions

\[\Gamma_{i_1\ldots i_a}\]

Step I, replace \(i_k\) with tuple \(\iota\in \Pi D\)

 

Step II, \(\Gamma\) is now a function on tuples

\[\Gamma:\Pi D\to K\]

and we access it like any function, 

\[\Gamma_{\iota}\in K\]

\[\Gamma_{i_1\ldots i_a}^{j_1\ldots j_b}\]

\(\Gamma_{\iota}^{\tau}\) where \(\iota\in \Pi L \quad\tau\in \Pi U\)

is = x -> ...  // A lambda, a little function 
js = y -> ...  // that given index, calcs the coordinate.
gamma(is, js)

Examine what you mean

 

A subscript in the end is just turning symbol into a function, \(a_i\) means a function varying with \(i\), so \(a:I\to T\).

 

All functions are defined on sets and so order of the domain never matters.

 

Let that reality sink in and soon your subscripts will become tidy and programable.

But above all be flexible with others, and yourself!