It's a little non-Haskelli, but more idiomatic, for example. Agda: Change the interpretation of your view so that it is correctly constructed.
In this case, note that if n :: Int , then even (2 * n) and odd (2 * n + 1) . If we discard the case of too large Int s, we can say that there is a bijection between the even Int and Int s; and the other between the odd Int and Int s.
Thus, using this, you can select this view:
data Weapon = T Int | S Int
and change its interpretation so that the value of T n actually represents T (2 * n) , and the value of S n represents S (2 * n + 1) . Therefore, no matter which n :: Int you choose, T n will be valid, since you will consider it the value " T -of-2 * n".
source share