# How to code the following product?

I am trying to examine the properties of the following product for a given tuple $\vec \lambda = (\lambda_1, \lambda_2, \dots, \lambda_n)$, then the product is as follows: $$\dim \Gamma_\lambda = \prod_{i < j} {(l_i^2 - l_j^2) \over (m_i^2 - m_j^2)} = 2^{n-1} {\prod_{i < j} (l_i^2 - l_j^2) \over (2n - 2)!\cdot (2n - 4)! \cdots 2!}$$ where $l_i = \lambda_i +n - i$ and $m_i = n- i$.

The function dim_calc(n, lambda) might take a tuple lambda and the length of the tuple, n, and then define the $l_i$ and $m_i$'s accordingly? I'm not really sure how to write this though...any hints for this symbolic computation? Thanks!

Solutions：

Firstly,I give a number to n

n = 6;
lam = Array[\[Lambda], n];
l[i_] := lam[[i]] + n - i
m[i_] := n - i
num = Times @@
Flatten@Table[l[i]^2 - l[j]^2, {i, 1, n - 1}, {j, i + 1, n}];
den = Times @@
Flatten@Table[m[i]^2 - m[j]^2, {i, 1, n - 1}, {j, i + 1, n}];
dimLamta = num/den Summary:

We can define a united fuction to caculate it!

dimLambataLeft[n0_Integer] := Module[{n = n0, i},
lam = Array[\[Lambda], n];
l[i_] := lam[[i]] + n - i;
m[i_] := n - i;
num = Times @@
Flatten@Table[l[i]^2 - l[j]^2, {i, 1, n - 1}, {j, i + 1, n}];
den = Times @@
Flatten@Table[m[i]^2 - m[j]^2, {i, 1, n - 1}, {j, i + 1, n}];
num/den]

dimLambataRight[n0_Integer] :=
Module[{n = n0, i}, lam = Array[\[Lambda], n];
l[i_] := lam[[i]] + n - i;
num = Times @@
Flatten@Table[l[i]^2 - l[j]^2, {i, 1, n - 1}, {j, i + 1, n}];
cofficient = 2^(n - 1)/Product[(2 i)!, {i, 1 , n - 1}];
num *cofficient
]


At last:

We can check out wheter dimLambataLeft is equal to dimLambataLeft.

dimLambataLeft[n] == dimLambataRight[n]


True

That's my solution!

One way to set this up is to define:

n = 6;
lam = Array[λ, n];
m[n_, i_] := n - i;
el[n_, i_] := lam[[i]] + n - i;


Then for any j, you can calculate the product:

j = 4;
Product[(el[n, i]^2 - el[n, j]^2)/(m[n, i]^2 - m[n, j]^2), {i, 1, j - 1}] First product:

prod[k_] := Module[
{n, num, den, ind, numerator, denominator},
n = Length@k;
num = (k - Range[n] + n)^2;
den = n - Range[n];
ind = Flatten[Table[{i, j}, {i, 1, n - 1}, {j, i + 1, n}], 1];
numerator = Times @@ (#1 - #2 & @@@ (num[[#]] & /@ ind));
denominator = Times @@ (#1^2 - #2^2 & @@@ (den[[#]] & /@ ind));
numerator/denominator
]


Second product (if you prefer):

prod2[k_] :=
Module[{n, num, ind, numerator, denominator},
n = Length@k;
num = (k - Range[n] + n)^2;
ind = Flatten[Table[{i, j}, {i, 1, n - 1}, {j, i + 1, n}], 1];
numerator = Times @@ (#1 - #2 & @@@ (num[[#]] & /@ ind));
denominator = Times @@ (Factorial /@ Range[2, 2 n - 2, 2]);
2^(n - 1) numerator/denominator]


You can test equlaity. Reassuringly

And @@ (prod[#] == prod2[#] & /@ RandomInteger[4, {100, 3}])


yields TRUE