# FindInstance got stuck when n = 1

**URL:** <https://community.wolfram.com/t/findinstance-got-stuck-when-n-1/20812>\
**Category:** Questions\
**Tags:** algebra\
**Created:** [October 1, 2022, 9:53am UTC](https://community.wolfram.com/t/findinstance-got-stuck-when-n-1/20812 "2022-10-01T09:53:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hongyizhao](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@hongyizhao](https://community.wolfram.com/u/hongyizhao)\
**Post date:** [October 1, 2022, 9:53am UTC](https://community.wolfram.com/t/findinstance-got-stuck-when-n-1/20812/1 "2022-10-01T09:53:52Z")

</div>

I try to calculate the example represented [here](https://en.wikipedia.org/wiki/Crystallographic_restriction_theorem#Higher_dimensions):

 ![Selection_249.png](https://global.discourse-cdn.com/wolfram/original/2X/8/856b12f70d23cbe95bb0918eca021c9dda301b71.png)

The following method works:

```
In[904]:= (*https://en.wikipedia.org/wiki/Crystallographic_restriction_theorem#Higher_dimensions*)
Clear[x];
rot1={
{0,0,0,-1},
{1,0,0,0},
{0,-1,0,0},
{0,0,-1,0}
};
{val1, vec1}=rot1//Eigensystem[#,Cubics -> True]&//ComplexExpand;

cval1=SortBy[Select[val1, Im[#] > 0 &],-Re[#]&];
cvalmat1={{Re[#],-Im[#]},{Im[#],Re[#]}}&/@cval1;
(*
https://mathematica.stackexchange.com/questions/19778/how-to-form-a-block-diagonal-matrix-from-a-list-of-matrices
*)
diagmat=DiagonalMatrix[Hold /@ cvalmat1] // ReleaseHold// ArrayFlatten;
conj=Array[x,{4,4}];

B={{-1/2,0,-1/2,Sqrt[2]/2},{1/2,Sqrt[2]/2,-1/2,0},{-1/2,0,-1/2,-Sqrt[2]/2},{-1/2,Sqrt[2]/2,1/2,0}};
sol=FindInstance[rot1 . conj==conj . diagmat && Det[conj]==Det[B], Flatten[conj],Reals,2];
conj=conj/.sol
rot1 . #==# . diagmat&/@conj

Out[913]= {{{0, -15, -(1/30), 0}, {15/Sqrt[2], -(15/Sqrt[2]), 1/(
   30 Sqrt[2]), -(1/(30 Sqrt[2]))}, {-15, 0, 0, -(1/30)}, {15/Sqrt[2],
    15/Sqrt[2], -(1/(30 Sqrt[2])), -(1/(30 Sqrt[2]))}}, {{0, 
   191, -(1/382), 0}, {-(191/Sqrt[2]), 191/Sqrt[2], 1/(
   382 Sqrt[2]), -(1/(382 Sqrt[2]))}, {191, 0, 
   0, -(1/382)}, {-(191/Sqrt[2]), -(191/Sqrt[2]), -(1/(
    382 Sqrt[2])), -(1/(382 Sqrt[2]))}}}

Out[914]= {True, True}

```

But when I try to find only one instance as follows, **FindInstance** got stuck:

```
In[926]:= (*https://en.wikipedia.org/wiki/Crystallographic_restriction_theorem#Higher_dimensions*)
Clear[x];
rot1={
{0,0,0,-1},
{1,0,0,0},
{0,-1,0,0},
{0,0,-1,0}
};
{val1, vec1}=rot1//Eigensystem[#,Cubics -> True]&//ComplexExpand;

cval1=SortBy[Select[val1, Im[#] > 0 &],-Re[#]&];
cvalmat1={{Re[#],-Im[#]},{Im[#],Re[#]}}&/@cval1;
(*
https://mathematica.stackexchange.com/questions/19778/how-to-form-a-block-diagonal-matrix-from-a-list-of-matrices
*)
diagmat=DiagonalMatrix[Hold /@ cvalmat1] // ReleaseHold// ArrayFlatten;
conj=Array[x,{4,4}];

B={{-1/2,0,-1/2,Sqrt[2]/2},{1/2,Sqrt[2]/2,-1/2,0},{-1/2,0,-1/2,-Sqrt[2]/2},{-1/2,Sqrt[2]/2,1/2,0}};
sol=FindInstance[rot1 . conj==conj . diagmat && Det[conj]==Det[B], Flatten[conj],Reals,1];
conj=conj/.sol
rot1 . #==# . diagmat&/@conj

Out[934]= $Aborted

Out[935]= {{{0, -15, -(1/30), 0}, {15/Sqrt[2], -(15/Sqrt[2]), 1/(
   30 Sqrt[2]), -(1/(30 Sqrt[2]))}, {-15, 0, 0, -(1/30)}, {15/Sqrt[2],
    15/Sqrt[2], -(1/(30 Sqrt[2])), -(1/(30 Sqrt[2]))}}, {{0, 
   191, -(1/382), 0}, {-(191/Sqrt[2]), 191/Sqrt[2], 1/(
   382 Sqrt[2]), -(1/(382 Sqrt[2]))}, {191, 0, 
   0, -(1/382)}, {-(191/Sqrt[2]), -(191/Sqrt[2]), -(1/(
    382 Sqrt[2])), -(1/(382 Sqrt[2]))}}}

Out[936]= {True, True}

```

Any tips for this problem?

Regards,  
Zhao
