(*FreshS/T: fresh blocks in src/tgt language*)
Definition sm_add_intern (mu: SM_Injection) j FreshS FreshT : SM_Injection :=
  Build_SM_Injection (fun b => locBlocksSrc mu b || FreshS b)
                     (fun b => locBlocksTgt mu b || FreshT b)
                     (pubBlocksSrc mu) (pubBlocksTgt mu)
                     (join (local_of mu) (fun b => match extern_of mu b with
                                             None => j b | Some _ => None end))
                     (extBlocksSrc mu) (extBlocksTgt mu)
                     (frgnBlocksSrc mu) (frgnBlocksTgt mu) (extern_of mu).

Lemma sm_add_intern_wd: forall mu j FreshS FreshT (WD: SM_wd mu) (HFreshS: forall b, FreshS b =true -> DomSrc mu b = false) (HFreshT: forall b, FreshT b =true -> DomTgt mu b = false) (JDomTgt: forall b1 b2 d, j b1 = Some (b2,d) -> as_inj mu b1 = Some(b2,d) \/ (FreshS b1 = true /\ FreshT b2 = true)), SM_wd (sm_add_intern mu j FreshS FreshT).