```python
def max_product(arr, n):
    """
    Finds the maximum product of an increasing subsequence of an array.

    Args:
        arr: A list of numbers.
        n: The number of elements in the array.

    Returns:
        The maximum product of an increasing subsequence.
    """
    if n == 0:
        return 0

    # max_products[i] will store the maximum product of an increasing
    # subsequence ending at index i.
    # Initialize with the elements themselves, as each element is a
    # subsequence of length 1.
    max_products = list(arr)

    # Iterate through the array to fill the max_products table.
    for i in range(1, n):
        # For each element, check all previous elements.
        for j in range(i):
            # If a previous element arr[j] is smaller than the current
            # element arr[i], it can be part of an increasing subsequence
            # ending at arr[i].
            if arr[j] < arr[i]:
                # Update the maximum product for the subsequence ending at i
                # if we find a larger product by extending a previous subsequence.
                potential_product = max_products[j] * arr[i]
                if potential_product > max_products[i]:
                    max_products[i] = potential_product

    # The overall maximum product is the maximum value in our table.
    return max(max_products)

```