Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/theories/Corelib/Numbers/Cyclic/Int63/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 1 kB image not shown  

Quelle  Sint63Axioms.v   Sprache: Coq

 
(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(*            Benjamin Gregoire, Laurent Thery, INRIA, 2007             *)
(************************************************************************)

From Corelib Require Import BinNums PosDef IntDef.
From Corelib Require Export PrimInt63 Uint63Axioms.

Local Open Scope Z_scope.

Local Notation "2" := (Zpos 2) : Z_scope.
Local Infix "^" := Z.pow : Z_scope.
Local Notation "x <= y" := (Z.compare x y <> Gt) : Z_scope.
Local Notation "x < y" := (Z.compare x y = Lt) : Z_scope.

Definition min_int := Eval vm_compute in (lsl 1 62).

(** Translation to and from Z *)
Definition to_Z (i : int) :=
  if ltb i min_int then to_Z i
  else Z.opp (to_Z (sub 0 i)).

(** Specification of operations that differ on signed and unsigned ints *)

Axiom asr_spec : forall x p, to_Z (asr x p) = Z.div (to_Z x) (2 ^ (to_Z p)).

Axiom div_spec : forall x y,
    to_Z x <> to_Z min_int \/ to_Z y <> Zneg 1 ->
  to_Z (divs x y) = Z.quot (to_Z x) (to_Z y).

Axiom mod_spec : forall x y, to_Z (mods x y) = Z.rem (to_Z x) (to_Z y).

Axiom ltb_spec : forall x y, ltsb x y = true <-> to_Z x < to_Z y.

Axiom leb_spec : forall x y, lesb x y = true <-> to_Z x <= to_Z y.

Axiom compare_spec : forall x y, compares x y = Z.compare (to_Z x) (to_Z y).

Messung V0.5
C=71 H=100 G=86

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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 und die Messung sind noch experimentell.