Module DoNotation.
Notation "'do!' X <- A ; B" :=
(bindGen A (fun X => B))
(at level 200, X ident, A at level 100, B at level 200).
End DoNotation.
Definition ltColor (c1 c2: color) : Prop :=
match c1, c2 with
| Red, Black => True
| _, _ => False
end.
Definition sigT_of_prod {A B : Type} (p : A * B) : {_ : A & B} :=
let (a, b) := p in existT (fun _ : A => B) a b.
Definition prod_of_sigT {A B : Type} (p : {_ : A & B}) : A * B :=
let (a, b) := p in (a, b).
Definition wf_hc (c1 c2 : (nat * color)) : Prop :=
lexprod nat (fun _ => color) lt (fun _ => ltColor) (sigT_of_prod c1) (sigT_of_prod c2).

Lemma well_founded_hc : well_founded wf_hc.