Qed.

(* Specifications: *)
Theorem expnat_2_nz: forall e,
(expnat 2 e) <> 0.
Lemma lognat_double_eq : forall a b (pf1: 2 * a <> 0)(pf2: 2 * b <> 0)(pf3 : a <> 0) (pf4: b <> 0),
lognat pf3 = lognat pf4 ->
lognat pf1 = lognat pf2.
Theorem rat0_ne_rat1 : ~ (eqRat 0 1).
intuition.
Theorem ratAdd_comm : forall r1 r2,
r1 + r2 == r2 + r1.
Lemma unary_op_beq_refl : forall a, unary_op_beq a a = true.
destruct a; auto.
Lemma binary_op_beq_refl : forall a, binary_op_beq a a = true.
destruct a; auto.
Lemma as_list_cons : forall e t hd tl,
as_list e = Some (inl (t, hd, tl)) ->
e = App (App (Inj (inr (Data (fcons t)))) hd) tl.
Lemma as_list_nil : forall e t,
as_list e = Some (inr t) ->
e = Inj (inr (Data (fnil t))).
Lemma as_tree_l : forall e t l o r,
as_tree e = Some (inl (t, l, o, r)) ->
e = (App (App (App (Inj (inr (Data (fnode t)))) l) o) r).
Lemma APPLY_condition2:
forall (subst : Type) (S : Subst subst (expr typ func))
(SO : SubstOk S) (SU : SubstUpdate subst (expr typ func))
(SUO : SubstUpdateOk SU SO),
UnifyI.unify_sound
(fun (tus tvs : tenv typ) (n : nat) (l r : expr typ func)
(t : typ) (s : subst) => exprUnify 10 tus tvs n l r t s).
Lemma Ilt_irrefl : forall {x}, ~ Ident.lt x x.
Lemma nat_of_P_id2pos_le x y :
Ile x y -> nat_of_P (id2pos x) <= nat_of_P (id2pos y).
Lemma empty_not_full : ~full empty_val.
unfold not, full, empty_val; intros. specialize (H (Some O)).
Lemma mem_step_free:
forall m b lo hi m', Mem.free m b lo hi = Some m' -> mem_step m m'.
Lemma mem_step_store:
forall m ch b a v m', Mem.store ch m b a v = Some m' -> mem_step m m'.
Lemma mem_step_free:
forall m b lo hi m', Mem.free m b lo hi = Some m' -> mem_step m m'.
Lemma mem_step_store:
forall m ch b a v m', Mem.store ch m b a v = Some m' -> mem_step m m'.
Lemma level_make_rmap: forall f V lev H, @level rmap _ (proj1_sig (make_rmap f V lev H)) = lev.
refine (fun f V lev H => match proj2_sig (make_rmap f V lev H) with
| conj LEVEL _ => LEVEL
end).
Lemma nat_of_Z_minus_le : forall z a b,
b <= a ->
(nat_of_Z (z - a) <= nat_of_Z (z - b))%nat.
Lemma resource_at_remake_rmap: forall f g lev H Hg, resource_at (proj1_sig (remake_rmap f g lev H Hg)) = f.
refine (fun f g lev H Hg => match proj2_sig (remake_rmap f g lev H Hg) with
| conj _ (conj RESOURCE_AT _) => RESOURCE_AT
end).
Lemma ghost_of_make_rmap: forall f g lev H Hg, ghost_of (proj1_sig (make_rmap f g lev H Hg)) = g.
refine (fun f g lev H Hg => match proj2_sig (make_rmap f g lev H Hg) with
| conj _ (conj _ RESOURCE_AT) => RESOURCE_AT
end).
Lemma ghost_of_remake_rmap: forall f g lev H Hg, ghost_of (proj1_sig (remake_rmap f g lev H Hg)) = g.
refine (fun f g lev H Hg => match proj2_sig (remake_rmap f g lev H Hg) with
| conj _ (conj _ RESOURCE_AT) => RESOURCE_AT
end).
Lemma level_make_rmap: forall f g lev H Hg, @level rmap _ (proj1_sig (make_rmap f g lev H Hg)) = lev.
refine (fun f g lev H Hg => match proj2_sig (make_rmap f g lev H Hg) with
| conj LEVEL _ => LEVEL
end).
Lemma level_remake_rmap: forall f g lev H Hg, @level rmap _ (proj1_sig (remake_rmap f g lev H Hg)) = lev.
refine (fun f g lev H Hg => match proj2_sig (remake_rmap f g lev H Hg) with
| conj LEVEL _ => LEVEL
end).
Lemma gso h x y v : x<>y -> get (set x v h) y = get h y.
unfold get, set; intros; if_tac; intuition.
Lemma grs h x : get (remove x h) x = None.
unfold get, remove; intros; if_tac; intuition.
Lemma gro h x y : x<>y -> get (remove x h) y = get h y.
unfold get, remove; intros; if_tac; intuition.
Lemma ext h h' : (forall x, get h x = get h' x) -> h=h'.
Lemma override (a: positive) (b b' : B) h : set a b' (set a b h) = set a b' h.
Lemma override_same : forall id t (x:B), get t id = Some x -> set id x t = t.
End map.
Lemma cast_exists : forall {CS: compspecs} Delta e2 t rho phi
(TC: typecheck_environ Delta rho),
denote_tc_assert (typecheck_expr Delta e2) rho phi ->
denote_tc_assert (isCastResultType (typeof e2) t e2)
rho phi ->
sem_cast (typeof e2) t (eval_expr e2 rho)  =
Some (force_val (sem_cast (typeof e2) t (eval_expr e2 rho))).
Lemma OL: length OPAD = EQ.b.
unfold OPAD. rewrite bytesToBits_len, PAD.HM.length_SF, <- EQ.BS; trivial.