Simple type systems, the corresponding algorithms and proof of their correctness in Agda