Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
(* <O___,, * (see CREDITS file for the list of authors) *)
(* \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) *)
(************************************************************************)
(* Cuihtlauac Alvarado - octobre 2000 *)
Properties of a boolean equality
Require Export Bool. Section Bool_eq_dec. Variable A : Set. Variable beq : A -> A -> bool. Variable beq_refl : forall x:A, true = beq x x. Variable beq_eq : forall x y:A, true = beq x y -> x = y.A:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, x = y -> true = beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, x = y -> true = beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x = ytrue = beq x yapply beq_refl. Defined.A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x = ytrue = beq x xA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, x = y -> false <> beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, x = y -> false <> beq x yrewrite <- beq_eq_true; trivial; discriminate. Defined.A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:Ae:x = yfalse <> beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, false = beq x y -> x <> yexact (fun (x y:A) (H:false = beq x y) (e:x = y) => beq_eq_not_false x y e H). Defined.A:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, false = beq x y -> x <> yA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, {b : bool | b = beq x y}A:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, {b : bool | b = beq x y}A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:A{b : bool | b = beq x y}constructor. Defined.A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:Abeq x y = beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, x <> y -> false = beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, x <> y -> false = beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x <> yfalse = beq x yA:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x <> ybeq x y = falseA:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x <> ybeq x y <> trueA:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x <> yH0:beq x y = trueFalseA:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x <> yH0:beq x y = truex = yA:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x <> yH0:beq x y = truetrue = beq x yassumption. Defined.A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:AH:x <> yH0:beq x y = truebeq x y = trueA:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, {x = y} + {x <> y}A:Setbeq:A -> A -> boolbeq_refl:forall x : A, true = beq x xbeq_eq:forall x y : A, true = beq x y -> x = yforall x y : A, {x = y} + {x <> y}A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:Aforall x0 : bool, x0 = beq x y -> {x = y} + {x <> y}A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:Ab:boolH:true = beq x y{x = y} + {x <> y}A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:Ab:boolH:false = beq x y{x = y} + {x <> y}left; apply beq_eq; assumption.A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:Ab:boolH:true = beq x y{x = y} + {x <> y}right; apply beq_false_not_eq; assumption. Defined. End Bool_eq_dec.A:Setbeq:A -> A -> boolbeq_refl:forall x0 : A, true = beq x0 x0beq_eq:forall x0 y0 : A, true = beq x0 y0 -> x0 = y0x, y:Ab:boolH:false = beq x y{x = y} + {x <> y}