ISSN 2148-838X J. Algebra Comb. Discrete Appl. -(-) • 1–23 Received: 18 August 2021 Accepted: 20 January 2022 AR TI CL E IN PR ES S Journal of Algebra Combinatorics Discrete Structures and Applications Toric code distances from terraced polytopes Research Article Andrew Wilfong Abstract: We call a polytope terraced if upon projecting onto a one-dimensional coordinate space, each fiber of the projection is contained in the fiber below it. We present a technique to compute the minimum distance for toric codes arising from terraced polytopes. This technique is demonstrated by deter- mining the minimum distance for all toric codes that correspond to smooth n–polytopes with n + 2 facets. We also find the minimum distance for all toric codes coming from smooth polygons with five edges and from smooth 3–polytopes with six facets. 2010 MSC: 94B27, 52B20, 14M25 Keywords: Toric code, Lattice polytope 1. Introduction A toric code, first introduced by Hansen in [4], is an algebraic geometry code whose underlying variety is a toric variety. It is typically very difficult to determine basic properties of algebraic geometry codes, but this is often more easily accomplished for toric codes. There is a bijective correspondence between toric varieties and convex polytopes, and we can use combinatorial and geometric properties of polytopes to reveal information about toric codes. These codes provide a nice balance of computability and diversity. They allow us to create algebraic geometry codes that are interesting enough to merit exploration while still being simple enough to reveal their essential characteristics. As one example application, for certain block lengths and dimensions, toric codes have been used to obtain the maximum possible minimum distance among all linear codes [2, 8]. When working over a sufficiently large field, the dimension of a toric code equals the number of lattice points in the corresponding polytope. But even with the extra combinatorial structure from the polytope, the minimum distance of a toric code can still be quite difficult to compute. Several techniques have been developed to provide minimum distance formulas for special cases. Hansen first determined the minimum distance of codes coming from Hirzebruch surfaces by studying their cohomology and intersection theory [5]. Decomposing a polytope into a Minkowski sum is another useful strategy for bounding the minimum distance [11, 18]. A lower bound for minimum distance was found by Little and Andrew Wilfong; Eastern Michigan University, USA (email: awilfon2@emich.edu). 1 http://orcid.org/0000-0002-5338-9289 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Schwarz using multivariate Vandermonde matrices [12]. Soprunov and Soprunova determined natural relationships for the distances of toric codes arising from products of polytopes and from pyramids over polytopes [17, 19]. These techniques have been used to calculate minimum distance for certain classes of toric codes. For example, the minimum distances for toric surface codes (i.e., those arising from polygons) have been computed up to dimension seven (i.e., for all lattice polygons that contain up to seven lattice points) [7, 12, 14]. Little and Schenck found the minimum distance for most of the toric codes corresponding to smooth polygons with five edges [11]. Kimball derived minimum distance results for certain smooth 3–polytopes with five facets [9]. In [17], Soprunov derived a lower bound for minimum distance based on the fiber structure of a polytope. In this paper, we build on these results. If a polytope has some extra geometric structure, then Soprunov’s lower bound becomes equality. The necessary extra structure involves fibers in the direction of one of the coordinate axes. If each successive fiber is contained in the previous fiber, then we say that the corresponding polytope is terraced, and the minimum distance of the corresponding toric code can be computed exactly. Terraced polytopes account for a large and varied class of polytopes, so this should provide a powerful tool for computing the minimum distance for toric codes. To demonstrate the utility of the technique, we focus on smooth polytopes with few facets. All smooth n–polytopes with n + 2 facets are terraced, as are all smooth polygons with five edges and all smooth 3–polytopes with six facets. We will complete and extend the results in [11] and [9] by calculating the minimum distance for all of the corresponding toric codes. While it is still possible to derive the minimum distance for these codes using the techniques from [18] and [11], these codes illustrate the benefits of working with the terraced polytope structure. With our new technique, the computations are often simpler and we do not need to make extra assumptions about the size of the underlying field. The techniques also extend beyond the special class of smooth polytopes, allowing the potential for generalization to other terraced polytopes. In Section 2, we provide the necessary background and notation for toric codes. In Section 3, we derive the main results about the minimum distance of toric codes coming from terraced polytopes. We then demonstrate the technique for several examples that will be helpful in the later sections. In Section 4, we compute the minimum distance for all toric codes coming from smooth n–polytopes with n + 2 facets. In Section 5, we explore smooth polytopes with three more facets than the dimension of the polytope. We find the minimum distance of the corresponding toric codes for all such polytopes in dimensions two and three. Section 6 concludes with some questions to motivate further exploration. 2. Toric codes For background on error-correcting codes, and on algebraic geometry codes in particular, see [6, 13, 20]. Refer to [3] for background on toric varieties. We will bypass the algebraic geometric structure of toric varieties and approach toric codes from a purely combinatorial and geometric direction. To construct a toric code, we start with a polytope P ⊆ Rn and a prime power q. (See [21] for background on polytopes.) We construct a vector space of Laurent polynomials whose exponents correspond to the lattice points in P : L(P) = spanFq { xλ11 · · ·x λn n : (λ1, . . . ,λn) ∈ P ∩Z n } . Let ( F∗q )n = { t1, t2 . . . , t(q−1)n } , so we are establishing a linear order for the points in this algebraic torus. Define ev : L(P) → F(q−1) n q by ev (f) = ( f (t1) ,f (t2) , . . . ,f ( t(q−1)n )) . The toric code CP is the image ev (L(P)). It is a linear code with block length (q − 1)n. Example 2.1. Let P = [0,a] ⊆ R, where a is an integer and 0 ≤ a ≤ q − 2 for some prime power q. 2 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Then L(P) is generated by 1,x1,x21, . . . ,xa1 and CP is generated by the rows of the following matrix:  1 1 . . . 1 t1 t2 . . . tq−1 t21 t 2 2 . . . t 2 q−1 ... ... ... ta1 t a 2 . . . t a q−1   . In this case, CP is a Reed–Solomon code with dimension a + 1 and minimum distance q − 1 −a (cf. [6, Chapter 5]). In the previous example, the dimension of CP equals the number of lattice points in P . This is true in general, as long as q is large enough. Theorem 2.2. [16, Theorem 3.3] Let P ⊆ [0,q − 2]n be a polytope, where q is a prime power. Then the dimension of CP equals the number of lattice points contained in P. For the remainder of this paper, we will assume that q is a sufficiently large prime power so that all polytopes under consideration are contained in [0,q − 2]n. For a polytope P ⊆ [0,q − 2]n, let d (P) represent the minimum distance of the corresponding toric code CP . For brevity, we will often call this the distance of the code. Theorem 2.3. [19, Theorem 2.1] Let P ⊆ [0,q − 2]m and Q ⊆ [0,q − 2]n be lattice polytopes, and consider P ×Q ⊆ Rm+n. Then we have d (P ×Q) = d (P) d (Q). Example 2.4. Consider the interval [0,a]×{0} as a subset of [0,q − 2]2, where a ≥ 0 is an integer. Then d ([0,a] ×{0}) = d ([0,a]) d ({0}) = (q − 1 −a) (q − 1) by Example 2.1. In general, if [0,a] is considered as a subset of Rn for some n ∈ N, then d ([0,a]) = (q − 1)n−1 (q − 1 −a). In calculating distances, we will often need to apply certain affine transformations to polytopes to produce more convenient geometric realizations. In many situations, such a transformation preserves the distance of the corresponding toric codes. Definition 2.5. [12] Two polytopes P,Q ⊆ Rn are lattice equivalent if there is an invertible integer affine transformation T : Rn → Rn for which T (P) = Q. Theorem 2.6. [12, Theorem 4] If P and Q are lattice equivalent, then CP and CQ are monomially equivalent. In particular, we get d (P) = d (Q). 3. Minimum distance for terraced polytopes One technique that allows us to compute the minimum distance of a toric code is to project the corresponding polytope onto a lower-dimensional space. The distances of the fibers under this projection can reveal information about the distance of the original polytope. Theorem 3.1. [17, Corollary 4.3] Let P ⊆ [0,q − 2]n be a polytope. Let πk : Rn → R be the projection onto the kth coordinate, whose corresponding indeterminate is xk. Suppose πk (P) = {0, 1, . . . , l}. Let Pi be the projection of the ith fiber P ∩π−1k (i) to all but the k th coordinate. If d (P0) ≤ d (P1) ≤ ···≤ d (Pl), then d (P) ≥ min 0≤i≤l {(q − 1 − i) d (Pi)}. With certain extra restrictions on P , the inequality above becomes an equality. Definition 3.2. Let P ⊆ [0,q − 2]n be a polytope. Let πk : Rn → R be the projection onto the kth coordinate, whose corresponding indeterminate is xk. For each i = 0, . . . ,q − 2, let Pi be the projection of the ith fiber P ∩π−1k (i) to all but the k th coordinate. We say that P is terraced in the xk–direction if P0 ⊇ P1 ⊇ ···⊇ Pq−2. We call Pi the ith–level of P. 3 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Theorem 3.3. Suppose P ⊆ [0,q − 2]n is terraced in the xk–direction, with πk (P) = {0, 1, . . . , l}. Then d (P) = min 0≤i≤l {(q − 1 − i) d (Pi)}. Proof. Suppose P0 ⊇ P1 ⊇ ···⊇ Pl. Decreasing the number of lattice points also decreases the number of codewords. This can never decrease the minimum distance of the corresponding codes. Thus we have d (P0) ≤ d (P1) ≤ ···≤ d (Pl), and d (P) ≥ min 0≤i≤l {(q − 1 − i) d (Pi)} by Theorem 3.1. It remains to verify that min 0≤i≤l (q − 1 − i) d (Pi) ≥ d (P). Note that (q − 1 − i) d (Pi) = d ([0, i]) d (Pi) = d ([0, i] ×Pi) by Example 2.1 and Theorem 2.3. Since P is terraced, [0, i]×Pi ⊆ P for each i. Thus d ([0, i] ×Pi) ≥ d (P) for each i, so min 0≤i≤l (q − 1 − i) d (Pi) ≥ d (P). Let’s explore some examples. First, we use the method of terraced polytopes to find the distance of the toric code corresponding to an n–dimensional simplex ∆na with vertices (0, . . . , 0) , (a, 0, . . . , 0) , (0,a, 0, . . . , 0) , . . . , (0, . . . , 0,a) where a ∈ N. This has been derived in the past using various other techniques [12, 19]. Lemma 3.4. Let a ∈ N. Then d (∆na) = (q − 1) n−1 (q − 1 −a). Proof. Induct on n. If n = 1, then ∆1a = [0,a] is an interval and d ( ∆1a ) = q − 1 − a by Example 2.1. For n > 1, the simplex ∆na is terraced in the xn–direction. Its i th level is itself a simplex ∆n−1a−i . By induction, we can assume d ( ∆n−1a−i ) = (q − 1)n−2 (q − 1 − (a− i)). Then Theorem 3.3 yields d (∆na) = min 0≤i≤a (q − 1 − i) d ( ∆n−1a−i ) = (q − 1)n−2 · min 0≤i≤a (q − 1 − i) (q − 1 − (a− i)) . The expression being minimized is quadratic in i, and it attains a minimum at one of the endpoints i = 0 or i = a. But the value is the same at both endpoints, and we get d (∆na) = (q − 1) n−2 (q − 1) (q − 1 −a) = (q − 1)n−1 (q − 1 −a) . We can also apply Theorem 3.3 to much more complicated terraced polytopes. For example, we can combine that theorem with the previous lemma to study truncated simplices stacked on top of prisms. The following result appears to be new in dimensions three and higher. Proposition 3.5. Choose positive integers a, b, and c. Stack a simplex ∆nb+c on top of (in the xn– direction) a prism ∆n−1b+c × [0,a]. Truncate the simplex with xn ≤ a + b to obtain a polytope P ⊆ [q − 2] n. (See Figure 1 for an example of such a polytope in three dimensions.) Then d (P) = { (q − 1)n−2 (q − 1 −a) (q − 1 − (b + c)) if c ≥ a (q − 1)n−2 (q − 1 − (a + b)) (q − 1 − c) if c ≤ a . Proof. The polytope P is terraced in the xn–direction. For 0 ≤ i ≤ a, the ith–level is Pi = ∆n−1b+c and d (Pi) = (q − 1) n−2 (q − 1 − (b + c)). Then min 0≤i≤a (q − 1 − i) d (Pi) = (q − 1 −a) (q − 1) n−2 (q − 1 − (b + c)) 4 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 1. A truncated simplex stacked on top of a triangular prism. comes from the i = a level. Now we must determine if a higher level gives a smaller value for (q − 1 − i) d (Pi). For a ≤ i ≤ a + b, we have Pi = ∆n−1b+c−(i−a) and d (Pi) = (q − 1) n−2 (q − 1 − (b + c− (i−a))) . Then d (P) = min a≤i≤a+b (q − 1 − i) (q − 1)n−2 (q − 1 − (b + c− (i−a))) . = (q − 1)n−2 · min a≤i≤a+b (q − 1 − i) (q − 1 − (a + b + c) + i) . The expression (q − 1 − i) (q − 1 − (a + b + c) + i) is quadratic with respect to i, and it is minimized at one of the endpoints i = a or i = a + b. Thus d (P) = (q − 1)n−2 · min{(q − 1 −a) (q − 1 − (b + c)) , (q − 1 − (a + b)) (q − 1 − c)} = { (q − 1)n−2 (q − 1 −a) (q − 1 − (b + c)) if c ≥ a (q − 1)n−2 (q − 1 − (a + b)) (q − 1 − c) if c ≤ a . In some common situations, the minimum of (q − 1 − i) d (Qi) occurs at the base level of a terraced polytope Q. Theorem 3.3 can then provide the distance corresponding to certain polytopes contained in Q. This gives a powerful tool for computing a toric code’s distance by comparing the corresponding polytope to a polytope with known distance. Corollary 3.6. Let P ⊆ Q ⊆ [0,q − 2]n be polytopes that are terraced in the xk–direction. If d (P0) = d (Q0) and d (Q) = (q − 1) d (Q0), then d (P) = d (Q) = (q − 1) d (P0). Proof. Decreasing the number of lattice points can never decrease distance. Thus P ⊆ Q implies d (Qi) ≤ d (Pi) for each i. Suppose d (P0) = d (Q0) and d (Q) = (q − 1) d (Q0). Then d (Q) is determined by the i = 0 level of Q. Then for all i, we have (q − 1) d (P0) = (q − 1) d (Q0) ≤ (q − 1 − i) d (Qi) ≤ (q − 1 − i) d (Pi) . Thus the i = 0 level of P minimizes (q − 1 − i) d (Pi), and the result follows from Theorem 3.3. 5 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Example 3.7. Let P ⊆ [q − 2]2 be the trapezoid with vertices (0, 0), (0,a), (b,a), and (b + ca, 0), where a,b,c ∈ N (see Figure 2). Then P is terraced in the x2–direction, P ⊆ ∆2b+ca, and d (P0) = d (( ∆2b+ca ) 0 ) = q − 1 − (b + ca). By Corollary 3.6, d (P) = d ( ∆2b+ca ) = (q − 1) (q − 1 − (b + ca)). Figure 2. A trapezoid contained in a simplex. The distances of the corresponding toric codes are equal. The toric variety corresponding to such a trapezoid is a Hirzebruch surface. Hansen first determined the distance of the corresponding toric code using topological methods [4]. Little and Schenck proved the same result using Minkowski sum decompositions [11, Example 3.3]. The method of terraced polytopes offers a third approach. But this method also offers much more general results. A trapezoid is just one of many polytopes that shares the same distance as the simplex in which it is contained. In general, if P ⊆ ∆na ⊆ [q − 2] n is terraced in the xn–direction and d (P0) = d ( ∆n−1a ) = (q − 1)n−2 (q − 1 −a), then d (P) = d (∆na) = (q − 1) n−1 (q − 1 −a). The distance of any such terraced polytope P is completely determined by its base-level distance and the simplex in which it is contained. We can also derive the above distance immediately by noting that [0,b + ca] ⊆ P ⊆ ∆2b+ca. Then d ([0,b + ca]) ≥ d (P) ≥ d ( ∆2b+ca ) . Using Example 2.4 and Lemma 3.4, we get d (P) = d ([0,b + ca]) = d ( ∆2b+ca ) = (q − 1) (q − 1 − (b + ca)) . This observation will be useful in later sections, so we state it here in more generality. The converse of the following statement is also true (see [15, Proposition 6.6], for example), but we will not need it for our results. Proposition 3.8. Suppose a polytope P is contained in the simplex ∆na. If [0,a] ⊆ P, then d (P) = (q − 1)n−1 (q − 1 −a). We can now determine the distance of the toric code corresponding to a more general simplex ∆na1,...,an with vertices (0, . . . , 0) , (a1, 0, . . . , 0) , (0,a2, 0, . . . , 0) , . . . , (0, . . . , 0,an). For a1, . . . ,an ∈ N, this distance formula was first determined by Little and Schwarz [12, Corollary 2]. Here, we generalize to simplices ∆na1,...,an for which a1, . . . ,an ≥ 1 are not necessarily integers. The corresponding code comes from the lattice polytope that is the convex hull of all lattice points in the simplex. These polytopes can be quite complicated. For example, consider the hexagon H = conv{(0, 0) , (9, 0) , (8, 1) , (4, 4) , (1, 6) , (0, 6)} shown in Figure 3. It has exactly the same set of lattice points as the simplex ∆29.9,6.8. Then the following proposition gives us d (H) = d ( ∆29.9,6.8 ) = (q − 1) (q − 10). 6 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 3. A hexagon with integer vertices whose lattice points coincide with those of a 2–simplex with non-integer vertices. Proposition 3.9. Consider the simplex ∆na1,...,an ∈ [q − 2] n, where a1, . . . ,an ≥ 1 are real numbers. Let a = max{ba1c , . . . ,banc}. Then d ( ∆na1,...,an ) = (q − 1)n−1 (q − 1 −a). Proof. Let P be the convex hull of the lattice points of ∆na1,...,an, so d ( ∆na1,...,an ) = d (P). Since [0,a] ⊆ P ⊆ ∆na, the result follows immediately from Proposition 3.8. Combining this result with Theorem 2.3 yields the following. Corollary 3.10. Let Q = ∆mt1,...,tm × ∆ n tm+1,...,tm+n ⊆ [q − 2]m+n, where t1, . . . , tm+n ≥ 1 are real numbers and m,n ∈ N. Let t = max{bt1c , . . . ,btmc} and u = max{btm+1c , . . . ,btm+nc}. 1. Then d (Q) = (q − 1)m+n−2 (q − 1 − t) (q − 1 −u). 2. Suppose n ≥ 2 and assume u = btm+1c (using Theorem 2.6 if needed). Then Q is terraced in the xm+n–direction. The base level is Q0 = ∆mt1,...,tm × ∆ n tm+1,...,tm+n−1 and the distance of this level is d (Q0) = (q − 1) m+n−3 (q − 1 − t) (q − 1 −u). Thus d (Q) = (q − 1) d (Q0). The second part of this corollary allows us to apply Corollary 3.6 using a product of simplices. In the next section, this will allow us to determine the distance for certain polytopes contained in such a product that share the same base-level distance. 4. Distances for smooth n–polytopes with n + 2 facets An n–polytope is simple if exactly n–many edges meet at each vertex. A smooth n–polytope is a simple lattice polytope for which the primitive generators of the edges emanating from each vertex form a basis of Zn. There is a bijective correspondence between smooth n–polytopes and complete nonsingular n–dimensional toric varieties (see [10], for example). To describe all smooth n–polytopes with n + 2 facets, we start by considering all corresponding fans whose generating rays are the inner normal vectors of the facets of such a polytope. (See [21, Chapter 7], for example, for background on fans.) 7 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Let n ≥ 2 and 1 ≤ r ≤ n− 1 be integers. Let 0 ≤ an−r+1 ≤ an−r+2 ≤ ··· ≤ an be integers. Let ei be the ith standard basis vector in Rn. Define the following vectors in Rn: u = − n∑ i=n−r+1 ei v = − n−r∑ i=1 ei − n∑ i=n−r+1 aiei. Define Fn (an−r+1, . . . ,an) to be the fan in Rn with generating rays e1, . . . ,en,u,v, whose maximal cones are given by any subset of all but one element of {e1, . . . ,en−r,v}, combined with all but one element of {en−r+1, . . . ,en,u}. Theorem 4.1. [10] Every complete nonsingular n–dimensional toric variety whose fan has n + 2 gener- ating rays is isomorphic to a variety with normal fan Fn (an−r+1, . . . ,an). Thus any smooth n–polytope comes from one of the normal fans Fn (an−r+1, . . . ,an). To realize such a polytope, we must choose a position in space for each of its facets. Since we are ultimately interested in the distances of the corresponding toric codes, we can use lattice equivalence (Definition 2.5 and Theorem 2.6) to limit the smooth polytopes under consideration. In particular, we can assume that the facet with inner normal ray ei is xi ≥ 0. Just two rays remain to consider. Let b1,b2 > 0 be integers. Assume u is normal to the boundary of the half space xn−r+1 + . . . + xn ≤ b1 and v is normal to the boundary of the half space x1 + · · · + xn−r + an−r+1xn−r+1 + · · · + anxn ≤ b2. Denote the corresponding polytope as P . For dimension n = 2, such a polytope P is a rectangle or a trapezoid. For a rectangle, the distance of the corresponding toric code can be found by applying Example 2.1 and Theorem 2.3. A trapezoid corresponds to a Hirzebruch surface, and the distance of the corresponding code was calculated in Example 3.7. Hansen first computed the distance of this Hirzebruch surface code [5], and Kimball later described the distances of some toric codes corresponding to smooth 3–polytopes with five facets [9]. Viewing these as terraced polytopes allows us to generalize their results to any dimension. Theorem 4.2. Let P be a smooth n–polytope with n + 2 facets. Assume P is defined by the following inequalities, where r,an−r+1, . . . ,an,b1,b2 are integers for which 1 ≤ r ≤ n− 1, 0 ≤ an−r+1 ≤ ··· ≤ an, and b1,b2 ≥ 1. x1, . . . ,xn ≥ 0 xn−r+1 + · · · + xn ≤ b1 x1 + · · · + xn−r + an−r+1xn−r+1 + · · · + anxn ≤ b2 Let k be the smallest index for which ak > 0. (If an−r+1 = · · · = an = 0 then set k equal to n + 1.) Then d (P) = { (q − 1)n−1 (q − 1 − b2) if k = n−r + 1 (q − 1)n−2 (q − 1 − b1) (q − 1 − b2) if k > n−r + 1 . Proof. We use Corollary 3.6 to derive a formula for d (P). Thus we need another polytope Q that contains P . Define Q to be the product of simplices given by the following inequalities: x1, . . . ,xn ≥ 0 xn−r+1 + · · · + xk−1 ≤ b1 x1 + · · · + xn−r + akxk + · · · + anxn ≤ b2 If k = n−r + 1, then we omit the second inequality, and Q is a simplex. Let Pj and Qj be the projections of P and Q, respectively, onto the first j coordinates. For any j, the inequalities tell us that both Pj and Qj are terraced in the xj–direction. This will allow us to use Corollary 3.6 iteratively, starting in a dimension where Pj = Qj, and building up to dimension n. 8 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 First, note that Pj0 = P j−1 and Qj0 = Q j−1 for any j. By Proposition 3.9 or Corollary 3.10, d ( Qj ) = (q − 1) d ( Q j 0 ) whenever j ≥ k. Finally, note that Pj ⊆ Qj for all j. Corollary 3.6 tells us that for any j, if d ( P j 0 ) = d ( Q j 0 ) , then d ( Pj ) = d ( Qj ) . By projecting onto the first k − 1 coordinates, we get Pk−1 = Qk−1. This common polytope is a simplex or a product of simplices. Then d ( Pk0 ) = d ( Pk−1 ) = d ( Qk−1 ) = d ( Qk0 ) , so d ( Pk ) = d ( Qk ) . Then d ( Pk+10 ) = d ( Qk+10 ) , so d ( Pk+1 ) = d ( Qk+1 ) . We can continue in this fashion until we obtain d (P) = d (Q). Since Q is a simplex if k = n−r + 1 and a product of simplices if k > n−r + 1, the result follows from Proposition 3.9 and Corollary 3.10. As in Example 3.7, Theorem 4.2 could be generalized considerably to describe the distance of any toric code corresponding to a polytope that is contained in Q and that shares the same base-level distance. In particular, d (P) is completely described by the placement of the facets, determined by b1 and b2. The parameters ai essentially indicate the angle at which one of the facets is tilted, and the amount of tilting does not affect d (P). Only the presence or absence of tilting influences this distance. If ai = 0 for some i, then there is no tilting in that direction and P has the same distance as a product of simplices. But if ai 6= 0 for all i, then each direction is tilted inward and P has the same distance as the simplex ∆nb2. 5. Distances for smooth n–polytopes with n + 3 facets Little and Schenck used Minkowski sums to find the toric code distances corresponding to smooth polygons with five edges [11]. Here, we reprove their results using the method of terraced polytopes. Then, we extend the results to dimension three. There is much more variation in the possible structure of a smooth n–polytope with n + 3 facets compared to those with n + 2 facets. There may not be enough commonality to find the distance for such polytopes in every dimension using the technique of terraced polytopes. 5.1. Smooth polygons with five edges Little and Schenck provided four cases to consider [11]. Possibly using lattice equivalence (Theorem 2.6), each polygon from [11, Section 4] matches one of the polygons in Figure 4. Polygons I (if r > 0), II (if r > 1), and III correspond to the left polygon in the figure. Polygon IV (if r > 0) from [11, Section 4] corresponds to the center polygon in Figure 4. Polygon II (if r = 1) or any of polygons I, II, or IV with r = 0 (which were not explicitly covered in [11]) correspond to the right polygon in Figure 4. While all smooth polygons with five edges fit in these cases, there are many other polygons described by Figure 5.1 that are not smooth. The same distance results hold for those polygons. Figure 4. Every smooth polygon with five edges is lattice equivalent to one of these three, where a, b, c > 0 are integers. The locations of the unlabeled vertices do not affect the distance computations. Both the left and center polygons in Figure 4 are contained in ∆2a and contain [0,a]. The distance of the corresponding toric codes follows immediately from Proposition 3.8. 9 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Proposition 5.1. For the left and center polygons in Figure 4, the distance of the corresponding toric code equals d ( ∆2a ) = (q − 1) (q − 1 −a). The right polygon in Figure 4 is a truncated simplex (a triangle here) stacked on top of a triangular prism (a rectangle here). The distance for such a polytope was determined in Proposition 3.5. Proposition 5.2. Let P represent the right polygon in Figure 4. Then d (P) = { (q − 1 −a) (q − 1 − (b + c)) if c ≥ a (q − 1 − (a + b)) (q − 1 − c) if c ≤ a . 5.2. Smooth wedges over pentagons Batyrev first classified the inner normal fans corresponding to smooth n–polytopes with n+ 3 facets. Theorem 5.3. [1] Let P be a smooth n–polytope with n + 3 facets, and assume P is not combinatorially equivalent to a product of polytopes, each of positive dimension. Then the inner normal fan for P has generating rays that belong to the nonempty sets X0 = {v1, . . . ,vp0} X1 = {y1, . . . ,yp1} X2 = {z1, . . . ,zp2} X3 = {t1, . . . , tp3} X4 = {u1, . . . ,up4} where p0 +p1 +p2 +p3 +p4 = n+3. A collection of generating rays forms a cone in the fan if the collection does not contain all rays from two cyclically adjacent sets Xi. In particular, to form a maximal cone, we start by using all generating rays from two of the sets Xi that are not cyclically adjacent. We then include all but one generating ray from each of the remaining sets. To ensure smoothness, the generating rays must satisfy the following for some nonnegative integers c2, . . . ,cp2,b1, . . . ,bp3. v1 + · · · + vp0 + y1 + · · · + yp1 − c2z2 −···− cp2zp2 − (b1 + 1) t1 −···− (bp3 + 1) tp3 = 0 y1 + · · · + yp1 + z1 + · · · + zp2 −u1 −···−up4 = 0 z1 + · · · + zp2 + t1 + · · · + tp3 = 0 t1 + · · · + tp3 + u1 + · · · + up4 −y1 −···−yp1 = 0 u1 + · · · + up4 + v1 + · · · + vp0 − c2z2 −···− cp2zp2 − b1t1 −···− bp3tp3 = 0 We will focus on three-dimensional polytopes with six facets. In dimension three, a smooth polytope with six facets is combinatorially equivalent either to a wedge over an edge of a pentagon or to a cube. We consider the wedges in this section and cubes in the next section. Let E1, . . . ,E5 be the edges of a pentagon P . We can construct a wedge over the edge Ei of P as follows. Embed P ×{0} in R3. Consider the plane x3 = 0 along with a second plane that contains the edge Ei. These planes determine exactly one bounded region in P × R. This region is a 3–polytope, which we will call the wedge over the edge Ei of P , denoted Pi. The facets Fj of Pi for i 6= j can be associated with the corresponding edges Ej of the pentagon P . Let Fi represent the base of Pi (i.e., the original pentagon P), and let W represent the new facet produced by wedging (see Figure 5). The Pi are all combinatorially equivalent, but they must be realized in very specific ways to yield smooth polytopes. Let v1, . . . ,v5,w represent the inner normal vectors for the corresponding facets F1, . . . ,F5,W of Pi. Now we can apply Theorem 5.3. We can simplify the notation in this dimension so that v1, v2, v3, v4, and v5 correspond to t1, u1, v1, y1, and z1, respectively, from the theorem. The generating ray w corresponds to the final generating ray, choosing just one ray with subscript 2 from the theorem. For all possible i, we will need at most two symbols to represent the coefficients, so we use s and t instead of c2, . . . ,cp2,b1, . . . ,bp3. 10 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 5. P i, a wedge over a pentagon. Case 1 First, we consider P1. By Theorem 5.3, for P1 to be smooth, the generating rays of the inner normal fan must satisfy the following, for some integers s,t ≥ 0. v3 + v4 − (s + 1) v1 − (t + 1) w = 0 v4 + v5 −v2 = 0 v5 + v1 + w = 0 v1 + w + v2 −v4 = 0 v2 + v3 −sv1 − tw = 0 Without loss of generality (using Theorem 2.6), let v1 = e1, v3 = e2, and v5 = e3, where the ei are the standard basis vectors. Then the equations above yield the following: v2 = −(t−s) e1 −e2 − te3 v4 = −(t−s) e1 −e2 − (t + 1) e3 w = −e1 −e3 Without loss of generality (using Theorem 2.6), assume s ≤ t. To obtain the polytope P1, we choose facets corresponding to each generating ray of the fan. Let x1 ≥ 0, x2 ≥ 0, and x3 ≥ 0 correspond to v1, v3, and v5, respectively. The facets (i.e., the corresponding half-spaces) for v2, v4, and w are given below, where a,b,c > 0 are integers. v2 : (t−s) x1 + x2 + tx3 ≤ b v4 : (t−s) x1 + x2 + (t + 1) x3 ≤ c w : x1 + x3 ≤ a Possibilities for P1 are shown in Figure 6. Theorem 5.4. The minimum distance of the toric code corresponding to P1 is d ( P1 ) = { (q − 1)2 (q − 1 − b) if s < t (q − 1) (q − 1 −a) (q − 1 − b) if s = t . Proof. First, suppose s < t. It is straightforward to verify that P1 ⊆ ∆3b (by comparing the facet for v2 to the facet x1 + x2 + x3 ≤ b of ∆2b). Since [0,b] ⊆ P 1, the distance formula follows from Proposition 3.8. 11 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 6. P 1, with s < t on the left and s = t on the right. The unlabeled vertices are not needed in the distance computations. Next, suppose s = t. The polytope P1 is terraced in the x3–direction. We have P10 = [0,a] × [0,b] and d ( P10 ) = (q − 1 −a) (q − 1 − b). Since P1 ⊆ ∆2a × [0,b] and d ( ∆2a × [0,b] ) = (q − 1) (q − 1 −a) (q − 1 − b) = (q − 1) d (( ∆2a × [0,b] ) 0 ) the result follows from Corollary 3.6. Case 2 As in Case 1, we can use Theorem 5.3 to obtain a convenient geometric realization for the polytope P2. If we let x1 ≥ 0, x2 ≥ 0, and x3 ≥ 0 correspond to v2, v5, and v3, respectively, then we can use the procedure from Case 1 to describe the remaining facets v1, v4, and w. These facets are given below, where a,b,c > 0 are integers. v1 : x2 ≤ b v4 : (s + 1) x2 + x3 ≤ c w : x1 + sx2 + x3 ≤ a Possibilities for P2 are shown in Figure 7. Theorem 5.5. The distance of the toric code corresponding to P2 is d ( P2 ) = { (q − 1)2 (q − 1 −a) if s > 0 (q − 1) (q − 1 −a) (q − 1 − b) if s = 0 . The proof is nearly identical to that of Theorem 5.4. 12 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 7. P 2, with s > 0 on the left and s = 0 on the right. Case 3 We can use Theorem 5.3 again to realize the polytope P3. Let x1 ≥ 0, x2 ≥ 0, and x3 ≥ 0 correspond to v3, w, and v5, respectively. The facets for v1, v2, and v4 are given below, where a,b,c > 0 are integers. v1 : x3 ≤ c v2 : x1 + x2 + sx3 ≤ a v4 : x1 + x2 + (s + 1) x3 ≤ b Possibilities for P3 are shown in Figure 8. Theorem 5.6. The distance of the toric code corresponding to P3 is d ( P3 ) =   (q − 1)2 (q − 1 −a) if s > 0 (q − 1) (q − 1 − (b−a)) (q − 1 −a) if s = 0 and a ≥ c (q − 1) (q − 1 − c) (q − 1 − (b− c)) if s = 0 and a ≤ c . Proof. First, suppose s > 0. Then [0,a] ⊆ P3 ⊆ ∆3a, and the formula follows from Proposition 3.8. Next, suppose s = 0. Then P3 is a truncated simplex ∆3a stacked on top of a triangular prism ∆2a × [0,b−a], and d ( P3 ) can be computed using Proposition 3.5. 13 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 8. P 3, with s > 0 on the left and s = 0 on the right. Case 4 We use Theorem 5.3 to realize P4. Let x1 ≥ 0, x2 ≥ 0, and x3 ≥ 0 correspond to v3, v4, and v5, respectively. The facets for v1, v2, and w are given below, where a,b,c > 0 are integers. v1 : x3 ≤ c v2 : x1 + sx3 ≤ a w : x1 + x2 + (s + 1) x3 ≤ b A possibility for P4 is shown in Figure 9. It is straightforward to verify that [0,b] ⊆ P4 ⊆ ∆3b. Proposition 3.8 gives the following result. Figure 9. P 4. Theorem 5.7. The distance of the toric code corresponding to P4 is d ( P4 ) = (q − 1)2 (q − 1 − b). Case 5 Once more, we apply Theorem 5.3 to describe P5. Let x1 ≥ 0, x2 ≥ 0, and x3 ≥ 0 correspond to v5, w, and v3, respectively. The facets for v1, v2, and v4 are given below, where a,b,c > 0 are integers. v1 : x1 + x2 ≤ a v2 : sx1 + (s− t) x2 + x3 ≤ c v4 : (s + 1) x1 + (s− t + 1) x2 + x3 ≤ b 14 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 This case is significantly more complicated. Depending on the values of s and t, we must examine P5 from different perspectives to find a useful terracing that leads to a distance computation. We will consider five possibilities for P5. See Figure 10. Theorem 5.8. The distance of the toric code corresponding to P5 depends on the parameters s and t as follows. 1. If t < s, then d ( P5 ) = (q − 1)2 (q − 1 − c). 2. If s = t = 0, then d ( P5 ) = { (q − 1) (q − 1 − (b−a)) (q − 1 −a) if a ≥ c (q − 1) (q − 1 − c) (q − 1 − (b− c)) if a ≤ c . 3. If s = t ≥ 1, then d ( P5 ) = (q − 1) (q − 1 − (b− c)) (q − 1 − c). 4. If t = s + 1, then d ( P5 ) = (q − 1) (q − 1 − (a− b + c)) (q − 1 − b). 5. If t ≥ s + 2, then d ( P5 ) = (q − 1)2 (q − 1 − (b− (s− t + 1) a)). Proof. 1. Note that [0,c] ⊆ P5 ⊆ ∆3c. The result follows from Proposition 3.8. 2. This follows immediately from Proposition 3.5. 3. Consider P5 as a terraced polytope in the x2–direction. If 0 ≤ i < b − c, then P5i is a pentagon like that shown in the center of Figure 4, whose longest edge has length c. By Proposition 5.1, d ( P5i ) = (q − 1) (q − 1 − c) for each such i, and (q − 1 − i) d ( P5i ) is minimized at i = b− c− 1 in this interval. If b−c ≤ i < a, then P5i is a trapezoid. Example 3.7 yields d ( P5i ) = (q − 1) (q − 1 − (b− i)) in this interval. Note that d ( P5b−c ) = (q − 1) (q − 1 − c) = d ( P5i ) for 0 ≤ i < b−c. Thus the minimum of (q − 1 − i) d ( P5i ) is achieved for some i ≥ b− c. If i = a, then P5a is an interval and d ( P5a ) = (q − 1) (q − 1 − (b−a)). This fits the same formula as the distances for b− c ≤ i < a. By Theorem 3.3, d ( P5 ) = (q − 1) · min b−c≤i≤a (q − 1 − i) (q − 1 − (b− i)) . Since (q − 1 − i) (q − 1 − (b− i)) is quadratic in i, the minimum happens at one of the endpoints i = b− c or i = a. Thus d ( P5 ) = (q − 1) · min{(q − 1 − (b− c)) (q − 1 − c) , (q − 1 −a) (q − 1 − (b−a))} = (q − 1) · min { (q − 1)2 − b (q − 1) + c (b− c) , (q − 1)2 − b (q − 1) + a (b−a) } = (q − 1) · [ (q − 1)2 − b (q − 1) + min{c (b− c) ,a (b−a)} ] . For P5 to be a valid polytope, we need b− c < a and b− (s + 1) a > 0. (See the vertices in Figure 10.) Then b−a < c and b−sa > a. Since we assumed s ≥ 1, we have a < b−sa ≤ b−a < c. We get b < a + c and c−a > 0. Then b < a + c =⇒ b (c−a) < (a + c) (c−a) =⇒ c (b− c) < a (b−a) . Therefore, d ( P5 ) = (q − 1) (q − 1 − (b− c)) (q − 1 − c). 15 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 10. Possibilities for P 5. 16 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 4. Consider P5 as being terraced in the x1–direction. If 0 ≤ i < b−c, then P5i is a pentagon, as shown in Figure 11. By Proposition 5.2, d ( P5i ) = { (q − 1 − (a− b + c)) (q − 1 − (b− (s + 1) i)) if si ≤ b−a (q − 1 − (a− i)) (q − 1 − (c−si)) if si ≥ b−a . But we need b− (s + 1) a > 0 for the polytope in Figure 10 to have the desired structure. Then b− (s + 1) i > (s + 1) a− (s + 1) i = (s + 1) (a− i) ≥ a− i since s ≥ 0. Then b−a > si and we get d ( P5i ) = (q − 1 − (a− b + c)) (q − 1 − (b− (s + 1) i)). Figure 11. P 5i , if t = s + 1 and 0 ≤ i < b − c. If b − c ≤ i < a, then P5i is a rectangle with dimensions (a− i) × (b− (s + 1) i). Then d ( P5i ) = (q − 1 − (a− i)) (q − 1 − (b− (s + 1) i)). When i = b−c, d ( P5i ) agrees with the formula for d ( P5i ) for 0 ≤ i < b − c. If i = a, then P5a is an interval and d ( P5a ) = (q − 1) (q − 1 − (b− (s + 1) a)). This agrees with the formula for d ( P5i ) in b− c ≤ i < a. To summarize, we have d ( P5i ) = { (q − 1 − (a− b + c)) (q − 1 − (b− (s + 1) i)) if 0 ≤ i ≤ b− c (q − 1 − (a− i)) (q − 1 − (b− (s + 1) i)) if b− c ≤ i ≤ a . Let’s first compute the minimum of (q − 1 − i) d ( P5i ) for 0 ≤ i ≤ b− c. We have min 0≤i≤b−c (q − 1 − i) d ( P5i ) = min 0≤i≤b−c (q − 1 − i) (q − 1 − (a− b + c)) (q − 1 − (b− (s + 1) i)) = (q − 1 − (a− b + c)) · min 0≤i≤b−c (q − 1 − i) (q − 1 − (b− (s + 1) i)) . The expression (q − 1 − i) (q − 1 − (b− (s + 1) i)) is quadratic in i, so it is minimized at one of the endpoints i = 0 or i = b− c. Since 0 < b− c < q − 1, c > 0, and s ≥ 0, we have 0 < (b− c) (s (q − 1 − (b− c)) + c) . This is equivalent to (q − 1) (q − 1 − b) < (q − 1 − (b− c)) (q − 1 − (b− (s + 1) (b− c))) so d ( P5i ) is minimized at the i = 0 level over this interval. Using Theorem 3.3, we must now determine if (q − 1 − i) d ( P5i ) can attain a lesser value over b− c ≤ i ≤ a. Consider min b−c≤i≤a (q − 1 − i) d ( P5i ) = min b−c≤i≤a (q − 1 − i) (q − 1 − (a− i)) (q − 1 − (b− (s + 1) i)) . The product being minimized is now cubic with respect to i. Its graph has two negative roots and one positive root at i = q − 1. Thus the graph is concave down on b − c ≤ i ≤ a and the 17 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 minimum value on this interval must occur at one of the endpoints. But we already know that (q − 1 − (b− c)) d ( P5b−c ) > (q − 1) d ( P50 ) , so we only get a potentially lesser value in this range at i = a. According to the construction of P5, we have −s (q − 1 −a) ≤ 0 < b−a. Then −as (q − 1 −a) < a (b−a), which is equivalent to (q − 1) (q − 1 − b) < (q − 1 −a) (q − 1 − (b− (s + 1) a)). Multiply- ing both sides by the positive integer q−1−(a− b + c) reveals that (q − 1 − i) d ( P5i ) is minimized at the i = 0 level, so by Theorem 3.3, d ( P5 ) = (q − 1) (q − 1 − (a− b + c)) (q − 1 − b) . 5. Apply the transformation T     x1x2 x3     =   0 −1 01 0 0 0 0 1   ·     x1x2 x3  −   0a 0     to P5. By Theorem 2.6, the resulting polytope yields the same distance. The transformed polytope T ( P5 ) satisfies [0,b− (s− t + 1) a] ⊆ T ( P5 ) ⊆ ∆3 b−(s−t+1)a, and the distance formula follows from Proposition 3.8. 5.3. Smooth combinatorial cubes The remaining smooth 3–polytopes with six facets are combinatorially equivalent to a cube. To describe these polytopes, we start with their inner normal fans. Let u1,u2,u3,v1,v2,v3 be the generating rays of a fan in R3. If the cones of this fan are given by any subset of generating rays not containing both ui and vi for some i, then the fan is the normal fan to a combinatorial cube. It remains to determine the restrictions on the generating rays that will make the corresponding polytope smooth. Without loss of generality (using Theorem 2.6), we can assume that ui = ei for each i. Let the columns of the following matrix represent the coordinates of the generating rays, where the last three columns give v1, v2, and v3, respectively.  1 0 0 b1 c1 d10 1 0 b2 c2 d2 0 0 1 b3 c3 d3   To be smooth, the minors corresponding to maximal cones must equal ±1. To make the fan complete (i.e., so that it spans all of R3), adjacent maximal cones must have opposite determinants. Any minor comprising an odd number of ui’s must equal +1, and any minor with an even number of ui’s must equal −1. To denote a minor, we enclose the corresponding columns in vertical bars. For example, |u1,u2,u3| = 1 gives the determinant of the first three columns. The minor |u1,u2,v3| = −1 gives us d3 = −1. Similarly, we need b1 = c2 = −1. The minor |u1,v2,v3| = 1 gives us c3d2 = 0. Without loss of generality (using Theorem 2.6 if needed), assume d2 = 0. Similarly, we can assume c1 = d1 = 0 using |u3,v1,v2| = 1 and |u2,v1,v3| = 1. We get the following matrix for the generating rays.  1 0 0 −1 0 00 1 0 b2 −1 0 0 0 1 b3 c3 −1   Using Theorem 2.6, we can assume c3 ≤ 0. (If c3 > 0, then we reflect across a plane normal to e3, switch u3 and v3, and then translate as needed.) Similarly, we can assume b2 ≤ 0. By choosing facets normal to the generating rays, we can now describe all smooth combinatorial cubes up to lattice equivalence. 18 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Proposition 5.9. Let C be a smooth combinatorial cube with integer vertices. Then C is lattice equivalent to a 3–polytope whose facets correspond to the following inequalities, where a1,a2,a3 ∈ N, b2,b3,c3 ∈ Z, and b2,c3 ≤ 0. x1,x2,x3 ≥ 0 x1 − b2x2 − b3x3 ≤ a1 x2 − c3x3 ≤ a2 x3 ≤ a3 The way in which we calculate the distance of the toric code corresponding to C again depends on the values of b2, b3, and c3. There are numerous cases to consider, but there is significant overlap in the results and in their proofs. Theorem 5.10. Let C be a smooth combinatorial cube as described in Proposition 5.9 (see Figure 12). 1. If b3 < 0 and b2 < 0, then d (C) = (q − 1) 2 (q − 1 −a1). 2. If b3 < 0 and c3 = b2 = 0, then d (C) = (q − 1) (q − 1 −a1) (q − 1 −a2). 3. If b3 < 0 and c3 < b2 = 0, then d (C) = (q − 1) (q − 1 −a1) (q − 1 −a2). 4. If b3 = 0 and b2 < 0, then d (C) = (q − 1) (q − 1 −a1) (q − 1 −a3). 5. If b3 = 0 and c3 = b2 = 0, then d (C) = (q − 1 −a1) (q − 1 −a2) (q − 1 −a3). 6. If b3 = 0 and c3 < b2 = 0, then d (C) = (q − 1) (q − 1 −a1) (q − 1 −a2). 7. If b3 > 0 and b2 < 0, then d (C) = (q − 1) 2 (q − 1 − (a1 + b3a3)). 8. If b3 > 0 and c3 = b2 = 0, then d (C) = (q − 1) (q − 1 −a2) (q − 1 − (a1 + b3a3)). 9. If b3 > 0 and c3 < b2 = 0, then d (C) = (q − 1) · min{(q − 1 −a1) (q − 1 −a2) , (q − 1 − (a1 + b3a3)) (q − 1 − (a2 + c3a3))} . Proof. (5) In this case, C is a product of three intervals, and the result follows from Theorem 2.3. (2,6,8) In each of these cases, C is a product of a trapezoid and an interval. The results follow from Theorem 2.3 and Example 3.7. (1) Here, we can apply Proposition 3.8, noting that [0,a1] ⊆ C ⊆ ∆3a1. (3,4) In each of these cases, C is contained in the product of a trapezoid and an interval. The results follow immediately from Corollary 3.6. (7) First, apply the transformation   1 0 00 1 0 0 0 −1   ·   x1x2 x3   +   00 a3   to C. It is straightforward to verify that the transformed polytope contains [0,a1 + b3a3] and is contained in ∆3a1+b3a3. The result follows from Proposition 3.8. 19 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Figure 12. Smooth combinatorial cubes. The remaining case b2 = b3 = c3 = 0 is a rectangular prism and is not shown. 20 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 (9) The polytope C is terraced in the x1–direction. For 0 ≤ i ≤ a1, the level Ci is a trapezoid with d (Ci) = (q − 1) (q − 1 −a2). For a1 ≤ i < a1 + b3a3, the polygon Ci is still a trape- zoid, but it no longer necessarily has integer vertices. The vertices of Ci are now ( i, 0, i−a1 b3 ) ,( i,a2 + c3(i−a1) b3 , i−a1 b3 ) , (i,a2 + c3a3,a3), and (i, 0,a3). Then Ci is contained in a 2–simplex with the same (possibly non-integer) base length. By Proposition 3.9 and 3.6, we get d (Ci) = (q − 1) ( q − 1 − ⌊ a2 + c3 b3 (i−a1) ⌋) for a1 ≤ i < a1 + b3a3. For i = a1 + b3a3, the polygon Ca1+b3a3 is an interval and d (Ca1+b3a3 ) = (q − 1) (q − 1 − (a2 + c3a3)) in R2. This agrees with the distance formula for a1 ≤ i < a1 + b3a3. Thus we have d (Ci) = { (q − 1) (q − 1 −a2) if 0 ≤ i ≤ a1 (q − 1) ( q − 1 − ⌊ a2 + c3 b3 (i−a1) ⌋) if a1 ≤ i ≤ a1 + b3a3 . Since d (Ci) does not depend on i for 0 ≤ i ≤ a1, we get min 0≤i≤a1 (q − 1 − i) d (Ci) = (q − 1 −a1) d (Ca1 ) . Then d (C) = min a1≤i≤a1+b3a3 (q − 1 − i) d (Ci) = (q − 1) min a1≤i≤a1+b3a3 (q − 1 − i) ( q − 1 − ⌊ a2 + c3 b3 (i−a1) ⌋) . For all i, we have q − 1 − ( a2 + c3 b3 (i−a1) ) ≤ q − 1 − ⌊ a2 + c3 b3 (i−a1) ⌋ . Since the expression (q − 1 − i) ( q − 1 − ( a2 + c3 b3 (i−a1) )) is quadratic in i and c3 b3 < 0, it is minimized at one of the endpoints i = a1 or i = a1 +b3a3 of the given interval. For these values of i, the floor function is not needed since the result is already an integer. Since one of these values gives the minimum of all the (q − 1 − i) ( q − 1 − ( a2 + c3 b3 (i−a) )) , and all of these are less than or equal to the corresponding expressions with the floor function, d (C) itself must be minimized at either i = a1 or i = a1 + b3a3. The result follows from Theorem 3.3. 6. Questions It would be interesting to complete the classification of minimum distance for all toric codes coming from smooth n–polytopes with n + 3 facets. Problem 6.1. Are all smooth n–polytopes with n + 3 facets terraced? If so, what happens as dimension increases? Are there few enough cases to allow us to explicitly describe the distances of the corresponding toric codes, or does the number of cases continue to grow as dimension increases? In most of our proofs, we used very little of the smooth structure of the polytopes. For example, Corollary 3.6 appeared frequently in our distance computations. In these cases, the same techniques and results would apply to many other similar polytopes, as long as the base level and containment requirements persisted. This suggests that the method of terraced polytopes could apply far beyond smooth polytopes. 21 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 Problem 6.2. What other classes of polytopes are terraced? Can we use Theorem 3.3 to find the minimum distance of the corresponding toric codes? In particular, can we compute distances for sequences of terraced polytopes with increasing dimen- sion? Then we could study asymptotic parameters for the corresponding sequences of toric codes. Definition 6.3. (see [6], for example) The information rate of a linear code with dimension k and codeword length N is k N . The relative minimum distance of a linear code with minimum distance d and codeword length N is d N . Ideally, we want a sequence of codes that balances information rate and relative distance, as this would give sufficient error-correcting capabilities while still providing a large amount of codewords. Consider a sequence of toric codes whose corresponding polytopes are smooth n–polytopes with n+ 2 facets. By Theorem 4.2, the relative minimum distance of a toric code in this sequence will be d (P) (q − 1)n ∈ { q − 1 − b2 q − 1 , (q − 1 − b1) (q − 1 − b2) (q − 1)2 } and d(P) (q−1)n tends toward positive values as n →∞. But since each such polytope P lies within a simplex or a product of simplices, the information rate tends toward zero as the polytope dimension increases (cf. [19, Section 4]). Perhaps terraced polytopes provide enough diversity to allow us to find a sequence of codes for which both the information rate and the relative distance tend toward positive values. Problem 6.4. Does there exist a sequence of terraced polytopes for which the corresponding toric codes have relative distances and information rates that both tend toward positive numbers as codeword length increases? References [1] V. V. Batyrev, On the classification of smooth projective toric varieties, Tohoku Math. J. (2) 43(4) (1991) 569–585. [2] G. Brown, A. M. Kasprzyk, Seven new champion linear codes, LMS J. Comput. Math. 16 (2013) 109–117. [3] D. A. Cox, J. B. Little, H. K. Schenck, Toric varieties, AMS Grad. Stud. Math. 124 (2011). [4] J. P. Hansen, Toric surfaces and error-correcting codes, In : Coding theory, cryptography and related areas, Proceedings of an International Conference, Springer, Berlin, Heidelberg (2000) 132–142. [5] J. P. Hansen, Toric varieties, Hirzebruch surfaces and error-correcting codes, Appl. Algebra Eng. Commun. Comput. 13(4) (2002) 289–300. [6] W. C. Huffman, V. Pless, Fundamentals of error-correcting codes, Cambridge University Press (2003). [7] N. Hussain, X. Luo, S. S.-T. Yau, M. Zhang, H. Zuo, On classification of toric surface codes of dimension seven, Commun. Anal. Geom. 28(2) (2020) 263–319. [8] D. Joyner, Toric codes over finite fields, Appl. Algebra Eng. Commun. Comput. 15(1) (2004) 63–79. [9] J. L. Kimball, Bounds on codes from smooth toric threefolds with rank(Pic(X)) = 2, Ph.D. Disser- tation, Texas A&M University (2008). [10] P. Kleinschmidt, A classification of toric varieties with few generators, Aeq. Math. 35 (1988) 254–266. [11] J. Little, H. Schenck, Toric surface codes and Minkowski sums, SIAM J. Discrete Math. 20(4) (2006) 999–1014. [12] J. Little, R. Schwarz, On toric codes and multivariate Vandermonde matrices, Appl. Algebra Eng. Commun. Comput. 18(4) (2007) 349–367. [13] J. B. Little, Algebraic geometry codes from higher dimensional varieties, In: Advances in algebraic geometry codes, World Scientific, Series on Coding Theory and Cryptology (2008) 257–293. 22 https://doi.org/10.2748/tmj/1178227429 https://doi.org/10.2748/tmj/1178227429 https://doi.org/10.1112/S1461157013000041 https://doi.org/10.1112/S1461157013000041 http://dx.doi.org/10.1090/gsm/124 https://doi.org/10.1007/978-3-642-57189-3_12 https://doi.org/10.1007/978-3-642-57189-3_12 https://doi.org/10.1007/s00200-002-0106-0 https://doi.org/10.1007/s00200-002-0106-0 https://doi.org/10.1017/CBO9780511807077 https://dx.doi.org/10.4310/CAG.2020.v28.n2.a3 https://dx.doi.org/10.4310/CAG.2020.v28.n2.a3 https://doi.org/10.1007/s00200-004-0152-x https://hdl.handle.net/1969.1/ETD-TAMU-2992 https://hdl.handle.net/1969.1/ETD-TAMU-2992 https://doi.org/10.1007/BF01830946 https://doi.org/10.1137/050637054 https://doi.org/10.1137/050637054 https://doi.org/10.1007/s00200-007-0041-1 https://doi.org/10.1007/s00200-007-0041-1 https://doi.org/10.1142/9789812794017_0007 https://doi.org/10.1142/9789812794017_0007 AR TI CL E IN PR ES S A. Wilfong / J. Algebra Comb. Discrete Appl. -(-) (2023) 1–23 [14] X. Luo, S. S.-T. Yau, M. Zhang, H. Zuo, On classification of toric surface codes of low dimension, Finite Fields Appl. 33 (2015) 90–102. [15] K. Meyer, I. Soprunov, J. Soprunova, Fq-zeros of sparse trivariate polynomials and toric 3-fold codes, arXiv:2105.10071. [16] D. Ruano, On the parameters of r-dimensional toric codes, Finite Fields Appl. 13(4) (2007) 962–976. [17] I. Soprunov, Lattice polytopes in coding theory, J. Algebra Comb. Discrete Struct. Appl. 2(2) (2015) 85–94. [18] I. Soprunov, J. Soprunova, Toric surface codes and Minkowski length of polygons, SIAM J. Discrete Math. 23(1) (2009) 384–400. [19] I. Soprunov, J. Soprunova, Bringing toric codes to the next dimension, SIAM J. Discrete Math. 24(2) (2010) 655–665. [20] J. L. Walker, Codes and curves, AMS Stud. Math. Libr. 7 (2000). [21] G. M. Ziegler, Lectures on polytopes, Springer-Verlag, Grad. Texts Math. 152 (1995). 23 https://doi.org/10.1016/j.ffa.2014.11.007 https://doi.org/10.1016/j.ffa.2014.11.007 https://arxiv.org/abs/2105.10071 https://arxiv.org/abs/2105.10071 https://doi.org/10.1016/j.ffa.2007.02.002 https://jacodesmath.com/index.php/jacodesmath/article/view/14 https://jacodesmath.com/index.php/jacodesmath/article/view/14 https://doi.org/10.1137/080716554 https://doi.org/10.1137/080716554 https://doi.org/10.1137/090762592 https://doi.org/10.1137/090762592 http://dx.doi.org/10.1090/stml/007 https://doi.org/10.1007/978-1-4613-8431-1 Introduction Toric codes Minimum distance for terraced polytopes Distances for smooth n–polytopes with n+2 facets Distances for smooth n–polytopes with n+3 facets Questions References