Section ROOT_SUCC.
Inductive legal_as_set : Config -> Set :=
intro_leg : forall c : Config, legal c -> legal_as_set c.
Definition legal_config := sigT legal_as_set.
Definition get_c (lc : sigT legal_as_set) :=
match lc with
| existT c L => c
end.
(* WATCH OUT: successor is first argument, predecessor is second *)
Definition no_copy_succ (lc2 lc1 : legal_config) :=
exists t : class_trans (get_c lc1),
get_c lc2 = transition (get_c lc1) t /\ ~ copy_p (get_c lc1) t.
Definition convert_to_nat (n : Z) :=
match n with
| Zpos x => nat_of_P x
| _ => 0
end.
Definition no_copy_measure (lc : legal_config) :=
match lc with
| existT c _ => convert_to_nat (termination_measure c)
end.
Definition decidable_relation (E : Set) (R : E -> E -> Prop) :=
forall x : E, {y : E | R y x} + {(forall y : E, ~ R y x)}.
Axiom
or_rec : forall (A B : Prop) (P : Set), (A -> P) -> (B -> P) -> A \/ B -> P.
Axiom
ex_rec :
forall (A : Set) (P : A -> Prop) (P0 : Set),
(forall x : A, P x -> P0) -> ex P -> P0.
Definition relation_decreases (E : Set) (R : E -> E -> Prop)
(f : E -> nat) := forall x y : E, R x y -> f x < f y.
Axiom
Z_nat_axiom :
forall x y : Z,
(0 <= x)%Z ->
(0 <= y)%Z -> (y < x)%Z -> convert_to_nat y < convert_to_nat x.
(*  What I want to prove. Lemma Z_nat_business2: (x:Z)  `0<=x` -> `0<x` -> (lt (0) (convert_to_nat `x`)).  Lemma Z_nat_business3: (x,y:Z)  `0<=x` -> `0<=y` -> `y<x` -> (lt (convert y) (convert x)).  Lemma Z_nat_business4: (x,y:positive)  (lt (convert y) (convert x)) -> (lt (convert y) (convert x)).  *)
(* use Theorem bij1 : (m:nat) (convert (anti_convert m)) = (S m). *)
Definition last_successor :=
root legal_config no_copy_measure no_copy_succ decidable_no_copy_succ
no_copy_succ_decreases.
(* QUESTION:  What does the following lemma mean? That there is a given transition sequence that terminates or that all of them terminate? *)

Lemma last_successor_has_no_message :
forall y0 : legal_config, no_message (get_c (last_successor y0)).