%------------------------------------------------------------------------ % % sort_array (basic definitions and properties) % ------------------------------------------- % % Author: Ricky W. Butler % % This theory defines the sort function over an array of % values. % % Defines: % % permutation_of?(A1,A2): bool = (EXISTS (f: [below(N) -> below(N)]): % bijective?(f) AND (FORALL ii: A1(ii) = A2(f(ii)))) % % sorted?(A): bool = (FORALL i,j: 0 <= i AND i < j AND j < N % IMPLIES A(i) <= A(j)) % % sort(A): {a: arrays | permutation_of?(A,a) AND sorted?(a)} % % Note: % % The properties of sort are readily obtained via % TYPEPRED "sort" or through use of sort_lem. % %------------------------------------------------------------------------
sort_array[N: nat, T: TYPE, <= : (total_order?[T]) ]: THEORY
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.