Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
This file is part of the Flocq formalization of floating-point
arithmetic in Coq: http://flocq.gforge.inria.fr/
Copyright (C) 2011-2018 Sylvie Boldo
Copyright (C) 2011-2018 Guillaume Melquiond
This library 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 3 of the License, or (at your option) any later version.
This library 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
COPYING file for more details.
Copyright (C) 2011-2018 Guillaume Melquiond
From Coq Require Import ZArith Zquot. Require Import Zaux. Require Import SpecFloatCompat. Notation digits2_pos := digits2_pos (only parsing). Notation Zdigits2 := Zdigits2 (only parsing).
Number of bits (radix 2) of a positive integer.
It serves as an upper bound on the number of digits to ensure termination.
Fixpoint digits2_Pnat (n : positive) : nat := match n with | xH => O | xO p => S (digits2_Pnat p) | xI p => S (digits2_Pnat p) end.forall n : positive, let d := digits2_Pnat n in (Zpower_nat 2 d <= Z.pos n < Zpower_nat 2 (S d))%Zforall n : positive, let d := digits2_Pnat n in (Zpower_nat 2 d <= Z.pos n < Zpower_nat 2 (S d))%Zn:positived:=digits2_Pnat n:nat(Zpower_nat 2 d <= Z.pos n < Zpower_nat 2 (S d))%Zn:positived:=digits2_Pnat n:nat(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Zn:positive(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Zn:positiveHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%Z(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Zn:positiveHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%ZIHn:(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Z(Zpower_nat 2 (S (digits2_Pnat n)) <= Z.pos n~1 < Zpower_nat 2 (S (S (digits2_Pnat n))))%Zn:positiveHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%ZIHn:(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Z(Zpower_nat 2 (S (digits2_Pnat n)) <= Z.pos n~0 < Zpower_nat 2 (S (S (digits2_Pnat n))))%ZHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%Z(Zpower_nat 2 0 <= 1 < Zpower_nat 2 1)%Zn:positiveHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%ZIHn:(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Z(2 * Zpower_nat 2 (digits2_Pnat n) <= 2 * Z.pos n + 1 < 2 * Zpower_nat 2 (S (digits2_Pnat n)))%Zn:positiveHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%ZIHn:(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Z(Zpower_nat 2 (S (digits2_Pnat n)) <= Z.pos n~0 < Zpower_nat 2 (S (S (digits2_Pnat n))))%ZHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%Z(Zpower_nat 2 0 <= 1 < Zpower_nat 2 1)%Zn:positiveHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%ZIHn:(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Z(Zpower_nat 2 (S (digits2_Pnat n)) <= Z.pos n~0 < Zpower_nat 2 (S (S (digits2_Pnat n))))%ZHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%Z(Zpower_nat 2 0 <= 1 < Zpower_nat 2 1)%Zn:positiveHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%ZIHn:(Zpower_nat 2 (digits2_Pnat n) <= Z.pos n < Zpower_nat 2 (S (digits2_Pnat n)))%Z(2 * Zpower_nat 2 (digits2_Pnat n) <= 2 * Z.pos n < 2 * Zpower_nat 2 (S (digits2_Pnat n)))%ZHp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%Z(Zpower_nat 2 0 <= 1 < Zpower_nat 2 1)%Znow split. Qed. Section Fcore_digits. Variable beta : radix. Definition Zdigit n k := Z.rem (Z.quot n (Zpower beta k)) beta.Hp:forall m : nat, Zpower_nat 2 (S m) = (2 * Zpower_nat 2 m)%Z(Zpower_nat 2 0 <= 1 < Zpower_nat 2 1)%Zbeta:radixforall n k : Z, (k < 0)%Z -> Zdigit n k = 0%Zbeta:radixforall n k : Z, (k < 0)%Z -> Zdigit n k = 0%Znow case n. Qed.beta:radixn:Zk:positiveHk:(Z.neg k < 0)%ZZdigit n (Z.neg k) = 0%Zbeta:radixforall k : Z, Zdigit 0 k = 0%Zbeta:radixforall k : Z, Zdigit 0 k = 0%Zbeta:radixk:ZZdigit 0 k = 0%Zbeta:radixk:ZZ.rem (0 ÷ beta ^ k) beta = 0%Zapply Zrem_0_l. Qed.beta:radixk:ZZ.rem 0 beta = 0%Zbeta:radixforall n k : Z, Zdigit (- n) k = (- Zdigit n k)%Zbeta:radixforall n k : Z, Zdigit (- n) k = (- Zdigit n k)%Zbeta:radixn, k:ZZdigit (- n) k = (- Zdigit n k)%Zbeta:radixn, k:ZZ.rem (- n ÷ beta ^ k) beta = (- Z.rem (n ÷ beta ^ k) beta)%Zapply Zrem_opp_l. Qed.beta:radixn, k:ZZ.rem (- (n ÷ beta ^ k)) beta = (- Z.rem (n ÷ beta ^ k) beta)%Zbeta:radixforall e n : Z, (0 <= n < beta ^ e)%Z -> forall k : Z, (e <= k)%Z -> Zdigit n k = 0%Zbeta:radixforall e n : Z, (0 <= n < beta ^ e)%Z -> forall k : Z, (e <= k)%Z -> Zdigit n k = 0%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%ZZdigit n k = 0%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%ZZ.rem (n ÷ beta ^ k) beta = 0%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%ZZ.rem 0 beta = 0%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= n < beta ^ k)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= n < beta ^ k)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= n)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(n < beta ^ k)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(n < beta ^ k)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(beta ^ e <= beta ^ k)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(beta ^ e <= beta ^ (e + (k - e)))%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(beta ^ e <= beta ^ e * beta ^ (k - e))%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(beta ^ e * 1 <= beta ^ e * beta ^ (k - e))%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(1 <= beta ^ (k - e))%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= beta ^ e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 < beta ^ (k - e))%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= beta ^ e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= beta ^ e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= beta ^ e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 < beta ^ e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 < beta ^ e)%Z -> (0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixe:Z(0 < beta ^ e)%Z -> (0 <= e)%Zbeta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Znow apply Zle_minus_le_0. Qed.beta:radixe, n:ZHn:(0 <= n < beta ^ e)%Zk:ZHk:(e <= k)%Z(0 <= k - e)%Zbeta:radixforall e n : Z, (Z.abs n < beta ^ e)%Z -> forall k : Z, (e <= k)%Z -> Zdigit n k = 0%Zbeta:radixforall e n : Z, (Z.abs n < beta ^ e)%Z -> forall k : Z, (e <= k)%Z -> Zdigit n k = 0%Zbeta:radixe:ZHn:(Z.abs 0 < beta ^ e)%Zk:Z(e <= k)%Z -> Zdigit 0 k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.pos n) < beta ^ e)%Zk:Z(e <= k)%Z -> Zdigit (Z.pos n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:Z(e <= k)%Z -> Zdigit (Z.neg n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.pos n) < beta ^ e)%Zk:Z(e <= k)%Z -> Zdigit (Z.pos n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:Z(e <= k)%Z -> Zdigit (Z.neg n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.pos n) < beta ^ e)%Zk:Z(0 <= Z.pos n < beta ^ e)%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:Z(e <= k)%Z -> Zdigit (Z.neg n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:Z(e <= k)%Z -> Zdigit (Z.neg n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:ZHe:(e <= k)%ZZdigit (Z.neg n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:ZHe:(e <= k)%ZZdigit (- Z.pos n) k = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:ZHe:(e <= k)%Z(- Zdigit (Z.pos n) k)%Z = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:ZHe:(e <= k)%Z(- 0)%Z = 0%Zbeta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:ZHe:(e <= k)%Z(0 <= Z.pos n < beta ^ e)%Znow split. Qed.beta:radixe:Zn:positiveHn:(Z.abs (Z.neg n) < beta ^ e)%Zk:ZHe:(e <= k)%Z(0 <= Z.pos n < beta ^ e)%Zbeta:radixforall e n : Z, (0 <= e)%Z -> (beta ^ e <= n < beta ^ (e + 1))%Z -> Zdigit n e <> 0%Zbeta:radixforall e n : Z, (0 <= e)%Z -> (beta ^ e <= n < beta ^ (e + 1))%Z -> Zdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZZdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZZ.rem (n ÷ beta ^ e) beta <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(Z.rem n (beta ^ e * beta) ÷ beta ^ e)%Z <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(n ÷ beta ^ e)%Z <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%ZFalsebeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(n < beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(beta ^ e * (n ÷ beta ^ e) + Z.rem n (beta ^ e) < beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(Z.rem n (beta ^ e) < beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(0 <= n)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(0 < beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(0 <= beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(0 < beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%ZH:(n ÷ beta ^ e)%Z = 0%Z(0 < beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= n)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(0 <= beta ^ e)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(n < beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(n < beta ^ (e + 1))%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(beta ^ (e + 1))%Z = (beta ^ e * beta)%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(beta ^ (e + 1))%Z = (beta ^ e * beta)%Znow apply (Zpower_plus beta e 1). Qed.beta:radixe, n:ZHe:(0 <= e)%ZHn1:(beta ^ e <= n)%ZHn2:(n < beta ^ (e + 1))%Z(beta ^ (e + 1))%Z = (beta ^ e * (beta * 1))%Zbeta:radixforall e n : Z, (0 <= e)%Z -> (beta ^ e <= Z.abs n < beta ^ (e + 1))%Z -> Zdigit n e <> 0%Zbeta:radixforall e n : Z, (0 <= e)%Z -> (beta ^ e <= Z.abs n < beta ^ (e + 1))%Z -> Zdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= Z.abs n < beta ^ (e + 1))%ZZdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= Z.abs n < beta ^ (e + 1))%ZHn':(0 <= n)%ZZdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= Z.abs n < beta ^ (e + 1))%ZHn':(n < 0)%ZZdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= n < beta ^ (e + 1))%ZHn':(0 <= n)%ZZdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= Z.abs n < beta ^ (e + 1))%ZHn':(n < 0)%ZZdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= Z.abs n < beta ^ (e + 1))%ZHn':(n < 0)%ZZdigit n e <> 0%Zbeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= Z.abs n < beta ^ (e + 1))%ZHn':(n < 0)%ZH:Zdigit n e = 0%ZFalsebeta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= - n < beta ^ (e + 1))%ZHn':(n < 0)%ZH:Zdigit n e = 0%ZFalsenow rewrite Zdigit_opp, H. Qed.beta:radixe, n:ZHe:(0 <= e)%ZHn:(beta ^ e <= - n < beta ^ (e + 1))%ZHn':(n < 0)%ZH:Zdigit n e = 0%ZZdigit (- n) e = 0%Zbeta:radixforall n k k' : Z, (0 <= k')%Z -> Zdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixforall n k k' : Z, (0 <= k')%Z -> Zdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k' <= k)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZHk':(0 <= k')%Zforall k : Z, (k' <= k)%Z -> Zdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZHk':(0 <= k')%Zforall x : Z, (forall y : Z, (0 <= y < x)%Z -> forall k : Z, (y <= k)%Z -> Zdigit (n * beta ^ y) k = Zdigit n (k - y)) -> (0 <= x)%Z -> forall k : Z, (x <= k)%Z -> Zdigit (n * beta ^ x) k = Zdigit n (k - x)beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn:Zforall x : Z, (forall y : Z, (0 <= y < x)%Z -> forall k : Z, (y <= k)%Z -> Zdigit (n * beta ^ y) k = Zdigit n (k - y)) -> (0 <= x)%Z -> forall k : Z, (x <= k)%Z -> Zdigit (n * beta ^ x) k = Zdigit n (k - x)beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%ZZ.rem (n * beta ^ k' ÷ beta ^ k) beta = Z.rem (n ÷ beta ^ (k - k')) betabeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(n * beta ^ k' ÷ beta ^ k)%Z = (n ÷ beta ^ (k - k'))%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(n * beta ^ k' ÷ beta ^ (k - k' + k'))%Z = (n ÷ beta ^ (k - k'))%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(n * beta ^ k' ÷ (beta ^ (k - k') * beta ^ k'))%Z = (n ÷ beta ^ (k - k'))%Zbeta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(0 <= k - k')%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(beta ^ k')%Z <> 0%Zbeta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(0 <= k - k')%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(0 < beta ^ k')%Zbeta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(0 <= k - k')%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k':ZIHk':forall y : Z, (0 <= y < k')%Z -> forall k0 : Z, (y <= k0)%Z -> Zdigit (n * beta ^ y) k0 = Zdigit n (k0 - y)Hk':(0 <= k')%Zk:ZH:(k' <= k)%Z(0 <= k - k')%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZdigit (n * beta ^ k') k = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * beta ^ k' ÷ beta ^ k) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * beta ^ (k' - k + k) ÷ beta ^ k) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * (beta ^ (k' - k) * beta ^ k) ÷ beta ^ k) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * beta ^ (k' - k)) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * beta ^ (k' - k - 1 + 1)) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * (beta ^ (k' - k - 1) * beta ^ 1)) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * beta ^ (k' - k - 1) * beta ^ 1) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * beta ^ (k' - k - 1) * (beta * 1)) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%ZZ.rem (n * beta ^ (k' - k - 1) * beta) beta = 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 < beta ^ k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(0 <= k' - k)%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(0 <= k)%Z(k <= k')%Zbeta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit (n * beta ^ k') k = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%Z0%Z = Zdigit n (k - k')beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%ZZdigit n (k - k') = 0%Zomega. Qed.beta:radixn, k, k':ZHk':(0 <= k')%ZH:(k < k')%ZH0:(k < 0)%Z(k - k' < 0)%Zbeta:radixforall n k k' : Z, (0 <= k)%Z -> (0 <= k')%Z -> Zdigit (n ÷ beta ^ k') k = Zdigit n (k + k')beta:radixforall n k k' : Z, (0 <= k)%Z -> (0 <= k')%Z -> Zdigit (n ÷ beta ^ k') k = Zdigit n (k + k')beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%ZZdigit (n ÷ beta ^ k') k = Zdigit n (k + k')beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%ZZ.rem (n ÷ beta ^ k' ÷ beta ^ k) beta = Z.rem (n ÷ beta ^ (k + k')) betabeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%ZZ.rem (n ÷ (beta ^ k' * beta ^ k)) beta = Z.rem (n ÷ beta ^ (k + k')) betanow rewrite Zpower_plus. Qed.beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%ZZ.rem (n ÷ (beta ^ k' * beta ^ k)) beta = Z.rem (n ÷ beta ^ (k' + k)) betabeta:radixforall n k k' : Z, (k < k')%Z -> Zdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixforall n k k' : Z, (k < k')%Z -> Zdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ k') ÷ beta ^ k) beta = Z.rem (n ÷ beta ^ k) betabeta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%Z(Z.rem (Z.rem n (beta ^ k')) (beta ^ k * beta) ÷ beta ^ k)%Z = (Z.rem n (beta ^ k * beta) ÷ beta ^ k)%Zbeta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ k')) (beta ^ k * beta) = Z.rem n (beta ^ k * beta)beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ (k + 1 + (k' - (k + 1))))) (beta ^ k * beta) = Z.rem n (beta ^ k * beta)beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ (k + 1) * beta ^ (k' - (k + 1)))) (beta ^ k * beta) = Z.rem n (beta ^ k * beta)beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ (k' - (k + 1)) * beta ^ (k + 1))) (beta ^ k * beta) = Z.rem n (beta ^ k * beta)beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ (k' - (k + 1)) * (beta ^ k * beta ^ 1))) (beta ^ k * beta) = Z.rem n (beta ^ k * beta)beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ (k' - (k + 1)) * (beta ^ k * (beta * 1)))) (beta ^ k * beta) = Z.rem n (beta ^ k * beta)beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixn, k, k':ZHk:(k < k')%ZH:(0 <= k)%ZZ.rem (Z.rem n (beta ^ (k' - (k + 1)) * (beta ^ k * beta))) (beta ^ k * beta) = Z.rem n (beta ^ k * beta)beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n know rewrite 2!Zdigit_lt. Qed.beta:radixn, k, k':ZHk:(k < k')%ZH:(k < 0)%ZZdigit (Z.rem n (beta ^ k')) k = Zdigit n kbeta:radixforall n k k' : Z, (0 <= k' <= k)%Z -> Zdigit (Z.rem n (beta ^ k')) k = 0%Zbeta:radixforall n k k' : Z, (0 <= k' <= k)%Z -> Zdigit (Z.rem n (beta ^ k')) k = 0%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%ZZdigit (Z.rem n (beta ^ k')) k = 0%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%ZZ.rem (Z.rem n (beta ^ k') ÷ beta ^ k) beta = 0%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%ZZ.rem 0 beta = 0%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(Z.abs (Z.rem n (beta ^ k')) < beta ^ k)%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(Z.abs (Z.rem n (beta ^ k')) < beta ^ k)%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(Z.abs (Z.rem n (beta ^ k')) < beta ^ k')%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(beta ^ k' <= beta ^ k)%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(Z.abs (Z.rem n (beta ^ k')) < Z.abs (beta ^ k'))%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(beta ^ k' <= beta ^ k)%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(beta ^ k')%Z <> 0%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(beta ^ k' <= beta ^ k)%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(0 < beta ^ k')%Zbeta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(beta ^ k' <= beta ^ k)%Znow apply Zpower_le. Qed. Fixpoint Zsum_digit f k := match k with | O => Z0 | S k => (Zsum_digit f k + f (Z_of_nat k) * Zpower beta (Z_of_nat k))%Z end.beta:radixn, k, k':ZHk:(0 <= k' <= k)%Z(beta ^ k' <= beta ^ k)%Zbeta:radixforall (n : Z) (k : nat), Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)beta:radixforall (n : Z) (k : nat), Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)beta:radixn:Zforall k : nat, Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)beta:radixn:ZZsum_digit (Zdigit n) 0 = Z.rem n (beta ^ Z.of_nat 0)beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)Zsum_digit (Zdigit n) (S k) = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:ZZ.rem n (beta ^ Z.of_nat 0) = Zsum_digit (Zdigit n) 0beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)Zsum_digit (Zdigit n) (S k) = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)Zsum_digit (Zdigit n) (S k) = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(Zsum_digit (Zdigit n) k + Zdigit n (Z.of_nat k) * beta ^ Z.of_nat k)%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(Z.rem n (beta ^ Z.of_nat k) + Zdigit n (Z.of_nat k) * beta ^ Z.of_nat k)%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(Z.rem n (beta ^ Z.of_nat k) + Z.rem (n ÷ beta ^ Z.of_nat k) beta * beta ^ Z.of_nat k)%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(Z.rem n (beta ^ Z.of_nat k) + Z.rem n (beta ^ Z.of_nat k * beta) ÷ beta ^ Z.of_nat k * beta ^ Z.of_nat k)%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(Z.rem (Z.rem n (beta * beta ^ Z.of_nat k)) (beta ^ Z.of_nat k) + Z.rem n (beta ^ Z.of_nat k * beta) ÷ beta ^ Z.of_nat k * beta ^ Z.of_nat k)%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(Z.rem (Z.rem n (beta ^ Z.of_nat k * beta)) (beta ^ Z.of_nat k) + Z.rem n (beta ^ Z.of_nat k * beta) ÷ beta ^ Z.of_nat k * beta ^ Z.of_nat k)%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(Z.rem (Z.rem n (beta ^ Z.of_nat (S k))) (beta ^ Z.of_nat k) + Z.rem n (beta ^ Z.of_nat (S k)) ÷ beta ^ Z.of_nat k * beta ^ Z.of_nat k)%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(beta ^ Z.of_nat (S k))%Z = (beta ^ Z.of_nat k * beta)%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(beta ^ Z.of_nat k * (Z.rem n (beta ^ Z.of_nat (S k)) ÷ beta ^ Z.of_nat k) + Z.rem (Z.rem n (beta ^ Z.of_nat (S k))) (beta ^ Z.of_nat k))%Z = Z.rem n (beta ^ Z.of_nat (S k))beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(beta ^ Z.of_nat (S k))%Z = (beta ^ Z.of_nat k * beta)%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)Z.rem n (beta ^ Z.of_nat (S k)) = (beta ^ Z.of_nat k * (Z.rem n (beta ^ Z.of_nat (S k)) ÷ beta ^ Z.of_nat k) + Z.rem (Z.rem n (beta ^ Z.of_nat (S k))) (beta ^ Z.of_nat k))%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(beta ^ Z.of_nat (S k))%Z = (beta ^ Z.of_nat k * beta)%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(beta ^ Z.of_nat (S k))%Z = (beta ^ Z.of_nat k * beta)%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(beta ^ Z.succ (Z.of_nat k))%Z = (beta ^ Z.of_nat k * beta)%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(beta ^ Z.succ (Z.of_nat k))%Z = (beta ^ Z.of_nat k * (beta * 1))%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(0 <= Z.of_nat k)%Zbeta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(0 <= 1)%Zeasy. Qed.beta:radixn:Zk:natIHk:Zsum_digit (Zdigit n) k = Z.rem n (beta ^ Z.of_nat k)(0 <= 1)%Zbeta:radixforall n1 n2 : Z, (forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k) -> n1 = n2beta:radixforall n1 n2 : Z, (forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k) -> n1 = n2beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kn1 = n2beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.rem n1 (beta ^ Z.max (Z.abs n1) (Z.abs n2)) = n2beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.rem n1 (beta ^ Z.max (Z.abs n1) (Z.abs n2)) = Z.rem n2 (beta ^ Z.max (Z.abs n1) (Z.abs n2))beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.rem n1 (beta ^ Z.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2)))) = Z.rem n2 (beta ^ Z.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))))beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZsum_digit (Zdigit n1) (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Zsum_digit (Zdigit n2) (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2)))beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZsum_digit (Zdigit n1) 0 = Zsum_digit (Zdigit n2) 0beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kn:natIHn:Zsum_digit (Zdigit n1) n = Zsum_digit (Zdigit n2) nZsum_digit (Zdigit n1) (S n) = Zsum_digit (Zdigit n2) (S n)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kn:natIHn:Zsum_digit (Zdigit n1) n = Zsum_digit (Zdigit n2) nZsum_digit (Zdigit n1) (S n) = Zsum_digit (Zdigit n2) (S n)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kn:natIHn:Zsum_digit (Zdigit n1) n = Zsum_digit (Zdigit n2) n(Zsum_digit (Zdigit n1) n + Zdigit n1 (Z.of_nat n) * beta ^ Z.of_nat n)%Z = (Zsum_digit (Zdigit n2) n + Zdigit n2 (Z.of_nat n) * beta ^ Z.of_nat n)%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kn:natIHn:Zsum_digit (Zdigit n1) n = Zsum_digit (Zdigit n2) n(Zsum_digit (Zdigit n2) n + Zdigit n2 (Z.of_nat n) * beta ^ Z.of_nat n)%Z = (Zsum_digit (Zdigit n2) n + Zdigit n2 (Z.of_nat n) * beta ^ Z.of_nat n)%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kn:natIHn:Zsum_digit (Zdigit n1) n = Zsum_digit (Zdigit n2) n(0 <= Z.of_nat n)%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kn:natIHn:Zsum_digit (Zdigit n1) n = Zsum_digit (Zdigit n2) n(0 <= Z.of_nat n)%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.of_nat (Z.abs_nat (Z.max (Z.abs n1) (Z.abs n2))) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 kZ.abs (Z.max (Z.abs n1) (Z.abs n2)) = Z.max (Z.abs n1) (Z.abs n2)beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(0 <= Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(0 <= Z.abs n1)%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 <= Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 <= Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 < beta ^ Z.abs n2)%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(beta ^ Z.abs n2 <= beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(beta ^ Z.abs n2 <= beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n2 <= Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 < beta ^ Z.abs n1)%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(beta ^ Z.abs n1 <= beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(beta ^ Z.abs n1 <= beta ^ Z.max (Z.abs n1) (Z.abs n2))%Zapply Z.le_max_l. Qed.beta:radixn1, n2:ZH:forall k : Z, (0 <= k)%Z -> Zdigit n1 k = Zdigit n2 k(Z.abs n1 <= Z.max (Z.abs n1) (Z.abs n2))%Zbeta:radixforall u v n : Z, (0 <= u * v)%Z -> (forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z) -> Z.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixforall u v n : Z, (0 <= u * v)%Z -> (forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z) -> Z.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%ZZ.rem (Z.rem u (beta ^ n) + Z.rem v (beta ^ n)) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(Z.abs (Z.rem u (beta ^ n) + Z.rem v (beta ^ n)) < beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(n <= n)%Z -> (Z.abs (Z.rem u (beta ^ n) + Z.rem v (beta ^ n)) < beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(Z.abs n <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.abs n) + Z.rem v (beta ^ Z.abs n)) < beta ^ Z.abs n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(Z.of_nat (Z.abs_nat n) <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat (Z.abs_nat n)) + Z.rem v (beta ^ Z.of_nat (Z.abs_nat n))) < beta ^ Z.of_nat (Z.abs_nat n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(Z.of_nat 0 <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat 0) + Z.rem v (beta ^ Z.of_nat 0)) < beta ^ Z.of_nat 0)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%Z(Z.of_nat (S p) <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat (S p)) + Z.rem v (beta ^ Z.of_nat (S p))) < beta ^ Z.of_nat (S p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%Z(Z.of_nat (S p) <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat (S p)) + Z.rem v (beta ^ Z.of_nat (S p))) < beta ^ Z.of_nat (S p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%Z(Z.of_nat (S p) <= n)%Z -> (Z.abs (Zsum_digit (Zdigit u) (S p) + Zsum_digit (Zdigit v) (S p)) < beta ^ Z.of_nat (S p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%Z(Z.of_nat (S p) <= n)%Z -> (Z.abs (Zsum_digit (Zdigit u) p + Zdigit u (Z.of_nat p) * beta ^ Z.of_nat p + (Zsum_digit (Zdigit v) p + Zdigit v (Z.of_nat p) * beta ^ Z.of_nat p)) < beta ^ Z.of_nat (S p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%Z(Z.succ (Z.of_nat p) <= n)%Z -> (Z.abs (Zsum_digit (Zdigit u) p + Zdigit u (Z.of_nat p) * beta ^ Z.of_nat p + (Zsum_digit (Zdigit v) p + Zdigit v (Z.of_nat p) * beta ^ Z.of_nat p)) < beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zsum_digit (Zdigit u) p + Zdigit u (Z.of_nat p) * beta ^ Z.of_nat p + (Zsum_digit (Zdigit v) p + Zdigit v (Z.of_nat p) * beta ^ Z.of_nat p)) < beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zsum_digit (Zdigit u) p + Zsum_digit (Zdigit v) p + (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p) < beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zsum_digit (Zdigit u) p + Zsum_digit (Zdigit v) p) + Z.abs ((Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p) < beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zsum_digit (Zdigit u) p + Zsum_digit (Zdigit v) p) + Z.abs ((Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p) < beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zsum_digit (Zdigit u) p + Zsum_digit (Zdigit v) p) < beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs ((Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p) <= (beta - 1) * beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs ((Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p) <= (beta - 1) * beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.of_nat p <= n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs ((Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p) <= (beta - 1) * beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs ((Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p) <= (beta - 1) * beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * Z.abs (beta ^ Z.of_nat p) <= (beta - 1) * beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) * beta ^ Z.of_nat p <= (beta - 1) * beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) <= beta - 1)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= beta ^ Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) <= beta - 1)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Zforall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:Z(Z.abs (Zdigit n k) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:Z(0 < beta)%Zbeta:radixn, k:ZH:(0 < beta)%Z(Z.abs (Zdigit n k) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:Z(0 < 2)%Zbeta:radixn, k:Z(2 <= beta)%Zbeta:radixn, k:ZH:(0 < beta)%Z(Z.abs (Zdigit n k) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:Z(2 <= beta)%Zbeta:radixn, k:ZH:(0 < beta)%Z(Z.abs (Zdigit n k) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:Z(2 <=? beta)%Z = truebeta:radixn, k:ZH:(0 < beta)%Z(Z.abs (Zdigit n k) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:ZH:(0 < beta)%Z(Z.abs (Zdigit n k) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:ZH:(0 < beta)%Z(Z.abs (Zdigit n k) < Z.abs beta)%Zbeta:radixn, k:ZH:(0 < beta)%ZZ.abs beta = Z.succ (beta - 1)beta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:ZH:(0 < beta)%Zbeta <> 0%Zbeta:radixn, k:ZH:(0 < beta)%ZZ.abs beta = Z.succ (beta - 1)beta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:ZH:(0 < beta)%ZZ.abs beta = Z.succ (beta - 1)beta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:ZH:(0 < beta)%Zbeta = Z.succ (beta - 1)beta:radixn, k:ZH:(0 < beta)%Z(0 <= beta)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixn, k:ZH:(0 < beta)%Z(0 <= beta)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(0 <= Z.of_nat p < n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(0 <= Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.of_nat p < n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(Z.of_nat p < n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%Z(n > Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%Z(Z.abs (Zdigit u (Z.of_nat p) + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%ZK:Zdigit u (Z.of_nat p) = 0%Z(Z.abs (0 + Zdigit v (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%ZK:Zdigit v (Z.of_nat p) = 0%Z(Z.abs (Zdigit u (Z.of_nat p) + 0) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%ZK:Zdigit v (Z.of_nat p) = 0%Z(Z.abs (Zdigit u (Z.of_nat p) + 0) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%ZH:forall u0 v0 : Z, (Z.abs (Zdigit u0 v0) < Z.succ (beta - 1))%ZH0:(0 <= Z.of_nat p < n)%ZK:Zdigit v (Z.of_nat p) = 0%Z(Z.abs (Zdigit u (Z.of_nat p)) < Z.succ (beta - 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ Z.succ (Z.of_nat p))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p + (beta - 1) * beta ^ Z.of_nat p)%Z = (beta ^ (Z.of_nat p + 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p * beta)%Z = (beta ^ (Z.of_nat p + 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p * beta)%Z = (beta ^ Z.of_nat p * beta ^ 1)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= 1)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(beta ^ Z.of_nat p * beta)%Z = (beta ^ Z.of_nat p * (beta * 1))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= 1)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= Z.of_nat p)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= 1)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Zp:natIHp:(Z.of_nat p <= n)%Z -> (Z.abs (Z.rem u (beta ^ Z.of_nat p) + Z.rem v (beta ^ Z.of_nat p)) < beta ^ Z.of_nat p)%ZHn':(Z.succ (Z.of_nat p) <= n)%Z(0 <= 1)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%ZZ.rem (u + v) (beta ^ n) = (Z.rem u (beta ^ n) + Z.rem v (beta ^ n))%Znow rewrite 3!Zrem_0_r. Qed.beta:radixu, v:Zn:positiveHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < Z.neg n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(Z.neg n < 0)%ZZ.rem (u + v) (beta ^ Z.neg n) = (Z.rem u (beta ^ Z.neg n) + Z.rem v (beta ^ Z.neg n))%Zbeta:radixforall u v n : Z, (0 <= u * v)%Z -> (forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z) -> ((u + v) ÷ beta ^ n)%Z = (u ÷ beta ^ n + v ÷ beta ^ n)%Zbeta:radixforall u v n : Z, (0 <= u * v)%Z -> (forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z) -> ((u + v) ÷ beta ^ n)%Z = (u ÷ beta ^ n + v ÷ beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z((u + v) ÷ beta ^ n)%Z = (u ÷ beta ^ n + v ÷ beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z((u + v) ÷ beta ^ n)%Z = (u ÷ beta ^ n + v ÷ beta ^ n + 0)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z(u ÷ beta ^ n + v ÷ beta ^ n + (Z.rem u (beta ^ n) + Z.rem v (beta ^ n)) ÷ beta ^ n)%Z = (u ÷ beta ^ n + v ÷ beta ^ n + 0)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z(u ÷ beta ^ n + v ÷ beta ^ n + Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = (u ÷ beta ^ n + v ÷ beta ^ n + 0)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(Z.abs (Z.rem (u + v) (beta ^ n)) < beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(Z.abs (Z.rem (u + v) (beta ^ n)) < Z.abs (beta ^ n))%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(0 <= beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(beta ^ n)%Z <> 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(0 <= beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(0 < beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(0 <= beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(0 <= n)%Z(0 <= beta ^ n)%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHuv:(0 <= u * v)%ZHd:forall k : Z, (0 <= k < n)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zbeta:radixu, v, n:ZHn:(n < 0)%Z(Z.rem (u + v) (beta ^ n) ÷ beta ^ n)%Z = 0%Zapply Zquot_0_r. Qed.beta:radixu, v:Zn:positiveHn:(Z.neg n < 0)%Z(Z.rem (u + v) (beta ^ Z.neg n) ÷ beta ^ Z.neg n)%Z = 0%Zbeta:radixforall u v : Z, (0 <= u * v)%Z -> (forall k : Z, (0 <= k)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z) -> forall k : Z, Zdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixforall u v : Z, (0 <= u * v)%Z -> (forall k : Z, (0 <= k)%Z -> Zdigit u k = 0%Z \/ Zdigit v k = 0%Z) -> forall k : Z, Zdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%ZZ.rem ((u + v) ÷ beta ^ k) beta = (Z.rem (u ÷ beta ^ k) beta + Z.rem (v ÷ beta ^ k) beta)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%ZZ.rem (u ÷ beta ^ k + v ÷ beta ^ k) beta = (Z.rem (u ÷ beta ^ k) beta + Z.rem (v ÷ beta ^ k) beta)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%ZZ.rem (u ÷ beta ^ k + v ÷ beta ^ k) (beta * 1) = (Z.rem (u ÷ beta ^ k) (beta * 1) + Z.rem (v ÷ beta ^ k) (beta * 1))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%ZZ.rem (u ÷ beta ^ k + v ÷ beta ^ k) (beta ^ 1) = (Z.rem (u ÷ beta ^ k) (beta ^ 1) + Z.rem (v ÷ beta ^ k) (beta ^ 1))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u ÷ beta ^ k * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zv = 0%Z -> (v ÷ beta ^ k)%Z = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u ÷ beta ^ k * v)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%ZZv:v = 0%Z(0 ÷ beta ^ k)%Z = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u ÷ beta ^ k * v)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u ÷ beta ^ k * v)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (u ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zu = 0%Z -> (u ÷ beta ^ k)%Z = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * u)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u * (u ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%ZZu:u = 0%Z(0 ÷ beta ^ k)%Z = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * u)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u * (u ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * u)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u * (u ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= u * (u ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= beta ^ k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= v * (v ÷ beta ^ k))%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Z(0 <= beta ^ k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < 1)%Z -> Zdigit (u ÷ beta ^ k) k0 = 0%Z \/ Zdigit (v ÷ beta ^ k) k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zk':ZHk1:(0 <= k')%ZHk2:(k' < 1)%ZZdigit (u ÷ beta ^ k) k' = 0%Z \/ Zdigit (v ÷ beta ^ k) k' = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zk':ZHk1:(0 <= k')%ZHk2:(k' < 1)%ZZdigit u (k' + k) = 0%Z \/ Zdigit v (k' + k) = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zk':ZHk1:(0 <= k')%ZHk2:(k' < 1)%Z(0 <= k' + k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0 < k)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(0 <= k)%Zk':ZHk1:(0 <= k')%ZHk2:(k' < k)%ZZdigit u k' = 0%Z \/ Zdigit v k' = 0%Zbeta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Znow rewrite 3!Zdigit_lt. Qed.beta:radixu, v:ZHuv:(0 <= u * v)%ZHd:forall k0 : Z, (0 <= k0)%Z -> Zdigit u k0 = 0%Z \/ Zdigit v k0 = 0%Zk:ZHk:(k < 0)%ZZdigit (u + v) k = (Zdigit u k + Zdigit v k)%Z
Left and right shifts
Definition Zscale n k := if Zle_bool 0 k then (n * Zpower beta k)%Z else Z.quot n (Zpower beta (-k)).beta:radixforall n k k' : Z, (0 <= k')%Z -> Zdigit (Zscale n k) k' = Zdigit n (k' - k)beta:radixforall n k k' : Z, (0 <= k')%Z -> Zdigit (Zscale n k) k' = Zdigit n (k' - k)beta:radixn, k, k':ZHk':(0 <= k')%ZZdigit (Zscale n k) k' = Zdigit n (k' - k)beta:radixn, k, k':ZHk':(0 <= k')%ZZdigit (if (0 <=? k)%Z then (n * beta ^ k)%Z else (n ÷ beta ^ (- k))%Z) k' = Zdigit n (k' - k)beta:radixn, k, k':ZHk':(0 <= k')%ZHk:(0 <= k)%ZZdigit (n * beta ^ k) k' = Zdigit n (k' - k)beta:radixn, k, k':ZHk':(0 <= k')%ZHk:(k < 0)%ZZdigit (n ÷ beta ^ (- k)) k' = Zdigit n (k' - k)beta:radixn, k, k':ZHk':(0 <= k')%ZHk:(k < 0)%ZZdigit (n ÷ beta ^ (- k)) k' = Zdigit n (k' - k)omega. Qed.beta:radixn, k, k':ZHk':(0 <= k')%ZHk:(k < 0)%Z(0 <= - k)%Zbeta:radixforall k : Z, Zscale 0 k = 0%Zbeta:radixforall k : Z, Zscale 0 k = 0%Zbeta:radixk:ZZscale 0 k = 0%Zbeta:radixk:Z(if (0 <=? k)%Z then (0 * beta ^ k)%Z else (0 ÷ beta ^ (- k))%Z) = 0%Zbeta:radixk:Z(0 * beta ^ k)%Z = 0%Zbeta:radixk:Z(0 ÷ beta ^ (- k))%Z = 0%Zapply Zquot_0_l. Qed.beta:radixk:Z(0 ÷ beta ^ (- k))%Z = 0%Zbeta:radixforall n k : Z, (0 <= n * Zscale n k)%Zbeta:radixforall n k : Z, (0 <= n * Zscale n k)%Zbeta:radixn, k:Z(0 <= n * Zscale n k)%Zbeta:radixn, k:Z(0 <= n * (if 0 <=? k then n * beta ^ k else n ÷ beta ^ (- k)))%Zbeta:radixn, k:ZHk:(0 <= k)%Z(0 <= n * (n * beta ^ k))%Zbeta:radixn, k:ZHk:(k < 0)%Z(0 <= n * (n ÷ beta ^ (- k)))%Zbeta:radixn, k:ZHk:(0 <= k)%Z(0 <= n * n * beta ^ k)%Zbeta:radixn, k:ZHk:(k < 0)%Z(0 <= n * (n ÷ beta ^ (- k)))%Zbeta:radixn, k:ZHk:(0 <= k)%Z(0 <= n * n)%Zbeta:radixn, k:ZHk:(0 <= k)%Z(0 <= beta ^ k)%Zbeta:radixn, k:ZHk:(k < 0)%Z(0 <= n * (n ÷ beta ^ (- k)))%Zbeta:radixn, k:ZHk:(0 <= k)%Z(0 <= beta ^ k)%Zbeta:radixn, k:ZHk:(k < 0)%Z(0 <= n * (n ÷ beta ^ (- k)))%Zbeta:radixn, k:ZHk:(k < 0)%Z(0 <= n * (n ÷ beta ^ (- k)))%Zapply Zpower_ge_0. Qed.beta:radixn, k:ZHk:(k < 0)%Z(0 <= beta ^ (- k))%Zbeta:radixforall n k k' : Z, (0 <= k)%Z -> Zscale (n * beta ^ k) k' = Zscale n (k + k')beta:radixforall n k k' : Z, (0 <= k)%Z -> Zscale (n * beta ^ k) k' = Zscale n (k + k')beta:radixn, k, k':ZHk:(0 <= k)%ZZscale (n * beta ^ k) k' = Zscale n (k + k')beta:radixn, k, k':ZHk:(0 <= k)%Z(if (0 <=? k')%Z then (n * beta ^ k * beta ^ k')%Z else (n * beta ^ k ÷ beta ^ (- k'))%Z) = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(n * beta ^ k * beta ^ k')%Z = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(n * beta ^ k * beta ^ k')%Z = (n * beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(0 <= k + k')%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(n * (beta ^ k * beta ^ k'))%Z = (n * beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(0 <= k + k')%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(beta ^ k * beta ^ k')%Z = (beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(0 <= k + k')%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(0 <= k')%Z(0 <= k + k')%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (if (0 <=? k + k')%Z then (n * beta ^ (k + k'))%Z else (n ÷ beta ^ (- (k + k')))%Z)beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n * beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%Z(n * beta ^ (k + k' + - k') ÷ beta ^ (- k'))%Z = (n * beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%ZH:(0 <= - k')%Z(n * beta ^ (k + k' + - k') ÷ beta ^ (- k'))%Z = (n * beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%ZH:(0 <= - k')%Z(n * (beta ^ (k + k') * beta ^ (- k')) ÷ beta ^ (- k'))%Z = (n * beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%ZH:(0 <= - k')%Z(n * beta ^ (k + k'))%Z = (n * beta ^ (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%ZH:(0 <= - k')%Z(beta ^ (- k'))%Z <> 0%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%ZH:(0 <= - k')%Z(beta ^ (- k'))%Z <> 0%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(0 <= k + k')%ZH:(0 <= - k')%Z(0 < beta ^ (- k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- k'))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ beta ^ (- (k + k') + k))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(n * beta ^ k ÷ (beta ^ (- (k + k')) * beta ^ k))%Z = (n ÷ beta ^ (- (k + k')))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(0 <= - (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(beta ^ k)%Z <> 0%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(0 <= - (k + k'))%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(0 < beta ^ k)%Zbeta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(0 <= - (k + k'))%Zomega. Qed.beta:radixn, k, k':ZHk:(0 <= k)%ZHk':(k' < 0)%ZHk'':(k + k' < 0)%Z(0 <= - (k + k'))%Zbeta:radixforall n k k' : Z, (0 <= k)%Z -> Zscale (Zscale n k) k' = Zscale n (k + k')beta:radixforall n k k' : Z, (0 <= k)%Z -> Zscale (Zscale n k) k' = Zscale n (k + k')beta:radixn, k, k':ZHk:(0 <= k)%ZZscale (Zscale n k) k' = Zscale n (k + k')beta:radixn, k, k':ZHk:(0 <= k)%ZZscale (if (0 <=? k)%Z then (n * beta ^ k)%Z else (n ÷ beta ^ (- k))%Z) k' = Zscale n (k + k')now apply Zscale_mul_pow. Qed.beta:radixn, k, k':ZHk:(0 <= k)%ZZscale (n * beta ^ k) k' = Zscale n (k + k')
Slice of an integer
Definition Zslice n k1 k2 := if Zle_bool 0 k2 then Z.rem (Zscale n (-k1)) (Zpower beta k2) else Z0.beta:radixforall n k1 k2 k : Z, (0 <= k < k2)%Z -> Zdigit (Zslice n k1 k2) k = Zdigit n (k1 + k)beta:radixforall n k1 k2 k : Z, (0 <= k < k2)%Z -> Zdigit (Zslice n k1 k2) k = Zdigit n (k1 + k)beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%ZZdigit (Zslice n k1 k2) k = Zdigit n (k1 + k)beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%ZZdigit (if (0 <=? k2)%Z then Z.rem (Zscale n (- k1)) (beta ^ k2) else 0%Z) k = Zdigit n (k1 + k)beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%ZZdigit (Z.rem (Zscale n (- k1)) (beta ^ k2)) k = Zdigit n (k1 + k)beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%Z(0 <= k2)%Zbeta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%ZZdigit (Zscale n (- k1)) k = Zdigit n (k1 + k)beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%Z(0 <= k2)%Zbeta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%ZZdigit n (k - - k1) = Zdigit n (k1 + k)beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%Z(0 <= k2)%Zbeta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%ZZdigit n (k + - - k1) = Zdigit n (k1 + k)beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%Z(0 <= k2)%Zomega. Qed.beta:radixn, k1, k2, k:ZHk:(0 <= k < k2)%Z(0 <= k2)%Zbeta:radixforall n k1 k2 k : Z, (k2 <= k)%Z -> Zdigit (Zslice n k1 k2) k = 0%Zbeta:radixforall n k1 k2 k : Z, (k2 <= k)%Z -> Zdigit (Zslice n k1 k2) k = 0%Zbeta:radixn, k1, k2, k:ZHk:(k2 <= k)%ZZdigit (Zslice n k1 k2) k = 0%Zbeta:radixn, k1, k2, k:ZHk:(k2 <= k)%ZZdigit (if (0 <=? k2)%Z then Z.rem (Zscale n (- k1)) (beta ^ k2) else 0%Z) k = 0%Zbeta:radixn, k1, k2, k:ZHk:(k2 <= k)%ZHk2:(0 <= k2)%ZZdigit (Z.rem (Zscale n (- k1)) (beta ^ k2)) k = 0%Zbeta:radixn, k1, k2, k:ZHk:(k2 <= k)%ZHk2:(k2 < 0)%ZZdigit 0 k = 0%Zbeta:radixn, k1, k2, k:ZHk:(k2 <= k)%ZHk2:(0 <= k2)%Z(0 <= k2 <= k)%Zbeta:radixn, k1, k2, k:ZHk:(k2 <= k)%ZHk2:(k2 < 0)%ZZdigit 0 k = 0%Zapply Zdigit_0. Qed.beta:radixn, k1, k2, k:ZHk:(k2 <= k)%ZHk2:(k2 < 0)%ZZdigit 0 k = 0%Zbeta:radixforall k k' : Z, Zslice 0 k k' = 0%Zbeta:radixforall k k' : Z, Zslice 0 k k' = 0%Zbeta:radixk, k':ZZslice 0 k k' = 0%Zbeta:radixk, k':Z(if (0 <=? k')%Z then Z.rem (Zscale 0 (- k)) (beta ^ k') else 0%Z) = 0%Zbeta:radixk, k':ZZ.rem (Zscale 0 (- k)) (beta ^ k') = 0%Zbeta:radixk, k':Z0%Z = 0%Zbeta:radixk, k':ZZ.rem 0 (beta ^ k') = 0%Zbeta:radixk, k':Z0%Z = 0%Zapply refl_equal. Qed.beta:radixk, k':Z0%Z = 0%Zbeta:radixforall n k k' : Z, (0 <= n * Zslice n k k')%Zbeta:radixforall n k k' : Z, (0 <= n * Zslice n k k')%Zbeta:radixn, k, k':Z(0 <= n * Zslice n k k')%Zbeta:radixn, k, k':Z(0 <= n * (if 0 <=? k' then Z.rem (Zscale n (- k)) (beta ^ k') else 0))%Zbeta:radixn, k, k':Z(0 <= n * Z.rem (Zscale n (- k)) (beta ^ k'))%Zbeta:radixn, k, k':Z(0 <= n * 0)%Zbeta:radixn, k, k':ZZscale n (- k) = 0%Z -> Z.rem (Zscale n (- k)) (beta ^ k') = 0%Zbeta:radixn, k, k':Z(0 <= n * Zscale n (- k))%Zbeta:radixn, k, k':Z(0 <= Zscale n (- k) * Z.rem (Zscale n (- k)) (beta ^ k'))%Zbeta:radixn, k, k':Z(0 <= n * 0)%Zbeta:radixn, k, k':ZH:Zscale n (- k) = 0%ZZ.rem 0 (beta ^ k') = 0%Zbeta:radixn, k, k':Z(0 <= n * Zscale n (- k))%Zbeta:radixn, k, k':Z(0 <= Zscale n (- k) * Z.rem (Zscale n (- k)) (beta ^ k'))%Zbeta:radixn, k, k':Z(0 <= n * 0)%Zbeta:radixn, k, k':Z(0 <= n * Zscale n (- k))%Zbeta:radixn, k, k':Z(0 <= Zscale n (- k) * Z.rem (Zscale n (- k)) (beta ^ k'))%Zbeta:radixn, k, k':Z(0 <= n * 0)%Zbeta:radixn, k, k':Z(0 <= Zscale n (- k) * Z.rem (Zscale n (- k)) (beta ^ k'))%Zbeta:radixn, k, k':Z(0 <= n * 0)%Zbeta:radixn, k, k':Z(0 <= Z.rem (Zscale n (- k)) (beta ^ k') * Zscale n (- k))%Zbeta:radixn, k, k':Z(0 <= n * 0)%Znow rewrite Zmult_0_r. Qed.beta:radixn, k, k':Z(0 <= n * 0)%Zbeta:radixforall n k1 k2 k1' k2' : Z, (0 <= k1' <= k2)%Z -> Zslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixforall n k1 k2 k1' k2' : Z, (0 <= k1' <= k2)%Z -> Zslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zforall k : Z, (0 <= k)%Z -> Zdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(Z.min (k2 - k1') k2' <= k)%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(Z.min (k2 - k1') k2' <= k)%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = 0%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(Z.min (k2 - k1') k2' <= k)%ZHk'':(k2' <= k)%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = 0%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(Z.min (k2 - k1') k2' <= k)%ZHk'':(k < k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = 0%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(Z.min (k2 - k1') k2' <= k)%ZHk'':(k < k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = 0%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(Z.min (k2 - k1') k2' <= k)%ZHk'':(k < k2')%ZZdigit (Zslice n k1 k2) (k1' + k) = 0%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(Z.min (k2 - k1') k2' <= k)%ZHk'':(k < k2')%Z(k2 <= k1' + k)%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice (Zslice n k1 k2) k1' k2') k = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice n k1 k2) (k1' + k) = Zdigit (Zslice n (k1 + k1') (Z.min (k2 - k1') k2')) kbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit (Zslice n k1 k2) (k1' + k) = Zdigit n (k1 + k1' + k)beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%ZZdigit n (k1 + (k1' + k)) = Zdigit n (k1 + k1' + k)beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%Z(0 <= k1' + k < k2)%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(0 <= k2')%Zk:ZHk:(0 <= k)%ZHk':(k < Z.min (k2 - k1') k2')%Z(0 <= k1' + k < k2)%Zbeta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%ZZslice (Zslice n k1 k2) k1' k2' = Zslice n (k1 + k1') (Z.min (k2 - k1') k2')beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%Z(if (0 <=? k2')%Z then Z.rem (Zscale (if (0 <=? k2)%Z then Z.rem (Zscale n (- k1)) (beta ^ k2) else 0%Z) (- k1')) (beta ^ k2') else 0%Z) = (if (0 <=? Z.min (k2 - k1') k2')%Z then Z.rem (Zscale n (- (k1 + k1'))) (beta ^ Z.min (k2 - k1') k2') else 0%Z)beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%Z(if (0 <=? k2')%Z then Z.rem (Zscale (if (0 <=? k2)%Z then Z.rem (Zscale n (- k1)) (beta ^ k2) else 0%Z) (- k1')) (beta ^ k2') else 0%Z) = (if (0 <=? k2')%Z then Z.rem (Zscale n (- (k1 + k1'))) (beta ^ k2') else 0%Z)beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%Z(k2' <= k2 - k1')%Zomega. Qed.beta:radixn, k1, k2, k1', k2':ZHk1':(0 <= k1' <= k2)%ZHk2':(k2' < 0)%Z(k2' <= k2 - k1')%Zbeta:radixforall n k k1 k2 : Z, (0 <= k)%Z -> Zslice (n * beta ^ k) k1 k2 = Zslice n (k1 - k) k2beta:radixforall n k k1 k2 : Z, (0 <= k)%Z -> Zslice (n * beta ^ k) k1 k2 = Zslice n (k1 - k) k2beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZZslice (n * beta ^ k) k1 k2 = Zslice n (k1 - k) k2beta:radixn, k, k1, k2:ZHk:(0 <= k)%Z(if (0 <=? k2)%Z then Z.rem (Zscale (n * beta ^ k) (- k1)) (beta ^ k2) else 0%Z) = (if (0 <=? k2)%Z then Z.rem (Zscale n (- (k1 - k))) (beta ^ k2) else 0%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk2:(0 <= k2)%ZZ.rem (Zscale (n * beta ^ k) (- k1)) (beta ^ k2) = Z.rem (Zscale n (- (k1 - k))) (beta ^ k2)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk2:(k2 < 0)%Z0%Z = 0%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk2:(0 <= k2)%ZZ.rem (Zscale (n * beta ^ k) (- k1)) (beta ^ k2) = Z.rem (Zscale n (- (k1 - k))) (beta ^ k2)now replace (- (k1 - k))%Z with (k + -k1)%Z by ring. Qed.beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk2:(0 <= k2)%ZZ.rem (Zscale n (k + - k1)) (beta ^ k2) = Z.rem (Zscale n (- (k1 - k))) (beta ^ k2)beta:radixforall n k k1 k2 : Z, (0 <= k)%Z -> (0 <= k1)%Z -> Zslice (n ÷ beta ^ k) k1 k2 = Zslice n (k1 + k) k2beta:radixforall n k k1 k2 : Z, (0 <= k)%Z -> (0 <= k1)%Z -> Zslice (n ÷ beta ^ k) k1 k2 = Zslice n (k1 + k) k2beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZZslice (n ÷ beta ^ k) k1 k2 = Zslice n (k1 + k) k2beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%Z(if (0 <=? k2)%Z then Z.rem (Zscale (n ÷ beta ^ k) (- k1)) (beta ^ k2) else 0%Z) = (if (0 <=? k2)%Z then Z.rem (Zscale n (- (k1 + k))) (beta ^ k2) else 0%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZZ.rem (Zscale (n ÷ beta ^ k) (- k1)) (beta ^ k2) = Z.rem (Zscale n (- (k1 + k))) (beta ^ k2)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(k2 < 0)%Z0%Z = 0%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZZ.rem (Zscale (n ÷ beta ^ k) (- k1)) (beta ^ k2) = Z.rem (Zscale n (- (k1 + k))) (beta ^ k2)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZZscale (n ÷ beta ^ k) (- k1) = Zscale n (- (k1 + k))beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%Z(if (0 <=? - k1)%Z then (n ÷ beta ^ k * beta ^ (- k1))%Z else (n ÷ beta ^ k ÷ beta ^ (- - k1))%Z) = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%Z(n ÷ beta ^ k * beta ^ (- k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%Z(n ÷ beta ^ k * beta ^ (- 0))%Z = (if (0 <=? - (0 + k))%Z then (n * beta ^ (- (0 + k)))%Z else (n ÷ beta ^ (- - (0 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(0 <= - (0 + k))%Z(n ÷ beta ^ k * beta ^ (- 0))%Z = (n * beta ^ (- (0 + k)))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(- (0 + k) < 0)%Z(n ÷ beta ^ k * beta ^ (- 0))%Z = (n ÷ beta ^ (- - (0 + k)))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(0 <= - (0 + k))%Z(n ÷ beta ^ 0 * beta ^ (- 0))%Z = (n * beta ^ (- (0 + 0)))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(- (0 + k) < 0)%Z(n ÷ beta ^ k * beta ^ (- 0))%Z = (n ÷ beta ^ (- - (0 + k)))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(0 <= - (0 + k))%Z(n ÷ 1 * 1)%Z = (n * 1)%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(- (0 + k) < 0)%Z(n ÷ beta ^ k * beta ^ (- 0))%Z = (n ÷ beta ^ (- - (0 + k)))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(- (0 + k) < 0)%Z(n ÷ beta ^ k * beta ^ (- 0))%Z = (n ÷ beta ^ (- - (0 + k)))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(0 <= - k1)%ZHk':(- (0 + k) < 0)%Z(n ÷ beta ^ k * beta ^ (- 0))%Z = (n ÷ beta ^ (0 + k))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (if (0 <=? - (k1 + k))%Z then (n * beta ^ (- (k1 + k)))%Z else (n ÷ beta ^ (- - (k1 + k)))%Z)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ (- - k1))%Z = (n ÷ beta ^ (- - (k1 + k)))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ k1)%Z = (n ÷ beta ^ (k + k1))%Zapply Zquot_Zquot. Qed.beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZHk1:(0 <= k1)%ZHk2:(0 <= k2)%ZHk1':(- k1 < 0)%Z(n ÷ beta ^ k ÷ beta ^ k1)%Z = (n ÷ (beta ^ k * beta ^ k1))%Zbeta:radixforall n k k1 k2 : Z, (0 <= k1)%Z -> Zslice (Zscale n k) k1 k2 = Zslice n (k1 - k) k2beta:radixforall n k k1 k2 : Z, (0 <= k1)%Z -> Zslice (Zscale n k) k1 k2 = Zslice n (k1 - k) k2beta:radixn, k, k1, k2:ZHk1:(0 <= k1)%ZZslice (Zscale n k) k1 k2 = Zslice n (k1 - k) k2beta:radixn, k, k1, k2:ZHk1:(0 <= k1)%ZZslice (if (0 <=? k)%Z then (n * beta ^ k)%Z else (n ÷ beta ^ (- k))%Z) k1 k2 = Zslice n (k1 - k) k2beta:radixn, k, k1, k2:ZHk1:(0 <= k1)%ZHk:(0 <= k)%ZZslice (n * beta ^ k) k1 k2 = Zslice n (k1 - k) k2beta:radixn, k, k1, k2:ZHk1:(0 <= k1)%ZHk:(k < 0)%ZZslice (n ÷ beta ^ (- k)) k1 k2 = Zslice n (k1 - k) k2beta:radixn, k, k1, k2:ZHk1:(0 <= k1)%ZHk:(k < 0)%ZZslice (n ÷ beta ^ (- k)) k1 k2 = Zslice n (k1 - k) k2omega. Qed.beta:radixn, k, k1, k2:ZHk1:(0 <= k1)%ZHk:(k < 0)%Z(0 <= - k)%Zbeta:radixforall n k k1 k2 : Z, (0 <= k)%Z -> Zslice (n ÷ beta ^ k) k1 k2 = Zscale (Zslice n k (k1 + k2)) (- k1)beta:radixforall n k k1 k2 : Z, (0 <= k)%Z -> Zslice (n ÷ beta ^ k) k1 k2 = Zscale (Zslice n k (k1 + k2)) (- k1)beta:radixn, k, k1, k2:ZHk:(0 <= k)%ZZslice (n ÷ beta ^ k) k1 k2 = Zscale (Zslice n k (k1 + k2)) (- k1)beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice (n ÷ beta ^ k) k1 k2) k0 = Zdigit (Zscale (Zslice n k (k1 + k2)) (- k1)) k0beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zscale (Zslice n k (k1 + k2)) (- k1)) k'beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k' - - k1)beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k' + - - k1)beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k2 <= k')%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k2 <= k')%Z0%Z = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k2 <= k')%ZZdigit (Zslice n k (k1 + k2)) (k1 + k') = 0%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k2 <= k')%Z(k1 + k2 <= k1 + k')%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZZdigit (Zslice (n ÷ beta ^ k) k1 k2) k' = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(0 <= k1 + k')%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(k1 + k' < 0)%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(0 <= k1 + k')%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit n (k + (k1 + k'))beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(k1 + k' < 0)%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(0 <= k1 + k')%ZZdigit n (k1 + k' + k) = Zdigit n (k + (k1 + k'))beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(k1 + k' < 0)%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(0 <= k1 + k')%Z(k1 + k' + k)%Z = (k + (k1 + k'))%Zbeta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(k1 + k' < 0)%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit (Zslice n k (k1 + k2)) (k1 + k')now rewrite 2!Zdigit_lt. Qed.beta:radixn, k, k1, k2:ZHk:(0 <= k)%Zk':ZHk':(0 <= k')%ZHk2:(k' < k2)%ZHk1':(k1 + k' < 0)%ZZdigit (n ÷ beta ^ k) (k1 + k') = Zdigit (Zslice n k (k1 + k2)) (k1 + k')beta:radixforall n k l1 l2 : Z, (0 <= l1)%Z -> (0 <= l2)%Z -> (Zslice n k l1 + Zscale (Zslice n (k + l1) l2) l1)%Z = Zslice n k (l1 + l2)beta:radixforall n k l1 l2 : Z, (0 <= l1)%Z -> (0 <= l2)%Z -> (Zslice n k l1 + Zscale (Zslice n (k + l1) l2) l1)%Z = Zslice n k (l1 + l2)beta:radixn, k1, l1, l2:ZHl1:(0 <= l1)%ZHl2:(0 <= l2)%Z(Zslice n k1 l1 + Zscale (Zslice n (k1 + l1) l2) l1)%Z = Zslice n k1 (l1 + l2)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Z(Zslice n k1 l1 + Zscale (Zslice n (k1 + l1) l2) l1)%Z = Zslice n k1 (l1 + l2)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zforall k : Z, (0 <= k)%Z -> Zdigit (Zslice n k1 l1 + Zscale (Zslice n (k1 + l1) l2) l1) k = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZZdigit (Zslice n k1 l1 + Zscale (Zslice n (k1 + l1) l2) l1) k = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k)%Z = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(l1 + l2 <= k)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(l1 + l2 <= k)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit (Zslice n k1 (l1 + l2)) kbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(l1 <= k)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(k < l1)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(l1 <= k)%Z(0 + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(k < l1)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(l1 <= k)%Z(0 + Zdigit n (k1 + l1 + (k - l1)))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(k < l1)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(l1 <= k)%Z(k1 + l1 + (k - l1))%Z = (k1 + k)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(k < l1)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(k < l1)%Z(Zdigit (Zslice n k1 l1) k + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(k < l1)%Z(Zdigit n (k1 + k) + Zdigit (Zslice n (k1 + l1) l2) (k - l1))%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk2:(k < l1 + l2)%ZHk1:(k < l1)%Z(Zdigit n (k1 + k) + 0)%Z = Zdigit n (k1 + k)beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n k1 l1 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zscale (Zslice n (k1 + l1) l2) l1 * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zn = 0%Z -> Zslice n k1 l1 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zscale (Zslice n (k1 + l1) l2) l1 * n)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZH:n = 0%ZZslice 0 k1 l1 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zscale (Zslice n (k1 + l1) l2) l1 * n)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zscale (Zslice n (k1 + l1) l2) l1 * n)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZZslice n (k1 + l1) l2 = 0%Z -> Zscale (Zslice n (k1 + l1) l2) l1 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n (k1 + l1) l2)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n (k1 + l1) l2 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZH:Zslice n (k1 + l1) l2 = 0%ZZscale 0 l1 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n (k1 + l1) l2)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n (k1 + l1) l2 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n (k1 + l1) l2)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n (k1 + l1) l2 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= Zslice n (k1 + l1) l2 * Zscale (Zslice n (k1 + l1) l2) l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Z(0 <= n * Zslice n k1 l1)%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%Zforall k0 : Z, (0 <= k0)%Z -> Zdigit (Zslice n k1 l1) k0 = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k0 = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZZdigit (Zslice n k1 l1) k = 0%Z \/ Zdigit (Zscale (Zslice n (k1 + l1) l2) l1) k = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZZdigit (Zslice n k1 l1) k = 0%Z \/ Zdigit (Zslice n (k1 + l1) l2) (k - l1) = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk1:(l1 <= k)%ZZdigit (Zslice n k1 l1) k = 0%Z \/ Zdigit (Zslice n (k1 + l1) l2) (k - l1) = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk1:(k < l1)%ZZdigit (Zslice n k1 l1) k = 0%Z \/ Zdigit (Zslice n (k1 + l1) l2) (k - l1) = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk1:(l1 <= k)%ZZdigit (Zslice n k1 l1) k = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk1:(k < l1)%ZZdigit (Zslice n k1 l1) k = 0%Z \/ Zdigit (Zslice n (k1 + l1) l2) (k - l1) = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk1:(k < l1)%ZZdigit (Zslice n k1 l1) k = 0%Z \/ Zdigit (Zslice n (k1 + l1) l2) (k - l1) = 0%Zbeta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk1:(k < l1)%ZZdigit (Zslice n (k1 + l1) l2) (k - l1) = 0%Zomega. Qed. Section digits_aux. Variable p : Z. Fixpoint Zdigits_aux (nb pow : Z) (n : nat) { struct n } : Z := match n with | O => nb | S n => if Zlt_bool p pow then nb else Zdigits_aux (nb + 1) (Zmult beta pow) n end. End digits_aux.beta:radixn, k1, l1, l2:ZHl2:(0 <= l2)%Zk:ZHk:(0 <= k)%ZHk1:(k < l1)%Z(k - l1 < 0)%Z
Number of digits of an integer
Definition Zdigits n := match n with | Z0 => Z0 | Zneg p => Zdigits_aux (Zpos p) 1 beta (digits2_Pnat p) | Zpos p => Zdigits_aux n 1 beta (digits2_Pnat p) end.beta:radixforall n : Z, (beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Zbeta:radixforall n : Z, (beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Zbeta:radix(forall p : positive, (beta ^ (Zdigits (Z.pos p) - 1) <= Z.pos p < beta ^ Zdigits (Z.pos p))%Z) -> forall n : Z, (beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Zbeta:radixforall p : positive, (beta ^ (Zdigits (Z.pos p) - 1) <= Z.pos p < beta ^ Zdigits (Z.pos p))%Zbeta:radixH:forall p : positive, (beta ^ (Zdigits (Z.pos p) - 1) <= Z.pos p < beta ^ Zdigits (Z.pos p))%Z(beta ^ (Zdigits 0 - 1) <= Z.abs 0 < beta ^ Zdigits 0)%Zbeta:radixforall p : positive, (beta ^ (Zdigits (Z.pos p) - 1) <= Z.pos p < beta ^ Zdigits (Z.pos p))%Zbeta:radixforall p : positive, (beta ^ (Zdigits (Z.pos p) - 1) <= Z.pos p < beta ^ Zdigits (Z.pos p))%Zbeta:radixn:positive(beta ^ (Zdigits (Z.pos n) - 1) <= Z.pos n < beta ^ Zdigits (Z.pos n))%Z(* *)beta:radixn:positive(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Zpower_nat 2 (S (digits2_Pnat n)) <= beta ^ Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Zpower_nat 2 (S (digits2_Pnat n)) <= Zpower_nat beta (Z.abs_nat (Z.of_nat (S (digits2_Pnat n)))))%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Zpower_nat 2 (S (digits2_Pnat n)) <= Zpower_nat beta (S (digits2_Pnat n)))%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Zpower_nat 2 0 <= Zpower_nat beta 0)%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(Zpower_nat 2 (S n0) <= Zpower_nat beta (S n0))%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(Zpower_nat 2 (S n0) <= Zpower_nat beta (S n0))%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(2 * Zpower_nat 2 n0 <= beta * Zpower_nat beta n0)%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(2 <= beta)%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= 2)%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= Zpower_nat 2 n0)%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(2 <=? beta)%Z = truebeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= 2)%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= Zpower_nat 2 n0)%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= 2)%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= Zpower_nat 2 n0)%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= Zpower_nat 2 n0)%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= Zpower_nat 2 (Z.abs_nat (Z.of_nat n0)))%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= 2 ^ Z.of_nat n0)%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= Z.of_nat n0)%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiven0:natIHn0:(Zpower_nat 2 n0 <= Zpower_nat beta n0)%Z(0 <= Z.of_nat n0)%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(0 <= Z.of_nat (S (digits2_Pnat n)))%Zbeta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Z(* *)beta:radixn:positiveU:(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Z.pos n < beta ^ Z.of_nat (S (digits2_Pnat n)))%Z -> (beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Z.pos n < beta ^ Z.succ (Z.of_nat (digits2_Pnat n)))%Z -> (beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positive(Z.pos n < beta ^ (Z.of_nat (digits2_Pnat n) + 1))%Z -> (beta ^ (Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta (digits2_Pnat n))%Zbeta:radixn:positiveforall n0 : nat, (Z.pos n < beta ^ (Z.of_nat n0 + 1))%Z -> (beta ^ (Zdigits_aux (Z.pos n) 1 beta n0 - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta n0)%Zbeta:radixn:positiveu:natU:(Z.pos n < beta ^ (Z.of_nat u + 1))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 beta u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 beta u)%Zbeta:radixn:positiveu:natU:(Z.pos n < beta ^ (Z.of_nat u + 1))%Z(beta ^ (Zdigits_aux (Z.pos n) 1 (beta ^ 1) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 (beta ^ 1) u)%Zbeta:radixn:positiveu:natU:(Z.pos n < beta ^ (Z.of_nat u + 1))%Z(beta ^ (1 - 1) <= Z.pos n)%Zbeta:radixn:positiveu:natU:(Z.pos n < beta ^ (Z.of_nat u + 1))%ZV:(beta ^ (1 - 1) <= Z.pos n)%Z(beta ^ (Zdigits_aux (Z.pos n) 1 (beta ^ 1) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 (beta ^ 1) u)%Zbeta:radixn:positiveu:natU:(Z.pos n < beta ^ (Z.of_nat u + 1))%ZV:(beta ^ (1 - 1) <= Z.pos n)%Z(beta ^ (Zdigits_aux (Z.pos n) 1 (beta ^ 1) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 (beta ^ 1) u)%Zbeta:radixn:positiveu:natU:(Z.pos n < beta ^ (Z.of_nat u + 1))%ZV:(beta ^ (1 - 1) <= Z.pos n)%Z(beta ^ (1 - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1))%Z -> (beta ^ (Zdigits_aux (Z.pos n) 1 (beta ^ 1) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 (beta ^ 1) u)%Zbeta:radixn:positiveu:nat(beta ^ (1 - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1))%Z -> (beta ^ (Zdigits_aux (Z.pos n) 1 (beta ^ 1) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 (beta ^ 1) u)%Zbeta:radixn:positiveu:nat(1 <= 1)%Z -> (beta ^ (1 - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1))%Z -> (beta ^ (Zdigits_aux (Z.pos n) 1 (beta ^ 1) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) 1 (beta ^ 1) u)%Z(* *)beta:radixn:positiveu:natforall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zbeta:radixn:positiveforall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat 0 + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) 0 - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) 0)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zforall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat (S u) + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) (S u) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) (S u))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zforall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat (S u) + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) (S u) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) (S u))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zforall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) (S u) - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) (S u))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zforall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + z))%Z -> (beta ^ ((if Z.pos n <? beta ^ z then z else Zdigits_aux (Z.pos n) (z + 1) (beta * beta ^ z) u) - 1) <= Z.pos n < beta ^ (if Z.pos n <? beta ^ z then z else Zdigits_aux (Z.pos n) (z + 1) (beta * beta ^ z) u))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%Z(beta ^ ((if Z.pos n <? beta ^ v then v else Zdigits_aux (Z.pos n) (v + 1) (beta * beta ^ v) u) - 1) <= Z.pos n < beta ^ (if Z.pos n <? beta ^ v then v else Zdigits_aux (Z.pos n) (v + 1) (beta * beta ^ v) u))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(Z.pos n < beta ^ v)%Z(beta ^ (v - 1) <= Z.pos n < beta ^ v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (Zdigits_aux (Z.pos n) (v + 1) (beta * beta ^ v) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) (v + 1) (beta * beta ^ v) u)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (Zdigits_aux (Z.pos n) (v + 1) (beta * beta ^ v) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) (v + 1) (beta * beta ^ v) u)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (Zdigits_aux (Z.pos n) (v + 1) (beta ^ 1 * beta ^ v) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) (v + 1) (beta ^ 1 * beta ^ v) u)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (Zdigits_aux (Z.pos n) (v + 1) (beta ^ (1 + v)) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) (v + 1) (beta ^ (1 + v)) u)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= 1)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (Zdigits_aux (Z.pos n) (1 + v) (beta ^ (1 + v)) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) (1 + v) (beta ^ (1 + v)) u)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= 1)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(1 <= 1 + v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (1 + v - 1) <= Z.pos n < beta ^ (Z.of_nat u + (1 + v)))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= 1)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (1 + v - 1) <= Z.pos n < beta ^ (Z.of_nat u + (1 + v)))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= 1)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(beta ^ (1 + v - 1) <= Z.pos n)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(Z.pos n < beta ^ (Z.of_nat u + (1 + v)))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= 1)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(Z.pos n < beta ^ (Z.of_nat u + (1 + v)))%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= 1)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= 1)%Zbeta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zapply Zle_succ_le with (1 := Hv). Qed.beta:radixn:positiveu:natIHu:forall z : Z, (1 <= z)%Z -> (beta ^ (z - 1) <= Z.pos n < beta ^ (Z.of_nat u + z))%Z -> (beta ^ (Zdigits_aux (Z.pos n) z (beta ^ z) u - 1) <= Z.pos n < beta ^ Zdigits_aux (Z.pos n) z (beta ^ z) u)%Zv:ZHv:(1 <= v)%ZU:(beta ^ (v - 1) <= Z.pos n < beta ^ (Z.of_nat u + 1 + v))%ZK:(beta ^ v <= Z.pos n)%Z(0 <= v)%Zbeta:radixforall n d : Z, (beta ^ (d - 1) <= Z.abs n < beta ^ d)%Z -> Zdigits n = dbeta:radixforall n d : Z, (beta ^ (d - 1) <= Z.abs n < beta ^ d)%Z -> Zdigits n = dbeta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZZdigits n = dbeta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZHd':(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%ZZdigits n = dbeta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZHd':(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Z(Zdigits n <= d)%Zbeta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZHd':(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Z(d <= Zdigits n)%Zbeta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZHd':(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Z(beta ^ (Zdigits n - 1) < beta ^ d)%Zbeta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZHd':(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Z(d <= Zdigits n)%Zbeta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZHd':(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Z(d <= Zdigits n)%Znow apply Z.le_lt_trans with (Z.abs n). Qed.beta:radixn, d:ZHd:(beta ^ (d - 1) <= Z.abs n < beta ^ d)%ZHd':(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Z(beta ^ (d - 1) < beta ^ Zdigits n)%Zbeta:radixforall n : Z, Zdigits (Z.abs n) = Zdigits nnow intros [|n|n]. Qed.beta:radixforall n : Z, Zdigits (Z.abs n) = Zdigits nbeta:radixforall n : Z, n <> 0%Z -> (0 < Zdigits n)%Zbeta:radixforall n : Z, n <> 0%Z -> (0 < Zdigits n)%Zbeta:radixn:ZZn:n <> 0%Z(0 < Zdigits n)%Zbeta:radixn:ZZn:n <> 0%Z(0 < Zdigits (Z.abs n))%Zbeta:radixn:ZZn:n <> 0%Z(0 < Z.abs n)%Zbeta:radixn:ZZn:n <> 0%ZHn:(0 < Z.abs n)%Z(0 < Zdigits (Z.abs n))%Zbeta:radixZn:0%Z <> 0%Z(0 < Z.abs 0)%Zbeta:radixn:ZZn:n <> 0%ZHn:(0 < Z.abs n)%Z(0 < Zdigits (Z.abs n))%Zbeta:radixn:ZZn:n <> 0%ZHn:(0 < Z.abs n)%Z(0 < Zdigits (Z.abs n))%Zbeta:radixp:positive(0 < Zdigits (Z.pos p))%Zbeta:radixp:positive(0 < Zdigits_aux (Z.pos p) 1 beta (digits2_Pnat p))%Zbeta:radixp:positiveforall z z0 : Z, (0 < z)%Z -> (0 < Zdigits_aux (Z.pos p) z z0 (digits2_Pnat p))%Zbeta:radixp:positiveforall z z0 : Z, (0 < z)%Z -> (0 < Zdigits_aux (Z.pos p) z z0 0)%Zbeta:radixp:positiven:natIHn:forall z z0 : Z, (0 < z)%Z -> (0 < Zdigits_aux (Z.pos p) z z0 n)%Zforall z z0 : Z, (0 < z)%Z -> (0 < Zdigits_aux (Z.pos p) z z0 (S n))%Zbeta:radixp:positiven:natIHn:forall z z0 : Z, (0 < z)%Z -> (0 < Zdigits_aux (Z.pos p) z z0 n)%Zforall z z0 : Z, (0 < z)%Z -> (0 < Zdigits_aux (Z.pos p) z z0 (S n))%Zbeta:radixp:positiven:natIHn:forall z z0 : Z, (0 < z)%Z -> (0 < Zdigits_aux (Z.pos p) z z0 n)%Zforall z z0 : Z, (0 < z)%Z -> (0 < (if Z.pos p <? z0 then z else Zdigits_aux (Z.pos p) (z + 1) (beta * z0) n))%Zbeta:radixp:positiven:natIHn:forall z1 z2 : Z, (0 < z1)%Z -> (0 < Zdigits_aux (Z.pos p) z1 z2 n)%Zz, z0:ZH:(0 < z)%Z(0 < (if Z.pos p <? z0 then z else Zdigits_aux (Z.pos p) (z + 1) (beta * z0) n))%Zbeta:radixp:positiven:natIHn:forall z1 z2 : Z, (0 < z1)%Z -> (0 < Zdigits_aux (Z.pos p) z1 z2 n)%Zz, z0:ZH:(0 < z)%Z(0 < z)%Zbeta:radixp:positiven:natIHn:forall z1 z2 : Z, (0 < z1)%Z -> (0 < Zdigits_aux (Z.pos p) z1 z2 n)%Zz, z0:ZH:(0 < z)%Z(0 < Zdigits_aux (Z.pos p) (z + 1) (beta * z0) n)%Zbeta:radixp:positiven:natIHn:forall z1 z2 : Z, (0 < z1)%Z -> (0 < Zdigits_aux (Z.pos p) z1 z2 n)%Zz, z0:ZH:(0 < z)%Z(0 < Zdigits_aux (Z.pos p) (z + 1) (beta * z0) n)%Znow apply Zlt_lt_succ. Qed.beta:radixp:positiven:natIHn:forall z1 z2 : Z, (0 < z1)%Z -> (0 < Zdigits_aux (Z.pos p) z1 z2 n)%Zz, z0:ZH:(0 < z)%Z(0 < z + 1)%Zbeta:radixforall n : Z, (0 <= Zdigits n)%Zbeta:radixforall n : Z, (0 <= Zdigits n)%Zbeta:radixn:Z(0 <= Zdigits n)%Zbeta:radixn:ZH:n = 0%Z(0 <= Zdigits n)%Zbeta:radixn:ZH:n <> 0%Z(0 <= Zdigits n)%Zbeta:radixn:ZH:n <> 0%Z(0 <= Zdigits n)%Znow apply Zdigits_gt_0. Qed.beta:radixn:ZH:n <> 0%Z(0 < Zdigits n)%Zbeta:radixforall n k : Z, (Zdigits n <= k)%Z -> Zdigit n k = 0%Zbeta:radixforall n k : Z, (Zdigits n <= k)%Z -> Zdigit n k = 0%Zbeta:radixn, k:ZHk:(Zdigits n <= k)%ZZdigit n k = 0%Zapply Zdigits_correct. Qed.beta:radixn, k:ZHk:(Zdigits n <= k)%Z(Z.abs n < beta ^ Zdigits n)%Zbeta:radixforall n : Z, n <> 0%Z -> Zdigit n (Zdigits n - 1) <> 0%Zbeta:radixforall n : Z, n <> 0%Z -> Zdigit n (Zdigits n - 1) <> 0%Zbeta:radixn:ZZn:n <> 0%ZZdigit n (Zdigits n - 1) <> 0%Zbeta:radixn:ZZn:n <> 0%Z(0 <= Zdigits n - 1)%Zbeta:radixn:ZZn:n <> 0%Z(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ (Zdigits n - 1 + 1))%Zbeta:radixn:ZZn:n <> 0%Z(0 < Zdigits n)%Zbeta:radixn:ZZn:n <> 0%Z(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ (Zdigits n - 1 + 1))%Zbeta:radixn:ZZn:n <> 0%Z(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ (Zdigits n - 1 + 1))%Zapply Zdigits_correct. Qed.beta:radixn:ZZn:n <> 0%Z(beta ^ (Zdigits n - 1) <= Z.abs n < beta ^ Zdigits n)%Zbeta:radixforall n k l : Z, (0 <= l)%Z -> (Zdigits (Zslice n k l) <= l)%Zbeta:radixforall n k l : Z, (0 <= l)%Z -> (Zdigits (Zslice n k l) <= l)%Zbeta:radixn, k, l:ZHl:(0 <= l)%Z(Zdigits (Zslice n k l) <= l)%Zbeta:radixn, k, l:ZHl:(0 <= l)%Z(Zdigits (if 0 <=? l then Z.rem (Zscale n (- k)) (beta ^ l) else 0) <= l)%Zbeta:radixn, k, l:ZHl:(0 <= l)%Z(Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) <= l)%Zbeta:radixn, k, l:ZHl:(0 <= l)%ZH1:(beta ^ (Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) - 1) <= Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)))%ZH2:(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < beta ^ Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)))%Z(Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) <= l)%Zbeta:radixn, k, l:ZHl:(0 <= l)%ZH1:(beta ^ (Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) - 1) <= Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)))%ZH2:(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < beta ^ Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)))%Z(beta ^ (Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) - 1) < beta ^ l)%Zbeta:radixn, k, l:ZHl:(0 <= l)%ZH1:(beta ^ (Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) - 1) <= Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)))%ZH2:(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < beta ^ Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)))%Z(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < beta ^ l)%Zbeta:radixn, k, l:ZHl:(0 <= l)%ZH1:(beta ^ (Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) - 1) <= Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)))%ZH2:(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < beta ^ Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)))%Z(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < Z.abs (beta ^ l))%Zbeta:radixn, k, l:ZHl:(0 <= l)%ZH1:(beta ^ (Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) - 1) <= Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)))%ZH2:(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < beta ^ Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)))%Z(beta ^ l)%Z <> 0%Znow apply Zpower_gt_0. Qed.beta:radixn, k, l:ZHl:(0 <= l)%ZH1:(beta ^ (Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)) - 1) <= Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)))%ZH2:(Z.abs (Z.rem (Zscale n (- k)) (beta ^ l)) < beta ^ Zdigits (Z.rem (Zscale n (- k)) (beta ^ l)))%Z(0 < beta ^ l)%Zbeta:radixforall m e : Z, m <> 0%Z -> (0 <= e)%Z -> Zdigits (m * beta ^ e) = (Zdigits m + e)%Zbeta:radixforall m e : Z, m <> 0%Z -> (0 <= e)%Z -> Zdigits (m * beta ^ e) = (Zdigits m + e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZZdigits (m * beta ^ e) = (Zdigits m + e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZZdigits (m * beta ^ e) = (Zdigits m + e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m + e - 1) <= Z.abs (m * beta ^ e) < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m + e - 1) <= Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= beta)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m + e - 1) <= Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m + e - 1) <= Z.abs m * beta ^ e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m - 1 + e) <= Z.abs m * beta ^ e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m - 1) * beta ^ e <= Z.abs m * beta ^ e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m - 1)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m - 1) <= Z.abs m)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= beta ^ e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m - 1)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= beta ^ e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m - 1)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m - 1)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ (Zdigits m + e))%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m * beta ^ e < beta ^ Zdigits m * beta ^ e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 < beta ^ e)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m < beta ^ Zdigits m)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(Z.abs m < beta ^ Zdigits m)%Zbeta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m)%Znow apply Zlt_le_weak, Zdigits_gt_0. Qed.beta:radixm, e:ZHm:m <> 0%ZHe:(0 <= e)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(0 <= Zdigits m)%Zbeta:radixforall e : Z, (0 <= e)%Z -> Zdigits (beta ^ e) = (e + 1)%Zbeta:radixforall e : Z, (0 <= e)%Z -> Zdigits (beta ^ e) = (e + 1)%Zbeta:radixe:ZHe:(0 <= e)%ZZdigits (beta ^ e) = (e + 1)%Zbeta:radixe:ZHe:(0 <= e)%ZZdigits (1 * beta ^ e) = (e + 1)%Zapply Zplus_comm. Qed.beta:radixe:ZHe:(0 <= e)%Z(Zdigits 1 + e)%Z = (e + 1)%Zbeta:radixforall x y : Z, (0 <= x)%Z -> (x <= y)%Z -> (Zdigits x <= Zdigits y)%Zbeta:radixforall x y : Z, (0 <= x)%Z -> (x <= y)%Z -> (Zdigits x <= Zdigits y)%Zbeta:radixx, y:ZZx:(0 <= x)%ZHxy:(x <= y)%Z(Zdigits x <= Zdigits y)%Zbeta:radixx, y:ZZx:(0 <= x)%ZHxy:(x <= y)%ZHx:(beta ^ (Zdigits x - 1) <= Z.abs x < beta ^ Zdigits x)%Z(Zdigits x <= Zdigits y)%Zbeta:radixx, y:ZZx:(0 <= x)%ZHxy:(x <= y)%ZHx:(beta ^ (Zdigits x - 1) <= Z.abs x < beta ^ Zdigits x)%ZHy:(beta ^ (Zdigits y - 1) <= Z.abs y < beta ^ Zdigits y)%Z(Zdigits x <= Zdigits y)%Zzify ; omega. Qed.beta:radixx, y:ZZx:(0 <= x)%ZHxy:(x <= y)%ZHx:(beta ^ (Zdigits x - 1) <= Z.abs x < beta ^ Zdigits x)%ZHy:(beta ^ (Zdigits y - 1) <= Z.abs y < beta ^ Zdigits y)%Z(beta ^ (Zdigits x - 1) < beta ^ Zdigits y)%Zbeta:radixforall x y : Z, (0 <= y)%Z -> (Zdigits x < Zdigits y)%Z -> (x < y)%Zbeta:radixforall x y : Z, (0 <= y)%Z -> (Zdigits x < Zdigits y)%Z -> (x < y)%Zbeta:radixx, y:ZHy:(0 <= y)%Z(Zdigits x < Zdigits y)%Z -> (x < y)%Zbeta:radixx, y:ZHy:(0 <= y)%Z((y <= x)%Z -> (Zdigits y <= Zdigits x)%Z) -> (Zdigits x < Zdigits y)%Z -> (x < y)%Zbeta:radixx, y:ZHy:(0 <= y)%Z(y <= x)%Z -> (Zdigits y <= Zdigits x)%Znow apply Zdigits_le. Qed.beta:radixx, y:ZHy:(0 <= y)%Z(y <= x)%Z -> (Zdigits y <= Zdigits x)%Zbeta:radixforall e x : Z, (e < Zdigits x)%Z -> (beta ^ e <= Z.abs x)%Zbeta:radixforall e x : Z, (e < Zdigits x)%Z -> (beta ^ e <= Z.abs x)%Zbeta:radixe, x:ZHex:(e < Zdigits x)%Z(beta ^ e <= Z.abs x)%Zbeta:radixe, x:ZHex:(e < Zdigits x)%ZH1:(beta ^ (Zdigits x - 1) <= Z.abs x)%ZH2:(Z.abs x < beta ^ Zdigits x)%Z(beta ^ e <= Z.abs x)%Zbeta:radixe, x:ZHex:(e < Zdigits x)%ZH1:(beta ^ (Zdigits x - 1) <= Z.abs x)%ZH2:(Z.abs x < beta ^ Zdigits x)%Z(beta ^ e <= beta ^ (Zdigits x - 1))%Zclear -Hex ; omega. Qed.beta:radixe, x:ZHex:(e < Zdigits x)%ZH1:(beta ^ (Zdigits x - 1) <= Z.abs x)%ZH2:(Z.abs x < beta ^ Zdigits x)%Z(e <= Zdigits x - 1)%Zbeta:radixforall e x : Z, (Z.abs x < beta ^ e)%Z -> (Zdigits x <= e)%Zbeta:radixforall e x : Z, (Z.abs x < beta ^ e)%Z -> (Zdigits x <= e)%Zbeta:radixe, x:Z(Z.abs x < beta ^ e)%Z -> (Zdigits x <= e)%Zomega. Qed.beta:radixe, x:Z((e < Zdigits x)%Z -> (beta ^ e <= Z.abs x)%Z) -> (Z.abs x < beta ^ e)%Z -> (Zdigits x <= e)%Zbeta:radixforall e x : Z, (Zdigits x <= e)%Z -> (Z.abs x < beta ^ e)%Zbeta:radixforall e x : Z, (Zdigits x <= e)%Z -> (Z.abs x < beta ^ e)%Zbeta:radixe, x:ZHex:(Zdigits x <= e)%Z(Z.abs x < beta ^ e)%Zbeta:radixe, x:ZHex:(Zdigits x <= e)%ZH1:(beta ^ (Zdigits x - 1) <= Z.abs x)%ZH2:(Z.abs x < beta ^ Zdigits x)%Z(Z.abs x < beta ^ e)%Znow apply Zpower_le. Qed.beta:radixe, x:ZHex:(Zdigits x <= e)%ZH1:(beta ^ (Zdigits x - 1) <= Z.abs x)%ZH2:(Z.abs x < beta ^ Zdigits x)%Z(beta ^ Zdigits x <= beta ^ e)%Zbeta:radixforall e x : Z, (beta ^ e <= Z.abs x)%Z -> (e < Zdigits x)%Zbeta:radixforall e x : Z, (beta ^ e <= Z.abs x)%Z -> (e < Zdigits x)%Zbeta:radixe, x:ZHex:(beta ^ e <= Z.abs x)%Z(e < Zdigits x)%Zomega. Qed.beta:radixe, x:ZHex:(beta ^ e <= Z.abs x)%Z((Zdigits x <= e)%Z -> (Z.abs x < beta ^ e)%Z) -> (e < Zdigits x)%Z
Number of digits of a product.
This strong version is needed for proofs of division and square root
algorithms, since they involve operation remainders.
beta:radixforall x y : Z, (0 <= x)%Z -> (0 <= y)%Z -> (Zdigits (x + y + x * y) <= Zdigits x + Zdigits y)%Zbeta:radixforall x y : Z, (0 <= x)%Z -> (0 <= y)%Z -> (Zdigits (x + y + x * y) <= Zdigits x + Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(Zdigits (x + y + x * y) <= Zdigits x + Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(Z.abs (x + y + x * y) < beta ^ (Zdigits x + Zdigits y))%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(x + y + x * y < beta ^ (Zdigits x + Zdigits y))%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(x + y + x * y < (x + 1) * (y + 1))%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z((x + 1) * (y + 1) <= beta ^ (Zdigits x + Zdigits y))%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(x * y + x + y < x * y + x + y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z((x + 1) * (y + 1) <= beta ^ (Zdigits x + Zdigits y))%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z((x + 1) * (y + 1) <= beta ^ (Zdigits x + Zdigits y))%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z((x + 1) * (y + 1) <= beta ^ Zdigits x * beta ^ Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(x + 1 <= beta ^ Zdigits x)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(y + 1 <= beta ^ Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(x < beta ^ Zdigits x)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(y + 1 <= beta ^ Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(Z.abs x < beta ^ Zdigits x)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(y + 1 <= beta ^ Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(y + 1 <= beta ^ Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(y < beta ^ Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(Z.abs y < beta ^ Zdigits y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= y + 1)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 + 0 + 0 <= x + y + x * y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 + 0 <= x + y)%Zbeta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x * y)%Znow apply Zmult_le_0_compat. Qed.beta:radixx, y:ZHx:(0 <= x)%ZHy:(0 <= y)%Z(0 <= x * y)%Zbeta:radixforall x y : Z, (Zdigits (x * y) <= Zdigits x + Zdigits y)%Zbeta:radixforall x y : Z, (Zdigits (x * y) <= Zdigits x + Zdigits y)%Zbeta:radixx, y:Z(Zdigits (x * y) <= Zdigits x + Zdigits y)%Zbeta:radixx, y:Z(Zdigits (Z.abs (x * y)) <= Zdigits x + Zdigits y)%Zbeta:radixx, y:Z(Zdigits (Z.abs (x * y)) <= Zdigits (Z.abs x) + Zdigits y)%Zbeta:radixx, y:Z(Zdigits (Z.abs (x * y)) <= Zdigits (Z.abs x) + Zdigits (Z.abs y))%Zbeta:radixx, y:Z(Zdigits (Z.abs (x * y)) <= Zdigits (Z.abs x + Z.abs y + Z.abs x * Z.abs y))%Zbeta:radixx, y:Z(Zdigits (Z.abs x + Z.abs y + Z.abs x * Z.abs y) <= Zdigits (Z.abs x) + Zdigits (Z.abs y))%Zbeta:radixx, y:Z(0 <= Z.abs (x * y))%Zbeta:radixx, y:Z(Z.abs (x * y) <= Z.abs x + Z.abs y + Z.abs x * Z.abs y)%Zbeta:radixx, y:Z(Zdigits (Z.abs x + Z.abs y + Z.abs x * Z.abs y) <= Zdigits (Z.abs x) + Zdigits (Z.abs y))%Zbeta:radixx, y:Z(Z.abs (x * y) <= Z.abs x + Z.abs y + Z.abs x * Z.abs y)%Zbeta:radixx, y:Z(Zdigits (Z.abs x + Z.abs y + Z.abs x * Z.abs y) <= Zdigits (Z.abs x) + Zdigits (Z.abs y))%Zbeta:radixx, y:Z(Z.abs x * Z.abs y <= Z.abs x + Z.abs y + Z.abs x * Z.abs y)%Zbeta:radixx, y:Z(Zdigits (Z.abs x + Z.abs y + Z.abs x * Z.abs y) <= Zdigits (Z.abs x) + Zdigits (Z.abs y))%Zbeta:radixx, y:Z(0 <= Z.abs x)%Z -> (0 <= Z.abs y)%Z -> (Z.abs x * Z.abs y <= Z.abs x + Z.abs y + Z.abs x * Z.abs y)%Zbeta:radixx, y:Z(Zdigits (Z.abs x + Z.abs y + Z.abs x * Z.abs y) <= Zdigits (Z.abs x) + Zdigits (Z.abs y))%Zapply Zdigits_mult_strong ; apply Zabs_pos. Qed.beta:radixx, y:Z(Zdigits (Z.abs x + Z.abs y + Z.abs x * Z.abs y) <= Zdigits (Z.abs x) + Zdigits (Z.abs y))%Zbeta:radixforall x y : Z, x <> 0%Z -> y <> 0%Z -> (Zdigits x + Zdigits y - 1 <= Zdigits (x * y))%Zbeta:radixforall x y : Z, x <> 0%Z -> y <> 0%Z -> (Zdigits x + Zdigits y - 1 <= Zdigits (x * y))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x + Zdigits y - 1 <= Zdigits (x * y))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 + (Zdigits y - 1) < Zdigits (x * y))%Z -> (Zdigits x + Zdigits y - 1 <= Zdigits (x * y))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 + (Zdigits y - 1) < Zdigits (x * y))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 + (Zdigits y - 1) < Zdigits (x * y))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(beta ^ (Zdigits x - 1 + (Zdigits y - 1)) <= Z.abs (x * y))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(beta ^ (Zdigits x - 1 + (Zdigits y - 1)) <= Z.abs x * Z.abs y)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(beta ^ (Zdigits x - 1) * beta ^ (Zdigits y - 1) <= Z.abs x * Z.abs y)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(beta ^ (Zdigits x - 1) <= Z.abs x)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(beta ^ (Zdigits y - 1) <= Z.abs y)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits x - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits y - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 < Zdigits x)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(beta ^ (Zdigits y - 1) <= Z.abs y)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits x - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits y - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(beta ^ (Zdigits y - 1) <= Z.abs y)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits x - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits y - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 < Zdigits y)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits x - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits y - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits x - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits y - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(0 <= beta ^ (Zdigits y - 1))%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(x <> 0%Z -> (0 < Zdigits x)%Z) -> (Zdigits x - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zbeta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(Zdigits y - 1 >= 0)%Zomega. Qed.beta:radixx, y:ZZx:x <> 0%ZZy:y <> 0%Z(y <> 0%Z -> (0 < Zdigits y)%Z) -> (Zdigits y - 1 >= 0)%Zbeta:radixforall m e : Z, (0 <= m)%Z -> (0 <= e <= Zdigits m)%Z -> Zdigits (m / beta ^ e) = (Zdigits m - e)%Zbeta:radixforall m e : Z, (0 <= m)%Z -> (0 <= e <= Zdigits m)%Z -> Zdigits (m / beta ^ e) = (Zdigits m - e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZZdigits (m / beta ^ e) = (Zdigits m - e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZZdigits (m / beta ^ e) = (Zdigits m - e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%Z(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - e - 1) <= m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - e - 1) <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - 1 - e) <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - 1) / beta ^ e <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Zbeta <> 0%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= e <= Zdigits m - 1)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - 1) / beta ^ e <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= e <= Zdigits m - 1)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ (Zdigits m - 1) / beta ^ e <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ e > 0)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 < beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e * beta ^ e < beta ^ (Zdigits m - e) * beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e * beta ^ e < beta ^ (Zdigits m - e) * beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m / beta ^ e * beta ^ e <= m)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m < beta ^ (Zdigits m - e) * beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ e * (m / beta ^ e) <= m)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m < beta ^ (Zdigits m - e) * beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ e > 0)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m < beta ^ (Zdigits m - e) * beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m < beta ^ (Zdigits m - e) * beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(m < beta ^ (Zdigits m - e + e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= Zdigits m - e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= Zdigits m - e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(0 <= m / beta ^ e)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH1:(beta ^ (Zdigits m - 1) <= m)%ZH2:(m < beta ^ Zdigits m)%ZHe':(e < Zdigits m)%Z(beta ^ e > 0)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - e - 1) <= Z.abs (m / beta ^ e) < beta ^ (Zdigits m - e))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (Zdigits m - Zdigits m - 1) <= Z.abs (m / beta ^ Zdigits m) < beta ^ (Zdigits m - Zdigits m))%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(beta ^ (0 - 1) <= Z.abs (m / beta ^ Zdigits m) < beta ^ 0)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(0 <= Z.abs (m / beta ^ Zdigits m) < 1)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(0 <= Z.abs 0 < 1)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(0 <= m < beta ^ Zdigits m)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(0 <= m < beta ^ Zdigits m)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(0 <= m)%Zbeta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(m < beta ^ Zdigits m)%Znow rewrite <- (Z.abs_eq m) at 1. Qed. End Fcore_digits.beta:radixm, e:ZHm:(0 <= m)%ZHe:(0 <= e <= Zdigits m)%ZH:(beta ^ (Zdigits m - 1) <= Z.abs m < beta ^ Zdigits m)%ZHe':e = Zdigits m(m < beta ^ Zdigits m)%Z
Specialized version for computing the number of bits of an integer
Section Zdigits2.forall m : positive, Z.of_nat (S (digits2_Pnat m)) = Zdigits radix2 (Z.pos m)forall m : positive, Z.of_nat (S (digits2_Pnat m)) = Zdigits radix2 (Z.pos m)m:positiveZ.of_nat (S (digits2_Pnat m)) = Zdigits radix2 (Z.pos m)m:positive(radix2 ^ (Z.of_nat (S (digits2_Pnat m)) - 1) <= Z.abs (Z.pos m) < radix2 ^ Z.of_nat (S (digits2_Pnat m)))%Zm:positive(radix2 ^ (Z.of_nat (S (digits2_Pnat m)) - 1) <= Z.abs (Z.pos m) < Zpower_nat radix2 (S (digits2_Pnat m)))%Zm:positive(radix2 ^ (Z.succ (Z.of_nat (digits2_Pnat m)) - 1) <= Z.abs (Z.pos m) < Zpower_nat radix2 (S (digits2_Pnat m)))%Zm:positive(radix2 ^ Z.pred (Z.succ (Z.of_nat (digits2_Pnat m))) <= Z.abs (Z.pos m) < Zpower_nat radix2 (S (digits2_Pnat m)))%Zm:positive(radix2 ^ Z.of_nat (digits2_Pnat m) <= Z.abs (Z.pos m) < Zpower_nat radix2 (S (digits2_Pnat m)))%Zapply digits2_Pnat_correct. Qed.m:positive(Zpower_nat radix2 (digits2_Pnat m) <= Z.abs (Z.pos m) < Zpower_nat radix2 (S (digits2_Pnat m)))%Zforall m : positive, Z.pos (SpecFloatCopy.digits2_pos m) = Zdigits radix2 (Z.pos m)forall m : positive, Z.pos (SpecFloatCopy.digits2_pos m) = Zdigits radix2 (Z.pos m)m:positiveZ.pos (SpecFloatCopy.digits2_pos m) = Zdigits radix2 (Z.pos m)m:positiveZ.pos (SpecFloatCopy.digits2_pos m) = Z.of_nat (S (digits2_Pnat m))m:positiveZ.pos (SpecFloatCopy.digits2_pos m) = Z.pos (Pos.of_succ_nat (digits2_Pnat m))induction m ; simpl ; try easy ; apply f_equal, IHm. Qed.m:positiveSpecFloatCopy.digits2_pos m = Pos.of_succ_nat (digits2_Pnat m)forall n : Z, SpecFloatCopy.Zdigits2 n = Zdigits radix2 nintros [|p|p] ; try easy ; apply Zpos_digits2_pos. Qed. End Zdigits2.forall n : Z, SpecFloatCopy.Zdigits2 n = Zdigits radix2 n