val const_on: #key:eqtype -> #value:Type -> #f:cmp key -> d:ordset key f -> x:value -> Tot (ordmap key value f)
let const_on (#k:eqtype) (#v:Type) #f d x =
  let g = F.on_dom k (fun y -> if mem y d then Some x else None) in
  Mk_map d g
val const_on: #key:eqtype -> #value:Type -> #f:cmp key -> d:ordset key f -> x:value -> Tot (ordmap key value f)
let const_on (#k: eqtype) (#v: Type) #f d x =
let g = F.on_dom k (fun y -> if mem y d then Some x else None) in
Mk_map d g
FStar.OrdMap.fst.checked
prims.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.OrdSet.fsti.checked FStar.FunctionalExtensionality.fsti.checked
FStar.OrdMap.fst
Prims.eqtype FStar.OrdSet.cmp FStar.OrdSet.ordset FStar.OrdMap.Mk_map FStar.FunctionalExtensionality.restricted_t FStar.Pervasives.Native.option FStar.FunctionalExtensionality.on_dom FStar.OrdSet.mem FStar.Pervasives.Native.Some Prims.bool FStar.Pervasives.Native.None FStar.OrdMap.ordmap
(*
   Copyright 2008-2018 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.OrdMap

open FStar.OrdSet
open FStar.FunctionalExtensionality
module F = FStar.FunctionalExtensionality

let map_t (k:eqtype) (v:Type) (f:cmp k) (d:ordset k f) =
  g:F.restricted_t k (fun _ -> option v){forall x. mem x d == Some? (g x)}

noeq
type ordmap (k:eqtype) (v:Type) (f:cmp k) =
  | Mk_map: d:ordset k f -> m:map_t k v f d -> ordmap k v f

let empty (#k:eqtype) (#v:Type) #f =
  let d = OrdSet.empty in
  let g = F.on_dom k (fun x -> None) in
  Mk_map d g
val const_on: #key:eqtype -> #value:Type -> #f:cmp key -> d:ordset key f -> x:value -> Tot (ordmap key value f)
d: FStar.OrdSet.ordset key f -> x: value -> FStar.OrdMap.ordmap key value f