This is Oscillators.info, produced by Macaulay2, version 1.26.06

Oscillators -- generation and analysis of oscillator steady states for small graphs
***********************************************************************************

Description
===========

This package supports computations with Kuramoto oscillators, including
computations for the paper [HSS], Harrington, Schenck, Stillman, Algebraic
aspects of homogeneous Kuramoto oscillators (see
https://arxiv.org/abs/2312.16069 ).  For a list of functions, and links to
their documentation nodes, see the end of this page.

Computations from the paper [HSS]
=================================

  * Generation of all SCT (simple, connected, 2-connected) graphs on small numbers of vertices
    -- generating all SCT
    graphs on n vertices
  * Checking the codimension and irreducible decomposition of the IG ideal
    -- generating all SCT graphs on n vertices
  * SCT graphs with exotic solutions,
    -- finding graphs of small size with exotic solutions
  * Example 4.1_colon_ unique graph on 8 vertices with exotic solutions and no induced cycle of length at least 5,
    -- example 4.1 in arXiv 2312.16069
  * Example 4.2_colon_ a K5 and pentagon glued along an edge
    -- example 4.2 in arXiv
    2312.16069
  * Example 4.3_colon_ examples of gluing two cycles along an edge
    -- example
    4.3 in arXiv 2312.16069
  * Example 4.4_colon_ The square within a square
    -- example 4.4 in arXiv 2312.16069

We show a possible workflow using this package.  We use NautyGraphs,
to generate graphs of small size.  We use Visualize,
to look at these graphs.

+--------------------------------+
|i1 : needsPackage "Oscillators";|
+--------------------------------+
|i2 : needsPackage "NautyGraphs";|
+--------------------------------+
|i3 : needsPackage "Visualize";  |
+--------------------------------+

Let's do an example: the 5-cycle.  First, we generate all SCT graphs on 5
vertices (i.e. connected, 2-connected simple graphs), and grab the 5-cycle.

+-----------------------------------------------------------------------------+
|i4 : Gstrs = generateGraphs(5, OnlyConnected => true, MinDegree => 2);       |
+-----------------------------------------------------------------------------+
|i5 : Gs = Gstrs/stringToGraph                                                |
|                                                                             |
|o5 = {Graph{0 => {3, 4}   }, Graph{0 => {3, 4}      }, Graph{0 => {2, 4}     |
|            1 => {3, 4}            1 => {3, 4}               1 => {3, 4}     |
|            2 => {3, 4}            2 => {3, 4}               2 => {0, 4}     |
|            3 => {0, 1, 2}         3 => {0, 1, 2, 4}         3 => {1, 4}     |
|            4 => {0, 1, 2}         4 => {3, 0, 1, 2}         4 => {2, 0, 3,  |
|     ------------------------------------------------------------------------|
|       }, Graph{0 => {2, 3}}, Graph{0 => {2, 3, 4}}, Graph{0 => {2, 3, 4}    |
|                1 => {3, 4}         1 => {3, 4}            1 => {3, 4}       |
|                2 => {0, 4}         2 => {0, 4}            2 => {0, 4}       |
|                3 => {0, 1}         3 => {0, 1}            3 => {0, 1, 4}    |
|     1}         4 => {2, 1}         4 => {2, 0, 1}         4 => {2, 0, 3,    |
|     ------------------------------------------------------------------------|
|       }, Graph{0 => {2, 3, 4}   }, Graph{0 => {2, 3, 4}}, Graph{0 => {2, 3, |
|                1 => {3, 4}               1 => {2, 3, 4}         1 => {2, 3, |
|                2 => {0, 3, 4}            2 => {0, 1, 4}         2 => {0, 1, |
|                3 => {2, 0, 1, 4}         3 => {0, 1}            3 => {0, 1, |
|     1}         4 => {2, 0, 3, 1}         4 => {2, 0, 1}         4 => {2, 0, |
|     ------------------------------------------------------------------------|
|     4}   }, Graph{0 => {2, 3, 4}   }, Graph{0 => {1, 2, 3, 4}}}             |
|     4}            1 => {2, 3, 4}            1 => {0, 2, 3, 4}               |
|     4}            2 => {0, 1, 3, 4}         2 => {1, 0, 3, 4}               |
|     4}            3 => {2, 0, 1, 4}         3 => {1, 0, 2, 4}               |
|     1, 3}         4 => {2, 0, 1, 3}         4 => {1, 0, 2, 3}               |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : Gcycle5 = Gs_3                                                          |
|                                                                             |
|o6 = Graph{0 => {2, 3}}                                                      |
|           1 => {3, 4}                                                       |
|           2 => {0, 4}                                                       |
|           3 => {0, 1}                                                       |
|           4 => {2, 1}                                                       |
|                                                                             |
|o6 : Graph                                                                   |
+-----------------------------------------------------------------------------+

We can also create the graph directly.

+----------------------------------------------------+
|i7 : Gcycle5 == graph{{0,1},{1,2},{2,3},{3,4},{4,0}}|
|                                                    |
|o7 = true                                           |
+----------------------------------------------------+

To visualize this graph, use the following lines.  You have to click on End
session in the browser to get back to Macaulay2.

openPort "8083"
visualize Gcycle5 -- important: click on End session in browser window before
closePort()
-------------------------------------------------------------------------------
continuing

We construct all of the (steady-state) solutions to the homogeneous Kuramoto
system for the 5-cycle. This includes all solutions, not just stable solutions.
In this example, we first construct the real solutions, and check their
(linear) stability. Then we find all complex solutions.  In this particular
example, all 30 solutions are real. We set the precision displayed to 3 digits.

+-----------------------------------------------------------------------------+
|i8 : printingPrecision = 3                                                   |
|                                                                             |
|o8 = 3                                                                       |
+-----------------------------------------------------------------------------+
|i9 : G = Gcycle5                                                             |
|                                                                             |
|o9 = Graph{0 => {2, 3}}                                                      |
|           1 => {3, 4}                                                       |
|           2 => {0, 4}                                                       |
|           3 => {0, 1}                                                       |
|           4 => {2, 1}                                                       |
|                                                                             |
|o9 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i10 : R = oscRing(G, CoefficientRing => CC, Reduced => true)                 |
|                                                                             |
|o10 = R                                                                      |
|                                                                             |
|o10 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i11 : I = oscSystem(G, R);                                                   |
|                                                                             |
|o11 : Ideal of R                                                             |
+-----------------------------------------------------------------------------+
|i12 : netList I_*                                                            |
|                                                                             |
|      +---------------------------+                                          |
|o12 = |- y  - y                   |                                          |
|      |   2    3                  |                                          |
|      +---------------------------+                                          |
|      |x y  + x y  - x y  - x y   |                                          |
|      | 3 1    4 1    1 3    1 4  |                                          |
|      +---------------------------+                                          |
|      |x y  - x y  + y            |                                          |
|      | 4 2    2 4    2           |                                          |
|      +---------------------------+                                          |
|      |- x y  + x y  + y          |                                          |
|      |   3 1    1 3    3         |                                          |
|      +---------------------------+                                          |
|      |- x y  - x y  + x y  + x y |                                          |
|      |   4 1    4 2    1 4    2 4|                                          |
|      +---------------------------+                                          |
|      | 2    2                    |                                          |
|      |x  + y  - 1                |                                          |
|      | 1    1                    |                                          |
|      +---------------------------+                                          |
|      | 2    2                    |                                          |
|      |x  + y  - 1                |                                          |
|      | 2    2                    |                                          |
|      +---------------------------+                                          |
|      | 2    2                    |                                          |
|      |x  + y  - 1                |                                          |
|      | 3    3                    |                                          |
|      +---------------------------+                                          |
|      | 2    2                    |                                          |
|      |x  + y  - 1                |                                          |
|      | 4    4                    |                                          |
|      +---------------------------+                                          |
+-----------------------------------------------------------------------------+
|i13 : Jac = oscJacobian(G,R)                                                 |
|                                                                             |
|o13 = | -x_2-x_3 0                            x_2                            |
|      | 0        -x_1x_3-x_1x_4-y_1y_3-y_1y_4 0                              |
|      | x_2      0                            -x_2x_4-y_2y_4-x_2             |
|      | x_3      x_1x_3+y_1y_3                0                              |
|      | 0        x_1x_4+y_1y_4                x_2x_4+y_2y_4                  |
|      -----------------------------------------------------------------------|
|      x_3                0                            |                      |
|      x_1x_3+y_1y_3      x_1x_4+y_1y_4                |                      |
|      0                  x_2x_4+y_2y_4                |                      |
|      -x_1x_3-y_1y_3-x_3 0                            |                      |
|      0                  -x_1x_4-x_2x_4-y_1y_4-y_2y_4 |                      |
|                                                                             |
|              5      5                                                       |
|o13 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i14 : realsols = findRealSolutions I;                                        |
+-----------------------------------------------------------------------------+
|i15 : netList realsols                                                       |
|                                                                             |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|o15 = |1    |-1   |-1   |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |1    |-1   |-1   |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.5  |.5   |.5   |-.5  |-.866|.866 |-.866|.866 |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |-1   |1    |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.5  |.5   |.5   |-1   |.866 |-.866|.866 |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |1    |-1   |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.5  |-.5  |.5   |-1   |-.866|.866 |-.866|0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |1    |-1   |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |1    |1    |-1   |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |1    |1    |1    |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |1    |1    |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |1    |1    |-1   |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |-1   |-1   |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |.5   |.5   |-.5  |0    |-.866|.866 |-.866|                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |.309 |-.809|-.809|.309 |.951 |.588 |-.588|-.951|                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |1    |-1   |1    |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |.5   |.5   |-.5  |0    |.866 |-.866|.866 |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |1    |-1   |1    |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |-1   |1    |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |-1   |-1   |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.5  |.5   |.5   |-.5  |.866 |-.866|.866 |-.866|                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |1    |1    |-1   |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |.309 |-.809|-.809|.309 |-.951|-.588|.588 |.951 |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.5  |.5   |.5   |-1   |-.866|.866 |-.866|0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |1    |1    |1    |1    |0    |0    |0    |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |.5   |-.5  |-.5  |0    |-.866|.866 |-.866|                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.5  |-.5  |.5   |-1   |.866 |-.866|.866 |0    |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.809|.309 |.309 |-.809|.588 |-.951|.951 |-.588|                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-1   |.5   |-.5  |-.5  |0    |.866 |-.866|.866 |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
|      |-.809|.309 |.309 |-.809|-.588|.951 |-.951|.588 |                      |
|      +-----+-----+-----+-----+-----+-----+-----+-----+                      |
+-----------------------------------------------------------------------------+
|i16 : assert(# realsols == 30)                                               |
+-----------------------------------------------------------------------------+
|i17 : stablesols = select(realsols, p -> Stable === identifyStability(Jac,p))|
|                                                                             |
|o17 = {{1, 1, 1, 1, 0, 0, 0, 0}, {-.809, .309, .309, -.809, .588, -.951,     |
|      -----------------------------------------------------------------------|
|      .951, -.588}, {-.809, .309, .309, -.809, -.588, .951, -.951, .588}}    |
|                                                                             |
|o17 : List                                                                   |
+-----------------------------------------------------------------------------+
|i18 : tally realsols/(p -> identifyStability(Jac, p))                        |
|                                                                             |
|o18 = Tally{Stable => 3   }                                                  |
|            Unstable => 27                                                   |
|                                                                             |
|o18 : Tally                                                                  |
+-----------------------------------------------------------------------------+
|i19 : getAngles(4, stablesols, Radians=>false)                               |
|                                                                             |
|o19 = {{0, 0, 0, 0}, {144, 288, 72, 216}, {216, 72, 288, 144}}               |
|                                                                             |
|o19 : List                                                                   |
+-----------------------------------------------------------------------------+
|i20 : sols = solveSystem I_*;                                                |
+-----------------------------------------------------------------------------+
|i21 : sols = sols/coordinates;                                               |
+-----------------------------------------------------------------------------+
|i22 : sols = matrix sols -- every row is a solution                          |
|                                                                             |
|o22 = | -.5+1.09e-13ii   .5+6.27e-14ii    .5+7.68e-14ii    -.5+1.1e-13ii     |
|      | 1                -1               -1               -1+2.03e-16ii     |
|      | 1-6.41e-16ii     1+2.16e-16ii     -1-2.02e-16ii    -1                |
|      | -1+2.6e-16ii     .5-3.38e-15ii    -.5+8.78e-15ii   -.5-4.15e-15ii    |
|      | -1+2.52e-15ii    -1+5.29e-15ii    1+5.65e-14ii     1-8.45e-14ii      |
|      | 1                -1               1+1.42e-16ii     1-1.32e-16ii      |
|      | -.5+4.47e-15ii   .5-3.14e-15ii    .5+2.83e-15ii    -.5-4.22e-15ii    |
|      | 1                -1               -1-2.39e-16ii    1-1.52e-16ii      |
|      | -1-1.2e-13ii     1-2.71e-13ii     1+2.41e-13ii     -1-3.73e-13ii     |
|      | 1-1.2e-16ii      1                1+3.64e-16ii     1-2.36e-16ii      |
|      | -.5-4.58e-16ii   -.5+2.59e-16ii   .5-4.82e-16ii    -1+7.02e-16ii     |
|      | -.809+3.25e-15ii .309-3.01e-15ii  .309+1.58e-15ii  -.809-2.9e-15ii   |
|      | -1+1.06e-15ii    .5+9.4e-16ii     .5+8.4e-16ii     -.5+1.4e-15ii     |
|      | -.5-3.8e-14ii    .5-2.89e-14ii    .5-2.59e-14ii    -1+1.62e-14ii     |
|      | -.5+7.58e-16ii   -.5+2.68e-15ii   .5+1.72e-16ii    -1+5.89e-16ii     |
|      | -1+5.18e-16ii    -1+2.73e-15ii    -1               -1-3.29e-16ii     |
|      | 1+8.34e-14ii     -1-4.03e-14ii    1+1.78e-14ii     -1-2.79e-14ii     |
|      | -1-3.87e-14ii    -1-5.42e-13ii    1+4.64e-13ii     -1-2.84e-13ii     |
|      | -1+1.75e-16ii    .5-4.95e-16ii    .5+3.25e-16ii    -.5-4.65e-16ii    |
|      | -1+3.3e-16ii     -1-1.33e-16ii    -1-3.13e-16ii    1                 |
|      | -1+4.02e-16ii    1                1+3.74e-16ii     1+2.09e-16ii      |
|      | -.5+1.56e-14ii   .5-6.05e-14ii    .5+1.07e-13ii    -1-7.68e-15ii     |
|      | .309+3.38e-13ii  -.809+1.86e-13ii -.809+1.46e-13ii .309-6.07e-13ii   |
|      | -.809-7.37e-16ii .309+2.84e-15ii  .309+6.64e-17ii  -.809+2.13e-15ii  |
|      | .309-1.45e-15ii  -.809-9.84e-16ii -.809-5.15e-16ii .309+2.19e-15ii   |
|      | 1-2.92e-16ii     1                1+4.79e-16ii     -1                |
|      | -1+1.18e-16ii    .5+5.59e-16ii    -.5              -.5+6.85e-16ii    |
|      | -1+2.11e-16ii    1                -1-2.39e-16ii    1                 |
|      | -1-1.39e-16ii    1+1.14e-16ii     -1               -1+2.15e-16ii     |
|      | 1+1.26e-15ii     1                -1-3.6e-16ii     1+3.92e-16ii      |
|      -----------------------------------------------------------------------|
|      .866+1.12e-13ii      -.866+3.05e-14ii     .866-3.04e-14ii              |
|      -6.72e-16+7.94e-17ii 6.61e-16+6.2e-16ii   4.47e-16-1.79e-16ii          |
|      5.17e-16+2.15e-16ii  6.04e-16+9.77e-16ii  -1.47e-16-3.74e-17ii         |
|      -7.29e-15-5.46e-15ii .866+7.45e-16ii      -.866-2.86e-16ii             |
|      -3.43e-14+3.5e-13ii  3.35e-14+1.35e-13ii  -3.26e-14-1.34e-13ii         |
|      -7.33e-16-9.93e-16ii 7.68e-16+9.78e-16ii  -2.82e-16-6.15e-16ii         |
|      -.866-1.17e-15ii     .866+2e-15ii         -.866+5.28e-16ii             |
|      -4.37e-16-4.08e-16ii 5.26e-16+1.39e-16ii  3.45e-16+2.05e-16ii          |
|      1.38e-13-4.3e-13ii   -5.63e-13+1.36e-13ii 5.63e-13-1.35e-13ii          |
|      8.48e-16+9.45e-16ii  1.1e-15+6.68e-16ii   4.98e-16+3.68e-16ii          |
|      .866+2.35e-16ii      -.866-4.24e-16ii     .866+1.29e-16ii              |
|      -.588-3.48e-15ii     .951+1.14e-15ii      -.951+2.3e-16ii              |
|      1.21e-15+2.68e-15ii  -.866+6.11e-16ii     .866+5.39e-16ii              |
|      -.866+3.25e-14ii     .866+1.26e-14ii      -.866-1.11e-14ii             |
|      -.866-1.33e-16ii     .866+1.01e-15ii      -.866-2.06e-16ii             |
|      2.63e-15-4.35e-16ii  2e-16+7.07e-15ii     9.48e-16-5.81e-15ii          |
|      -1.09e-13-5.24e-14ii 8.19e-14+1.25e-15ii  -8.17e-14-6.92e-16ii         |
|      -1.15e-13+2.06e-13ii -2.05e-14-2.77e-13ii 2.13e-14+2.77e-13ii          |
|      2.59e-16-1.27e-16ii  .866+4.17e-16ii      -.866                        |
|      1.65e-16-3.9e-16ii   5.24e-16+2.29e-16ii  2.84e-16+8.24e-16ii          |
|      -1.61e-16-6.02e-17ii 5.99e-16+2.64e-18ii  -4.82e-16+6e-16ii            |
|      .866-3.11e-14ii      -.866+6.35e-15ii     .866-5.16e-15ii              |
|      .951+4.74e-13ii      .588+2.54e-13ii      -.588-2.54e-13ii             |
|      .588-1.38e-15ii      -.951+8.54e-16ii     .951+5.34e-16ii              |
|      -.951+5.67e-16ii     -.588+1.3e-15ii      .588+6.99e-16ii              |
|      1.49e-15+5.01e-17ii  -2.26e-16+1.38e-15ii 1e-15-1.33e-16ii             |
|      -3.33e-17-4.19e-16ii -.866+2.44e-16ii     .866+1.92e-16ii              |
|      2.91e-16+8.17e-17ii  -8.95e-17-4.93e-16ii 5.88e-16+1.54e-15ii          |
|      1.2e-16-1.27e-16ii   -5.28e-17+6.09e-16ii 8.7e-16-7.18e-16ii           |
|      -1.42e-14-2.74e-14ii -6.09e-15-8.75e-15ii 6.72e-15+9.85e-15ii          |
|      -----------------------------------------------------------------------|
|      -.866-8.65e-14ii     |                                                 |
|      6.62e-16-2.13e-16ii  |                                                 |
|      -1.02e-15-3.09e-16ii |                                                 |
|      .866-3.85e-15ii      |                                                 |
|      -7.74e-14-2.44e-13ii |                                                 |
|      -1.06e-15-1.8e-15ii  |                                                 |
|      .866-1.89e-15ii      |                                                 |
|      -4.09e-16-4.13e-16ii |                                                 |
|      -6.2e-13+1.82e-13ii  |                                                 |
|      8.67e-16+1.25e-15ii  |                                                 |
|      1.76e-15-9.24e-16ii  |                                                 |
|      .588-3.79e-15ii      |                                                 |
|      -.866+2.9e-16ii      |                                                 |
|      -1.73e-14+6.3e-14ii  |                                                 |
|      5.13e-15+1.09e-16ii  |                                                 |
|      5.27e-15+5.68e-15ii  |                                                 |
|      8.43e-14-4.75e-15ii  |                                                 |
|      -2.48e-14-2.23e-13ii |                                                 |
|      .866-2.75e-16ii      |                                                 |
|      -1.6e-16-2.62e-16ii  |                                                 |
|      8.16e-16-1.67e-16ii  |                                                 |
|      -2.48e-13-1.61e-14ii |                                                 |
|      -.951-1.8e-13ii      |                                                 |
|      -.588-2.94e-15ii     |                                                 |
|      .951                 |                                                 |
|      -7.53e-16-5.23e-16ii |                                                 |
|      -.866-3.15e-16ii     |                                                 |
|      -5.98e-16-1.26e-15ii |                                                 |
|      -6.4e-16+4.72e-16ii  |                                                 |
|      -1.19e-14-1.43e-14ii |                                                 |
|                                                                             |
|                 30         8                                                |
|o22 : Matrix CC     <-- CC                                                   |
|               53         53                                                 |
+-----------------------------------------------------------------------------+
|i23 : sols = clean(1e-6, sols) -- set to 0 numbers very close to 0           |
|                                                                             |
|o23 = | -.5   .5    .5    -.5   .866  -.866 .866  -.866 |                    |
|      | 1     -1    -1    -1    0     0     0     0     |                    |
|      | 1     1     -1    -1    0     0     0     0     |                    |
|      | -1    .5    -.5   -.5   0     .866  -.866 .866  |                    |
|      | -1    -1    1     1     0     0     0     0     |                    |
|      | 1     -1    1     1     0     0     0     0     |                    |
|      | -.5   .5    .5    -.5   -.866 .866  -.866 .866  |                    |
|      | 1     -1    -1    1     0     0     0     0     |                    |
|      | -1    1     1     -1    0     0     0     0     |                    |
|      | 1     1     1     1     0     0     0     0     |                    |
|      | -.5   -.5   .5    -1    .866  -.866 .866  0     |                    |
|      | -.809 .309  .309  -.809 -.588 .951  -.951 .588  |                    |
|      | -1    .5    .5    -.5   0     -.866 .866  -.866 |                    |
|      | -.5   .5    .5    -1    -.866 .866  -.866 0     |                    |
|      | -.5   -.5   .5    -1    -.866 .866  -.866 0     |                    |
|      | -1    -1    -1    -1    0     0     0     0     |                    |
|      | 1     -1    1     -1    0     0     0     0     |                    |
|      | -1    -1    1     -1    0     0     0     0     |                    |
|      | -1    .5    .5    -.5   0     .866  -.866 .866  |                    |
|      | -1    -1    -1    1     0     0     0     0     |                    |
|      | -1    1     1     1     0     0     0     0     |                    |
|      | -.5   .5    .5    -1    .866  -.866 .866  0     |                    |
|      | .309  -.809 -.809 .309  .951  .588  -.588 -.951 |                    |
|      | -.809 .309  .309  -.809 .588  -.951 .951  -.588 |                    |
|      | .309  -.809 -.809 .309  -.951 -.588 .588  .951  |                    |
|      | 1     1     1     -1    0     0     0     0     |                    |
|      | -1    .5    -.5   -.5   0     -.866 .866  -.866 |                    |
|      | -1    1     -1    1     0     0     0     0     |                    |
|      | -1    1     -1    -1    0     0     0     0     |                    |
|      | 1     1     -1    1     0     0     0     0     |                    |
|                                                                             |
|                 30         8                                                |
|o23 : Matrix CC     <-- CC                                                   |
|               53         53                                                 |
+-----------------------------------------------------------------------------+
|i24 : assert(numrows sols == 30) -- all the solutions in this example are    |
|-----------------------------------------------------------------------------|
|real                                                                         |
+-----------------------------------------------------------------------------+
|i25 : tally (entries sols)/(p -> identifyStability(Jac, p))                  |
|                                                                             |
|o25 = Tally{Stable => 3   }                                                  |
|            Unstable => 27                                                   |
|                                                                             |
|o25 : Tally                                                                  |
+-----------------------------------------------------------------------------+

For the further analysis of these ideals, see oscQuadrics.

Authors
=======

  * John Cobb (see https://johndcobb.github.io ) <jdc0173@auburn.edu>
  * Hal Schenck (see http://webhome.auburn.edu/~hks0015 ) <hks0015@auburn.edu>
  * Michael E. Stillman (see
    http://www.math.cornell.edu/People/Faculty/stillman.html )
    <mike@math.cornell.edu>

Version
=======

This documentation describes version 1.0 of Oscillators, released 1 May 2025.

Citation
========

If you have used this package in your research, please cite it as follows:

+----------------------------------------------------------------------------+
|@misc{OscillatorsSource,                                                    |
|  title = {{Oscillators: code to analyze graph oscillators. Version~1.0}},  |
|  author = {John Cobb and Hal Schenck and Michael E. Stillman},             |
|  howpublished = {A \emph{Macaulay2} package available at                   |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}}|
|}                                                                           |
|                                                                            |
+----------------------------------------------------------------------------+

Exports
=======

  * Functions and commands
      * allUniquePrincipalMinors -- Compute
        all unique principal minors of a given matrix
      * findRealSolutions -- find real solutions, at
        least one per component for well-conditioned systems
      * getAngles -- Compute angles from a list of solutions
      * getLinearlyStableSolutions, --
        Compute linearly stable solutions for the Kuramoto oscillator system
        associated to a graph
      * identifyStability -- Identify the stability
        of a list of eigenvalues, or of potential solutions to the oscillator
        system
      * isStableSolution -- Check if a given solution
        is stable for the Kuramoto oscillator system
      * oscJacobian -- create the Jacobian for the
        oscillator system associated to a graph
      * oscQuadrics -- find the homogeneous quadrics in the
        homogeneous Kuramoto ideal
      * oscRing -- create a polynomial ring for a given graph
        or number of oscillators
      * oscSystem -- the ideal of the reduced equilibrium
        points of a dynamical system of oscillators
      * "getExoticSolutions" -- see showExoticSolutions,
        -- Display exotic solutions: linearly stable
        solutions which are not all-in-phase solution
      * showExoticSolutions -- Display exotic
        solutions: linearly stable solutions which are not all-in-phase
        solution
      * standardSols -- find the "standard solutions" for
        the oscillator system associated to a graph
      * vertexSpanningPolynomial -- computes
        the vertex spanning polynomial
  * Methods
      * "allUniquePrincipalMinors(Matrix)" -- see
        allUniquePrincipalMinors, -- Compute all
        unique principal minors of a given matrix
      * "findRealSolutions(Graph)" -- see findRealSolutions,
        -- find real solutions, at least one per component
        for well-conditioned systems
      * "findRealSolutions(Ideal)" -- see findRealSolutions,
        -- find real solutions, at least one per component
        for well-conditioned systems
      * "getAngles(ZZ,List)" -- see getAngles, -- Compute
        angles from a list of solutions
      * "getLinearlyStableSolutions(Graph)" -- see
        getLinearlyStableSolutions, -- Compute
        linearly stable solutions for the Kuramoto oscillator system associated
        to a graph
      * "identifyStability(BasicList)" -- see identifyStability,
        -- Identify the stability of a list of eigenvalues,
        or of potential solutions to the oscillator system
      * "identifyStability(Matrix,List)" -- see identifyStability,
        -- Identify the stability of a list of eigenvalues,
        or of potential solutions to the oscillator system
      * "isStableSolution(Matrix,List)" -- see isStableSolution,
        -- Check if a given solution is stable for the
        Kuramoto oscillator system
      * "oscJacobian(Graph)" -- see oscJacobian, -- create
        the Jacobian for the oscillator system associated to a graph
      * "oscJacobian(Graph,Ring)" -- see oscJacobian, --
        create the Jacobian for the oscillator system associated to a graph
      * "oscJacobian(Ideal)" -- see oscJacobian, -- create
        the Jacobian for the oscillator system associated to a graph
      * "oscQuadrics(Graph)" -- see oscQuadrics, -- find the
        homogeneous quadrics in the homogeneous Kuramoto ideal
      * "oscQuadrics(Graph,Ring)" -- see oscQuadrics, --
        find the homogeneous quadrics in the homogeneous Kuramoto ideal
      * "oscRing(Graph)" -- see oscRing, -- create a polynomial
        ring for a given graph or number of oscillators
      * "oscRing(ZZ)" -- see oscRing, -- create a polynomial
        ring for a given graph or number of oscillators
      * "oscSystem(Graph)" -- see oscSystem, -- the ideal of
        the reduced equilibrium points of a dynamical system of oscillators
      * "oscSystem(Graph,Ring)" -- see oscSystem, -- the ideal
        of the reduced equilibrium points of a dynamical system of oscillators
      * "getExoticSolutions(Graph)" -- see showExoticSolutions,
        -- Display exotic solutions: linearly stable
        solutions which are not all-in-phase solution
      * "showExoticSolutions(Graph)" -- see showExoticSolutions,
        -- Display exotic solutions: linearly stable
        solutions which are not all-in-phase solution
      * "standardSols(Graph)" -- see standardSols, -- find
        the "standard solutions" for the oscillator system associated to a
        graph
      * "standardSols(Graph,Ring)" -- see standardSols, --
        find the "standard solutions" for the oscillator system associated to a
        graph
      * "vertexSpanningPolynomial(Graph)" -- see
        vertexSpanningPolynomial, -- computes the
        vertex spanning polynomial
      * "vertexSpanningPolynomial(Graph,Ring)" -- see
        vertexSpanningPolynomial, -- computes the
        vertex spanning polynomial
  * Symbols

For the programmer
==================

The object Oscillators, is a package (Macaulay2Doc),
defined in Oscillators.m2, with auxiliary files in Oscillators/.

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:106:0.

allUniquePrincipalMinors -- Compute all unique principal minors of a given matrix
*********************************************************************************

  * Usage:
        allUniquePrincipalMinors(M)
  * Inputs:
      * M, a matrix (Macaulay2Doc), A square matrix
  * Optional inputs (Macaulay2Doc),:
      * Modulo => an ideal (Macaulay2Doc), default value null, An
        optional ideal to compute the principal minors modulo the given ideal
  * Outputs:
      * a list (Macaulay2Doc), A list of all unique principal
        minors of the given matrix

Description
===========

The function allUniquePrincipalMinors computes all unique principal minors of a
given square matrix. A principal minor of a matrix is the determinant of a
submatrix obtained by deleting the same set of rows and columns from the
matrix. The function returns a list of all unique principal minors of the given
matrix.

+-----------------------------------------------------------------------------+
|i1 : G = graph({0,1,2,3},{{0,1},{1,2},{2,3},{0,3}})                          |
|                                                                             |
|o1 = Graph{0 => {1, 3}}                                                      |
|           1 => {0, 2}                                                       |
|           2 => {1, 3}                                                       |
|           3 => {0, 2}                                                       |
|                                                                             |
|o1 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i2 : S = oscRing(G, CoefficientRing => QQ, Reduced => true)                  |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : I = oscSystem(G,S);                                                     |
|                                                                             |
|o3 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i4 : C = decompose I;                                                        |
+-----------------------------------------------------------------------------+
|i5 : J = oscJacobian(G,S)                                                    |
|                                                                             |
|o5 = | -x_1-x_3 x_1                0                                         |
|     | x_1      -x_1x_2-y_1y_2-x_1 x_1x_2+y_1y_2                             |
|     | 0        x_1x_2+y_1y_2      -x_1x_2-x_2x_3-y_1y_2-y_2y_3              |
|     | x_3      0                  x_2x_3+y_2y_3                             |
|     ------------------------------------------------------------------------|
|     x_3                |                                                    |
|     0                  |                                                    |
|     x_2x_3+y_2y_3      |                                                    |
|     -x_2x_3-y_2y_3-x_3 |                                                    |
|                                                                             |
|             4      4                                                        |
|o5 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i6 : netList for i in C list allUniquePrincipalMinors(-J, Modulo=>i)         |
|                                                                             |
|     +---+------+---------+----+---------+                                   |
|     |   |      | 2       |    |  2      |                                   |
|o6 = |2x |0     |y  - 1   |-2x |4y  - 4  |                                   |
|     |  3|      | 3       |   3|  3      |                                   |
|     +---+------+---------+----+---------+                                   |
|     |   | 2    |         |    |         |                                   |
|     |0  |y  - 1|         |    |         |                                   |
|     |   | 3    |         |    |         |                                   |
|     +---+------+---------+----+---------+                                   |
|     |   |      |  1     1|    |         |                                   |
|     |0  |-2x   |- -x  - -|2x  |- 2x  - 2|                                   |
|     |   |   3  |  2 2   2|  3 |    2    |                                   |
|     +---+------+---------+----+---------+                                   |
|     |2  |3     |4        |0   |         |                                   |
|     +---+------+---------+----+---------+                                   |
|     |-2 |3     |4        |-4  |0        |                                   |
|     +---+------+---------+----+---------+                                   |
+-----------------------------------------------------------------------------+

See also
========

  * oscJacobian -- create the Jacobian for the oscillator
    system associated to a graph
  * identifyStability -- Identify the stability of a
    list of eigenvalues, or of potential solutions to the oscillator system

Ways to use allUniquePrincipalMinors:
=====================================

  * "allUniquePrincipalMinors(Matrix)"

For the programmer
==================

The object allUniquePrincipalMinors, is a
method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:645:0.

Checking the codimension and irreducible decomposition of the IG ideal -- generating all SCT graphs on n vertices
*****************************************************************************************************************

We first construct the ideal $I_G$ for a specific graph $G$ on 5 vertices. We
use the 5-cycle as the specific example.

+-----------------------------------------------------------------------------+
|i1 : needsPackage "Oscillators"                                              |
|                                                                             |
|o1 = Oscillators                                                             |
|                                                                             |
|o1 : Package                                                                 |
+-----------------------------------------------------------------------------+
|i2 : needsPackage "NautyGraphs"                                              |
|                                                                             |
|o2 = NautyGraphs                                                             |
|                                                                             |
|o2 : Package                                                                 |
+-----------------------------------------------------------------------------+
|i3 : Gstrs = generateGraphs(5, OnlyConnected => true, MinDegree => 2);       |
+-----------------------------------------------------------------------------+
|i4 : Gs = Gstrs/stringToGraph                                                |
|                                                                             |
|o4 = {Graph{0 => {3, 4}   }, Graph{0 => {3, 4}      }, Graph{0 => {2, 4}     |
|            1 => {3, 4}            1 => {3, 4}               1 => {3, 4}     |
|            2 => {3, 4}            2 => {3, 4}               2 => {0, 4}     |
|            3 => {0, 1, 2}         3 => {0, 1, 2, 4}         3 => {1, 4}     |
|            4 => {0, 1, 2}         4 => {3, 0, 1, 2}         4 => {2, 0, 3,  |
|     ------------------------------------------------------------------------|
|       }, Graph{0 => {2, 3}}, Graph{0 => {2, 3, 4}}, Graph{0 => {2, 3, 4}    |
|                1 => {3, 4}         1 => {3, 4}            1 => {3, 4}       |
|                2 => {0, 4}         2 => {0, 4}            2 => {0, 4}       |
|                3 => {0, 1}         3 => {0, 1}            3 => {0, 1, 4}    |
|     1}         4 => {2, 1}         4 => {2, 0, 1}         4 => {2, 0, 3,    |
|     ------------------------------------------------------------------------|
|       }, Graph{0 => {2, 3, 4}   }, Graph{0 => {2, 3, 4}}, Graph{0 => {2, 3, |
|                1 => {3, 4}               1 => {2, 3, 4}         1 => {2, 3, |
|                2 => {0, 3, 4}            2 => {0, 1, 4}         2 => {0, 1, |
|                3 => {2, 0, 1, 4}         3 => {0, 1}            3 => {0, 1, |
|     1}         4 => {2, 0, 3, 1}         4 => {2, 0, 1}         4 => {2, 0, |
|     ------------------------------------------------------------------------|
|     4}   }, Graph{0 => {2, 3, 4}   }, Graph{0 => {1, 2, 3, 4}}}             |
|     4}            1 => {2, 3, 4}            1 => {0, 2, 3, 4}               |
|     4}            2 => {0, 1, 3, 4}         2 => {1, 0, 3, 4}               |
|     4}            3 => {2, 0, 1, 4}         3 => {1, 0, 2, 4}               |
|     1, 3}         4 => {2, 0, 1, 3}         4 => {1, 0, 2, 3}               |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : G = Gs_3                                                                |
|                                                                             |
|o5 = Graph{0 => {2, 3}}                                                      |
|           1 => {3, 4}                                                       |
|           2 => {0, 4}                                                       |
|           3 => {0, 1}                                                       |
|           4 => {2, 1}                                                       |
|                                                                             |
|o5 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i6 : R = oscRing(5, Reduced => false);                                       |
+-----------------------------------------------------------------------------+
|i7 : IG = oscQuadrics(G, R)                                                  |
|                                                                             |
|o7 = ideal (x y  + x y  - x y  - x y , x y  + x y  - x y  - x y , - x y  +   |
|             2 0    3 0    0 2    0 3   3 1    4 1    1 3    1 4     2 0     |
|     ------------------------------------------------------------------------|
|     x y  + x y  - x y , - x y  - x y  + x y  + x y , - x y  - x y  + x y  + |
|      0 2    4 2    2 4     3 0    3 1    0 3    1 3     4 1    4 2    1 4   |
|     ------------------------------------------------------------------------|
|     x y )                                                                   |
|      2 4                                                                    |
|                                                                             |
|o7 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i8 : netList IG_*                                                            |
|                                                                             |
|     +---------------------------+                                           |
|o8 = |x y  + x y  - x y  - x y   |                                           |
|     | 2 0    3 0    0 2    0 3  |                                           |
|     +---------------------------+                                           |
|     |x y  + x y  - x y  - x y   |                                           |
|     | 3 1    4 1    1 3    1 4  |                                           |
|     +---------------------------+                                           |
|     |- x y  + x y  + x y  - x y |                                           |
|     |   2 0    0 2    4 2    2 4|                                           |
|     +---------------------------+                                           |
|     |- x y  - x y  + x y  + x y |                                           |
|     |   3 0    3 1    0 3    1 3|                                           |
|     +---------------------------+                                           |
|     |- x y  - x y  + x y  + x y |                                           |
|     |   4 1    4 2    1 4    2 4|                                           |
|     +---------------------------+                                           |
+-----------------------------------------------------------------------------+
|i9 : codim IG                                                                |
|                                                                             |
|o9 = 4                                                                       |
+-----------------------------------------------------------------------------+

Each $I_G$ on $n$ vertices has $n-1$ minimal generators. This particular $I_G$
has the same codimension $n-1=4$, so is a complete intersection. This ideal
decomposes as an intersection of 2 prime ideals.

+-----------------------------------------------------------------------------+
|i10 : comps = decompose IG;                                                  |
+-----------------------------------------------------------------------------+
|i11 : netList comps_0_*, netList comps_1_*                                   |
|                                                                             |
|       +-----------+  +------------------------------------------------------|
|o11 = (|x y  - x y |, |x y  + x y  - x y  - x y                              |
|       | 4 3    3 4|  | 4 1    4 2    1 4    2 4                             |
|       +-----------+  +------------------------------------------------------|
|       |x y  - x y |  |x y  - x y  - x y  + x y                              |
|       | 4 2    2 4|  | 3 1    4 2    1 3    2 4                             |
|       +-----------+  +------------------------------------------------------|
|       |x y  - x y |  |x y  + x y  - x y  - x y                              |
|       | 3 2    2 3|  | 3 0    4 2    0 3    2 4                             |
|       +-----------+  +------------------------------------------------------|
|       |x y  - x y |  |x y  - x y  - x y  + x y                              |
|       | 4 1    1 4|  | 2 0    0 2    4 2    2 4                             |
|       +-----------+  +------------------------------------------------------|
|       |x y  - x y |  |y y y  + y y y  + y y y  + y y y  + y y y             |
|       | 3 1    1 3|  | 0 1 3    0 2 3    0 2 4    1 2 4    1 3 4            |
|       +-----------+  +------------------------------------------------------|
|       |x y  - x y |  |                                                      |
|       | 2 1    1 2|  |x y y  + x y y  + x y y  + x y y  + x y y  + x y y  - |
|       +-----------+  | 0 1 3    0 2 3    2 1 4    0 2 4    4 2 4    1 3 4   |
|       |x y  - x y |  +------------------------------------------------------|
|       | 4 0    0 4|  |                   2                                  |
|       +-----------+  |x x y  - x x y  + x y  + x x y  + x x y  + x x y  + x |
|       |x y  - x y |  | 0 4 2    2 4 2    4 2    0 1 3    0 2 3    1 4 3    1|
|       | 3 0    0 3|  +------------------------------------------------------|
|       +-----------+  |x x x  + x x x  + x x x  + x x x  + x x x             |
|       |x y  - x y |  | 0 1 3    0 2 3    0 2 4    1 2 4    1 3 4            |
|       | 2 0    0 2|  +------------------------------------------------------|
|       +-----------+                                                         |
|       |x y  - x y |                                                         |
|       | 1 0    0 1|                                                         |
|       +-----------+                                                         |
|      -----------------------------------------------------------------------|
|      --------------------+                                                  |
|                          |)                                                 |
|                          |                                                  |
|      --------------------+                                                  |
|                          |                                                  |
|                          |                                                  |
|      --------------------+                                                  |
|                          |                                                  |
|                          |                                                  |
|      --------------------+                                                  |
|                          |                                                  |
|                          |                                                  |
|      --------------------+                                                  |
|                          |                                                  |
|                          |                                                  |
|      --------------------+                                                  |
|         2                |                                                  |
|      x y                 |                                                  |
|       2 4                |                                                  |
|      --------------------+                                                  |
|              2           |                                                  |
|      x y  + x y  - x x y |                                                  |
|       2 4    2 4    2 4 4|                                                  |
|      --------------------+                                                  |
|                          |                                                  |
|                          |                                                  |
|      --------------------+                                                  |
|                                                                             |
|o11 : Sequence                                                               |
+-----------------------------------------------------------------------------+
|i12 : comps/codim                                                            |
|                                                                             |
|o12 = {4, 4}                                                                 |
|                                                                             |
|o12 : List                                                                   |
+-----------------------------------------------------------------------------+
|i13 : comps/degree                                                           |
|                                                                             |
|o13 = {5, 11}                                                                |
|                                                                             |
|o13 : List                                                                   |
+-----------------------------------------------------------------------------+
|i14 : comps/isPrime                                                          |
|                                                                             |
|o14 = {true, true}                                                           |
|                                                                             |
|o14 : List                                                                   |
+-----------------------------------------------------------------------------+

Let's see how many graphs are not complete intersections, i.e. have codimension
$\le n-2$.

+-------------------------------------+
|i15 : # select(Gs, G -> (            |
|          IG = oscQuadrics(G, R);    |
|          codim IG <= #vertices G - 2|
|          ))                         |
|                                     |
|o15 = 4                              |
+-------------------------------------+
+--------------------------------------------+
|i16 : for G in Gs list (                    |
|          IG = oscQuadrics(G, R);           |
|          elapsedTime comps := decompose IG;|
|          {comps/codim, comps/degree}       |
|          );                                |
| -- .296527s elapsed                        |
| -- .2905s elapsed                          |
| -- .513805s elapsed                        |
| -- .311815s elapsed                        |
| -- .278125s elapsed                        |
| -- .38485s elapsed                         |
| -- .715562s elapsed                        |
| -- .478349s elapsed                        |
| -- .581592s elapsed                        |
| -- .398729s elapsed                        |
| -- .297013s elapsed                        |
+--------------------------------------------+
|i17 : netList oo                            |
|                                            |
|      +---------------+---------------+     |
|o17 = |{3, 4, 4}      |{2, 3, 5}      |     |
|      +---------------+---------------+     |
|      |{3, 4, 4}      |{2, 3, 5}      |     |
|      +---------------+---------------+     |
|      |{4, 4, 4, 4, 4}|{4, 1, 3, 3, 5}|     |
|      +---------------+---------------+     |
|      |{4, 4}         |{5, 11}        |     |
|      +---------------+---------------+     |
|      |{4, 4}         |{5, 11}        |     |
|      +---------------+---------------+     |
|      |{4, 4}         |{5, 11}        |     |
|      +---------------+---------------+     |
|      |{4, 4, 4, 4, 4}|{4, 1, 3, 3, 5}|     |
|      +---------------+---------------+     |
|      |{4, 4, 4, 4, 4}|{1, 3, 4, 3, 5}|     |
|      +---------------+---------------+     |
|      |{4, 4, 4, 4, 4}|{1, 3, 3, 4, 5}|     |
|      +---------------+---------------+     |
|      |{3, 4, 4}      |{2, 3, 5}      |     |
|      +---------------+---------------+     |
|      |{2, 4}         |{1, 5}         |     |
|      +---------------+---------------+     |
+--------------------------------------------+
+-----------------------------------------------------------------------+
|i18 : n = 6                                                            |
|                                                                       |
|o18 = 6                                                                |
+-----------------------------------------------------------------------+
|i19 : Gstrs = generateGraphs(n, OnlyConnected => true, MinDegree => 2);|
+-----------------------------------------------------------------------+
|i20 : Gs = Gstrs/stringToGraph;                                        |
+-----------------------------------------------------------------------+
|i21 : R = oscRing(n, Reduced => false);                                |
+-----------------------------------------------------------------------+
|i22 : # select(Gs, G -> (                                              |
|          IG = oscQuadrics(G, R);                                      |
|          codim IG <= #vertices G - 2                                  |
|          ))                                                           |
|                                                                       |
|o22 = 15                                                               |
+-----------------------------------------------------------------------+
+---------------------------------------------------------+
|i23 : allcomps = for G in Gs list (                      |
|          IG = oscQuadrics(G, R);                        |
|          elapsedTime comps := decompose IG;             |
|          {comps/codim, comps/degree}                    |
|          );                                             |
| -- .384091s elapsed                                     |
| -- .428329s elapsed                                     |
| -- 1.02657s elapsed                                     |
| -- 1.27881s elapsed                                     |
| -- .791201s elapsed                                     |
| -- .963558s elapsed                                     |
| -- 1.14421s elapsed                                     |
| -- 1.08392s elapsed                                     |
| -- .679559s elapsed                                     |
| -- .832314s elapsed                                     |
| -- .359373s elapsed                                     |
| -- .548342s elapsed                                     |
| -- .501125s elapsed                                     |
| -- .777776s elapsed                                     |
| -- .995984s elapsed                                     |
| -- 1.51546s elapsed                                     |
| -- 1.0901s elapsed                                      |
| -- .980247s elapsed                                     |
| -- 1.30794s elapsed                                     |
| -- 1.13484s elapsed                                     |
| -- .913611s elapsed                                     |
| -- 1.17825s elapsed                                     |
| -- 1.60092s elapsed                                     |
| -- 1.28895s elapsed                                     |
| -- .51898s elapsed                                      |
| -- .631895s elapsed                                     |
| -- 1.34307s elapsed                                     |
| -- .718432s elapsed                                     |
| -- .722397s elapsed                                     |
| -- .900793s elapsed                                     |
| -- 1.14569s elapsed                                     |
| -- .839276s elapsed                                     |
| -- .685726s elapsed                                     |
| -- 1.14684s elapsed                                     |
| -- .939678s elapsed                                     |
| -- 1.20799s elapsed                                     |
| -- 1.11075s elapsed                                     |
| -- 1.44087s elapsed                                     |
| -- 1.54089s elapsed                                     |
| -- .908373s elapsed                                     |
| -- .772096s elapsed                                     |
| -- 1.45594s elapsed                                     |
| -- 1.90293s elapsed                                     |
| -- 2.47818s elapsed                                     |
| -- 1.56274s elapsed                                     |
| -- 1.33739s elapsed                                     |
| -- 1.85532s elapsed                                     |
| -- 1.28567s elapsed                                     |
| -- 1.0995s elapsed                                      |
| -- 1.02542s elapsed                                     |
| -- 1.322s elapsed                                       |
| -- .919164s elapsed                                     |
| -- .969817s elapsed                                     |
| -- 1.13794s elapsed                                     |
| -- .694701s elapsed                                     |
| -- 1.19717s elapsed                                     |
| -- 1.43002s elapsed                                     |
| -- 1.54015s elapsed                                     |
| -- .796986s elapsed                                     |
| -- .456656s elapsed                                     |
| -- .329991s elapsed                                     |
+---------------------------------------------------------+
|i24 : netList ({{"codimensions", "degrees"}} | allcomps) |
|                                                         |
|      +------------------------+------------------------+|
|o24 = |codimensions            |degrees                 ||
|      +------------------------+------------------------+|
|      |{3, 5, 5}               |{2, 4, 6}               ||
|      +------------------------+------------------------+|
|      |{3, 5, 5}               |{2, 4, 6}               ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 4, 2, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 4, 2, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{4, 5, 5, 5, 5}         |{4, 2, 4, 4, 6}         ||
|      +------------------------+------------------------+|
|      |{4, 5, 5, 5, 5}         |{4, 2, 4, 4, 6}         ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 4, 2, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 4, 2, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 4, 2, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{4, 4, 4, 5}            |{1, 3, 3, 6}            ||
|      +------------------------+------------------------+|
|      |{4, 4, 5, 5, 5}         |{1, 3, 6, 4, 6}         ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 4, 2, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{4, 4, 5, 5, 5}         |{1, 3, 4, 6, 6}         ||
|      +------------------------+------------------------+|
|      |{4, 4, 4, 5}            |{1, 3, 3, 6}            ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 2, 4, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 2, 4, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{4, 4, 5, 5, 5}         |{1, 3, 6, 4, 6}         ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5}            |{4, 4, 6, 18}           ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{8, 2, 2, 2, 4, 4, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{8, 2, 2, 2, 4, 4, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5}            |{4, 4, 6, 18}           ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5}                  |{6, 26}                 ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 2, 6, 4, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5}         |{2, 2, 4, 6, 18}        ||
|      +------------------------+------------------------+|
|      |{4, 4, 5, 5, 5}         |{1, 3, 6, 4, 6}         ||
|      +------------------------+------------------------+|
|      |{4, 4, 5, 5, 5}         |{1, 3, 6, 4, 6}         ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5}            |{4, 4, 6, 18}           ||
|      +------------------------+------------------------+|
|      |{4, 4, 5, 5, 5}         |{1, 3, 4, 6, 6}         ||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 6, 2, 2, 4, 6, 4, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 2, 2, 4, 6, 4, 6, 6}||
|      +------------------------+------------------------+|
|      |{5, 5, 5, 5, 5, 5, 5, 5}|{2, 2, 2, 4, 4, 4, 8, 6}||
|      +------------------------+------------------------+|
|      |{4, 5, 5, 5, 5}         |{4, 2, 4, 4, 6}         ||
|      +------------------------+------------------------+|
|      |{3, 5, 5}               |{2, 4, 6}               ||
|      +------------------------+------------------------+|
|      |{2, 5}                  |{1, 6}                  ||
|      +------------------------+------------------------+|
+---------------------------------------------------------+
n = 7
Gstrs = generateGraphs(n, OnlyConnected => true, MinDegree => 2);
Gs = Gstrs/stringToGraph;
R = oscRing(n, Reduced => false);
# select(Gs, G -> (
    IG = oscQuadrics(G, R);
    elapsedTime codim IG <= #vertices G - 2
    ))

The next one takes some time.

n = 8
Gstrs = generateGraphs(n, OnlyConnected => true, MinDegree => 2);
Gs = Gstrs/stringToGraph;
R = oscRing(n, Reduced => false);
# select(Gs, G -> (
    IG = oscQuadrics(G, R);
    codim IG <= #vertices G - 2
    ))

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:794:0.

Example 4.1: unique graph on 8 vertices with exotic solutions and no induced cycle of length at least 5 -- example 4.1 in arXiv 2312.16069
******************************************************************************************************************************************

This example is a square inside a square, having 8 vertices, and exotic
solutions. This is the only SCT graph on 8 vertices with exotic solutions, not
containing an induced $k$-cycle, for $k \ge 5$.

+-----------------------------------------------------------------------------+
|i1 : needsPackage "Oscillators";                                             |
+-----------------------------------------------------------------------------+
|i2 : printingPrecision = 3;                                                  |
+-----------------------------------------------------------------------------+
|i3 : G = graph{                                                              |
|         {0,4},{1,4},{1,5},                                                  |
|         {3,5},{2,6},{3,6},                                                  |
|         {0,7},{2,7},{4,5},                                                  |
|         {5,6},{6,7},{4,7}}                                                  |
|                                                                             |
|o3 = Graph{0 => {4, 7}      }                                                |
|           1 => {4, 5}                                                       |
|           2 => {6, 7}                                                       |
|           3 => {5, 6}                                                       |
|           4 => {0, 1, 5, 7}                                                 |
|           5 => {4, 1, 3, 6}                                                 |
|           6 => {5, 3, 2, 7}                                                 |
|           7 => {0, 4, 2, 6}                                                 |
|                                                                             |
|o3 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i4 : stablesols = {{0, 0, -1, .707, -.707, -.707, .707, -1, 1, 0, -.707, -.70|
|         {1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},                         |
|         {0, 0, -1, .707, -.707, -.707, .707, 1, -1, 0, .707, .707, -.707, -.|
|                                                                             |
|o4 = {{0, 0, -1, .707, -.707, -.707, .707, -1, 1, 0, -.707, -.707, .707,     |
|     ------------------------------------------------------------------------|
|     .707}, {1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, -1, .707,     |
|     ------------------------------------------------------------------------|
|     -.707, -.707, .707, 1, -1, 0, .707, .707, -.707, -.707}}                |
|                                                                             |
|o4 : List                                                                    |
|-----------------------------------------------------------------------------|
|7, .707, .707},                                                              |
|                                                                             |
|707}}                                                                        |
+-----------------------------------------------------------------------------+

Computing the (linearly) stable solutions for K5C5 takes a minute or two:

elapsedTime stablesols = showExoticSolutions G;

See also
========

  * Harrington-Schenck-Stillman -- Arxiv
    2312.16069 reference
-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:841:0.

Example 4.2: a K5 and pentagon glued along an edge -- example 4.2 in arXiv 2312.16069
*************************************************************************************

The first example is a pentagon. The second example is K5 with a 5-cycle glued
along an edge.

+-----------------------------------------------------------------------------+
|i1 : needsPackage "Oscillators";                                             |
+-----------------------------------------------------------------------------+
|i2 : printingPrecision = 3;                                                  |
+-----------------------------------------------------------------------------+
|i3 : Pent = graph{{0,1},{1,2},{2,3},{3,4},{4,0}}                             |
|                                                                             |
|o3 = Graph{0 => {1, 4}}                                                      |
|           1 => {0, 2}                                                       |
|           2 => {1, 3}                                                       |
|           3 => {2, 4}                                                       |
|           4 => {0, 3}                                                       |
|                                                                             |
|o3 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i4 : K5C5 = graph{{0,1},{0,2},{0,3},{0,4},{1,2},{1,3},{1,4},                 |
|         {2,3},{2,4},{3,4},{0,5},{5,6},{6,7},{1,7}}                          |
|                                                                             |
|o4 = Graph{0 => {1, 2, 3, 4, 5}}                                             |
|           1 => {0, 2, 3, 4, 7}                                              |
|           2 => {0, 1, 3, 4}                                                 |
|           3 => {0, 1, 2, 4}                                                 |
|           4 => {0, 1, 2, 3}                                                 |
|           5 => {0, 6}                                                       |
|           6 => {5, 7}                                                       |
|           7 => {1, 6}                                                       |
|                                                                             |
|o4 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i5 : stablesolsK5C5 = {{1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},           |
|         {.92, .98, .98, .98, .101, -.98, -.298, -.393, -.201, -.201, -.201, |
|         {.92, .98, .98, .98, .101, -.98, -.298, .393, .201, .201, .201, -.99|
|                                                                             |
|o5 = {{1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, {.92, .98, .98, .98, .101, |
|     ------------------------------------------------------------------------|
|     -.98, -.298, -.393, -.201, -.201, -.201, .995, .201, -.954}, {.92, .98, |
|     ------------------------------------------------------------------------|
|     .98, .98, .101, -.98, -.298, .393, .201, .201, .201, -.995, -.201,      |
|     ------------------------------------------------------------------------|
|     .954}}                                                                  |
|                                                                             |
|o5 : List                                                                    |
|-----------------------------------------------------------------------------|
|.995, .201, -.954},                                                          |
|5, -.201, .954}}                                                             |
+-----------------------------------------------------------------------------+
|i6 : elapsedTime stablesolsPent = showExoticSolutions Pent                   |
| -- .853s elapsed                                                            |
|-- found extra exotic solutions for graph Graph{0 => {1, 4}} --              |
|                                                1 => {0, 2}                  |
|                                                2 => {1, 3}                  |
|                                                3 => {2, 4}                  |
|                                                4 => {0, 3}                  |
|+----+-----+-----+----+-----+-----+-----+-----+                              |
||.309|-.809|-.809|.309|.951 |.588 |-.588|-.951|                              |
|+----+-----+-----+----+-----+-----+-----+-----+                              |
||1   |1    |1    |1   |0    |0    |0    |0    |                              |
|+----+-----+-----+----+-----+-----+-----+-----+                              |
||.309|-.809|-.809|.309|-.951|-.588|.588 |.951 |                              |
|+----+-----+-----+----+-----+-----+-----+-----+                              |
|-- angles (in degrees), first angle is zero and omitted --                   |
|+---+---+---+---+                                                            |
||72 |144|216|288|                                                            |
|+---+---+---+---+                                                            |
||0  |0  |0  |0  |                                                            |
|+---+---+---+---+                                                            |
||288|216|144|72 |                                                            |
|+---+---+---+---+                                                            |
| -- .909s elapsed                                                            |
|                                                                             |
|o6 = {{.309, -.809, -.809, .309, .951, .588, -.588, -.951}, {1, 1, 1, 1, 0,  |
|     ------------------------------------------------------------------------|
|     0, 0, 0}, {.309, -.809, -.809, .309, -.951, -.588, .588, .951}}         |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

Computing the (linearly) stable solutions for K5C5 takes a minute or two:

elapsedTime stablesolsK5C5 = showExoticSolutions K5C5

See also
========

  * Harrington-Schenck-Stillman -- Arxiv
    2312.16069 reference
-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:868:0.

Example 4.3: examples of gluing two cycles along an edge -- example 4.3 in arXiv 2312.16069
*******************************************************************************************

The following example has two pentagons glued on an edge, and this example has
4 exotic solutions, and it is the unique graph on 8 vertices with more than 2
exotic solutions.

+-----------------------------------------------------------------------------+
|i1 : needsPackage "Oscillators";                                             |
+-----------------------------------------------------------------------------+
|i2 : printingPrecision = 3;                                                  |
+-----------------------------------------------------------------------------+
|i3 : PentPent = graph{{0,1},{1,2},{2,3},{3,4},{4,0},{0,5},{5,6},{6,7},{7,1}} |
|                                                                             |
|o3 = Graph{0 => {1, 4, 5}}                                                   |
|           1 => {0, 2, 7}                                                    |
|           2 => {1, 3}                                                       |
|           3 => {2, 4}                                                       |
|           4 => {0, 3}                                                       |
|           5 => {0, 6}                                                       |
|           6 => {5, 7}                                                       |
|           7 => {1, 6}                                                       |
|                                                                             |
|o3 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i4 : stablesolsPentPent = {                                                  |
|         {.648, .796, .908, .977, .215, -.908, -.605, .762, .605, .42, .215, |
|         {1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},                         |
|         {.648, .796, .908, .977, .215, -.908, -.605, -.762, -.605, -.42, -.2|
|         {.648, -.605, -.908, .215, .977, .908, .796, .762, .796, -.42, -.977|
|         {.648, -.605, -.908, .215, .977, .908, .796, -.762, -.796, .42, .977|
|                                                                             |
|o4 = {{.648, .796, .908, .977, .215, -.908, -.605, .762, .605, .42, .215,    |
|     ------------------------------------------------------------------------|
|     -.977, -.42, .796}, {1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, {.648,  |
|     ------------------------------------------------------------------------|
|     .796, .908, .977, .215, -.908, -.605, -.762, -.605, -.42, -.215, .977,  |
|     ------------------------------------------------------------------------|
|     .42, -.796}, {.648, -.605, -.908, .215, .977, .908, .796, .762, .796,   |
|     ------------------------------------------------------------------------|
|     -.42, -.977, .215, .42, .605}, {.648, -.605, -.908, .215, .977, .908,   |
|     ------------------------------------------------------------------------|
|     .796, -.762, -.796, .42, .977, -.215, -.42, -.605}}                     |
|                                                                             |
|o4 : List                                                                    |
|-----------------------------------------------------------------------------|
|-.977, -.42, .796},                                                          |
|                                                                             |
|15, .977, .42, -.796},                                                       |
|, .215, .42, .605},                                                          |
|, -.215, -.42, -.605}}                                                       |
+-----------------------------------------------------------------------------+
|i5 : stablesolsHexPent                                                       |
|                                                                             |
|o5 = stablesolsHexPent                                                       |
|                                                                             |
|o5 : Symbol                                                                  |
+-----------------------------------------------------------------------------+

The computation of these (linearly) stable solutions takes perhaps a minute:

elapsedTime stablesolsPentPent = showExoticSolutions PentPent

The following example has a hexagon and pentago glued identified on a common
edge, and this example has 9 vertices and 6 exotic solutions.

+-----------------------------------------------------------------------------+
|i6 : HexPent = graph{{0,1},{1,2},{2,3},{3,4},{4,0},{0,5},{5,6},{6,7},{7,8},{8|
|                                                                             |
|o6 = Graph{0 => {1, 4, 5}}                                                   |
|           1 => {0, 2, 8}                                                    |
|           2 => {1, 3}                                                       |
|           3 => {2, 4}                                                       |
|           4 => {0, 3}                                                       |
|           5 => {0, 6}                                                       |
|           6 => {5, 7}                                                       |
|           7 => {6, 8}                                                       |
|           8 => {1, 7}                                                       |
|                                                                             |
|o6 : Graph                                                                   |
|-----------------------------------------------------------------------------|
|,1}}                                                                         |
+-----------------------------------------------------------------------------+

The computation of exotic solutions for this example takes several minutes:

elapsedTime stablesolsHexPent = showExoticSolutions HexPent

See also
========

  * Harrington-Schenck-Stillman -- Arxiv
    2312.16069 reference
-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:906:0.

Example 4.4: The square within a square -- example 4.4 in arXiv 2312.16069
**************************************************************************

The following is the one graph on 8 vertices with an exotic solution where the
Jacobian has some off-diagonal extries negative.

+-----------------------------------------------------------------------------+
|i1 : needsPackage "Oscillators";                                             |
+-----------------------------------------------------------------------------+
|i2 : printingPrecision = 3;                                                  |
+-----------------------------------------------------------------------------+
|i3 : G = graph {{0,1},{1,2},{2,3},{3,4},{4,5},{5,6},{6,0},{0,5},{0,2},{5,7},{|
|                                                                             |
|o3 = Graph{0 => {1, 2, 5, 6}}                                                |
|           1 => {0, 2}                                                       |
|           2 => {0, 1, 3, 7}                                                 |
|           3 => {2, 4}                                                       |
|           4 => {3, 5}                                                       |
|           5 => {0, 4, 6, 7}                                                 |
|           6 => {0, 5}                                                       |
|           7 => {2, 5}                                                       |
|                                                                             |
|o3 : Graph                                                                   |
|-----------------------------------------------------------------------------|
|2,7}}                                                                        |
+-----------------------------------------------------------------------------+
|i4 : stablesols = {{1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},               |
|         {.623, -.223, -.901, -.901, -.223, .623, -1, -.782, -.975, -.434, .4|
|         {.623, -.223, -.901, -.901, -.223, .623, -1, .782, .975, .434, -.434|
|                                                                             |
|o4 = {{1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, {.623, -.223, -.901, -.901,|
|     ------------------------------------------------------------------------|
|     -.223, .623, -1, -.782, -.975, -.434, .434, .975, .782, 0}, {.623,      |
|     ------------------------------------------------------------------------|
|     -.223, -.901, -.901, -.223, .623, -1, .782, .975, .434, -.434, -.975,   |
|     ------------------------------------------------------------------------|
|     -.782, 0}}                                                              |
|                                                                             |
|o4 : List                                                                    |
|-----------------------------------------------------------------------------|
|34, .975, .782, 0},                                                          |
|, -.975, -.782, 0}}                                                          |
+-----------------------------------------------------------------------------+
elapsedTime stablesols = showExoticSolutions G

The Jacobian at each exotic solution has negative off diagonl entries.

+-----------------------------------------------------------------------------+
|i5 : Jac = oscJacobian(G, Reduced => true)                                   |
|                                                                             |
|o5 = | -x_1-x_2-x_5-x_6 x_1                                                  |
|     | x_1              -x_1x_2-y_1y_2-x_1                                   |
|     | x_2              x_1x_2+y_1y_2                                        |
|     | 0                0                                                    |
|     | 0                0                                                    |
|     | x_5              0                                                    |
|     | x_6              0                                                    |
|     | 0                0                                                    |
|     ------------------------------------------------------------------------|
|     x_2                                                                     |
|     x_1x_2+y_1y_2                                                           |
|     -x_1x_2-x_2x_3-x_2x_7-y_1y_2-y_2y_3-y_2y_7-x_2                          |
|     x_2x_3+y_2y_3                                                           |
|     0                                                                       |
|     0                                                                       |
|     0                                                                       |
|     x_2x_7+y_2y_7                                                           |
|     ------------------------------------------------------------------------|
|     0                            0                                          |
|     0                            0                                          |
|     x_2x_3+y_2y_3                0                                          |
|     -x_2x_3-x_3x_4-y_2y_3-y_3y_4 x_3x_4+y_3y_4                              |
|     x_3x_4+y_3y_4                -x_3x_4-x_4x_5-y_3y_4-y_4y_5               |
|     0                            x_4x_5+y_4y_5                              |
|     0                            0                                          |
|     0                            0                                          |
|     ------------------------------------------------------------------------|
|     x_5                                            x_6                      |
|     0                                              0                        |
|     0                                              0                        |
|     0                                              0                        |
|     x_4x_5+y_4y_5                                  0                        |
|     -x_4x_5-x_5x_6-x_5x_7-y_4y_5-y_5y_6-y_5y_7-x_5 x_5x_6+y_5y_6            |
|     x_5x_6+y_5y_6                                  -x_5x_6-y_5y_6-x_6       |
|     x_5x_7+y_5y_7                                  0                        |
|     ------------------------------------------------------------------------|
|     0                            |                                          |
|     0                            |                                          |
|     x_2x_7+y_2y_7                |                                          |
|     0                            |                                          |
|     0                            |                                          |
|     x_5x_7+y_5y_7                |                                          |
|     0                            |                                          |
|     -x_2x_7-x_5x_7-y_2y_7-y_5y_7 |                                          |
|                                                                             |
|                                8                         8                  |
|o5 : Matrix (QQ[x ..x , y ..y ])  <-- (QQ[x ..x , y ..y ])                   |
|                 1   7   1   7             1   7   1   7                     |
+-----------------------------------------------------------------------------+
|i6 : sub(Jac, matrix{stablesols#1})                                          |
|                                                                             |
|o6 = | -.8   .623  -.223 0     0     -.223 .623  0     |                     |
|     | .623  -1.25 .624  0     0     0     0     0     |                     |
|     | -.223 .624  -1.25 .624  0     0     0     .223  |                     |
|     | 0     0     .624  -1.25 .623  0     0     0     |                     |
|     | 0     0     0     .623  -1.25 .624  0     0     |                     |
|     | -.223 0     0     0     .624  -1.25 .624  .223  |                     |
|     | .623  0     0     0     0     .624  -1.25 0     |                     |
|     | 0     0     .223  0     0     .223  0     -.446 |                     |
|                                                                             |
|                8         8                                                  |
|o6 : Matrix RR    <-- RR                                                     |
|              53        53                                                   |
+-----------------------------------------------------------------------------+
|i7 : sub(Jac, matrix{stablesols#2}) -- this is identical to the previous     |
|                                                                             |
|o7 = | -.8   .623  -.223 0     0     -.223 .623  0     |                     |
|     | .623  -1.25 .624  0     0     0     0     0     |                     |
|     | -.223 .624  -1.25 .624  0     0     0     .223  |                     |
|     | 0     0     .624  -1.25 .623  0     0     0     |                     |
|     | 0     0     0     .623  -1.25 .624  0     0     |                     |
|     | -.223 0     0     0     .624  -1.25 .624  .223  |                     |
|     | .623  0     0     0     0     .624  -1.25 0     |                     |
|     | 0     0     .223  0     0     .223  0     -.446 |                     |
|                                                                             |
|                8         8                                                  |
|o7 : Matrix RR    <-- RR                                                     |
|              53        53                                                   |
|-----------------------------------------------------------------------------|
|jacobian                                                                     |
+-----------------------------------------------------------------------------+
|i8 : sub(Jac, matrix{stablesols#0}) -- negative of Laplacian of the graph    |
|                                                                             |
|o8 = | -4 1  1  0  0  1  1  0  |                                             |
|     | 1  -2 1  0  0  0  0  0  |                                             |
|     | 1  1  -4 1  0  0  0  1  |                                             |
|     | 0  0  1  -2 1  0  0  0  |                                             |
|     | 0  0  0  1  -2 1  0  0  |                                             |
|     | 1  0  0  0  1  -4 1  1  |                                             |
|     | 1  0  0  0  0  1  -2 0  |                                             |
|     | 0  0  1  0  0  1  0  -2 |                                             |
|                                                                             |
|              8       8                                                      |
|o8 : Matrix ZZ  <-- ZZ                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * Harrington-Schenck-Stillman -- Arxiv
    2312.16069 reference
-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:936:0.

findRealSolutions -- find real solutions, at least one per component for well-conditioned systems
*************************************************************************************************

  * Usage:
        findRealSolutions I
        findRealSolutions G
  * Inputs:
      * I, an ideal (Macaulay2Doc), an ideal in a polynomial ring
        over QQ or RR or CC.
      * G, a graph (Graphs), an undirected, connected graph $G$
  * Outputs:
      * a list (Macaulay2Doc), of all the real solutions that were
        found

Description
===========

In this package the main use is to zero in on equilibrium points for oscillator
systems associated to graphs.

We use this in the following example.

+-----------------------------------------------------------------------------+
|i1 : G = graph({0,1,2,3,4}, {{0,1},{1,2},{2,3},{0,3},{0,4}})                 |
|                                                                             |
|o1 = Graph{0 => {1, 3, 4}}                                                   |
|           1 => {0, 2}                                                       |
|           2 => {1, 3}                                                       |
|           3 => {0, 2}                                                       |
|           4 => {0}                                                          |
|                                                                             |
|o1 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i2 : S = oscRing(G, CoefficientRing => QQ, Reduced => true)                  |
|                                                                             |
|o2 = S                                                                       |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : I = oscSystem(G,S)                                                      |
|                                                                             |
|                                                                             |
|o3 = ideal (- y  - y  - y , x y  - x y  + y , - x y  + x y  + x y  - x y , - |
|               1    3    4   2 1    1 2    1     2 1    1 2    3 2    2 3    |
|     ------------------------------------------------------------------------|
|                            2    2       2    2       2    2       2    2    |
|     x y  + x y  + y , y , x  + y  - 1, x  + y  - 1, x  + y  - 1, x  + y  -  |
|      3 2    2 3    3   4   1    1       2    2       3    3       4    4    |
|     ------------------------------------------------------------------------|
|     1)                                                                      |
|                                                                             |
|o3 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i4 : dim I                                                                   |
|                                                                             |
|o4 = 1                                                                       |
+-----------------------------------------------------------------------------+
|i5 : Jac = oscJacobian(G,S)                                                  |
|                                                                             |
|o5 = | -x_1-x_3-x_4 x_1                0                                     |
|     | x_1          -x_1x_2-y_1y_2-x_1 x_1x_2+y_1y_2                         |
|     | 0            x_1x_2+y_1y_2      -x_1x_2-x_2x_3-y_1y_2-y_2y_3          |
|     | x_3          0                  x_2x_3+y_2y_3                         |
|     | x_4          0                  0                                     |
|     ------------------------------------------------------------------------|
|     x_3                x_4  |                                               |
|     0                  0    |                                               |
|     x_2x_3+y_2y_3      0    |                                               |
|     -x_2x_3-y_2y_3-x_3 0    |                                               |
|     0                  -x_4 |                                               |
|                                                                             |
|             5      5                                                        |
|o5 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i6 : assert(det Jac == 0)                                                    |
+-----------------------------------------------------------------------------+
|i7 : assert(Jac - transpose Jac == 0)                                        |
+-----------------------------------------------------------------------------+
|i8 : realsols = findRealSolutions I                                          |
|warning: some solutions are not regular: {12, 13, 14, 18, 19, 20, 21, 22, 24,|
|                                                                             |
|o8 = {{1, 1, 1, -1, 0, 0, 0, 0}, {-1, 1, -1, -1, 0, 0, 0, 0}, {1, 1, 1, 1, 0,|
|     ------------------------------------------------------------------------|
|     0, 0, 0}, {-1, 1, -1, 1, 0, 0, 0, 0}, {0, -1, 0, -1, -1, 0, 1, 0}, {0,  |
|     ------------------------------------------------------------------------|
|     -1, 0, -1, 1, 0, -1, 0}, {0, -1, 0, -1, -1, 0, 1, 0}, {0, -1, 0, 1, -1, |
|     ------------------------------------------------------------------------|
|     0, 1, 0}, {0, -1, 0, -1, 1, 0, -1, 0}, {0, -1, 0, 1, 1, 0, -1, 0}, {0,  |
|     ------------------------------------------------------------------------|
|     -1, 0, 1, 1, 0, -1, 0}, {0, -1, 0, 1, -1, 0, 1, 0}, {-.203311, -.91733, |
|     ------------------------------------------------------------------------|
|     .203311, -1, -.979114, .398129, .979114, 0}, {.203311, -.91733,         |
|     ------------------------------------------------------------------------|
|     -.203311, -1, -.979114, -.398129, .979114, 0}, {-.203311, -.91733,      |
|     ------------------------------------------------------------------------|
|     .203311, 1, -.979114, .398129, .979114, 0}, {.203311, -.91733, -.203311,|
|     ------------------------------------------------------------------------|
|     1, -.979114, -.398129, .979114, 0}}                                     |
|                                                                             |
|o8 : List                                                                    |
|-----------------------------------------------------------------------------|
|27, 28, 29, 34, 47}                                                          |
+-----------------------------------------------------------------------------+
|i9 : netList getAngles(4, realsols, Radians=>false)                          |
|                                                                             |
|     +-------+-------+-------+---+                                           |
|o9 = |0      |0      |0      |180|                                           |
|     +-------+-------+-------+---+                                           |
|     |180    |0      |180    |180|                                           |
|     +-------+-------+-------+---+                                           |
|     |0      |0      |0      |0  |                                           |
|     +-------+-------+-------+---+                                           |
|     |180    |0      |180    |0  |                                           |
|     +-------+-------+-------+---+                                           |
|     |270    |180    |90     |180|                                           |
|     +-------+-------+-------+---+                                           |
|     |90     |180    |270    |180|                                           |
|     +-------+-------+-------+---+                                           |
|     |270    |180    |90     |180|                                           |
|     +-------+-------+-------+---+                                           |
|     |270    |180    |90     |0  |                                           |
|     +-------+-------+-------+---+                                           |
|     |90     |180    |270    |180|                                           |
|     +-------+-------+-------+---+                                           |
|     |90     |180    |270    |0  |                                           |
|     +-------+-------+-------+---+                                           |
|     |90     |180    |270    |0  |                                           |
|     +-------+-------+-------+---+                                           |
|     |270    |180    |90     |0  |                                           |
|     +-------+-------+-------+---+                                           |
|     |258.269|156.539|78.2694|180|                                           |
|     +-------+-------+-------+---+                                           |
|     |281.731|203.461|101.731|180|                                           |
|     +-------+-------+-------+---+                                           |
|     |258.269|156.539|78.2694|0  |                                           |
|     +-------+-------+-------+---+                                           |
|     |281.731|203.461|101.731|0  |                                           |
|     +-------+-------+-------+---+                                           |
+-----------------------------------------------------------------------------+
|i10 : C = decompose I                                                        |
|                                                                             |
|                                                         2    2              |
|o10 = {ideal (y , y , y  + y , x  - 1, x  + 1, x  - x , x  + y  - 1), ideal  |
|               4   2   1    3   4       2       1    3   3    3              |
|      -----------------------------------------------------------------------|
|                                                  2    2                     |
|      (y , y , y  + y , x  - 1, x  + 1, x  + x , x  + y  - 1), ideal (y , y ,|
|        4   2   1    3   4       2       1    3   3    3               4   2 |
|      -----------------------------------------------------------------------|
|                                         2    2                              |
|      y  + y , x  + 1, x  + 1, x  - x , x  + y  - 1), ideal (y , y , y  + y ,|
|       1    3   4       2       1    3   3    3               4   2   1    3 |
|      -----------------------------------------------------------------------|
|                                2    2                                       |
|      x  + 1, x  + 1, x  + x , x  + y  - 1), ideal (y , y  + y , x  - 1, x  +|
|       4       2       1    3   3    3               4   1    3   4       1  |
|      -----------------------------------------------------------------------|
|            2                                           2                    |
|      x , 2y  + x  - 1, 2x y  - y , x y  - x y  - y , 2x  - x  - 1, x x  +   |
|       3    3    2        3 3    2   3 2    2 3    3    3    2       2 3     |
|      -----------------------------------------------------------------------|
|                  2    2                                              2      |
|      y y  - x , x  + y  - 1), ideal (y , y  + y , x  + 1, x  + x , 2y  + x  |
|       2 3    3   2    2               4   1    3   4       1    3    3    2 |
|      -----------------------------------------------------------------------|
|                                           2                              2  |
|      - 1, 2x y  - y , x y  - x y  - y , 2x  - x  - 1, x x  + y y  - x , x  +|
|             3 3    2   3 2    2 3    3    3    2       2 3    2 3    3   2  |
|      -----------------------------------------------------------------------|
|       2                                                                     |
|      y  - 1), ideal (y , y , y , y , x  - 1, x  - 1, x  - 1, x  - 1), ideal |
|       2               4   3   2   1   4       3       2       1             |
|      -----------------------------------------------------------------------|
|      (y , y , y , y , x  - 1, x  + 1, x  - 1, x  + 1), ideal (y , y , y ,   |
|        4   3   2   1   4       3       2       1               4   3   2    |
|      -----------------------------------------------------------------------|
|      y , x  + 1, x  - 1, x  - 1, x  - 1), ideal (y , y , y , y , x  + 1, x  |
|       1   4       3       2       1               4   3   2   1   4       3 |
|      -----------------------------------------------------------------------|
|      + 1, x  - 1, x  + 1)}                                                  |
|            2       1                                                        |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
|i11 : for i in C list Jac % i                                                |
|                                                                             |
|o11 = {| -2x_3-1 x_3  0    x_3  1  |, | -1   -x_3 0    x_3  1  |, | -2x_3+1  |
|       | x_3     0    -x_3 0    0  |  | -x_3 0    x_3  0    0  |  | x_3      |
|       | 0       -x_3 2x_3 -x_3 0  |  | 0    x_3  0    -x_3 0  |  | 0        |
|       | x_3     0    -x_3 0    0  |  | x_3  0    -x_3 0    0  |  | x_3      |
|       | 1       0    0    0    -1 |  | 1    0    0    0    -1 |  | -1       |
|      -----------------------------------------------------------------------|
|      x_3  0    x_3  -1 |, | 1    -x_3 0    x_3  -1 |, | -1   -x_3 0    x_3  |
|      0    -x_3 0    0  |  | -x_3 0    x_3  0    0  |  | -x_3 2x_3 -x_3 0    |
|      -x_3 2x_3 -x_3 0  |  | 0    x_3  0    -x_3 0  |  | 0    -x_3 0    x_3  |
|      0    -x_3 0    0  |  | x_3  0    -x_3 0    0  |  | x_3  0    x_3  -2x_3|
|      0    0    0    1  |  | -1   0    0    0    1  |  | 1    0    0    0    |
|      -----------------------------------------------------------------------|
|      1  |, | 1    -x_3 0    x_3   -1 |, | -3 1  0  1  1  |, | 1  -1 0  -1 1 |
|      0  |  | -x_3 2x_3 -x_3 0     0  |  | 1  -2 1  0  0  |  | -1 2  -1 0  0 |
|      0  |  | 0    -x_3 0    x_3   0  |  | 0  1  -2 1  0  |  | 0  -1 2  -1 0 |
|      0  |  | x_3  0    x_3  -2x_3 0  |  | 1  0  1  -2 0  |  | -1 0  -1 2  0 |
|      -1 |  | -1   0    0    0     1  |  | 1  0  0  0  -1 |  | 1  0  0  0  -1|
|      -----------------------------------------------------------------------|
|      |, | -1 1  0  1  -1 |, | 3  -1 0  -1 -1 |}                             |
|      |  | 1  -2 1  0  0  |  | -1 2  -1 0  0  |                              |
|      |  | 0  1  -2 1  0  |  | 0  -1 2  -1 0  |                              |
|      |  | 1  0  1  -2 0  |  | -1 0  -1 2  0  |                              |
|      |  | -1 0  0  0  1  |  | -1 0  0  0  1  |                              |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+
|i12 : M = Jac % C_1                                                          |
|                                                                             |
|o12 = | -1   -x_3 0    x_3  1  |                                             |
|      | -x_3 0    x_3  0    0  |                                             |
|      | 0    x_3  0    -x_3 0  |                                             |
|      | x_3  0    -x_3 0    0  |                                             |
|      | 1    0    0    0    -1 |                                             |
|                                                                             |
|              5      5                                                       |
|o12 : Matrix S  <-- S                                                        |
+-----------------------------------------------------------------------------+
|i13 : M1 = matrix{{-1,0,0,0,1},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{1,0,0,0,-|
|                                                                             |
|o13 = | -1 0 0 0 1  |                                                        |
|      | 0  0 0 0 0  |                                                        |
|      | 0  0 0 0 0  |                                                        |
|      | 0  0 0 0 0  |                                                        |
|      | 1  0 0 0 -1 |                                                        |
|                                                                             |
|               5       5                                                     |
|o13 : Matrix ZZ  <-- ZZ                                                      |
|-----------------------------------------------------------------------------|
|1}}                                                                          |
+-----------------------------------------------------------------------------+
|i14 : use S                                                                  |
|                                                                             |
|o14 = S                                                                      |
|                                                                             |
|o14 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i15 : eigenvalues lift(sub(M - M1, x_3=>1), QQ)                              |
|                                                                             |
|o15 = {-2         }                                                          |
|      {6.59737e-17}                                                          |
|      {2          }                                                          |
|      {0          }                                                          |
|      {0          }                                                          |
|                                                                             |
|o15 : VerticalList                                                           |
+-----------------------------------------------------------------------------+
|i16 : eigenvalues lift(sub(M, x_3=>1), QQ)                                   |
|                                                                             |
|o16 = {1.8662      }                                                         |
|      {-2.65544    }                                                         |
|      {4.87698e-17 }                                                         |
|      {-1.21076    }                                                         |
|      {-5.36197e-17}                                                         |
|                                                                             |
|o16 : VerticalList                                                           |
+-----------------------------------------------------------------------------+
|i17 : eigenvalues lift(sub(M, x_3=>1/100000), QQ)                            |
|                                                                             |
|o17 = {-2          }                                                         |
|      {.0000173205 }                                                         |
|      {-.0000173205}                                                         |
|      {1.04782e-16 }                                                         |
|      {-2.24524e-17}                                                         |
|                                                                             |
|o17 : VerticalList                                                           |
+-----------------------------------------------------------------------------+
|i18 : eigenvalues lift(sub(M, x_3=>100), QQ)                                 |
|                                                                             |
|o18 = {199.752                 }                                             |
|      {-200.252                }                                             |
|      {-1.49997                }                                             |
|      {5.139e-17+7.87495e-15*ii}                                             |
|      {5.139e-17-7.87495e-15*ii}                                             |
|                                                                             |
|o18 : VerticalList                                                           |
+-----------------------------------------------------------------------------+

Caveat
======

If the system is positive dimensional, then of course it won't find all roots.
There might be real roots on a component, but none are found. If a component
(even a point) is singular, then it might have problems, depending on the
situation. In the latter case, there is a warning message emitted (about
non-regular solutions).

See also
========

  * oscRing -- create a polynomial ring for a given graph or
    number of oscillators
  * oscSystem -- the ideal of the reduced equilibrium points
    of a dynamical system of oscillators
  * oscJacobian -- create the Jacobian for the oscillator
    system associated to a graph
  * identifyStability -- Identify the stability of a
    list of eigenvalues, or of potential solutions to the oscillator system

Ways to use findRealSolutions:
==============================

  * "findRealSolutions(Graph)"
  * "findRealSolutions(Ideal)"

For the programmer
==================

The object findRealSolutions, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:373:0.

Generation of all SCT (simple, connected, 2-connected) graphs on small numbers of vertices -- generating all SCT graphs on n vertices
*************************************************************************************************************************************

Using the NautyGraphs package, we generate the list of isomorphism classes of
the SCT (simple, connected, 2-connected) graphs with a fixed number of
vertices.

+-----------------------------------------------------------------------+
|i1 : needsPackage "Oscillators"                                        |
|                                                                       |
|o1 = Oscillators                                                       |
|                                                                       |
|o1 : Package                                                           |
+-----------------------------------------------------------------------+
|i2 : needsPackage "NautyGraphs"                                        |
|                                                                       |
|o2 = NautyGraphs                                                       |
|                                                                       |
|o2 : Package                                                           |
+-----------------------------------------------------------------------+
|i3 : Gstrs = generateGraphs(5, OnlyConnected => true, MinDegree => 2); |
+-----------------------------------------------------------------------+
|i4 : #Gstrs == 11                                                      |
|                                                                       |
|o4 = true                                                              |
+-----------------------------------------------------------------------+
|i5 : Gstrs = generateGraphs(6, OnlyConnected => true, MinDegree => 2); |
+-----------------------------------------------------------------------+
|i6 : #Gstrs == 61                                                      |
|                                                                       |
|o6 = true                                                              |
+-----------------------------------------------------------------------+
|i7 : Gstrs = generateGraphs(7, OnlyConnected => true, MinDegree => 2); |
+-----------------------------------------------------------------------+
|i8 : #Gstrs == 507                                                     |
|                                                                       |
|o8 = true                                                              |
+-----------------------------------------------------------------------+
|i9 : Gstrs = generateGraphs(8, OnlyConnected => true, MinDegree => 2); |
+-----------------------------------------------------------------------+
|i10 : #Gstrs == 7442                                                   |
|                                                                       |
|o10 = true                                                             |
+-----------------------------------------------------------------------+
|i11 : Gstrs = generateGraphs(9, OnlyConnected => true, MinDegree => 2);|
+-----------------------------------------------------------------------+
|i12 : #Gstrs == 197772                                                 |
|                                                                       |
|o12 = true                                                             |
+-----------------------------------------------------------------------+

Here is a simple table with all of these numbers.

+-----------------------------------------------------------------------------+
|i13 : netList for n from 5 to 9 list {n, #generateGraphs(n, OnlyConnected => |
|                                                                             |
|      +-+------+                                                             |
|o13 = |5|11    |                                                             |
|      +-+------+                                                             |
|      |6|61    |                                                             |
|      +-+------+                                                             |
|      |7|507   |                                                             |
|      +-+------+                                                             |
|      |8|7442  |                                                             |
|      +-+------+                                                             |
|      |9|197772|                                                             |
|      +-+------+                                                             |
|-----------------------------------------------------------------------------|
|true, MinDegree => 2)}                                                       |
+-----------------------------------------------------------------------------+
-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:708:0.

getAngles -- Compute angles from a list of solutions
****************************************************

  * Usage:
        getAngles(n, S)
  * Inputs:
      * n, an integer (Macaulay2Doc), An integer representing the
        number of angles.
      * sols, a list (Macaulay2Doc), A list of solutions, where
        each solution is a list of cosine and sine values.
  * Optional inputs (Macaulay2Doc),:
      * Radians => a Boolean value (Macaulay2Doc), default value
        true, An optional boolean flag (default is true). If true, the angles
        are returned in radians; otherwise, they are returned in degrees.
  * Outputs:
      * a list (Macaulay2Doc), A list of angles computed from the
        given solutions.

Description
===========

The function getAngles computes the angles from a list of solutions. Each
solution is assumed to be a list of cosine and sine values for the angles. The
function returns the angles in radians or degrees based on the Radians option.

+-----------------------------------------------------------------+
|i1 : getAngles(2, {{1, 0, 0, 1}, {0, 1, 1, 0}}, Radians => false)|
|                                                                 |
|o1 = {{0, 90}, {90, 0}}                                          |
|                                                                 |
|o1 : List                                                        |
+-----------------------------------------------------------------+

See also
========

  * getLinearlyStableSolutions -- Compute
    linearly stable solutions for the Kuramoto oscillator system associated to
    a graph
  * findRealSolutions -- find real solutions, at
    least one per component for well-conditioned systems

Ways to use getAngles:
======================

  * "getAngles(ZZ,List)"

For the programmer
==================

The object getAngles, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:501:0.

getLinearlyStableSolutions -- Compute linearly stable solutions for the Kuramoto oscillator system associated to a graph
************************************************************************************************************************

  * Usage:
        getLinearlyStableSolutions(G)
  * Inputs:
      * G, a graph (Graphs), An undirected, connected graph
  * Outputs:
      * a list (Macaulay2Doc), A list of linearly stable solutions
        for the Kuramoto oscillator system associated to the graph

Description
===========

The function getLinearlyStableSolutions computes the linearly stable solutions
for the Kuramoto oscillator system associated to a given graph. The Kuramoto
oscillator system is a system of coupled phase oscillators, where the dynamics
of each oscillator is given by the Kuramoto model. The linear stability of a
solution is determined by the eigenvalues of the Jacobian matrix of the system
evaluated at the solution.

+-----------------------------------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}});                        |
+-----------------------------------------------------------------------------+
|i2 : getLinearlyStableSolutions(G)                                           |
|warning: some solutions are not regular: {5, 6, 8, 9, 10, 11, 13, 14, 15, 16,|
| -- .154043s elapsed                                                         |
|                                                                             |
|o2 = {{1, 1, 1, 0, 0, 0}}                                                    |
|                                                                             |
|o2 : List                                                                    |
|-----------------------------------------------------------------------------|
|17, 18, 19, 20}                                                              |
+-----------------------------------------------------------------------------+

See also
========

  * findRealSolutions -- find real solutions, at
    least one per component for well-conditioned systems
  * identifyStability -- Identify the stability of a
    list of eigenvalues, or of potential solutions to the oscillator system

Ways to use getLinearlyStableSolutions:
=======================================

  * "getLinearlyStableSolutions(Graph)"

For the programmer
==================

The object getLinearlyStableSolutions, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:567:0.

Harrington-Schenck-Stillman -- Arxiv 2312.16069 reference
*********************************************************

[HSS] Algebraic examples of homogeneous Kuramoto oscillators (see
https://arxiv.org/abs/2312.16069 ) by Heather Harrington, Hal Schenck, Mike
Stillman, 2023.

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:948:0.

identifyStability -- Identify the stability of a list of eigenvalues, or of potential solutions to the oscillator system
************************************************************************************************************************

  * Usage:
        identifyStability(Jac, sols)
        identifyStability(eigenvals)
  * Inputs:
      * Jac, a matrix (Macaulay2Doc), A matrix representing the
        Jacobian of the oscillator system.
      * sol, a list (Macaulay2Doc), A potential solution to the
        oscillator system.
      * eigenvals, a basic list (Macaulay2Doc), An eigenvalue
  * Optional inputs (Macaulay2Doc),:
      * Tolerance => a real number (Macaulay2Doc), default value
        1e-15, An optional real number representing the tolerance for the
        stability check (default is 1e-10).
  * Outputs:
      * a basic list (Macaulay2Doc), A list of stability
        values for the given solutions or eigenvalues.

Description
===========

The function identifyStability computes the stability of a list of solutions or
eigenvalues. For solutions, the function computes the eigenvalues of the
Jacobian at each solution and determines the stability based on the sign of the
real part of the eigenvalues. For eigenvalues, the function determines the
stability based on the sign of the real part of the eigenvalues.

+-----------------------------------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}});                        |
+-----------------------------------------------------------------------------+
|i2 : R = oscRing(G, Reduced => true);                                        |
+-----------------------------------------------------------------------------+
|i3 : I = oscSystem(G, R);                                                    |
|                                                                             |
|o3 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i4 : Jac = oscJacobian(G, R);                                                |
|                                                                             |
|             4      4                                                        |
|o4 : Matrix R  <-- R                                                         |
+-----------------------------------------------------------------------------+
|i5 : realsols = findRealSolutions I;                                         |
|warning: some solutions are not regular: {8, 14, 16, 19, 23}                 |
+-----------------------------------------------------------------------------+
|i6 : jacs = for pt in realsols list sub(Jac, matrix{pt});                    |
+-----------------------------------------------------------------------------+
|i7 : eigenvals = jacs/eigenvalues;                                           |
+-----------------------------------------------------------------------------+
|i8 : eigenvals / identifyStability                                           |
|                                                                             |
|o8 = {Unstable, Stable, Unstable, Semistable, Unstable, Unstable, Unstable,  |
|     ------------------------------------------------------------------------|
|     Semistable, Semistable, Semistable, Unstable, Unstable, Unstable,       |
|     ------------------------------------------------------------------------|
|     Unstable}                                                               |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+
|i9 : realsols/(pt -> prepend(identifyStability(Jac, pt), pt))                |
|                                                                             |
|o9 = {{Unstable, -1, 1, -1, 0, 0, 0}, {Stable, 1, 1, 1, 0, 0, 0}, {Unstable, |
|     ------------------------------------------------------------------------|
|     -.550456, -1, .550456, -.834864, 0, .834864}, {Semistable, 0, -1, 0, -1,|
|     ------------------------------------------------------------------------|
|     0, 1}, {Unstable, -.315974, -.800321, .315974, .948768, -.599572,       |
|     ------------------------------------------------------------------------|
|     -.948768}, {Unstable, .550456, -1, -.550456, .834864, 0, -.834864},     |
|     ------------------------------------------------------------------------|
|     {Unstable, .188411, -1, .188411, -.98209, 0, .98209}, {Semistable, 0,   |
|     ------------------------------------------------------------------------|
|     -1, 0, 1, 0, -1}, {Semistable, 0, -1, 0, -1, 0, 1}, {Semistable, 0, -1, |
|     ------------------------------------------------------------------------|
|     0, 1, 0, -1}, {Unstable, -.188411, -1, -.188411, -.98209, 0, .98209},   |
|     ------------------------------------------------------------------------|
|     {Unstable, .315974, -.800321, -.315974, .948768, .599572, -.948768},    |
|     ------------------------------------------------------------------------|
|     {Unstable, -.550456, -1, .550456, .834864, 0, -.834864}, {Unstable,     |
|     ------------------------------------------------------------------------|
|     .550456, -1, -.550456, -.834864, 0, .834864}}                           |
|                                                                             |
|o9 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * oscJacobian -- create the Jacobian for the oscillator
    system associated to a graph
  * findRealSolutions -- find real solutions, at
    least one per component for well-conditioned systems

Ways to use identifyStability:
==============================

  * "identifyStability(BasicList)"
  * "identifyStability(Matrix,List)"

For the programmer
==================

The object identifyStability, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:542:0.

isStableSolution -- Check if a given solution is stable for the Kuramoto oscillator system
******************************************************************************************

  * Usage:
        isStableSolution(Jac, sol)
  * Inputs:
      * Jac, a matrix (Macaulay2Doc), A matrix representing the
        Jacobian of the Kuramoto oscillator system
      * sol, a list (Macaulay2Doc), A potential solution to the
        Kuramoto oscillator system
  * Outputs:
      * a Boolean value (Macaulay2Doc), True if the solution is
        stable, false otherwise

Description
===========

The function isStableSolution checks if a given solution is stable for the
Kuramoto oscillator system. The stability of a solution is determined by the
eigenvalues of the Jacobian matrix of the system evaluated at the solution. If
all eigenvalues have negative real parts, the solution is considered stable.

+------------------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}});       |
+------------------------------------------------------------+
|i2 : R = oscRing(G, Reduced => true);                       |
+------------------------------------------------------------+
|i3 : I = oscSystem(G, R);                                   |
|                                                            |
|o3 : Ideal of R                                             |
+------------------------------------------------------------+
|i4 : Jac = oscJacobian(G, R);                               |
|                                                            |
|             4      4                                       |
|o4 : Matrix R  <-- R                                        |
+------------------------------------------------------------+
|i5 : realsols = findRealSolutions I;                        |
|warning: some solutions are not regular: {8, 14, 16, 19, 23}|
+------------------------------------------------------------+
|i6 : select(realsols, S -> isStableSolution(Jac, S))        |
|                                                            |
|o6 = {{1, 1, 1, 0, 0, 0}}                                   |
|                                                            |
|o6 : List                                                   |
+------------------------------------------------------------+

See also
========

  * oscJacobian -- create the Jacobian for the oscillator
    system associated to a graph
  * findRealSolutions -- find real solutions, at
    least one per component for well-conditioned systems
  * identifyStability -- Identify the stability of a
    list of eigenvalues, or of potential solutions to the oscillator system

Ways to use isStableSolution:
=============================

  * "isStableSolution(Matrix,List)"

For the programmer
==================

The object isStableSolution, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:677:0.

oscJacobian -- create the Jacobian for the oscillator system associated to a graph
**********************************************************************************

  * Usage:
        oscJacobian(G,R)
        oscJacobian(I)
        oscJacobian(G)
  * Inputs:
      * G, a graph (Graphs), an undirected, connected graph $G$
      * S, a ring (Macaulay2Doc), created with oscRing,
      * I, an ideal (Macaulay2Doc), an ideal, intended to be ideal
        created by oscSystem
  * Optional inputs (Macaulay2Doc),:
      * Reduced => a Boolean value (Macaulay2Doc), default value
        false, if true, then the angles are reduced to the first angle being 0.
        That is, the number of oscillators will be one less than the number of
        vertices of $G$
  * Outputs:
      * a matrix (Macaulay2Doc), the $n \times n$ Jacobian matrix
        of the system, as a matrix of polynomials involving the cosines and
        sines of angles $\theta_1, \ldots, \theta_{n-1}$, where we set
        $\theta_0 = 0$ if $\texttt{Reduced => true}$

Description
===========

The matrix is a symmetric $n \times n$  matrix (with determinant zero).

+-----------------------------------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}})                         |
|                                                                             |
|o1 = Graph{0 => {1, 3}}                                                      |
|           1 => {0, 2}                                                       |
|           2 => {1, 3}                                                       |
|           3 => {0, 2}                                                       |
|                                                                             |
|o1 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i2 : oscRing(G, CoefficientRing => CC)                                       |
|                                                                             |
|o2 = CC  [x ..x , y ..y ]                                                    |
|       53  0   3   0   3                                                     |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : S = oo                                                                  |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : I = oscSystem(G,S)                                                      |
|                                                                             |
|                                                                             |
|o4 = ideal (x y  + x y  - x y  - x y , - x y  + x y  + x y  - x y , - x y  + |
|             1 0    3 0    0 1    0 3     1 0    0 1    2 1    1 2     2 1   |
|     ------------------------------------------------------------------------|
|                                                       2    2       2    2   |
|     x y  + x y  - x y , - x y  - x y  + x y  + x y , x  + y  - 1, x  + y  - |
|      1 2    3 2    2 3     3 0    3 2    0 3    2 3   0    0       1    1   |
|     ------------------------------------------------------------------------|
|         2    2       2    2                                                 |
|     1, x  + y  - 1, x  + y  - 1)                                            |
|         2    2       3    3                                                 |
|                                                                             |
|o4 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i5 : Jac = oscJacobian(G,S)                                                  |
|                                                                             |
|o5 = | -x_0x_1-x_0x_3-y_0y_1-y_0y_3 x_0x_1+y_0y_1                            |
|     | x_0x_1+y_0y_1                -x_0x_1-x_1x_2-y_0y_1-y_1y_2             |
|     | 0                            x_1x_2+y_1y_2                            |
|     | x_0x_3+y_0y_3                0                                        |
|     ------------------------------------------------------------------------|
|     0                            x_0x_3+y_0y_3                |             |
|     x_1x_2+y_1y_2                0                            |             |
|     -x_1x_2-x_2x_3-y_1y_2-y_2y_3 x_2x_3+y_2y_3                |             |
|     x_2x_3+y_2y_3                -x_0x_3-x_2x_3-y_0y_3-y_2y_3 |             |
|                                                                             |
|             4      4                                                        |
|o5 : Matrix S  <-- S                                                         |
+-----------------------------------------------------------------------------+
|i6 : assert(det Jac == 0)                                                    |
+-----------------------------------------------------------------------------+
|i7 : assert(Jac - transpose Jac == 0)                                        |
+-----------------------------------------------------------------------------+

We can find the eigenvalues of the Jacobian at approximate points, and see if
they are stable (all eigenvalues negative, except for the one required 0),
unstable (a positive eigenvalue), or semistable (no positive eigenvalues, up to
a certain tolerance).

+-----------------------------------------------------------------------------+
|i8 : realsols = findRealSolutions I                                          |
|warning: some solutions are not regular: {8, 9, 10, 11, 12, 21, 22, 23, 24, 2|
|                                                                             |
|o8 = {{-1, -1, 1, -1, 0, 0, 0, 0}, {1, -1, -1, -1, 0, 0, 0, 0}, {1, -1, -1,  |
|     ------------------------------------------------------------------------|
|     1, 0, 0, 0, 0}, {-1, 1, 1, 1, 0, 0, 0, 0}, {1, 1, -1, 1, 0, 0, 0, 0},   |
|     ------------------------------------------------------------------------|
|     {1, -1, 1, 1, 0, 0, 0, 0}, {1, -1, -1, -1, 0, 0, 0, 0}, {-1, 1, -1, -1, |
|     ------------------------------------------------------------------------|
|     0, 0, 0, 0}, {-1, -1, -1, 1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0, 0, 0},  |
|     ------------------------------------------------------------------------|
|     {1, 1, 1, -1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0, 0, 0}, {1, -1, 1, 1, 0,|
|     ------------------------------------------------------------------------|
|     0, 0, 0}, {-1, -1, -1, 1, 0, 0, 0, 0}, {1, 1, -1, 1, 0, 0, 0, 0}, {1,   |
|     ------------------------------------------------------------------------|
|     -1, 1, 1, 0, 0, 0, 0}, {-1, 1, 1, 1, 0, 0, 0, 0}, {1, 1, 1, -1, 0, 0, 0,|
|     ------------------------------------------------------------------------|
|     0}, {-1, 1, -1, -1, 0, 0, 0, 0}, {-1, -1, -1, 1, 0, 0, 0, 0}, {-1, 1, 1,|
|     ------------------------------------------------------------------------|
|     1, 0, 0, 0, 0}}                                                         |
|                                                                             |
|o8 : List                                                                    |
|-----------------------------------------------------------------------------|
|5, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 44}                               |
+-----------------------------------------------------------------------------+
|i9 : jacs = for pt in realsols list sub(Jac, matrix{pt})                     |
|                                                                             |
|o9 = {| -2 1  0  1  |, | 2  -1 0  -1 |, | 0  -1 0  1  |, | 2  -1 0  -1 |, |  |
|      | 1  0  -1 0  |  | -1 0  1  0  |  | -1 0  1  0  |  | -1 0  1  0  |  |  |
|      | 0  -1 2  -1 |  | 0  1  -2 1  |  | 0  1  0  -1 |  | 0  1  -2 1  |  |  |
|      | 1  0  -1 0  |  | -1 0  1  0  |  | 1  0  -1 0  |  | -1 0  1  0  |  |  |
|     ------------------------------------------------------------------------|
|     -2 1  0  1  |, | 0  -1 0  1  |, | 2  -1 0  -1 |, | 0  -1 0  1  |, | 0   |
|     1  0  -1 0  |  | -1 2  -1 0  |  | -1 0  1  0  |  | -1 2  -1 0  |  | 1   |
|     0  -1 2  -1 |  | 0  -1 0  1  |  | 0  1  -2 1  |  | 0  -1 0  1  |  | 0   |
|     1  0  -1 0  |  | 1  0  1  -2 |  | -1 0  1  0  |  | 1  0  1  -2 |  | -1  |
|     ------------------------------------------------------------------------|
|     1  0  -1 |, | -2 1  0  1  |, | 0  1  0  -1 |, | -2 1  0  1  |, | 0  -1  |
|     -2 1  0  |  | 1  0  -1 0  |  | 1  -2 1  0  |  | 1  0  -1 0  |  | -1 2   |
|     1  0  -1 |  | 0  -1 2  -1 |  | 0  1  0  -1 |  | 0  -1 2  -1 |  | 0  -1  |
|     0  -1 2  |  | 1  0  -1 0  |  | -1 0  -1 2  |  | 1  0  -1 0  |  | 1  0   |
|     ------------------------------------------------------------------------|
|     0  1  |, | 0  1  0  -1 |, | -2 1  0  1  |, | 0  -1 0  1  |, | 2  -1 0   |
|     -1 0  |  | 1  -2 1  0  |  | 1  0  -1 0  |  | -1 2  -1 0  |  | -1 0  1   |
|     0  1  |  | 0  1  0  -1 |  | 0  -1 2  -1 |  | 0  -1 0  1  |  | 0  1  -2  |
|     1  -2 |  | -1 0  -1 2  |  | 1  0  -1 0  |  | 1  0  1  -2 |  | -1 0  1   |
|     ------------------------------------------------------------------------|
|     -1 |, | 0  1  0  -1 |, | 0  -1 0  1  |, | 0  1  0  -1 |, | 2  -1 0  -1  |
|     0  |  | 1  -2 1  0  |  | -1 2  -1 0  |  | 1  -2 1  0  |  | -1 0  1  0   |
|     1  |  | 0  1  0  -1 |  | 0  -1 0  1  |  | 0  1  0  -1 |  | 0  1  -2 1   |
|     0  |  | -1 0  -1 2  |  | 1  0  1  -2 |  | -1 0  -1 2  |  | -1 0  1  0   |
|     ------------------------------------------------------------------------|
|     |}                                                                      |
|     |                                                                       |
|     |                                                                       |
|     |                                                                       |
|                                                                             |
|o9 : List                                                                    |
+-----------------------------------------------------------------------------+
|i10 : jacs/eigenvalues                                                       |
|                                                                             |
|o10 = {{-2.82843    }, {2.82843     }, {2          }, {2.82843     },        |
|       {2.32115e-16 }  {-2.32115e-16}  {-6.4281e-17}  {-2.32115e-16}         |
|       {2.82843     }  {-2.82843    }  {-2         }  {-2.82843    }         |
|       {-2.46519e-32}  {2.46519e-32 }  {0          }  {2.46519e-32 }         |
|      -----------------------------------------------------------------------|
|      {-2.82843    }, {-2.82843   }, {2.82843    }, {2.82843     },          |
|      {2.32115e-16 }  {3.93452e-16}  {1.55984e-16}  {-2.82843    }           |
|      {2.82843     }  {2.82843    }  {-2.82843   }  {-1.702e-16  }           |
|      {-2.46519e-32}  {0          }  {0          }  {-5.85737e-18}           |
|      -----------------------------------------------------------------------|
|      {-2.82843   }, {-2.82843    }, {2.82843     }, {-2.82843   },          |
|      {2.82843    }  {-1.55984e-16}  {-3.93452e-16}  {4.20713e-16}           |
|      {1.702e-16  }  {2.82843     }  {-2.82843    }  {2.82843    }           |
|      {5.85737e-18}  {0           }  {0           }  {0          }           |
|      -----------------------------------------------------------------------|
|      {-2.82843   }, {2.82843     }, {-2.82843    }, {2.82843     },         |
|      {3.93452e-16}  {-3.93452e-16}  {-1.55984e-16}  {-2.82843    }          |
|      {2.82843    }  {-2.82843    }  {2.82843     }  {-1.702e-16  }          |
|      {0          }  {0           }  {0           }  {-5.85737e-18}          |
|      -----------------------------------------------------------------------|
|      {2.82843    }, {-2.82843   }, {-2.82843   }, {2.82843     },           |
|      {1.55984e-16}  {2.82843    }  {3.93452e-16}  {-3.93452e-16}            |
|      {-2.82843   }  {1.702e-16  }  {2.82843    }  {-2.82843    }            |
|      {0          }  {5.85737e-18}  {0          }  {0           }            |
|      -----------------------------------------------------------------------|
|      {2.82843     }}                                                        |
|      {-4.20713e-16}                                                         |
|      {-2.82843    }                                                         |
|      {0           }                                                         |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
|i11 : jacs/eigenvalues/identifyStability                                     |
|                                                                             |
|o11 = {Unstable, Unstable, Unstable, Unstable, Unstable, Unstable, Unstable, |
|      -----------------------------------------------------------------------|
|      Unstable, Unstable, Unstable, Unstable, Unstable, Unstable, Unstable,  |
|      -----------------------------------------------------------------------|
|      Unstable, Unstable, Unstable, Unstable, Unstable, Unstable, Unstable}  |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * oscRing -- create a polynomial ring for a given graph or
    number of oscillators
  * oscSystem -- the ideal of the reduced equilibrium points
    of a dynamical system of oscillators
  * findRealSolutions -- find real solutions, at
    least one per component for well-conditioned systems
  * identifyStability -- Identify the stability of a
    list of eigenvalues, or of potential solutions to the oscillator system
  * eigenvalues (Macaulay2Doc) -- find eigenvalues of a
    matrix

Ways to use oscJacobian:
========================

  * "oscJacobian(Graph)"
  * "oscJacobian(Graph,Ring)"
  * "oscJacobian(Ideal)"

For the programmer
==================

The object oscJacobian, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:318:0.

oscQuadrics -- find the homogeneous quadrics in the homogeneous Kuramoto ideal
******************************************************************************

  * Usage:
        oscQuadrics(G,R)
        oscQuadrics(G)
  * Inputs:
      * G, a graph (Graphs), an undirected, connected graph $G$ on
        vertices $0, \ldots, n-1$, where $n$ is the number of vertices of $G$
      * R, a ring (Macaulay2Doc), created with oscRing,
  * Optional inputs (Macaulay2Doc),:
      * Reduced => a Boolean value (Macaulay2Doc), default value
        false, if true, then the angles are reduced to the first angle being 0.
        That is, the number of oscillators will be one less than the number of
        vertices of $G$
  * Outputs:
      * an ideal (Macaulay2Doc), in the ring R

Description
===========

The ideal of quadrics of the oscillator system associated to the graph $G$.
This is the ideal generated by the quadrics of the system, where the system is
$d\theta_i/dt = \sum_j a_{ij} \sin(\theta_j - \theta_i)$ where we consider only
reduced equilibrium solutions $\theta_0 = 0$.

+-----------------------------------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}})                         |
|                                                                             |
|o1 = Graph{0 => {1, 3}}                                                      |
|           1 => {0, 2}                                                       |
|           2 => {1, 3}                                                       |
|           3 => {0, 2}                                                       |
|                                                                             |
|o1 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i2 : oscRing(G, CoefficientRing => CC)                                       |
|                                                                             |
|o2 = CC  [x ..x , y ..y ]                                                    |
|       53  0   3   0   3                                                     |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : S = oo                                                                  |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : I = oscQuadrics(G,S)                                                    |
|                                                                             |
|o4 = ideal (x y  + x y  - x y  - x y , - x y  + x y  + x y  - x y , - x y  + |
|             1 0    3 0    0 1    0 3     1 0    0 1    2 1    1 2     2 1   |
|     ------------------------------------------------------------------------|
|     x y  + x y  - x y , - x y  - x y  + x y  + x y )                        |
|      1 2    3 2    2 3     3 0    3 2    0 3    2 3                         |
|                                                                             |
|o4 : Ideal of S                                                              |
+-----------------------------------------------------------------------------+
|i5 : netList I_*                                                             |
|                                                                             |
|     +---------------------------+                                           |
|o5 = |x y  + x y  - x y  - x y   |                                           |
|     | 1 0    3 0    0 1    0 3  |                                           |
|     +---------------------------+                                           |
|     |- x y  + x y  + x y  - x y |                                           |
|     |   1 0    0 1    2 1    1 2|                                           |
|     +---------------------------+                                           |
|     |- x y  + x y  + x y  - x y |                                           |
|     |   2 1    1 2    3 2    2 3|                                           |
|     +---------------------------+                                           |
|     |- x y  - x y  + x y  + x y |                                           |
|     |   3 0    3 2    0 3    2 3|                                           |
|     +---------------------------+                                           |
+-----------------------------------------------------------------------------+

Ways to use oscQuadrics:
========================

  * "oscQuadrics(Graph)"
  * "oscQuadrics(Graph,Ring)"

For the programmer
==================

The object oscQuadrics, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:409:0.

oscRing -- create a polynomial ring for a given graph or number of oscillators
******************************************************************************

  * Usage:
        S = oscRing G
        S = oscRing n
  * Inputs:
      * n, an integer (Macaulay2Doc), The number of oscillators
      * G, a graph (Graphs), The number of oscillators is the
        number of vertices in the Graph
  * Optional inputs (Macaulay2Doc),:
      * CoefficientRing => a ring (Macaulay2Doc), default value QQ,
        the coefficient ring to use, for numerical work, see CC (Macaulay2Doc),
        is a good choice
      * Symbols => a sequence (Macaulay2Doc), default value
        (x,y), a sequence of two symbols.  The first refers to the cosine of
        the given angles and the second refers to the sine of the given angles
      * Reduced => a Boolean value (Macaulay2Doc), default value
        false, if true, then the angles are reduced to the first angle being 0.
        That is, the number of oscillators will be one less than the number of
        vertices of $G$
  * Outputs:
      * a ring (Macaulay2Doc),

Description
===========

This function returns a polynomial ring in $2n$ variables representing the
cosine and the sine of $n$ angles. Inputting a number assumes that the vertices
are labeled $0, \ldots, n$.

+-------------------------------------------------------+
|i1 : oscRing(3, CoefficientRing => CC)                 |
|                                                       |
|o1 = CC  [x ..x , y ..y ]                              |
|       53  0   2   0   2                               |
|                                                       |
|o1 : PolynomialRing                                    |
+-------------------------------------------------------+
|i2 : oscRing(3, CoefficientRing => CC, Symbols=>{c, s})|
|                                                       |
|o2 = CC  [c ..c , s ..s ]                              |
|       53  0   2   0   2                               |
|                                                       |
|o2 : PolynomialRing                                    |
+-------------------------------------------------------+

If one gives a graph with Reduced => true, then the number of angles considered
is one less than the number of vertices of the graph.

+-------------------------------------------------------+
|i3 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}})   |
|                                                       |
|o3 = Graph{0 => {1, 3}}                                |
|           1 => {0, 2}                                 |
|           2 => {1, 3}                                 |
|           3 => {0, 2}                                 |
|                                                       |
|o3 : Graph                                             |
+-------------------------------------------------------+
|i4 : oscRing G                                         |
|                                                       |
|o4 = QQ[x ..x , y ..y ]                                |
|         0   3   0   3                                 |
|                                                       |
|o4 : PolynomialRing                                    |
+-------------------------------------------------------+
|i5 : oscRing(G, CoefficientRing => CC, Reduced => true)|
|                                                       |
|o5 = CC  [x ..x , y ..y ]                              |
|       53  1   3   1   3                               |
|                                                       |
|o5 : PolynomialRing                                    |
+-------------------------------------------------------+

See also
========

  * oscSystem -- the ideal of the reduced equilibrium points
    of a dynamical system of oscillators
  * oscJacobian -- create the Jacobian for the oscillator
    system associated to a graph
  * displayGraph (Graphs) -- displays a digraph or graph
    using Graphviz

Ways to use oscRing:
====================

  * "oscRing(Graph)"
  * "oscRing(ZZ)"

For the programmer
==================

The object oscRing, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:201:0.

oscSystem -- the ideal of the reduced equilibrium points of a dynamical system of oscillators
*********************************************************************************************

  * Usage:
        oscSystem(G,R)
        oscSystem(G)
  * Inputs:
      * G, a graph (Graphs), an undirected, connected graph $G$
      * R, a ring (Macaulay2Doc), created with oscRing,
  * Optional inputs (Macaulay2Doc),:
      * Reduced => a Boolean value (Macaulay2Doc), default value
        false, if true, then the angles are reduced to the first angle being 0.
        That is, the number of oscillators will be one less than the number of
        vertices of $G$
  * Outputs:
      * an ideal (Macaulay2Doc), in the ring R

Description
===========

$R$ should be a ring created with oscRing.  The dynamical
system involved is the oscillator system associated to $G$: one angle per
vertex. If $a_{ij} = 1$ if $(i,j)$ is an edge of the undirected graph $G$, and
is zero otherwise, then the system is $d\theta_i/dt = \sum_j a_{ij}
\sin(\theta_j - \theta_i)$ where we consider only reduced equilibrium solutions
$\theta_0 = 0$.

This function returns the ideal of equilibrium points, where angles $(0,
\theta_1, ..., \theta_{n-1})$ are represented via cosines and sines of the
angles.

+-----------------------------------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}})                         |
|                                                                             |
|o1 = Graph{0 => {1, 3}}                                                      |
|           1 => {0, 2}                                                       |
|           2 => {1, 3}                                                       |
|           3 => {0, 2}                                                       |
|                                                                             |
|o1 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i2 : oscRing(G, CoefficientRing => CC)                                       |
|                                                                             |
|o2 = CC  [x ..x , y ..y ]                                                    |
|       53  0   3   0   3                                                     |
|                                                                             |
|o2 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i3 : R = oo                                                                  |
|                                                                             |
|o3 = R                                                                       |
|                                                                             |
|o3 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i4 : I = oscSystem(G,R)                                                      |
|                                                                             |
|                                                                             |
|o4 = ideal (x y  + x y  - x y  - x y , - x y  + x y  + x y  - x y , - x y  + |
|             1 0    3 0    0 1    0 3     1 0    0 1    2 1    1 2     2 1   |
|     ------------------------------------------------------------------------|
|                                                       2    2       2    2   |
|     x y  + x y  - x y , - x y  - x y  + x y  + x y , x  + y  - 1, x  + y  - |
|      1 2    3 2    2 3     3 0    3 2    0 3    2 3   0    0       1    1   |
|     ------------------------------------------------------------------------|
|         2    2       2    2                                                 |
|     1, x  + y  - 1, x  + y  - 1)                                            |
|         2    2       3    3                                                 |
|                                                                             |
|o4 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i5 : netList I_*                                                             |
|                                                                             |
|     +---------------------------+                                           |
|o5 = |x y  + x y  - x y  - x y   |                                           |
|     | 1 0    3 0    0 1    0 3  |                                           |
|     +---------------------------+                                           |
|     |- x y  + x y  + x y  - x y |                                           |
|     |   1 0    0 1    2 1    1 2|                                           |
|     +---------------------------+                                           |
|     |- x y  + x y  + x y  - x y |                                           |
|     |   2 1    1 2    3 2    2 3|                                           |
|     +---------------------------+                                           |
|     |- x y  - x y  + x y  + x y |                                           |
|     |   3 0    3 2    0 3    2 3|                                           |
|     +---------------------------+                                           |
|     | 2    2                    |                                           |
|     |x  + y  - 1                |                                           |
|     | 0    0                    |                                           |
|     +---------------------------+                                           |
|     | 2    2                    |                                           |
|     |x  + y  - 1                |                                           |
|     | 1    1                    |                                           |
|     +---------------------------+                                           |
|     | 2    2                    |                                           |
|     |x  + y  - 1                |                                           |
|     | 2    2                    |                                           |
|     +---------------------------+                                           |
|     | 2    2                    |                                           |
|     |x  + y  - 1                |                                           |
|     | 3    3                    |                                           |
|     +---------------------------+                                           |
+-----------------------------------------------------------------------------+

We can find approximations to the 26 complex solutions to this system. If the
system has positive dimension (not the case here), the idea is that this set of
points should contain at least one on each component.

+-----------------------------------------------------------------------------+
|i6 : solveSystem I_*                                                         |
|                                                                             |
|o6 = {{-1.00025+.004054*ii, 1.00025-.004054*ii, -1.00025+.004054*ii,         |
|     ------------------------------------------------------------------------|
|     1.00025-.004054*ii, -.061785-.0656272*ii, .061785+.0656272*ii,          |
|     ------------------------------------------------------------------------|
|     -.061785-.0656272*ii, .061785+.0656272*ii}, {1.00025-.004054*ii,        |
|     ------------------------------------------------------------------------|
|     -1.00025+.004054*ii, 1.00025-.004054*ii, -1.00025+.004054*ii,           |
|     ------------------------------------------------------------------------|
|     .061785+.0656272*ii, -.061785-.0656272*ii, .061785+.0656272*ii,         |
|     ------------------------------------------------------------------------|
|     -.061785-.0656272*ii}, {-.995205+.002210*ii, -.995205+.002210*ii,       |
|     ------------------------------------------------------------------------|
|     -.995205+.002210*ii, -.995205+.002210*ii, -.100263-.0219404*ii,         |
|     ------------------------------------------------------------------------|
|     -.100263-.0219404*ii, -.100263-.0219404*ii, -.100263-.0219404*ii},      |
|     ------------------------------------------------------------------------|
|     {-1.00025+.004054*ii, -1.00025+.004054*ii, -1.00025+.004054*ii,         |
|     ------------------------------------------------------------------------|
|     -1.00025+.004054*ii, .061785+.0656272*ii, .061785+.0656272*ii,          |
|     ------------------------------------------------------------------------|
|     .061785+.0656272*ii, .061785+.0656272*ii}, {.995205-.002210*ii,         |
|     ------------------------------------------------------------------------|
|     -.995205+.002210*ii, .995205-.002210*ii, -.995205+.002210*ii,           |
|     ------------------------------------------------------------------------|
|     -.100263-.0219404*ii, .100263+.0219404*ii, -.100263-.0219404*ii,        |
|     ------------------------------------------------------------------------|
|     .100263+.0219404*ii}, {-.995205+.002210*ii, .995205-.002210*ii,         |
|     ------------------------------------------------------------------------|
|     -.995205+.002210*ii, .995205-.002210*ii, .100263+.0219404*ii,           |
|     ------------------------------------------------------------------------|
|     -.100263-.0219404*ii, .100263+.0219404*ii, -.100263-.0219404*ii},       |
|     ------------------------------------------------------------------------|
|     {1.00025-.004054*ii, 1.00025-.004054*ii, 1.00025-.004054*ii,            |
|     ------------------------------------------------------------------------|
|     1.00025-.004054*ii, -.061785-.0656272*ii, -.061785-.0656272*ii,         |
|     ------------------------------------------------------------------------|
|     -.061785-.0656272*ii, -.061785-.0656272*ii}, {.995205-.002210*ii,       |
|     ------------------------------------------------------------------------|
|     .995205-.002210*ii, .995205-.002210*ii, .995205-.002210*ii,             |
|     ------------------------------------------------------------------------|
|     .100263+.0219404*ii, .100263+.0219404*ii, .100263+.0219404*ii,          |
|     ------------------------------------------------------------------------|
|     .100263+.0219404*ii}, (-1, -1, 1, -1, 7.84064e-15-1.71722e-14*ii,       |
|     ------------------------------------------------------------------------|
|     3.85667e-14-3.78602e-14*ii, -7.84048e-15+1.71724e-14*ii,                |
|     ------------------------------------------------------------------------|
|     -2.28864e-14+3.51338e-15*ii), (1, -1, -1, -1,                           |
|     ------------------------------------------------------------------------|
|     7.84064e-15-1.71722e-14*ii, -3.85667e-14+3.78602e-14*ii,                |
|     ------------------------------------------------------------------------|
|     -7.84048e-15+1.71724e-14*ii, 2.28864e-14-3.51338e-15*ii), (1, -1, -1, 1,|
|     ------------------------------------------------------------------------|
|     -4.68375e-17-3.9465e-17*ii, -5.20417e-18+3.25261e-17*ii,                |
|     ------------------------------------------------------------------------|
|     4.85723e-17+2.47198e-17*ii, 6.93889e-18-3.20924e-17*ii), (-1, 1, 1, 1,  |
|     ------------------------------------------------------------------------|
|     -7.84064e-15+1.71722e-14*ii, 3.85667e-14-3.78602e-14*ii,                |
|     ------------------------------------------------------------------------|
|     7.84048e-15-1.71724e-14*ii, -2.28864e-14+3.51338e-15*ii), (1, 1, -1, 1, |
|     ------------------------------------------------------------------------|
|     -7.84064e-15+1.71722e-14*ii, -3.85667e-14+3.78602e-14*ii,               |
|     ------------------------------------------------------------------------|
|     7.84048e-15-1.71724e-14*ii, 2.28864e-14-3.51338e-15*ii),                |
|     ------------------------------------------------------------------------|
|     {3.71644e-12+3.4662e-12*ii, -1.41421, -3.71644e-12-3.46619e-12*ii,      |
|     ------------------------------------------------------------------------|
|     1.41421, -1, ii, 1, ii}, {1.41421, -3.45717e-12-2.97587e-12*ii,         |
|     ------------------------------------------------------------------------|
|     -1.41421, 3.45716e-12+2.97588e-12*ii, ii, -1, ii, 1},                   |
|     ------------------------------------------------------------------------|
|     {-3.70022e-12-1.95114e-12*ii, 1.41421, 3.70021e-12+1.95114e-12*ii,      |
|     ------------------------------------------------------------------------|
|     -1.41421, 1, ii, -1, ii}, {1.41421, -6.55996e-15+6.21345e-15*ii,        |
|     ------------------------------------------------------------------------|
|     -1.41421, 6.57726e-15-6.23722e-15*ii, -ii, 1, -ii, -1},                 |
|     ------------------------------------------------------------------------|
|     {4.56393e-12+6.1311e-14*ii, -1.41421, -4.56392e-12-6.1307e-14*ii,       |
|     ------------------------------------------------------------------------|
|     1.41421, 1, -ii, -1, -ii}, {-1.41421, -3.45717e-12-2.97587e-12*ii,      |
|     ------------------------------------------------------------------------|
|     1.41421, 3.45716e-12+2.97588e-12*ii, ii, 1, ii, -1},                    |
|     ------------------------------------------------------------------------|
|     {4.56393e-12+6.1311e-14*ii, 1.41421, -4.56392e-12-6.1307e-14*ii,        |
|     ------------------------------------------------------------------------|
|     -1.41421, -1, -ii, 1, -ii}, {-1.41421, -6.59532e-14+3.07928e-14*ii,     |
|     ------------------------------------------------------------------------|
|     1.41421, 6.59618e-14-3.07955e-14*ii, -ii, -1, -ii, 1}, (1, -1, 1, 1,    |
|     ------------------------------------------------------------------------|
|     1.72395e-14+6.60333e-15*ii, -1.72394e-14-6.60244e-15*ii,                |
|     ------------------------------------------------------------------------|
|     1.72394e-14+6.60328e-15*ii, 1.72394e-14+6.60238e-15*ii), (1, -1, -1, -1,|
|     ------------------------------------------------------------------------|
|     1.69026e-13-1.08811e-13*ii, 5.13639e-13+1.19811e-12*ii,                 |
|     ------------------------------------------------------------------------|
|     -1.69026e-13+1.08811e-13*ii, -8.5169e-13-9.8049e-13*ii), (-1, 1, -1, -1,|
|     ------------------------------------------------------------------------|
|     -3.29597e-17+1.12757e-17*ii, -1.18307e-12+1.29023e-12*ii,               |
|     ------------------------------------------------------------------------|
|     2.42861e-17+4.33681e-18*ii, -1.18306e-12+1.29025e-12*ii), (-1, -1, -1,  |
|     ------------------------------------------------------------------------|
|     1, 3.29597e-17-1.12757e-17*ii, -1.18307e-12+1.29023e-12*ii,             |
|     ------------------------------------------------------------------------|
|     -2.42861e-17-4.33681e-18*ii, -1.18306e-12+1.29025e-12*ii), (-1, -1, 1,  |
|     ------------------------------------------------------------------------|
|     -1, 1.69026e-13-1.08811e-13*ii, -5.13639e-13-1.19811e-12*ii,            |
|     ------------------------------------------------------------------------|
|     -1.69026e-13+1.08811e-13*ii, 8.5169e-13+9.8049e-13*ii), (1, 1, 1, -1,   |
|     ------------------------------------------------------------------------|
|     -2.59402e-14-1.5953e-14*ii, -2.59404e-14-1.59528e-14*ii,                |
|     ------------------------------------------------------------------------|
|     -2.59406e-14-1.59512e-14*ii, 2.59413e-14+1.59531e-14*ii), (-1, -1, 1,   |
|     ------------------------------------------------------------------------|
|     -1, 6.9225e-14+4.45386e-14*ii, 6.9225e-14+4.45384e-14*ii,               |
|     ------------------------------------------------------------------------|
|     -6.9225e-14-4.45386e-14*ii, 6.9225e-14+4.45388e-14*ii), (1, -1, 1, 1,   |
|     ------------------------------------------------------------------------|
|     -4.33681e-18+1.92988e-17*ii, 4.33681e-18-1.9082e-17*ii,                 |
|     ------------------------------------------------------------------------|
|     -4.33681e-18+1.17094e-17*ii, -3.46945e-18+2.60209e-17*ii), (-1, -1, -1, |
|     ------------------------------------------------------------------------|
|     1, 3.40843e-14+2.05439e-14*ii, 3.40895e-14+2.05435e-14*ii,              |
|     ------------------------------------------------------------------------|
|     3.40877e-14+2.05436e-14*ii, -3.40899e-14-2.05467e-14*ii), (1, 1, -1, 1, |
|     ------------------------------------------------------------------------|
|     -1.69026e-13+1.08811e-13*ii, 5.13639e-13+1.19811e-12*ii,                |
|     ------------------------------------------------------------------------|
|     1.69026e-13-1.08811e-13*ii, -8.5169e-13-9.8049e-13*ii), (1, -1, 1, 1,   |
|     ------------------------------------------------------------------------|
|     3.29597e-17-1.12757e-17*ii, 1.18307e-12-1.29023e-12*ii,                 |
|     ------------------------------------------------------------------------|
|     -2.42861e-17-4.33681e-18*ii, 1.18306e-12-1.29025e-12*ii), (-1, 1, 1, 1, |
|     ------------------------------------------------------------------------|
|     -1.69026e-13+1.08811e-13*ii, -5.13639e-13-1.19811e-12*ii,               |
|     ------------------------------------------------------------------------|
|     1.69026e-13-1.08811e-13*ii, 8.5169e-13+9.8049e-13*ii), (1, 1, 1, -1,    |
|     ------------------------------------------------------------------------|
|     -3.29597e-17+1.12757e-17*ii, 1.18307e-12-1.29023e-12*ii,                |
|     ------------------------------------------------------------------------|
|     2.42861e-17+4.33681e-18*ii, 1.18306e-12-1.29025e-12*ii), (-1, 1, -1, -1,|
|     ------------------------------------------------------------------------|
|     -6.9408e-14-4.44588e-14*ii, 6.9415e-14+4.44729e-14*ii,                  |
|     ------------------------------------------------------------------------|
|     -6.9408e-14-4.4474e-14*ii, -6.9415e-14-4.4466e-14*ii), (-1, -1, -1, 1,  |
|     ------------------------------------------------------------------------|
|     -6.92484e-14-4.45199e-14*ii, -6.92493e-14-4.45193e-14*ii,               |
|     ------------------------------------------------------------------------|
|     -6.92476e-14-4.45197e-14*ii, 6.92493e-14+4.45267e-14*ii),               |
|     ------------------------------------------------------------------------|
|     {-4.56393e-12-6.1311e-14*ii, 1.41421, 4.56392e-12+6.1307e-14*ii,        |
|     ------------------------------------------------------------------------|
|     -1.41421, -1, ii, 1, ii}, {-1.41421, 6.55996e-15-6.21345e-15*ii,        |
|     ------------------------------------------------------------------------|
|     1.41421, -6.57726e-15+6.23722e-15*ii, ii, -1, ii, 1},                   |
|     ------------------------------------------------------------------------|
|     {-4.56393e-12-6.1311e-14*ii, -1.41421, 4.56392e-12+6.1307e-14*ii,       |
|     ------------------------------------------------------------------------|
|     1.41421, 1, ii, -1, ii}, {-1.41421, 3.45717e-12+2.97587e-12*ii, 1.41421,|
|     ------------------------------------------------------------------------|
|     -3.45716e-12-2.97588e-12*ii, -ii, 1, -ii, -1},                          |
|     ------------------------------------------------------------------------|
|     {-3.71644e-12-3.4662e-12*ii, 1.41421, 3.71644e-12+3.46619e-12*ii,       |
|     ------------------------------------------------------------------------|
|     -1.41421, 1, -ii, -1, -ii}, {-3.71644e-12-3.4662e-12*ii, -1.41421,      |
|     ------------------------------------------------------------------------|
|     3.71644e-12+3.46619e-12*ii, 1.41421, -1, -ii, 1, -ii}, {1.41421,        |
|     ------------------------------------------------------------------------|
|     6.59532e-14-3.07928e-14*ii, -1.41421, -6.59618e-14+3.07955e-14*ii, ii,  |
|     ------------------------------------------------------------------------|
|     1, ii, -1}, {1.41421, 3.45717e-12+2.97587e-12*ii, -1.41421,             |
|     ------------------------------------------------------------------------|
|     -3.45716e-12-2.97588e-12*ii, -ii, -1, -ii, 1}, (-1, 1, 1, 1,            |
|     ------------------------------------------------------------------------|
|     -6.9225e-14-4.45386e-14*ii, 6.9225e-14+4.45384e-14*ii,                  |
|     ------------------------------------------------------------------------|
|     6.9225e-14+4.45386e-14*ii, 6.9225e-14+4.45388e-14*ii)}                  |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+
|i7 : #oo                                                                     |
|                                                                             |
|o7 = 45                                                                      |
+-----------------------------------------------------------------------------+

We can find approximations to the 6 real solutions to this system.

+-----------------------------------------------------------------------------+
|i8 : findRealSolutions I                                                     |
|warning: some solutions are not regular: {11, 16, 17, 18, 19, 20, 21, 26, 27,|
|                                                                             |
|o8 = {{1, -1, -1, 1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0, 0, 0}, {1, -1, -1,   |
|     ------------------------------------------------------------------------|
|     -1, 0, 0, 0, 0}, {1, -1, -1, -1, 0, 0, 0, 0}, {1, 1, -1, 1, 0, 0, 0, 0},|
|     ------------------------------------------------------------------------|
|     {-1, -1, 1, -1, 0, 0, 0, 0}, {-1, 1, 1, 1, 0, 0, 0, 0}, {1, 1, -1, -1,  |
|     ------------------------------------------------------------------------|
|     0, 0, 0, 0}, {1, -1, -1, -1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0, 0, 0},  |
|     ------------------------------------------------------------------------|
|     {-1, 1, 1, 1, 0, 0, 0, 0}, {-1, -1, 1, -1, 0, 0, 0, 0}, {-1, 1, 1, 1, 0,|
|     ------------------------------------------------------------------------|
|     0, 0, 0}, {1, -1, -1, -1, 0, 0, 0, 0}, {1, 1, -1, 1, 0, 0, 0, 0}, {1, 1,|
|     ------------------------------------------------------------------------|
|     -1, 1, 0, 0, 0, 0}, {-1, 1, 1, 1, 0, 0, 0, 0}}                          |
|                                                                             |
|o8 : List                                                                    |
|-----------------------------------------------------------------------------|
|28, 29, 34, 35, 36, 37, 38, 39}                                              |
+-----------------------------------------------------------------------------+
|i9 : #oo                                                                     |
|                                                                             |
|o9 = 17                                                                      |
+-----------------------------------------------------------------------------+

The angles of these solutions (in degrees, not radians, and the 3 refers to the
number of oscillators).

+-----------------------------------------------------------------------------+
|i10 : netList getAngles(3, findRealSolutions I, Radians=>false)              |
|warning: some solutions are not regular: {11, 12, 13, 14, 15, 16, 17, 24, 25,|
|                                                                             |
|      +---+---+---+                                                          |
|o10 = |225|180|0  |                                                          |
|      +---+---+---+                                                          |
|      |315|180|180|                                                          |
|      +---+---+---+                                                          |
|      |135|180|0  |                                                          |
|      +---+---+---+                                                          |
|      |135|0  |0  |                                                          |
|      +---+---+---+                                                          |
|      |45 |0  |180|                                                          |
|      +---+---+---+                                                          |
|      |225|180|0  |                                                          |
|      +---+---+---+                                                          |
|      |315|180|180|                                                          |
|      +---+---+---+                                                          |
|      |315|180|180|                                                          |
|      +---+---+---+                                                          |
|      |225|0  |180|                                                          |
|      +---+---+---+                                                          |
|      |135|180|180|                                                          |
|      +---+---+---+                                                          |
|      |225|180|0  |                                                          |
|      +---+---+---+                                                          |
|      |315|180|180|                                                          |
|      +---+---+---+                                                          |
|      |225|0  |180|                                                          |
|      +---+---+---+                                                          |
|      |315|0  |0  |                                                          |
|      +---+---+---+                                                          |
|      |225|180|0  |                                                          |
|      +---+---+---+                                                          |
|      |45 |0  |180|                                                          |
|      +---+---+---+                                                          |
|      |135|0  |0  |                                                          |
|      +---+---+---+                                                          |
|      |45 |180|0  |                                                          |
|      +---+---+---+                                                          |
|      |135|180|180|                                                          |
|      +---+---+---+                                                          |
|      |45 |0  |180|                                                          |
|      +---+---+---+                                                          |
|      |45 |180|0  |                                                          |
|      +---+---+---+                                                          |
|      |135|0  |0  |                                                          |
|      +---+---+---+                                                          |
|      |315|0  |0  |                                                          |
|      +---+---+---+                                                          |
|      |225|0  |180|                                                          |
|      +---+---+---+                                                          |
|      |45 |0  |180|                                                          |
|      +---+---+---+                                                          |
|      |135|0  |0  |                                                          |
|      +---+---+---+                                                          |
|-----------------------------------------------------------------------------|
|26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 47, 48}          |
+-----------------------------------------------------------------------------+

See also
========

  * oscRing -- create a polynomial ring for a given graph or
    number of oscillators
  * oscJacobian -- create the Jacobian for the oscillator
    system associated to a graph
  * findRealSolutions -- find real solutions, at
    least one per component for well-conditioned systems
  * getAngles -- Compute angles from a list of solutions
  * solveSystem (NumericalAlgebraicGeometry), --
    solve a system of polynomial equations

Ways to use oscSystem:
======================

  * "oscSystem(Graph)"
  * "oscSystem(Graph,Ring)"

For the programmer
==================

The object oscSystem, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:263:0.

SCT graphs with exotic solutions -- finding graphs of small size with exotic solutions
**************************************************************************************

We first construct the ideal $I_G$ for a specific graph $G$ on 5 vertices. We
use the 5-cycle as the specific example.

+-----------------------------------------------------------------------------+
|i1 : needsPackage "Oscillators"                                              |
|                                                                             |
|o1 = Oscillators                                                             |
|                                                                             |
|o1 : Package                                                                 |
+-----------------------------------------------------------------------------+
|i2 : needsPackage "NautyGraphs"                                              |
|                                                                             |
|o2 = NautyGraphs                                                             |
|                                                                             |
|o2 : Package                                                                 |
+-----------------------------------------------------------------------------+
|i3 : Gstrs = generateGraphs(5, OnlyConnected => true, MinDegree => 2);       |
+-----------------------------------------------------------------------------+
|i4 : Gs = Gstrs/stringToGraph                                                |
|                                                                             |
|o4 = {Graph{0 => {3, 4}   }, Graph{0 => {3, 4}      }, Graph{0 => {2, 4}     |
|            1 => {3, 4}            1 => {3, 4}               1 => {3, 4}     |
|            2 => {3, 4}            2 => {3, 4}               2 => {0, 4}     |
|            3 => {0, 1, 2}         3 => {0, 1, 2, 4}         3 => {1, 4}     |
|            4 => {0, 1, 2}         4 => {3, 0, 1, 2}         4 => {2, 0, 3,  |
|     ------------------------------------------------------------------------|
|       }, Graph{0 => {2, 3}}, Graph{0 => {2, 3, 4}}, Graph{0 => {2, 3, 4}    |
|                1 => {3, 4}         1 => {3, 4}            1 => {3, 4}       |
|                2 => {0, 4}         2 => {0, 4}            2 => {0, 4}       |
|                3 => {0, 1}         3 => {0, 1}            3 => {0, 1, 4}    |
|     1}         4 => {2, 1}         4 => {2, 0, 1}         4 => {2, 0, 3,    |
|     ------------------------------------------------------------------------|
|       }, Graph{0 => {2, 3, 4}   }, Graph{0 => {2, 3, 4}}, Graph{0 => {2, 3, |
|                1 => {3, 4}               1 => {2, 3, 4}         1 => {2, 3, |
|                2 => {0, 3, 4}            2 => {0, 1, 4}         2 => {0, 1, |
|                3 => {2, 0, 1, 4}         3 => {0, 1}            3 => {0, 1, |
|     1}         4 => {2, 0, 3, 1}         4 => {2, 0, 1}         4 => {2, 0, |
|     ------------------------------------------------------------------------|
|     4}   }, Graph{0 => {2, 3, 4}   }, Graph{0 => {1, 2, 3, 4}}}             |
|     4}            1 => {2, 3, 4}            1 => {0, 2, 3, 4}               |
|     4}            2 => {0, 1, 3, 4}         2 => {1, 0, 3, 4}               |
|     4}            3 => {2, 0, 1, 4}         3 => {1, 0, 2, 4}               |
|     1, 3}         4 => {2, 0, 1, 3}         4 => {1, 0, 2, 3}               |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : printingPrecision = 3                                                   |
|                                                                             |
|o5 = 3                                                                       |
+-----------------------------------------------------------------------------+
|i6 : for G in Gs list showExoticSolutions G;                                 |
|warning: some solutions are not regular: {35, 39, 40, 41, 44, 45, 47, 49, 50,|
| -- .555s elapsed                                                            |
|warning: some solutions are not regular: {48, 49, 50, 51, 52, 53, 54, 56, 57,|
| -- .538s elapsed                                                            |
| -- .633s elapsed                                                            |
| -- 1s elapsed                                                               |
|-- found extra exotic solutions for graph Graph{0 => {2, 3}} --              |
|                                                1 => {3, 4}                  |
|                                                2 => {0, 4}                  |
|                                                3 => {0, 1}                  |
|                                                4 => {2, 1}                  |
|+-----+----+----+-----+-----+-----+-----+-----+                              |
||-.809|.309|.309|-.809|-.588|.951 |-.951|.588 |                              |
|+-----+----+----+-----+-----+-----+-----+-----+                              |
||1    |1   |1   |1    |0    |0    |0    |0    |                              |
|+-----+----+----+-----+-----+-----+-----+-----+                              |
||-.809|.309|.309|-.809|.588 |-.951|.951 |-.588|                              |
|+-----+----+----+-----+-----+-----+-----+-----+                              |
|-- angles (in degrees), first angle is zero and omitted --                   |
|+---+---+---+---+                                                            |
||216|72 |288|144|                                                            |
|+---+---+---+---+                                                            |
||0  |0  |0  |0  |                                                            |
|+---+---+---+---+                                                            |
||144|288|72 |216|                                                            |
|+---+---+---+---+                                                            |
| -- 1.07s elapsed                                                            |
| -- 1.15s elapsed                                                            |
|warning: some solutions are not regular: {28, 29, 31, 32, 33, 34, 36, 43, 45,|
| -- 1.25s elapsed                                                            |
|warning: some solutions are not regular: {17, 18, 19, 20, 21, 22, 23, 24, 25,|
| -- 1s elapsed                                                               |
| -- 1.24s elapsed                                                            |
|warning: some solutions are not regular: {23, 25, 27, 32}                    |
| -- 1.24s elapsed                                                            |
|warning: some solutions are not regular: {37, 40, 42, 51, 55, 63, 65, 66, 68,|
| -- 1.31s elapsed                                                            |
|-----------------------------------------------------------------------------|
|52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 70, 71, 72, 73, 74,  |
|                                                                             |
|58, 62, 63, 64, 65, 66, 67, 73, 74, 75, 76, 79, 80, 82, 85, 86, 89, 91, 92,  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|46, 48, 49, 51, 52}                                                          |
|                                                                             |
|26, 27, 28, 29, 30, 31, 32, 33, 34}                                          |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|69, 72, 74}                                                                  |
|-----------------------------------------------------------------------------|
|75, 76, 77, 79, 83, 84, 85, 86, 88, 89, 90}                                  |
|                                                                             |
|93, 94, 96, 97, 98, 99, 100}                                                 |
+-----------------------------------------------------------------------------+
-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:812:0.

showExoticSolutions -- Display exotic solutions: linearly stable solutions which are not all-in-phase solution
**************************************************************************************************************

  * Usage:
        showExoticSolutions G
        getExoticSolutions G
  * Inputs:
      * G, a graph (Graphs), An undirected, connected graph
  * Outputs:
      * a list (Macaulay2Doc), A list of all of the linearly stable
        solutions for the Kuramoto oscillator system associated to the graph
  * Consequences:
      * The list of exotic solutions is displayed, together with the angles of
        the oscillators (where the first angle is always zero, and not
        displayed)

Description
===========

This function first calls getLinearlyStableSolutions,
and then displays any exotic solutions that exist.
A stable solution is exotic if it is not the all-in-phase solution (all the
angles are the same), and returns all of the stable solutions found.

Note: The methods getExoticSolutions and showExoticSolutions are the same, for
historical reasons.

The warning that there are non-regular solutions generally means that it has
come across a positive dimensional solution set while looking for solutions.
No such solutions can be linearly stable, so the warning is generally not
relevant.

+-----------------------------------------------------------------------------+
|i1 : G = graph {{0,1},{1,2},{2,3},{3,4},{4,0}}                               |
|                                                                             |
|o1 = Graph{0 => {1, 4}}                                                      |
|           1 => {0, 2}                                                       |
|           2 => {1, 3}                                                       |
|           3 => {2, 4}                                                       |
|           4 => {0, 3}                                                       |
|                                                                             |
|o1 : Graph                                                                   |
+-----------------------------------------------------------------------------+
|i2 : showExoticSolutions G                                                   |
| -- .778879s elapsed                                                         |
|-- found extra exotic solutions for graph Graph{0 => {1, 4}} --              |
|                                                1 => {0, 2}                  |
|                                                2 => {1, 3}                  |
|                                                3 => {2, 4}                  |
|                                                4 => {0, 3}                  |
|+-------+--------+--------+-------+--------+--------+--------+--------+      |
||.309017|-.809017|-.809017|.309017|.951057 |.587785 |-.587785|-.951057|      |
|+-------+--------+--------+-------+--------+--------+--------+--------+      |
||1      |1       |1       |1      |0       |0       |0       |0       |      |
|+-------+--------+--------+-------+--------+--------+--------+--------+      |
||.309017|-.809017|-.809017|.309017|-.951057|-.587785|.587785 |.951057 |      |
|+-------+--------+--------+-------+--------+--------+--------+--------+      |
|-- angles (in degrees), first angle is zero and omitted --                   |
|+---+---+---+---+                                                            |
||72 |144|216|288|                                                            |
|+---+---+---+---+                                                            |
||0  |0  |0  |0  |                                                            |
|+---+---+---+---+                                                            |
||288|216|144|72 |                                                            |
|+---+---+---+---+                                                            |
|                                                                             |
|o2 = {{.309017, -.809017, -.809017, .309017, .951057, .587785, -.587785,     |
|     ------------------------------------------------------------------------|
|     -.951057}, {1, 1, 1, 1, 0, 0, 0, 0}, {.309017, -.809017, -.809017,      |
|     ------------------------------------------------------------------------|
|     .309017, -.951057, -.587785, .587785, .951057}}                         |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

Note that if there are exotic solutions, all linearly stable solutions are
displayed, and if there are no exotic solutions, nothing is displayed (other
than possibly warnings and timings).

+----------------------------------------------------+
|i3 : G = graph {{0,1},{1,2},{2,3},{3,4},{4,2},{4,0}}|
|                                                    |
|o3 = Graph{0 => {1, 4}   }                          |
|           1 => {0, 2}                              |
|           2 => {1, 3, 4}                           |
|           3 => {2, 4}                              |
|           4 => {0, 2, 3}                           |
|                                                    |
|o3 : Graph                                          |
+----------------------------------------------------+
|i4 : showExoticSolutions G                          |
| -- .947158s elapsed                                |
|                                                    |
|o4 = {{1, 1, 1, 1, 0, 0, 0, 0}}                     |
|                                                    |
|o4 : List                                           |
+----------------------------------------------------+

See also
========

  * getLinearlyStableSolutions -- Compute
    linearly stable solutions for the Kuramoto oscillator system associated to
    a graph
  * findRealSolutions -- find real solutions, at
    least one per component for well-conditioned systems
  * identifyStability -- Identify the stability of a
    list of eigenvalues, or of potential solutions to the oscillator system

Ways to use showExoticSolutions:
================================

  * "showExoticSolutions(Graph)"

For the programmer
==================

The object showExoticSolutions, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:612:0.

standardSols -- find the "standard solutions" for the oscillator system associated to a graph
*********************************************************************************************

  * Usage:
        standardSols(G,R)
        standardSols(G)
  * Inputs:
      * G, a graph (Graphs), an undirected, connected graph $G$
      * R, a ring (Macaulay2Doc), created with oscRing,
  * Optional inputs (Macaulay2Doc),:
      * Reduced => a Boolean value (Macaulay2Doc), default value
        false, if true, then the angles are reduced to the first angle being 0.
        That is, the number of oscillators will be one less than the number of
        vertices of $G$
  * Outputs:
      * an ideal (Macaulay2Doc), a list of the "standard
        solutions" that you get where all the angles are the same. This is the
        same as a certain Segre variety.

Description
===========

The oscillator ideal associated to a graph constructed by oscQuadrics,
always contains the "standard solutions" as a minimal prime. These
standard solutions are the Segre variety $\mathbb{P}^1\times \mathbb{P}^{n-1}$,
where $n$ is the number of vertices of the graph. These are the solutions where
all the angles are the same.

+-----------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}});|
+-----------------------------------------------------+
|i2 : R = oscRing(G);                                 |
+-----------------------------------------------------+
|i3 : I = oscQuadrics(G, R);                          |
|                                                     |
|o3 : Ideal of R                                      |
+-----------------------------------------------------+
|i4 : any(decompose I, P -> P == standardSols(G, R))  |
|                                                     |
|o4 = true                                            |
+-----------------------------------------------------+

See also
========

  * oscRing -- create a polynomial ring for a given graph or
    number of oscillators
  * oscSystem -- the ideal of the reduced equilibrium points
    of a dynamical system of oscillators
  * oscJacobian -- create the Jacobian for the oscillator
    system associated to a graph

Ways to use standardSols:
=========================

  * "standardSols(Graph)"
  * "standardSols(Graph,Ring)"

For the programmer
==================

The object standardSols, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:444:0.

vertexSpanningPolynomial -- computes the vertex spanning polynomial
*******************************************************************

  * Usage:
        vertexSpanningPolynomial(G)
        vertexSpanningPolynomial(G, R)
  * Inputs:
      * G, a graph (Graphs), an undirected, connected graph $G$
      * R, a ring (Macaulay2Doc), created with oscRing,
  * Outputs:
      * a polynomial ring (Macaulay2Doc), the vertex
        spanning polynomial of the graph $G$ inside $R$.

Description
===========

Let $S$ be the set of all spanning trees of the graph $G$. For each spanning
tree $T$, let $d_i$ be the degree of $v_i$ in $T$. The vertex spanning
polynomial of a graph $G$ is defined as $\sum_{T\in S} \prod_{v_i \in T}
x_i^{d_i-1}$. The factorization of this polynomial is related to the number of
components of the oscillator ideal of the graph computed via oscQuadrics.

+-----------------------------------------------------+
|i1 : G = graph({0,1,2,3}, {{0,1},{1,2},{2,3},{0,3}});|
+-----------------------------------------------------+
|i2 : vertexSpanningPolynomial G                      |
|                                                     |
|o2 = x x  + x x  + x x  + x x                        |
|      0 1    1 2    0 3    2 3                       |
|                                                     |
|o2 : QQ[x ..x , y ..y ]                              |
|         0   3   0   3                               |
+-----------------------------------------------------+

See also
========

  * oscQuadrics -- find the homogeneous quadrics in the
    homogeneous Kuramoto ideal

Ways to use vertexSpanningPolynomial:
=====================================

  * "vertexSpanningPolynomial(Graph)"
  * "vertexSpanningPolynomial(Graph,Ring)"

For the programmer
==================

The object vertexSpanningPolynomial, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Oscillators/Documentation.m2:472:0.