(* Copyright (C) 2012  G. Gonthier, B. Ziliani, A. Nanevski, D. Dreyer  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>. *)
From mathcomp
From LemmaOverloading
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
(* A more symmetric implementation, which triggers on inequality, not on  *)
(* x or y.  It works by firing on any boolean, and then rejecting those   *)
(* that are not of the form x != y.  Thus, it can be composed with lemmas *)
(* that expect a boolean, but not with lemmas that that are more specific *)
(* and demand that the booleam is an inequality.                          *)
Module NoAlias2.
Section NoAlias2Section.
Structure tagged_bool (x y : ptr) := Tag {untag : bool}.
Local Coercion untag : tagged_bool >-> bool.
Canonical Structure ineq x y := @Tag x y (x != y).
Structure form x y (s : seq ptr) :=
Form {eq_of : tagged_bool x y;
_ : uniq s -> untag eq_of}.

(* Specifications: *)
Lemma start_pf (x y : ptr) (f : Search2.form x y) : uniq f -> ineq x y.