[misc] Add equivalence class implementation.