(* 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                                                     *)
(* définition des fonctions de modification des adresses *)
Definition uad_conv_0 (a : ad) : ad :=
match a with
| N0 => N0
| Npos p => Npos (xO p)
end.
Definition uad_conv_1 (a : ad) : ad :=
match a with
| N0 => Npos 1
| Npos p => Npos (xI p)
end.

(* Specifications: *)
Lemma adcnv_inj0 : forall a b : ad, uad_conv_0 a = uad_conv_0 b -> a = b.
Lemma adcnv_inj1 : forall a b : ad, uad_conv_1 a = uad_conv_1 b -> a = b.
Lemma adcnv_ok : forall a b : ad, uad_conv_0 a <> uad_conv_1 b.
Lemma adcnv_disj :
forall a : ad, exists b : ad, a = uad_conv_0 b \/ a = uad_conv_1 b.