(* Before loading Program, check non-anomaly on missing library Program *)
Fail Program Definition f n (e:n=n): {n|n=0} := match n,e with 0, refl => 0 | _, _ => 0 end.
(* Then we test Program properly speaking *)
Set Implicit Arguments.
(* Set Printing All. *)
Print sigT_rect.
Obligation Tactic := program_simplify ; auto with *.
About MR.
Program Fixpoint merge (n m : nat) {measure (n + m) lt} : nat :=
match n with
| 0 => 0
| S n' => merge n' m
end.
Print merge.
Print Z.lt.
Print Zwf.
Local Open Scope Z_scope.
Program Fixpoint Zwfrec (n m : Z) {measure (n + m) (Zwf 0)} : Z :=
match n ?= m with
| Lt => Zwfrec n (Z.pred m)
| _ => 0
end.
Next Obligation.
red. Admitted.
Close Scope Z_scope.
Program Fixpoint merge_wf (n m : nat) {wf lt m} : nat :=
match n with
| 0 => 0
| S n' => merge n' m
end.
Print merge_wf.
Program Fixpoint merge_one (n : nat) {measure n} : nat :=
match n with
| 0 => 0
| S n' => merge_one n'
end.
Print Hint well_founded.
Print merge_one. Eval cbv delta [merge_one] beta zeta in merge_one.

Lemma merge_unfold n m : merge n m =
match n with
| 0 => 0
| S n' => merge n' m
end.