# Path: soap/semantics/error.py
# class IntegerInterval(Interval):
#     """The interval containing integer values."""
#     def __init__(self, v=None, top=False, bottom=False):
#         super().__init__(v, top=top, bottom=bottom)
#         try:
#             if self.min not in (-inf, inf):
#                 self.min = mpz(self.min)
#             if self.max not in (-inf, inf):
#                 self.max = mpz(self.max)
#         except AttributeError:
#             'The interval is a top or bottom.'
# 
#     def __truediv__(self, other):
#         return FloatInterval(self) / other
# 
# Path: soap/semantics/linalg.py
# class IntegerIntervalArray(MultiDimensionalArray):
#     value_class = IntegerInterval


import itertools
import unittest
from soap.semantics.error import IntegerInterval
from soap.semantics.linalg import IntegerIntervalArray as IntArray
        intervals = [IntegerInterval(v) for v in self.vector_values]
        self.assertListEqual(intervals, list(self.vector))
        x_shape, y_shape = self.matrix.shape
        for x, y in itertools.product(range(x_shape), range(y_shape)):
            val = IntegerInterval(self.matrix_values[x][y])
            self.assertEqual(val, self.matrix[x, y])

    def test_matrix_getter(self):
        self.assertEqual(self.matrix[1, 2], IntegerInterval([6, 9]))
        self.assertEqual(self.matrix[[0, 1], 1], IntegerInterval([2, 9]))

    def test_matrix_update(self):
        mat = self.matrix.update((1, 2), 1)
        self.assertEqual(mat[1, 2], IntegerInterval(1))
        mat = self.matrix.update(([1, 2], 1), 1)
        val = IntegerInterval([1, 9])
        self.assertEqual(mat[1, 1], val)
        self.assertEqual(mat[2, 1], val)

    def test_join_and_meet(self):
        other_matrix = IntArray(
            [[9, 8, 7],
             [6, 5, 4],
             [3, 2, 1]])
        join_test_matrix = IntArray(self._list_elements_to_interval(
            [[[1, 9], [2, 8], [3, 7]],
             [[4, 8], [5, 9], [4, 9]],
             [[3, 9], [2, 9], [1, 9]]]))
        self.assertEqual(self.matrix | other_matrix, join_test_matrix)
        bot = IntegerInterval(bottom=True)

# Path: soap/semantics/error.py
# class IntegerInterval(Interval):
#     """The interval containing integer values."""
#     def __init__(self, v=None, top=False, bottom=False):
#         super().__init__(v, top=top, bottom=bottom)
#         try:
#             if self.min not in (-inf, inf):
#                 self.min = mpz(self.min)
#             if self.max not in (-inf, inf):
#                 self.max = mpz(self.max)
#         except AttributeError:
#             'The interval is a top or bottom.'
# 
#     def __truediv__(self, other):
#         return FloatInterval(self) / other
# 
# Path: soap/semantics/linalg.py
# class IntegerIntervalArray(MultiDimensionalArray):
#     value_class = IntegerInterval


# Path: tests/test_linalg.py
import itertools
import unittest
from soap.semantics.error import IntegerInterval
from soap.semantics.linalg import IntegerIntervalArray as IntArray

        intervals = [IntegerInterval(v) for v in self.vector_values]
        self.assertListEqual(intervals, list(self.vector))
        x_shape, y_shape = self.matrix.shape
        for x, y in itertools.product(range(x_shape), range(y_shape)):
            val = IntegerInterval(self.matrix_values[x][y])
            self.assertEqual(val, self.matrix[x, y])

    def test_matrix_getter(self):
        self.assertEqual(self.matrix[1, 2], IntegerInterval([6, 9]))
        self.assertEqual(self.matrix[[0, 1], 1], IntegerInterval([2, 9]))

    def test_matrix_update(self):
        mat = self.matrix.update((1, 2), 1)
        self.assertEqual(mat[1, 2], IntegerInterval(1))
        mat = self.matrix.update(([1, 2], 1), 1)
        val = IntegerInterval([1, 9])
        self.assertEqual(mat[1, 1], val)
        self.assertEqual(mat[2, 1], val)

    def test_join_and_meet(self):
        other_matrix = IntArray(
            [[9, 8, 7],
             [6, 5, 4],
             [3, 2, 1]])
        join_test_matrix = IntArray(self._list_elements_to_interval(
            [[[1, 9], [2, 8], [3, 7]],
             [[4, 8], [5, 9], [4, 9]],
             [[3, 9], [2, 9], [1, 9]]]))
        self.assertEqual(self.matrix | other_matrix, join_test_matrix)
        bot = IntegerInterval(bottom=True)

        meet_test_matrix = IntArray(