Generating all the increasing subsequences Given an array of integers, how can we generate all the increasing subsequnces  of length of 4  ?
Example: given this list
l = [1, 2, 4, 5, 3, 6]

The answer should be :
[1, 2, 3, 6]
[1, 2, 4, 5]
[1, 2, 4, 6]
[1, 2, 5, 6]
[1, 4, 5, 6]
[2, 4, 5, 6]

I generated this algorithm using python :
def verif(x,temp):
    work=[]
    for k in temp:
        if len(k)&lt;4 :
            if k[-1] &lt; x :
                work.append(k+[x])
    return work+[[x]]

temp=[[1]]
for i in range(1,len(l)):
    print(i)
    zeta=verif(l[i],temp)
    for i in zeta:
        if len(i)==4 :
            print(i)
    temp+=zeta
    zeta=[]

I want to improve my approach , which is very slow for bigger lists unfortunately , is there another algortihm which works faster ?
Here is an algorithm to generate all increasing sequences of length $4$ of the numbers $1,\ldots,n$:
for d in {4,...,n}:
  for c in {3,...,d-1}:
    for b in {2,...,c-1}:
      for a in {1,...,b-1}:
        output a,b,c,d