interface Injective : (a -> b) -> TypeAn injective function maps distinct elements to distinct elements.
injective : f x = f y -> x = yinjective : Injective f => f x = f y -> x = yinj : (0 f : (a -> b)) -> {auto 0 _ : Injective f} -> (0 _ : f x = f y) -> x = yinterface Biinjective : (a -> b -> c) -> TypeAn bi-injective function maps distinct elements to distinct elements in both arguments.
This is more strict than injectivity on each of arguments.
For instance, list appending is injective on both arguments but is not biinjective.
biinjective : f x v = f y w -> (x = y, v = w)Biinjective (::)Biinjective MkPairBiinjective (:<)biinjective : Biinjective f => f x v = f y w -> (x = y, v = w)biinj : (0 f : ({type_of_y:1506} -> {type_of_w:1505} -> {a:1507})) -> {auto 0 _ : Biinjective f} -> (0 _ : f x v = f y w) -> (x = y, v = w)