Changeset 982 for src/ASM/AssemblyProof.ma
 Timestamp:
 Jun 16, 2011, 2:39:53 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/ASM/AssemblyProof.ma
r979 r982 1 1 include "ASM/Assembly.ma". 2 2 include "ASM/Interpret.ma". 3 4 (* RUSSEL **)5 6 include "basics/jmeq.ma".7 8 notation > "hvbox(a break ≃ b)"9 non associative with precedence 4510 for @{ 'jmeq ? $a ? $b }.11 12 notation < "hvbox(term 46 a break maction (≃) (≃\sub(t,u)) term 46 b)"13 non associative with precedence 4514 for @{ 'jmeq $t $a $u $b }.15 16 interpretation "john major's equality" 'jmeq t x u y = (jmeq t x u y).17 18 lemma eq_to_jmeq:19 ∀A: Type[0].20 ∀x, y: A.21 x = y → x ≃ y.22 //23 qed.24 25 definition inject : ∀A.∀P:A → Prop.∀a.∀p:P a.Σx:A.P x ≝ λA,P,a,p. dp … a p.26 definition eject : ∀A.∀P: A → Prop.(Σx:A.P x) → A ≝ λA,P,c.match c with [ dp w p ⇒ w].27 28 coercion inject nocomposites: ∀A.∀P:A → Prop.∀a.∀p:P a.Σx:A.P x ≝ inject on a:? to Σx:?.?.29 coercion eject nocomposites: ∀A.∀P:A → Prop.∀c:Σx:A.P x.A ≝ eject on _c:Σx:?.? to ?.30 31 axiom VOID: Type[0].32 axiom assert_false: VOID.33 definition bigbang: ∀A:Type[0].False → VOID → A.34 #A #abs cases abs35 qed.36 37 coercion bigbang nocomposites: ∀A:Type[0].False → ∀v:VOID.A ≝ bigbang on _v:VOID to ?.38 39 lemma sig2: ∀A.∀P:A → Prop. ∀p:Σx:A.P x. P (eject … p).40 #A #P #p cases p #w #q @q41 qed.42 43 lemma jmeq_to_eq: ∀A:Type[0]. ∀x,y:A. x≃y → x=y.44 #A #x #y #JMEQ @(jmeq_elim ? x … JMEQ) %45 qed.46 47 coercion jmeq_to_eq: ∀A:Type[0]. ∀x,y:A. ∀p:x≃y.x=y ≝ jmeq_to_eq on _p:?≃? to ?=?.48 49 (* END RUSSELL **)50 3 51 4 … … 162 115 ] 163 116 qed. 164 165 let rec foldl_strong_internal166 (A: Type[0]) (P: list A → Type[0]) (l: list A)167 (H: ∀prefix. ∀hd. ∀tl. l = prefix @ [hd] @ tl → P prefix → P (prefix @ [hd]))168 (prefix: list A) (suffix: list A) (acc: P prefix) on suffix:169 l = prefix @ suffix → P(prefix @ suffix) ≝170 match suffix return λl'. l = prefix @ l' → P (prefix @ l') with171 [ nil ⇒ λprf. ?172  cons hd tl ⇒ λprf. ?173 ].174 [ > (append_nil ?)175 @ acc176  applyS (foldl_strong_internal A P l H (prefix @ [hd]) tl ? ?)177 [ @ (H prefix hd tl prf acc)178  applyS prf179 ]180 ]181 qed.182 183 definition foldl_strong ≝184 λA: Type[0].185 λP: list A → Type[0].186 λl: list A.187 λH: ∀prefix. ∀hd. ∀tl. l = prefix @ [hd] @ tl → P prefix → P (prefix @ [hd]).188 λacc: P [ ].189 foldl_strong_internal A P l H [ ] l acc (refl …).190 117 191 118 definition bit_elim: ∀P: bool → bool. bool ≝ … … 890 817 qed. 891 818 892 lemma pair_destruct: ∀A,B,a1,a2,b1,b2. pair A B a1 a2 = 〈b1,b2〉 → a1=b1 ∧ a2=b2.893 #A #B #a1 #a2 #b1 #b2 #EQ destruct /2/894 qed.895 896 819 axiom eq_bv_to_eq: ∀n.∀v1,v2: BitVector n. eq_bv … v1 v2 = true → v1=v2. 897 820 … … 965 888 Some ? (λx.lookup ?? x sigma_map (zero …)) ]. 966 889 967 axiom policy_ok: ∀p. sigma_safe p ≠ None …. 968 890 (* stuff about policy *) 891 892 lemma policy_ok: ∀p. sigma_safe p ≠ None …. 893 #instr_list whd in match (sigma_safe ?) whd in match (sigma0 ?) 894 969 895 definition sigma: pseudo_assembly_program → Word → Word ≝ 970 896 λp.
Note: See TracChangeset
for help on using the changeset viewer.