let index_fun #a (s:seq a) = nat_at_most (S.length s) -> nat_at_most (S.length s)
let index_fun #a (s: seq a) =
nat_at_most (S.length s) -> nat_at_most (S.length s)
FStar.Sequence.Permutation.fsti.checked
prims.fst.checked FStar.Sequence.Util.fst.checked FStar.Sequence.fst.checked FStar.Pervasives.fsti.checked FStar.Algebra.CommMonoid.fst.checked
FStar.Sequence.Permutation.fsti
FStar.Sequence.Base.seq FStar.Sequence.Permutation.nat_at_most FStar.Sequence.Base.length
(*
   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 FStar.Sequence.Permutation
open FStar.Sequence
open FStar.Sequence.Util
module S = FStar.Sequence
(* This module defines a permutation on sequences as a bijection among
   the sequence indices relating equal elements.

   It defines a few utilities to work with such permutations.

   Notably:

   1. Given two sequence with equal element counts, it constructs a
      permutation.

   2. Folding the multiplication of a commutative monoid over a
      sequence and its permutation produces the same result
*)

(* A bounded natural number *)
let nat_at_most (n:nat) = m:nat { m < n }
val index_fun : s: FStar.Sequence.Base.seq a -> Type0
s: FStar.Sequence.Base.seq a -> Type0