section ‹Formalized Proof \label{sec:proof}› theory SortKeys imports Data "HOL-Library.List_Lexorder" "HOL-Library.Product_Lexorder" begin datatype sort_dir = Left | Right derive linorder sort_dir lemma sort_dir_less_def [simp]: "(x < y) = (x = Left ∧ y = Right)" by (cases x, case_tac [!] y, simp_all add:less_sort_dir_def)