intros x work ds ni ai.
unfold nweight_Sequent in |- *.
simpl in |- *.
fold nimp2form in |- *.
generalize (nweight_ai ai); clear ai; intro ai.
generalize (nweight_ds ds); clear ds; intro ds.
generalize (nweight_work work); clear work; intro W.
generalize (nweight_ni ni); clear ni; intros ni.
change
(nweight (nimp2form x) + W + (ds + (ni + ai)) =
W + (ds + (nweight (nimp2form x) + ni + ai))) in |- *.
generalize (nweight (nimp2form x)); clear x; intro x.
rewrite (plus_comm x W).
rewrite (plus_assoc_reverse W x (ds + (ni + ai))).
apply plus_reg.
rewrite (plus_assoc x ds (ni + ai)).
rewrite (plus_comm x ds).
rewrite (plus_assoc_reverse ds x (ni + ai)).
apply plus_reg.
apply plus_assoc.
Qed.

(* Specifications: *)
Lemma nweight_shift_work_ds :
forall (i j : Int) (work : nf_list) (ds : disjs) (ni : nested_imps)
(ai : atomic_imps),
nweight_Sequent (NDisj i j :: work) ds ni ai =
nweight_Sequent work ((i, j) :: ds) ni ai.