/usr/share/singular/LIB/reszeta.lib is in singular-data 1:4.1.0-p3+ds-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 | ///////////////////////////////////////////////////////////////////////////
version="version reszeta.lib 4.0.0.0 Jun_2013 "; // $Id: 77d644aec9fd87b1912ae9cb5552f7122ec45f22 $
category="Algebraic Geometry";
info="
LIBRARY: reszeta.lib topological Zeta-function and
some other applications of desingularization
AUTHORS: A. Fruehbis-Krueger, anne@mathematik.uni-kl.de,
@* G. Pfister, pfister@mathematik.uni-kl.de
REFERENCES:
[1] Fruehbis-Krueger,A., Pfister,G.: Some Applications of Resolution of
@* Singularities from a Practical Point of View, in Computational
@* Commutative and Non-commutative Algebraic Geometry,
@* NATO Science Series III, Computer and Systems Sciences 196, 104-117 (2005)
[2] Fruehbis-Krueger: An Application of Resolution of Singularities:
@* Computing the topological Zeta-function of isolated surface singularities
@* in (C^3,0), in D.Cheniot, N.Dutertre et al.(Editors): Singularity Theory, @* World Scientific Publishing (2007)
PROCEDURES:
intersectionDiv(L) computes intersection form and genera of exceptional
divisors (isolated singularities of surfaces)
spectralNeg(L) computes negative spectral numbers
(isolated hypersurface singularity)
discrepancy(L) computes discrepancy of given resolution
zetaDL(L,d) computes Denef-Loeser zeta function
(hypersurface singularity of dimension 2)
collectDiv(L[,iv]) identify exceptional divisors in different charts
(embedded and non-embedded case)
prepEmbDiv(L[,b]) prepare list of divisors (including components
of strict transform, embedded case)
abstractR(L) pass from embedded to non-embedded resolution
computeV(re,DL) multiplicities of divisors in pullback of volume form
computeN(re,DL) multiplicities of divisors in total transform of resolution
";
LIB "resolve.lib";
LIB "solve.lib";
LIB "normal.lib";
///////////////////////////////////////////////////////////////////////////////
static proc spectral1(poly h,list re, list DL,intvec v, intvec n)
"Internal procedure - no help and no example available
"
{
//--- compute one spectral number
//--- DL is output of prepEmbDiv
int i;
intvec w=computeH(h,re,DL);
number gw=number(w[1]+v[1])/number(n[1]);
for(i=2;i<=size(v);i++)
{
if(gw>number(w[i]+v[i])/number(n[i]))
{
gw=number(w[i]+v[i])/number(n[i]);
}
}
return(gw-1);
}
///////////////////////////////////////////////////////////////////////////////
proc spectralNeg(list re,list #)
"USAGE: spectralNeg(L);
@* L = list of rings
ASSUME: L is output of resolution of singularities
RETURN: list of numbers, each a spectral number in (-1,0]
EXAMPLE: example spectralNeg; shows an example
"
{
//-----------------------------------------------------------------------------
// Initialization and Sanity Checks
//-----------------------------------------------------------------------------
int i,j,l;
number bound;
list resu;
if(size(#)>0)
{
//--- undocumented feature:
//--- if # is not empty it computes numbers up to this bound,
//--- not necessarily spectral numbers
bound=number(#[1]);
}
//--- get list of embedded divisors
list DL=prepEmbDiv(re,1);
int k=1;
ideal I,delI;
number g;
int m=nvars(basering);
//--- prepare the multiplicities of exceptional divisors N and nu
intvec v=computeV(re,DL); // nu
intvec n=computeN(re,DL); // N
//---------------------------------------------------------------------------
// start computation, first case separately, then loop
//---------------------------------------------------------------------------
resu[1]=spectral1(1,re,DL,v,n); // first number, corresponding to
// volume form itself
if(resu[1]>=bound)
{
//--- exceeds bound ==> not a spectral number
resu=delete(resu,1);
return(resu);
}
delI=std(ideal(0));
while(k)
{
//--- now run through all monomial x volume form, degree by degree
j++;
k=0;
I=maxideal(j);
I=reduce(I,delI);
for(i=1;i<=size(I);i++)
{
//--- all monomials in degree j
g=spectral1(I[i],re,DL,v,n);
if(g<bound)
{
//--- otherwise g exceeds bound ==> not a spectral number
k=1;
l=1;
while(resu[l]<g)
{
l++;
if(l==size(resu)+1){break;}
}
if(l==size(resu)+1){resu[size(resu)+1]=g;}
if(resu[l]!=g){resu=insert(resu,g,l-1);}
}
else
{
delI[size(delI)+1]=I[i];
}
}
attrib(delI,"isSB",1);
}
return(resu);
}
example
{"EXAMPLE:";
echo = 2;
ring R=0,(x,y,z),dp;
ideal I=x3+y4+z5;
list L=resolve(I,"K");
spectralNeg(L);
LIB"gmssing.lib";
ring r=0,(x,y,z),ds;
poly f=x3+y4+z5;
spectrum(f);
}
///////////////////////////////////////////////////////////////////////////////
static proc ordE(ideal J,ideal E,ideal W)
"Internal procedure - no help and no example available
"
{
//--- compute multiplicity of E in J -- embedded in W
int s;
if(size(J)==0){~;ERROR("ordE: J=0");}
ideal Estd=std(E+W);
ideal Epow=1;
ideal Jquot=1;
while(size(reduce(Jquot,Estd))!=0)
{
s++;
Epow=Epow*E;
Jquot=quotient(Epow+W,J);
}
return(s-1);
}
///////////////////////////////////////////////////////////////////////////////
proc computeV(list re, list DL)
"USAGE: computeV(L,DL);
L = list of rings
DL = divisor list
ASSUME: L has structure of output of resolve
DL has structure of output of prepEmbDiv
RETURN: intvec,
i-th entry is multiplicity of i-th divisor in
pullback of volume form
EXAMPLE: example computeV; shows an example
"
{
//--- computes for every divisor E_i its multiplicity + 1 in pi^*(w)
//--- w a non-vanishing 1-form
//--- note: DL is output of prepEmbDiv
//-----------------------------------------------------------------------------
// Initialization
//-----------------------------------------------------------------------------
def R=basering;
int i,j,k,n;
intvec v,w;
list iden=DL;
v[size(iden)]=0;
//----------------------------------------------------------------------------
// Run through all exceptional divisors
//----------------------------------------------------------------------------
for(k=1;k<=size(iden);k++)
{
for(i=1;i<=size(iden[k]);i++)
{
if(defined(S)){kill S;}
def S=re[2][iden[k][i][1]];
setring S;
if((!v[k])&&(defined(EList)))
{
if(defined(II)){kill II;}
//--- we might be embedded in a non-trivial BO[1]
//--- take this into account when forming the jacobi-determinant
ideal II=jacobDet(BO[5],BO[1]);
if(size(II)!=0)
{
v[k]=ordE(II,EList[iden[k][i][2]],BO[1])+1;
}
}
setring R;
}
}
return(v);
}
example
{"EXAMPLE:"; echo = 2;
ring R=0,(x,y,z),dp;
ideal I=(x-y)*(x-z)*(y-z)-z4;
list re=resolve(I,1);
list iden=prepEmbDiv(re);
intvec v=computeV(re, iden);
v;
}
///////////////////////////////////////////////////////////////////////////////
static proc jacobDet(ideal I, ideal J)
"Internal procedure - no help and no example available
"
{
//--- Returns the Jacobian determinant of the morphism
//--- K[x_1,...,x_m]--->K[y_1,...,y_n]/J defined by x_i ---> I_i.
//--- Let basering=K[y_1,...,y_n], l=n-dim(basering/J),
//--- I=<I_1,...,I_m>, J=<J_1,...,J_r>
//--- For each subset v in {1,...,n} of l elements and
//--- w in {1,...,r} of l elements
//--- let K_v,w be the ideal generated by the n-l-minors of the matrix
//--- (diff(I_i,y_j)+
//--- \sum_k diff(I_i,y_v[k])*diff(J_w[k],y_j))_{j not in v multiplied with
//--- the determinant of (diff(J_w[i],y_v[j]))
//--- the sum of all such ideals K_v,w plus J is returned.
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int n=nvars(basering);
int i,j,k;
intvec u,v,w,x;
matrix MI[ncols(I)][n]=jacob(I);
matrix N=unitmat(n);
matrix L;
ideal K=J;
if(size(J)==0)
{
K=minor(MI,n);
}
//---------------------------------------------------------------------------
// Do calculation as described above.
// separately for case size(J)=1
//---------------------------------------------------------------------------
if(size(J)==1)
{
matrix MJ[ncols(J)][n]=jacob(J);
N=concat(N,transpose(MJ));
v=1..n;
for(i=1;i<=n;i++)
{
L=transpose(permcol(N,i,n+1));
if(i==1){w=2..n;}
if(i==n){w=1..n-1;}
if((i!=1)&&(i!=n)){w=1..i-1,i+1..n;}
L=submat(L,v,w);
L=MI*L;
K=K+minor(L,n-1)*MJ[1,i];
}
}
if(size(J)>1)
{
matrix MJ[ncols(J)][n]=jacob(J);
matrix SMJ;
N=concat(N,transpose(MJ));
ideal Jstd=std(J);
int l=n-dim(Jstd);
int r=ncols(J);
list L1=indexSet(n,l);
list L2=indexSet(r,l);
for(i=1;i<=size(L1);i++)
{
for(j=1;j<=size(L2);j++)
{
for(k=1;k<=size(L1[i]);k++)
{
if(L1[i][k]){v[size(v)+1]=k;}
}
v=v[2..size(v)];
for(k=1;k<=size(L2[j]);k++)
{
if(L2[j][k]){w[size(w)+1]=k;}
}
w=w[2..size(w)];
SMJ=submat(MJ,w,v);
L=N;
for(k=1;k<=l;k++)
{
L=permcol(L,v[k],n+w[k]);
}
u=1..n;
x=1..n;
v=sort(v)[1];
for(k=l;k>=1;k--)
{
if(v[k])
{
u=deleteInt(u,v[k],1);
}
}
L=transpose(submat(L,u,x));
L=MI*L;
K=K+minor(L,n-l)*det(SMJ);
}
}
}
return(K);
}
///////////////////////////////////////////////////////////////////////////////
static proc computeH(ideal h,list re,list DL)
"Internal procedure - no help and no example available
"
{
//--- additional procedure to computeV, allows
//--- computation for polynomial x volume form
//--- by computing the contribution of the polynomial h
//--- Note: DL is output of prepEmbDiv
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
def R=basering;
ideal II=h;
list iden=DL;
def T=re[2][1];
setring T;
int i,k;
intvec v;
v[size(iden)]=0;
if(deg(II[1])==0){return(v);}
//----------------------------------------------------------------------------
// Run through all exceptional divisors
//----------------------------------------------------------------------------
for(k=1;k<=size(iden);k++)
{
for(i=1;i<=size(iden[k]);i++)
{
if(defined(S)){kill S;}
def S=re[2][iden[k][i][1]];
setring S;
if((!v[k])&&(defined(EList)))
{
if(defined(JJ)){kill JJ;}
if(defined(phi)){kill phi;}
map phi=T,BO[5];
ideal JJ=phi(II);
if(size(JJ)!=0)
{
v[k]=ordE(JJ,EList[iden[k][i][2]],BO[1]);
}
}
setring R;
}
}
return(v);
}
//////////////////////////////////////////////////////////////////////////////
proc computeN(list re,list DL)
"USAGE: computeN(L,DL);
L = list of rings
DL = divisor list
ASSUME: L has structure of output of resolve
DL has structure of output of prepEmbDiv
RETURN: intvec, i-th entry is multiplicity of i-th divisor
in total transform under resolution
EXAMPLE: example computeN;
"
{
//--- computes for every (Q-irred.) divisor E_i its multiplicity in f \circ pi
//--- DL is output of prepEmbDiv
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
def R=basering;
list iden=DL;
def T=re[2][1];
setring T;
ideal J=BO[2];
int i,k;
intvec v;
v[size(iden)]=0;
//----------------------------------------------------------------------------
// Run through all exceptional divisors
//----------------------------------------------------------------------------
for(k=1;k<=size(iden);k++)
{
for(i=1;i<=size(iden[k]);i++)
{
if(defined(S)){kill S;}
def S=re[2][iden[k][i][1]];
setring S;
if((!v[k])&&(defined(EList)))
{
if(defined(II)){kill II;}
if(defined(phi)){kill phi;}
map phi=T,BO[5];
ideal II=phi(J);
if(size(II)!=0)
{
v[k]=ordE(II,EList[iden[k][i][2]],BO[1]);
}
}
setring R;
}
}
return(v);
}
example
{"EXAMPLE:";
echo = 2;
ring R=0,(x,y,z),dp;
ideal I=(x-y)*(x-z)*(y-z)-z4;
list re=resolve(I,1);
list iden=prepEmbDiv(re);
intvec v=computeN(re,iden);
v;
}
//////////////////////////////////////////////////////////////////////////////
static proc countEijk(list re,list iden,intvec iv,list #)
"Internal procedure - no help and no example available
"
{
//--- count the number of points in the intersection of 3 exceptional
//--- hyperplanes (of dimension 2) - one of them is allowed to be a component
//--- of the strict transform
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,comPa,numPts,localCase;
intvec ituple,jtuple,ktuple;
list chList,tmpList;
def R=basering;
if(size(#)>0)
{
if(string(#[1])=="local")
{
localCase=1;
}
}
//----------------------------------------------------------------------------
// Find common charts
//----------------------------------------------------------------------------
for(i=1;i<=size(iden[iv[1]]);i++)
{
//--- find common charts - only for final charts
if(defined(S)) {kill S;}
def S=re[2][iden[iv[1]][i][1]];
setring S;
if(!defined(EList))
{
i++;
setring R;
continue;
}
setring R;
kill ituple,jtuple,ktuple;
intvec ituple=iden[iv[1]][i];
intvec jtuple=findInIVList(1,ituple[1],iden[iv[2]]);
intvec ktuple=findInIVList(1,ituple[1],iden[iv[3]]);
if((size(jtuple)!=1)&&(size(ktuple)!=1))
{
//--- chList contains all information about the common charts,
//--- each entry represents a chart and contains three intvecs from iden
//--- one for each E_l
kill tmpList;
list tmpList=ituple,jtuple,ktuple;
chList[size(chList)+1]=tmpList;
i++;
if(i<=size(iden[iv[1]]))
{
continue;
}
else
{
break;
}
}
}
if(size(chList)==0)
{
//--- no common chart !!!
return(int(0));
}
//----------------------------------------------------------------------------
// Count points in common charts
//----------------------------------------------------------------------------
for(i=1;i<=size(chList);i++)
{
//--- run through all common charts
if(defined(S)) { kill S;}
def S=re[2][chList[i][1][1]];
setring S;
//--- intersection in this chart
if(defined(interId)){kill interId;}
if(localCase==1)
{
//--- in this case we need to intersect with \pi^-1(0)
ideal interId=EList[chList[i][1][2]]+EList[chList[i][2][2]]
+EList[chList[i][3][2]]+BO[5];
}
else
{
ideal interId=EList[chList[i][1][2]]+EList[chList[i][2][2]]
+EList[chList[i][3][2]];
}
interId=std(interId);
if(defined(otherId)) {kill otherId;}
ideal otherId=1;
for(j=1;j<i;j++)
{
//--- run through the previously computed ones
if(defined(opath)){kill opath;}
def opath=imap(re[2][chList[j][1][1]],path);
comPa=1;
while(opath[1,comPa]==path[1,comPa])
{
comPa++;
if((comPa>ncols(path))||(comPa>ncols(opath))) break;
}
comPa=int(leadcoef(path[1,comPa-1]));
otherId=otherId+interId;
otherId=intersect(otherId,
fetchInTree(re,chList[j][1][1],
comPa,chList[i][1][1],"interId",iden));
}
otherId=std(otherId);
//--- do not count each point more than once
interId=sat(interId,otherId)[1];
export(interId);
if(dim(interId)>0)
{
ERROR("CountEijk: intersection not zerodimensional");
}
//--- add the remaining number of points to the total point count numPts
numPts=numPts+vdim(interId);
}
return(numPts);
}
//////////////////////////////////////////////////////////////////////////////
static proc chiEij(list re, list iden, intvec iv)
"Internal procedure - no help and no example available
"
{
//!!! Copy of chiEij_local adjusted for non-local case
//!!! changes must be made in both copies
//--- compute the Euler characteristic of the intersection
//--- curve of two exceptional hypersurfaces (of dimension 2)
//--- one of which is allowed to be a component of the strict transform
//--- using the formula chi(Eij)=2-2g(Eij)
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,chi,g;
intvec ituple,jtuple,inters;
def R=basering;
//----------------------------------------------------------------------------
// Find a common chart in which they intersect
//----------------------------------------------------------------------------
for(i=1;i<=size(iden[iv[1]]);i++)
{
//--- find a common chart in which they intersect: only for final charts
if(defined(S)) {kill S;}
def S=re[2][iden[iv[1]][i][1]];
setring S;
if(!defined(EList))
{
i++;
setring R;
continue;
}
setring R;
kill ituple,jtuple;
intvec ituple=iden[iv[1]][i];
intvec jtuple=findInIVList(1,ituple[1],iden[iv[2]]);
if(size(jtuple)==1)
{
if(i<size(iden[iv[1]]))
{
//--- not in this chart
i++;
continue;
}
else
{
if(size(inters)==1)
{
//--- E_i and E_j do not meet at all
return("leer");
}
else
{
return(chi);
}
}
}
//----------------------------------------------------------------------------
// Run through common charts and compute the Euler characteristic of
// each component of Eij.
// As soon as a component has been treated in a chart, it will not be used in
// any subsequent charts.
//----------------------------------------------------------------------------
if(defined(S)) {kill S;}
def S=re[2][ituple[1]];
setring S;
//--- interId: now all components in this chart,
//--- but we want only new components
if(defined(interId)){kill interId;}
ideal interId=EList[ituple[2]]+EList[jtuple[2]];
interId=std(interId);
//--- doneId: already considered components
if(defined(doneId)){kill doneId;}
ideal doneId=1;
for(j=2;j<=size(inters);j++)
{
//--- fetch the components which have already been dealt with via fetchInTree
if(defined(opath)) {kill opath;}
def opath=imap(re[2][inters[j]],path);
k=1;
while((k<ncols(opath))&&(k<ncols(path)))
{
if(path[1,k+1]!=opath[1,k+1]) break;
k++;
}
if(defined(comPa)) {kill comPa;}
int comPa=int(leadcoef(path[1,k]));
if(defined(tempId)){kill tempId;}
ideal tempId=fetchInTree(re,inters[j],comPa,
iden[iv[1]][i][1],"interId",iden);
doneId=intersect(doneId,tempId);
kill tempId;
}
//--- only consider new components in interId
interId=sat(interId,doneId)[1];
if(dim(interId)>1)
{
ERROR("genus_Eij: higher dimensional intersection");
}
if(dim(interId)>=0)
{
//--- save the index of the current chart for future use
export(interId);
inters[size(inters)+1]=iden[iv[1]][i][1];
}
BO[1]=std(BO[1]);
if(((dim(interId)<=0)&&(dim(BO[1])>2))||
((dim(interId)<0)&&(dim(BO[1])==2)))
{
if(i<size(iden[iv[1]]))
{
//--- not in this chart
setring R;
i++;
continue;
}
else
{
if(size(inters)==1)
{
//--- E_i and E_j do not meet at all
return("leer");
}
else
{
return(chi);
}
}
}
g=genus(interId);
//--- chi is the Euler characteristic of the (disjoint !!!) union of the
//--- considered components
//--- remark: components are disjoint, because the E_i are normal crossing!!!
chi=chi+(2-2*g);
}
return(chi);
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
static proc chiEij_local(list re, list iden, intvec iv)
"Internal procedure - no help and no example available
"
{
//!!! Copy of chiEij adjusted for local case
//!!! changes must be made in both copies
//--- we have to consider two different cases:
//--- case1: E_i \cap E_j \cap \pi^-1(0) is a curve
//--- compute the Euler characteristic of the intersection
//--- curve of two exceptional hypersurfaces (of dimension 2)
//--- one of which is allowed to be a component of the strict transform
//--- using the formula chi(Eij)=2-2g(Eij)
//--- case2: E_i \cap E_j \cap \pi^-1(0) is a set of points
//--- count the points
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,chi,g,points;
intvec ituple,jtuple,inters;
def R=basering;
//----------------------------------------------------------------------------
// Find a common chart in which they intersect
//----------------------------------------------------------------------------
for(i=1;i<=size(iden[iv[1]]);i++)
{
//--- find a common chart in which they intersect: only for final charts
if(defined(S)) {kill S;}
def S=re[2][iden[iv[1]][i][1]];
setring S;
if(!defined(EList))
{
i++;
setring R;
continue;
}
setring R;
kill ituple,jtuple;
intvec ituple=iden[iv[1]][i];
intvec jtuple=findInIVList(1,ituple[1],iden[iv[2]]);
if(size(jtuple)==1)
{
if(i<size(iden[iv[1]]))
{
//--- not in this chart
i++;
continue;
}
else
{
if(size(inters)==1)
{
//--- E_i and E_j do not meet at all
return("leer");
}
else
{
return(chi);
}
}
}
//----------------------------------------------------------------------------
// Run through common charts and compute the Euler characteristic of
// each component of Eij.
// As soon as a component has been treated in a chart, it will not be used in
// any subsequent charts.
//----------------------------------------------------------------------------
if(defined(S)) {kill S;}
def S=re[2][ituple[1]];
setring S;
//--- interId: now all components in this chart,
//--- but we want only new components
if(defined(interId)){kill interId;}
ideal interId=EList[ituple[2]]+EList[jtuple[2]]+BO[5];
interId=std(interId);
//--- doneId: already considered components
if(defined(doneId)){kill doneId;}
ideal doneId=1;
for(j=2;j<=size(inters);j++)
{
//--- fetch the components which have already been dealt with via fetchInTree
if(defined(opath)) {kill opath;}
def opath=imap(re[2][inters[j]],path);
k=1;
while((k<ncols(opath))&&(k<ncols(path)))
{
if(path[1,k+1]!=opath[1,k+1]) break;
k++;
}
if(defined(comPa)) {kill comPa;}
int comPa=int(leadcoef(path[1,k]));
if(defined(tempId)){kill tempId;}
ideal tempId=fetchInTree(re,inters[j],comPa,
iden[iv[1]][i][1],"interId",iden);
doneId=intersect(doneId,tempId);
kill tempId;
}
//--- only consider new components in interId
interId=sat(interId,doneId)[1];
if(dim(interId)>1)
{
ERROR("genus_Eij: higher dimensional intersection");
}
if(dim(interId)>=0)
{
//--- save the index of the current chart for future use
export(interId);
inters[size(inters)+1]=iden[iv[1]][i][1];
}
BO[1]=std(BO[1]);
if(dim(interId)<0)
{
if(i<size(iden[iv[1]]))
{
//--- not in this chart
setring R;
i++;
continue;
}
else
{
if(size(inters)==1)
{
//--- E_i and E_j do not meet at all
return("leer");
}
else
{
return(chi);
}
}
}
if((dim(interId)==0)&&(dim(std(BO[1]))>2))
{
//--- for sets of points the Euler characteristic is just
//--- the number of points
//--- fat points are impossible, since everything is smooth and n.c.
chi=chi+vdim(interId);
points=1;
}
else
{
if(points==1)
{
ERROR("components of intersection do not have same dimension");
}
g=genus(interId);
//--- chi is the Euler characteristic of the (disjoint !!!) union of the
//--- considered components
//--- remark: components are disjoint, because the E_i are normal crossing!!!
chi=chi+(2-2*g);
}
}
return(chi);
}
//////////////////////////////////////////////////////////////////////////////
static proc computeChiE(list re, list iden)
"Internal procedure - no help and no example available
"
{
//--- compute the Euler characteristic of the exceptional hypersurfaces
//--- (of dimension 2), not considering the components of the strict
//--- transform
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,m,thisE,otherE;
def R=basering;
intvec nulliv,chi_temp,kvec;
nulliv[size(iden)]=0;
list chi_E;
for(i=1;i<=size(iden);i++)
{
chi_E[i]=list();
}
//---------------------------------------------------------------------------
// Run through the list of charts and compute the Euler characteristic of
// the new exceptional hypersurface and change the values for the old ones
// according to the blow-up which has just been performed
// For initialization reasons, treat the case of the first blow-up separately
//---------------------------------------------------------------------------
for(i=2;i<=size(re[2]);i++)
{
//--- run through all charts
if(defined(S)){kill S;}
def S=re[2][i];
setring S;
m=int(leadcoef(path[1,ncols(path)]));
if(defined(Spa)){kill Spa;}
def Spa=re[2][m];
if(size(BO[4])==1)
{
//--- just one exceptional divisor
thisE=1;
setring Spa;
if(i==2)
{
//--- have not set the initial value of chi(E_1) yet
if(dim(std(cent))==0)
{
//--- center was point ==> new except. div. is a P^2
list templist=3*vdim(std(BO[1]+cent)),nulliv;
}
else
{
//--- center was curve ==> new except. div. is curve x P^1
list templist=4-4*genus(BO[1]+cent),nulliv;
}
chi_E[1]=templist;
kill templist;
}
setring S;
i++;
if(i<size(re[2]))
{
continue;
}
else
{
break;
}
}
for(j=1;j<=size(iden);j++)
{
//--- find out which exceptional divisor has just been born
if(inIVList(intvec(i,size(BO[4])),iden[j]))
{
//--- found it
thisE=j;
break;
}
}
//--- now setup new chi and change the previous ones appropriately
setring Spa;
if(size(chi_E[thisE])==0)
{
//--- have not set the initial value of chi(E_thisE) yet
if(dim(std(cent))==0)
{
//--- center was point ==> new except. div. is a P^2
list templist=3*vdim(std(BO[1]+cent)),nulliv;
}
else
{
//--- center was curve ==> new except. div. is a C x P^1
list templist=4-4*genus(BO[1]+cent),nulliv;
}
chi_E[thisE]=templist;
kill templist;
}
for(j=1;j<=size(BO[4]);j++)
{
//--- we are in the parent ring ==> thisE is not yet born
//--- all the other E_i have already been initialized, but the chi
//--- might change with the current blow-up at cent
if(BO[6][j]==1)
{
//--- ignore empty sets
j++;
if(j<=size(BO[4]))
{
continue;
}
else
{
break;
}
}
for(k=1;k<=size(iden);k++)
{
//--- find global index of BO[4][j]
if(inIVList(intvec(m,j),iden[k]))
{
otherE=k;
break;
}
}
if(chi_E[otherE][2][thisE]==1)
{
//--- already considered this one
j++;
if(j<=size(BO[4]))
{
continue;
}
else
{
break;
}
}
//---------------------------------------------------------------------------
// update chi according to the formula
// chi(E_k^transf)=chi(E_k) - chi(C \cap E_k) + chi(E_k \cap E_new)
// for convenience of implementation, we first compute
// chi(E_k) - chi(C \cap E_k)
// and afterwards add the last term chi(E_k \cap E_new)
//---------------------------------------------------------------------------
ideal CinE=std(cent+BO[4][j]+BO[1]); // this is C \cap E_k
if(dim(CinE)==1)
{
//--- center meets E_k in a curve
chi_temp[otherE]=chi_E[otherE][1]-(2-2*genus(CinE));
}
if(dim(CinE)==0)
{
//--- center meets E_k in points
chi_temp[otherE]=chi_E[otherE][1]-vdim(std(CinE));
}
kill CinE;
setring S;
//--- now we are back in the i-th ring in the list
ideal CinE=std(BO[4][j]+BO[4][size(BO[4])]+BO[1]);
// this is E_k \cap E_new
if(dim(CinE)==1)
{
//--- if the two divisors meet, they meet in a curve
chi_E[otherE][1]=chi_temp[otherE]+(2-2*genus(CinE));
chi_E[otherE][2][thisE]=1; // this blow-up of E_k is done
}
kill CinE;
setring Spa;
}
}
setring R;
return(chi_E);
}
//////////////////////////////////////////////////////////////////////////////
static proc computeChiE_local(list re, list iden)
"Internal procedure - no help and no example available
"
{
//--- compute the Euler characteristic of the intersection of the
//--- exceptional hypersurfaces with \pi^-1(0) which can be of
//--- dimension 1 or 2 - not considering the components of the strict
//--- transform
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,aa,m,n,thisE,otherE;
def R=basering;
intvec nulliv,chi_temp,kvec,dimEi,endiv;
nulliv[size(iden)]=0;
dimEi[size(iden)]=0;
endiv[size(re[2])]=0;
list chi_E;
for(i=1;i<=size(iden);i++)
{
chi_E[i]=list();
}
//---------------------------------------------------------------------------
// Run through the list of charts and compute the Euler characteristic of
// the new exceptional hypersurface and change the values for the old ones
// according to the blow-up which has just been performed
// For initialization reasons, treat the case of the first blow-up separately
//---------------------------------------------------------------------------
for(i=2;i<=size(re[2]);i++)
{
//--- run through all charts
if(defined(S)){kill S;}
def S=re[2][i];
setring S;
if(defined(EList))
{
endiv[i]=1;
}
m=int(leadcoef(path[1,ncols(path)]));
if(defined(Spa)){kill Spa;}
def Spa=re[2][m];
if(size(BO[4])==1)
{
//--- just one exceptional divisor
thisE=1;
setring Spa;
if(i==2)
{
//--- have not set the initial value of chi(E_1) yet
//--- in the local case, we need to know whether the center contains 0
if(size(reduce(cent,std(maxideal(1))))!=0)
{
//--- first center does not meet 0
list templist=0,nulliv;
dimEi[1]=-1;
}
else
{
if(dim(std(cent))==0)
{
//--- center was point ==> new except. div. is a P^2
list templist=3*vdim(std(BO[1]+cent)),nulliv;
dimEi[1]=2;
}
else
{
//--- center was curve ==> intersection of new exceptional divisor
//--- with \pi^-1(0) is a curve, namely P^1
setring S;
list templist=2,nulliv;
dimEi[1]=1;
}
}
chi_E[1]=templist;
kill templist;
}
setring S;
i++;
if(i<size(re[2]))
{
continue;
}
else
{
break;
}
}
for(j=1;j<=size(iden);j++)
{
//--- find out which exceptional divisor has just been born
if(inIVList(intvec(i,size(BO[4])),iden[j]))
{
//--- found it
thisE=j;
break;
}
}
//--- now setup new chi and change the previous ones appropriately
setring Spa;
if(size(chi_E[thisE])==0)
{
//--- have not set the initial value of chi(E_thisE) yet
if(deg(std(cent+BO[5])[1])==0)
{
if(dim(std(cent))==0)
{
//--- \pi^-1(0) does not meet the Q-point cent
list templist=0,nulliv;
dimEi[thisE]=-1;
}
//--- if cent is a curve, the intersection point might simply be outside
//--- of this chart!!!
}
else
{
if(dim(std(cent))==0)
{
//--- center was point ==> new except. div. is a P^2
list templist=3*vdim(std(BO[1]+cent)),nulliv;
dimEi[thisE]=2;
}
else
{
//--- center was curve ==> new except. div. is a C x P^1
if(dim(std(cent+BO[5]))==1)
{
//--- whole curve is in \pi^-1(0)
list templist=4-4*genus(BO[1]+cent),nulliv;
dimEi[thisE]=2;
}
else
{
//--- curve meets \pi^-1(0) in points
//--- in S, the intersection will be a curve!!!
setring S;
list templist=2-2*genus(BO[1]+BO[4][size(BO[4])]+BO[5]),nulliv;
dimEi[thisE]=1;
setring Spa;
}
}
}
if(defined(templist))
{
chi_E[thisE]=templist;
kill templist;
}
}
for(j=1;j<=size(BO[4]);j++)
{
//--- we are in the parent ring ==> thisE is not yet born
//--- all the other E_i have already been initialized, but the chi
//--- might change with the current blow-up at cent
if(BO[6][j]==1)
{
//--- ignore empty sets
j++;
if(j<=size(BO[4]))
{
continue;
}
else
{
break;
}
}
for(k=1;k<=size(iden);k++)
{
//--- find global index of BO[4][j]
if(inIVList(intvec(m,j),iden[k]))
{
otherE=k;
break;
}
}
if(dimEi[otherE]<=1)
{
//--- dimEi[otherE]==-1: center leading to this E does not meet \pi^-1(0)
//--- dimEi[otherE]== 0: center leading to this E does not meet \pi^-1(0)
//--- in any previously visited charts
//--- maybe in some other branch later, but has nothing
//--- to do with this center
//--- dimEi[otherE]== 1: E \cap \pi^-1(0) is curve
//--- ==> chi is birational invariant
j++;
if(j<=size(BO[4]))
{
continue;
}
break;
}
if(chi_E[otherE][2][thisE]==1)
{
//--- already considered this one
j++;
if(j<=size(BO[4]))
{
continue;
}
else
{
break;
}
}
//---------------------------------------------------------------------------
// update chi according to the formula
// chi(E_k^transf)=chi(E_k) - chi(C \cap E_k) + chi(E_k \cap E_new)
// for convenience of implementation, we first compute
// chi(E_k) - chi(C \cap E_k)
// and afterwards add the last term chi(E_k \cap E_new)
//---------------------------------------------------------------------------
ideal CinE=std(cent+BO[4][j]+BO[1]); // this is C \cap E_k
if(dim(CinE)==1)
{
//--- center meets E_k in a curve
chi_temp[otherE]=chi_E[otherE][1]-(2-2*genus(CinE));
}
if(dim(CinE)==0)
{
//--- center meets E_k in points
chi_temp[otherE]=chi_E[otherE][1]-vdim(std(CinE));
}
kill CinE;
setring S;
//--- now we are back in the i-th ring in the list
ideal CinE=std(BO[4][j]+BO[4][size(BO[4])]+BO[1]);
// this is E_k \cap E_new
if(dim(CinE)==1)
{
//--- if the two divisors meet, they meet in a curve
chi_E[otherE][1]=chi_temp[otherE][1]+(2-2*genus(CinE));
chi_E[otherE][2][thisE]=1; // this blow-up of E_k is done
}
kill CinE;
setring Spa;
}
}
//--- we still need to clean-up the 1-dimensional E_i \cap \pi^-1(0)
for(i=1;i<=size(dimEi);i++)
{
if(dimEi[i]!=1)
{
//--- not 1-dimensional ==> skip
i++;
if(i>size(dimEi)) break;
continue;
}
if(defined(myCharts)) {kill myCharts;}
intvec myCharts;
chi_E[i]=0;
for(j=1;j<=size(re[2]);j++)
{
if(endiv[j]==0)
{
//--- not an endChart ==> skip
j++;
if(j>size(re[2])) break;
continue;
}
if(defined(mtuple)) {kill mtuple;}
intvec mtuple=findInIVList(1,j,iden[i]);
if(size(mtuple)==1)
{
//-- nothing to do with this Ei ==> skip
j++;
if(j>size(re[2])) break;
continue;
}
myCharts[size(myCharts)+1]=j;
if(defined(S)){kill S;}
def S=re[2][j];
setring S;
if(defined(interId)){kill interId;}
//--- all components
ideal interId=std(BO[4][mtuple[2]]+BO[5]);
if(defined(myPts)){kill myPts;}
ideal myPts=1;
export(myPts);
export(interId);
if(defined(doneId)){kill doneId;}
if(defined(donePts)){kill donePts;}
ideal donePts=1;
ideal doneId=1;
for(k=2;k<size(myCharts);k++)
{
//--- fetch the components which have already been dealt with via fetchInTree
if(defined(opath)) {kill opath;}
def opath=imap(re[2][myCharts[k][1]],path);
aa=1;
while((aa<ncols(opath))&&(aa<ncols(path)))
{
if(path[1,aa+1]!=opath[1,aa+1]) break;
aa++;
}
if(defined(comPa)) {kill comPa;}
int comPa=int(leadcoef(path[1,aa]));
if(defined(tempId)){kill tempId;}
ideal tempId=fetchInTree(re,myCharts[k][1],comPa,j,"interId",iden);
doneId=intersect(doneId,tempId);
kill tempId;
ideal tempId=fetchInTree(re,myCharts[k][1],comPa,j,"myPts",iden);
donePts=intersect(donePts,tempId);
kill tempId;
}
//--- drop components which have already been dealt with
interId=sat(interId,doneId)[1];
list pr=minAssGTZ(interId);
myPts=std(interId+doneId);
for(k=1;k<=size(pr);k++)
{
for(n=k+1;n<=size(pr);n++)
{
myPts=intersect(myPts,std(pr[k]+pr[n]));
}
if(deg(std(pr[k])[1])>0)
{
chi_E[i][1]=chi_E[i][1]+(2-2*genus(pr[k]));
}
}
myPts=sat(myPts,donePts)[1];
chi_E[i][1]=chi_E[i][1]-vdim(myPts);
}
}
setring R;
return(chi_E);
}
//////////////////////////////////////////////////////////////////////////////
static proc chi_ast(list re,list iden,list #)
"Internal procedure - no help and no example available
"
{
//--- compute the Euler characteristic of the Ei,Eij,Eijk and the
//--- corresponding Ei^*,Eij^*,Eijk^* by preparing the input to the
//--- specialized auxilliary procedures and then recombining the results
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,g;
intvec tiv;
list chi_ijk,chi_ij,chi_i,ast_ijk,ast_ij,ast_i,tmplist,g_ij,emptylist;
list leererSchnitt;
def R=basering;
ring Rhelp=0,@t,dp;
setring R;
//----------------------------------------------------------------------------
// first compute the chi(Eij) and at the same time
// check whether E_i \cap E_j is empty
// the formula is
// chi_ij=2-2*genus(E_i \cap E_j)
//----------------------------------------------------------------------------
if(size(#)>0)
{
"Entering chi_ast";
}
for(i=1;i<=size(iden)-1;i++)
{
for(j=i+1;j<=size(iden);j++)
{
if(defined(blub)){kill blub;}
def blub=chiEij(re,iden,intvec(i,j));
if(typeof(blub)=="int")
{
tmplist=intvec(i,j),blub;
}
else
{
leererSchnitt[size(leererSchnitt)+1]=intvec(i,j);
tmplist=intvec(i,j),0;
}
chi_ij[size(chi_ij)+1]=tmplist;
}
}
if(size(#)>0)
{
"chi_ij computed";
}
//-----------------------------------------------------------------------------
// compute chi(Eijk)=chi^*(Eijk) by counting the points in the intersection
// chi_ijk=#(E_i \cap E_j \cap E_k)
// ast_ijk=chi_ijk
//-----------------------------------------------------------------------------
for(i=1;i<=size(iden)-2;i++)
{
for(j=i+1;j<=size(iden)-1;j++)
{
for(k=j+1;k<=size(iden);k++)
{
if(inIVList(intvec(i,j),leererSchnitt))
{
tmplist=intvec(i,j,k),0;
}
else
{
tmplist=intvec(i,j,k),countEijk(re,iden,intvec(i,j,k));
}
chi_ijk[size(chi_ijk)+1]=tmplist;
}
}
}
ast_ijk=chi_ijk;
if(size(#)>0)
{
"chi_ijk computed";
}
//----------------------------------------------------------------------------
// construct chi(Eij^*) by the formula
// ast_ij=chi_ij - sum_ijk chi_ijk,
// where k runs over all indices != i,j
//----------------------------------------------------------------------------
for(i=1;i<=size(chi_ij);i++)
{
ast_ij[i]=chi_ij[i];
for(k=1;k<=size(chi_ijk);k++)
{
if(((chi_ijk[k][1][1]==chi_ij[i][1][1])||
(chi_ijk[k][1][2]==chi_ij[i][1][1]))&&
((chi_ijk[k][1][2]==chi_ij[i][1][2])||
(chi_ijk[k][1][3]==chi_ij[i][1][2])))
{
ast_ij[i][2]=ast_ij[i][2]-chi_ijk[k][2];
}
}
}
if(size(#)>0)
{
"ast_ij computed";
}
//----------------------------------------------------------------------------
// construct ast_i according to the following formulae
// ast_i=0 if E_i is (Q- resp. C-)component of the strict transform
// chi_i=3*n if E_i originates from blowing up a Q-point,
// which consists of n (different) C-points
// chi_i=2-2g(C) if E_i originates from blowing up a (Q-)curve C
// (chi_i=n*(2-2g(C_i))=2-2g(C),
// where C=\cup C_i, C_i \cap C_j = \emptyset)
// if E_i is not a component of the strict transform, then
// ast_i=chi_i - sum_{j!=i} ast_ij
//----------------------------------------------------------------------------
for(i=1;i<=size(iden);i++)
{
if(defined(S)) {kill S;}
def S=re[2][iden[i][1][1]];
setring S;
if(iden[i][1][2]>size(BO[4]))
{
i--;
break;
}
}
list idenE=iden;
while(size(idenE)>i)
{
idenE=delete(idenE,size(idenE));
}
list cl=computeChiE(re,idenE);
for(i=1;i<=size(idenE);i++)
{
chi_i[i]=list(intvec(i),cl[i][1]);
}
if(size(#)>0)
{
"chi_i computed";
}
for(i=1;i<=size(idenE);i++)
{
ast_i[i]=chi_i[i];
for(j=1;j<=size(ast_ij);j++)
{
if((ast_ij[j][1][1]==i)||(ast_ij[j][1][2]==i))
{
ast_i[i][2]=ast_i[i][2]-chi_ij[j][2];
}
}
for(j=1;j<=size(ast_ijk);j++)
{
if((ast_ijk[j][1][1]==i)||(ast_ijk[j][1][2]==i)
||(ast_ijk[j][1][3]==i))
{
ast_i[i][2]=ast_i[i][2]+chi_ijk[j][2];
}
}
}
for(i=size(idenE)+1;i<=size(iden);i++)
{
ast_i[i]=list(intvec(i),0);
}
//--- results are in ast_i, ast_ij and ast_ijk
//--- all are of the form intvec(indices),int(value)
list result=ast_i,ast_ij,ast_ijk;
return(result);
}
//////////////////////////////////////////////////////////////////////////////
static proc chi_ast_local(list re,list iden,list #)
"Internal procedure - no help and no example available
"
{
//--- compute the Euler characteristic of the Ei,Eij,Eijk and the
//--- corresponding Ei^*,Eij^*,Eijk^* by preparing the input to the
//--- specialized auxilliary procedures and then recombining the results
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,g;
intvec tiv;
list chi_ijk,chi_ij,chi_i,ast_ijk,ast_ij,ast_i,tmplist,g_ij,emptylist;
list leererSchnitt;
def R=basering;
ring Rhelp=0,@t,dp;
setring R;
//----------------------------------------------------------------------------
// first compute
// if E_i \cap E_j \cap \pi^-1(0) is a curve:
// chi(Eij) and at the same time
// check whether E_i \cap E_j is empty
// the formula is
// chi_ij=2-2*genus(E_i \cap E_j)
// otherwise (points):
// chi(E_ij) by counting the points
//----------------------------------------------------------------------------
if(size(#)>0)
{
"Entering chi_ast_local";
}
for(i=1;i<=size(iden)-1;i++)
{
for(j=i+1;j<=size(iden);j++)
{
if(defined(blub)){kill blub;}
def blub=chiEij_local(re,iden,intvec(i,j));
if(typeof(blub)=="int")
{
tmplist=intvec(i,j),blub;
}
else
{
leererSchnitt[size(leererSchnitt)+1]=intvec(i,j);
tmplist=intvec(i,j),0;
}
chi_ij[size(chi_ij)+1]=tmplist;
}
}
if(size(#)>0)
{
"chi_ij computed";
}
//-----------------------------------------------------------------------------
// compute chi(Eijk)=chi^*(Eijk) by counting the points in the intersection
// chi_ijk=#(E_i \cap E_j \cap E_k \cap \pi^-1(0))
// ast_ijk=chi_ijk
//-----------------------------------------------------------------------------
for(i=1;i<=size(iden)-2;i++)
{
for(j=i+1;j<=size(iden)-1;j++)
{
for(k=j+1;k<=size(iden);k++)
{
if(inIVList(intvec(i,j),leererSchnitt))
{
tmplist=intvec(i,j,k),0;
}
else
{
tmplist=intvec(i,j,k),countEijk(re,iden,intvec(i,j,k),"local");
}
chi_ijk[size(chi_ijk)+1]=tmplist;
}
}
}
ast_ijk=chi_ijk;
if(size(#)>0)
{
"chi_ijk computed";
}
//----------------------------------------------------------------------------
// construct chi(Eij^*) by the formula
// ast_ij=chi_ij - sum_ijk chi_ijk,
// where k runs over all indices != i,j
//----------------------------------------------------------------------------
for(i=1;i<=size(chi_ij);i++)
{
ast_ij[i]=chi_ij[i];
for(k=1;k<=size(chi_ijk);k++)
{
if(((chi_ijk[k][1][1]==chi_ij[i][1][1])||
(chi_ijk[k][1][2]==chi_ij[i][1][1]))&&
((chi_ijk[k][1][2]==chi_ij[i][1][2])||
(chi_ijk[k][1][3]==chi_ij[i][1][2])))
{
ast_ij[i][2]=ast_ij[i][2]-chi_ijk[k][2];
}
}
}
if(size(#)>0)
{
"ast_ij computed";
}
//----------------------------------------------------------------------------
// construct ast_i according to the following formulae
// ast_i=0 if E_i is (Q- resp. C-)component of the strict transform
// if E_i \cap \pi^-1(0) is of dimension 2:
// chi_i=3*n if E_i originates from blowing up a Q-point,
// which consists of n (different) C-points
// chi_i=2-2g(C) if E_i originates from blowing up a (Q-)curve C
// (chi_i=n*(2-2g(C_i))=2-2g(C),
// where C=\cup C_i, C_i \cap C_j = \emptyset)
// if E_i \cap \pi^-1(0) is a curve:
// use the formula chi_i=2-2*genus(E_i \cap \pi^-1(0))
//
// for E_i not a component of the strict transform we have
// ast_i=chi_i - sum_{j!=i} ast_ij
//----------------------------------------------------------------------------
for(i=1;i<=size(iden);i++)
{
if(defined(S)) {kill S;}
def S=re[2][iden[i][1][1]];
setring S;
if(iden[i][1][2]>size(BO[4]))
{
i--;
break;
}
}
list idenE=iden;
while(size(idenE)>i)
{
idenE=delete(idenE,size(idenE));
}
list cl=computeChiE_local(re,idenE);
for(i=1;i<=size(cl);i++)
{
if(size(cl[i])==0)
{
cl[i][1]=0;
}
}
for(i=1;i<=size(idenE);i++)
{
chi_i[i]=list(intvec(i),cl[i][1]);
}
if(size(#)>0)
{
"chi_i computed";
}
for(i=1;i<=size(idenE);i++)
{
ast_i[i]=chi_i[i];
for(j=1;j<=size(ast_ij);j++)
{
if((ast_ij[j][1][1]==i)||(ast_ij[j][1][2]==i))
{
ast_i[i][2]=ast_i[i][2]-chi_ij[j][2];
}
}
for(j=1;j<=size(ast_ijk);j++)
{
if((ast_ijk[j][1][1]==i)||(ast_ijk[j][1][2]==i)
||(ast_ijk[j][1][3]==i))
{
ast_i[i][2]=ast_i[i][2]+chi_ijk[j][2];
}
}
}
for(i=size(idenE)+1;i<=size(iden);i++)
{
ast_i[i]=list(intvec(i),0);
}
//--- results are in ast_i, ast_ij and ast_ijk
//--- all are of the form intvec(indices),int(value)
//"End of chi_ast_local";
//~;
list result=ast_i,ast_ij,ast_ijk;
return(result);
}
//////////////////////////////////////////////////////////////////////////////
proc discrepancy(list re)
"USAGE: discrepancy(L);
@* L = list of rings
ASSUME: L is the output of resolution of singularities
RETRUN: discrepancies of the given resolution"
{
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
def R=basering;
int i,j;
list iden=prepEmbDiv(re); //--- identify the E_i
intvec Vvec=computeV(re,iden); //--- nu
intvec Nvec=computeN(re,iden); //--- N
intvec Avec;
//--- only look at exceptional divisors, not at strict transform
for(i=1;i<=size(iden);i++)
{
if(defined(S)) {kill S;}
def S=re[2][iden[i][1][1]];
setring S;
if(iden[i][1][2]>size(BO[4]))
{
i--;
break;
}
}
j=i;
//--- discrepancies are a_i=nu_i-N_i
for(i=1;i<=j;i++)
{
Avec[i]=Vvec[i]-Nvec[i]-1;
}
return(Avec);
}
example
{"EXAMPLE:";
echo = 2;
ring R=0,(x,y,z),dp;
ideal I=x2+y2+z3;
list re=resolve(I);
discrepancy(re);
}
//////////////////////////////////////////////////////////////////////////////
proc zetaDL(list re,int d,list #)
"USAGE: zetaDL(L,d[,s1][,s2][,a]);
L = list of rings;
d = integer;
s1,s2 = string;
a = integer
ASSUME: L is the output of resolution of singularities
COMPUTE: local Denef-Loeser zeta function, if string s1 is present and
has the value 'local'; global Denef-Loeser zeta function
otherwise
if string s1 or s2 has the value "A", additionally the
characteristic polynomial of the monodromy is computed
RETURN: list l
if a is not present:
l[1]: string specifying the top. zeta function
l[2]: string specifying characteristic polynomial of monodromy,
if "A" was specified
if a is present:
l[1]: string specifying the top. zeta function
l[2]: list ast,
ast[1]=chi(Ei^*)
ast[2]=chi(Eij^*)
ast[3]=chi(Eijk^*)
l[3]: intvec nu of multiplicites as needed in computation of zeta
function
l[4]: intvec N of multiplicities as needed in compuation of zeta
function
l[5]: string specifying characteristic polynomial of monodromy,
if "A" was specified
EXAMPLE: example zetaDL; shows an example
"
{
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
def R=basering;
int show_all,i;
if(size(#)>0)
{
if((typeof(#[1])=="int")||(size(#)>2))
{
show_all=1;
}
if(typeof(#[1])=="string")
{
if((#[1]=="local")||(#[1]=="lokal"))
{
// ERROR("Local case not implemented yet");
"Local Case: Assuming that no (!) charts were dropped";
"during calculation of the resolution (option \"A\")";
int localComp=1;
if(size(#)>1)
{
if(#[2]=="A")
{
int aCampoFormula=1;
}
}
}
else
{
if(#[1]=="A")
{
int aCampoFormula=1;
}
"Computing global zeta function";
}
}
}
//----------------------------------------------------------------------------
// Identify the embedded divisors and chi(Ei^*), chi(Eij^*) and chi(Eijk^*)
// as well as the integer vector V(=nu) and N
//----------------------------------------------------------------------------
list iden=prepEmbDiv(re); //--- identify the E_i
//!!! TIMING: E8 takes 520 sec ==> needs speed up
if(!defined(localComp))
{
list ast_list=chi_ast(re,iden); //--- compute chi(E^*)
}
else
{
list ast_list=chi_ast_local(re,iden);
}
intvec Vvec=computeV(re,iden); //--- nu
intvec Nvec=computeN(re,iden); //--- N
//----------------------------------------------------------------------------
// Build a new ring with one parameter s
// and compute Zeta_top^(d) in its ground field
//----------------------------------------------------------------------------
ring Qs=(0,s),x,dp;
number zetaTop=0;
number enum,denom;
denom=1;
for(i=1;i<=size(Nvec);i++)
{
denom=denom*(Vvec[i]+s*Nvec[i]);
}
//--- factors for which index set J consists of one element
//--- (do something only if d divides N_j)
for(i=1;i<=size(ast_list[1]);i++)
{
if((((Nvec[ast_list[1][i][1][1]] div d)*d)-Nvec[ast_list[1][i][1][1]]==0)&&
(ast_list[1][i][2]!=0))
{
enum=enum+ast_list[1][i][2]*(denom/(Vvec[ast_list[1][i][1][1]]+s*Nvec[ast_list[1][i][1][1]]));
}
}
//--- factors for which index set J consists of two elements
//--- (do something only if d divides both N_i and N_j)
//!!! TIMING: E8 takes 690 sec and has 703 elements
//!!! ==> need to implement a smarter way to do this
//!!! e.g. build up enumerator and denominator separately, thus not
//!!! searching for common factors in each step
for(i=1;i<=size(ast_list[2]);i++)
{
if((((Nvec[ast_list[2][i][1][1]] div d)*d)-Nvec[ast_list[2][i][1][1]]==0)&&
(((Nvec[ast_list[2][i][1][2]] div d)*d)-Nvec[ast_list[2][i][1][2]]==0)&&
(ast_list[2][i][2]!=0))
{
enum=enum+ast_list[2][i][2]*(denom/((Vvec[ast_list[2][i][1][1]]+s*Nvec[ast_list[2][i][1][1]])*(Vvec[ast_list[2][i][1][2]]+s*Nvec[ast_list[2][i][1][2]])));
}
}
//--- factors for which index set J consists of three elements
//--- (do something only if d divides N_i, N_j and N_k)
//!!! TIMING: E8 takes 490 sec and has 8436 elements
//!!! ==> same kind of improvements as in the previous case needed
for(i=1;i<=size(ast_list[3]);i++)
{
if((((Nvec[ast_list[3][i][1][1]] div d)*d)-Nvec[ast_list[3][i][1][1]]==0)&&
(((Nvec[ast_list[3][i][1][2]] div d)*d)-Nvec[ast_list[3][i][1][2]]==0)&&
(((Nvec[ast_list[3][i][1][3]] div d)*d)-Nvec[ast_list[3][i][1][3]]==0)&&
(ast_list[3][i][2]!=0))
{
enum=enum+ast_list[3][i][2]*(denom/((Vvec[ast_list[3][i][1][1]]+s*Nvec[ast_list[3][i][1][1]])*(Vvec[ast_list[3][i][1][2]]+s*Nvec[ast_list[3][i][1][2]])*(Vvec[ast_list[3][i][1][3]]+s*Nvec[ast_list[3][i][1][3]])));
}
}
zetaTop=enum/denom;
zetaTop=numerator(zetaTop)/denominator(zetaTop);
string zetaStr=string(zetaTop);
if(show_all)
{
list result=zetaStr,ast_list[1],ast_list[2],ast_list[3],Vvec,Nvec;
}
else
{
list result=zetaStr;
}
//--- compute characteristic polynomial of the monodromy
//--- by the A'Campo formula
if(defined(aCampoFormula))
{
poly charP=1;
for(i=1;i<=size(ast_list[1]);i++)
{
charP=charP*((s^Nvec[i]-1)^ast_list[1][i][2]);
}
string charPStr=string(charP/(s-1));
result[size(result)+1]=charPStr;
}
setring R;
return(result);
}
example
{"EXAMPLE:";
echo = 2;
ring R=0,(x,y,z),dp;
ideal I=x2+y2+z3;
list re=resolve(I,"K");
zetaDL(re,1);
I=(xz+y2)*(xz+y2+x2)+z5;
list L=resolve(I,"K");
zetaDL(L,1);
//===== expected zeta function =========
// (20s^2+130s+87)/((1+s)*(3+4s)*(29+40s))
//======================================
}
//////////////////////////////////////////////////////////////////////////////
proc abstractR(list re)
"USAGE: abstractR(L);
@* L = list of rings
ASSUME: L is output of resolution of singularities
NOTE: currently only implemented for isolated surface singularities
RETURN: list l
l[1]: intvec, where
l[1][i]=1 if the corresponding ring is a final chart
of non-embedded resolution
l[1][i]=0 otherwise
l[2]: intvec, where
l[2][i]=1 if the corresponding ring does not occur
in the non-embedded resolution
l[2][i]=0 otherwise
l[3]: list L
EXAMPLE: example abstractR; shows an example
"
{
//---------------------------------------------------------------------------
// Initialization and sanity checks
//---------------------------------------------------------------------------
def R=basering;
//---Test whether we are in the irreducible surface case
def S=re[2][1];
setring S;
BO[2]=BO[2]+BO[1];
if(dim(std(BO[2]))!=2)
{
ERROR("NOT A SURFACE");
}
if(dim(std(slocus(BO[2])))>0)
{
ERROR("NOT AN ISOLATED SINGULARITY");
}
setring R;
int i,j,k,l,i0;
intvec deleted;
intvec endiv;
endiv[size(re[2])]=0;
deleted[size(re[2])]=0;
//-----------------------------------------------------------------------------
// run through all rings, only consider final charts
// for each final chart follow the list of charts leading up to it until
// we encounter a chart which is not finished in the non-embedded case
//-----------------------------------------------------------------------------
for(i=1;i<=size(re[2]);i++)
{
if(defined(S)){kill S;}
def S=re[2][i];
setring S;
if(size(reduce(cent,std(BO[2]+BO[1])))!=0)
{
//--- only consider endrings
i++;
continue;
}
i0=i;
for(j=ncols(path);j>=2;j--)
{
//--- walk backwards through history
if(j==2)
{
endiv[i0]=1;
break;
}
k=int(leadcoef(path[1,j]));
if((deleted[k]==1)||(endiv[k]==1))
{
deleted[i0]=1;
break;
}
if(defined(SPa)){kill SPa;}
def SPa=re[2][k];
setring SPa;
l=int(leadcoef(path[1,ncols(path)]));
if(defined(SPa2)){kill SPa2;}
def SPa2=re[2][l];
setring SPa2;
if((deleted[l]==1)||(endiv[l]==1))
{
//--- parent was already treated via different final chart
//--- we may safely inherit the data
deleted[i0]=1;
setring S;
i0=k;
j--;
continue;
}
setring SPa;
//!!! Idea of Improvement:
//!!! BESSER: rueckwaerts gehend nur testen ob glatt
//!!! danach vorwaerts bis zum ersten Mal abstractNC
//!!! ACHTUNG: rueckweg unterwegs notieren - wir haben nur vergangenheit!
if((deg(std(slocus(BO[2]))[1])!=0)||(!abstractNC(BO)))
{
//--- not finished in the non-embedded case
endiv[i0]=1;
break;
}
//--- unnecessary chart in non-embedded case
setring S;
deleted[i0]=1;
i0=k;
}
}
//-----------------------------------------------------------------------------
// Clean up the intvec deleted and return the result
//-----------------------------------------------------------------------------
setring R;
for(i=1;i<=size(endiv);i++)
{
if(endiv[i]==1)
{
if(defined(S)) {kill S;}
def S=re[2][i];
setring S;
for(j=3;j<ncols(path);j++)
{
if((endiv[int(leadcoef(path[1,j]))]==1)||
(deleted[int(leadcoef(path[1,j]))]==1))
{
deleted[int(leadcoef(path[1,j+1]))]=1;
endiv[int(leadcoef(path[1,j+1]))]=0;
}
}
if((endiv[int(leadcoef(path[1,ncols(path)]))]==1)||
(deleted[int(leadcoef(path[1,ncols(path)]))]==1))
{
deleted[i]=1;
endiv[i]=0;
}
}
}
list resu=endiv,deleted,re;
return(resu);
}
example
{"EXAMPLE:";
echo = 2;
ring r = 0,(x,y,z),dp;
ideal I=x2+y2+z11;
list L=resolve(I);
list absR=abstractR(L);
absR[1];
absR[2];
}
//////////////////////////////////////////////////////////////////////////////
static proc decompE(list BO)
"Internal procedure - no help and no example available
"
{
//--- compute the list of exceptional divisors, including the components
//--- of the strict transform in the non-embedded case
//--- (computation over Q !!!)
def R=basering;
list Elist,prList;
int i;
for(i=1;i<=size(BO[4]);i++)
{
Elist[i]=BO[4][i];
}
/* practical speed up (part 1 of 3) -- no theoretical relevance
ideal M=maxideal(1);
M[1]=var(nvars(basering));
M[nvars(basering)]=var(1);
map phi=R,M;
*/
ideal KK=BO[2];
/* practical speed up (part 2 of 3)
KK=phi(KK);
*/
prList=minAssGTZ(KK);
/* practical speed up (part 3 of 3)
prList=phi(prList);
*/
for(i=1;i<=size(prList);i++)
{
Elist[size(BO[4])+i]=prList[i];
}
return(Elist);
}
//////////////////////////////////////////////////////////////////////////////
proc prepEmbDiv(list re, list #)
"USAGE: prepEmbDiv(L[,a]);
@* L = list of rings
@* a = integer
ASSUME: L is output of resolution of singularities
COMPUTE: if a is not present: exceptional divisors including components
of the strict transform
otherwise: only exceptional divisors
RETURN: list of Q-irreducible exceptional divisors (embedded case)
EXAMPLE: example prepEmbDiv; shows an example
"
{
//--- 1) in each final chart, a list of (decomposed) exceptional divisors
//--- is created (and exported)
//--- 2) the strict transform is decomposed
//--- 3) the exceptional divisors (including the strict transform)
//--- in the different charts are compared, identified and this
//--- information collected into a list which is then returned
//---------------------------------------------------------------------------
// Initialization
//---------------------------------------------------------------------------
int i,j,k,ncomps,offset,found,a,b,c,d;
list tmpList;
def R=basering;
//--- identify identical exceptional divisors
//--- (note: we are in the embedded case)
list iden=collectDiv(re)[2];
//---------------------------------------------------------------------------
// Go to each final chart and create the EList
//---------------------------------------------------------------------------
for(i=1;i<=size(iden[size(iden)]);i++)
{
if(defined(S)){kill S;}
def S=re[2][iden[size(iden)][i][1]];
setring S;
if(defined(EList)){kill EList;}
list EList=decompE(BO);
export(EList);
setring R;
kill S;
}
//--- save original iden for further use and then drop
//--- strict transform from it
list iden0=iden;
iden=delete(iden,size(iden));
if(size(#)>0)
{
//--- we are not interested in the strict transform of X
return(iden);
}
//----------------------------------------------------------------------------
// Run through all final charts and collect and identify all components of
// the strict transform
//----------------------------------------------------------------------------
//--- first final chart - to be used for initialization
def S=re[2][iden0[size(iden0)][1][1]];
setring S;
ncomps=size(EList)-size(BO[4]);
if((ncomps==1)&&(deg(std(EList[size(EList)])[1])==0))
{
ncomps=0;
}
offset=size(BO[4]);
for(i=1;i<=ncomps;i++)
{
//--- add components of strict transform
tmpList[1]=intvec(iden0[size(iden0)][1][1],size(BO[4])+i);
iden[size(iden)+1]=tmpList;
}
//--- now run through the other final charts
for(i=2;i<=size(iden0[size(iden0)]);i++)
{
if(defined(S2)){kill S2;}
def S2=re[2][iden0[size(iden0)][i][1]];
setring S2;
//--- determine common parent of this ring and re[2][iden0[size(iden0)][1][1]]
if(defined(opath)){kill opath;}
def opath=imap(S,path);
j=1;
while(opath[1,j]==path[1,j])
{
j++;
if((j>ncols(path))||(j>ncols(opath))) break;
}
if(defined(li1)){kill li1;}
list li1;
//--- fetch the components we have considered in
//--- re[2][iden0[size(iden0)][1][1]]
//--- via the resolution tree
for(k=1;k<=ncomps;k++)
{
if(defined(id1)){kill id1;}
string tempstr="EList["+string(eval(k+offset))+"]";
ideal id1=fetchInTree(re,iden0[size(iden0)][1][1],
int(leadcoef(path[1,j-1])),
iden0[size(iden0)][i][1],tempstr,iden0,1);
kill tempstr;
li1[k]=id1;
kill id1;
}
//--- do the comparison
for(k=size(BO[4])+1;k<=size(EList);k++)
{
//--- only components of the strict transform are interesting
if((size(BO[4])+1==size(EList))&&(deg(std(EList[size(EList)])[1])==0))
{
break;
}
found=0;
for(j=1;j<=size(li1);j++)
{
if((size(reduce(li1[j],std(EList[k])))==0)&&
(size(reduce(EList[k],std(li1[j])))==0))
{
//--- found a match
li1[j]=ideal(1);
iden[size(iden0)-1+j][size(iden[size(iden0)-1+j])+1]=
intvec(iden0[size(iden0)][i][1],k);
found=1;
break;
}
}
if(!found)
{
//--- no match yet, maybe there are entries not corresponding to the
//--- initialization of the list -- collected in list repair
if(!defined(repair))
{
//--- no entries in repair, we add the very first one
list repair;
repair[1]=list(intvec(iden0[size(iden0)][i][1],k));
}
else
{
//--- compare against repair, and add the item appropriately
//--- steps of comparison as before
for(c=1;c<=size(repair);c++)
{
for(d=1;d<=size(repair[c]);d++)
{
if(defined(opath)) {kill opath;}
def opath=imap(re[2][repair[c][d][1]],path);
b=0;
while(path[1,b+1]==opath[1,b+1])
{
b++;
if((b>ncols(path)-1)||(b>ncols(opath)-1)) break;
}
b=int(leadcoef(path[1,b]));
string tempstr="EList["+string(eval(repair[c][d][2]))
+"]";
if(defined(id1)){kill id1;}
ideal id1=fetchInTree(re,repair[c][d][1],b,
iden0[size(iden0)][i][1],tempstr,iden0,1);
kill tempstr;
if((size(reduce(EList[k],std(id1)))==0)&&
(size(reduce(id1,std(EList[k])))==0))
{
repair[c][size(repair[c])+1]=intvec(iden0[size(iden0)][i][1],k);
break;
}
}
if(d<=size(repair[c]))
{
break;
}
}
if(c>size(repair))
{
repair[size(repair)+1]=list(intvec(iden0[size(iden0)][i][1],k));
}
}
}
}
}
if(defined(repair))
{
//--- there were further components, add them
for(c=1;c<=size(repair);c++)
{
iden[size(iden)+1]=repair[c];
}
kill repair;
}
//--- up to now only Q-irred components - not C-irred components !!!
return(iden);
}
example
{"EXAMPLE:";
echo = 2;
ring R=0,(x,y,z),dp;
ideal I=x2+y2+z11;
list L=resolve(I);
prepEmbDiv(L);
}
///////////////////////////////////////////////////////////////////////////////
static proc decompEinX(list BO)
"Internal procedure - no help and no example available
"
{
//--- decomposition of exceptional divisor, non-embedded resolution.
//--- even a single exceptional divisor may be Q-reducible when considered
//--- as divisor on the strict transform
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,j,k,de,contact;
intmat interMat;
list dcE,tmpList,prList,sa,nullList;
string mpol,compList;
def R=basering;
ideal I;
//----------------------------------------------------------------------------
// pass to divisors on V(J) and throw away components already present as
// previous exceptional divisors
//----------------------------------------------------------------------------
for(i=1;i<=size(BO[4]);i++)
{
I=BO[4][i]+BO[2];
for(j=i+1;j<=size(BO[4]);j++)
{
sa=sat(I,BO[4][j]+BO[2]);
if(sa[2])
{
I=sa[1];
}
}
//!!! Practical improvement - not yet implemented:
//!!!hier den Input besser aufbereiten (cf. J. Wahl's example)
//!!!I[1]=x(2)^15*y(2)^9+3*x(2)^10*y(2)^6+3*x(2)^5*y(2)^3+x(2)+1;
//!!!I[2]=x(2)^8*y(2)^6+y(0);
//!!!heuristisch die Ordnung so waehlen, dass y(0) im Prinzip eliminiert
//!!!wird.
//-----------------------------------------------------------------------------
// 1) decompose exceptional divisor (over Q)
// 2) check whether there are C-reducible Q-components
// 3) if necessary, find appropriate field extension of Q to decompose
// 4) in each chart collect information in list dcE and export it
//-----------------------------------------------------------------------------
prList=primdecGTZ(I);
for(j=1;j<=size(prList);j++)
{
tmpList=grad(prList[j][2]);
de=tmpList[1];
interMat=tmpList[2];
mpol=tmpList[3];
compList=tmpList[4];
nullList=tmpList[5];
contact=Kontakt(prList[j][1],BO[2]);
tmpList=prList[j][2],de,contact,interMat,mpol,compList,nullList;
prList[j]=tmpList;
}
dcE[i]=prList;
}
return(dcE);
}
//////////////////////////////////////////////////////////////////////////////
static proc getMinpoly(poly p)
"Internal procedure - no help and no example available
"
{
//---assume that p is a polynomial in 2 variables and irreducible
//---over Q. Computes an irreducible polynomial mp in one variable
//---over Q such that p splits completely over the splitting field of mp
//---returns mp as a string
//---use a variant of the algorithm of S. Gao
def R=basering;
int i,j,k,a,b,m,n;
intvec v;
string mp="poly p=t-1;";
list Li=string(1);
list re=mp,Li,1;
//---check which variables occur in p
for(i=1;i<=nvars(basering);i++)
{
if(p!=subst(p,var(i),0)){v[size(v)+1]=i;}
}
//---the polynomial is constant
if(size(v)==1){return(re);}
//---the polynomial depends only on one variable or is homogeneous
//---in 2 variables
if((size(v)==2)||((size(v)==3)&&(homog(p))))
{
if((size(v)==3)&&(homog(p)))
{
p=subst(p,var(v[3]),1);
}
ring Rhelp=0,var(v[2]),dp;
poly p=imap(R,p);
ring Shelp=0,t,dp;
poly p=fetch(Rhelp,p);
int de=deg(p);
p=simplifyMinpoly(p);
Li=getNumZeros(p);
short=0;
mp="poly p="+string(p)+";";
re=mp,Li,de;
setring R;
return(re);
}
v=v[2..size(v)];
if(size(v)>2){ERROR("getMinpoly:input depends on more then 2 variables");}
//---the general case, the polynomial is considered as polynomial in x an y now
ring T=0,(x,y),lp;
ideal M,N;
M[nvars(R)]=0;
N[nvars(R)]=0;
M[v[1]]=x;
N[v[1]]=y;
M[v[2]]=y;
N[v[2]]=x;
map phi=R,M;
map psi=R,N;
poly p=phi(p);
poly q=psi(p);
ring Thelp=(0,x),y,dp;
poly p=imap(T,p);
poly q=imap(T,q);
n=deg(p); //---the degree with respect to y
m=deg(q); //---the degree with respect to x
setring T;
ring A=0,(u(1..m*(n+1)),v(1..(m+1)*n),x,y,t),dp;
poly f=imap(T,p);
poly g;
poly h;
for(i=0;i<=m-1;i++)
{
for(j=0;j<=n;j++)
{
g=g+u(i*(n+1)+j+1)*x^i*y^j;
}
}
for(i=0;i<=m;i++)
{
for(j=0;j<=n-1;j++)
{
h=h+v(i*n+j+1)*x^i*y^j;
}
}
poly L=f*(diff(g,y)-diff(h,x))+h*diff(f,x)-g*diff(f,y);
//---according to the theory f is absolutely irreducible if and only if
//---L(g,h)=0 has no non-trivial solution g,h
//---(g=diff(f,x),h=diff(f,y) is always a solution)
//---therefore we compute a vector space basis of G
//---G={g in Q[x,y],deg_x(g)<m,|exist h, such that L(g,h)=0}
//---dim(G)=a is the number of factors of f in C[x,y]
matrix M=coef(L,xy);
ideal J=M[2,1..ncols(M)];
option(redSB);
J=std(J);
option(noredSB);
poly gred=reduce(g,J);
ideal G;
for(i=1;i<=m*(n+1);i++)
{
if(gred!=subst(gred,u(i),0))
{
G[size(G)+1]=subst(gred,u(i),1);
}
}
for(i=1;i<=n*(m+1);i++)
{
if(gred!=subst(gred,v(i),0))
{
G[size(G)+1]=subst(gred,v(i),1);
}
}
for(i=1;i<=m*(n+1);i++)
{
G=subst(G,u(i),0);
}
for(i=1;i<=n*(m+1);i++)
{
G=subst(G,v(i),0);
}
//---the number of factors in C[x,y]
a=size(G);
for(i=1;i<=a;i++)
{
G[i]=simplify(G[i],1);
}
if(a==1)
{
//---f is absolutely irreducible
setring R;
return(re);
}
//---let g in G be any non-trivial element (g not in <diff(f,x)>)
//---according to the theory f=product over all c in C of the
//---gcd(f,g-c*diff(f,x))
//---let g_1,...,g_a be a basis of G and write
//---g*g_i=sum a_ij*g_j*diff(f,x) mod f
//---let B=(a_ij) and ch=det(t*unitmat(a)-B) the characteristic
//---polynomial then the number of distinct irreducible factors
//---of gcd(f,g-c*diff(f,x)) in C[x,y] is equal to the multiplicity
//---of c as a root of ch.
//---in our special situation (f is irreducible over Q) ch should
//---be irreducible and the different roots of ch lead to the
//---factors of f, i.e. ch is the minpoly we are looking for
poly fh=homog(f,t);
//---homogenization is used to obtain a constant matrix using lift
ideal Gh=homog(G,t);
int dh,df;
df=deg(fh);
for(i=1;i<=a;i++)
{
if(deg(Gh[i])>dh){dh=deg(Gh[i]);}
}
for(i=1;i<=a;i++)
{
Gh[i]=t^(dh-deg(Gh[i]))*Gh[i];
}
ideal GF=simplify(diff(fh,x),1)*Gh,fh;
poly ch;
matrix LI;
matrix B[a][a];
matrix E=unitmat(a);
poly gran;
ideal fac;
for(i=1;i<=a;i++)
{
LI=lift(GF,t^(df-1-dh)*Gh[i]*Gh);
B=LI[1..a,1..a];
ch=det(t*E-B);
//---irreducibility test
fac=factorize(ch,1);
if(deg(fac[1])==a)
{
ch=simplifyMinpoly(ch);
Li=getNumZeros(ch);
int de=deg(ch);
short=0;
mp="poly p="+string(ch)+";";
re=mp,Li,de;
setring R;
return(re);
}
}
ERROR("getMinpoly:not found:please send the example to the authors");
}
//////////////////////////////////////////////////////////////////////////////
static proc getNumZeros(poly p)
"Internal procedure - no help and no example available
"
{
//--- compute numerically (!!!) the zeros of the minimal polynomial
def R=basering;
ring S=0,t,dp;
poly p=imap(R,p);
def L=laguerre_solve(p,30);
//!!! practical improvement:
//!!! testen ob die Nullstellen signifikant verschieden sind
//!!! und im Notfall Genauigkeit erhoehen
list re;
int i;
for(i=1;i<=size(L);i++)
{
re[i]=string(L[i]);
}
setring R;
return(re);
}
//////////////////////////////////////////////////////////////////////////////
static
proc simplifyMinpoly(poly p)
"Internal procedure - no help and no example available
"
{
//--- describe field extension in a simple way
p=cleardenom(p);
int n=int(leadcoef(p));
int d=deg(p);
int i,k;
int re=1;
number s=1;
list L=primefactors(n);
for(i=1;i<=size(L[1]);i++)
{
k=L[2][i] mod d;
s=1/number((L[1][i])^(L[2][i] div d));
if(!k){p=subst(p,t,s*t);}
}
p=cleardenom(p);
n=int(leadcoef(subst(p,t,0)));
L=primefactors(n);
for(i=1;i<=size(L[1]);i++)
{
k=L[2][i] mod d;
s=(L[1][i])^(L[2][i] div d);
if(!k){p=subst(p,t,s*t);}
}
p=cleardenom(p);
return(p);
}
///////////////////////////////////////////////////////////////////////////////
static proc grad(ideal I)
"Internal procedure - no help and no example available
"
{
//--- computes the number of components over C
//--- for a prime ideal of height 1 over Q
def R=basering;
int n=nvars(basering);
string mp="poly p=t-1;";
string str=string(1);
list zeroList=string(1);
int i,j,k,l,d,e,c,mi;
ideal Istd=std(I);
intmat interMat;
d=dim(Istd);
if(d==-1){return(list(0,0,mp,str,zeroList));}
if(d!=1){ERROR("ideal is not one-dimensional");}
ideal Sloc=std(slocus(I));
if(deg(Sloc[1])>0)
{
//---This is only to test that in case of singularities we have only
//---one singular point which is a normal crossing
//---consider the different singular points
ideal M;
list pr=minAssGTZ(Sloc);
if(size(pr)>1){ERROR("grad:more then one singular point");}
for(l=1;l<=size(pr);l++)
{
M=std(pr[l]);
d=vdim(M);
if(d!=1)
{
//---now we have to extend the field
if(defined(S)){kill S;}
ring S=0,x(1..n),lp;
ideal M=fetch(R,M);
ideal I=fetch(R,I);
ideal jmap;
map phi=S,maxideal(1);;
ideal Mstd=std(M);
//---M has to be in general position with respect to lp, i.e.
//---vdim(M)=deg(M[1])
poly p=Mstd[1];
e=vdim(Mstd);
while(e!=deg(p))
{
jmap=randomLast(100);
phi=S,jmap;
Mstd=std(phi(M));
p=Mstd[1];
}
I=phi(I);
kill phi;
//---now it is in general position an M[1] defines the field extension
//---Q[x]/M over Q
ring Shelp=0,t,dp;
ideal helpmap;
helpmap[n]=t;
map psi=S,helpmap;
poly p=psi(p);
ring T=(0,t),x(1..n),lp;
poly p=imap(Shelp,p);
//---we are now in the polynomial ring over the field Q[x]/M
minpoly=leadcoef(p);
ideal M=imap(S,Mstd);
M=M,var(n)-t;
ideal I=fetch(S,I);
}
//---we construct a map phi which maps M to maxideal(1)
option(redSB);
ideal Mstd=-simplify(std(M),1);
option(noredSB);
for(i=1;i<=n;i++)
{
Mstd=subst(Mstd,var(i),-var(i));
M[n-i+1]=Mstd[i];
}
M=M[1..n];
//---go to the localization with respect to <x>
if(d!=1)
{
ring Tloc=(0,t),x(1..n),ds;
poly p=imap(Shelp,p);
minpoly=leadcoef(p);
ideal M=fetch(T,M);
map phi=T,M;
}
else
{
ring Tloc=0,x(1..n),ds;
ideal M=fetch(R,M);
map phi=R,M;
}
ideal I=phi(I);
ideal Istd=std(I);
mi=mi+milnor(Istd);
if(mi>l)
{
ERROR("grad:divisor is really singular");
}
setring R;
}
}
intvec ind=indepSet(Istd,1)[1];
for(i=1;i<=n;i++){if(ind[i]) break;}
//---the i-th variable is the independent one
ring Shelp=0,x(1..n),dp;
ideal I=fetch(R,I);
if(defined(S)){kill S;}
if(i==1){ring S=(0,x(1)),x(2..n),lp;}
if(i==n){ring S=(0,x(n)),x(1..n-1),lp;}
if((i!=1)&&(i!=n)){ring S=(0,x(i)),(x(1..i-1),x(i+1..n)),lp;}
//---I is zero-dimensional now
ideal I=imap(Shelp,I);
ideal Istd=std(I);
ideal jmap;
map phi;
poly p=Istd[1];
e=vdim(Istd);
if(e==1)
{
setring R;
str=string(I);
list resi=1,interMat,mp,str,zeroList;
return(resi);
}
//---move I to general position with respect to lp
if(e!=deg(p))
{
jmap=randomLast(5);
phi=S,jmap;
Istd=std(phi(I));
p=Istd[1];
}
while(e!=deg(p))
{
jmap=randomLast(100);
phi=S,jmap;
Istd=std(phi(I));
p=Istd[1];
}
setring Shelp;
poly p=imap(S,p);
list Q=getMinpoly(p);
int de=Q[3];
mp=Q[1];
//!!!diese Stelle effizienter machen
//!!!minAssGTZ vermeiden durch direkte Betrachtung von
//!!!p und mp und evtl. Quotientenbildung
//!!!bisher nicht zeitkritisch
string Tesr="ring Tes=(0,t),("+varstr(R)+"),dp;";
execute(Tesr);
execute(mp);
minpoly=leadcoef(p);
ideal I=fetch(R,I);
list pr=minAssGTZ(I);
ideal allgEbene=randomLast(100)[nvars(basering)];
int minpts=vdim(std(I+allgEbene));
ideal tempi;
j=1;
for(i=1;i<=size(pr);i++)
{
tempi=std(pr[i]+allgEbene);
if(vdim(tempi)<minpts)
{
minpts=vdim(tempi);
j=i;
}
}
tempi=pr[j];
str=string(tempi);
kill interMat;
setring R;
intmat interMat[de][de]=intersComp(str,mp,Q[2],str,mp,Q[2]);
list resi=de,interMat,mp,str,Q[2];
return(resi);
}
////////////////////////////////////////////////////////////////////////////
static proc Kontakt(ideal I, ideal K)
"Internal procedure - no help and no example available
"
{
//---Let K be a prime ideal and I an ideal not contained in K
//---computes a maximalideal M=<x(1)-a1,...,x(n)-an>, ai in a field
//---extension of Q, containing I+K and an integer a
//---such that in the localization of the polynomial ring with
//---respect to M the ideal I is not contained in K+M^a+1 but in M^a in
def R=basering;
int n=nvars(basering);
int i,j,k,d,e;
ideal J=std(I+K);
if(dim(J)==-1){return(0);}
ideal W;
//---choice of the maximal ideal M
for(i=1;i<=n;i++)
{
W=std(J,var(i));
d=dim(W);
if(d==0) break;
}
i=1;k=2;
while((d)&&(i<n))
{
W=std(J,var(i)+var(k));
d=dim(W);
if(k==n){i++;k=i;}
if(k<n){k++;}
}
while(d)
{
W=std(J,randomid(maxideal(1))[1]);
d=dim(W);
}
//---now we have a collection om maximalideals and choose one with dim Q[x]/M
//---minimal
list pr=minAssGTZ(W);
d=vdim(std(pr[1]));
k=1;
for(i=2;i<=size(pr);i++)
{
if(d==1) break;
e=vdim(std(pr[i]));
if(e<d){k=i;d=e;}
}
//---M is fixed now
//---if dim Q[x]/M =1 we localize at M
ideal M=pr[k];
if(d!=1)
{
//---now we have to extend the field
if(defined(S)){kill S;}
ring S=0,x(1..n),lp;
ideal M=fetch(R,M);
ideal I=fetch(R,I);
ideal K=fetch(R,K);
ideal jmap;
map phi=S,maxideal(1);;
ideal Mstd=std(M);
//---M has to be in general position with respect to lp, i.e.
//---vdim(M)=deg(M[1])
poly p=Mstd[1];
e=vdim(Mstd);
while(e!=deg(p))
{
jmap=randomLast(100);
phi=S,jmap;
Mstd=std(phi(M));
p=Mstd[1];
}
I=phi(I);
K=phi(K);
kill phi;
//---now it is in general position an M[1] defines the field extension
//---Q[x]/M over Q
ring Shelp=0,t,dp;
ideal helpmap;
helpmap[n]=t;
map psi=S,helpmap;
poly p=psi(p);
ring T=(0,t),x(1..n),lp;
poly p=imap(Shelp,p);
//---we are now in the polynomial ring over the field Q[x]/M
minpoly=leadcoef(p);
ideal M=imap(S,Mstd);
M=M,var(n)-t;
ideal I=fetch(S,I);
ideal K=fetch(S,K);
}
//---we construct a map phi which maps M to maxideal(1)
option(redSB);
ideal Mstd=-simplify(std(M),1);
option(noredSB);
for(i=1;i<=n;i++)
{
Mstd=subst(Mstd,var(i),-var(i));
M[n-i+1]=Mstd[i];
}
M=M[1..n];
//---go to the localization with respect to <x>
if(d!=1)
{
ring Tloc=(0,t),x(1..n),ds;
poly p=imap(Shelp,p);
minpoly=leadcoef(p);
ideal M=fetch(T,M);
map phi=T,M;
}
else
{
ring Tloc=0,x(1..n),ds;
ideal M=fetch(R,M);
map phi=R,M;
}
ideal K=phi(K);
ideal I=phi(I);
//---compute the order of I in (Q[x]/M)[[x]]/K
k=1;d=0;
while(!d)
{
k++;
d=size(reduce(I,std(maxideal(k)+K)));
}
setring R;
return(k-1);
}
example
{"EXAMPLE:";
echo = 2;
ring r = 0,(x,y,z),dp;
ideal I=x4+z4+1;
ideal K=x+y2+z2;
Kontakt(I,K);
}
//////////////////////////////////////////////////////////////////////////////
static proc abstractNC(list BO)
"Internal procedure - no help and no example available
"
{
//--- check normal crossing property
//--- used for passing from embedded to non-embedded resolution
//----------------------------------------------------------------------------
// Initialization
//----------------------------------------------------------------------------
int i,k,j,flag;
list L;
ideal J;
if(dim(std(cent))>0){return(1);}
//----------------------------------------------------------------------------
// check each exceptional divisor on V(J)
//----------------------------------------------------------------------------
for(i=1;i<=size(BO[4]);i++)
{
if(dim(std(BO[2]+BO[4][i]))>0)
{
//--- really something to do
J=radical(BO[4][i]+BO[2]);
if(deg(std(slocus(J))[1])!=0)
{
if(!nodes(J))
{
//--- really singular, not only nodes ==> not normal crossing
return(0);
}
}
for(k=1;k<=size(L);k++)
{
//--- run through previously considered divisors
//--- we do not want to bother with the same one twice
if((size(reduce(J,std(L[k])))==0)&&(size(reduce(L[k],std(J)))==0))
{
//--- already considered this one
flag=1;break;
}
//--- drop previously considered exceptional divisors from the current one
J=sat(J,L[k])[1];
if(deg(std(J)[1])==0)
{
//--- nothing remaining
flag=1;break;
}
}
if(flag==0)
{
//--- add exceptional divisor to the list
L[size(L)+1]=J;
}
flag=0;
}
}
//---------------------------------------------------------------------------
// check intersection properties between different exceptional divisors
//---------------------------------------------------------------------------
for(k=1;k<size(L);k++)
{
for(i=k+1;i<=size(L);i++)
{
if(!nodes(intersect(L[k],L[i])))
{
//--- divisors Ek and Ei do not meet in a node but in a singularity
//--- which is not allowed to occur ==> not normal crossing
return(0);
}
for(j=i+1;j<=size(L);j++)
{
if(deg(std(L[i]+L[j]+L[k])[1])>0)
{
//--- three divisors meet simultaneously ==> not normal crossing
return(0);
}
}
}
}
//--- we reached this point ==> normal crossing
return(1);
}
//////////////////////////////////////////////////////////////////////////////
static proc nodes(ideal J)
"Internal procedure - no help and no example available
"
{
//--- check whether at most nodes occur as singularities
ideal K=std(slocus(J));
if(deg(K[1])==0){return(1);}
if(dim(K)>0){return(0);}
if(vdim(K)!=vdim(std(radical(K)))){return(0);}
return(1);
}
//////////////////////////////////////////////////////////////////////////////
proc intersectionDiv(list re)
"USAGE: intersectionDiv(L);
@* L = list of rings
ASSUME: L is output of resolution of singularities
(only case of isolated surface singularities)
COMPUTE: intersection matrix and genera of the exceptional divisors
(considered as curves on the strict transform)
RETURN: list l, where
l[1]: intersection matrix of exceptional divisors
l[2]: intvec, genera of exceptional divisors
l[3]: divisorList, encoding the identification of the divisors
EXAMPLE: example intersectionDiv; shows an example
"
{
//----------------------------------------------------------------------------
//--- Computes in case of surface singularities (non-embedded resolution):
//--- the intersection of the divisors (on the surface)
//--- assuming that re=resolve(J)
//----------------------------------------------------------------------------
def R=basering;
//---Test whether we are in the irreducible surface case
def S=re[2][1];
setring S;
BO[2]=BO[2]+BO[1]; // make sure we are living in the smooth W
if(dim(std(BO[2]))!=2)
{
ERROR("The given original object is not a surface");
}
if(dim(std(slocus(BO[2])))>0)
{
ERROR("The given original object has non-isolated singularities.");
}
setring R;
//----------------------------------------------------------------------------
// Compute a non-embedded resolution from the given embedded one by
// dropping redundant trailing blow-ups
//----------------------------------------------------------------------------
list resu,tmpiden,templist;
intvec divcomp;
int i,j,k,offset1,offset2,a,b,c,d,q,found;
//--- compute non-embedded resolution
list abst=abstractR(re);
intvec endiv=abst[1];
intvec deleted=abst[2];
//--- identify the divisors in the various final charts
list iden=collectDiv(re,deleted)[2];
// list of final divisors
list iden0=iden; // backup copy of iden for later use
iden=delete(iden,size(iden)); // drop list of endRings from iden
//---------------------------------------------------------------------------
// In iden, only the final charts should be listed, whereas iden0 contains
// everything.
//---------------------------------------------------------------------------
for(i=1;i<=size(iden);i++)
{
k=size(iden[i]);
tmpiden=iden[i];
for(j=k;j>0;j--)
{
if(!endiv[iden[i][j][1]])
{
//---not a final chart
tmpiden=delete(tmpiden,j);
}
}
if(size(tmpiden)==0)
{
//--- oops, this divisor does not appear in final charts
iden=delete(iden,i);
continue;
}
else
{
iden[i]=tmpiden;
}
}
//---------------------------------------------------------------------------
// Even though the exceptional divisors were irreducible in the embedded
// case, they may very well have become reducible after intersection with
// the strict transform of the original object.
// ===> compute a decomposition for each divisor in each of the final charts
// and change the entries of iden accordingly
// In particular, it is important to keep track of the identification of the
// components of the divisors in each of the charts
//---------------------------------------------------------------------------
int n=size(iden);
for(i=1;i<=size(re[2]);i++)
{
if(endiv[i])
{
def SN=re[2][i];
setring SN;
if(defined(dcE)){kill dcE;}
list dcE=decompEinX(BO); // decomposition of exceptional divisors
export(dcE);
setring R;
kill SN;
}
}
if(defined(tmpiden)){kill tmpiden;}
list tmpiden=iden;
for(i=1;i<=size(iden);i++)
{
for(j=size(iden[i]);j>0;j--)
{
def SN=re[2][iden[i][j][1]];
setring SN;
if(size(dcE[iden[i][j][2]])==1)
{
if(dcE[iden[i][j][2]][1][2]==0)
{
tmpiden[i]=delete(tmpiden[i],j);
}
}
setring R;
kill SN;
}
}
for(i=size(tmpiden);i>0;i--)
{
if(size(tmpiden[i])==0)
{
tmpiden=delete(tmpiden,i);
}
}
iden=tmpiden;
kill tmpiden;
list tmpiden;
//--- change entries of iden accordingly
for(i=1;i<=size(iden);i++)
{
//--- first set up new entries in iden if necessary - using the first chart
//--- in which we see the respective exceptional divisor
if(defined(S)){kill S;}
def S=re[2][iden[i][1][1]];
//--- considering first entry for i-th divisor
setring S;
a=size(dcE[iden[i][1][2]]);
for(j=1;j<=a;j++)
{
//--- reducible - add to the list considering each component as an exceptional
//--- divisor in its own right
list tl;
tl[1]=intvec(iden[i][1][1],iden[i][1][2],j);
tmpiden[size(tmpiden)+1]=tl;
kill tl;
}
//--- now identify the components in the other charts w.r.t. the ones in the
//--- first chart which have already been added to the list
for(j=2;j<=size(iden[i]);j++)
{
//--- considering remaining entries for the same original divisor
if(defined(S2)){kill S2;}
def S2=re[2][iden[i][j][1]];
setring S2;
//--- determine common parent of this ring and re[2][iden[i][1][1]]
if(defined(opath)){kill opath;}
def opath=imap(S,path);
b=1;
while(opath[1,b]==path[1,b])
{
b++;
if((b>ncols(path))||(b>ncols(opath))) break;
}
if(defined(li1)){kill li1;}
list li1;
//--- fetch the components we have considered in re[2][iden[i][1][1]]
//--- via the resolution tree
for(k=1;k<=a;k++)
{
string tempstr="dcE["+string(eval(iden[i][1][2]))+"]["+string(k)+"][1]";
if(defined(id1)){kill id1;}
ideal id1=fetchInTree(re,iden[i][1][1],int(leadcoef(path[1,b-1])),
iden[i][j][1],tempstr,iden0,1);
kill tempstr;
li1[k]=radical(id1); // for comparison only the geometric
// object matters
kill id1;
}
//--- compare the components we have fetched with the components in the
//--- current ring
for(k=1;k<=size(dcE[iden[i][j][2]]);k++)
{
found=0;
for(b=1;b<=size(li1);b++)
{
if((size(reduce(li1[b],std(dcE[iden[i][j][2]][k][1])))==0)&&
(size(reduce(dcE[iden[i][j][2]][k][1],std(li1[b]+BO[2])))==0))
{
li1[b]=ideal(1);
tmpiden[size(tmpiden)-a+b][size(tmpiden[size(tmpiden)-a+b])+1]=
intvec(iden[i][j][1],iden[i][j][2],k);
found=1;
break;
}
}
if(!found)
{
if(!defined(repair))
{
list repair;
repair[1]=list(intvec(iden[i][j][1],iden[i][j][2],k));
}
else
{
for(c=1;c<=size(repair);c++)
{
for(d=1;d<=size(repair[c]);d++)
{
if(defined(opath)) {kill opath;}
def opath=imap(re[2][repair[c][d][1]],path);
q=0;
while(path[1,q+1]==opath[1,q+1])
{
q++;
if((q>ncols(path)-1)||(q>ncols(opath)-1)) break;
}
q=int(leadcoef(path[1,q]));
string tempstr="dcE["+string(eval(repair[c][d][2]))+"]["+string(eval(repair[c][d][3]))+"][1]";
if(defined(id1)){kill id1;}
ideal id1=fetchInTree(re,repair[c][d][1],q,
iden[i][j][1],tempstr,iden0,1);
kill tempstr;
//!!! sind die nicht schon radical?
id1=radical(id1); // for comparison
// only the geometric
// object matters
if((size(reduce(dcE[iden[i][j][2]][k][1],std(id1+BO[2])))==0)&&
(size(reduce(id1+BO[2],std(dcE[iden[i][j][2]][k][1])))==0))
{
repair[c][size(repair[c])+1]=intvec(iden[i][j][1],iden[i][j][2],k);
break;
}
}
if(d<=size(repair[c]))
{
break;
}
}
if(c>size(repair))
{
repair[size(repair)+1]=list(intvec(iden[i][j][1],iden[i][j][2],k));
}
}
}
}
}
if(defined(repair))
{
for(c=1;c<=size(repair);c++)
{
tmpiden[size(tmpiden)+1]=repair[c];
}
kill repair;
}
}
setring R;
for(i=size(tmpiden);i>0;i--)
{
if(size(tmpiden[i])==0)
{
tmpiden=delete(tmpiden,i);
continue;
}
}
iden=tmpiden; // store the modified divisor list
kill tmpiden; // and clean up temporary objects
//---------------------------------------------------------------------------
// Now we have decomposed everything into irreducible components over Q,
// but over C there might still be some reducible ones left:
// Determine the number of components over C.
//---------------------------------------------------------------------------
n=0;
for(i=1;i<=size(iden);i++)
{
if(defined(S)) {kill S;}
def S=re[2][iden[i][1][1]];
setring S;
divcomp[i]=ncols(dcE[iden[i][1][2]][iden[i][1][3]][4]);
// number of components of the Q-irreducible curve dcE[iden[i][1][2]]
n=n+divcomp[i];
setring R;
}
//---------------------------------------------------------------------------
// set up the entries Inters[i,j] , i!=j, in the intersection matrix:
// we have to compute the intersection of the exceptional divisors (over C)
// i.e. we have to work in over appropriate algebraic extension of Q.
// (1) plug the intersection matrices of the components of the same Q-irred.
// divisor into the correct position in the intersection matrix
// (2) for comparison of Ei,k and Ej,l move to a chart where both divisors
// are present, fetch the components from the very first chart containing
// the respective divisor and then compare by using intersComp
// (4) put the result into the correct position in the integer matrix Inters
//---------------------------------------------------------------------------
//--- some initialization
int comPai,comPaj;
intvec v,w;
intmat Inters[n][n];
//--- run through all Q-irreducible exceptional divisors
for(i=1;i<=size(iden);i++)
{
if(divcomp[i]>1)
{
//--- (1) put the intersection matrix for Ei,k with Ei,l into the correct place
for(k=1;k<=size(iden[i]);k++)
{
if(defined(tempmat)){kill tempmat;}
intmat tempmat=imap(re[2][iden[i][k][1]],dcE)[iden[i][k][2]][iden[i][k][3]][4];
if(size(ideal(tempmat))!=0)
{
Inters[i+offset1..(i+offset1+divcomp[i]-1),
i+offset1..(i+offset1+divcomp[i]-1)]=
tempmat[1..nrows(tempmat),1..ncols(tempmat)];
break;
}
kill tempmat;
}
}
offset2=offset1+divcomp[i]-1;
//--- set up the components over C of the i-th exceptional divisor
if(defined(S)){kill S;}
def S=re[2][iden[i][1][1]];
setring S;
if(defined(idlisti)) {kill idlisti;}
list idlisti;
idlisti[1]=dcE[iden[i][1][2]][iden[i][1][3]][6];
export(idlisti);
setring R;
//--- run through the remaining exceptional divisors and check whether they
//--- have a chart in common with the i-th divisor
for(j=i+1;j<=size(iden);j++)
{
kill templist;
list templist;
for(k=1;k<=size(iden[i]);k++)
{
intvec tiv2=findInIVList(1,iden[i][k][1],iden[j]);
if(size(tiv2)!=1)
{
//--- tiv2[1] is a common chart for the divisors i and j
tiv2[4..6]=iden[i][k];
templist[size(templist)+1]=tiv2;
}
kill tiv2;
}
if(size(templist)==0)
{
//--- the two (Q-irred) divisors do not appear in any chart simultaneously
offset2=offset2+divcomp[j]-1;
j++;
continue;
}
for(k=1;k<=size(templist);k++)
{
if(defined(S)) {kill S;}
//--- set up the components over C of the j-th exceptional divisor
def S=re[2][iden[j][1][1]];
setring S;
if(defined(idlistj)) {kill idlistj;}
list idlistj;
idlistj[1]=dcE[iden[j][1][2]][iden[j][1][3]][6];
export(idlistj);
if(defined(opath)){kill opath;}
def opath=imap(re[2][templist[k][1]],path);
comPaj=1;
while(opath[1,comPaj]==path[1,comPaj])
{
comPaj++;
if((comPaj>ncols(opath))||(comPaj>ncols(path))) break;
}
comPaj=int(leadcoef(path[1,comPaj-1]));
setring R;
kill S;
def S=re[2][iden[i][1][1]];
setring S;
if(defined(opath)){kill opath;}
def opath=imap(re[2][templist[k][1]],path);
comPai=1;
while(opath[1,comPai]==path[1,comPai])
{
comPai++;
if((comPai>ncols(opath))||(comPai>ncols(path))) break;
}
comPai=int(leadcoef(opath[1,comPai-1]));
setring R;
kill S;
def S=re[2][templist[k][1]];
setring S;
if(defined(il)) {kill il;}
if(defined(jl)) {kill jl;}
if(defined(str1)) {kill str1;}
if(defined(str2)) {kill str2;}
string str1="idlisti";
string str2="idlistj";
attrib(str1,"algext",imap(re[2][iden[i][1][1]],dcE)[iden[i][1][2]][iden[i][1][3]][5]);
attrib(str2,"algext",imap(re[2][iden[j][1][1]],dcE)[iden[j][1][2]][iden[j][1][3]][5]);
list il=fetchInTree(re,iden[i][1][1],comPai,
templist[k][1],str1,iden0,1);
list jl=fetchInTree(re,iden[j][1][1],comPaj,
templist[k][1],str2,iden0,1);
list nulli=imap(re[2][iden[i][1][1]],dcE)[iden[i][1][2]][iden[i][1][3]][7];
list nullj=imap(re[2][iden[j][1][1]],dcE)[iden[j][1][2]][iden[j][1][3]][7];
string mpi=imap(re[2][iden[i][1][1]],dcE)[iden[i][1][2]][iden[i][1][3]][5];
string mpj=imap(re[2][iden[j][1][1]],dcE)[iden[j][1][2]][iden[j][1][3]][5];
if(defined(tintMat)){kill tintMat;}
intmat tintMat=intersComp(il[1],mpi,nulli,jl[1],mpj,nullj);
kill mpi;
kill mpj;
kill nulli;
kill nullj;
for(a=1;a<=divcomp[i];a++)
{
for(b=1;b<=divcomp[j];b++)
{
if(tintMat[a,b]!=0)
{
Inters[i+offset1+a-1,j+offset2+b-1]=tintMat[a,b];
Inters[j+offset2+b-1,i+offset1+a-1]=tintMat[a,b];
}
}
}
}
offset2=offset2+divcomp[j]-1;
}
offset1=offset1+divcomp[i]-1;
}
Inters=addSelfInter(re,Inters,iden,iden0,endiv);
intvec GenusIden;
list tl_genus;
a=1;
for(i=1;i<=size(iden);i++)
{
tl_genus=genus_E(re,iden0,iden[i][1]);
for(j=1;j<=tl_genus[2];j++)
{
GenusIden[a]=tl_genus[1];
a++;
}
}
list retlist=Inters,GenusIden,iden,divcomp;
return(retlist);
}
example
{"EXAMPLE:";
echo = 2;
ring r = 0,(x(1..3)),dp(3);
ideal J=x(3)^5+x(2)^4+x(1)^3+x(1)*x(2)*x(3);
list re=resolve(J);
list di=intersectionDiv(re);
di;
}
//////////////////////////////////////////////////////////////////////////////
static proc intersComp(string str1,
string mp1,
list null1,
string str2,
string mp2,
list null2)
"Internal procedure - no help and no example available
"
{
//--- format of input
//--- str1 : ideal (over field extension 1)
//--- mp1 : minpoly of field extension 1
//--- null1: numerical zeros of minpoly
//--- str2 : ideal (over field extension 2)
//--- mp2 : minpoly of field extension 2
//--- null2: numerical zeros of minpoly
//--- determine intersection matrix of the C-components defined by the input
//---------------------------------------------------------------------------
// Initialization
//---------------------------------------------------------------------------
int ii,jj,same;
def R=basering;
intmat InterMat[size(null1)][size(null2)];
ring ringst=0,(t,s),dp;
//---------------------------------------------------------------------------
// Add new variables s and t and compare the minpolys and ideals
// to find out whether they are identical
//---------------------------------------------------------------------------
def S=R+ringst;
setring S;
if((mp1==mp2)&&(str1==str2))
{
same=1;
}
//--- define first Q-component/C-components, substitute t by s
string tempstr="ideal id1="+str1+";";
execute(tempstr);
execute(mp1);
id1=subst(id1,t,s);
poly q=subst(p,t,s);
kill p;
//--- define second Q-component/C-components
tempstr="ideal id2="+str2+";";
execute(tempstr);
execute(mp2);
//--- do the intersection
ideal interId=id1+id2+ideal(p)+ideal(q);
if(same)
{
interId=quotient(interId,t-s);
}
interId=std(interId);
//--- refine the comparison by passing to each of the numerical zeros
//--- of the two minpolys
ideal stid=nselect(interId,1..nvars(R));
ring compl_st=complex,(s,t),dp;
def stid=imap(S,stid);
ideal tempid,tempid2;
for(ii=1;ii<=size(null1);ii++)
{
tempstr="number numi="+null1[ii]+";";
execute(tempstr);
tempid=subst(stid,s,numi);
kill numi;
for(jj=1;jj<=size(null2);jj++)
{
tempstr="number numj="+null2[jj]+";";
execute(tempstr);
tempid2=subst(tempid,t,numj);
kill numj;
if(size(tempid2)==0)
{
InterMat[ii,jj]=1;
}
}
}
//--- sanity check; as both Q-components were Q-irreducible,
//--- summation over all entries of a single row must lead to the same
//--- result, no matter which row is chosen
//--- dito for the columns
int cou,cou1;
for(ii=1;ii<=ncols(InterMat);ii++)
{
cou=0;
for(jj=1;jj<=nrows(InterMat);jj++)
{
cou=cou+InterMat[jj,ii];
}
if(ii==1){cou1=cou;}
if(cou1!=cou){ERROR("intersComp:matrix has wrong entries");}
}
for(ii=1;ii<=nrows(InterMat);ii++)
{
cou=0;
for(jj=1;jj<=ncols(InterMat);jj++)
{
cou=cou+InterMat[ii,jj];
}
if(ii==1){cou1=cou;}
if(cou1!=cou){ERROR("intersComp:matrix has wrong entries");}
}
return(InterMat);
}
/////////////////////////////////////////////////////////////////////////////
static proc addSelfInter(list re,intmat Inters,list iden,list iden0,intvec endiv)
"Internal procedure - no help and no example available
"
{
//---------------------------------------------------------------------------
// Initialization
//---------------------------------------------------------------------------
def R=basering;
int i,j,k,l,a,b;
int n=size(iden);
intvec v,w;
list satlist;
def T=re[2][1];
setring T;
poly p;
p=var(1); //any linear form will do,
//but this one is most convenient
ideal F=ideal(p);
//----------------------------------------------------------------------------
// lift linear form to every end ring, determine the multiplicity of
// the exceptional divisors and store it in Flist
//----------------------------------------------------------------------------
list templist;
intvec tiv;
for(i=1;i<=size(endiv);i++)
{
if(endiv[i]==1)
{
kill v;
intvec v;
a=0;
if(defined(S)) {kill S;}
def S=re[2][i];
setring S;
map resi=T,BO[5];
ideal F=resi(F)+BO[2];
ideal Ftemp=F;
list Flist;
if(defined(satlist)){kill satlist;}
list satlist;
for(a=1;a<=size(dcE);a++)
{
for(b=1;b<=size(dcE[a]);b++)
{
Ftemp=sat(Ftemp,dcE[a][b][1])[1];
}
}
F=sat(F,Ftemp)[1];
Flist[1]=Ftemp;
Ftemp=1;
list pr=primdecGTZ(F);
v[size(pr)]=0;
for(j=1;j<=size(pr);j++)
{
for(a=1;a<=size(dcE);a++)
{
if(j==1)
{
kill tiv;
intvec tiv;
tiv[size(dcE[a])]=0;
templist[a]=tiv;
if(v[j]==1)
{
a++;
continue;
}
}
if(dcE[a][1][2]==0)
{
a++;
continue;
}
for(b=1;b<=size(dcE[a]);b++)
{
if((size(reduce(dcE[a][b][1],std(pr[j][2])))==0)&&
(size(reduce(pr[j][2],std(dcE[a][b][1])))==0))
{
templist[a][b]=Vielfachheit(pr[j][1],pr[j][2]);
v[j]=1;
break;
}
}
if((v[j]==1)&&(j>1)) break;
}
}
kill v;
intvec v;
Flist[2]=templist;
}
}
//-----------------------------------------------------------------------------
// Now set up all the data:
// 1. run through all exceptional divisors in iden and determine the
// coefficients c_i of the divisor of F. ===> civ
// 2. determine the intersection locus of F^bar and the Ei and from this data
// the F^bar.Ei . ===> intF
//-----------------------------------------------------------------------------
intvec civ;
intvec intF;
intF[ncols(Inters)]=0;
int offset,comPa,ncomp,vd;
for(i=1;i<=size(iden);i++)
{
ncomp=0;
for(j=1;j<=size(iden[i]);j++)
{
if(defined(S)) {kill S;}
def S=re[2][iden[i][j][1]];
setring S;
if((size(civ)<i+offset+1)&&
(((Flist[2][iden[i][j][2]][iden[i][j][3]])!=0)||(j==size(iden[i]))))
{
ncomp=ncols(dcE[iden[i][j][2]][iden[i][j][3]][4]);
for(k=1;k<=ncomp;k++)
{
civ[i+offset+k]=Flist[2][iden[i][j][2]][iden[i][j][3]];
if(deg(std(slocus(dcE[iden[i][j][2]][iden[i][j][3]][1]))[1])>0)
{
civ[i+offset+k]=civ[i+k];
}
}
}
if(defined(interId)) {kill interId;}
ideal interId=dcE[iden[i][j][2]][iden[i][j][3]][1]+Flist[1];
if(defined(interList)) {kill interList;}
list interList;
interList[1]=string(interId);
interList[2]=ideal(0);
export(interList);
if(defined(doneId)) {kill doneId;}
if(defined(tempId)) {kill tempId;}
ideal doneId=ideal(1);
if(defined(dl)) {kill dl;}
list dl;
for(k=1;k<j;k++)
{
if(defined(St)) {kill St;}
def St=re[2][iden[i][k][1]];
setring St;
if(defined(str)){kill str;}
string str="interId="+interList[1]+";";
execute(str);
if(deg(std(interId)[1])==0)
{
setring S;
k++;
continue;
}
setring S;
if(defined(opath)) {kill opath;}
def opath=imap(re[2][iden[i][k][1]],path);
comPa=1;
while(opath[1,comPa]==path[1,comPa])
{
comPa++;
if((comPa>ncols(path))||(comPa>ncols(opath))) break;
}
comPa=int(leadcoef(path[1,comPa-1]));
if(defined(str)) {kill str;}
string str="interList";
attrib(str,"algext","poly p=t-1;");
dl=fetchInTree(re,iden[i][k][1],comPa,iden[i][j][1],str,iden0,1);
if(defined(tempId)){kill tempId;}
str="ideal tempId="+dl[1]+";";
execute(str);
doneId=intersect(doneId,tempId);
str="interId="+interList[1]+";";
execute(str);
interId=sat(interId,doneId)[1];
interList[1]=string(interId);
}
interId=std(interId);
if(dim(interId)>0)
{
"oops, intersection not a set of points";
~;
}
vd=vdim(interId);
if(vd>0)
{
for(k=i+offset;k<=i+offset+ncomp-1;k++)
{
intF[k]=intF[k]+(vd div ncomp);
}
}
}
offset=size(civ)-i-1;
}
if(defined(tiv)){kill tiv;}
intvec tiv=civ[2..size(civ)];
civ=tiv;
kill tiv;
//-----------------------------------------------------------------------------
// Using the F_total= sum c_i Ei + F^bar, the intersection matrix Inters and
// the f^bar.Ei, determine the selfintersection numbers of the Ei from the
// equation F_total.Ei=0 and store it in the diagonal of Inters.
//-----------------------------------------------------------------------------
intvec diag=Inters*civ+intF;
for(i=1;i<=size(diag);i++)
{
Inters[i,i]=-diag[i] div civ[i];
}
return(Inters);
}
//////////////////////////////////////////////////////////////////////////////
static proc invSort(list re, list #)
"Internal procedure - no help and no example available
"
{
int i,j,k,markier,EZeiger,offset;
intvec v,e;
intvec deleted;
if(size(#)>0)
{
deleted=#[1];
}
else
{
deleted[size(re[2])]=0;
}
list LE,HI;
def R=basering;
//----------------------------------------------------------------------------
// Go through all rings
//----------------------------------------------------------------------------
for(i=1;i<=size(re[2]);i++)
{
if(deleted[i]){i++;continue}
def S=re[2][i];
setring S;
//----------------------------------------------------------------------------
// Determine Invariant
//----------------------------------------------------------------------------
if((size(BO[3])==size(BO[9]))||(size(BO[3])==size(BO[9])+1))
{
if(defined(merk2)){kill merk2;}
intvec merk2;
EZeiger=0;
for(j=1;j<=size(BO[9]);j++)
{
offset=0;
if(BO[7][j]==-1)
{
BO[7][j]=size(BO[4])-EZeiger;
}
for(k=EZeiger+1;(k<=EZeiger+BO[7][j])&&(k<=size(BO[4]));k++)
{
if(BO[6][k]==2)
{
offset++;
}
}
EZeiger=EZeiger+BO[7][1];
merk2[3*j-2]=BO[3][j];
merk2[3*j-1]=BO[9][j]-offset;
if(size(invSat[2])>j)
{
merk2[3*j]=-invSat[2][j];
}
else
{
if(j<size(BO[9]))
{
"!!!!!problem with invSat";~;
}
}
}
if((size(BO[3])>size(BO[9])))
{
merk2[size(merk2)+1]=BO[3][size(BO[3])];
}
if((size(merk2)%3)==0)
{
intvec tintvec=merk2[1..size(merk2)-1];
merk2=tintvec;
kill tintvec;
}
}
else
{
ERROR("This situation should not occur, please send the example
to the authors.");
}
//----------------------------------------------------------------------------
// Save invariant describing current center as an object in this ring
// We also store information on the intersection with the center and the
// exceptional divisors
//----------------------------------------------------------------------------
cent=std(cent);
kill e;
intvec e;
for(j=1;j<=size(BO[4]);j++)
{
if(size(reduce(BO[4][j],std(cent+BO[1])))==0)
{
e[j]=1;
}
else
{
e[j]=0;
}
}
if(size(ideal(merk2))==0)
{
markier=1;
}
if((size(merk2)%3==0)&&(merk2[size(merk2)]==0))
{
intvec blabla=merk2[1..size(merk2)-1];
merk2=blabla;
kill blabla;
}
if(defined(invCenter)){kill invCenter;}
list invCenter=cent,merk2,e;
export invCenter;
//----------------------------------------------------------------------------
// Insert it into correct place in the list
//----------------------------------------------------------------------------
if(i==1)
{
if(!markier)
{
HI=intvec(merk2[1]+1),intvec(1);
}
else
{
HI=intvec(778),intvec(1); // some really large integer
// will be changed at the end!!!
}
LE[1]=HI;
i++;
setring R;
kill S;
continue;
}
if(markier==1)
{
if(i==2)
{
HI=intvec(777),intvec(2); // same really large integer-1
LE[2]=HI;
i++;
setring R;
kill S;
continue;
}
else
{
if(ncols(path)==2)
{
LE[2][2][size(LE[2][2])+1]=i;
i++;
setring R;
kill S;
continue;
}
else
{
markier=0;
}
}
}
j=1;
def SOld=re[2][int(leadcoef(path[1,ncols(path)]))];
setring SOld;
merk2=invCenter[2];
setring S;
kill SOld;
while(merk2<LE[j][1])
{
j++;
if(j>size(LE)) break;
}
HI=merk2,intvec(i);
if(j<=size(LE))
{
if(merk2>LE[j][1])
{
LE=insert(LE,HI,j-1);
}
else
{
while((merk2==LE[j][1])&&(size(merk2)<size(LE[j][1])))
{
j++;
if(j>size(LE)) break;
}
if(j<=size(LE))
{
if((merk2!=LE[j][1])||(size(merk2)!=size(LE[j][1])))
{
LE=insert(LE,HI,j-1);
}
else
{
LE[j][2][size(LE[j][2])+1]=i;
}
}
else
{
LE[size(LE)+1]=HI;
}
}
}
else
{
LE[size(LE)+1]=HI;
}
setring R;
kill S;
}
if((LE[1][1]==intvec(778)) && (size(LE)>2))
{
LE[1][1]=intvec(LE[3][1][1]+2); // by now we know what 'sufficiently
LE[2][1]=intvec(LE[3][1][1]+1); // large' is
}
return(LE);
}
example
{"EXAMPLE:";
echo = 2;
ring r = 0,(x(1..3)),dp(3);
ideal J=x(1)^3-x(1)*x(2)^3+x(3)^2;
list re=resolve(J,1);
list di=invSort(re);
di;
}
/////////////////////////////////////////////////////////////////////////////
static proc addToRE(intvec v,int x,list RE)
"Internal procedure - no help and no example available
"
{
//--- auxilliary procedure for collectDiv,
//--- inserting an entry at the correct place
int i=1;
while(i<=size(RE))
{
if(v==RE[i][1])
{
RE[i][2][size(RE[i][2])+1]=x;
return(RE);
}
if(v>RE[i][1])
{
list templist=v,intvec(x);
RE=insert(RE,templist,i-1);
return(RE);
}
i++;
}
list templist=v,intvec(x);
RE=insert(RE,templist,size(RE));
return(RE);
}
////////////////////////////////////////////////////////////////////////////
proc collectDiv(list re,list #)
"USAGE: collectDiv(L);
@* L = list of rings
ASSUME: L is output of resolution of singularities
COMPUTE: list representing the identification of the exceptional divisors
in the various charts
RETURN: list l, where
l[1]: intmat, entry k in position i,j implies BO[4][j] of chart i
is divisor k (if k!=0)
if k==0, no divisor corresponding to i,j
l[2]: list ll, where each entry of ll is a list of intvecs
entry i,j in list ll[k] implies BO[4][j] of chart i
is divisor k
l[3]: list L
EXAMPLE: example collectDiv; shows an example
"
{
//------------------------------------------------------------------------
// Initialization
//------------------------------------------------------------------------
int i,j,k,l,m,maxk,maxj,mPa,oPa,interC,pa,ignoreL,iTotal;
int mLast,oLast=1,1;
intvec deleted;
//--- sort the rings by the invariant which controlled the last of the
//--- exceptional divisors
if(size(#)>0)
{
deleted=#[1];
}
else
{
deleted[size(re[2])]=0;
}
list LE=invSort(re,deleted);
list LEtotal=LE;
intmat M[size(re[2])][size(re[2])];
intvec invar,tempiv;
def R=basering;
list divList;
list RE,SE;
intvec myEi,otherEi,tempe;
int co=2;
while(size(LE)>0)
{
//------------------------------------------------------------------------
// Run through the sorted list LE whose entries are lists containing
// the invariant and the numbers of all rings corresponding to it
//------------------------------------------------------------------------
for(i=co;i<=size(LE);i++)
{
//--- i==1 in first iteration:
//--- the original ring which did not arise from a blow-up
//--- hence there are no exceptional divisors to be identified there ;
//------------------------------------------------------------------------
// For each fixed value of the invariant, run through all corresponding
// rings
//------------------------------------------------------------------------
for(l=1;l<=size(LE[i][2]);l++)
{
if(defined(S)){kill S;}
def S=re[2][LE[i][2][l]];
setring S;
if(size(BO[4])>maxj){maxj=size(BO[4]);}
//--- all exceptional divisors, except the last one, were previously
//--- identified - hence we can simply inherit the data from the parent ring
for(j=1;j<size(BO[4]);j++)
{
if(deg(std(BO[4][j])[1])>0)
{
k=int(leadcoef(path[1,ncols(path)]));
k=M[k,j];
if(k==0)
{
RE=addToRE(LE[i][1],LE[i][2][l],RE);
ignoreL=1;
break;
}
M[LE[i][2][l],j]=k;
tempiv=LE[i][2][l],j;
divList[k][size(divList[k])+1]=tempiv;
}
}
if(ignoreL){ignoreL=0;l++;continue;}
//----------------------------------------------------------------------------
// In the remaining part of the procedure, the identification of the last
// exceptional divisor takes place.
// Step 1: check whether there is a previously considered ring with the
// same parent; if this is the case, we can again inherit the data
// Step 1':check whether the parent had a stored center which it then used
// in this case, we are dealing with an additional component of this
// divisor: store it in the integer otherComp
// Step 2: if no appropriate ring was found in step 1, we check whether
// there is a previously considered ring, in the parent of which
// the center intersects the same exceptional divisors as the center
// in our parent.
// if such a ring does not exist: new exceptional divisor
// if it exists: see below
//----------------------------------------------------------------------------
if(path[1,ncols(path)-1]==0)
{
//--- current ring originated from very first blow-up
//--- hence exceptional divisor is the first one
M[LE[i][2][l],1]=1;
if(size(divList)>0)
{
divList[1][size(divList[1])+1]=intvec(LE[i][2][l],j);
}
else
{
divList[1]=list(intvec(LE[i][2][l],j));
}
l++;
continue;
}
if(l==1)
{
list TE=addToRE(LE[i][1],1,SE);
if(size(TE)!=size(SE))
{
//--- new value of invariant hence new exceptional divisor
SE=TE;
divList[size(divList)+1]=list(intvec(LE[i][2][l],j));
M[LE[i][2][l],j]=size(divList);
}
kill TE;
}
for(k=1;k<=size(LEtotal);k++)
{
if(LE[i][1]==LEtotal[k][1])
{
iTotal=k;
break;
}
}
//--- Step 1
k=1;
while(LEtotal[iTotal][2][k]<LE[i][2][l])
{
if(defined(tempPath)){kill tempPath;}
def tempPath=imap(re[2][LEtotal[iTotal][2][k]],path);
if(tempPath[1,ncols(tempPath)]==path[1,ncols(path)])
{
//--- Same parent, hence we inherit our data
m=size(imap(re[2][LEtotal[iTotal][2][k]],BO)[4]);
m=M[LEtotal[iTotal][2][k],m];
if(m==0)
{
RE=addToRE(LE[i][1],LE[i][2][l],RE);
ignoreL=1;
break;
}
M[LE[i][2][l],j]=m;
tempiv=LE[i][2][l],j;
divList[m][size(divList[m])+1]=tempiv;
break;
}
k++;
if(k>size(LEtotal[iTotal][2])) {break;}
}
if(ignoreL){ignoreL=0;l++;continue;}
//--- Step 1', if necessary
if(M[LE[i][2][l],j]==0)
{
int savedCent;
def SPa1=re[2][int(leadcoef(path[1,ncols(path)]))];
// parent ring
setring SPa1;
if(size(BO)>9)
{
if(size(BO[10])>0)
{
savedCent=1;
}
}
if(!savedCent)
{
def SPa2=re[2][int(leadcoef(path[1,ncols(path)]))];
map lMa=SPa2,lastMap;
// map leading from grandparent to parent
list transBO=lMa(BO);
// actually we only need BO[10], but this is an
// object not a name
list tempsat;
if(size(transBO)>9)
{
//--- there were saved centers
while((k<=size(transBO[10])) & (savedCent==0))
{
tempsat=sat(transBO[10][k][1],BO[4][size(BO[4])]);
if(deg(tempsat[1][1])!=0)
{
//--- saved center can be seen in this affine chart
if((size(reduce(tempsat[1],std(cent)))==0) &&
(size(reduce(cent,tempsat[1]))==0))
{
//--- this was the saved center which was used
savedCent=1;
}
}
k++;
}
}
kill lMa; // clean up temporary objects
kill tempsat;
kill transBO;
}
setring S; // back to the ring which we want to consider
if(savedCent==1)
{
vector otherComp=
gen(M[int(leadcoef(path[1,ncols(path)])),size(BO[4])-1]);
}
kill savedCent;
if (defined(SPa2)){kill SPa2;}
kill SPa1;
}
//--- Step 2, if necessary
if(M[LE[i][2][l],j]==0)
{
//--- we are not done after step 1 and 2
pa=int(leadcoef(path[1,ncols(path)])); // parent ring
tempe=imap(re[2][pa],invCenter)[3]; // intersection there
kill myEi;
intvec myEi;
for(k=1;k<=size(tempe);k++)
{
if(tempe[k]==1)
{
//--- center meets this exceptional divisor
myEi[size(myEi)+1]=M[pa,k];
mLast=k;
}
}
//--- ring in which the last divisor we meet is new-born
mPa=int(leadcoef(path[1,mLast+2]));
k=1;
while(LEtotal[iTotal][2][k]<LE[i][2][l])
{
//--- perform the same preparations for the ring we want to compare with
if(defined(tempPath)){kill tempPath;}
def tempPath=imap(re[2][LEtotal[iTotal][2][k]],path);
// its ancestors
tempe=imap(re[2][int(leadcoef(tempPath[1,ncols(tempPath)]))],
invCenter)[3]; // its intersections
kill otherEi;
intvec otherEi;
for(m=1;m<=size(tempe);m++)
{
if(tempe[m]==1)
{
//--- its center meets this exceptional divisor
otherEi[size(otherEi)+1]
=M[int(leadcoef(tempPath[1,ncols(tempPath)])),m];
oLast=m;
}
}
if(myEi!=otherEi)
{
//--- not the same center because of intersection properties with the
//--- exceptional divisor
k++;
if(k>size(LEtotal[iTotal][2]))
{
break;
}
else
{
continue;
}
}
//----------------------------------------------------------------------------
// Current situation:
// 1. the last exceptional divisor could not be identified by simply
// considering its parent
// 2. it could not be proved to be a new one by considering its intersections
// with previous exceptional divisors
//----------------------------------------------------------------------------
if(defined(bool1)) { kill bool1;}
int bool1=
compareE(re,LE[i][2][l],LEtotal[iTotal][2][k],divList);
if(bool1)
{
//--- found some non-empty intersection
if(bool1==1)
{
//--- it is really the same exceptional divisor
m=size(imap(re[2][LEtotal[iTotal][2][k]],BO)[4]);
m=M[LEtotal[iTotal][2][k],m];
if(m==0)
{
RE=addToRE(LE[i][1],LE[i][2][l],RE);
ignoreL=1;
break;
}
M[LE[i][2][l],j]=m;
tempiv=LE[i][2][l],j;
divList[m][size(divList[m])+1]=tempiv;
break;
}
else
{
m=size(imap(re[2][LEtotal[iTotal][2][k]],BO)[4]);
m=M[LEtotal[iTotal][2][k],m];
if(m!=0)
{
otherComp[m]=1;
}
}
}
k++;
if(k>size(LEtotal[iTotal][2]))
{
break;
}
}
if(ignoreL){ignoreL=0;l++;continue;}
if( M[LE[i][2][l],j]==0)
{
divList[size(divList)+1]=list(intvec(LE[i][2][l],j));
M[LE[i][2][l],j]=size(divList);
}
}
setring R;
kill S;
}
}
LE=RE;
co=1;
kill RE;
list RE;
}
//----------------------------------------------------------------------------
// Add the strict transform to the list of divisors at the last place
// and clean up M
//----------------------------------------------------------------------------
//--- add strict transform
for(i=1;i<=size(re[2]);i++)
{
if(defined(S)){kill S;}
def S=re[2][i];
setring S;
if(size(reduce(cent,std(BO[2])))==0)
{
tempiv=i,0;
RE[size(RE)+1]=tempiv;
}
setring R;
}
divList[size(divList)+1]=RE;
//--- drop trailing zero-columns of M
intvec iv0;
iv0[nrows(M)]=0;
for(i=ncols(M);i>0;i--)
{
if(intvec(M[1..nrows(M),i])!=iv0) break;
}
intmat N[nrows(M)][i];
for(i=1;i<=ncols(N);i++)
{
N[1..nrows(M),i]=M[1..nrows(M),i];
}
kill M;
intmat M=N;
list retlist=cleanUpDiv(re,M,divList);
return(retlist);
}
example
{"EXAMPLE:";
echo = 2;
ring R=0,(x,y,z),dp;
ideal I=xyz+x4+y4+z4;
//we really need to blow up curves even if the generic point of
//the curve the total transform is n.c.
//this occurs here in r[2][5]
list re=resolve(I);
list di=collectDiv(re);
di[1];
di[2];
}
//////////////////////////////////////////////////////////////////////////////
static proc cleanUpDiv(list re,intmat M,list divList)
"Internal procedure - no help and no example available
"
{
//--- It may occur that two different entries of invSort coincide on the
//--- first part up to the last entry of the shorter one. In this case
//--- exceptional divisors may appear in both entries of the invSort-list.
//--- To correct this, we now compare the final collection of Divisors
//--- for coinciding ones.
int i,j,k,a,oPa,mPa,comPa,mdim,odim;
def R=basering;
for(i=1;i<=size(divList)-2;i++)
{
if(defined(Sm)){kill Sm;}
def Sm=re[2][divList[i][1][1]];
setring Sm;
mPa=int(leadcoef(path[1,ncols(path)]));
if(defined(SmPa)){kill SmPa;}
def SmPa=re[2][mPa];
setring SmPa;
mdim=dim(std(BO[1]+cent));
setring Sm;
if(mPa==1)
{
//--- very first divisor originates exactly from the first blow-up
//--- there cannot be any mistake here
i++;
continue;
}
for(j=i+1;j<=size(divList)-1;j++)
{
setring Sm;
for(k=1;k<=size(divList[j]);k++)
{
if(size(findInIVList(1,divList[j][k][1],divList[i]))>1)
{
//--- same divisor cannot appear twice in the same chart
k=-1;
break;
}
}
if(k==-1)
{
j++;
if(j>size(divList)-1) break;
continue;
}
if(defined(opath)){kill opath;}
def opath=imap(re[2][divList[j][1][1]],path);
oPa=int(leadcoef(opath[1,ncols(opath)]));
if(defined(SoPa)){kill SoPa;}
def SoPa=re[2][oPa];
setring SoPa;
odim=dim(std(BO[1]+cent));
setring Sm;
if(mdim!=odim)
{
//--- different dimension ==> cannot be same center
j++;
if(j>size(divList)-1) break;
continue;
}
comPa=1;
while(path[1,comPa]==opath[1,comPa])
{
comPa++;
if((comPa>ncols(path))||(comPa>ncols(opath))) break;
}
comPa=int(leadcoef(path[1,comPa-1]));
if(defined(SPa)){kill SPa;}
def SPa=re[2][mPa];
setring SPa;
if(defined(tempIdE)){kill tempIdE;}
ideal tempIdE=fetchInTree(re,oPa,comPa,mPa,"cent",divList);
if((size(reduce(cent,std(tempIdE)))!=0)||
(size(reduce(tempIdE,std(cent)))!=0))
{
//--- it is not the same divisor!
j++;
if(j>size(divList))
{
break;
}
else
{
continue;
}
}
for(k=1;k<=size(divList[j]);k++)
{
//--- append the entries of the j-th divisor (which is actually also the i-th)
//--- to the i-th divisor
divList[i][size(divList[i])+1]=divList[j][k];
}
divList=delete(divList,j); //kill obsolete entry from the list
for(k=1;k<=nrows(M);k++)
{
for(a=1;a<=ncols(M);a++)
{
if(M[k,a]==j)
{
//--- j-th divisor is actually the i-th one
M[k,a]=i;
}
if(M[k,a]>j)
{
//--- index j was deleted from the list ==> all subsequent indices dropped by
//--- one
M[k,a]=M[k,a]-1;
}
}
}
j--; //do not forget to consider new j-th entry
}
}
setring R;
list retlist=M,divList;
return(retlist);
}
/////////////////////////////////////////////////////////////////////////////
static proc findTrans(ideal Z, ideal E, list notE, list #)
"Internal procedure - no help and no example available
"
{
//---Auxilliary procedure for fetchInTree!
//---Assume E prime ideal, Z+E eqidimensional,
//---ht(E)+r=ht(Z+E). Compute P=<p[1],...,p[r]> in Z+E, and polynomial f,
//---such that radical(Z+E)=radical((E+P):f)
int i,j,d,e;
ideal Estd=std(E);
//!!! alternative to subsequent line:
//!!! ideal Zstd=std(radical(Z+E));
ideal Zstd=std(Z+E);
ideal J=1;
if(size(#)>0)
{
J=#[1];
}
if(deg(Zstd[1])==0){return(list(ideal(1),poly(1)));}
for(i=1;i<=size(notE);i++)
{
notE[i]=std(notE[i]);
}
ideal Zred=simplify(reduce(Z,Estd),2);
if(size(Zred)==0){Z,Estd;~;ERROR("Z is contained in E");}
ideal P,Q,Qstd;
Q=Estd;
attrib(Q,"isSB",1);
d=dim(Estd);
e=dim(Zstd);
for(i=1;i<=size(Zred);i++)
{
Qstd=std(Q,Zred[i]);
if(dim(Qstd)<d)
{
d=dim(Qstd);
P[size(P)+1]=Zred[i];
Q=Qstd;
attrib(Q,"isSB",1);
if(d==e) break;
}
}
list pr=minAssGTZ(E+P);
list sr=minAssGTZ(J+P);
i=0;
Q=1;
list qr;
while(i<size(pr))
{
i++;
Qstd=std(pr[i]);
Zred=simplify(reduce(Zstd,Qstd),2);
if(size(Zred)==0)
{
qr[size(qr)+1]=pr[i];
pr=delete(pr,i);
i--;
}
else
{
Q=intersect(Q,pr[i]);
}
}
i=0;
while(i<size(sr))
{
i++;
Qstd=std(sr[i]+E);
Zred=simplify(reduce(Zstd,Qstd),2);
if((size(Zred)!=0)||(dim(Qstd)!=dim(Zstd)))
{
Q=intersect(Q,sr[i]);
}
}
poly f;
for(i=1;i<=size(Q);i++)
{
f=Q[i];
for(e=1;e<=size(qr);e++)
{
if(reduce(f,std(qr[e]))==0){f=0;break;}
}
for(j=1;j<=size(notE);j++)
{
if(reduce(f,notE[j])==0){f=0; break;}
}
if(f!=0) break;
}
i=0;
while(f==0)
{
i++;
f=randomid(Q)[1];
for(e=1;e<=size(qr);e++)
{
if(reduce(f,std(qr[e]))==0){f=0;break;}
}
for(j=1;j<=size(notE);j++)
{
if(reduce(f,notE[j])==0){f=0; break;}
}
if(f!=0) break;
if(i>20)
{
~;
ERROR("findTrans:Hier ist was faul");
}
}
list resu=P,f;
return(resu);
}
/////////////////////////////////////////////////////////////////////////////
static proc compareE(list L, int m, int o, list DivL)
"Internal procedure - no help and no example available
"
{
//----------------------------------------------------------------------------
// We want to compare the divisors BO[4][size(BO[4])] of the rings
// L[2][m] and L[2][o].
// In the initialization step, we collect all necessary data from those
// those rings. In particular, we determine at what point (in the resolution
// history) the branches for L[2][m] and L[2][o] were separated, denoting
// the corresponding ring indices by mPa, oPa and comPa.
//----------------------------------------------------------------------------
def R=basering;
int i,j,k,len;
//-- find direct parents and branching point in resolution history
matrix tpm=imap(L[2][m],path);
matrix tpo=imap(L[2][o],path);
int m1,o1=int(leadcoef(tpm[1,ncols(tpm)])),
int(leadcoef(tpo[1,ncols(tpo)]));
while((i<ncols(tpo)) && (i<ncols(tpm)))
{
if(tpm[1,i+1]!=tpo[1,i+1]) break;
i++;
}
int branchpos=i;
int comPa=int(leadcoef(tpm[1,branchpos])); // last common ancestor
//----------------------------------------------------------------------------
// simple checks to save us some work in obvious cases
//----------------------------------------------------------------------------
if((comPa==m1)||(comPa==o1))
{
//--- one is in the history of the other ==> they cannot give rise
//--- to the same divisor
return(0);
}
def T=L[2][o1];
setring T;
int dimCo1=dim(std(cent+BO[1]));
def S=L[2][m1];
setring S;
int dimCm1=dim(std(cent+BO[1]));
if(dimCm1!=dimCo1)
{
//--- centers do not have same dimension ==> they cannot give rise
//--- to the same divisor
return(0);
}
//----------------------------------------------------------------------------
// fetch the center via the tree for comparison
//----------------------------------------------------------------------------
if(defined(invLocus0)) {kill invLocus0;}
ideal invLocus0=fetchInTree(L,o1,comPa,m1,"cent",DivL);
// blow down from L[2][o1] to L[2][comPa] and then up to L[2][m1]
if(deg(std(invLocus0+invCenter[1]+BO[1])[1])!=0)
{
setring R;
return(int(1));
}
if(size(BO)>9)
{
for(i=1;i<=size(BO[10]);i++)
{
if(deg(std(invLocus0+BO[10][i][1]+BO[1])[1])!=0)
{
if(dim(std(BO[10][i][1]+BO[1])) >
dim(std(invLocus0+BO[10][i][1]+BO[1])))
{
ERROR("Internal Error: Please send this example to the authors.");
}
setring R;
return(int(2));
}
}
}
setring R;
return(int(0));
//----------------------------------------------------------------------------
// Return-Values:
// TRUE (=1) if the exceptional divisors coincide,
// TRUE (=2) if the exceptional divisors originate from different
// components of the same center
// FALSE (=0) otherwise
//----------------------------------------------------------------------------
}
//////////////////////////////////////////////////////////////////////////////
proc fetchInTree(list L,
int o1,
int comPa,
int m1,
string idname,
list DivL,
list #);
"Internal procedure - no help and no example available
"
{
//----------------------------------------------------------------------------
// Initialization and Sanity Checks
//----------------------------------------------------------------------------
int i,j,k,m,branchPos,inJ,exception;
string algext;
//--- we need to be in L[2][m1]
def R=basering;
ideal test_for_the_same_ring=-77;
def Sm1=L[2][m1];
setring Sm1;
if(!defined(test_for_the_same_ring))
{
//--- we are not in L[2][m1]
ERROR("basering has to coincide with L[2][m1]");
}
else
{
//--- we are in L[2][m1]
kill test_for_the_same_ring;
}
//--- non-embedded case?
if(size(#)>0)
{
inJ=1;
}
//--- do parameter values make sense?
if(comPa<1)
{
ERROR("Common Parent should at least be the first ring!");
}
//--- do we need to pass to an algebraic field extension of Q?
if(typeof(attrib(idname,"algext"))=="string")
{
algext=attrib(idname,"algext");
}
//--- check wheter comPa is in the history of m1
//--- same test for o1 can be done later on (on the fly)
if(m1==comPa)
{
j=1;
i=ncols(path)+1;
}
else
{
for(i=1;i<=ncols(path);i++)
{
if(int(leadcoef(path[1,i]))==comPa)
{
//--- comPa occurs in the history
j=1;
break;
}
}
}
branchPos=i;
if(j==0)
{
ERROR("L[2][comPa] not in history of L[2][m1]!");
}
//----------------------------------------------------------------------------
// Blow down ideal "idname" from L[2][o1] to L[2][comPa], where the latter
// is assumed to be the common parent of L[2][o1] and L[2][m1]
//----------------------------------------------------------------------------
if(size(algext)>0)
{
//--- size(algext)>0: case of algebraic extension of base field
if(defined(tstr)){kill tstr;}
string tstr="ring So1=(0,t),("+varstr(L[2][o1])+"),("+ordstr(L[2][o1])+");";
execute(tstr);
setring So1;
execute(algext);
minpoly=leadcoef(p);
if(defined(id1)) { kill id1; }
if(defined(id2)) { kill id2; }
if(defined(idlist)) { kill idlist; }
execute("int bool2=defined("+idname+");");
if(bool2==0)
{
execute("list ttlist=imap(L[2][o1],"+idname+");");
}
else
{
execute("list ttlist="+idname+";");
}
kill bool2;
def BO=imap(L[2][o1],BO);
def path=imap(L[2][o1],path);
def lastMap=imap(L[2][o1],lastMap);
ideal id2=1;
if(defined(notE)){kill notE;}
list notE;
intvec nE;
list idlist;
for(i=1;i<=size(ttlist);i++)
{
if((i==size(ttlist))&&(typeof(ttlist[i])!="string")) break;
execute("ideal tid="+ttlist[i]+";");
idlist[i]=list(tid,ideal(1),nE);
kill tid;
}
}
else
{
//--- size(algext)==0: no algebraic extension of base needed
def So1=L[2][o1];
setring So1;
if(defined(id1)) { kill id1; }
if(defined(id2)) { kill id2; }
if(defined(idlist)) { kill idlist; }
execute("ideal id1="+idname+";");
if(deg(std(id1)[1])==0)
{
//--- problems with findTrans if id1 is empty set
//!!! todo: also correct in if branch!!!
setring R;
return(ideal(1));
}
// id1=radical(id1);
ideal id2=1;
list idlist;
if(defined(notE)){kill notE;}
list notE;
intvec nE;
idlist[1]=list(id1,id2,nE);
}
if(defined(tli)){kill tli;}
list tli;
if(defined(id1)) { kill id1; }
if(defined(id2)) { kill id2; }
ideal id1;
ideal id2;
if(defined(Etemp)){kill Etemp;}
ideal Etemp;
for(m=1;m<=size(idlist);m++)
{
//!!! Duplicate Block!!! All changes also needed below!!!
//!!! no subprocedure due to large data overhead!!!
//--- run through all ideals to be fetched
id1=idlist[m][1];
id2=idlist[m][2];
nE=idlist[m][3];
for(i=branchPos-1;i<=size(BO[4]);i++)
{
//--- run through all relevant exceptional divisors
if(size(reduce(BO[4][i],std(id1+BO[1])))==0)
{
//--- V(id1) is contained in except. div. i in this chart
if(size(reduce(id1,std(BO[4][i])))!=0)
{
//--- V(id1) does not equal except. div. i of this chart
Etemp=BO[4][i];
if(npars(basering)>0)
{
//--- we are in an algebraic extension of the base field
if(defined(prtemp)){kill prtemp;}
list prtemp=minAssGTZ(BO[4][i]); // C-comp. of except. div.
j=1;
if(size(prtemp)>1)
{
//--- more than 1 component
Etemp=ideal(1);
for(j=1;j<=size(prtemp);j++)
{
//--- find correct component
if(size(reduce(prtemp[j],std(id1)))==0)
{
Etemp=prtemp[j];
break;
}
}
if(deg(std(Etemp)[1])==0)
{
ERROR("fetchInTree:something wrong in field extension");
}
}
prtemp=delete(prtemp,j); // remove this comp. from list
while(size(prtemp)>1)
{
//--- collect all the others into prtemp[1]
prtemp[1]=intersect(prtemp[1],prtemp[size(prtemp)]);
prtemp=delete(prtemp,size(prtemp));
}
}
//--- determine tli[1] and tli[2] such that
//--- V(id1) \cap D(id2) = V(tli[1]) \cap D(tli[2]) \cap BO[4][i]
//--- inside V(BO[1]) (and if necessary inside V(BO[1]+BO[2]))
if(inJ)
{
tli=findTrans(id1+BO[2]+BO[1],Etemp,notE,BO[2]);
}
else
{
tli=findTrans(id1+BO[1],Etemp,notE);
}
if(npars(basering)>0)
{
//--- in algebraic extension: make sure we stay outside the other components
if(size(prtemp)>0)
{
for(j=1;j<=ncols(prtemp[1]);j++)
{
//--- find the (univariate) generator of prtemp[1] which is the remaining
//--- factor from the factorization over the extension field
if(size(reduce(prtemp[1][j],std(id1)))>0)
{
tli[2]=tli[2]*prtemp[1][j];
}
}
}
}
}
else
{
//--- V(id1) equals except. div. i of this chart
tli[1]=ideal(0);
tli[2]=ideal(1);
}
id1=tli[1];
id2=id2*tli[2];
notE[size(notE)+1]=BO[4][i];
for(j=1;j<=size(DivL);j++)
{
if(inIVList(intvec(o1,i),DivL[j]))
{
nE[size(nE)+1]=j;
break;
}
}
if(size(nE)<size(notE))
{
ERROR("fetchInTree: divisor not found in divL");
}
}
idlist[m][1]=id1;
idlist[m][2]=id2;
idlist[m][3]=nE;
}
//!!! End of Duplicate Block !!!!
}
if(o1>1)
{
while(int(leadcoef(path[1,ncols(path)]))>=comPa)
{
if((int(leadcoef(path[1,ncols(path)]))>comPa)&&
(int(leadcoef(path[1,ncols(path)-1]))<comPa))
{
ERROR("L[2][comPa] not in history of L[2][o1]!");
}
def S=basering;
if(int(leadcoef(path[1,ncols(path)]))==1)
{
//--- that's the very first ring!!!
int und_jetzt_raus;
}
if(defined(T)){kill T;}
if(size(algext)>0)
{
if(defined(T0)){kill T0;}
def T0=L[2][int(leadcoef(path[1,ncols(path)]))];
if(defined(tstr)){kill tstr;}
string tstr="ring T=(0,t),("
+varstr(L[2][int(leadcoef(path[1,ncols(path)]))])+"),("
+ordstr(L[2][int(leadcoef(path[1,ncols(path)]))])+");";
execute(tstr);
setring T;
execute(algext);
minpoly=leadcoef(p);
kill tstr;
def BO=imap(T0,BO);
if(!defined(und_jetzt_raus))
{
def path=imap(T0,path);
def lastMap=imap(T0,lastMap);
}
if(defined(idlist)){kill idlist;}
list idlist=list(list(ideal(1),ideal(1)));
}
else
{
def T=L[2][int(leadcoef(path[1,ncols(path)]))];
setring T;
if(defined(id1)) { kill id1; }
if(defined(id2)) { kill id2; }
if(defined(idlist)){kill idlist;}
list idlist=list(list(ideal(1),ideal(1)));
}
setring S;
if(defined(phi)) { kill phi; }
map phi=T,lastMap;
//--- now do the actual blowing down ...
for(m=1;m<=size(idlist);m++)
{
//--- ... for each entry of idlist separately
if(defined(id1)){kill id1;}
if(defined(id2)){kill id2;}
ideal id1=idlist[m][1]+BO[1];
ideal id2=idlist[m][2];
nE=idlist[m][3];
if(defined(debug_fetchInTree)>0)
{
"Blowing down entry",m,"of idlist:";
setring S;
"Abbildung:";phi;
"before preimage";
id1;
id2;
}
setring T;
ideal id1=preimage(S,phi,id1);
ideal id2=preimage(S,phi,id2);
if(defined(debug_fetchInTree)>0)
{
"after preimage";
id1;
id2;
}
if(size(id2)==0)
{
//--- preimage of (principal ideal) id2 was zero, i.e.
//--- generator of previous id2 not in image
setring S;
//--- it might just be one offending factor ==> factorize
ideal id2factors=factorize(id2[1])[1];
int zzz=size(id2factors);
ideal curfactor;
setring T;
id2=ideal(1);
ideal curfactor;
for(int mm=1;mm<=zzz;mm++)
{
//--- blow down each factor separately
setring S;
curfactor=id2factors[mm];
setring T;
curfactor=preimage(S,phi,curfactor);
if(size(curfactor)>0)
{
id2[1]=id2[1]*curfactor[1];
}
}
kill curfactor;
setring S;
kill curfactor;
kill id2factors;
setring T;
kill mm;
kill zzz;
if(defined(debug_fetchInTree)>0)
{
"corrected id2:";
id2;
}
}
idlist[m]=list(id1,id2,nE);
kill id1,id2;
setring S;
}
setring T;
//--- after blowing down we might again be sitting inside a relevant
//--- exceptional divisor
for(m=1;m<=size(idlist);m++)
{
//!!! Duplicate Block!!! All changes also needed above!!!
//!!! no subprocedure due to large data overhead!!!
//--- run through all ideals to be fetched
if(defined(id1)) {kill id1;}
if(defined(id2)) {kill id2;}
if(defined(notE)) {kill notE;}
if(defined(notE)) {kill notE;}
list notE;
ideal id1=idlist[m][1];
ideal id2=idlist[m][2];
nE=idlist[m][3];
for(i=branchPos-1;i<=size(BO[4]);i++)
{
//--- run through all relevant exceptional divisors
if(size(reduce(BO[4][i],std(id1)))==0)
{
//--- V(id1) is contained in except. div. i in this chart
if(size(reduce(id1,std(BO[4][i])))!=0)
{
//--- V(id1) does not equal except. div. i of this chart
if(defined(Etemp)) {kill Etemp;}
ideal Etemp=BO[4][i];
if(npars(basering)>0)
{
//--- we are in an algebraic extension of the base field
if(defined(prtemp)){kill prtemp;}
list prtemp=minAssGTZ(BO[4][i]); // C-comp.except.div.
if(size(prtemp)>1)
{
//--- more than 1 component
Etemp=ideal(1);
for(j=1;j<=size(prtemp);j++)
{
//--- find correct component
if(size(reduce(prtemp[j],std(id1)))==0)
{
Etemp=prtemp[j];
break;
}
}
if(deg(std(Etemp)[1])==0)
{
ERROR("fetchInTree:something wrong in field extension");
}
}
prtemp=delete(prtemp,j); // remove this comp. from list
while(size(prtemp)>1)
{
//--- collect all the others into prtemp[1]
prtemp[1]=intersect(prtemp[1],prtemp[size(prtemp)]);
prtemp=delete(prtemp,size(prtemp));
}
}
if(defined(tli)) {kill tli;}
//--- determine tli[1] and tli[2] such that
//--- V(id1) \cap D(id2) = V(tli[1]) \cap D(tli[2]) \cap BO[4][i]
//--- inside V(BO[1]) (and if necessary inside V(BO[1]+BO[2]))
if(inJ)
{
def tli=findTrans(id1+BO[2]+BO[1],Etemp,notE,BO[2]);
}
else
{
def tli=findTrans(id1+BO[1],Etemp,notE);
}
if(npars(basering)>0)
{
//--- in algebraic extension: make sure we stay outside the other components
if(size(prtemp)>0)
{
for(j=1;j<=ncols(prtemp[1]);j++)
{
//--- find the (univariate) generator of prtemp[1] which is the remaining
//--- factor from the factorization over the extension field
if(size(reduce(prtemp[1][j],std(id1)))>0)
{
tli[2]=tli[2]*prtemp[1][j];
}
}
}
}
}
else
{
tli[1]=ideal(0);
tli[2]=ideal(1);
}
id1=tli[1];
id2=id2*tli[2];
notE[size(notE)+1]=BO[4][i];
for(j=1;j<=size(DivL);j++)
{
if(inIVList(intvec(o1,i),DivL[j]))
{
nE[size(nE)+1]=j;
break;
}
}
if(size(nE)<size(notE))
{
ERROR("fetchInTree: divisor not found in divL");
}
}
idlist[m][1]=id1;
idlist[m][2]=id2;
idlist[m][3]=nE;
}
//!!! End of Duplicate Block !!!!
}
kill S;
if(defined(und_jetzt_raus))
{
kill und_jetzt_raus;
break;
}
}
if(defined(debug_fetchInTree)>0)
{
"idlist after current blow down step:";
idlist;
}
}
if(defined(debug_fetchInTree)>0)
{
"Blowing down ended";
}
//----------------------------------------------------------------------------
// Blow up ideal id1 from L[2][comPa] to L[2][m1]. To this end, first
// determine the path to follow and save it in path_togo.
//----------------------------------------------------------------------------
if(m1==comPa)
{
//--- no further blow ups needed
if(size(algext)==0)
{
//--- no field extension ==> we are done
return(idlist[1][1]);
}
else
{
//--- field extension ==> we need to encode the result
list retlist;
for(m=1;m<=size(idlist);m++)
{
retlist[m]=string(idlist[m][1]);
}
return(retlist);
}
}
//--- we need to blow up
if(defined(path_m1)) { kill path_m1; }
matrix path_m1=imap(Sm1,path);
intvec path_togo;
for(i=1;i<=ncols(path_m1);i++)
{
if(path_m1[1,i]>=comPa)
{
path_togo=path_togo,int(leadcoef(path_m1[1,i]));
}
}
path_togo=path_togo[2..size(path_togo)],m1;
i=1;
while(i<size(path_togo))
{
//--- we need to blow up following the path path_togo through the tree
def S=basering;
if(defined(T)){kill T;}
if(size(algext)>0)
{
//--- in an algebraic extension of the base field
if(defined(T0)){kill T0;}
def T0=L[2][path_togo[i+1]];
if(defined(tstr)){kill tstr;}
string tstr="ring T=(0,t),(" +varstr(T0)+"),(" +ordstr(T0)+");";
execute(tstr);
setring T;
execute(algext);
minpoly=leadcoef(p);
kill tstr;
def path=imap(T0,path);
def BO=imap(T0,BO);
def lastMap=imap(T0,lastMap);
if(defined(phi)){kill phi;}
map phi=S,lastMap;
list idlist=phi(idlist);
if(defined(debug_fetchInTree)>0)
{
"in blowing up (algebraic extension case):";
phi;
idlist;
}
}
else
{
def T=L[2][path_togo[i+1]];
setring T;
if(defined(phi)) { kill phi; }
map phi=S,lastMap;
if(defined(idlist)) {kill idlist;}
list idlist=phi(idlist);
idlist[1][1]=radical(idlist[1][1]);
idlist[1][2]=radical(idlist[1][2]);
if(defined(debug_fetchInTree)>0)
{
"in blowing up (case without field extension):";
phi;
idlist;
}
}
for(m=1;m<=size(idlist);m++)
{
//--- get rid of new exceptional divisor
idlist[m][1]=sat(idlist[m][1]+BO[1],BO[4][size(BO[4])])[1];
idlist[m][2]=sat(idlist[m][2],BO[4][size(BO[4])])[1];
}
if(defined(debug_fetchInTree)>0)
{
"after saturation:";
idlist;
}
if((size(algext)==0)&&(deg(std(idlist[1][1])[1])==0))
{
//--- strict transform empty in this chart, it will stay empty till the end
setring Sm1;
return(ideal(1));
}
kill S;
i++;
}
if(defined(debug_fetchInTree)>0)
{
"End of blowing up steps";
}
//---------------------------------------------------------------------------
// prepare results for returning them
//---------------------------------------------------------------------------
ideal E,bla;
intvec kv;
list retlist;
for(m=1;m<=size(idlist);m++)
{
for(j=2;j<=size(idlist[m][3]);j++)
{
kv=findInIVList(1,path_togo[size(path_togo)],DivL[idlist[m][3][j]]);
if(kv!=intvec(0))
{
E=E+BO[4][kv[2]];
}
}
bla=quotient(idlist[m][1]+E,idlist[m][2]);
retlist[m]=string(bla);
}
if(size(algext)==0)
{
return(bla);
}
return(retlist);
}
/////////////////////////////////////////////////////////////////////////////
static proc findInIVList(int pos, int val, list ivl)
"Internal procedure - no help and no example available
"
{
//--- find entry with value val at position pos in list of intvecs
//--- and return the corresponding entry
int i;
for(i=1;i<=size(ivl);i++)
{
if(ivl[i][pos]==val)
{
return(ivl[i]);
}
}
return(intvec(0));
}
/////////////////////////////////////////////////////////////////////////////
//static
proc inIVList(intvec iv, list li)
"Internal procedure - no help and no example available
"
{
//--- if intvec iv is contained in list li return 1, 0 otherwise
int i;
int s=size(iv);
for(i=1;i<=size(li);i++)
{
if(typeof(li[i])!="intvec"){ERROR("Not integer vector in the list");}
if(s==size(li[i]))
{
if(iv==li[i]){return(1);}
}
}
return(0);
}
//////////////////////////////////////////////////////////////////////////////
static proc Vielfachheit(ideal J,ideal I)
"Internal procedure - no help and no example available
"
{
//--- auxilliary procedure for addSelfInter
//--- compute multiplicity, suitable for the special situation there
int d=1;
int vd;
int c;
poly p;
ideal Ip,Jp;
while((d>0)||(!vd))
{
p=randomLast(100)[nvars(basering)];
Ip=std(I+ideal(p));
c++;
if(c>20){ERROR("Vielfachheit: Dimension is wrong");}
d=dim(Ip);
vd=vdim(Ip);
}
Jp=std(J+ideal(p));
return(vdim(Jp) div vdim(Ip));
}
/////////////////////////////////////////////////////////////////////////////
static proc genus_E(list re, list iden0, intvec Eindex)
"Internal procedure - no help and no example available
"
{
int i,ge,gel,num;
def R=basering;
ring Rhelp=0,@t,dp;
def S=re[2][Eindex[1]];
setring S;
def Sh=S+Rhelp;
//----------------------------------------------------------------------------
//--- The Q-component X is reducible over C, decomposes into s=num components
//--- X_i, we assume they have n.c.
//--- s*g(X_i)=g(X)+s-1.
//----------------------------------------------------------------------------
if(defined(I2)){kill I2;}
ideal I2=dcE[Eindex[2]][Eindex[3]][1];
num=ncols(dcE[Eindex[2]][Eindex[3]][4]);
setring Sh;
if(defined(I2)){kill I2;}
ideal I2=imap(S,I2);
I2=homog(I2,@t);
ge=genus(I2);
gel=(ge+(num-1)) div num;
if(gel*num-ge-num+1!=0){ERROR("genus_E: not divisible by num");}
setring R;
return(gel,num);
}
|