Bool.v 1.76 KB
Newer Older
1 2 3
(********************************************************************)
(*                                                                  *)
(*  The Why3 Verification Platform   /   The Why3 Development Team  *)
Guillaume Melquiond's avatar
Guillaume Melquiond committed
4
(*  Copyright 2010-2018   --   Inria - CNRS - Paris-Sud University  *)
5 6 7 8 9 10 11
(*                                                                  *)
(*  This software is distributed under the terms of the GNU Lesser  *)
(*  General Public License version 2.1, with the special exception  *)
(*  on linking described in file LICENSE.                           *)
(*                                                                  *)
(********************************************************************)

12 13
(* This file is generated by Why3's Coq-realize driver *)
(* Beware! Only edit allowed sections below    *)
14 15 16 17 18
Require Import BuiltIn.
Require BuiltIn.

(* Why3 goal *)
Lemma andb_def : forall (x:bool) (y:bool),
Guillaume Melquiond's avatar
Guillaume Melquiond committed
19
  ((Init.Datatypes.andb x y) = match x with
20 21 22 23 24 25 26 27 28 29
  | true => y
  | false => false
  end).
Proof.
intros x y.
apply refl_equal.
Qed.

(* Why3 goal *)
Lemma orb_def : forall (x:bool) (y:bool),
Guillaume Melquiond's avatar
Guillaume Melquiond committed
30
  ((Init.Datatypes.orb x y) = match x with
31 32 33 34 35 36 37 38 39 40
  | false => y
  | true => true
  end).
Proof.
intros x y.
apply refl_equal.
Qed.

(* Why3 goal *)
Lemma notb_def : forall (x:bool),
Guillaume Melquiond's avatar
Guillaume Melquiond committed
41
  ((Init.Datatypes.negb x) = match x with
42 43 44 45 46 47 48 49
  | false => true
  | true => false
  end).
Proof.
intros x.
apply refl_equal.
Qed.

Clement Fumex's avatar
Clement Fumex committed
50 51 52 53 54 55 56 57 58 59 60
(* Why3 goal *)
Lemma xorb_def : forall (x:bool) (y:bool),
  ((Init.Datatypes.xorb x y) = match x with
  | false => y
  | true => (Init.Datatypes.negb y)
  end).
Proof.
intros x y.
destruct x; destruct y; auto.
Qed.

61
(* Why3 goal *)
Guillaume Melquiond's avatar
Guillaume Melquiond committed
62
Lemma implb_def : forall (x:bool) (y:bool),
Clement Fumex's avatar
Clement Fumex committed
63 64 65
  ((Init.Datatypes.implb x y) = match x with
  | false => true
  | true => y
66 67 68 69 70
  end).
Proof.
now intros [|] [|].
Qed.