//tetrahedron.sing // // Here, we compute those lines that are tangent to the 4 spheres // at the tetrahedron in the cube with a radius of r // There are 12 such lines, but the ideal factors into // 3 ideals, each symmetric to the other under the rotation // 1 -> 2 -> 3 -> 1 // // LIB "elim.lib"; option(redSB); ring R= (0,r), ( p(1),v(1),p(2),v(2),p(3),v(3) ),dp; ideal Irel = v(1),v(2),v(3) ; ideal I = 2*v(1)^2+2*v(2)^2+2*v(3)^2+v(1)^2*p(1)^2-r^2*v(1)^2-2*v(1)^2*p(1)+v(1)^2*p(2)^2 -2*v(1)^2*p(2)-r^2*v(2)^2+v(2)^2*p(1)^2-2*v(2)^2*p(1)-2*v(1)*v(2)+v(2)^2*p(2)^2 -2*v(2)^2*p(2)+v(1)^2*p(3)^2-2*v(1)^2*p(3)+v(2)^2*p(3)^2-2*v(2)^2*p(3)-r^2*v(3) ^2+v(3)^2*p(1)^2-2*v(3)^2*p(1)-2*v(1)*v(3)+v(3)^2*p(2)^2-2*v(3)^2*p(2)-2*v(2)*v (3)+v(3)^2*p(3)^2-2*v(3)^2*p(3) , 2*v(1)^2+2*v(2)^2+2*v(3)^2+v(1)^2*p(1)^2-r^2*v(1)^2-2*v(1)^2*p(1)+v(1)^2*p(2)^2 +2*v(1)^2*p(2)-r^2*v(2)^2+v(2)^2*p(1)^2-2*v(2)^2*p(1)+2*v(1)*v(2)+v(2)^2*p(2)^2 +2*v(2)^2*p(2)+v(1)^2*p(3)^2+2*v(1)^2*p(3)+v(2)^2*p(3)^2+2*v(2)^2*p(3)-r^2*v(3) ^2+v(3)^2*p(1)^2-2*v(3)^2*p(1)+2*v(1)*v(3)+v(3)^2*p(2)^2+2*v(3)^2*p(2)-2*v(2)*v (3)+v(3)^2*p(3)^2+2*v(3)^2*p(3) , 2*v(1)^2+2*v(2)^2+2*v(3)^2+v(1)^2*p(1)^2-r^2*v(1)^2+2*v(1)^2*p(1)+v(1)^2*p(2)^2 -2*v(1)^2*p(2)-r^2*v(2)^2+v(2)^2*p(1)^2+2*v(2)^2*p(1)+2*v(1)*v(2)+v(2)^2*p(2)^2 -2*v(2)^2*p(2)+v(1)^2*p(3)^2+2*v(1)^2*p(3)+v(2)^2*p(3)^2+2*v(2)^2*p(3)-r^2*v(3) ^2+v(3)^2*p(1)^2+2*v(3)^2*p(1)-2*v(1)*v(3)+v(3)^2*p(2)^2-2*v(3)^2*p(2)+2*v(2)*v (3)+v(3)^2*p(3)^2+2*v(3)^2*p(3) , 2*v(1)^2+2*v(2)^2+2*v(3)^2+v(1)^2*p(1)^2-r^2*v(1)^2+2*v(1)^2*p(1)+v(1)^2*p(2)^2 +2*v(1)^2*p(2)-r^2*v(2)^2+v(2)^2*p(1)^2+2*v(2)^2*p(1)-2*v(1)*v(2)+v(2)^2*p(2)^2 +2*v(2)^2*p(2)+v(1)^2*p(3)^2-2*v(1)^2*p(3)+v(2)^2*p(3)^2-2*v(2)^2*p(3)-r^2*v(3) ^2+v(3)^2*p(1)^2+2*v(3)^2*p(1)+2*v(1)*v(3)+v(3)^2*p(2)^2+2*v(3)^2*p(2)+2*v(2)*v (3)+v(3)^2*p(3)^2-2*v(3)^2*p(3) , v(1)*p(1)+v(2)*p(2)+v(3)*p(3) ; ideal G = std(sat(I,Irel)[1]); G; degree(G); facstd(G); print("/////////////////// Third Component ///////////////////////"); G = std(sat(G,ideal(p(1)))[1]); degree(G); G; print(""); print("We can easily factor this last component: Set X := (r^2 - 2)^(1/2)."); print("Then this last component is the four lines"); print(""); print(" ( X, 0, 0) + t ( 0, 1 + 2 (9 - 4r^2)^(1/2), 2X)"); print(" ( X, 0, 0) + t ( 0, 1 - 2 (9 - 4r^2)^(1/2), 2X)"); print(""); print(" (-X, 0, 0) + t ( 0, -1 + 2 (9 - 4r^2)^(1/2), 2X)"); print(" (-X, 0, 0) + t ( 0, -1 - 2 (9 - 4r^2)^(1/2), 2X)"); print(""); print("The point on each line closest to the origin is when t=0, so they"); print("all have distance r^2-2 from the origin."); print(""); print("This shows that the range sqrt(2) < r < 3/2 is necessary and sufficient"); print("for the 12 lines to be real."); print(""); quit;