Agda cannot accept anything about features like ++ . Suppose we define ++ as follows:
_++_ : {A : Set} β List A β List A β List A xs ++ ys = []
In this case, sometype [] β β₯ not provable, and accepting an absurd pattern () will be a mistake.
In your second example, the sometype index should look like n β· (l1 ++ l2) , which is a constructor expression, since _β·_ is a list constructor. Agda can safely conclude that a _β·_ -built list can never be equal to [] . In general, various constructors can be considered impossible for unification.
What Agda can do with application applications reduces them as much as possible. In some cases, the abbreviation gives constructor expressions, in other cases it is not, and we need to write additional evidence.
To prove sometype [] β β₯ , you first need to make some generalization. We cannot match the match by the value of sometype [] (due to ++ in the type index), but we can match on sometype xs for some abstract xs . So our lemma reads as follows:
someF' : β xs β sometype xs β xs β‘ [] β β₯ someF' .(n β· l2) (constr [] l2 n) () someF' .(n' β· l1 ++ n β· l2) (constr (n' β· l1) l2 n) ()
In other words, β xs β sometype xs β xs β’ [] . From this we can obtain the required proof:
someF : sometype [] β β₯ someF p = someF' [] p refl
source share