You need to use the axiomatic definition: the definition of an object is constrained by conditions.
There is a schema specified in zet for this.
Which is
| Declaration
------------------------------
| Predicate
|
|
A recursive example given:
[USERNAME] - An already defined type.
Given a username and a sequence of usernames(N1 --> USERNAME) return the number that the given username appears into the sequence.
|-occurs- USERNAME X seq USERNAME → N //here you define the input and what is returned.
---------------------------------------
|∀ u: USERNAME, s: seq USERNAME then
|s = < > => occurs(u,s) = 0
|s ≠ < > and head(s) = u => occurs(u,s) = 1+occurs(u,tail(s))
|s ≠ < > and head(s) ≠ u => occurs(u,s) = occurs(u,tail(s))