Changeset 2124 for src/ASM/AssemblyProof.ma
- Timestamp:
- Jun 27, 2012, 4:23:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ASM/AssemblyProof.ma
r2122 r2124 37 37 qed. 38 38 39 (*CSC: move elsewhere *)40 definition eq_addressing_mode: addressing_mode → addressing_mode → bool ≝41 λa, b: addressing_mode.42 match a with43 [ DIRECT d ⇒44 match b with45 [ DIRECT e ⇒ eq_bv ? d e46 | _ ⇒ false47 ]48 | INDIRECT b' ⇒49 match b with50 [ INDIRECT e ⇒ eq_b b' e51 | _ ⇒ false52 ]53 | EXT_INDIRECT b' ⇒54 match b with55 [ EXT_INDIRECT e ⇒ eq_b b' e56 | _ ⇒ false57 ]58 | REGISTER bv ⇒59 match b with60 [ REGISTER bv' ⇒ eq_bv ? bv bv'61 | _ ⇒ false62 ]63 | ACC_A ⇒ match b with [ ACC_A ⇒ true | _ ⇒ false ]64 | ACC_B ⇒ match b with [ ACC_B ⇒ true | _ ⇒ false ]65 | DPTR ⇒ match b with [ DPTR ⇒ true | _ ⇒ false ]66 | DATA b' ⇒67 match b with68 [ DATA e ⇒ eq_bv ? b' e69 | _ ⇒ false70 ]71 | DATA16 w ⇒72 match b with73 [ DATA16 e ⇒ eq_bv ? w e74 | _ ⇒ false75 ]76 | ACC_DPTR ⇒ match b with [ ACC_DPTR ⇒ true | _ ⇒ false ]77 | ACC_PC ⇒ match b with [ ACC_PC ⇒ true | _ ⇒ false ]78 | EXT_INDIRECT_DPTR ⇒ match b with [ EXT_INDIRECT_DPTR ⇒ true | _ ⇒ false ]79 | INDIRECT_DPTR ⇒ match b with [ INDIRECT_DPTR ⇒ true | _ ⇒ false ]80 | CARRY ⇒ match b with [ CARRY ⇒ true | _ ⇒ false ]81 | BIT_ADDR b' ⇒82 match b with83 [ BIT_ADDR e ⇒ eq_bv ? b' e84 | _ ⇒ false85 ]86 | N_BIT_ADDR b' ⇒87 match b with88 [ N_BIT_ADDR e ⇒ eq_bv ? b' e89 | _ ⇒ false90 ]91 | RELATIVE n ⇒92 match b with93 [ RELATIVE e ⇒ eq_bv ? n e94 | _ ⇒ false95 ]96 | ADDR11 w ⇒97 match b with98 [ ADDR11 e ⇒ eq_bv ? w e99 | _ ⇒ false100 ]101 | ADDR16 w ⇒102 match b with103 [ ADDR16 e ⇒ eq_bv ? w e104 | _ ⇒ false105 ]106 ].107 108 (*CSC: move elsewhere *)109 lemma eq_addressing_mode_refl:110 ∀a. eq_addressing_mode a a = true.111 #a112 cases a try #arg1 try #arg2113 try @eq_bv_refl try @eq_b_refl114 try normalize %115 qed.116 117 (*CSC: move elsewhere *)118 definition eq_sum:119 ∀A, B. (A → A → bool) → (B → B → bool) → (A ⊎ B) → (A ⊎ B) → bool ≝120 λlt, rt, leq, req, left, right.121 match left with122 [ inl l ⇒123 match right with124 [ inl l' ⇒ leq l l'125 | _ ⇒ false126 ]127 | inr r ⇒128 match right with129 [ inr r' ⇒ req r r'130 | _ ⇒ false131 ]132 ].133 134 (*CSC: move elsewhere *)135 definition eq_prod: ∀A, B. (A → A → bool) → (B → B → bool) → (A × B) → (A × B) → bool ≝136 λlt, rt, leq, req, left, right.137 let 〈l, r〉 ≝ left in138 let 〈l', r'〉 ≝ right in139 leq l l' ∧ req r r'.140 141 (*CSC: move elsewhere *)142 definition eq_preinstruction: preinstruction [[relative]] → preinstruction [[relative]] → bool ≝143 λi, j.144 match i with145 [ ADD arg1 arg2 ⇒146 match j with147 [ ADD arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'148 | _ ⇒ false149 ]150 | ADDC arg1 arg2 ⇒151 match j with152 [ ADDC arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'153 | _ ⇒ false154 ]155 | SUBB arg1 arg2 ⇒156 match j with157 [ SUBB arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'158 | _ ⇒ false159 ]160 | INC arg ⇒161 match j with162 [ INC arg' ⇒ eq_addressing_mode arg arg'163 | _ ⇒ false164 ]165 | DEC arg ⇒166 match j with167 [ DEC arg' ⇒ eq_addressing_mode arg arg'168 | _ ⇒ false169 ]170 | MUL arg1 arg2 ⇒171 match j with172 [ MUL arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'173 | _ ⇒ false174 ]175 | DIV arg1 arg2 ⇒176 match j with177 [ DIV arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'178 | _ ⇒ false179 ]180 | DA arg ⇒181 match j with182 [ DA arg' ⇒ eq_addressing_mode arg arg'183 | _ ⇒ false184 ]185 | JC arg ⇒186 match j with187 [ JC arg' ⇒ eq_addressing_mode arg arg'188 | _ ⇒ false189 ]190 | JNC arg ⇒191 match j with192 [ JNC arg' ⇒ eq_addressing_mode arg arg'193 | _ ⇒ false194 ]195 | JB arg1 arg2 ⇒196 match j with197 [ JB arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'198 | _ ⇒ false199 ]200 | JNB arg1 arg2 ⇒201 match j with202 [ JNB arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'203 | _ ⇒ false204 ]205 | JBC arg1 arg2 ⇒206 match j with207 [ JBC arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'208 | _ ⇒ false209 ]210 | JZ arg ⇒211 match j with212 [ JZ arg' ⇒ eq_addressing_mode arg arg'213 | _ ⇒ false214 ]215 | JNZ arg ⇒216 match j with217 [ JNZ arg' ⇒ eq_addressing_mode arg arg'218 | _ ⇒ false219 ]220 | CJNE arg1 arg2 ⇒221 match j with222 [ CJNE arg1' arg2' ⇒223 let prod_eq_left ≝ eq_prod [[acc_a]] [[direct; data]] eq_addressing_mode eq_addressing_mode in224 let prod_eq_right ≝ eq_prod [[registr; indirect]] [[data]] eq_addressing_mode eq_addressing_mode in225 let arg1_eq ≝ eq_sum ? ? prod_eq_left prod_eq_right in226 arg1_eq arg1 arg1' ∧ eq_addressing_mode arg2 arg2'227 | _ ⇒ false228 ]229 | DJNZ arg1 arg2 ⇒230 match j with231 [ DJNZ arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'232 | _ ⇒ false233 ]234 | CLR arg ⇒235 match j with236 [ CLR arg' ⇒ eq_addressing_mode arg arg'237 | _ ⇒ false238 ]239 | CPL arg ⇒240 match j with241 [ CPL arg' ⇒ eq_addressing_mode arg arg'242 | _ ⇒ false243 ]244 | RL arg ⇒245 match j with246 [ RL arg' ⇒ eq_addressing_mode arg arg'247 | _ ⇒ false248 ]249 | RLC arg ⇒250 match j with251 [ RLC arg' ⇒ eq_addressing_mode arg arg'252 | _ ⇒ false253 ]254 | RR arg ⇒255 match j with256 [ RR arg' ⇒ eq_addressing_mode arg arg'257 | _ ⇒ false258 ]259 | RRC arg ⇒260 match j with261 [ RRC arg' ⇒ eq_addressing_mode arg arg'262 | _ ⇒ false263 ]264 | SWAP arg ⇒265 match j with266 [ SWAP arg' ⇒ eq_addressing_mode arg arg'267 | _ ⇒ false268 ]269 | SETB arg ⇒270 match j with271 [ SETB arg' ⇒ eq_addressing_mode arg arg'272 | _ ⇒ false273 ]274 | PUSH arg ⇒275 match j with276 [ PUSH arg' ⇒ eq_addressing_mode arg arg'277 | _ ⇒ false278 ]279 | POP arg ⇒280 match j with281 [ POP arg' ⇒ eq_addressing_mode arg arg'282 | _ ⇒ false283 ]284 | XCH arg1 arg2 ⇒285 match j with286 [ XCH arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'287 | _ ⇒ false288 ]289 | XCHD arg1 arg2 ⇒290 match j with291 [ XCHD arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'292 | _ ⇒ false293 ]294 | RET ⇒ match j with [ RET ⇒ true | _ ⇒ false ]295 | RETI ⇒ match j with [ RETI ⇒ true | _ ⇒ false ]296 | NOP ⇒ match j with [ NOP ⇒ true | _ ⇒ false ]297 | MOVX arg ⇒298 match j with299 [ MOVX arg' ⇒300 let prod_eq_left ≝ eq_prod [[acc_a]] [[ext_indirect; ext_indirect_dptr]] eq_addressing_mode eq_addressing_mode in301 let prod_eq_right ≝ eq_prod [[ext_indirect; ext_indirect_dptr]] [[acc_a]] eq_addressing_mode eq_addressing_mode in302 let sum_eq ≝ eq_sum ? ? prod_eq_left prod_eq_right in303 sum_eq arg arg'304 | _ ⇒ false305 ]306 | XRL arg ⇒307 match j with308 [ XRL arg' ⇒309 let prod_eq_left ≝ eq_prod [[acc_a]] [[ data ; registr ; direct ; indirect ]] eq_addressing_mode eq_addressing_mode in310 let prod_eq_right ≝ eq_prod [[direct]] [[ acc_a ; data ]] eq_addressing_mode eq_addressing_mode in311 let sum_eq ≝ eq_sum ? ? prod_eq_left prod_eq_right in312 sum_eq arg arg'313 | _ ⇒ false314 ]315 | ORL arg ⇒316 match j with317 [ ORL arg' ⇒318 let prod_eq_left1 ≝ eq_prod [[acc_a]] [[ registr ; data ; direct ; indirect ]] eq_addressing_mode eq_addressing_mode in319 let prod_eq_left2 ≝ eq_prod [[direct]] [[ acc_a; data ]] eq_addressing_mode eq_addressing_mode in320 let prod_eq_left ≝ eq_sum ? ? prod_eq_left1 prod_eq_left2 in321 let prod_eq_right ≝ eq_prod [[carry]] [[ bit_addr ; n_bit_addr]] eq_addressing_mode eq_addressing_mode in322 let sum_eq ≝ eq_sum ? ? prod_eq_left prod_eq_right in323 sum_eq arg arg'324 | _ ⇒ false325 ]326 | ANL arg ⇒327 match j with328 [ ANL arg' ⇒329 let prod_eq_left1 ≝ eq_prod [[acc_a]] [[ registr ; direct ; indirect ; data ]] eq_addressing_mode eq_addressing_mode in330 let prod_eq_left2 ≝ eq_prod [[direct]] [[ acc_a; data ]] eq_addressing_mode eq_addressing_mode in331 let prod_eq_left ≝ eq_sum ? ? prod_eq_left1 prod_eq_left2 in332 let prod_eq_right ≝ eq_prod [[carry]] [[ bit_addr ; n_bit_addr]] eq_addressing_mode eq_addressing_mode in333 let sum_eq ≝ eq_sum ? ? prod_eq_left prod_eq_right in334 sum_eq arg arg'335 | _ ⇒ false336 ]337 | MOV arg ⇒338 match j with339 [ MOV arg' ⇒340 let prod_eq_6 ≝ eq_prod [[acc_a]] [[registr; direct; indirect; data]] eq_addressing_mode eq_addressing_mode in341 let prod_eq_5 ≝ eq_prod [[registr; indirect]] [[acc_a; direct; data]] eq_addressing_mode eq_addressing_mode in342 let prod_eq_4 ≝ eq_prod [[direct]] [[acc_a; registr; direct; indirect; data]] eq_addressing_mode eq_addressing_mode in343 let prod_eq_3 ≝ eq_prod [[dptr]] [[data16]] eq_addressing_mode eq_addressing_mode in344 let prod_eq_2 ≝ eq_prod [[carry]] [[bit_addr]] eq_addressing_mode eq_addressing_mode in345 let prod_eq_1 ≝ eq_prod [[bit_addr]] [[carry]] eq_addressing_mode eq_addressing_mode in346 let sum_eq_1 ≝ eq_sum ? ? prod_eq_6 prod_eq_5 in347 let sum_eq_2 ≝ eq_sum ? ? sum_eq_1 prod_eq_4 in348 let sum_eq_3 ≝ eq_sum ? ? sum_eq_2 prod_eq_3 in349 let sum_eq_4 ≝ eq_sum ? ? sum_eq_3 prod_eq_2 in350 let sum_eq_5 ≝ eq_sum ? ? sum_eq_4 prod_eq_1 in351 sum_eq_5 arg arg'352 | _ ⇒ false353 ]354 ].355 356 (*CSC: move elsewhere *)357 lemma eq_sum_refl:358 ∀A, B: Type[0].359 ∀leq, req.360 ∀s.361 ∀leq_refl: (∀t. leq t t = true).362 ∀req_refl: (∀u. req u u = true).363 eq_sum A B leq req s s = true.364 #A #B #leq #req #s #leq_refl #req_refl365 cases s assumption366 qed.367 368 (*CSC: move elsewhere *)369 lemma eq_prod_refl:370 ∀A, B: Type[0].371 ∀leq, req.372 ∀s.373 ∀leq_refl: (∀t. leq t t = true).374 ∀req_refl: (∀u. req u u = true).375 eq_prod A B leq req s s = true.376 #A #B #leq #req #s #leq_refl #req_refl377 cases s378 whd in ⊢ (? → ? → ??%?);379 #l #r380 >leq_refl @req_refl381 qed.382 383 (*CSC: move elsewhere *)384 lemma eq_preinstruction_refl:385 ∀i.386 eq_preinstruction i i = true.387 #i cases i try #arg1 try #arg2388 try @eq_addressing_mode_refl389 [1,2,3,4,5,6,7,8,10,16,17,18,19,20:390 whd in ⊢ (??%?); try %391 >eq_addressing_mode_refl392 >eq_addressing_mode_refl %393 |13,15:394 whd in ⊢ (??%?);395 cases arg1396 [*:397 #arg1_left normalize nodelta398 >eq_prod_refl [*: try % #argr @eq_addressing_mode_refl]399 ]400 |11,12:401 whd in ⊢ (??%?);402 cases arg1403 [1:404 #arg1_left normalize nodelta405 >(eq_sum_refl …)406 [1: % | 2,3: #arg @eq_prod_refl ]407 @eq_addressing_mode_refl408 |2:409 #arg1_left normalize nodelta410 @eq_prod_refl [*: @eq_addressing_mode_refl ]411 |3:412 #arg1_left normalize nodelta413 >(eq_sum_refl …)414 [1:415 %416 |2,3:417 #arg @eq_prod_refl #arg @eq_addressing_mode_refl418 ]419 |4:420 #arg1_left normalize nodelta421 @eq_prod_refl [*: #arg @eq_addressing_mode_refl ]422 ]423 |14:424 whd in ⊢ (??%?);425 cases arg1426 [1:427 #arg1_left normalize nodelta428 @eq_sum_refl429 [1:430 #arg @eq_sum_refl431 [1:432 #arg @eq_sum_refl433 [1:434 #arg @eq_sum_refl435 [1:436 #arg @eq_prod_refl437 [*:438 @eq_addressing_mode_refl439 ]440 |2:441 #arg @eq_prod_refl442 [*:443 #arg @eq_addressing_mode_refl444 ]445 ]446 |2:447 #arg @eq_prod_refl448 [*:449 #arg @eq_addressing_mode_refl450 ]451 ]452 |2:453 #arg @eq_prod_refl454 [*:455 #arg @eq_addressing_mode_refl456 ]457 ]458 |2:459 #arg @eq_prod_refl460 [*:461 #arg @eq_addressing_mode_refl462 ]463 ]464 |2:465 #arg1_right normalize nodelta466 @eq_prod_refl467 [*:468 #arg @eq_addressing_mode_refl469 ]470 ]471 |*:472 whd in ⊢ (??%?);473 cases arg1474 [*:475 #arg1 >eq_sum_refl476 [1,4:477 @eq_addressing_mode_refl478 |2,3,5,6:479 #arg @eq_prod_refl480 [*:481 #arg @eq_addressing_mode_refl482 ]483 ]484 ]485 ]486 qed.487 488 (*CSC: move elsewhere *)489 definition eq_instruction: instruction → instruction → bool ≝490 λi, j.491 match i with492 [ ACALL arg ⇒493 match j with494 [ ACALL arg' ⇒ eq_addressing_mode arg arg'495 | _ ⇒ false496 ]497 | LCALL arg ⇒498 match j with499 [ LCALL arg' ⇒ eq_addressing_mode arg arg'500 | _ ⇒ false501 ]502 | AJMP arg ⇒503 match j with504 [ AJMP arg' ⇒ eq_addressing_mode arg arg'505 | _ ⇒ false506 ]507 | LJMP arg ⇒508 match j with509 [ LJMP arg' ⇒ eq_addressing_mode arg arg'510 | _ ⇒ false511 ]512 | SJMP arg ⇒513 match j with514 [ SJMP arg' ⇒ eq_addressing_mode arg arg'515 | _ ⇒ false516 ]517 | JMP arg ⇒518 match j with519 [ JMP arg' ⇒ eq_addressing_mode arg arg'520 | _ ⇒ false521 ]522 | MOVC arg1 arg2 ⇒523 match j with524 [ MOVC arg1' arg2' ⇒ eq_addressing_mode arg1 arg1' ∧ eq_addressing_mode arg2 arg2'525 | _ ⇒ false526 ]527 | RealInstruction instr ⇒528 match j with529 [ RealInstruction instr' ⇒ eq_preinstruction instr instr'530 | _ ⇒ false531 ]532 ].533 534 (*CSC: move elsewhere *)535 lemma eq_instruction_refl:536 ∀i. eq_instruction i i = true.537 #i cases i [*: #arg1 ]538 try @eq_addressing_mode_refl539 try @eq_preinstruction_refl540 #arg2 whd in ⊢ (??%?);541 >eq_addressing_mode_refl >eq_addressing_mode_refl %542 qed.543 544 (*CSC: in is_a_to_mem_to_is_in use vect_member in place of mem … *)545 definition vect_member ≝546 λA,n,eq,v,a. mem A eq (S n) v a.547 548 (*CSC: move elsewhere*)549 definition is_in_cons_elim:550 ∀len.∀hd,tl.∀m:addressing_mode551 .is_in (S len) (hd:::tl) m →552 (bool_to_Prop (is_a hd m)) ∨ (bool_to_Prop (is_in len tl m)).553 #len #hd #tl #am #ISIN whd in match (is_in ???) in ISIN;554 cases (is_a hd am) in ISIN; /2/555 qed.556 557 (*CSC: move elsewhere*)558 lemma prod_eq_left:559 ∀A: Type[0].560 ∀p, q, r: A.561 p = q → 〈p, r〉 = 〈q, r〉.562 #A #p #q #r #hyp563 destruct %564 qed.565 566 (*CSC: move elsewhere*)567 lemma prod_eq_right:568 ∀A: Type[0].569 ∀p, q, r: A.570 p = q → 〈r, p〉 = 〈r, q〉.571 #A #p #q #r #hyp572 destruct %573 qed.574 575 39 let rec encoding_check 576 40 (code_memory: BitVectorTrie Byte 16) (pc: Word) (final_pc: Word) … … 583 47 hd = byte ∧ encoding_check code_memory new_pc final_pc tl 584 48 ]. 585 586 (*CSC: move elsewhere *)587 lemma add_bitvector_of_nat_Sm:588 ∀n, m: nat.589 add … (bitvector_of_nat … 1) (bitvector_of_nat … m) =590 bitvector_of_nat n (S m).591 #n #m @add_bitvector_of_nat_plus592 qed.593 49 594 50 lemma encoding_check_append: … … 622 78 ] 623 79 ] 624 qed.625 626 (*CSC: move elsewhere*)627 lemma destruct_bug_fix_1:628 ∀n: nat.629 S n = 0 → False.630 #n #absurd destruct(absurd)631 qed.632 633 (*CSC: move elsewhere*)634 lemma destruct_bug_fix_2:635 ∀m, n: nat.636 S m = S n → m = n.637 #m #n #refl destruct %638 qed.639 640 (*CSC: move elsewhere*)641 definition bitvector_3_cases:642 ∀b: BitVector 3.643 ∃l, c, r: bool.644 b ≃ [[l; c; r]].645 #b646 @(Vector_inv_ind bool 3 b (λn: nat. λv: Vector bool n. ∃l:bool.∃c:bool.∃r:bool. v ≃ [[l; c; r]]))647 [1:648 #absurd @⊥ -b @(destruct_bug_fix_1 2)649 >absurd %650 |2:651 #n #hd #tl #_ #size_refl #hd_tl_refl %{hd}652 cut (n = 2)653 [1:654 @destruct_bug_fix_2655 >size_refl %656 |2:657 #n_refl >n_refl in tl; #V658 @(Vector_inv_ind bool 2 V (λn: nat. λv: Vector bool n. ∃c:bool. ∃r:bool. hd:::v ≃ [[hd; c; r]]))659 [1:660 #absurd @⊥ -V @(destruct_bug_fix_1 1)661 >absurd %662 |2:663 #n' #hd' #tl' #_ #size_refl' #hd_tl_refl' %{hd'}664 cut (n' = 1)665 [1:666 @destruct_bug_fix_2 >size_refl' %667 |2:668 #n_refl' >n_refl' in tl'; #V'669 @(Vector_inv_ind bool 1 V' (λn: nat. λv: Vector bool n. ∃r: bool. hd:::hd':::v ≃ [[hd; hd'; r]]))670 [1:671 #absurd @⊥ -V' @(destruct_bug_fix_1 0)672 >absurd %673 |2:674 #n'' #hd'' #tl'' #_ #size_refl'' #hd_tl_refl'' %{hd''}675 cut (n'' = 0)676 [1:677 @destruct_bug_fix_2 >size_refl'' %678 |2:679 #n_refl'' >n_refl'' in tl''; #tl'''680 >(Vector_O … tl''') %681 ]682 ]683 ]684 ]685 ]686 ]687 qed.688 689 (*CSC: move elsewhere*)690 lemma bitvector_3_elim_prop:691 ∀P: BitVector 3 → Prop.692 P [[false;false;false]] → P [[false;false;true]] → P [[false;true;false]] →693 P [[false;true;true]] → P [[true;false;false]] → P [[true;false;true]] →694 P [[true;true;false]] → P [[true;true;true]] → ∀v. P v.695 #P #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #H9696 cases (bitvector_3_cases … H9) #l #assm cases assm697 -assm #c #assm cases assm698 -assm #r #assm cases assm destruct699 cases l cases c cases r assumption700 80 qed. 701 81 … … 750 130 fetch_many code_memory final_pc pc' tl) 751 131 ]. 752 753 (*CSC: move elsewhere*)754 lemma option_destruct_Some:755 ∀A: Type[0].756 ∀a, b: A.757 Some A a = Some A b → a = b.758 #A #a #b #EQ759 destruct %760 qed.761 762 (*CSC: move elsewhere*)763 lemma eq_instruction_to_eq:764 ∀i1, i2: instruction.765 eq_instruction i1 i2 = true → i1 ≃ i2.766 #i1 #i2767 cases i1 cases i2 cases daemon (* easy but tedious768 [1,10,19,28,37,46:769 #arg1 #arg2770 whd in match (eq_instruction ??);771 cases arg1 #subaddressing_mode772 cases subaddressing_mode773 try (#arg1' #arg2' normalize in ⊢ (% → ?); #absurd cases absurd @I)774 try (#arg1' normalize in ⊢ (% → ?); #absurd cases absurd @I)775 try (normalize in ⊢ (% → ?); #absurd cases absurd @I)776 #word11 #irrelevant777 cases arg2 #subaddressing_mode778 cases subaddressing_mode779 try (#arg1' #arg2' normalize in ⊢ (% → ?); #absurd cases absurd @I)780 try (#arg1' normalize in ⊢ (% → ?); #absurd cases absurd @I)781 try (normalize in ⊢ (% → ?); #absurd cases absurd @I)782 #word11' #irrelevant normalize nodelta783 #eq_bv_assm cases (eq_bv_eq … eq_bv_assm) % *)784 qed.785 132 786 133 lemma fetch_assembly_pseudo': … … 1429 776 ticks_of0 program sigma policy ppc fetched. 1430 777 1431 (*CSC: move elsewhere*)1432 lemma eq_rect_Type1_r:1433 ∀A: Type[1].1434 ∀a: A.1435 ∀P: ∀x:A. eq ? x a → Type[1]. P a (refl A a) → ∀x: A.∀p:eq ? x a. P x p.1436 #A #a #P #H #x #p1437 generalize in match H;1438 generalize in match P;1439 cases p //1440 qed.1441 1442 778 (* 1443 779 lemma blah: … … 1569 905 *) 1570 906 1571 (*CSC: move elsewhere*)1572 lemma Some_Some_elim:1573 ∀T:Type[0].∀x,y:T.∀P:Type[2]. (x=y → P) → Some T x = Some T y → P.1574 #T #x #y #P #H #K @H @option_destruct_Some //1575 qed.1576 1577 (*CSC: move elsewhere*)1578 lemma pair_destruct_right:1579 ∀A: Type[0].1580 ∀B: Type[0].1581 ∀a, c: A.1582 ∀b, d: B.1583 〈a, b〉 = 〈c, d〉 → b = d.1584 #A #B #a #b #c #d //1585 qed.1586 1587 907 (*CSC: ???*) 1588 908 (* XXX: we need a precondition here stating that the PPC is within the … … 1633 953 @pair_elim #lbl #instr #nth_refl normalize nodelta 1634 954 #G cases (pair_destruct_right ?????? G) % 1635 qed.1636 1637 (*CSC: move elsewhere*)1638 lemma pose: ∀A:Type[0].∀B:A → Type[0].∀a:A. (∀a':A. a'=a → B a') → B a.1639 /2/1640 955 qed. 1641 956
Note: See TracChangeset
for help on using the changeset viewer.