(*DOM/RNG: all blocks mentioned by a SM_Injection. Used for
  stating match_validblocks etc*)
Definition DomSrc (mu: SM_Injection) (b1: block): bool :=
     locBlocksSrc mu b1 || extBlocksSrc mu b1.Definition DOM (mu: SM_Injection) (b1: block): Prop := DomSrc mu b1 = true.Definition DomTgt (mu: SM_Injection) (b2: block): bool :=
     locBlocksTgt mu b2 || extBlocksTgt mu b2.Definition RNG (mu: SM_Injection) (b2:block): Prop := DomTgt mu b2 = true.(*we enforce
  pub_of mu = pub_of mu', via
  pubBlocksSrc/Tgt mu = pubBlocksSrc/Tgt mu':
  it suffices to reclassify leakage at at/afterExternal.
  This enables the proof of
  effect_corediagram_trans.diagram_injinj etc*)
Definition intern_incr (mu mu': SM_Injection): Prop :=
   inject_incr (local_of mu) (local_of mu') /\
   (extern_of mu = extern_of mu') /\
   (forall b, locBlocksSrc mu b = true -> locBlocksSrc mu' b = true) /\
   (forall b, locBlocksTgt mu b = true -> locBlocksTgt mu' b = true) /\
   (pubBlocksSrc mu = pubBlocksSrc mu') /\
   (pubBlocksTgt mu = pubBlocksTgt mu') /\
   (frgnBlocksSrc mu = frgnBlocksSrc mu') /\
   (frgnBlocksTgt mu = frgnBlocksTgt mu') /\
   (extBlocksSrc mu = extBlocksSrc mu') /\
   (extBlocksTgt mu = extBlocksTgt mu').

(* Specifications: *)
Lemma intern_incr_locBlocksSrc mu mu': intern_incr mu mu' -> forall b, locBlocksSrc mu b = true -> locBlocksSrc mu' b = true.
Lemma intern_incr_locBlocksTgt mu mu': intern_incr mu mu' -> forall b, locBlocksTgt mu b = true -> locBlocksTgt mu' b = true.
Lemma intern_incr_frgnBlocksSrc mu mu': intern_incr mu mu' -> frgnBlocksSrc mu = frgnBlocksSrc mu'.
Lemma intern_incr_frgnBlocksTgt mu mu': intern_incr mu mu' -> frgnBlocksTgt mu = frgnBlocksTgt mu'.
Lemma intern_incr_extBlocksSrc mu mu': intern_incr mu mu' -> extBlocksSrc mu = extBlocksSrc mu'.
Lemma intern_incr_extBlocksTgt mu mu': intern_incr mu mu' -> extBlocksTgt mu = extBlocksTgt mu'.
Lemma intern_incr_DomSrc: forall mu mu' (Inc: intern_incr mu mu') b, DomSrc mu b = true -> DomSrc mu' b = true.
Lemma intern_incr_DOM: forall mu mu' (Inc: intern_incr mu mu') b, DOM mu b -> DOM mu' b.
Lemma intern_incr_DomTgt: forall mu mu' (Inc: intern_incr mu mu') b, DomTgt mu b = true -> DomTgt mu' b = true.
Lemma intern_incr_RNG: forall mu mu' (Inc: intern_incr mu mu') b, RNG mu b -> RNG mu' b.
Lemma intern_incr_DomSrc_inv: forall mu mu' (INC: intern_incr mu mu') b, DomSrc mu' b = false -> DomSrc mu b = false.
Lemma intern_incr_DomTgt_inv: forall mu mu' (INC: intern_incr mu mu') b, DomTgt mu' b = false -> DomTgt mu b = false.
Lemma intern_incr_locBlocksSrc_inv: forall mu mu' (INC: intern_incr mu mu') b, locBlocksSrc mu' b = false -> locBlocksSrc mu b = false.
Lemma intern_incr_locBlocksTgt_inv: forall mu mu' (INC: intern_incr mu mu') b, locBlocksTgt mu' b = false -> locBlocksTgt mu b = false.
Lemma intern_incr_priv: forall mu mu' (INC: intern_incr mu mu'), inject_incr (priv_of mu) (priv_of mu').
Lemma intern_incr_pub: forall mu mu' (INC: intern_incr mu mu') (WD: SM_wd mu), pub_of mu = pub_of mu'.
Lemma intern_incr_foreign: forall mu mu' (INC: intern_incr mu mu'), foreign_of mu = foreign_of mu'.
Lemma intern_incr_unknown: forall mu mu' (INC: intern_incr mu mu') (WD': SM_wd mu'), unknown_of mu = unknown_of mu'.
Lemma intern_incr_DomSrc: forall mu mu' (Inc: intern_incr mu mu') b, DomSrc mu b = true -> DomSrc mu' b = true.
Lemma intern_incr_DOM: forall mu mu' (Inc: intern_incr mu mu') b, DOM mu b -> DOM mu' b.
Lemma intern_incr_DomTgt: forall mu mu' (Inc: intern_incr mu mu') b, DomTgt mu b = true -> DomTgt mu' b = true.
Lemma intern_incr_RNG: forall mu mu' (Inc: intern_incr mu mu') b, RNG mu b -> RNG mu' b.
Lemma intern_incr_DomSrc_inv: forall mu mu' (INC: intern_incr mu mu') b, DomSrc mu' b = false -> DomSrc mu b = false.
Lemma intern_incr_DomTgt_inv: forall mu mu' (INC: intern_incr mu mu') b, DomTgt mu' b = false -> DomTgt mu b = false.
Lemma intern_incr_locBlocksSrc_inv: forall mu mu' (INC: intern_incr mu mu') b, locBlocksSrc mu' b = false -> locBlocksSrc mu b = false.
Lemma intern_incr_locBlocksTgt_inv: forall mu mu' (INC: intern_incr mu mu') b, locBlocksTgt mu' b = false -> locBlocksTgt mu b = false.
Lemma intern_incr_priv: forall mu mu' (INC: intern_incr mu mu'), inject_incr (priv_of mu) (priv_of mu').
Lemma intern_incr_pub: forall mu mu' (INC: intern_incr mu mu') (WD: SM_wd mu), pub_of mu = pub_of mu'.
Lemma intern_incr_foreign: forall mu mu' (INC: intern_incr mu mu'), foreign_of mu = foreign_of mu'.
Lemma intern_incr_unknown: forall mu mu' (INC: intern_incr mu mu') (WD': SM_wd mu'), unknown_of mu = unknown_of mu'.