src/HOLCF/IOA/NTP/Impl.ML
changeset 5068 fb28eaa07e01
parent 4833 2e53109d4bc8
child 5192 704dd3a6d47d
equal deleted inserted replaced
5067:62b6288e6005 5068:fb28eaa07e01
    26 Addsimps [ioa_triple_proj, starts_of_par, trans_of_par4,
    26 Addsimps [ioa_triple_proj, starts_of_par, trans_of_par4,
    27           in_sender_asig, in_receiver_asig, in_srch_asig,
    27           in_sender_asig, in_receiver_asig, in_srch_asig,
    28           in_rsch_asig];
    28           in_rsch_asig];
    29 Addcongs [let_weak_cong];
    29 Addcongs [let_weak_cong];
    30 
    30 
    31 goal Impl.thy
    31 Goal
    32   "fst(x) = sen(x)            & \
    32   "fst(x) = sen(x)            & \
    33 \  fst(snd(x)) = rec(x)       & \
    33 \  fst(snd(x)) = rec(x)       & \
    34 \  fst(snd(snd(x))) = srch(x) & \
    34 \  fst(snd(snd(x))) = srch(x) & \
    35 \  snd(snd(snd(x))) = rsch(x)";
    35 \  snd(snd(snd(x))) = rsch(x)";
    36 by (simp_tac (simpset() addsimps
    36 by (simp_tac (simpset() addsimps
    37              [sen_def,rec_def,srch_def,rsch_def]) 1);
    37              [sen_def,rec_def,srch_def,rsch_def]) 1);
    38 Addsimps [result()];
    38 Addsimps [result()];
    39 
    39 
    40 goal Impl.thy "a:actions(sender_asig)   \
    40 Goal "a:actions(sender_asig)   \
    41 \            | a:actions(receiver_asig) \
    41 \            | a:actions(receiver_asig) \
    42 \            | a:actions(srch_asig)     \
    42 \            | a:actions(srch_asig)     \
    43 \            | a:actions(rsch_asig)";
    43 \            | a:actions(rsch_asig)";
    44   by (Action.action.induct_tac "a" 1);
    44   by (Action.action.induct_tac "a" 1);
    45   by (ALLGOALS (Simp_tac));
    45   by (ALLGOALS (Simp_tac));
    65 
    65 
    66 
    66 
    67 
    67 
    68 (* INVARIANT 1 *)
    68 (* INVARIANT 1 *)
    69 
    69 
    70 goalw Impl.thy impl_ioas "invariant impl_ioa inv1";
    70 Goalw impl_ioas "invariant impl_ioa inv1";
    71 by (rtac invariantI 1);
    71 by (rtac invariantI 1);
    72 by (asm_full_simp_tac (simpset()
    72 by (asm_full_simp_tac (simpset()
    73    addsimps [inv1_def, hdr_sum_def, Sender.srcvd_def,
    73    addsimps [inv1_def, hdr_sum_def, Sender.srcvd_def,
    74              Sender.ssent_def, Receiver.rsent_def,Receiver.rrcvd_def]) 1);
    74              Sender.ssent_def, Receiver.rsent_def,Receiver.rrcvd_def]) 1);
    75 
    75 
   148 
   148 
   149 
   149 
   150 
   150 
   151 (* INVARIANT 2 *)
   151 (* INVARIANT 2 *)
   152 
   152 
   153   goal Impl.thy "invariant impl_ioa inv2";
   153 Goal "invariant impl_ioa inv2";
   154 
   154 
   155   by (rtac invariantI1 1); 
   155   by (rtac invariantI1 1); 
   156   (* Base case *)
   156   (* Base case *)
   157   by (asm_full_simp_tac (simpset() addsimps (inv2_def ::
   157   by (asm_full_simp_tac (simpset() addsimps (inv2_def ::
   158                           (receiver_projections 
   158                           (receiver_projections 
   210 qed "inv2";
   210 qed "inv2";
   211 
   211 
   212 
   212 
   213 (* INVARIANT 3 *)
   213 (* INVARIANT 3 *)
   214 
   214 
   215 goal Impl.thy "invariant impl_ioa inv3";
   215 Goal "invariant impl_ioa inv3";
   216 
   216 
   217   by (rtac invariantI 1); 
   217   by (rtac invariantI 1); 
   218   (* Base case *)
   218   (* Base case *)
   219   by (asm_full_simp_tac (simpset() addsimps 
   219   by (asm_full_simp_tac (simpset() addsimps 
   220                     (Impl.inv3_def :: (receiver_projections 
   220                     (Impl.inv3_def :: (receiver_projections 
   276 qed "inv3";
   276 qed "inv3";
   277 
   277 
   278 
   278 
   279 (* INVARIANT 4 *)
   279 (* INVARIANT 4 *)
   280 
   280 
   281 goal Impl.thy "invariant impl_ioa inv4";
   281 Goal "invariant impl_ioa inv4";
   282 
   282 
   283   by (rtac invariantI 1); 
   283   by (rtac invariantI 1); 
   284   (* Base case *)
   284   (* Base case *)
   285   by (asm_full_simp_tac (simpset() addsimps 
   285   by (asm_full_simp_tac (simpset() addsimps 
   286                     (Impl.inv4_def :: (receiver_projections 
   286                     (Impl.inv4_def :: (receiver_projections