In [1]:
import itertools
from collections import OrderedDict

def recurnonincreasing(length,minval,maxval):
    """
    This is a generator that iterates over nonincreasing integer sequences
    of length 'length', with values bounded between 'minval' and 'maxval'.
    """
    for currval in range(minval,maxval+1,1):
        if length == 1:
            yield [currval]
        else:
            for x in recurnonincreasing(length-1,minval,currval):
                x.insert(0,currval)
                yield x


def testtetra(seq):
    """
    Given a list of numbers in the order (x,y,z, xb,yb,zb), 
    where (x,y,z) are the lengths of 3 edges coming out of a vertex and
    (xb,yb,zb) are the three edges opposite them (in order),
    check whether they are edge lengths of a tetrahedron.
    
    See Section 3 of 
    Wirth and Dreiding, Edge lengths determining tetrahedrons, 
    Elem. Math. 64 (2009) 160-170.
    
    Apparently remark 5 doesn't mean that you can just check the 3D Cayley-Menger 
    and the 2D Cayley-Menger for any one of the faces.
    """
    if len(seq) !=6:
        return False
    else:
        x,y,z,xb,yb,zb = seq
        # 2D Cayley-Menger for face (xb,yb,zb)
        D1S = -(xb+yb+zb)*(xb+yb-zb)*(yb+zb-xb)*(zb+xb-yb)
        # 2D Cayley-Menger for face (xb,z,y)
        D2S = -(xb+z+y)*(xb+z-y)*(z+y-xb)*(y+xb-z)
        # 2D Cayley-Menger for face (yb,z,x)
        D3S = -(yb+z+x)*(yb+z-x)*(z+x-yb)*(x+yb-z)
        # 2D Cayley-Menger for face (zb,y,x)
        D4S = -(zb+y+x)*(zb+y-x)*(y+x-zb)*(x+zb-y)
        if any([D1S >= 0,D2S >= 0,D3S >= 0,D4S >= 0,]):
            #print('DjS failed')
            return False
        else:
            x2,y2,z2,xb2,yb2,zb2 = [n*n for n in seq]
            # 3D Cayley-Menger
            DS = (2*x2*xb2*(y2+yb2+z2+zb2-x2-xb2) + 
                2*y2*yb2*(z2+zb2+x2+xb2-y2-yb2) +
                2*z2*zb2*(x2+xb2+y2+yb2-z2-zb2) +
                (x2-xb2)*(y2-yb2)*(z2-zb2)-(x2+xb2)*(y2+yb2)*(z2+zb2))
            if DS <= 0:
                #print('DS failed')
                return False
            else:
                return True

def tetraperm(nonincseq):
    """
    Given a nonincreasing sequence of 6 integers, this generator returns the 
    30 nonisometric orderings suitable for input into testtetra.
    
    This is based on the discussion at the beginning of section 6 of
    Wirth and Dreiding, Edge lengths determining tetrahedrons, 
    Elem. Math. 64 (2009) 160-170).
    """
    longest = nonincseq[0]
    for k in range(5):
        remaining = nonincseq[1:]
        opposite = remaining.pop(k)
        nextlargest = max(remaining)
        remaining.remove(nextlargest)
        for perm in itertools.permutations(remaining):
            yield [longest, nextlargest, perm[0], opposite, perm[1], perm[2]]

In [2]:
# max integer length
m=7

#bigtable = [seq for noninc in recurnonincreasing(6,1,m) 
#            for seq in tetraperm(noninc) if testtetra(seq)]

#tups = [tuple(ent) for ent in bigtable]
#data=list(set(tups))
#orderedlengths = list(OrderedDict.fromkeys(tups))

lengthsonly = [noninc for noninc in recurnonincreasing(6,1,m) 
              if any([testtetra(seq) for seq in tetraperm(noninc)])]

In [3]:
len(lengthsonly)


Out[3]:
445

In [4]:
# list of sets of 6 strictly positive integers
# which are the lengths of the edges of at least one tetrahedron
lengthsonly


Out[4]:
[[1, 1, 1, 1, 1, 1],
 [2, 2, 2, 1, 1, 1],
 [2, 2, 2, 2, 1, 1],
 [2, 2, 2, 2, 2, 1],
 [2, 2, 2, 2, 2, 2],
 [3, 2, 2, 2, 2, 1],
 [3, 2, 2, 2, 2, 2],
 [3, 3, 2, 2, 2, 1],
 [3, 3, 2, 2, 2, 2],
 [3, 3, 3, 1, 1, 1],
 [3, 3, 3, 2, 2, 1],
 [3, 3, 3, 2, 2, 2],
 [3, 3, 3, 3, 1, 1],
 [3, 3, 3, 3, 2, 1],
 [3, 3, 3, 3, 2, 2],
 [3, 3, 3, 3, 3, 1],
 [3, 3, 3, 3, 3, 2],
 [3, 3, 3, 3, 3, 3],
 [4, 3, 3, 2, 2, 1],
 [4, 3, 3, 2, 2, 2],
 [4, 3, 3, 3, 2, 2],
 [4, 3, 3, 3, 3, 1],
 [4, 3, 3, 3, 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, 7, 7, 6, 1],
 [7, 7, 7, 7, 6, 2],
 [7, 7, 7, 7, 6, 3],
 [7, 7, 7, 7, 6, 4],
 [7, 7, 7, 7, 6, 5],
 [7, 7, 7, 7, 6, 6],
 [7, 7, 7, 7, 7, 1],
 [7, 7, 7, 7, 7, 2],
 [7, 7, 7, 7, 7, 3],
 [7, 7, 7, 7, 7, 4],
 [7, 7, 7, 7, 7, 5],
 [7, 7, 7, 7, 7, 6],
 [7, 7, 7, 7, 7, 7]]

In [9]:
%%time
m=25

lengthsonly = [noninc for noninc in recurnonincreasing(6,1,m) 
              if any([testtetra(seq) for seq in tetraperm(noninc)])]


CPU times: user 38 s, sys: 76.8 ms, total: 38 s
Wall time: 38.1 s

In [10]:
# a table (m, number of distinct integer tetrahedron edge length sets with maximum entry equal to m)
[(m,[x[0] for x in lengthsonly].count(m)) for m in range(1,25+1,1)]


Out[10]:
[(1, 1),
 (2, 4),
 (3, 13),
 (4, 30),
 (5, 64),
 (6, 119),
 (7, 214),
 (8, 354),
 (9, 563),
 (10, 852),
 (11, 1262),
 (12, 1807),
 (13, 2535),
 (14, 3460),
 (15, 4661),
 (16, 6144),
 (17, 8028),
 (18, 10284),
 (19, 13089),
 (20, 16411),
 (21, 20447),
 (22, 25147),
 (23, 30772),
 (24, 37252),
 (25, 44893)]

In [11]:
len(lengthsonly)


Out[11]:
228406

In [12]:
# a table (m, number of distinct integer tetrahedron edge length sets with maximum entry at most m)
[(m,len([x[0] for x in lengthsonly if x[0] <= m])) for m in range(1,25+1,1)]


Out[12]:
[(1, 1),
 (2, 5),
 (3, 18),
 (4, 48),
 (5, 112),
 (6, 231),
 (7, 445),
 (8, 799),
 (9, 1362),
 (10, 2214),
 (11, 3476),
 (12, 5283),
 (13, 7818),
 (14, 11278),
 (15, 15939),
 (16, 22083),
 (17, 30111),
 (18, 40395),
 (19, 53484),
 (20, 69895),
 (21, 90342),
 (22, 115489),
 (23, 146261),
 (24, 183513),
 (25, 228406)]

In [ ]: