val lemma_is_wf_ctr_and_tip_intro (h:hmap) (ctr:int) (tip:rid)
  :Lemma (requires (root `is_in` h /\ (is_stack_region tip \/ tip = root) /\  tip `is_in` h /\
                    tip_top_predicate tip h /\ map_invariant_predicate h /\
                    downward_closed_predicate h /\ rid_ctr_pred_predicate h ctr))
	 (ensures  (is_wf_with_ctr_and_tip h ctr tip))
let lemma_is_wf_ctr_and_tip_intro _ _ _ = root_is_not_freeable ()
val lemma_is_wf_ctr_and_tip_intro (h:hmap) (ctr:int) (tip:rid)
  :Lemma (requires (root `is_in` h /\ (is_stack_region tip \/ tip = root) /\  tip `is_in` h /\
                    tip_top_predicate tip h /\ map_invariant_predicate h /\
                    downward_closed_predicate h /\ rid_ctr_pred_predicate h ctr))
	 (ensures  (is_wf_with_ctr_and_tip h ctr tip))
let lemma_is_wf_ctr_and_tip_intro _ _ _ =
root_is_not_freeable ()
FStar.Monotonic.HyperStack.fst.checked
prims.fst.checked FStar.Set.fsti.checked FStar.Preorder.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Monotonic.Heap.fsti.checked FStar.Map.fsti.checked FStar.Classical.fsti.checked
FStar.Monotonic.HyperStack.fst
FStar.Monotonic.HyperHeap.hmap Prims.int FStar.Monotonic.HyperHeap.rid FStar.Monotonic.HyperHeap.root_is_not_freeable Prims.unit
(*
   Copyright 2008-2014 Aseem Rastogi, and Microsoft Research

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*)
module FStar.Monotonic.HyperStack

open FStar.Preorder
module Map = FStar.Map

let map_invariant = map_invariant_predicate

let downward_closed = downward_closed_predicate

let tip_top = tip_top_predicate

let rid_ctr_pred = rid_ctr_pred_predicate

noeq type mem' =
  | HS :rid_ctr:int -> h:hmap -> tip:rid -> mem'

let mk_mem rid_ctr h tip = HS rid_ctr h tip

let get_hmap m = m.h
let get_rid_ctr m = m.rid_ctr
let get_tip m = m.tip

let lemma_mk_mem'_projectors _ _ _ = ()

let lemma_mem_projectors_are_in_wf_relation _ = ()
val lemma_is_wf_ctr_and_tip_intro (h:hmap) (ctr:int) (tip:rid)
  :Lemma (requires (root `is_in` h /\ (is_stack_region tip \/ tip = root) /\  tip `is_in` h /\
                    tip_top_predicate tip h /\ map_invariant_predicate h /\
                    downward_closed_predicate h /\ rid_ctr_pred_predicate h ctr))
	 (ensures  (is_wf_with_ctr_and_tip h ctr tip))
h: FStar.Monotonic.HyperHeap.hmap -> ctr: Prims.int -> tip: FStar.Monotonic.HyperHeap.rid
  -> FStar.Pervasives.Lemma
      (requires
        FStar.Monotonic.HyperStack.is_in FStar.Monotonic.HyperHeap.root h /\
        (FStar.Monotonic.HyperStack.is_stack_region tip \/ tip = FStar.Monotonic.HyperHeap.root) /\
        FStar.Monotonic.HyperStack.is_in tip h /\ FStar.Monotonic.HyperStack.tip_top_predicate tip h /\
        FStar.Monotonic.HyperStack.map_invariant_predicate h /\
        FStar.Monotonic.HyperStack.downward_closed_predicate h /\
        FStar.Monotonic.HyperStack.rid_ctr_pred_predicate h ctr)
      (ensures FStar.Monotonic.HyperStack.is_wf_with_ctr_and_tip h ctr tip)