(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* 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 Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
(*s Decision procedure for arithmetic formulas by looking for negative cycles in  a graph *)
Unset Standard Proposition Elimination Names.
Section ConstraintGraphs.
(*s Axiomatisation of the domain of interpretation [D] *)
Variable D : Set.
Variable Dz : D.
Variable Dplus : D -> D -> D.
Variable Dneg : D -> D.
Variable Dle : D -> D -> bool.
Variable Dplus_d_z : forall d : D, Dplus d Dz = d.
Variable Dplus_z_d : forall d : D, Dplus Dz d = d.
Variable
Dplus_assoc :
forall d d' d'' : D, Dplus (Dplus d d') d'' = Dplus d (Dplus d' d'').
Variable Dplus_neg : forall d : D, Dplus d (Dneg d) = Dz.
Variable Dle_refl : forall d : D, Dle d d = true.
Variable
Dle_antisym :
forall d d' : D, Dle d d' = true -> Dle d' d = true -> d = d'.
Variable
Dle_trans :
forall d d' d'' : D,
Dle d d' = true -> Dle d' d'' = true -> Dle d d'' = true.
Variable Dle_total : forall d d' : D, {Dle d d' = true} + {Dle d' d = true}.
Variable
Dle_plus_mono :
forall d d' d'' d''' : D,
Dle d d' = true ->
Dle d'' d''' = true -> Dle (Dplus d d'') (Dplus d' d''') = true.
(*s Properties of [Dle] *)

Lemma Dle_true_permut :
forall d d' : D, Dle d d' = true -> {Dle d' d = false} + {d = d'}.