val sorted_pred_sorted_lemma :
  #a:eqtype ->
  f:tot_ord a ->
  s:seq a ->
  Lemma (requires (sorted_pred f s)) (ensures (sorted #a f s == true)) (decreases (length s))
let rec sorted_pred_sorted_lemma #a f s =
  if length s <= 1 then ()
  else begin
    assert (f (index s 0) (index s 1)) ;
    sorted_pred_tail #a f s;
    sorted_pred_sorted_lemma #a f (tail s)
  end
val sorted_pred_sorted_lemma :
  #a:eqtype ->
  f:tot_ord a ->
  s:seq a ->
  Lemma (requires (sorted_pred f s)) (ensures (sorted #a f s == true)) (decreases (length s))
let rec sorted_pred_sorted_lemma #a f s =
if length s <= 1
then ()
else
  (assert (f (index s 0) (index s 1));
    sorted_pred_tail #a f s;
    sorted_pred_sorted_lemma #a f (tail s))
FStar.Seq.Sorted.fst.checked
prims.fst.checked FStar.Squash.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.fsti.checked FStar.Classical.fsti.checked
FStar.Seq.Sorted.fst
Prims.eqtype FStar.Seq.Properties.tot_ord FStar.Seq.Base.seq Prims.op_LessThanOrEqual FStar.Seq.Base.length Prims.bool FStar.Seq.Sorted.sorted_pred_sorted_lemma FStar.Seq.Properties.tail Prims.unit FStar.Seq.Sorted.sorted_pred_tail Prims._assert Prims.b2t FStar.Seq.Base.index
(*
   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.Seq.Sorted

open FStar.Seq

type sorted_pred (#a:eqtype) (f:tot_ord a) (s:seq a) : Type0 =
  forall (i j: (k:nat{k<length s})). i <= j ==> f (index s i) (index s j)

val sorted_pred_tail :
  #a:eqtype ->
  f:tot_ord a ->
  s:seq a{length s > 0} ->
  Lemma (requires (sorted_pred #a f s)) (ensures (sorted_pred #a f (tail s)))
let sorted_pred_tail #a f s = ()

val sorted_pred_sorted_lemma :
  #a:eqtype ->
  f:tot_ord a ->
  s:seq a ->
  Lemma (requires (sorted_pred f s)) (ensures (sorted #a f s == true)) (decreases (length s))
val sorted_pred_sorted_lemma :
  #a:eqtype ->
  f:tot_ord a ->
  s:seq a ->
  Lemma (requires (sorted_pred f s)) (ensures (sorted #a f s == true)) (decreases (length s))
f: FStar.Seq.Properties.tot_ord a -> s: FStar.Seq.Base.seq a
  -> FStar.Pervasives.Lemma (requires FStar.Seq.Sorted.sorted_pred f s)
      (ensures FStar.Seq.Properties.sorted f s == true)
      (decreases FStar.Seq.Base.length s)