1
$\begingroup$

If one applies the command

f1 = GenericCylindricalDecomposition[
set1 > 0 && ret1A > 0, {a8[1, 3], b8[1, 3], c8[1, 3], d8[1, 3], 
a8[2, 3], b8[2, 3], c8[2, 3], d8[2, 3], a8[1, 4], b8[1, 4], 
c8[1, 4], d8[1, 4], a8[2, 4], b8[2, 4], c8[2, 4], d8[2, 4]}]

to the expressions

set1 = {1 - a8[1, 3]^2 - a8[2, 3]^2 - b8[1, 3]^2 - b8[2, 3]^2 - 
c8[1, 3]^2 - c8[2, 3]^2 - d8[1, 3]^2 - d8[2, 3]^2}

and

ret1A = 1 - a8[2, 3]^2 + a8[1, 4]^2 (-1 + a8[2, 3]^2) - b8[1, 3]^2 - 
b8[1, 4]^2 + a8[2, 3]^2 b8[1, 4]^2 + (-1 + a8[1, 4]^2) b8[2, 3]^2 + 
b8[1, 4]^2 b8[2, 3]^2 + 2 a8[1, 4] a8[2, 3] b8[1, 3] b8[2, 4] - 
2 b8[1, 3] b8[1, 4] b8[2, 3] b8[2, 4] - b8[2, 4]^2 + 
b8[1, 3]^2 b8[2, 4]^2 - c8[1, 3]^2 + b8[2, 4]^2 c8[1, 3]^2 - 
2 b8[2, 3] b8[2, 4] c8[1, 3] c8[1, 4] - c8[1, 4]^2 + 
a8[2, 3]^2 c8[1, 4]^2 + b8[2, 3]^2 c8[1, 4]^2 - 
2 b8[1, 4] b8[2, 4] c8[1, 3] c8[2, 3] + 
2 b8[1, 3] b8[2, 4] c8[1, 4] c8[2, 3] - c8[2, 3]^2 + 
a8[1, 4]^2 c8[2, 3]^2 + b8[1, 4]^2 c8[2, 3]^2 + 
c8[1, 4]^2 c8[2, 3]^2 + 2 a8[1, 4] a8[2, 3] c8[1, 3] c8[2, 4] + 
2 b8[1, 4] b8[2, 3] c8[1, 3] c8[2, 4] - 
2 b8[1, 3] b8[2, 3] c8[1, 4] c8[2, 4] - 
2 b8[1, 3] b8[1, 4] c8[2, 3] c8[2, 4] - 
2 c8[1, 3] c8[1, 4] c8[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2, 
   3] (b8[1, 3] b8[1, 4] + c8[1, 3] c8[1, 4] + 
    d8[1, 3] d8[1, 4]) - b8[1, 4] c8[1, 3] d8[2, 3] + 
 b8[1, 3] c8[1, 4] d8[2, 3] + 
 a8[1, 4] (b8[1, 3] b8[2, 3] + c8[1, 3] c8[2, 3] + 
    d8[1, 3] d8[2, 3])) - 
2 (a8[1, 4] (-b8[2, 3] c8[1, 3] + b8[1, 3] c8[2, 3]) - 
 b8[1, 4] b8[2, 3] d8[1, 3] - c8[1, 4] c8[2, 3] d8[1, 3] + 
 a8[2, 3] (b8[1, 4] c8[1, 3] - b8[1, 3] c8[1, 4] - 
    a8[1, 4] d8[1, 3]) + b8[1, 3] b8[2, 3] d8[1, 4] + 
 c8[1, 3] c8[2, 3] d8[1, 
   4] + (b8[1, 3] b8[1, 4] + c8[1, 3] c8[1, 4] + 
    d8[1, 3] d8[1, 4]) d8[2, 3]) d8[2, 
4] + (-1 + b8[1, 3]^2 + c8[1, 3]^2 + d8[1, 3]^2) d8[2, 4]^2 + 
a8[1, 3]^2 (-1 + a8[2, 4]^2 + b8[2, 4]^2 + c8[2, 4]^2 + 
 d8[2, 4]^2) + 
2 a8[1, 3] (-a8[2, 3] b8[1, 4] b8[2, 4] - 
 a8[2, 3] c8[1, 4] c8[2, 4] - b8[2, 4] c8[2, 3] d8[1, 4] + 
 b8[2, 3] c8[2, 4] d8[1, 4] + b8[2, 4] c8[1, 4] d8[2, 3] - 
 b8[1, 4] c8[2, 4] d8[2, 3] + 
 a8[2, 4] (b8[1, 4] b8[2, 3] + c8[1, 4] c8[2, 3] + 
    d8[1, 4] d8[2, 3]) - (b8[2, 3] c8[1, 4] - b8[1, 4] c8[2, 3] + 
    a8[2, 3] d8[1, 4]) d8[2, 4] - 
 a8[1, 4] (a8[2, 3] a8[2, 4] + b8[2, 3] b8[2, 4] + 
    c8[2, 3] c8[2, 4] + d8[2, 3] d8[2, 4]))

one quickly (5 secs.) arrives at a solution (LeafCount = 44415). (The second part of the solution is False, so will be ignored.)

Now one has the formidable problem of integrating flat measure (i. e., 1) over the so-defined body. The first (innermost) twelve limits seem quite simple (spherical-like) in structure, that is, on the order of

± Sqrt[1-a8[1,3]^2-a8[1,4]^2-b8[1,3]^2-b8[1,4]^2-c8[1,3]^2-c8[1,4]^2-d8[1,3]^2]

The outermost four limits seem to be of the same nature but for the addition to both (spherical-like) limits of the same (effectively constant) expression (not involving the current variable of integration).

Obviously, a very daunting (if at all conceivably addressable) problem. Clearly, it would seem that at each state of the integration, one needs to reexpress the current limits in terms of some condensed expression involving only the present variable of integration, and all the other variables lumped together (ignoring their individual nature, for the moment). Then, in the next (more inner) step, one would "decondense" the previously condensed expression, selecting out the new variable of integration,....

A solution to this problem is tantamount to computing the volume of $4 \times 4$ quaternionic correlation matrices, the (1,2)- (2,1)-, (3,4)- and (4,3)-entries of which are a priori 0. It is part of the quantum-information-theoretic problem of computing the volume of the corresponding $4 \times 4$ "density matrices" (positive definite, with trace 1), representing "two-quater[nionic]-bits".

Here's a somewhat simpler (12-dimensional vs. 16-dimensional) related problem--although probably not as simple, as yohbs suggested. (The twelve sets of limits are now all "sphere-like").

Now, we apply the command

h1 = GenericCylindricalDecomposition[aet > 0 && bet > 0, 

{a8[2, 3], b8[2, 3], c8[2, 3], d8[2, 3], a8[1, 4], b8[1, 4], c8[1, 4], d8[1, 4], a8[2, 4], b8[2, 4], c8[2, 4], d8[2, 4]}]

to the expressions

aet = 1 - a8[2, 3]^2 - b8[2, 3]^2 - c8[2, 3]^2 - d8[2, 3]^2

and

bet = 1 - a8[2, 3]^2 - a8[2, 4]^2 - b8[1, 4]^2 - b8[2, 3]^2 - b8[2, 4]^2 - c8[1, 4]^2 - c8[2, 3]^2 - c8[2, 4]^2 - d8[1, 4]^2 - d8[2, 3]^2 + a8[1, 4]^2*(-1 + a8[2, 3]^2 + b8[2, 3]^2 + c8[2, 3]^2 + d8[2, 3]^2) + (b8[1, 4]^2 + c8[1, 4]^2 + d8[1, 4]^2)*(a8[2, 3]^2 + b8[2, 3]^2 + c8[2, 3]^2 + d8[2, 3]^2) - d8[2, 4]^2

$\endgroup$
  • $\begingroup$ Can you give a simpler version of your problem, perhaps a few dimensions less, to make more managable. As it stands I find it hard to believe that you'll get help in this forum. $\endgroup$ – yohbs Aug 7 '17 at 14:00
  • $\begingroup$ OK, yohbs. I fully understand your point. Actually, I am thinking of something in the direction you indicated (involving "X-states"), but it may not be suitable for posting for a number of days. $\endgroup$ – Paul B. Slater Aug 7 '17 at 14:05
3
$\begingroup$

Here's an approach based on an example from the docs. First, take the full component from the decomposition:

full = First@GenericCylindricalDecomposition[x^2 + y^2 + z^2 <= 1 && x <= z, {x, y, z}]
(*
(-1 < x < -(1/Sqrt[2]) && -Sqrt[1 - x^2] < y < Sqrt[1 - x^2] &&
       -Sqrt[1 - x^2 - y^2] < z < Sqrt[1 - x^2 - y^2]) ||
(-(1/Sqrt[2]) < x < 0 &&
   ((-Sqrt[1 - x^2] < y < -Sqrt[1 - 2 x^2] &&
       -Sqrt[1 - x^2 - y^2] < z < Sqrt[1 - x^2 - y^2]) ||
    (-Sqrt[1 - 2 x^2] < y < Sqrt[1 - 2 x^2] &&
       x < z < Sqrt[1 - x^2 - y^2]) ||
    (Sqrt[1 - 2 x^2] < y < Sqrt[1 - x^2] &&
       -Sqrt[1 - x^2 - y^2] < z < Sqrt[1 - x^2 - y^2]))) ||
(0 < x < 1/Sqrt[2] && -Sqrt[1 - 2 x^2] < y < Sqrt[1 - 2 x^2] &&
       x < z < Sqrt[1 - x^2 - y^2])
*)

Then the following constructs the iterators over each of the subregions of the decomposition (update notice: the original code for converting a cylindrical decomposition to a list of iterators was not general enough):

ClearAll[iter, itercvt];
SetAttributes[iter, {Listable, Flat}];
iter[ineq__, or_Or, rest : Except[_Or] ...] := Or @@ iter[ineq, List @@ or, rest];
itercvt[a_, b__] := itercvt /@ {a, b};
itercvt[Verbatim[Inequality][a_, Less | LessEqual, x_, Less | LessEqual, b_]] :=
  {x, a, b}; 
itercvt[(Less | LessEqual)[a_, x_, b_]] := {x, a, b};

subregions = List[full] /. And -> iter /. Or -> Sequence /. iter -> itercvt
(*
{{{x, -1, -(1/Sqrt[2])}, {y, -Sqrt[1 - x^2], Sqrt[1 - x^2]},     {z, -Sqrt[1 - x^2 - y^2], Sqrt[1 - x^2 - y^2]}},
 {{x, -(1/Sqrt[2]), 0},  {y, -Sqrt[1 - x^2], -Sqrt[1 - 2 x^2]},  {z, -Sqrt[1 - x^2 - y^2], Sqrt[1 - x^2 - y^2]}},
 {{x, -(1/Sqrt[2]), 0},  {y, -Sqrt[1 - 2 x^2], Sqrt[1 - 2 x^2]}, {z, x, Sqrt[1 - x^2 - y^2]}},
 {{x, -(1/Sqrt[2]), 0},  {y, Sqrt[1 - 2 x^2], Sqrt[1 - x^2]},    {z, -Sqrt[1 - x^2 - y^2], Sqrt[1 - x^2 - y^2]}},
 {{x, 0, 1/Sqrt[2]},     {y, -Sqrt[1 - 2 x^2], Sqrt[1 - 2 x^2]}, {z, x, Sqrt[1 - x^2 - y^2]}}}
*)

Integrate over each and add up the results.

Integrate[1, ##] & @@@ subregions // Total
(*  π/6 - 1/12 (-8 + 5 Sqrt[2]) π + (4 + π)/6 + 1/12 (-8 + (-4 + 5 Sqrt[2]) π)  *)

Simplify[%]
(*  (2 π)/3  *)

You might wish to do it in way that stores partial results as you go along:

Clear[res];
Do[
 res[reg] = Integrate[1, Sequence @@ reg],
 {reg, subregions}]

Simplify@Sum[res[reg], {reg, subregions}]

If you interrupt the calculation, you can inspect the partial results with ? res, DownValues[res], or res /@ subregions. Then you don't need to recompute results you already have.

$\endgroup$
  • $\begingroup$ Thanks so much, Michael E2. I''ll try to implement the suggested procedure and report back. One curiosity (perhaps not highly germane at this point) that I noticed is that if one does a FullSimplify on the 12-variable decomposition, the result is 11-dimensional. When you say the "docs", I presume this example is on the help page for GenericCylindricalDecomposition. But perhaps what you write was intended to be applicable to the original 16-dimensional example, and not just the ("simplified"--as yohbs suggested) 12-dimensional one. I do want to maintain partial results for subsequent analyses. $\endgroup$ – Paul B. Slater Aug 9 '17 at 3:26
  • $\begingroup$ @PaulB.Slater Yes, I stole the example from the GenericCylindricalDecomposition documentation. My example was intended as a supersimplified 3D version of whatever dimensional version one wants to explore. (I thought 3D might be short enough to be readable, and long enough to illustrate the method.) $\endgroup$ – Michael E2 Aug 9 '17 at 3:35
  • $\begingroup$ I tried this on both the 16- and 12-dimensional examples, and the Integrate command gave me the error message, Integrate::ilim: "Invalid integration variable or limit(s) in -Sqrt[1-a8[2,3]^2]. " $\endgroup$ – Paul B. Slater Aug 9 '17 at 3:50
  • $\begingroup$ @PaulB.Slater I think there are two bugs in the code, but it works on yours if I change Flatten@full to Flatten@{full}. (It's because the region is "decomposed" into 1 subregion and there is no Or/|| in the expression. The other bug arises, I think, from more complicated regions for which Listable is the wrong operation. I'll see whether I can fix it quickly or not.) $\endgroup$ – Michael E2 Aug 9 '17 at 11:57
  • $\begingroup$ OK, thanks again Michael E2 for your highly sophisticated efforts. I guess when you speak about the use of Flatten, it would be in some new code you're working on, as I don't see its occurrence in the original code posted. $\endgroup$ – Paul B. Slater Aug 9 '17 at 13:49
0
$\begingroup$

Using the code given by Michael E2, I have so far computed the volume ($\frac{\pi^6}{288}$) of the indicated 12-dimensional body. The computation took 5443 seconds. The volume of the indicated 16-dimensional body remains to be calculated, if at all doable. (I will update this answer if it is found.) Also, I hope in the 12-dimensional setting to introduce a further ("separability") constraint

-a8[2, 3]^2 - b8[2, 3]^2 - c8[2, 3]^2 - d8[2, 3]^2 + u^2 (1 - a8[2, 4]^2 - b8[2, 4]^2 - c8[2, 4]^2 - (a8[1, 4]^2 + b8[1, 4]^2 + c8[1, 4]^2 + d8[1, 4]^2) (u^2 - a8[2, 3]^2 - b8[2, 3]^2 - c8[2, 3]^2 - d8[2, 3]^2) - d8[2, 4]^2) > 0

Note the additional thirteenth variable $u \in [0,1]$. I would like to compute the volume as a function of $u$. A weaker ("partial separability") constraint is

1 - u^2 a8[1, 4]^2 - u^2 b8[1, 4]^2 - u^2 c8[1, 4]^2 - u^2 d8[1, 4]^2 > 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.