Definition Diveucl (a b q r : nat) : Prop := a = b * q + r /\ r < b.Definition Zero : inf 1 := Val_bound 0 Nil.Definition factorizable : Prop :=
     forall (m n : nat) (q q' : inf m) (r r' : inf n) 
       (a a1 a' : A) (x x' : inf (m * n)),
     Diveucl (val_inf (m * n) x) n (val_inf m q) (val_inf n r) ->
     Diveucl (val_inf (m * n) x') n (val_inf m q') (val_inf n r') ->
     R m a q q' a1 -> R n a1 r r' a' -> R (m * n) a x x' a'.Definition proper : Prop := forall a : A, R 1 a Zero Zero a.

Lemma fact_Rel : factorizable R -> forall (n : nat) (X Y : Num (S n)) (a a' : A), R (exp b n) (FR b a (Hd Digit n X) (Hd Digit n Y)) (Val_bound n (Tl (S n) X)) (Val_bound n (Tl (S n) Y)) a' -> R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a'.