val composable_maps (#a: _) (#k: eqtype) (p: pcm a) (m0 m1: map k a) : prop
let composable_maps (#a:_)
                    (#k:eqtype)
                    (p:pcm a)
                    (m0 m1: map k a)
  : prop
  = forall k. Map.sel m0 k `composable p` Map.sel m1 k
val composable_maps (#a: _) (#k: eqtype) (p: pcm a) (m0 m1: map k a) : prop
let composable_maps (#a: _) (#k: eqtype) (p: pcm a) (m0 m1: map k a) : prop =
forall k. composable p (Map.sel m0 k) (Map.sel m1 k)
Steel.PCMMap.fst.checked
prims.fst.checked FStar.Set.fsti.checked FStar.Pervasives.fsti.checked FStar.PCM.fst.checked FStar.Map.fsti.checked FStar.Ghost.fsti.checked FStar.Classical.Sugar.fsti.checked
Steel.PCMMap.fst
Prims.eqtype FStar.PCM.pcm Steel.PCMMap.map Prims.l_Forall FStar.PCM.composable FStar.Map.sel Prims.prop
(*
   Copyright 2021 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.

   Author: N. Swamy
*)
module Steel.PCMMap
(** Given a PCM on [p:pcm a] and a key type [k:eqtype], this module
    builds a [pcm (map k a)] by lifting [p] pointwise. It also lifts
    frame-preserving updates on [p] to frame-preserving updates on
    entries of the map. **)
open FStar.Map
open FStar.PCM

/// The carrier type of our constructed PCM
///
/// -- FStar.Map comes with a notion of domain that we don't need here
///    So, we'll just worked with maps whose domain is always
///    universal.
let map (k:eqtype) (v:Type) =
  m:Map.t k v {
    Map.domain m `Set.equal` Set.complement Set.empty
  }

/// Maps are composable if they are composable pointwise
let composable_maps (#a:_)
                    (#k:eqtype)
                    (p:pcm a)
                    (m0 m1: map k a)
val composable_maps (#a: _) (#k: eqtype) (p: pcm a) (m0 m1: map k a) : prop
p: FStar.PCM.pcm a -> m0: Steel.PCMMap.map k a -> m1: Steel.PCMMap.map k a -> Prims.prop