- Timestamp:
- Jun 7, 2011, 4:53:53 PM (10 years ago)
- Location:
- src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ASM/BitVectorZ.ma
r700 r891 84 84 | #q #H change with ((succ one)+ (p0 p') ≤ (p0 q)) 85 85 >p0_times2 >(p0_times2 q) 86 change with (succ one * succ p' ≤ succ one * q) 86 87 @monotonic_le_times_r @IH 87 88 @le_S_S_to_le @H -
src/Clight/Cexec.ma
r880 r891 344 344 ] qed. 345 345 346 definition is_Sskip : ∀s:statement. (s = Sskip) +(s ≠ Sskip) ≝347 λs.match s return λs'.(s' = Sskip) +(s' ≠ Sskip) with346 definition is_Sskip : ∀s:statement. (s = Sskip) ⊎ (s ≠ Sskip) ≝ 347 λs.match s return λs'.(s' = Sskip) ⊎ (s' ≠ Sskip) with 348 348 [ Sskip ⇒ inl ?? (refl ??) 349 349 | _ ⇒ inr ?? (nmk ? (λH.?)) -
src/Clight/CexecComplete.ma
r879 r891 167 167 | #e #ty #l #off #v #tr #H1 #H2 @(lvalue_expr … H1) 168 168 [ #id | #e' | #e' #id ] #H3 169 whd in ⊢ (??%?); 169 whd in ⊢ (??%?) 170 [ change in H3:(??%?) with (exec_lvalue' ge env m (Evar id) ty) 171 | change in H3:(??%?) with (exec_lvalue' ge env m (Ederef e') ty) 172 | change in H3:(??%?) with (exec_lvalue' ge env m (Efield e' id) ty) 173 ] 170 174 >(yields_eq ??? H3) 171 whd in ⊢ (??%?); >H2 @refl 175 whd in ⊢ (??%?) change in H2:(??%?) with (load_value_of_type' ty m 〈l,off〉) 176 >H2 @refl 172 177 | #e #ty #r #l #pc #off #tr #H1 #H2 whd in ⊢ (??%?); 173 178 >(yields_eq ??? H2) whd in ⊢ (??%?) … … 352 357 #ge #s #tr #s' #H elim H; 353 358 [ #f #e #e1 #k #e2 #m #loc #ofs #v #m' #tr1 #tr2 #H1 #H2 #H3 whd in ⊢ (??%?); 354 >(yields_eq ??? (lvalue_complete … H1)) whd in ⊢ (??%?); 355 >(yields_eq ??? (expr_complete … H2)) whd in ⊢ (??%?); 359 >(yields_eq ??? (lvalue_complete … H1)) whd in ⊢ (??%?) 360 >(yields_eq ??? (expr_complete … H2)) whd in ⊢ (??%?) 361 change in H3:(??%?) with (store_value_of_type' (typeof e) m 〈loc,ofs〉 v) 356 362 >H3 @refl 357 363 | #f #e #eargs #k #ef #m #vf #vargs #f' #tr1 #tr2 #H1 #H2 #H3 #H4 whd in ⊢ (??%?); … … 443 449 @refl 444 450 | #v #f #env #k #m @refl 445 | #v #f #env #k #m1 #m2 #loc #ofs #ty #H whd in ⊢ (??%?); 446 >H @refl 451 | #v #f #env #k #m1 #m2 #loc #ofs #ty 452 change in ⊢ (??%? → ?) with (store_value_of_type' ty m1 〈loc,ofs〉 v) 453 #H whd in ⊢ (??%?) >H @refl 447 454 | #f #l #s #k #env #m @refl 448 455 ] qed. -
src/Clight/CexecEquiv.ma
r798 r891 52 52 (∀r. final_state s r → P (Some ? r)) → 53 53 ((¬∃r.final_state s r) → P (None ?)) → 54 P (is_final ?? clight_execs).55 #s #P #F #NF lapply (refl ? (is_final ?? clight_execs))56 cases (is_final ?? clight_execs) in ⊢ (???% → %)57 [ #E @NF % * #r #H > (is_final_complete … H) in E #H destruct54 P (is_final s). 55 #s #P #F #NF lapply (refl ? (is_final s)) 56 cases (is_final s) in ⊢ (???% → %) 57 [ #E @NF % * #r #H whd in E:(??%?) > (is_final_complete … H) in E #H destruct 58 58 | #r #E @F @is_final_sound @E 59 59 ] qed. 60 61 lemma is_final_elim': ∀s.∀P:option int → Type[0]. 62 (∀r. final_state s r → P (Some ? r)) → 63 ((¬∃r.final_state s r) → P (None ?)) → 64 P (is_final io_out io_in clight_fullexec s). 65 @is_final_elim qed. 60 66 61 67 lemma exec_e_step: ∀ge,x,tr,s,e. … … 66 72 [ #o #k #EXEC whd in EXEC:(??%?); destruct 67 73 | #y cases y #tr' #s' whd in ⊢ (??%? → ?) 68 @is_final_elim 74 @is_final_elim' 69 75 [ #r #FINAL | #FINAL ] 70 76 #EXEC whd in EXEC:(??%?); destruct @refl … … 79 85 [ #o #k #EXEC whd in EXEC:(??%?); destruct 80 86 | #y cases y; #tr' #s' whd in ⊢ (??%? → ?); 81 @is_final_elim 87 @is_final_elim' 82 88 [ #r ] #FINAL #EXEC whd in EXEC:(??%?); 83 89 destruct @refl … … 92 98 [ #o #k #EXEC whd in EXEC:(??%?); destruct 93 99 | #y cases y; #tr' #s' whd in ⊢ (??%? → ?) 94 @is_final_elim [ #r ] #F #EXEC whd in EXEC:(??%?); destruct @F100 @is_final_elim' [ #r ] #F #EXEC whd in EXEC:(??%?); destruct @F 95 101 | #msg #EXEC whd in EXEC:(??%?); destruct 96 102 ] qed. … … 143 149 ] 144 150 | #x cases x; #tr' #s' >(exec_inf_aux_unfold …) 145 whd in ⊢ (??%? → ?); @is_final_elim 151 whd in ⊢ (??%? → ?); @is_final_elim' 146 152 [ #r ] #F #E whd in E:(??%?); destruct 147 153 | #msg >(exec_inf_aux_unfold …) … … 170 176 [ #o2 #k2 #E whd in E:(??%?); destruct (E) 171 177 | #x cases x; #tr2 #s2 whd in ⊢ (??%? → ?); 172 @is_final_elim 178 lapply (is_final_elim s2) #IFE whd in IFE:(∀_. ? → ? → ?%) 179 @IFE 173 180 [ #r' #FINAL #E whd in E:(??%?); 174 181 destruct (E); … … 184 191 ] 185 192 | #x cases x; #tr #s whd in ⊢ (??%? → ?); 186 @is_final_elim [ #r ] #F #E whd in E:(??%?); destruct (E)193 @is_final_elim' [ #r ] #F #E whd in E:(??%?); destruct (E) 187 194 | #msg #E whd in E:(??%?); destruct (E) 188 195 ] … … 281 288 [ #o #k #EXEC' whd in EXEC':(??%?); destruct (EXEC'); 282 289 | #x cases x; #tr'' #s' whd in ⊢ (??%? → ?); 283 @is_final_elim [ #r'' #FINAL | #F ]290 @is_final_elim' [ #r'' #FINAL | #F ] 284 291 #EXEC' whd in EXEC':(??%?); destruct (EXEC'); 285 292 | #msg #EXEC' whd in EXEC':(??%?); destruct (EXEC'); … … 299 306 >(exec_inf_aux_unfold …) cases x; 300 307 [ #o #k #EXEC whd in EXEC:(??%?); destruct; 301 | #z cases z; #tr' #s' whd in ⊢ (??%? → ?); @is_final_elim 308 | #z cases z; #tr' #s' whd in ⊢ (??%? → ?); @is_final_elim' 302 309 [ #r' #FINAL cases FINAL; #r'' #m' #EXEC whd in EXEC:(??%?); 303 310 destruct (EXEC); @refl … … 365 372 cases (exec_step ge s); 366 373 [ #o #k #msg' #EXEC whd in EXEC:(??%?); destruct 367 | #x cases x; #tr #s' #msg' whd in ⊢ (??%? → ?) @is_final_elim 374 | #x cases x; #tr #s' #msg' whd in ⊢ (??%? → ?) @is_final_elim' 368 375 [ #r ] #F #EXEC whd in EXEC:(??%?); destruct 369 376 | #msg1 #msg2 #EXEC #E whd in EXEC:(??%?); destruct @refl … … 381 388 cases (exec_step ge s); 382 389 [ #o #k #EXEC whd in EXEC:(??%?); destruct 383 | #x cases x; #tr1 #s1 whd in ⊢ (??%? → ?) @is_final_elim 390 | #x cases x; #tr1 #s1 whd in ⊢ (??%? → ?) @is_final_elim' 384 391 [ #r ] #F #E whd in E:(??%?); destruct @F 385 392 | #msg #E whd in E:(??%?); destruct … … 409 416 [ #o2 #k2 #EXECK whd in EXECK:(??%?); destruct 410 417 | #x cases x; #tr2 #s2 whd in ⊢ (??%? → ?); 411 @is_final_elim [ #r ] #F #EXECK 418 lapply (is_final_elim s2) #IFE whd in IFE:(∀_. ? → ? → ?%) 419 @IFE [ #r ] #F #EXECK 412 420 whd in EXECK:(??%?); destruct; 413 421 @(absurd ?? F) … … 419 427 ] 420 428 | #x cases x; #tr1 #s1 whd in ⊢ (??%? → ?); 421 @is_final_elim [ #r ] #F #E whd in E:(??%?); destruct;429 @is_final_elim' [ #r ] #F #E whd in E:(??%?); destruct; 422 430 | #msg #E whd in E:(??%?); destruct 423 431 ] … … 707 715 ] 708 716 | #x cases x; #tr' #s'' #H whd in ⊢ (?%? → ?) 709 @is_final_elim [ #r ] #F #E whd in E:(?%?);717 @is_final_elim' [ #r ] #F #E whd in E:(?%?); 710 718 inversion E; 711 719 [ 1,5: #tr1 #e1 #m1 #E1 #E2 destruct … … 898 906 #F #S whd in S:(?%?); cases (se_inv … S); 899 907 | #x cases x; #tr' #s' whd in ⊢ (?%? → ?) 900 @is_final_elim [ #r ] #F #S whd in S:(?%?);908 @is_final_elim' [ #r ] #F #S whd in S:(?%?); 901 909 cases (se_inv … S); 902 910 | #msg #S cases (se_inv … S); … … 915 923 #F #S whd in S:(?%?); cases (se_inv … S); 916 924 | #x cases x; #tr' #s' whd in ⊢ (?%? → ?) 917 @is_final_elim [ #r ] #F #S whd in S:(?%?);925 @is_final_elim' [ #r ] #F #S whd in S:(?%?); 918 926 cases (se_inv … S); 919 927 | #msg #S cases (se_inv … S); … … 995 1003 ∃e'.e = e_step ??? E0 s e'. 996 1004 #ge #s #e >(exec_inf_aux_unfold …) 997 whd in ⊢ (??%? → ?) @is_final_elim 1005 whd in ⊢ (??%? → ?) @is_final_elim' 998 1006 [ #r #FINAL #EXEC #NOTFINAL 999 1007 @False_ind @(absurd ?? NOTFINAL) … … 1009 1017 #classic #constructive_indefinite_description #p #e 1010 1018 whd in ⊢ (?%? → ??(λ_.?(?%?)%)); 1011 lapply (make_initial_state_sound p); 1012 lapply (the_initial_state p); 1013 cases (make_initial_state p); 1019 lapply (make_initial_state_sound p) 1020 lapply (the_initial_state p) 1021 whd in ⊢ (? → ? → ?(match % with [_ ⇒ ? | _ ⇒ ?])? → ?) 1022 cases (make_initial_state p) 1014 1023 [ #gs cases gs; #ge #s #INITIAL' #INITIAL whd in INITIAL ⊢ (?%? → ?); 1015 1024 cases INITIAL; #Ege #INITIAL'' 1016 > (exec_inf_aux_unfold …)1025 >exec_inf_aux_unfold 1017 1026 whd in ⊢ (?%? → ?) 1018 @is_final_elim 1027 @is_final_elim' 1019 1028 [ #r #F @False_ind 1020 1029 @(absurd ?? (initial_state_not_final … INITIAL'')) … … 1025 1034 lapply (behavior_of_execution ?? 1026 1035 (execution_characterisation_complete classic constructive_indefinite_description ge s ? EXEC')); 1027 *; #b #MATCHES %{b} % //;1036 *; #b #MATCHES %{b} % [ @MATCHES ] 1028 1037 #ge' >Ege #Ege' >(?:ge' = ge) [ 2: destruct (Ege') skip (INITIAL Ege EXEC0 EXEC'); // ] 1029 1038 inversion MATCHES; -
src/Clight/CexecSound.ma
r882 r891 3 3 (*include "Plogic/connectives.ma".*) 4 4 5 (* Is rather careful about using destruct because it currently uses excessive 6 normalization. *) 5 7 lemma exec_bool_of_val_sound: ∀v,ty,r. 6 8 exec_bool_of_val v ty = OK ? r → bool_of_val v ty (of_bool r). 7 9 #v #ty #r 8 10 cases v; [ | #i | #f | #r1 | #r' #b #pc #of ] 9 cases ty; [ 2,11,20,29,38: #sz #sg | 3,12,21,30,39: #sz | 4,13,22,31,40: #r #ty | 5,14,23,32,41: #r #ty #n | 6,15,24,33,42: #args #rty | 7,8,16,17,25,26,34,35,43,44: #id #fs | 9,18,27,36,45: #r #id ] 10 #H whd in H:(??%?); destruct; 11 [ lapply (eq_spec i zero); elim (eq i zero); 12 [ #e >e @bool_of_val_false //; 13 | #ne (* XXX hack due to destruct's normalize *) lapply (bool_of_val_true (Vint i) (Tint sz sg)) normalize #H @H /2/; 14 ] 15 | elim (eq_dec f Fzero); 16 [ #e >e >(Feq_zero_true …) @bool_of_val_false //; 17 | #ne >(Feq_zero_false …) //; (* XXX hack due to destruct's normalize *) lapply (bool_of_val_true (Vfloat f) (Tfloat sz)) normalize #H @H /2/; 18 ] 19 | @bool_of_val_false // 20 | (* XXX hack due to destruct's normalize *) lapply (bool_of_val_true (Vptr r' b pc of) (Tpointer r ty)) normalize #H @H // 11 cases ty; [ 2,11,20,29,38: #sz #sg | 3,12,21,30,39: #sz | 4,13,22,31,40: #rg #ty | 5,14,23,32,41: #r #ty #n | 6,15,24,33,42: #args #rty | 7,8,16,17,25,26,34,35,43,44: #id #fs | 9,18,27,36,45: #r #id ] 12 #H whd in H:(??%?); 13 [ 2: lapply (eq_spec i zero) cases (eq i zero) in H ⊢ % 14 [ #E1 #E2 destruct @bool_of_val_false @is_false_int 15 | #E1 #E2 >(?:r=¬false) [ @bool_of_val_true @is_true_int_int @E2 | destruct @refl ] 16 ] 17 | 8: cases (eq_dec f Fzero) 18 [ #e >e in H ⊢ % >Feq_zero_true #E destruct @bool_of_val_false @is_false_float 19 | #ne >Feq_zero_false in H // #E >(?:r=¬false) [ @bool_of_val_true @is_true_float @ne | destruct @refl ] 20 ] 21 | 14: >(?:r=false) [ @bool_of_val_false @is_false_pointer | destruct @refl ] 22 | 15: >(?:r=true) [ @bool_of_val_true @is_true_pointer_pointer | destruct @refl ] 23 | *: destruct 21 24 ] qed. 22 25 … … 197 200 >Hv in He #He 198 201 @eval_Ederef [ 3: @He | *: skip ] 199 | #ty #e'' #ty'' #He'' @bind2_OK #x cases x#loc #ofs #tr #H200 cases ty // * #pty202 | #ty #e'' #ty'' #He'' @bind2_OK * #loc #ofs #tr #H 203 cases ty // * #pty 201 204 cases loc in H ⊢ % * #loc' #H 202 205 whd try @I 203 @eval_Eaddrof >H in He'' #He'' @He''206 @eval_Eaddrof whd in H:(??%?) >H in He'' #He'' @He'' 204 207 | #ty #op #e1 #He1 @bind2_OK #v1 #tr #Hv1 205 208 @opt_bind_OK #v #ev … … 221 224 @bind_OK #b 222 225 cases b; #eb lapply (exec_bool_of_val_sound … eb); #Hb 223 @bind2_OK #v #tr #Hv 226 @bind2_OK #v #tr #Hv whd in Hv:(??%?) 224 227 [ >Hv in He2 #He2 whd in He2 Hv:(??%?) ⊢%; 225 228 @(eval_Econdition_true … He1 ? He2) @(bool_of ??? Hb) … … 248 251 | #ty #e' #ty' #i cases ty'; //; 249 252 [ #id #fs #He' @bind2_OK #x cases x; #sp #l #ofs #H 250 @bind_OK #delta #Hdelta >H in He' #He'253 @bind_OK #delta #Hdelta whd in H:(??%?) >H in He' #He' 251 254 @(eval_Efield_struct … He' (refl ??) Hdelta) 252 | #id #fs #He' @bind2_OK #x cases x; #sp #l #ofs #H 255 | #id #fs #He' @bind2_OK #x cases x; #sp #l #ofs #H whd in H:(??%?) 253 256 >H in He' #He' 254 257 @(eval_Efield_union … He' (refl ??)) … … 300 303 cases (exec_lvalue ge en m e) in ⊢ (???% → %); 301 304 [ #x cases x #y cases y #loc #off #tr #H whd cases loc in H ⊢ % #locr #loci #H 302 @(addrof_eval_lvalue … locr … (Tpointer locr Tvoid)) [ /2/]305 @(addrof_eval_lvalue … locr … (Tpointer locr Tvoid)) [ @same_compat ] 303 306 lapply (addrof_exec_lvalue … H) #H' 304 307 lapply (exec_expr_sound ge en m (Expr (Eaddrof e) (Tpointer locr Tvoid))) -
src/Clight/TypeComparison.ma
r882 r891 16 16 17 17 let rec type_eq_dec (t1,t2:type) : Sum (t1 = t2) (t1 ≠ t2) ≝ 18 match t1 return λt'. (t' = t2) +(t' ≠ t2) with19 [ Tvoid ⇒ match t2 return λt'. (Tvoid = t') +(Tvoid ≠ t') with [ Tvoid ⇒ inl ?? (refl ??) | _ ⇒ inr ?? (nmk ? (λH.?)) ]20 | Tint sz sg ⇒ match t2 return λt'. (Tint ?? = t') +(Tint ?? ≠ t') with [ Tint sz' sg' ⇒18 match t1 return λt'. Sum (t' = t2) (t' ≠ t2) with 19 [ Tvoid ⇒ match t2 return λt'. Sum (Tvoid = t') (Tvoid ≠ t') with [ Tvoid ⇒ inl ?? (refl ??) | _ ⇒ inr ?? (nmk ? (λH.?)) ] 20 | Tint sz sg ⇒ match t2 return λt'. Sum (Tint ?? = t') (Tint ?? ≠ t') with [ Tint sz' sg' ⇒ 21 21 match sz_eq_dec sz sz' with [ inl e1 ⇒ 22 22 match sg_eq_dec sg sg' with [ inl e2 ⇒ inl ??? … … 24 24 | inr e ⇒ inr ?? (nmk ? (λH.match e with [ nmk e' ⇒ e' ? ])) ] 25 25 | _ ⇒ inr ?? (nmk ? (λH.?)) ] 26 | Tfloat f ⇒ match t2 return λt'. (Tfloat ? = t') +(Tfloat ? ≠ t') with [ Tfloat f' ⇒26 | Tfloat f ⇒ match t2 return λt'. Sum (Tfloat ? = t') (Tfloat ? ≠ t') with [ Tfloat f' ⇒ 27 27 match fs_eq_dec f f' with [ inl e1 ⇒ inl ??? 28 28 | inr e ⇒ inr ?? (nmk ? (λH.match e with [ nmk e' ⇒ e' ? ])) ] 29 29 | _ ⇒ inr ?? (nmk ? (λH.?)) ] 30 | Tpointer s t ⇒ match t2 return λt'. (Tpointer ?? = t') +(Tpointer ?? ≠ t') with [ Tpointer s' t' ⇒30 | Tpointer s t ⇒ match t2 return λt'. Sum (Tpointer ?? = t') (Tpointer ?? ≠ t') with [ Tpointer s' t' ⇒ 31 31 match eq_region_dec s s' with [ inl e1 ⇒ 32 32 match type_eq_dec t t' with [ inl e2 ⇒ inl ??? 33 33 | inr e2 ⇒ inr ?? (nmk ? (λH.match e2 with [ nmk e' ⇒ e' ? ])) ] 34 34 | inr e1 ⇒ inr ?? (nmk ? (λH.match e1 with [ nmk e' ⇒ e' ? ])) ] | _ ⇒ inr ?? (nmk ? (λH.?)) ] 35 | Tarray s t n ⇒ match t2 return λt'. (Tarray ??? = t') +(Tarray ??? ≠ t') with [ Tarray s' t' n' ⇒35 | Tarray s t n ⇒ match t2 return λt'. Sum (Tarray ??? = t') (Tarray ??? ≠ t') with [ Tarray s' t' n' ⇒ 36 36 match eq_region_dec s s' with [ inl e1 ⇒ 37 37 match type_eq_dec t t' with [ inl e2 ⇒ … … 41 41 | inr e ⇒ inr ?? (nmk ? (λH.match e with [ nmk e' ⇒ e' ? ])) ] 42 42 | _ ⇒ inr ?? (nmk ? (λH.?)) ] 43 | Tfunction tl t ⇒ match t2 return λt'. (Tfunction ?? = t') +(Tfunction ?? ≠ t') with [ Tfunction tl' t' ⇒43 | Tfunction tl t ⇒ match t2 return λt'. Sum (Tfunction ?? = t') (Tfunction ?? ≠ t') with [ Tfunction tl' t' ⇒ 44 44 match typelist_eq_dec tl tl' with [ inl e1 ⇒ 45 45 match type_eq_dec t t' with [ inl e2 ⇒ inl ??? … … 48 48 | _ ⇒ inr ?? (nmk ? (λH.?)) ] 49 49 | Tstruct i fl ⇒ 50 match t2 return λt'. (Tstruct ?? = t') +(Tstruct ?? ≠ t') with [ Tstruct i' fl' ⇒50 match t2 return λt'. Sum (Tstruct ?? = t') (Tstruct ?? ≠ t') with [ Tstruct i' fl' ⇒ 51 51 match ident_eq i i' with [ inl e1 ⇒ 52 52 match fieldlist_eq_dec fl fl' with [ inl e2 ⇒ inl ??? … … 55 55 | _ ⇒ inr ?? (nmk ? (λH.?)) ] 56 56 | Tunion i fl ⇒ 57 match t2 return λt'. (Tunion ?? = t') +(Tunion ?? ≠ t') with [ Tunion i' fl' ⇒57 match t2 return λt'. Sum (Tunion ?? = t') (Tunion ?? ≠ t') with [ Tunion i' fl' ⇒ 58 58 match ident_eq i i' with [ inl e1 ⇒ 59 59 match fieldlist_eq_dec fl fl' with [ inl e2 ⇒ inl ??? … … 61 61 | inr e ⇒ inr ?? (nmk ? (λH.match e with [ nmk e' ⇒ e' ? ])) ] 62 62 | _ ⇒ inr ?? (nmk ? (λH.?)) ] 63 | Tcomp_ptr r i ⇒ match t2 return λt'. (Tcomp_ptr ? ? = t') +(Tcomp_ptr ? ? ≠ t') with [ Tcomp_ptr r' i' ⇒63 | Tcomp_ptr r i ⇒ match t2 return λt'. Sum (Tcomp_ptr ? ? = t') (Tcomp_ptr ? ? ≠ t') with [ Tcomp_ptr r' i' ⇒ 64 64 match eq_region_dec r r' with [ inl e1 ⇒ 65 65 match ident_eq i i' with [ inl e2 ⇒ inl ??? … … 68 68 | _ ⇒ inr ?? (nmk ? (λH.?)) ] 69 69 ] 70 and typelist_eq_dec (tl1,tl2:typelist) : (tl1 = tl2) +(tl1 ≠ tl2) ≝71 match tl1 return λtl'. (tl' = tl2) +(tl' ≠ tl2) with72 [ Tnil ⇒ match tl2 return λtl'. (Tnil = tl') +(Tnil ≠ tl') with [ Tnil ⇒ inl ?? (refl ??) | _ ⇒ inr ?? (nmk ? (λH.?)) ]73 | Tcons t1 ts1 ⇒ match tl2 return λtl'. (Tcons ?? = tl') +(Tcons ?? ≠ tl') with [ Tnil ⇒ inr ?? (nmk ? (λH.?)) | Tcons t2 ts2 ⇒70 and typelist_eq_dec (tl1,tl2:typelist) : Sum (tl1 = tl2) (tl1 ≠ tl2) ≝ 71 match tl1 return λtl'. Sum (tl' = tl2) (tl' ≠ tl2) with 72 [ Tnil ⇒ match tl2 return λtl'. Sum (Tnil = tl') (Tnil ≠ tl') with [ Tnil ⇒ inl ?? (refl ??) | _ ⇒ inr ?? (nmk ? (λH.?)) ] 73 | Tcons t1 ts1 ⇒ match tl2 return λtl'. Sum (Tcons ?? = tl') (Tcons ?? ≠ tl') with [ Tnil ⇒ inr ?? (nmk ? (λH.?)) | Tcons t2 ts2 ⇒ 74 74 match type_eq_dec t1 t2 with [ inl e1 ⇒ 75 75 match typelist_eq_dec ts1 ts2 with [ inl e2 ⇒ inl ??? … … 77 77 | inr e ⇒ inr ?? (nmk ? (λH.match e with [ nmk e' ⇒ e' ? ])) ] ] 78 78 ] 79 and fieldlist_eq_dec (fl1,fl2:fieldlist) : (fl1 = fl2) +(fl1 ≠ fl2) ≝80 match fl1 return λfl'. (fl' = fl2) +(fl' ≠ fl2) with81 [ Fnil ⇒ match fl2 return λfl'. (Fnil = fl') +(Fnil ≠ fl') with [ Fnil ⇒ inl ?? (refl ??) | _ ⇒ inr ?? (nmk ? (λH.?)) ]82 | Fcons i1 t1 fs1 ⇒ match fl2 return λfl'. (Fcons ??? = fl') +(Fcons ??? ≠ fl') with [ Fnil ⇒ inr ?? (nmk ? (λH.?)) | Fcons i2 t2 fs2 ⇒79 and fieldlist_eq_dec (fl1,fl2:fieldlist) : Sum (fl1 = fl2) (fl1 ≠ fl2) ≝ 80 match fl1 return λfl'. Sum (fl' = fl2) (fl' ≠ fl2) with 81 [ Fnil ⇒ match fl2 return λfl'. Sum (Fnil = fl') (Fnil ≠ fl') with [ Fnil ⇒ inl ?? (refl ??) | _ ⇒ inr ?? (nmk ? (λH.?)) ] 82 | Fcons i1 t1 fs1 ⇒ match fl2 return λfl'. Sum (Fcons ??? = fl') (Fcons ??? ≠ fl') with [ Fnil ⇒ inr ?? (nmk ? (λH.?)) | Fcons i2 t2 fs2 ⇒ 83 83 match ident_eq i1 i2 with [ inl e1 ⇒ 84 84 match type_eq_dec t1 t2 with [ inl e2 ⇒ -
src/common/Mem.ma
r790 r891 66 66 ∀A: Type[0]. ∀x: block. ∀v: A. ∀f: block -> A. 67 67 update_block … x v f x = v. 68 #A * * #ix #v #f whd in ⊢ (??%?) ;69 > (eqZb_z_z …) //;68 #A * * #ix #v #f whd in ⊢ (??%?) 69 >eq_block_b_b // 70 70 qed. 71 71 -
src/common/Smallstep.ma
r700 r891 133 133 #tr #ge #s1 #t1 #s2 #t2 #s3 #t3 #Hstar #Hstep #e1 inversion Hstar; 134 134 [ #s2' #e2 #e3 #e4 destruct; @plus_one //; 135 | #s1' #t1' #s1'' #t1'' #s2' #t2' #H1 #H2 #e2 #foo #e3 #e4 #e5 destruct;136 > (Eapp_assoc …)@(plus_left … H1)135 | #s1' #t1' #s1'' #t1'' #s2' #t2' #H1 #H2 #e2 #foo #e3 #e4 #e5 136 >e1 >e4 >e2 >Eapp_assoc destruct @(plus_left … H1) 137 137 [ 2: @(star_right … H2 Hstep) //; 138 138 | skip; -
src/common/Values.ma
r797 r891 64 64 | @H2 % #E destruct elim H3 /2/ 65 65 ] qed. 66 67 lemma eq_block_b_b : ∀b. eq_block b b = true. 68 * * #z whd in ⊢ (??%?) >eqZb_z_z @refl 69 qed. 66 70 67 71 (* Characterise the memory regions which the pointer representations can … … 1225 1229 lemma sign_ext_lessdef: 1226 1230 ∀n,v1,v2. Val_lessdef v1 v2 → Val_lessdef (sign_ext n v1) (sign_ext n v2). 1227 #n #v1 #v2 #H inversion H ;//;#v #e1 #e2 <e1 in H >e2 //;1231 #n #v1 #v2 #H inversion H // #v #e1 #e2 whd in ⊢ (?%?) // 1228 1232 qed. 1229 1233 (* -
src/utilities/binary/Z.ma
r697 r891 333 333 |#n cases y; 334 334 [@nmk #H elim (not_eq_OZ_pos n);#H2 /2/; 335 |#m @eqb_elim335 |#m normalize @eqb_elim 336 336 [// 337 337 | * #H % #H' @H @(match H' return λx.λ_.n=match x with [pos m ⇒ m | neg m ⇒ m | OZ ⇒ one ] with [refl ⇒ ?]) // … … 341 341 [@nmk #H elim (not_eq_OZ_neg n);#H /2/; 342 342 |#m @nmk #H destruct 343 |#m @eqb_elim343 |#m normalize @eqb_elim 344 344 [// 345 345 | * #H % #H' @H @(match H' return λx.λ_.n=match x with [pos m ⇒ m | neg m ⇒ m | OZ ⇒ one ] with [refl ⇒ ?]) // … … 458 458 459 459 theorem sym_Zplus : ∀x,y:Z. x+y = y+x. 460 #x #y cases x ;461 [> (Zplus_z_OZ ?) (*XXX*)//460 #x #y cases x 461 [>Zplus_z_OZ // 462 462 |#p cases y 463 463 [// 464 | normalize;//465 |#q normalize;>(pos_compare_n_m_m_n ??) (*XXX*)464 |// 465 |#q whd in ⊢ (??%%) >pos_compare_n_m_m_n 466 466 cases (pos_compare q p);//] 467 467 |#p cases y 468 468 [//; 469 |#q normalize;>(pos_compare_n_m_m_n ??) (*XXX*)469 |#q whd in ⊢ (??%%) >pos_compare_n_m_m_n 470 470 cases (pos_compare q p);// 471 471 |normalize;//] … … 503 503 ∀n,m. (pos n)+(neg m) = (Zsucc (pos n))+(Zpred (neg m)). 504 504 #n #m 505 normalize; 505 whd in ⊢ (??%%) 506 506 <(pos_compare_S_S …) 507 >( partialminus_S_S …)508 >( partialminus_S_S …) //;507 >(minus_S_S …) 508 >(minus_S_S …) //; 509 509 qed. 510 510 … … 521 521 #n #m @(pos_cases … n) @(pos_cases … m) 522 522 [ //; 523 | #m' >(Zpred_pos_succ …) 524 >(?:pos (succ m') = Zsucc (pos m')) //; 525 | #m' normalize; >(pos_compare_S_one …) normalize; 526 >(partial_minus_S_one …) normalize; >(pos_nonzero …) 527 <(pred_succ_n …) //; 528 | #m' #n' normalize; <(pos_compare_S_S …) 529 >(partialminus_S_S …) 530 >(partialminus_S_S …) 531 >(pos_nonzero …) 532 >(pos_nonzero …) 533 <(pred_succ_n …) 534 <(pred_succ_n …) 523 | #m' >Zpred_pos_succ 524 change in ⊢ (??(??%)?) with (Zsucc (pos m')) 525 <Zpred_Zplus_neg_O >Zpred_Zsucc @refl 526 | #m' whd in ⊢ (??%%) >pos_compare_S_one normalize; 527 >partial_minus_S_one normalize; >pos_nonzero 528 <pred_succ_n // 529 | #m' #n' whd in ⊢ (??%%) <pos_compare_S_S 530 >minus_S_S 531 >minus_S_S normalize 532 >pos_nonzero 533 >pos_nonzero 534 <pred_succ_n 535 <pred_succ_n 535 536 normalize; //; 536 537 ] qed. … … 600 601 601 602 lemma neg_pos_succ: ∀n,m:Pos. neg (succ n) + pos (succ m) = neg n + pos m. 602 #n #m normalize; <(pos_compare_S_S …) 603 >(partialminus_S_S …) 604 >(partialminus_S_S …) 603 #n #m whd in ⊢ (??%%) <pos_compare_S_S 604 >minus_S_S >minus_S_S 605 605 //; qed. 606 606 … … 676 676 #x #y cases x 677 677 [cases y;// 678 |*:#n cases y;//;#m normalize;@pos_compare_elim normalize;//]678 |*:#n cases y;//;#m whd in ⊢ (??(?%)%) @pos_compare_elim normalize;//] 679 679 qed. 680 680 … … 686 686 #x cases x 687 687 [// 688 |*:#n normalize;>(pos_compare_n_n ?)//]688 |*:#n whd in ⊢ (??%?) >pos_compare_n_n //] 689 689 qed. 690 690 -
src/utilities/binary/positive.ma
r697 r891 1095 1095 [ LT ⇒ n < m 1096 1096 | EQ ⇒ n = m 1097 | GT ⇒ m < n ]) ?????) (* FIXME: don't want to put all these ?, especially when … does not work! *)1097 | GT ⇒ m < n ])) 1098 1098 [1,2:@pos_cases 1099 1099 [ 1,3: /2/; 1100 1100 | 2,4: #m' cases m'; //; 1101 1101 ] 1102 |#n1 #m1 normalize;<(pos_compare_S_S …) cases (pos_compare n1 m1); 1103 [1,3:normalize;#IH @le_succ_succ //; 1104 |normalize;#IH >IH //] 1102 |#n1 #m1 <pos_compare_S_S cases (pos_compare n1 m1) 1103 [1,3: #IH @le_succ_succ // 1104 | #IH >IH // 1105 ] 1106 ] 1105 1107 qed. 1106 1108 -
src/utilities/extralib.ma
r882 r891 119 119 120 120 lemma Zmax_l: ∀x,y. x ≤ Zmax x y. 121 #x #y whd in ⊢ (??%) ; lapply (Z_compare_to_Prop x y); cases (Z_compare x y);122 /3/ ; cases x; /3/;qed.121 #x #y whd in ⊢ (??%) lapply (Z_compare_to_Prop x y) cases (Z_compare x y) 122 /3/ whd in ⊢ (% → ??%) /3/ qed. 123 123 124 124 lemma Zmax_r: ∀x,y. y ≤ Zmax x y. 125 #x #y whd in ⊢ (??%) ; lapply (Z_compare_to_Prop x y); cases (Z_compare x y);126 cases x; /3/;qed.125 #x #y whd in ⊢ (??%) lapply (Z_compare_to_Prop x y) cases (Z_compare x y) 126 whd in ⊢ (% → ??%) /3/ qed. 127 127 128 128 theorem Zle_to_Zlt: ∀x,y:Z. x ≤ y → Zpred x < y. … … 327 327 ∀A:Type[0]. ∀l1,l2:list A. 328 328 l1 @ l2 = [] → l1 = [] ∧ l2 = []. 329 #A #l1 #l2 cases l1 ;330 [ cases l2 ;329 #A #l1 #l2 cases l1 330 [ cases l2 331 331 [ /2/ 332 | #h #t #H destruct;333 ] 334 | cases l2 ;335 [ normalize ; #h #t #H destruct;336 | normalize ; #h1 #t1 #h2 #h3 #H destruct;332 | normalize #h #t #H destruct 333 ] 334 | cases l2 335 [ normalize #h #t #H destruct 336 | normalize #h1 #t1 #h2 #h3 #H destruct 337 337 ] 338 338 ] qed.
Note: See TracChangeset
for help on using the changeset viewer.