feat(library/logic/classes/decidable): generalize 'by_cases' theorem