Fixpoint bad_subsequence (l : list A) : list A :=
match l with 
| nil => nil
| a :: l' => let bl := bad_subsequence l' in 
		match (greater_dec a bl) with 
		| left _ => bl
		| right _ => a :: bl
		end
end.

(* Specifications: *)
Lemma bad_subsequence_is_bad : forall l, bad (bad_subsequence l).