Source

Toric varieties paper / AndreyThesis.tex

Full commit
   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
\documentclass[12pt,letterpaper,russian,english]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}

% Margins: LR >= 1.5", TB >= 1", P# >= 3/4"
%\usepackage{layout}
\setlength\oddsidemargin{0.5in}
\setlength\textwidth{5.5in}
\setlength\topmargin{0pt}
\setlength\headheight{0pt}
\setlength\headsep{0pt}
\setlength\footskip{0.5in}
\setlength\textheight{8.75in}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{rotating}

% Theorems etc.
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newcommand{\keyterm}[1]{\textbf{#1}}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\numberwithin{equation}{section}

\usepackage{paralist}
\setdefaultenum{\rm 1)}{\rm a)}{\rm i)}{\rm A)}

\usepackage{varioref}
\labelformat{chapter}{Chapter~#1}
\labelformat{figure}{Figure~#1}
\labelformat{section}{Section~#1}
\labelformat{table}{Table~#1}

\usepackage{setspace}
\onehalfspacing

% SageTeX tuning
\usepackage[scaled]{luximono}
\usepackage{sagetex}
\lstdefinestyle{SageTEXAdjustment}{numbers=none, xleftmargin=1ex, xrightmargin=1ex, framesep=1ex, frame=rl, breakatwhitespace=True, basicstyle={\ttfamily\small}}
\lstdefinestyle{SageInput}{style=DefaultSageInput, style=SageTEXAdjustment}
\lstdefinestyle{SageOutput}{style=DefaultSageOutput, style=SageTEXAdjustment, basicstyle={\ttfamily\small\bfseries}}
\lstset{style=SageInput}
\newcommand{\sagecommand}[1]{\lstinline!#1!}
%\setlength{\sagecommandlineskip}{0pt}

\usepackage[breaklinks=true, citecolor=dbluecolor, colorlinks=true, hyperfootnotes=false, linkcolor=dbluecolor, linktocpage=true, urlcolor=dbluecolor]{hyperref}
% pagebackref is unhappy with the sagecommand command



% Title page details
\title{Calabi-Yau Hypersurfaces and Complete Intersections in~Toric~Varieties}
\author{Andrey Yurievich Novoseltsev}
\date{Fall 2011}



% Personal macros

\newcommand{\mpart}{\mathrm{part}}
\renewcommand{\phi}{\varphi}

% General formatting
\newcommand{\lb}[1][1]{\linebreak[#1]}

% Math formatting
\newcommand{\abs}[1]{\left|#1\right|}
\newcommand{\ds}{\displaystyle}
\newcommand{\pair}[1]{\left\langle #1 \right\rangle}
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\sumfrac}[2]{\genfrac{}{}{0pt}{1}{#1}{#2}}
\newcommand{\tld}[1]{\widetilde{#1}}

% Blackboard bold
\newcommand{\AAA}{\ensuremath{\mathbb{A}}} % \AA is a standard command
\newcommand{\CC}{\ensuremath{\mathbb{C}}}
\newcommand{\PP}{\ensuremath{\mathbb{P}}}
\newcommand{\QQ}{\ensuremath{\mathbb{Q}}}
\newcommand{\RR}{\ensuremath{\mathbb{R}}}
\newcommand{\WP}{\ensuremath{\mathbb{WP}}}
\newcommand{\ZZ}{\ensuremath{\mathbb{Z}}}

% Calligraphic 
\newcommand{\cF}{\ensuremath{\mathcal{F}}}
\newcommand{\cO}{\ensuremath{\mathcal{O}}}
\newcommand{\cP}{\ensuremath{\mathcal{P}}}

% Operators
\DeclareMathOperator{\Cl}{Cl}
\DeclareMathOperator{\Cone}{Cone}
\DeclareMathOperator{\Conv}{Conv}
\DeclareMathOperator{\Div}{Div}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\NS}{NS}
\DeclareMathOperator{\RelInt}{RelInt}
\DeclareMathOperator{\Spec}{Spec}

\DeclareMathOperator{\divisor}{div}
\DeclareMathOperator{\rk}{rk}



\begin{document}

%\layout % For layout adjustments

% Prefatory pages
\renewcommand\thepage{} % Turn off any page numbering whatsoever



% Title Page
\begin{titlepage}
\makeatletter
\hypersetup{
pdfauthor={\@author},
pdftitle={\@title},
} 
\begin{center}
{\Large \textbf{University of Alberta}}

\vfill

{\large \@title}

by

{\large \@author}

\vfill

A thesis submitted to the Faculty of Graduate Studies and Research 
in partial fulfilment of the requirements for the degree of 

\vfill

{\large Doctor of Philosophy}

in

{\large Mathematics}

\vfill

Department of Mathematical and Statistical Sciences

\vfill

\copyright \@author

\@date

Edmonton, Alberta

\vfill

\begin{small}
Permission is hereby granted to the University of Alberta Libraries to reproduce single copies of this thesis and to lend or sell such copies for private, scholarly or scientific research purposes only. Where the thesis is converted to, or otherwise made available in digital form, the University of Alberta will advise potential users of the thesis of these terms.
\vspace{\baselineskip}

The author reserves all other publication and other rights in association with the copyright in the thesis and, except as herein before provided, neither the thesis nor any substantial portion thereof may be printed or otherwise reproduced in any material form whatsoever without the author's prior written permission.
\end{small}
\end{center}
\makeatother
\end{titlepage}



% Abstract (not more than 350 words)
\chapter*{Abstract}
\begin{doublespace}
...

First, a framework for toric varieties and their Calabi-Yau subvarieties has been implemented in the free open-source mathematical software system Sage. While there are other software packages, both commercial and free, for toric geometry, Sage has the advantage of smooth integration of numerous libraries for other related objects such as graphs, symbolic expressions, fast linear algebra, arbitrary precision and exact arithmetic, etc., combined with a powerful yet simple interface. We hope that our framework will prove useful both in research and teaching.

...
\end{doublespace}



% Table of Contents (listing chapter heads and subheads, bibliographies, and appendices)
\tableofcontents



% Body of Text
\chapter{Toric Geometry via Sage}\label{chapter:TG}
\pagenumbering{arabic}

In this chapter we provide an introduction to relevant parts of toric geometry. Standard references are books by Oda~\cite{Oda:1988} and Fulton~\cite{Fulton:1993}, but we base our exposition mostly on a wonderful new textbook by Cox, Little and Schenck~\cite{CoxLittleSchenck:2011}, which reflects modern development of the area, provides vast detailed examples, and has a lot of exercises.

While all mathematical results presented in this chapter are well known (and can be found in~\cite{CoxLittleSchenck:2011}), the novelty of our presentation is in illustrating all notions using code~\cite{BraunNovoseltsev:toric_variety} developed for Sage~\cite{Sage} by Volker Braun and the author, whenever possible. (This code is still under active development and certain features are not implemented, but it already includes several hundred methods covering some of the major constructions.)

% Adjust default plotting options for inclusion
\begin{sagesilent}
toric_plotter.options(font_size=12, ray_thickness=1, point_size=7, ray_label="\\rho")
\end{sagesilent}



\section{Why Sage?}

When one decides to use computers for mathematical computations, there are many software options to choose from, including general-purpose programming languages such as C if one is ready to implement all necessary supporting framework. To some extent the final choice depends on personal preferences and it is likely to be impossible to convince everyone that this choice is right. Nevertheless, in this section we try to provide some hopefully convincing arguments in favour of Sage.

\emph{Sage is a software for mathematical computations.} It covers many areas of mathematics, so it is likely that one does not have to reimplement any algorithms for basic computations (e.g. precise arithmetic, linear algebra, polynomial rings, plots) and there is a good chance that more advanced ones will be available (e.g. symbolic operations, graphs, cohomology). So at the very least Sage deserves consideration as a platform of choice.

\emph{Sage makes it easy to interface other software packages.} If it turns out that it is absolutely necessary to use some feature X from a package Y (but the package Y cannot do \emph{everything} that you need), it is quite easy to do so from Sage. Interfaces to many packages are already included in Sage and there is a general framework for creating new interfaces.

\emph{Sage is free (costs no money).} While commercial software packages may be available to students and faculty in universities ``free of charge'' and there are often significant discounts to students wishing to install it on their own computers, universities still have to pay for expensive site licenses, students may no longer use their copies after graduation, and even after discounts these packages are too expensive for people in many countries.

\emph{Sage is free (has non-restrictive license) and open-source.} The usual analogy used by Sage developers is that anyone can read a proof of some theorem and then use both the theorem \emph{and} its proof to create new results. Similarly, if a program was used to produce mathematical results, its code has to be available for anyone to study and modify, if desired.

\emph{Sage is convenient.} It uses a general-purpose easy-to-learn interpreted programming language Python~\cite{Python} for its interaction and at the same time allows smooth transition to compiled code via Cython~\cite{Cython}. The graphical user interface of Sage works through a browser, in the same way on all supported platforms, both locally and over a network, with built-in features for collaboration.

\emph{Sage is documented and supported.} While it is difficult to compete with commercial projects in this area, Sage strives to provide extensive documentation and automatic tests for every function (currently about 85\% of functions are fully documented). Despite inclusion of multiple components, Sage automatically builds on all supported platforms without necessity of any tuning or requiring administrative rights. In fact, installing ``complete Sage'' can be the easiest way to get a working installation of some of its components!

\emph{Sage development process is transparent.} All contributions to Sage are peer reviewed, author-referee communication takes place on a freely accessible site, and anyone has immediate access to code implementing new functionality even before it gets merged into the main distribution. In particular, when you report a bug there is a chance that it will be fixed in a matter of days if not hours, which is important if this bug prevents you from continuing your work and you are not able to fix it yourself.

Quoting a recent note in Nature~\cite{Merali:2010},
``As a general rule, researchers do not test or
document their programs rigorously, and they rarely release their codes, making it almost impossible to reproduce and verify published results generated by scientific software [...]. At best, poorly written programs cause researchers [...] to waste valuable time and energy. But the coding problems can sometimes cause substantial harm, and have forced some scientists to retract papers.'' We hope that future development of Sage will promote better coding practices and sharing between researches: since code submitted to Sage must be documented, tested, and readable, and since at least one person other than the author of the code must certify that it looks correct, it is likely to be of substantially higher quality than code written ``just for internal use''. Of course, writing proper documentation and tests requires extra time, but being able to reuse previously submitted code should amply compensate for it.

Due to the above arguments and personal preferences the author decided to use Sage. Perhaps, the fact that most computer-aided examples in~\cite{CoxLittleSchenck:2011} are implemented either in Macaulay2~\cite{Macaulay2} or in Sage can serve as a more objective indication of a good choice of platform. Also, in the spirit of interfacing other software packages from Sage, the author has done some work on improving robustness of Sage-Macaulay2 interaction and it is anticipated that there will be support for automatic conversion of toric geometry objects between these systems allowing one not only to complement features missing in one of the implementations, but also use it as a way of correctness verification.

As an unanticipated and very pleasant side-effect of using Sage, the author was able to use SageTeX~\cite{SageTeX} to automatically process all code examples and create graphics for this thesis, eliminating the need for copy-pasting and formatting of command line sessions and/or inserting screenshots.



\section{Cones and Fans}%
\label{sec:cones and fans}

Let $M$ and $N$ be dual lattices of rank $n$, i.e. $M \simeq N \simeq \ZZ^n$ as free Abelian groups and we identify $M$ with $\Hom_\ZZ(N, \ZZ)$ and $N$ with $\Hom_\ZZ(M, \ZZ)$ using the natural pairing $\pair{\cdot, \cdot} : M \times N \to \ZZ$. We can create such lattices in Sage for any explicit rank $n$:
\begin{sagecommandline}
sage: N = ToricLattice(2)
sage: M = N.dual()
sage: M
2-d lattice M
sage: N(3,4)
N(3, 4)
sage: M(1,2) * N(3,4)
11
\end{sagecommandline}
While the default names for dual toric lattices are $M$ and $N$ as above to match the standard notation in the literature, it is possible to use any other names as well:
\begin{sagecommandline}
sage: L = ToricLattice(5, "L")
sage: L, L.dual()
(5-d lattice L, 5-d lattice L*)
\end{sagecommandline}
For each lattice we have the associated real vector space, which we will denote by the subscript $\RR$, e.g. for the lattice $N$ it is $N_\RR = N \otimes_\ZZ \RR.$ In order to avoid excessive repetitions, below $M$, $N$, $M_\RR$, and $N_\RR$ are always assumed to be as described above.

\begin{definition}
A \keyterm{convex polyhedral cone} $\sigma$ in $N_\RR$ is a set of the form
\begin{gather*}
\sigma = \Cone(S)
= \set{\sum_{v \in S} \lambda_v v : \lambda_v \in \RR_{\geqslant 0}}
\end{gather*}
for some finite set $S \subset N_\RR$.
We say that $\sigma$ is \keyterm{strictly convex} if it contains no subspaces of $N_\RR$ except for the trivial one.
We say that $\sigma$ is \keyterm{rational}, if it can be generated by a finite set $S \subset N$.
We also let $\Cone(\emptyset)=\set{0}$.
\end{definition}

\begin{remark}
Note that for a strictly convex rational polyhedral cone there is a canonical choice of generators, namely the lattice points of minimal (non-zero) norm on the generating rays (or edges) of the cone.
\end{remark}

\begin{remark}
Below we deal exclusively with rational convex polyhedral\linebreak cones, so after the above definition we actually drop these adjectives and refer to such cones as ``just'' cones. In most cases, but not all, our cones are also strictly convex, this condition is always stated explicitly.
\end{remark}

In Sage, cones take into account both remarks:
\begin{sagecommandline}
sage: quadrant = Cone([(1/2,0), (1,2), (0,3)])
sage: quadrant.rays()
(N(0, 1), N(1, 0))
\end{sagecommandline}
The \sagecommand{Cone} command constructs a (rational convex polyhedral) cone, normalizing generators to primitive integral vectors and discarding unnecessary generators. It does not always pick a minimal set of generators for non-strictly convex cones, since it is usually more convenient to deal with pairs of opposite generators:
\begin{sagecommandline}
sage: plane = Cone([(1,0), (0,1), (-1,-1)])
sage: plane.rays()
(N(0, 1), N(0, -1), N(1, 0), N(-1, 0))
sage: plane.ray_matrix()
[ 0  0  1 -1]
[ 1 -1  0  0]
\end{sagecommandline}
However, you can force Sage to use the rays provided by you, if necessary:
\begin{sagecommandline}
sage: plane = Cone([(1,0), (0,1), (-1,-1)], check=False)
sage: plane.ray_matrix()
[ 1  0 -1]
[ 0  1 -1]
\end{sagecommandline}
In these examples we have used \sagecommand{rays} and \sagecommand{ray_matrix} methods to output rays either as a list or as columns of a matrix. There are also several other representations described in the documentation.

\begin{definition}
Let $\sigma \subset N_\RR$ be a cone. Its \keyterm{dual cone} $\sigma^\vee$ is
\begin{gather*}
\sigma^\vee = \set{u \in M_\RR : \pair{u, v} \geqslant 0 \text{ for all } v \in \sigma}.
\end{gather*}
\end{definition}

For the two cones constructed above the dual ones are the first quadrant and the trivial cone in $M_\RR$:
\begin{sagecommandline}
sage: quadrant.dual()
2-d cone in 2-d lattice M
sage: quadrant.dual().rays()
(M(0, 1), M(1, 0))
sage: plane.dual()
0-d cone in 2-d lattice M
sage: plane.dual().rays()
()
sage: plane.dual().is_trivial()
True
sage: plane.dual().dual() is plane
True
\end{sagecommandline} 

\begin{definition}
A \keyterm{face} $\tau$ of a cone $\sigma \subset N_\RR$ is any set of the form $\tau = \sigma \cap u^\perp$ for $u \in \sigma^\vee$, where $u^\perp = \set{v \in N_\RR : \pair{u, v} = 0}$ (for $u \neq 0$ it is called a \keyterm{supporting hyperplane} of $\sigma$). A \keyterm{proper face} $\tau$ is any face $\tau \neq \sigma$.
\end{definition}

Faces of a strictly convex cone $\sigma$ (including the origin and $\sigma$ itself) form an \emph{atomistic and coatomistic Eulerian lattice} with respect to the inclusion relation and grading by dimension.

\begin{definition}
Let $\cP$ be a poset. It is a \keyterm{lattice} if any two elements of $\cP$ have a unique infimum (called their \keyterm{meet}) and a unique supremum (called their \keyterm{join}).
\end{definition}

For cones the intersection of any two faces is a face and for any two faces there is a unique smallest face containing them.

\begin{remark}
If $\cP$ is a lattice, then, of course, any finite collection of its elements has both meet and join. In particular, if $\cP$ is finite, then it has the minimum and maximum elements which we will denote as $\hat{0}$ and $\hat{1}$ respectively.
\end{remark}

\begin{definition}
Let $\cP$ be a lattice with the minimum element $\hat{0}$. An element $a \in \cP$ is an \keyterm{atom} if it covers $\hat{0}$, i.e. there is no element $x \in \cP$ such that $\hat{0} < x < a$. Lattice $\cP$ is \keyterm{atomic} if for any element $x \in \cP$ there exists an atom $a \in \cP$ such that $a \leqslant x$. Lattice $\cP$ is \keyterm{atomistic} if any element $x \in \cP$ is a join of atoms of $\cP$. \keyterm{Coatom}, \keyterm{coatomic}, and \keyterm{coatomistic} are dual notions.
\end{definition}

For cones any face can be specified by either rays generating it or facets (faces of codimension one) containing it.

\begin{definition}
A graded poset $\cP$ is an \keyterm{Eulerian poset} if any non-trivial interval in $\cP$, i.e. the set $[x, y] = \set{z \in \cP : x \leqslant z \leqslant y}$ for any $x, y \in \cP$ such that $x < y$, has the same number of elements of even and odd rank.
\end{definition}

Sage provides a number of methods for working with faces and ``walking along'' the face lattice, to illustrate some of these methods we first construct a slightly more complicated cone than before:
\begin{sagecommandline}
sage: cone = Cone([(0,0,1), (1,0,1), (1,1,1), (0,1,1)])
sage: cone.face_lattice()
Finite poset containing 10 elements
sage: [len(cone.faces(d)) for d in [0..3]]
[1, 4, 4, 1]
sage: ray = cone.embed(Cone([(1,0,1)]))
\end{sagecommandline}
The last command constructed a 1-dimensional cone \sagecommand{ray} in the direction $(1, 0, 1)$, which ``knows'' that it is considered as a face of \sagecommand{cone}. This is important if we want to look at neighbours of \sagecommand{ray} in the face lattice of \sagecommand{cone}:
\begin{sagecommandline}
sage: ray.facets()
(0-d face of 3-d cone in 3-d lattice N,)
sage: ray.facet_of()
(2-d face of 3-d cone in 3-d lattice N, 2-d face of 3-d cone in 3-d lattice N)
sage: ray.adjacent()
(1-d face of 3-d cone in 3-d lattice N, 1-d face of 3-d cone in 3-d lattice N)
\end{sagecommandline}
For non-strictly convex cones the situation is similar, but all faces share the largest contained linear subspace and the minimal set of generating rays is defined only modulo this subspace. Note also that cone duality induces an inclusion-reversing bijection between the faces of a cone $\sigma \subset N_\RR$ and the faces of its dual cone $\sigma^\vee \subset M_\RR$.

\begin{definition}
A \keyterm{fan} $\Sigma$ in $N_\RR$ is a finite collection of \emph{strictly convex} rational polyhedral cones in $N_\RR$ such that
\begin{compactenum}
\item if $\sigma \in \Sigma$ and $\tau$ is a face of $\sigma$, then $\tau \in \Sigma$,
\item if $\sigma_1, \sigma_2 \in \Sigma$, then $\tau = \sigma_1 \cap \sigma_2$ is a face of each.
\end{compactenum}
The set of all $k$-dimensional cones of $\Sigma$ will be denoted by $\Sigma(k)$ and the set of maximal cones (not contained in any other cone of $\Sigma$) by $\Sigma_{\max}$.
\end{definition}

Note that because of the face containment requirement fans are likely to contain ``a lot'' of cones, but to define a fan it is sufficient to provide only its maximal cones. Sage allows fan construction from any collection of (compatible) cones, but it may warn you about ``redundant'' ones.
\begin{sagecommandline}
sage: cone0 = Cone([(1,0), (0,1)])
sage: cone1 = Cone([(0,1), (-1,-1)])
sage: cone2 = Cone([(-1,-1), (1,0)])
sage: fan = Fan([cone0, cone1, cone2])
sage: fan
Rational polyhedral fan in 2-d lattice N
sage: fan.ngenerating_cones()
3
sage: fan(1)
(1-d cone of Rational polyhedral fan in 2-d lattice N, 1-d cone of Rational polyhedral fan in 2-d lattice N, 1-d cone of Rational polyhedral fan in 2-d lattice N)
sage: fan.ray_matrix()
[ 0  1 -1]
[ 1  0 -1]
\end{sagecommandline}

Similar to the face lattice of a cone, cones of a fan form a lattice with the fan itself as its maximal element. These lattices are particularly similar for an important special case of complete fans.

\begin{definition}
Let $\Sigma$ be a fan in $N_\RR$. Its \keyterm{support} is 
\begin{gather*}
\abs{\Sigma} = \bigcup_{\sigma \in \Sigma} \sigma \subset N_\RR. 
\end{gather*}
If $\abs{\Sigma} = N_\RR$, $\Sigma$ is called \keyterm{complete}.
\end{definition}

For complete fans every cone can be described either by rays (1-dimensional cones) generating it, or by maximal-dimensional cones (analogs of facets) containing it:
\begin{sagecommandline}
sage: ray = fan(1)[0]
sage: ray.rays()
(N(0, 1),)
sage: ray.ambient_ray_indices()
(0,)
sage: fan.rays(ray.ambient_ray_indices())
(N(0, 1),)
sage: ray.star_generator_indices()
(0, 1)
sage: fan.generating_cone(0).intersection( fan.generating_cone(1)).rays()
(N(0, 1),)
\end{sagecommandline}



\section{Fans from Polytopes} \label{sec:fans from polytopes}

A natural source of fans is provided by lattice polytopes.

\begin{definition}
A \keyterm{lattice polytope} $\Delta$ in $M_\RR$ is the convex hull of finitely many lattice points of $M$. We call $\Delta$ \keyterm{full-dimensional} if the affine subspace spanned by it is $M_\RR$ itself.
\end{definition}

In Sage support for lattice polytopes is provided via \sagecommand{lattice_polytope} module written mostly by the author~\cite{Novoseltsev:lattice_polytope}, while more general polyhedra can be handled by \sagecommand{polyhedra} module written mostly by Volker Braun and Marshall Hampton~\cite{BraunHampton:polyhedra}. Both modules were written before the rest of the toric geometry framework and sometimes it leads to (small) interface inconsistencies, e.g. lattice polytopes in Sage are not actually aware of any lattices except for $\ZZ^n$. We plan to improve intermodule integration in the near future.

\begin{sagecommandline}
sage: simplex = LatticePolytope([(0,0), (1,0), (0,1)])
sage: simplex
A lattice polytope: 2-dimensional, 3 vertices.
sage: simplex.vertices()
[0 1 0]
[0 0 1]
sage: Delta = LatticePolytope([(-1,-1), (-1,2), (2,-1)])
sage: Delta.vertices()
[-1 -1  2]
[-1  2 -1]
sage: Delta.points()
[-1 -1  2 -1 -1  0  0  0  1  1]
[-1  2 -1  0  1 -1  0  1 -1  0]
\end{sagecommandline}
In Sage \sagecommand{LatticePolytope}'s methods \sagecommand{vertices} and \sagecommand{points} behave similar to \sagecommand{ray_matrix} for \sagecommand{Cone}'s and \sagecommand{Fan}'s: they return matrices whose columns are vertices or all lattice points of the polytope.

\begin{definition}
Let $\Delta \subset M_\RR$ be a full-dimensional lattice polytope. Its \keyterm{normal fan} $\Sigma_\Delta$ in $N_\RR$ is generated by cones $C_v$ for all vertices $v$ of $\Delta$. Each $C_v$ is generated by inner normals of facets of $\Delta$ containing $v$.
\end{definition}

Note that the normal fan is insensitive to shifts and scaling of the original polytope, in particular \sagecommand{simplex} and \sagecommand{Delta} constructed above should produce the same normal fans:
\begin{sagecommandline}
sage: Sigma_simplex = NormalFan(simplex)
sage: Sigma_simplex.is_complete()
True
sage: Sigma_simplex.ray_matrix()
[ 1  0 -1]
[ 0  1 -1]
sage: Sigma_Delta = NormalFan(Delta)
sage: Sigma_Delta.ray_matrix()
[ 1  0 -1]
[ 0  1 -1]
sage: Sigma_simplex == Sigma_Delta
False
\end{sagecommandline}
This may seem wrong, but this is due to the fact that equality of fans in Sage is understood as having the same rays and cones in the same order. To check mathematical equality we may use \sagecommand{is_equivalent} method:
\begin{sagecommandline}
sage: Sigma_simplex.is_equivalent(Sigma_Delta)
True
\end{sagecommandline}

\begin{definition}
Let $\Delta \subset N_\RR$ be a lattice polytope \emph{containing the origin}. Its \keyterm{face fan}, as the name suggests, consists of cones generated by faces of $\Delta$.
\end{definition}

We construct the same fan as above one more time, now as a face fan:
\begin{sagecommandline}
sage: Delta_p = LatticePolytope([(1,0), (0,1), (-1,-1)])
sage: fan = FaceFan(Delta_p)
sage: fan.ray_matrix()
[ 1  0 -1]
[ 0  1 -1]
sage: fan.plot()
Graphics object consisting of 16 graphics primitives
\end{sagecommandline}
If you execute the last command in Sage, you are actually more likely to get the plot showed in \vref{fig:fan.plot} either opened in a graphics viewer or embedded into a notebook worksheet, rather than its text description. Dots are lattice points, coloured sectors are 2-dimensional cones, and lines between them are 1-dimensional cones with primitive integral generators marked via arrows. Label indices correspond to the internal order of rays and cones of the fan, we often hide them if there is no need to reference particular cones on diagrams.
\begin{figure}[ht]
\centering
\sageplot[]{fan.plot(), figsize=[3, 3]}
\caption{Complete 2-dimensional fan}  \label{fig:fan.plot}
\end{figure}



\section{Fan Morphisms} \label{sec:fan morphisms}

Recall that toric lattices are groups isomorphic to $\ZZ^n$, so while one is free to pick a basis, the origin is fixed, and a morphism between toric lattices is a group homomorphism sending the origin to the origin. If such a morphism behaves well with respect to other cones of two fixed fans, we get a fan morphism.

\begin{definition}
\label{def:fan morphism}
Let $N$ and $N'$ be lattices, $\Sigma$ be a fan in $N_\RR$, and $\Sigma'$ be a fan in $N'_\RR$. A \keyterm{fan morphism} $\phi$ from $\Sigma$ to $\Sigma'$ is a lattice homomorphism $\phi : N \to N'$ such that for any cone $\sigma \in \Sigma$ its image (under the linear extension $\phi_\RR : N_\RR \to N'_\RR$ of $\phi$) is completely contained in some cone $\sigma' \in \Sigma'$.
\end{definition}

Note that $\phi$ also induces a map between $\Sigma$ and $\Sigma'$ as finite sets of cones: $\sigma \in \Sigma$ is mapped to the smallest $\sigma' \in \Sigma'$ containing $\phi_\RR(\sigma)$ or, alternatively, $\sigma \mapsto \sigma'$ if the image of the relative interior of $\sigma$ under $\phi_\RR$ lies in the relative interior of $\sigma'$. We will denote this map of cones by $\phi$ as well, so $\phi(\sigma) = \sigma'$ if $\phi_\RR(\RelInt(\sigma)) \subset \RelInt(\sigma')$.

\begin{definition}
\label{def:primitive cone}
Let $\phi: \Sigma \to \Sigma'$ be a fan morphism, let $\sigma \in \Sigma$, and let $\sigma' = \phi(\sigma)$. Then $\sigma$ is a \keyterm{primitive cone} corresponding to $\sigma'$ if there is no proper face $\tau$ of $\sigma$ such that $\phi(\tau) = \sigma'$.
\end{definition}

Two special cases of fan morphisms are fan subdivisions and inclusions of subfans (e.g. generated by a single cone), in both cases lattices $N$ and $N'$ coincide and $\phi : N \to N'$ is the identity map. The following code creates two such fan morphisms in Sage, with the relevant fans shown in \ref{fig:fan subdivision} and \vref{fig:subfan inclusion}.
\begin{sagecommandline}
sage: quadrant = Fan([Cone([(1,0), (0,1)])])
sage: subdivided_quadrant = quadrant.subdivide([(1,1)])
sage: phi = FanMorphism(identity_matrix(2), subdivided_quadrant, quadrant)
sage: half_quadrant = Fan([subdivided_quadrant.generating_cone(0)])
sage: psi = FanMorphism(identity_matrix(2), half_quadrant, subdivided_quadrant)
\end{sagecommandline}

\begin{figure}[ht]
\centering
\raisebox{-0.5\height}{\sageplot[]{
subdivided_quadrant.plot(xmin=-1, xmax=2.5, ymin=-1, ymax=2.5, mode="box", ray_label=None, wall_label=None),
figsize=[2, 2]}}
$\xrightarrow{\phi}$
\raisebox{-0.5\height}{\sageplot[]{
quadrant.plot(xmin=-1, xmax=2.5, ymin=-1, ymax=2.5, mode="box", ray_label=None, wall_label=None),
figsize=[2, 2]}}
\caption{Fan subdivision} \label{fig:fan subdivision}
\end{figure}

\begin{figure}[ht]
\centering
\raisebox{-0.5\height}{\sageplot[]{
half_quadrant.plot(xmin=-1, xmax=2.5, ymin=-1, ymax=2.5, mode="box", ray_label=None, wall_label=None),
figsize=[2, 2]}}
$\xrightarrow{\psi}$
\raisebox{-0.5\height}{\sageplot[]{
subdivided_quadrant.plot(xmin=-1, xmax=2.5, ymin=-1, ymax=2.5, mode="box", ray_label=None, wall_label=None),
figsize=[2, 2]}}
\caption{Subfan inclusion} \label{fig:subfan inclusion}
\end{figure}

In the above example we have used \sagecommand{subdivide} method of fans to produce \sagecommand{subdivided_quadrant} by specifying new rays that had to be present in the new fan. It is also possible to automatically perform subdivisions necessary for obtaining fan morphisms between ``incompatible fans.'' We demonstrate it using previously constructed complete \sagecommand{fan} (shown in \vref{fig:fan.plot}) projected onto the vertical axis:
\begin{sagecommandline}
sage: v_fan = Fan([Cone([(0,1)]), Cone([(0,-1)])])
sage: xi = FanMorphism(matrix(2, 2, [0,0,0,1]), fan, v_fan, subdivide=True)
sage: xi.domain_fan().ngenerating_cones()
4
\end{sagecommandline}
In this case it was necessary to split one of the cones (the ``top-left'' one) into two, since otherwise the image of this cone was not contained in a single cone of the codomain fan, in fact, its image was not even strictly convex! The resulting fans are shown in \vref{fig:fan projection}.

\begin{figure}[ht]
\centering
\raisebox{-0.5\height}{\sageplot[]{
xi.domain_fan().plot(ray_label=None, wall_label=None),
figsize=[2, 2]}}
$\xrightarrow{\xi}$
\raisebox{-0.5\height}{\sageplot[]{
v_fan.plot(radius=sqrt(2)+1/2, ray_label=None, wall_label=None),
figsize=[2, 2]}}
\caption{Automatic fan subdivision} \label{fig:fan projection}
\end{figure}



\section{Toric Varieties}

In the context of toric geometry tori are different from the usual definitions such as products of circles.

\begin{definition}
A \keyterm{torus} $T$ is an affine variety isomorphic to $(\CC^*)^n$ with the group structure corresponding to componentwise multiplication in $(\CC^*)^n$.
\end{definition}

Every $n$-dimensional torus $T$ has two dual lattices of rank $n$ associated to it: its character lattice $M$ and the lattice of one-parameter subgroups $N$. Fixing an isomorphism $T \simeq (\CC^*)^n$ also fixes isomorphisms $M \simeq \ZZ^n$ and $N \simeq \ZZ^n$. Under these isomorphisms, an element $m = (a_1, \dots, a_n) \in M$ corresponds to the character $\chi^m : T \to \CC^*$ defined by $\chi^m(t) = \chi^m\left(t_1, \dots, t_n\right) = t_1^{a_1} \dots t_n^{a_n}$, while an element $n = (b_1, \dots, b_n) \in N$ corresponds to the one-parameter subgroup $\lambda^n : \CC^* \to T$ defined by $\lambda^n(t) = \left(t^{b_1}, \dots, t^{b_n}\right)$. The natural pairing between $M$ and $N$ corresponds to the usual dot product $\pair{m, n} = \sum_{i=1}^n a_i b_i$ or, equivalently, $\pair{m, n} = \ell$, where $\ell \in \ZZ$ is such that $\chi^m \circ \lambda^n (t) = t^\ell$. There is also a canonical isomorphism $N \otimes_\ZZ \CC^* \simeq T$, given by $n \otimes t \mapsto \lambda^n(t)$, so we can start with an arbitrary lattice $N$ and obtain a torus denoted by $T_N$, such that $N$ is the lattice of one-parameter subgroups of $T_N$.

\begin{definition}
A \keyterm{toric variety} is an irreducible variety $X$ containing a torus $T$ as a Zariski open subset such that the action of $T$ on itself extends to an algebraic action of $T$ on $X$.
\end{definition}

There are different ways to construct toric varieties, but in this work we are primarily interested in toric varieties corresponding to cones and fans.

\begin{theorem}
Let $\sigma \subset N_\RR$ be a strictly convex cone. Then
\begin{gather*}
U_\sigma = \Spec\left(\CC[\sigma^\vee \cap M]\right),
\end{gather*}
where $\CC[\sigma^\vee \cap M]$ is the semigroup algebra of $\sigma^\vee \cap M$, is a normal affine toric variety of dimension $n = \rk N$ with torus $T_N \subset U_\sigma$.

If $X$ is a normal affine toric variety with torus $T_N$, then $X = U_\sigma$ for some $\sigma$ as above.
\end{theorem}

\begin{proof}
See Theorems~1.2.18 and~1.3.5 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

For example, if $\sigma = \set{0}$ is the trivial cone in $N_\RR$, then $\sigma^\vee \cap M = M$ and
\begin{gather*}
U_\sigma
= \Spec(\CC[M])
\simeq \Spec\left(\CC\left[t_1^{\pm 1}, \dots, t_n^{\pm 1}\right]\right)
= (\CC^*)^n
\simeq T_N.
\end{gather*}

\begin{proposition}
Let $\sigma \subset N_\RR$ be a strictly convex cone and $\tau$ be its face. Then there is a natural inclusion $U_\tau \hookrightarrow U_\sigma$. \end{proposition}

\begin{proof}
See Proposition~1.3.16 in~\cite{CoxLittleSchenck:2011} and comments thereafter.
\end{proof}

In particular, the inclusion $T_N \hookrightarrow U_\sigma$ corresponds to the origin being a face of any strictly convex cone $\sigma \subset N_\RR$. It is also possible for two strictly convex cones $\sigma_1$ and $\sigma_2$ in the same space $N_\RR$ to have a bigger common face $\tau$ than the origin. In this case we get natural inclusions $U_{\sigma_1} \hookleftarrow U_\tau \hookrightarrow U_{\sigma_2}$, that allow us to glue $U_{\sigma_1}$ and $U_{\sigma_2}$ along a common open subset. Of course, this works best if $\sigma_1$ and $\sigma_2$ have particularly agreeable face structures.

\begin{theorem} \label{theorem:X_Sigma}
Let $\Sigma$ be a fan in $N_\RR$. Let $X_\Sigma$ be a variety obtained by gluing affine toric varieties $U_\sigma$ for all $\sigma \in \Sigma$ along their maximal common subsets, i.e. $U_{\sigma_1}$ and $U_{\sigma_2}$ are glued along $U_{\sigma_1 \cap \sigma_2}$. Then $X_\Sigma$ is a separated normal toric variety with torus $T_N$.

If $X$ is a separated normal toric variety with torus $T_N$, then $X = X_\Sigma$ for some $\Sigma$ as above.
\end{theorem}

\begin{proof}
See Theorems~3.1.5, 3.1.7, and Corollary~3.1.8 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

Below we use notation $X_\Sigma$ for the normal toric variety associated to a fan $\Sigma$ and, to avoid towers of subscripts, $X_\Delta$ for the toric variety associated to the normal fan $\Sigma_\Delta$ of a lattice polytope $\Delta$.

In Sage we can construct toric varieties of the form $U_\sigma$ and $X_\Sigma$ as follows (as $\Sigma$ we use \sagecommand{fan} constructed earlier):
\begin{sagecommandline}
sage: sigma = Cone([(1,0), (1,2)])
sage: U_sigma = AffineToricVariety(sigma)
sage: U_sigma
2-d affine toric variety
sage: U_sigma.is_smooth()
False
sage: U_sigma.is_orbifold()
True
sage: X_Sigma = ToricVariety(fan)
sage: X_Sigma
2-d toric variety covered by 3 affine patches
sage: X_Sigma.is_smooth()
True
sage: X_Sigma.is_complete()
True
\end{sagecommandline}
Note that $X_\Sigma$ in the above example is ``covered by 3 affine patches.'' While there are definitely more affine open subsets of $X_\Sigma$, three special ones corresponding to maximal cones of $\Sigma$ are \emph{sufficient} to cover $X_\Sigma$. Smoothness and completeness of $X_\Sigma$ in this example easily follow from the structure of $\Sigma$.

\begin{definition}
A cone $\sigma \subset N_\RR$ is called a \keyterm{smooth cone} if it can be generated by a subset of an integral basis, i.e. a basis of the underlying lattice~$N$. A fan is called a \keyterm{smooth fan} if all of its cones are smooth.
\end{definition}

\begin{definition}
A cone $\sigma \subset N_\RR$ is called a \keyterm{simplicial cone} if it can be generated by a linearly independent set. A fan is called a \keyterm{simplicial fan} if all of its cones are simplicial.
\end{definition}

\begin{theorem}
Let $\Sigma$ be a fan in $N_\RR$. Then
\begin{compactenum}
\item $X_\Sigma$ is smooth if and only if $\Sigma$ is smooth,
\item $X_\Sigma$ is an orbifold (has only finite quotient singularities) if and only if $\Sigma$ is simplicial,
\item $X_\Sigma$ is complete (and compact in the Euclidean topology) if and only if $\Sigma$ is complete.
\end{compactenum}
\end{theorem}

\begin{proof}
See Theorem~3.1.19 in~\cite{CoxLittleSchenck:2011}.
\end{proof}



\section{Homogeneous Coordinates} \label{sec:homogeneous coordinates}

While the usual definition of toric varieties corresponding to fans involves gluing affine toric varieties corresponding to cones, just as we have done in Theorem~\ref{theorem:X_Sigma}, it is often more convenient to work with homogeneous coordinates ``covering'' the whole variety at once, rather than chart by chart. This description works best for orbifolds without torus factors, so we often state results for such varieties only, although most of them have variations without this assumption.

\begin{definition}
A toric variety $X$ with torus $T$ has a \keyterm{torus factor} if it is equivariantly isomorphic to the product $X' \times T''$ of a non-trivial torus $T''$ and a toric variety of smaller dimension $X'$ with torus $T'$, i.e. $X \simeq X' \times T''$ and $T \simeq T' \times T''$.
\end{definition}

\begin{proposition}
Let $\Sigma$ be a fan in $N_\RR$. Then $X_\Sigma$ has a torus factor if and only if rays of $\Sigma$ do not span $N_\RR$.
\end{proposition}

\begin{proof}
See Proposition~3.3.9 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

\begin{definition} \label{definition:homogeneous coordinates}
Let $X_\Sigma$ be a toric variety without torus factors associated to a fan $\Sigma$ in $N_\RR$.
The \keyterm{total coordinate ring} (a.k.a. \keyterm{homogeneous coordinate ring} or \keyterm{Cox's ring}) of $X_\Sigma$ is the polynomial ring $S(\Sigma) = \CC\left[z_\rho : \rho \in \Sigma(1)\right]$ with one variable for each ray of~$\Sigma$.
The \keyterm{irrelevant ideal} is $B(\Sigma) = \left\langle z^{\hat{\sigma}} : \sigma \in \Sigma \right\rangle$, where $z^{\hat{\sigma}} = \prod_{\rho \not\in \sigma} z_\rho$.
The zero set of this ideal is the \keyterm{exceptional set} $Z(\Sigma) = V(B(\Sigma)) \subset \CC^{\Sigma(1)}$, where $\CC^{\Sigma(1)} = \Spec(S(\Sigma))$ is the usual Cartesian product of copies of $\CC$ indexed by rays $\rho \in \Sigma(1)$.
\end{definition}

\begin{theorem}
Let $X_\Sigma$ be an orbifold toric variety without torus factors corresponding to a fan $\Sigma$ in $N_\RR$.
Let $G \subset (\CC^*)^{\Sigma(1)}$ be the kernel of the map $(\CC^*)^{\Sigma(1)} \to T_N$ sending the ray in $(\CC^*)^{\Sigma(1)}$ corresponding to $\rho \in \Sigma(1)$ to the one-parameter subgroup of $T_N$ corresponding to the primitive generator of $\rho$.
Then $X_\Sigma \simeq \left(\CC^{\Sigma(1)} \setminus Z(\Sigma)\right) / G$, where the action of $G$ is given by componentwise multiplication.
\end{theorem}

\begin{proof}
See Theorem~5.1.11 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

\begin{remark}
Homogeneous coordinates can be used for more general toric varieties as well, however if there is a torus factor, the choice of coordinates corresponding to it is not canonical, while allowing worse than orbifold singularities leads to only \emph{almost geometric quotient}, see Chapter~5 in~\cite{CoxLittleSchenck:2011} for further details.
\end{remark}

\begin{example}[The Projective Plane]
Let's take a look at the quotient representation of $X_\Sigma$ corresponding to the complete fan we have already encountered many times. Let $\Sigma$ contain the trivial cone, rays generated by $v_0=(1,0)$, $v_1=(0,1)$, $v_2=(-1,-1)$, and 2-dimensional cones $\sigma_0=\Cone(\set{v_1, v_2})$, $\sigma_1=\Cone(\set{v_0, v_2})$, $\sigma_2=\Cone(\set{v_0, v_1})$ (see \vref{fig:fan.plot}).

Since we have 3 rays, the total coordinate ring is $S=\CC[z_0, z_1, z_2]$ and $\CC^{\Sigma(1)} = \CC^3$. The irrelevant ideal is generated by 7 monomials (one for each cone of the fan):
\begin{gather*}
B(\Sigma) =
\left\langle
z_0 z_1 z_2,
z_1 z_2, z_0 z_2, z_0 z_1,
z_2, z_1, z_0
\right\rangle
=
\left\langle
z_0, z_1, z_1
\right\rangle
.
\end{gather*}
The exceptional set is just the origin, $Z(\Sigma)=V(z_0, z_1, z_2)=\set{(0,0,0)}$.

It remains to determine $G$, which is the kernel of the map $(\CC^*)^3 \to (\CC^*)^2$ given by $(\lambda_0, \lambda_1, \lambda_2) \mapsto (\lambda_0 \lambda_2^{-1}, \lambda_1 \lambda_2^{-1})$. Since $(\lambda_0 \lambda_2^{-1}, \lambda_1 \lambda_2^{-1}) = (1, 1)$ if and only if $\lambda_0 = \lambda_1 = \lambda_2$, we see that $G \simeq \CC^*$ with action on $\CC^3$ given by ${\lambda \cdot (z_0, z_1, z_2)} = (\lambda z_0, \lambda z_1, \lambda z_2)$.

Combining all pieces together, we get $X_\Sigma = (\CC^3 \setminus \set{(0,0,0)})/ G$, which is the usual quotient description of the projective plane, $X_\Sigma \simeq \PP^2$!
\end{example}

Now that we know that our $X_\Sigma$ is the projective plane, we can access it in Sage much quicker, avoiding explicit fan and variety construction:
\begin{sagecommandline}
sage: P2 = toric_varieties.P(2)
sage: P2
2-d CPR-Fano toric variety covered by 3 affine patches
sage: P2.plot()
Graphics object consisting of 16 graphics primitives
\end{sagecommandline}
We explain the meaning of ``CPR-Fano'' in the description of \sagecommand{P2} in~\ref{section:reflexive and Fano}, meanwhile, note that it is possible to plot \sagecommand{P2}: Sage actually plots the underlying fan with rays labelled by corresponding coordinates, as shown in~\vref{fig:projective plane}.
\begin{figure}[ht]
\centering
\sageplot[]{P2.plot(), figsize=[3, 3]}
\caption{Projective plane} \label{fig:projective plane}
\end{figure}

When working with toric varieties in Sage, beware of the following convention:
\begin{sagecommandline}
sage: P2.coordinate_ring()
Multivariate Polynomial Ring in z0, z1, z2 over Rational Field
\end{sagecommandline}
As you see, the coordinate ring of \sagecommand{P2} turned out to be over rational rather than complex numbers. This is done for the sake of fast \emph{and precise} arithmetic, we still treat toric varieties as defined over complex numbers. If you wish, you can drop this implicit assumption and work with ``honest'' complex varieties:
\begin{sagecommandline}
sage: P2_over_CC = P2.base_extend(CC)
sage: P2_over_CC.coordinate_ring()
Multivariate Polynomial Ring in z0, z1, z2 over Complex Field with 53 bits of precision
\end{sagecommandline}

The projective plane example suggests that the original description of the irrelevant ideal in Definition~\ref{definition:homogeneous coordinates} is not the most efficient one. Indeed, it is enough to take only monomials $z^{\hat{\sigma}}$ corresponding to all $\sigma \in \Sigma_{\max}$, since all other cones will give multiples of these monomials. It is also possible to describe irreducible components of the exceptional set.

\begin{definition}
Let $\Sigma$ be a fan.
A \keyterm{primitive collection} of $\Sigma$ is any subset $C$ of rays of $\Sigma$ such that
\begin{compactenum}
\item $C$ is not contained in any cone $\sigma \in \Sigma$;
\item any proper subset of $C$ is contained in some cone $\sigma \in \Sigma$.
\end{compactenum}
\end{definition}

\begin{proposition}
Let $\Sigma$ be a fan.
The decomposition of the exceptional set $Z(\Sigma)$ into its irreducible components is given by $Z(\Sigma)=\cup_C V(z_\rho : \rho \in C)$ with $C$ running over all primitive collections of $\Sigma$.
\end{proposition}

\begin{proof}
See Proposition~5.1.6 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

In addition to the projective plane, let us also mention toric realizations of other standard spaces. In the 1-dimensional case there are only three possible fans: the origin corresponding to the torus $\CC^*$, the ray corresponding to the affine line $\AAA^1$, and the complete fan corresponding to the projective line $\PP^1$. In any dimension $n$ the fan generated by the cone on standard basis vectors of the lattice corresponds to $\AAA^n$. If we add one more ray opposite to the sum of basis vectors and take all cones generated by all-but-one rays from this collection, we get the fan corresponding to $\PP^n$. In Sage one can quickly construct these varieties using \sagecommand{toric_varieties.A(n)} and \sagecommand{toric_varieties.P(n)}. Finally, the product of fans corresponds to the product of varieties, for example \vref{fig:P1xP1} shows the fan of $\PP^1 \times \PP^1$, accessible in Sage via \sagecommand{toric_varieties.P1xP1()}.
\begin{figure}[ht]
\centering
\sageplot[]{toric_varieties.P1xP1().plot(), figsize=[3, 3]}
\caption{Product of projective lines} \label{fig:P1xP1}
\end{figure}



\section{Torus Orbits and Toric Divisors}

Since any toric variety $X$ comes equipped with a torus action by definition, it has a stratification into orbits of this action. One of them is the torus itself and, by definition, its closure is the whole variety. Closures of other orbits correspond to subvarieties of smaller dimension and it turns out that they are numerous enough to generate both the class group $\Cl(X)$ and the Chow group of~$X$.

\begin{theorem}
Let $\Sigma$ be a fan in $N_\RR$, $\dim N_\RR = n$. Then:
\begin{compactenum}
\item There is a bijective correspondence between cones $\sigma \in \Sigma$ and $T_N$-orbits $O(\sigma) \subset X_\Sigma$, with $\dim O(\sigma) = n - \dim \sigma$.
\item Affine subsets $U_\sigma$ are unions of orbits, $U_\sigma = \bigcup_{\tau \text{ \rm face of } \sigma}  O(\tau)$.
\item The closure of $O(\sigma)$ is $\overline{O(\sigma)} = \bigcup_{\sigma \text{ \rm face of } \tau \in \Sigma} O(\tau)$ in both Zariski and Euclidean topologies.
\end{compactenum}
\end{theorem}

\begin{proof}
See Theorem~3.2.6 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

\begin{definition}
Let $\Sigma$ be a fan in $N_\RR$. For any $\rho \in \Sigma(1)$ a \keyterm{prime toric divisor} $D_\rho$ of $X_\Sigma$ is the torus-invariant Weil divisor $D_\rho = \overline{O(\rho)}$. The \keyterm{group of toric divisors} is
$\Div_{T_N}(X_\Sigma) = \bigoplus_{\rho \in \Sigma(1)} \ZZ D_\rho \subset \Div(X_\Sigma)$.
\end{definition}

Characters correspond to principal toric divisors, so we get a natural map $M \to \Div_{T_N}(X_\Sigma)$ and its cokernel is the class group.

\begin{proposition}
Let $\Sigma$ be a fan in $N_\RR$. Let $m \in M$. Then the divisor on $X_\Sigma$ corresponding to $\chi^m$ is $\divisor(\chi^m) = \sum_{\rho \in \Sigma(1)} \pair{m, v_\rho} D_\rho$, where $v_\rho$ is the primitive integral generator of $\rho$.
\end{proposition}

\begin{proof}
See Proposition~4.1.2 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

\begin{theorem}
Let $X_\Sigma$ be the toric variety without torus factors corresponding to a fan $\Sigma$ in $N_\RR$. Then
\begin{gather*}
0 \to M \to \Div_{T_N}(X_\Sigma) \to \Cl(X_\Sigma) \to 0
\end{gather*}
is a short exact sequence.
\end{theorem}

\begin{proof}
See Theorem~4.1.3 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

The exact sequence of the above theorem gives a $\Cl(X_\Sigma)$-grading on the total coordinate ring of $X_\Sigma$: for a monomial $z^a \in S(\Sigma)$ with $a \in \ZZ^{\Sigma(1)}$ we define its degree $\deg(z^a)$ to be the class of the divisor $\sum_\rho a_\rho D_\rho$.  This grading strengthens the similarity between projective spaces and more general toric varieties.

\begin{theorem}
Let $\Sigma$ be a simplicial fan.  Then there is a bijective correspondence between closed subvarieties of $X_\Sigma$ and radical homogeneous ideals $I \subset B(\Sigma) \subset S(\Sigma)$.
\end{theorem}

\begin{proof}
See Proposition~5.2.7 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

While it is necessary to require inclusion into the irrelevant ideal to get a bijective correspondence between ideals and subvarieties, it is sometimes more convenient to work with simpler ideals that fail to satisfy this condition. In particular, a prime toric divisor $D_\rho$ can be described by the equation ${z_\rho = 0}$, while the ideal corresponding to it according to the theorem is $I(D_\rho) = \pair{z_\rho} \cap B(\Sigma)$. This does not imply that these divisors are always Cartier, since homogeneous coordinate functions may often fail to be valid functions on the toric variety due to incompatibility with the quotient map.

Here is an example of creating a Weil toric divisor in Sage, checking that it is in fact Cartier, mapping it to the (rational) class group and lifting back to the toric divisor group.
\begin{sagecommandline}
sage: P1xP1 = toric_varieties.P1xP1()
sage: D1 = P1xP1.divisor(1)
sage: D1
V(t)
sage: D1.is_Cartier()
True
sage: D1_class = D1.divisor_class()
sage: D1_class
Divisor class [1, 0]
sage: P1xP1.rational_class_group().rank()
2
sage: D1_class.lift()
V(s)
sage: D1_class.lift() == D1
False
\end{sagecommandline}

Next we give a combinatorial description of global sections of toric divisors.

\begin{definition}
Let $\Sigma$ be a fan in $N_\RR$, let $D = \sum_\rho a_\rho D_\rho$ be a toric divisor on $X_\Sigma$. The \keyterm{polyhedron of the divisor} $D$ is
\begin{gather*}
P_D = \set{u \in M_\RR : \pair{u, v_\rho} \geqslant - a_\rho \text{ for all } \rho \in \Sigma(1)},
\end{gather*}
where $v_\rho$ are primitive integral generators of the rays $\rho$.
Given a character $\chi^m$ with $m \in P_D \cap M$, its \keyterm{$D$-homogenization} is the monomial
\begin{gather*}
z^{\pair{m, D}} = \prod_\rho z_\rho^{\pair{m, v_\rho} + a_\rho} \in S(\Sigma).
\end{gather*}
\end{definition}

Polyhedra of divisors are not lattice polytopes in general: they may be unbounded and may have non-integral vertices. Clearly, it is possible to reconstruct the divisor $D$ from the inequalities used in the definition of $P_D$, however some of these inequalities may be redundant or non-unique for specifying $P_D$ (e.g. if it is the empty polytope, it can be described by any pair of incompatible inequalities), so we don't get a bijective correspondence here.

\begin{proposition}
Let $\Sigma$ be a fan in $N_\RR$, let $D$ be a toric divisor on $X_\Sigma$. Then $\Gamma(X_\Sigma, \cO_{X_\Sigma}(D)) = \bigoplus_{m \in P_D \cap M} \CC \chi^{m}$.
\end{proposition}

\begin{proof}
See Proposition~4.3.3 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

Of particular interest to us are the canonical divisor $K_X$ of a toric variety $X$ and global sections of the anticanonical divisor $-K_X$.

\begin{theorem}
Let $\Sigma$ be a fan. Then a toric canonical divisor on $X_\Sigma$ is $K_{X_\Sigma} = - \sum_\rho D_\rho$.
\end{theorem}

\begin{proof}
See Theorem~8.2.3 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

The anticanonical divisor of $\PP^1 \times \PP^1$ has 9 sections:
\begin{sagecommandline}
sage: P1xP1.K()
-V(s) - V(t) - V(x) - V(y)
sage: aK = - P1xP1.K()
sage: aK
V(s) + V(t) + V(x) + V(y)
sage: P_aK = aK.polyhedron()
sage: P_aK
A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 4 vertices.
sage: P_aK.vertices()
[[1, -1], [1, 1], [-1, 1], [-1, -1]]
sage: aK.sections()
(M(1, -1), M(1, 1), M(-1, 1), M(-1, -1), M(-1, 0), M(0, -1), M(0, 0), M(0, 1), M(1, 0))
sage: aK.sections_monomials()
(s^2*y^2, s^2*x^2, t^2*x^2, t^2*y^2, t^2*x*y, s*t*y^2, s*t*x*y, s*t*x^2, s^2*x*y)
\end{sagecommandline}



\section{Toric Morphisms}

Given a morphism between two toric varieties, it is natural to require its compatibility with the torus action.

\begin{definition}
\label{def:toric morphism}
Let $N$ and $N'$ be lattices, $\Sigma$ be a fan in $N_\RR$, and $\Sigma'$ be a fan in $N'_\RR$. A morphism $\phi: X_\Sigma \to X_{\Sigma'}$ between toric varieties is a \keyterm{toric morphism} if $\phi$ maps the torus $T_N \subset X_\Sigma$ into the torus $T_{N'} \subset X_{\Sigma'}$ as a group homomorphism.
\end{definition}

\begin{theorem}
\label{theorem:fan-toric morphisms correspondence}
Let $N$ and $N'$ be lattices, $\Sigma$ be a fan in $N_\RR$, and $\Sigma'$ be a fan in $N'_\RR$. There is a bijection between toric morphisms from $X_\Sigma$ to $X_\Sigma'$ and fan morphisms from $\Sigma$ to $\Sigma'$.
For a fan morphism $\phi: \Sigma \to \Sigma'$ the associated toric morphism $\tld{\phi}: X_\Sigma \to X_{\Sigma'}$ is given on the torus $T_N$ by
\begin{gather*}
T_N \simeq N \otimes_{\ZZ} \CC^*
\xrightarrow{\phi \otimes 1}
N' \otimes_{\ZZ} \CC^* \simeq T_{N'}
\end{gather*}
and extended to $X_\Sigma$ by continuity.
\end{theorem}

\begin{proof}
See Theorem~3.3.4 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

Now we turn our attention to a description of toric morphisms in terms of homogeneous coordinates. Recall that these coordinates work best for orbifolds without torus factors, so let's assume that we are in such a situation, i.e. both the domain fan $\Sigma$ and the codomain fan $\Sigma'$ are full-dimensional and simplicial.

Let $v$ be the primitive generator of a ray $\rho \in \Sigma$. Let $\sigma' \in \Sigma'$ be the minimal cone containing $\phi(v)$. Let $v'_1, \dots, v'_k$ be the primitive generators of rays $\rho'_1, \dots, \rho'_k$ of $\sigma'$. Then $\phi(v) = a_1 v'_1 + \dots + a_k v'_k$ for a unique choice of $a_1, \dots, a_k \in \QQ_{>0}$, since $\sigma'$ is simplicial and $\phi(v)$ is its interior point. (We could replace $\QQ$ with $\ZZ$ if $\sigma'$ was smooth.) Now a point $p \in X_\Sigma$ with all homogeneous coordinates but $z_\rho$ equal to~$1$ is sent to a point $p' \in X_{\Sigma'}$ with homogeneous coordinates $z_{\rho'_1} = z_\rho^{a_1}, \dots, z_{\rho'_k} = z_\rho^{a_k}$ and all others equal to~$1$. This is sufficient to define the image of any point $p \in X_\Sigma$ without zero homogeneous coordinates, but the resulting expression for the map makes sense globally due to the compatibility of $\phi$ with fans $\Sigma$ and $\Sigma'$.

A subtle point of the above description is a possibility of fractional powers. While this does mean that the induced map between total coordinate rings $S(\Sigma') \to S(\Sigma)$ is not polynomial, the ambiguity of a branch choice merely reflects the presence of a finite group action identifying them. As long as the made choice is consistent, it is still possible to use this map to pullback functions from $X_{\Sigma'}$ to $X_\Sigma$. We illustrate this via the following example.

\begin{example}[Resolution of $\WP(1,2,3)$]
\label{example:WP123}
Let $X_{\Sigma'}$ be a toric realization of the weighted projective space $\WP(1,2,3)$ (\sagecommand{X_p} in the code below) and $X_\Sigma$ be its desingularization (\sagecommand{X} in the code). We use coordinates $z$ on the original space and $y$ on the desingularization, the fans are shown on~\vref{fig:WP123}.
\begin{sagecommandline}
sage: Delta_polar = LatticePolytope([(1,0), (0,1), (-2,-3)])
sage: X_p = ToricVariety(FaceFan(Delta_polar))
sage: X_p.is_smooth()
False
sage: X = X_p.resolve(new_rays=[(-1,-1), (-1,-2), (0,-1)], coordinate_names="y+")
sage: X.is_smooth()
True
\end{sagecommandline}

\begin{figure}[ht]
\centering
\raisebox{-0.5\height}{\sageplot[]{
X.plot(wall_label=None),
figsize=[3, 3]}}
$\xrightarrow{\phi}$
\raisebox{-0.5\height}{\sageplot[]{
X_p.plot(wall_label=r"$\sigma^'$"), % THIS IS A WORKAROUND FOR A BUG IN SAGE (TRAC #10717), THE PRIME ON SIGMA SHOULD NOT BE MARKED AS A SUPERSCRIPT
figsize=[3, 3]}}
\caption{Resolution of $\WP(1,2,3)$} \label{fig:WP123}
\end{figure}

Since it is a subdivision, an acceptable point with homogeneous coordinates $[y_0 : y_1 : y_2 : 1 : 1 : 1]$ is sent to $[y_0 : y_1 : y_2]$. To determine images of other points, we need to decompose the generator corresponding to $y_3$ using ray generators of $\sigma'_0$ and generators corresponding to $y_4$ and $y_5$ using ray generators of $\sigma'_2$. We have:
\begin{align*}
y_3 &: & (-1,-1) &= \frac{1}{2} \cdot (0, 1) + \frac{1}{2} \cdot (-2, -3),\\
y_4 &: & (-1,-2) &= \frac{1}{3} \cdot (1, 0) + \frac{2}{3} \cdot (-2, -3),\\
y_4 &: & (0,-1) &= \frac{2}{3} \cdot (1, 0) + \frac{1}{3} \cdot (-2, -3),
\end{align*}
so the map is
\begin{gather*}
\left[y_0 : y_1 : y_2 : y_3 : y_4 : y_5\right]
\mapsto
\left[y_0 y_4^{1/3} y_5^{2/3} : y_1 y_3^{1/2} : y_2 y_3^{1/2} y_4^{2/3} y_5^{1/3}\right].
\end{gather*}
Sage does not (yet) provide built-in support for such maps, but we can emulate them using ``positive'' symbolic variables to allow simplification of fractional powers:
\begin{sagecommandline}
sage: [var(v, domain="positive") for v in X_p.coordinate_ring().variable_names()]
[z0, z1, z2]
sage: [var(v, domain="positive") for v in X.coordinate_ring().variable_names()]
[y0, y1, y2, y3, y4, y5]
sage: sd = {z0: y0*y4^(1/3)*y5^(2/3), z1: y1*y3^(1/2), z2: y2*y3^(1/2)*y4^(2/3)*y5^(1/3)}
\end{sagecommandline}
Substituting this dictionary into functions on the original variety, we will get pullbacks to the resolved one. For example, let's pullback the sum of all monomial sections of the divisor corresponding to $z_0$:
\begin{sagecommandline}
sage: D = X_p.divisor(0)
sage: D
V(z0)
sage: sum(D.sections_monomials())
z2^2 + z0
sage: SR(sum(D.sections_monomials())).subs(sd)
y2^2*y3*y4^(4/3)*y5^(2/3) + y0*y4^(1/3)*y5^(2/3)
\end{sagecommandline}
Here is a typeset and factored version of the pullback:
$$
\sage{SR(sum(D.sections_monomials())).subs(sd).factor()}.
$$
Obviously, this is not a rational function, but we could expect something like this since we were pulling back only a $\QQ$-Cartier divisor:
\begin{sagecommandline}
sage: D.is_Cartier()
False
sage: D.is_QQ_Cartier()
True
sage: threeD = 3*D
sage: threeD
3*V(z0)
sage: threeD.is_Cartier()
True
\end{sagecommandline}
Performing the above steps for \sagecommand{threeD} instead of \sagecommand{D} shows that the pullback of its section
\begin{equation*}
\sage{sum(threeD.sections_monomials())}
\end{equation*}
is { \small
\begin{equation*}
\sage{SR(sum(threeD.sections_monomials())).subs(sd).factor()}.
\end{equation*} }%
These two polynomials are actually sections of the anticanonical line bundles and, as we will see in the next chapter, they define one-dimensional Calabi-Yau varieties, i.e. elliptic curves.
\end{example}





\chapter{Toric Geometry in Mirror Symmetry}\label{chapter:TG and MS}

In this chapter we describe Batyrev's construction of mirror families of Calabi-Yau anticanonical hypersurfaces in toric varieties~\cite{Batyrev:1994} and its generalization to nef complete intersections by Batyrev and Borisov~\cite{BatyrevBorisov:1996CYCIinTV}. As before, we provide Sage examples whenever possible.



\section{Reflexive Polytopes and Fano Varieties} \label{section:reflexive and Fano}

We have already seen in \ref{sec:fans from polytopes} how fans and, therefore, toric varieties can be associated to lattice polytopes. Now we concentrate on a special class of such varieties.

\begin{definition}
A \keyterm{Gorenstein Fano variety} is a complete normal variety whose anticanonical divisor is Cartier and ample.
\end{definition}

\begin{definition}
Let $\Delta \subset M_\RR$ be a full-dimensional lattice polytope. Its \keyterm{polar polytope} is $\Delta^\circ = \set{v \in N_\RR : \pair{u, v} \geqslant - 1 \text{ for all } u \in \Delta} \subset N_\RR$.
\end{definition}

\begin{definition}
A \keyterm{reflexive polytope} is a full-dimensional lattice polytope $\Delta \subset M_\RR$ such that its polar $\Delta^\circ \subset N_\RR$ is also a (full-dimensional) lattice polytope.
\end{definition}

Alternatively, a lattice polytope $\Delta \subset M_\RR$ is reflexive if it  contains the origin in its interior and the lattice distance from every facet to the origin is $1$, i.e. if $v$ is a primitive integral inner normal to a facet of $\Delta$, then the equation of the supporting hyperplane of this facet is $\pair{u, v} + 1 = 0$.

Note that $\left(\Delta^\circ\right)^\circ = \Delta$, so we get polar duality between reflexive polytopes in $M_\RR$ and reflexive polytopes in $N_\RR$. Similar to duality of cones, faces of $\Delta$ and $\Delta^\circ$ are in an inclusion-reversing bijective correspondence.

\begin{theorem}
Let $\Sigma$ be a fan in $N_\RR$. Then $X_\Sigma$ is a projective Gorenstein Fano variety if and only if $\Sigma$ is the normal fan of a reflexive polytope $\Delta \subset M_\RR$, i.e. $\Sigma = \Sigma_\Delta$.
\end{theorem}

\begin{proof}
See Theorem~8.3.4 in~\cite{CoxLittleSchenck:2011}.
\end{proof}

We have constructed the fan of the projective plane in several ways, one of them was using the normal fan of the following polytope:
\begin{sagecommandline}
sage: Delta = LatticePolytope([(2,-1), (-1,2), (-1,-1)])
sage: Delta.is_reflexive()
True
sage: Delta.polar().vertices()
[ 1  0 -1]
[ 0  1 -1]
sage: NormalFan(Delta).ray_matrix()
[ 1  0 -1]
[ 0  1 -1]
\end{sagecommandline}
For a reflexive polytope $\Delta$ vertices of $\Delta^\circ$ coincide with primitive integral generators of rays of the normal fan $\Sigma_\Delta$, so one can also think of $\Sigma_\Delta$ as the face fan of $\Delta^\circ$. From the computational point of view, it may be more convenient to use the latter since you can pick the order of vertices of $\Delta^\circ$ if you construct them directly (automatically constructed polar polytopes and normal fans have their vertices/rays in a fixed, but random order).
\begin{sagecommandline}
sage: P2_n = ToricVariety(NormalFan(Delta))
sage: P2_f = ToricVariety(FaceFan(Delta.polar()))
sage: P2_n == P2_f
True
\end{sagecommandline}
Sage provides special support for working with Fano toric varieties, so instead of the above commands one can use
\begin{sagecommandline}
sage: P2_n = CPRFanoToricVariety(Delta)
sage: P2_f = CPRFanoToricVariety(Delta_polar=Delta.polar())
sage: P2_n == P2_f
True
\end{sagecommandline}

Now let's take a look at the Fano toric variety corresponding to the \emph{normal fan of $\Delta^\circ$} or, equivalently, let's switch the roles of $\Delta$ and $\Delta^\circ$ in our computations:
\begin{sagecommandline}
sage: Delta = Delta.polar()
sage: X = CPRFanoToricVariety(Delta)
sage: X
2-d CPR-Fano toric variety covered by 3 affine patches
sage: X.is_smooth()
False
sage: X.is_orbifold()
True
\end{sagecommandline}
As we see, $X$ has some finite quotient singularities, since its fan (shown in \vref{fig:P2 polar}) is simplicial but not smooth. To figure out the exact nature of these singularities, we can use the quotient description of $X$ from \ref{sec:homogeneous coordinates}. As for the projective plane, $X = (\CC^3 \setminus \set{(0,0,0)}) / G$, but the group $G$ is a little different. It is the kernel of the map $(\CC^*)^3 \to (\CC^*)^2$ given by $(\lambda_0, \lambda_1, \lambda_2) \mapsto (\lambda_0^2 \lambda_1^{-1} \lambda_2^{-1}, \lambda_0^{-1} \lambda_1^2 \lambda_2^{-1})$. Equating the image to $(1,1)$, we get $\lambda_0^2 = \lambda_1 \lambda_2$ and $\lambda_0 = \lambda_1^2 \lambda_2^{-1}$, so $\lambda_1^4 \lambda_2^{-2} = \lambda_1 \lambda_2$ and $\lambda_1^3 = \lambda_2^3$. Then $\lambda_1 = \epsilon_3 \lambda_2$, where $\epsilon_3$ is a primitive cube root of unity, and $\lambda_0 = (\epsilon_3 \lambda_2)^2 \lambda_2^{-1} = \epsilon_3^2 \lambda_2$. We see that $G \simeq \CC^* \times \ZZ_3$ with action on $\CC^3$ given by ${(\lambda, k) \cdot (z_0, z_1, z_2)} = (\lambda \epsilon_3^{2k} z_0, \lambda \epsilon_3^k z_1, \lambda z_2)$, so $X = \PP^2 / \ZZ_3$.

\begin{figure}[ht]
\centering
\sageplot[]{X.plot(wall_label=None), figsize=[3, 3]}
\caption{Fano toric variety polar to the projective plane} \label{fig:P2 polar}
\end{figure}

It is possible to resolve orbifold singularities of toric varieties in Sage by specifying either rays used for fan subdivision or, in the case of Fano varieties, points of $\Delta^\circ$. The easiest way to resolve many (but not necessarily all in higher dimensions) singularities is to use  all these points:
\begin{sagecommandline}
sage: X_res = CPRFanoToricVariety(Delta, coordinate_points="all")
sage: X_res
2-d CPR-Fano toric variety covered by 9 affine patches
sage: X_res.is_smooth()
True
\end{sagecommandline}
The fan of this resolved variety is shown in \vref{fig:P2 polar resolved}. Since it is obtained as a subdivision of $\Sigma_\Delta$, it is not immediately clear if it is the normal fan of some other reflexive polytope. We will see later that it is not, so $X_{\rm res}$ is not Fano. On the other hand, it is closely related to one.

\begin{figure}[ht]
\centering
\sageplot[]{X_res.plot(wall_label=None, generator_color=["blue"]*3 + ["red"]*6), figsize=[3, 3]}
\caption{Resolution of the toric variety polar to the projective plane} \label{fig:P2 polar resolved}
\end{figure}

\begin{definition}
Let $\Delta \subset M_\RR$ be a reflexive polytope. Let $\Sigma$ be a subdivision of $\Sigma_\Delta$. If all rays of $\Sigma$ are generated by (some of) the boundary lattice points of $\Delta^\circ$, it is a \keyterm{crepant subdivision}. If $\Sigma$ is also simplicial and the corresponding toric variety $X_\Sigma$ is projective, it is a \keyterm{projective crepant subdivision}. If also \emph{all} boundary lattice points of $\Delta^\circ$ generate rays of $\Sigma$, it is a \keyterm{maximal projective crepant subdivision}.
\end{definition}

Such subdivisions correspond to \emph{maximal projective crepant partial desingularizations (MPCP-desingularizations)} introduced by Batyrev in~\cite{Batyrev:1994}. The meaning of ``maximal'' and ``projective'' is clear from the definition. ``Partial'' reflects the fact that such subdivisions are not always sufficient to completely resolve all singularities of the toric variety associated to the original normal fan. Finally, ``crepant'' means that the corresponding morphism between varieties is crepant.

\begin{proposition}
Let $\Delta \subset M_\RR$ be a reflexive polytope. Let $\Sigma$ be a subdivision of $\Sigma_\Delta$. Then the associated morphism $\phi: X_\Sigma \to X_\Delta$ is crepant (meaning that $\phi^*\left(K_{X_\Delta}\right) = K_{X_\Sigma}$) if and only if $\Sigma$ is a crepant subdivision.
\end{proposition}

\begin{proof}
See Proposition~2.2.12 in~\cite{Batyrev:1994}.
\end{proof}

From the computational point of view, it is not always convenient to work with maximal subdivisions since associated varieties may involve too many homogeneous variables and affine charts. Also, as it is clear from the definition, ``crepant'' has a simpler combinatorial interpretation than ``projective.'' For these reasons Sage provides support for \emph{crepant partial resolutions} of Fano toric varieties and we refer to them as \emph{CPR-Fano toric varieties}.


There are infinitely many reflexive polytopes, for example, all polygons
\begin{gather*}
P_k = \Conv \set{(1,0), (k,1), (-1-k, -1)},\quad k \in \ZZ,
\end{gather*}
are reflexive with polar polygons
\begin{gather*}
P_k^\circ = \Conv \set{(2,-2k-1), (-1,k-1), (-1,k+2)}.
\end{gather*}
Note that in this example we can go from any polygon $P_{k_1}$ to any other $P_{k_2}$ using a $GL(2, \ZZ)$-transformation, i.e. by changing lattice coordinates:
\begin{gather*}
P_{k_2} =
\begin{pmatrix}
1 & k_2 - k_1\\
0 & 1
\end{pmatrix}
\cdot
P_{k_1}.
\end{gather*}
These transformations induce isomorphisms between corresponding toric varieties, so it is natural to distinguish reflexive polytopes only up to a $GL(2, \ZZ)$-transformation. In this case it is known that there are only finitely many reflexive polytopes in each dimension. Obviously, there is only one 1-dimensional reflexive polytope, it is also not very difficult to obtain by hand all 16 reflexive polygons. The general construction algorithm is known~\cite{KreuzerSkarke:1997} and implemented in software PALP (Package for Analyzing Lattice Polytopes)~\cite{PALP}. Using their software Kreuzer and Skarke have obtained complete lists of 4,319 reflexive polytopes in dimension 3~\cite{KreuzerSkarke:1998} and 473,800,776 reflexive polytopes in dimension 4~\cite{KreuzerSkarke:2002}. It is estimated that there are about $10^{18}$ reflexive polytopes in dimension 5~\cite{Kreuzer:2008}.

Reflexive polygons and 3-dimensional polytopes are easily accessible in Sage:
\begin{sagecommandline}
sage: p = ReflexivePolytope(2, 12)
sage: p
Reflexive polytope   12: 2-dimensional, 3 vertices.
sage: p.vertices()
[ 1  1 -3]
[ 0  2 -2]
sage: max(p.nfacets() for p in ReflexivePolytopes(2))
6
\end{sagecommandline}
The last computation shows that there are no reflexive polygons with 9 facets, therefore, the fan in \vref{fig:P2 polar resolved} is not the normal fan of one.



\section{Anticanonical Hypersurfaces}

Since we need to allow some singularities, we are using the term \emph{Calabi-Yau variety} in the sense of Definition~1.4.1 in~\cite{CoxKatz:1999}.


\begin{definition}
A \keyterm{Calabi-Yau variety} is an irreducible normal compact variety $V$ which satisfies the following conditions:
\begin{compactenum}
\item $V$ has at most Gorenstein canonical singularities;
\item $V$ has trivial canonical sheaf;
\item $H^i(V, \cO_V) = 0$ for $i=1,\dots, \dim V - 1$.
\end{compactenum}
\end{definition}

\begin{theorem}
Let $\Delta$ be a reflexive polytope of dimension $n$. A generic anticanonical hypersurface in $X \!=\! X_\Delta$, i.e. a generic section $f \in \Gamma(X, \cO_X(-K_X))$, is a Calabi-Yau variety of dimension $n-1$. A generic anticanonical hypersurface in $X = X_\Sigma$, where $\Sigma$ is a projective crepant subdivision of $\Sigma_\Delta$, is a Calabi-Yau orbifold of dimension $n-1$.
\end{theorem}

\begin{proof}
See Proposition~4.1.3 in~\cite{CoxKatz:1999}.
\end{proof}

For a reflexive polytope $\Delta \subset M_\RR$ projective crepant subdivisions of $\Sigma_\Delta$ correspond to special triangulations of the boundary of $\Delta^\circ$. For any such subdivision the polytope of the anticanonical divisor is easily seen to be $\Delta$ itself. This means that  in equations of anticanonical Calabi-Yau hypersurfaces variables correspond to points of $\Delta^\circ$ while (coefficients of) monomials correspond to points of $\Delta$. Due to polar duality of reflexive polytopes roles of $\Delta$ and $\Delta^\circ$ can be reversed, leading to another family of hypersurfaces in another toric variety. Batyrev showed~\cite{Batyrev:1994} that if $\dim \Delta = 4$, then generic anticanonical hypersurfaces in MPCP-desingularizations of $X_\Delta$ are \emph{smooth} Calabi-Yau threefolds and the exchange $\Delta \leftrightsquigarrow \Delta^\circ$ corresponds to the exchange $h^{1,1} \leftrightsquigarrow h^{2,1}$ of the Hodge numbers of anticanonical hypersurfaces of two families, making them candidates for mirror pairs.

The anticanonical ``hypersurfaces'' in the projective plane and its quotient discussed above are $1$-dimensional Calabi-Yau varieties, i.e. elliptic curves:
\begin{sagecommandline}
sage: P2 = toric_varieties.P(2)
sage: P2.anticanonical_hypersurface()
Closed subscheme of 2-d CPR-Fano toric variety covered by 3 affine patches defined by:
  a0*z0^3 + a1*z1^3 + a6*z0*z1*z2 + a2*z2^3
sage: P2.anticanonical_hypersurface( monomial_points="all").defining_polynomials()[0]
a0*z0^3 + a9*z0^2*z1 + a7*z0*z1^2 + a1*z1^3 + a8*z0^2*z2 + a6*z0*z1*z2 + a4*z1^2*z2 + a5*z0*z2^2 + a3*z1*z2^2 + a2*z2^3
sage: P2P = CPRFanoToricVariety(P2.Delta_polar())
sage: P2P.anticanonical_hypersurface( monomial_points="all").defining_polynomials()[0]
a0*z0^3 + a1*z1^3 + a3*z0*z1*z2 + a2*z2^3
\end{sagecommandline}
Anticanonical hypersurfaces in $\PP^2$ are zero sets of cubic polynomials, which may include up to 10 monomials corresponding to 10 lattice points inside of the lattice polytope $\Delta$ corresponding to $\PP^2$. As the above example shows, only 4 of these monomials are used in Sage by default. This is due to the fact that using automorphisms of the toric variety it is possible to set to zero coefficients of monomials corresponding to interior points of facets of $\Delta$ (see Section~6.1.2 of~\cite{CoxKatz:1999}), so in most situations they can be discarded. For the quotient $\PP^2 / \ZZ^3$, however, there are only 4 monomials invariant under the $\ZZ^3$-action and it is not possible to use more.



\section{Nef Complete Intersections}\label{sec:NefCI}

The  construction of Calabi-Yau varieties as anticanonical hypersurfaces in toric varieties was generalized by Batyrev and Borisov to the case of complete intersections associated to nef-partitions of reflexive polytopes~\cite{Borisov:1993, BatyrevBorisov:1996CYCIinTV}.

\begin{definition}
Let $\Delta \subset M_\RR$ be a reflexive polytope. A \keyterm{nef-partition} is a decomposition of the vertex set $V$ of $\Delta^\circ \subset N_\RR$ into a disjoint union
\begin{align*}
V = V_0 \sqcup V_1 \sqcup \dots \sqcup V_{r-1}
\end{align*}
such that divisors $E_i = \sum_{v_\rho \in V_i} D_\rho$ are Cartier. Equivalently, let $\nabla_i \subset N_\RR$ be the convex hull of vertices from $V_i$ and the origin. These polytopes form a nef-partition if their Minkowski sum $\nabla \subset N_\RR$ is a reflexive polytope. The \keyterm{dual nef-partition} is formed by polytopes $\Delta_i \subset M_\RR$ of $E_i$, which give a decomposition of the vertex set of $\nabla^\circ \subset M_\RR$ and their Minkowski sum is $\Delta$.
\end{definition}

For the remainder of this section we use the notation of the above definition without repeating it.

\begin{remark}
The term ``nef-partition'' may be used for any of the following decompositions:
\begin{compactenum}
\item $V(\Delta^\circ)$ into the disjoint union of $V_i$,
\item $\Delta$ into the Minkowski sum of $\Delta_i$,
\item the anticanonical divisor of $X_\Delta$ into the sum of $E_i$.
\end{compactenum}
Each of these decompositions can be easily translated into another and some care should be taken only to avoid mixing a nef-partition and its dual.
\end{remark}

As it follows from the definition, the polar duality of reflexive polytopes switches convex hull and Minkowski sum for dual nef-partitions:
\begin{align*}
\allowdisplaybreaks
\Delta^\circ
&=
\mathrm{Conv} \left(\nabla_0, \nabla_1, \dots, \nabla_{r-1}\right), \\
\nabla^{\phantom{\circ}}
&=
\nabla_0 + \nabla_1 + \dots + \nabla_{r-1}, \displaybreak[0]\\[1ex]
%
\Delta^{\phantom{\circ}}
&=
\Delta_0 + \Delta_1 + \dots + \Delta_{r-1}, \\
\nabla^\circ
&=
\mathrm{Conv} \left(\Delta_0, \Delta_1, \dots, \Delta_{r-1}\right).
\end{align*}
It is possible to give a purely combinatorial description of the nef-partition duality, which is convenient for computational purposes.

\begin{proposition}
For the polytopes of dual nef-partitions we have
\begin{align*}
\Delta_i &= \set{u \in M_\RR : \pair{u, \nabla_j} \geqslant - \delta_{ij} \text{ for all } j \in \set{0, \dots, r-1}},
\\
\nabla_i &= \set{v \in N_\RR : \pair{\Delta_j, v} \geqslant - \delta_{ij} \text{ for all } j \in \set{0, \dots, r-1}}.
\end{align*}
\end{proposition}

\begin{proof}
See Proposition~3.13 in~\cite{BatyrevNill:2008}.
\end{proof}

One can also interpret the duality of nef-partitions as the duality of associated cones. Below $\overline{M} = M \times \ZZ^r$ and $\overline{N} = N \times \ZZ^r$ are dual lattices, $\overline{M}_\RR$ and $\overline{N}_\RR$ are vector spaces spanned by them.

\begin{definition}
The \keyterm{Cayley polytope} $P \subset \overline{M}_\RR$ of a nef-partition is given by
\begin{gather*}
P = \Conv(\Delta_0 \times e_0, \Delta_1 \times e_1, \ldots, \Delta_{r-1} \times e_{r-1})\,,
\end{gather*}
where $\{e_i\}_{i=0}^{r-1}$ is the standard basis of $\ZZ^r$. The \keyterm{dual Cayley polytope} ${P^* \subset \overline{N}_\RR}$ is the Cayley polytope of the dual nef-partition.
\end{definition}

\begin{definition}
The \keyterm{Cayley cone} $C \subset \overline{M}_\RR$ of a nef-partition is the cone spanned by its Cayley polytope.
\end{definition}

\begin{proposition}
The Cayley cone $C$ is full-dimensional. The dimension of the Cayley polytope $P$ is $n-r+1$.
\end{proposition}

\begin{proof}
Since $\nabla^\circ = \Conv(\Delta_0, \Delta_1, \dots, \Delta_{r-1})$ is reflexive and full-dimensional, we can pick $n$ linearly independent vertices of it, $v_1, \dots, v_n$. The corresponding points of the Cayley polytope are $(v_j, e_{i_j})$, where $v_j \in \Delta_{i_j}$. The origin has $r$ corresponding points $(0, e_i)$, since it is contained in every $\Delta_i$. These $n+r$ points are linearly independent in $M_\RR \times \RR^r$: if their linear combination is equal to zero, then the first $n$ coefficients must be equal to zero due to linear independence of $v_1, \dots, v_n$ and the last $r$ coefficients due to linear independence of points corresponding to the origin. Therefore, $\dim C = n+r$.

Since $C$ is generated by $P$ and $\dim C = n + r$, we already know that $\dim P \geqslant n + r - 1$. To see that $\dim P < n + r$, observe that it is contained in the hyperplane normal to $(0, \dots, 0, 1, \dots, 1)$ ($n$ zeros and $r$ ones).
\end{proof}

\begin{definition}
A lattice polytope $Q$ is a \keyterm{Gorenstein polytope} of index~$r$ if its multiple $r \cdot Q$ has a unique interior lattice point $q$ and its shift $r \cdot Q - q$ is a reflexive polytope.
\end{definition}

In particular, all reflexive polytopes are Gorenstein polytopes of index $1$.

\begin{definition}
A full-dimensional cone $\sigma \subset \overline{M}_\RR$ is a \keyterm{Gorenstein cone} if it generated by finitely many lattice points which are contained in the hyperplane $\set{u \in \overline{M}_\RR : \pair{u, n} = 1}$ for some $n \in \overline{N}$. If the intersection of this hyperplane with $\sigma$ is a Gorenstein polytope $Q$ of index $r$ (with respect to the sublattice of this hyperplane), $\sigma$ is a \keyterm{reflexive Gorenstein cone} of index $r$ supported by $Q$.
\end{definition}

\begin{proposition}
The Cayley polytope $P$ is a Gorenstein polytope of index $r$ with respect to its spanned affine sublattice.
The Cayley cone $C$ is a reflexive Gorenstein cone of index $r$ supported by $P$. Its dual cone $C^\vee$ is supported by the dual Cayley polytope $P^*$.
\end{proposition}

\begin{proof}
See Theorem~2.6, Definition~3.11, and Proposition~3.13 in~\cite{BatyrevNill:2008}.
\end{proof} 

\begin{remark}
Note that all definitions and results above make sense for ${r=1}$, i.e. for partitions with a single part. In this case the duality of Cayley polytopes is the polar duality of reflexive polytopes.
\end{remark}

In order to find nef-partitions of a given reflexive polytope, one can use \sagecommand{nef.x} program from PALP~\cite{PALP}. Two-part nef-partitions computed by it are readily accessible in Sage:
\begin{sagecommandline}
sage: Delta_polar = LatticePolytope([(1,0), (0,1), (-1,0), (0,-1)])
sage: Delta_polar.nef_partitions()
[
Nef-partition {0, 2} U {1, 3} (direct product),
Nef-partition {0, 1} U {2, 3},
Nef-partition {0, 1, 2} U {3} (projection)
]
sage: np = Delta_polar.nef_partitions()[1]
sage: np.nabla().vertices()
[ 1  0  0 -1  1 -1]
[ 0  1 -1  0 -1  1]
sage: np.nabla(0).vertices()
[1 0 0]
[0 1 0]
sage: np.nabla(1).vertices()
[-1  0  0]
[ 0 -1  0]
\end{sagecommandline}

Given a nef-partition of an $n$-dimensional reflexive polytope, consisting of $r$-parts, generic sections of divisors $E_i$ determine an $(n-r)$-dimensional complete intersection Calabi-Yau variety. In~\cite{BatyrevBorisov:1996STHN} Batyrev and Borisov showed that such varieties corresponding to dual nef-partitions have mirror-symmetric \emph{stringy} Hodge numbers. Let's glance at the complete intersection corresponding to the nef-partition above and its dual:
\begin{sagecommandline}
sage: X = CPRFanoToricVariety(np.Delta())
sage: X.nef_complete_intersection(np)
Closed subscheme of 2-d CPR-Fano toric variety covered by 4 affine patches defined by:
  a3*z0*z1 + a2*z1*z2 + a1*z0*z3 + a0*z2*z3,
  b1*z0*z1 + b0*z1*z2 + b2*z0*z3 + b3*z2*z3
sage: Y = CPRFanoToricVariety(np.dual().Delta())
sage: Y.nef_complete_intersection(np.dual())
Closed subscheme of 2-d CPR-Fano toric variety covered by 6 affine patches defined by:
  a2*z0*z1*z2 + a1*z2*z3*z4 + a0*z1*z4*z5,
  b0*z0*z2*z3 + b1*z0*z1*z5 + b2*z3*z4*z5
\end{sagecommandline}

In order to get ``honest'' Calabi-Yau varieties, it is necessary to exclude a special type of nef-partitions.

\begin{definition}
A nef-partition $\Delta = \Delta_0 + \Delta_1 + \dots + \Delta_{r-1}$ is \keyterm{indecomposable}, if the Minkowski sum of any proper subset of $\set{\Delta_i}_{i=0}^{r-1}$ is \emph{not} a reflexive polytope in the generated sublattice. It is \keyterm{decomposable} otherwise.
\end{definition}

Decomposable nef-partitions correspond to products of Calabi-Yau varieties, each of which is represented as a complete intersection of a smaller number of hypersurfaces in toric varieties of smaller dimensions.



\section{Torically Induced Fibrations}
\label{section:torically induced fibrations}

Let $N$ and $N'$ be lattices, $\Sigma$ be a fan in $N_\RR$, and $\Sigma'$ be a fan in $N'_\RR$. By Theorem~\ref{theorem:fan-toric morphisms correspondence} there is a bijection between toric morphisms $\tld{\phi}: X_\Sigma \to X_{\Sigma'}$ and fan morphisms $\phi: \Sigma \to \Sigma'$, i.e. lattice homomorphisms $\phi: N \to N'$ compatible with the fan structure (see Definitions~\ref{def:fan morphism} and~\ref{def:toric morphism}).

Consider the special case when the lattice homomorphism is surjective, i.e. we have an exact sequence of lattices
\begin{gather*}
0 \to N_0 \to N \xrightarrow{\phi} N' \to 0,
\end{gather*}
where $N_0 = \ker \phi$. Let $\Sigma_0 = \set{\sigma \in \Sigma : \sigma \subset (N_0)_\RR}$. We can consider $\Sigma_0$ either as a fan in $N_\RR$ or as a fan in $(N_0)_\RR$ with two corresponding toric varieties $X_{\Sigma_0, N}$ (a dense subset of $X_\Sigma$) and $X_{\Sigma_0, N_0}$.

As it is discussed in \S~3.3~\cite{CoxLittleSchenck:2011}, there is a clear relation between these two varieties,
\begin{gather*}
X_{\Sigma_0, N} \simeq X_{\Sigma_0, N_0} \times T_{N'},
\end{gather*}
and, in fact, $X_{\Sigma_0, N} = \tld{\phi}^{-1}(T_{N'})$, so a part of $X_\Sigma$ is a fiber bundle over $T_{N'}$ with fibers being $X_{\Sigma_0, N_0}$. Moreover, if $\Sigma$ is \emph{split by $\Sigma'$ and $\Sigma_0$} (see Definition~3.3.18 in~\cite{CoxLittleSchenck:2011}), then the whole $X_\Sigma$ is a fiber bundle over $X_{\Sigma'}$ (see Theorem~3.3.19 in~\cite{CoxLittleSchenck:2011}). However, splitting is a very strong condition on fans, so instead of imposing it we will work with more general fibrations than fiber bundles.

\begin{definition}
Let $\phi: X \to Y$ be a morphism between two varieties. Then $\phi$ is a \keyterm{fibration} if it is surjective and all of its fibers have the same dimension $\dim X - \dim Y$.
\end{definition}

The following result provides a combinatorial characterization of toric fibrations in terms of primitive cones (see Definition~\ref{def:primitive cone}).

\begin{theorem}
Let $\tld{\phi}: X_\Sigma \to X_{\Sigma'}$ be a surjective toric morphism. Then it is a fibration if and only if $\phi_\RR\big|_\sigma: \sigma \to \sigma'$ is a bijection for all primitive cones $\sigma \in \Sigma$ corresponding to all $\sigma' \in \Sigma'$.
\end{theorem}

\begin{proof}
See Corollary~2.1.13 in~\cite{HuLiuYau:2002}.
\end{proof}

In Proposition~2.1.4~\cite{HuLiuYau:2002} the authors provide a detailed description of fibers of \emph{arbitrary} toric morphisms\footnote{Note that while notation in~\cite{HuLiuYau:2002} is very similar to ours, the authors sometimes \emph{implicitly} assume that toric varieties in question are  \emph{complete}.}, but we are primarily interested in fibrations ${\phi: X_\Sigma \to X_{\Sigma'}}$ since they may induce fibrations $\phi\big|_Y: Y \to X_{\Sigma}$ of Calabi-Yau subvarieties $Y$ realized as anticanonical hypersurfaces or nef complete intersections in $X_\Sigma$. The fibration condition may prevent $\Sigma$ from being ``too refined'', leading to singularities of $Y$, however it may be possible to compose $\phi$ with a crepant resolution of singularities in such a way that $Y$ becomes smooth and the restriction of the composition to $Y$ is still a fibration. See~\cite{PerevalovSkarke:1997} or~\cite{Rohsiepe:2004} for an explicit treatment of such resolutions of elliptically fibered K3-surfaces, where it is shown how one can determine the type of (some) exceptional elliptic fibers based directly on combinatorics of the associated reflexive polytopes.

We now describe a strategy for searching for toric fibrations. Let $\Delta \subset M_\RR$ be a reflexive polytope and let $\Sigma$ be a crepant subdivision of $\Sigma_\Delta$. Suppose that $\phi: \Sigma \to \Sigma'$ is a fibration (meaning that $\tld{\phi}: X_\Sigma \to X_{\Sigma'}$ is a fibration in the above sense). As before, its fiber is determined by the subfan $\Sigma_0$ of $\Sigma$ in the sublattice $N_0 = \ker \phi$ of $N$. Since we would like fibers of Calabi-Yau subvarieties to be lower-dimensional Calabi-Yau varieties, it is natural to require that $\Sigma_0$ \emph{is also associated to a reflexive polytope}, i.e. that it is a crepant subdivision of $\Sigma_\nabla$ for $\nabla \subset (M_0)_\RR$, where $M_0$ is dual lattice of $N_0$. Then $\nabla^\circ$ is a ``slice'' of $\Delta^\circ$ by a linear subspace, so one can search for such slices of $\Delta^\circ$ and then take as $\phi$ the projection along the linear subspace of $\nabla^\circ$. We can also reformulate this problem in dual terms: $M_0 = M / (N_0)^\perp$ and the condition that $\nabla^\circ$ is inside $\Delta^\circ$ implies that the image of $\Delta$ in $M_0$ is inside $\nabla$. So one can alternatively look for ``projections'' of $\Delta$ that are reflexive. Recall that the origin is the only interior lattice point of any reflexive polytope, so all lattice points of $\Delta$ must be projected either into the origin or into the boundary of the projection. Due to this restriction a ``large'' $\Delta$ with many lattice points is less likely to have any fibrations than a ``small'' one.





% Bibliography
\bibliography{Bibliography}
\bibliographystyle{alpha}

\end{document}