let compatible_sub_preorder (#a:Type0)
  (len:nat) (rel:srel a) (i:nat) (j:nat{i <= j /\ j <= len}) (sub_rel:srel a)
  = compatible_subseq_preorder len rel i j sub_rel
let compatible_sub_preorder
      (#a: Type0)
      (len: nat)
      (rel: srel a)
      (i: nat)
      (j: nat{i <= j /\ j <= len})
      (sub_rel: srel a)
     =
compatible_subseq_preorder len rel i j sub_rel
LowStar.Monotonic.Buffer.fst.checked
prims.fst.checked FStar.UInt32.fsti.checked FStar.Set.fsti.checked FStar.Seq.fst.checked FStar.Preorder.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.ModifiesGen.fsti.checked FStar.Map.fsti.checked FStar.List.Tot.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked FStar.Heap.fst.checked FStar.Ghost.fsti.checked FStar.Classical.fsti.checked
LowStar.Monotonic.Buffer.fst
Prims.nat LowStar.Monotonic.Buffer.srel Prims.l_and Prims.b2t Prims.op_LessThanOrEqual LowStar.Monotonic.Buffer.compatible_subseq_preorder Prims.logical
(*
   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 LowStar.Monotonic.Buffer

module P = FStar.Preorder
module G = FStar.Ghost
module U32 = FStar.UInt32
module Seq = FStar.Seq

module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

private let srel_to_lsrel (#a:Type0) (len:nat) (pre:srel a) :P.preorder (Seq.lseq a len) = pre

(*
 * Counterpart of compatible_sub from the fsti but using sequences
 *
 * The patterns are guarded tightly, the proof of transitivity gets quite flaky otherwise
 * The cost is that we have to additional asserts as triggers
 *)
let compatible_sub_preorder (#a:Type0)
val compatible_sub_preorder : len: Prims.nat ->
    rel: LowStar.Monotonic.Buffer.srel a ->
    i: Prims.nat ->
    j: Prims.nat{i <= j /\ j <= len} ->
    sub_rel: LowStar.Monotonic.Buffer.srel a
  -> Prims.logical

    len: Prims.nat ->
    rel: LowStar.Monotonic.Buffer.srel a ->
    i: Prims.nat ->
    j: Prims.nat{i <= j /\ j <= len} ->
    sub_rel: LowStar.Monotonic.Buffer.srel a
  -> Prims.logical