End DomeqO.
Example ex0 (x y z : nat) (v1 v2 : nat) h:
dom_eq (Unit \+ y \\-> v1 \+ h \+ x \\-> v1) (x \\-> v2 \+ Unit).
Canonical start j k ts1 ts2 f2 := RForm (@start_pf j k ts1 ts2 f2).
End DomeqX.
Module Exports.
Canonical equate.
Canonical start.
Section Exports.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (j : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
(* the main lemma; notice how residuals rs1, rs2 are passed to g to compute *)

(* Specifications: *)
Lemma domeqX m j k rs1 rs2 ts1 (f1 : form (empx U) j ts1)
(g : rform j k ts1 m (rs1, rs2)) :
dom_eq (pprint k (rev rs1)) (pprint k rs2) ->
dom_eq (untag f1) (unpack (pivot g)).