val rid_tail (r:rid{rid_length r > 0}) :rid
let rid_tail (r:rid{rid_length r > 0}) = elift1_p (tot_to_gtot Cons?.tl) r
val rid_tail (r:rid{rid_length r > 0}) :rid
let rid_tail (r: rid{rid_length r > 0}) =
elift1_p (tot_to_gtot Cons?.tl) r
FStar.Monotonic.HyperHeap.fst.checked
prims.fst.checked FStar.Set.fsti.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Monotonic.Heap.fsti.checked FStar.Map.fsti.checked FStar.List.Tot.fst.checked FStar.Ghost.fsti.checked
FStar.Monotonic.HyperHeap.fst
FStar.Monotonic.HyperHeap.rid Prims.b2t Prims.op_GreaterThan FStar.Monotonic.HyperHeap.rid_length FStar.Ghost.elift1_p Prims.list FStar.Pervasives.Native.tuple3 Prims.int Prims.bool Prims.uu___is_Cons FStar.Ghost.tot_to_gtot Prims.__proj__Cons__item__tl
(*
   Copyright 2008-2014 Nikhil Swamy, 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.HyperHeap

module Set = FStar.Set
module Map = FStar.Map

open FStar.Monotonic.Heap
open FStar.Ghost

(*
 * This is a temporary assumption, we should fix the model to get rid of it
 *)
assume HasEq_rid: hasEq (erased (list (int * int * bool)))

let rid = erased (list (int * int * bool))

let reveal r = FStar.List.Tot.map (fun (i, j, _) -> i, j) (reveal r)

let color r =
  match reveal r with
  | [] -> 0
  | (c, _)::_ -> c

let rid_freeable r =
  match Ghost.reveal r with
  | [] -> false
  | (_, _, b)::_ -> b

let root = hide []

let root_last_component () = ()

let lemma_root_has_color_zero _ = ()

let root_is_not_freeable () = ()

let rid_length r = List.Tot.length (reveal r)
val rid_tail (r:rid{rid_length r > 0}) :rid
r: FStar.Monotonic.HyperHeap.rid{FStar.Monotonic.HyperHeap.rid_length r > 0}
  -> FStar.Monotonic.HyperHeap.rid