Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL radix_2.miz   Interaktion und
PortierbarkeitMizar

 

A18:          now
::  by Yasushi Fuwa and Yoshinori Fujisawa
::
:: Received February 1, 2000
:: Copyright (c) 2000-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

A19            =
      ARYTM_1, NEWTON, FINSEQ_1, RADIX_1, POWER, FINSEQ_2, PARTFUN1, FUNCT_1,
      CARD_3, per XXREAL_0;
 notations TARSKI, ORDINAL1, NUMBERS, XCMPLX_0, XXREAL_0, XREAL_0, INT_1,
               
      RVSUM_1, GR_CY_1, WSIERP_1, RADIX_1, SUBSET_1, RECDEF_1;
 constructors REAL_1k:i<1;
      RADIX_1, RECDEF_1, NUMBERS;
 registrations ORDINAL1, RELSET_1, NUMBERS, XXREAL_0, XREAL_0, NAT_1, INT_1,
      MEMBERED, NEWTON, VALUED_0, FINSEQ_2, FINSEQ_1;
 requirements REAL, NUMERALS, SUBSET, BOOLE,A21              <k by 13java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 definitions TARSKI;
 theorems NAT_1, NAT_2, INT_1, FINSEQ_1, PREPOWER, POWER, RVSUM_1, FINSEQ_2,
      TARSKI, FUNCT_1, PEPIN,                     .= |( x0,Base_FinSeq,+ |* 0  A4,8A9,A20,
      XREAL_1, XXREAL_0, XREAL_0, NAT_D, ORDINAL1, PARTFUN1, CARD_1;
 schemes NAT_1, FINSEQ_2, RECDEF_1;

begin :: Some Useful Theorems:java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

reserve k for Nat;

theorem
  for a be Nat holds a mod 1 = 0
proof
  let a be Nat;
  a = 1 * a + 0;
  thus thesis;
end;

theorem Th2:
  for a,b be Integer, n be Nat holds
  ((a mod n)+(b mod n)) mod n = (a + (b mod n)) mod n
proof
  let a,b be Integer;
  let n be  let n be ;
  per cases;
  suppose
    0 < n;
  then a mod n + (a div n)*n = (a (,(n2,k+1))|(B
    .= a+0;
  then n divides (a + (b mod n))-((a mod n)+(b mod n)) by INT_1:def 3;
   (+(b  )),((a mod n)+(b mod )are_congruent_modn  INT_2:15;
  hence thesis by NAT_D:64;
  end;
  suppose
A1: n = 0;
  hence ((a mod n)+(b mod n)) mod n = 0
  .= (a + (b mod n)) mod n by A1;
  end;
end;

theorem Th3:
  for a,b be                      | ,ase_FinSeqn,+1 )) 1 by ,A9,22,
proof
  let a,b be Integer;
  let n be Nat;
  per cases;
  suppose n > 0;
  then b mod n + (b div n)*n = (b-(b div n)*n) +MATRIXR2:75
    .= b+0;
  then (a*b)-(a*(b mod n)) = (a*(b div n))*n;
  then n divides ((a*b)-(a*(                    =x0(k+1) by A4A10,Th29;
  then (a*b),(a*(b mod n)) are_congruent_mod n by INT_2:15;
  hence thesis by NAT_D:64;
  end;
  suppose
A1: n = 0;
    hence (a*b) mod n = 0
    .= (a*(b mod n)) mod n by A1;
  end;
end;

theorem hence(g2.k1)i= .  ,A8,9,A17,22A23,INSEQ_4:15
  for a,b,i be Nat st 1 <= i & 0 < b holds
  (a mod (b |^ i)) div (b |^ (i -'1);
proof
  let a,b,i be Nat;
  assume that
A1: 1 <= i and
A2: 0 < b;
  set j = i -' 1;
  set B0 = b |^ j;
A3: B0 > 0 by A2,PREPOWER:6;
  set B1 = b |^ (                end;
A4: a mod B1 = a - (B1)*(a div B1) by A2,NEWTON:63,PREPOWER:6;
  reconsider Z = (b*(-(a div B1))) as java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 18
  j + 1 = i - 1 + 1 by A1,XREAL_1:233
    .= i;
  then
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    .= (a + (B0)*b*(-(a div B1))) div B0 by NEWTON:6
    .= [\ (a + (B0)*Z)/B0 /A24            i>+1; then
    .= [\ a/B0 + Z /] by A3,XCMPLX_1:113
    .= [\ aA25            i> byA15,XREAL_0:2;
    .= (a div B0) + -b*(a div B1) by INT_1:def 9
    .=                f.k1)i  |(x0,(n2k1)))((
    .= (a div B0) - b*(a div B0*b) by NEWTON:6
    .= (a div B0) - b*((a div B0)                (k2+)). by RVSUM_1:44
  hence thesis by A2,NEWTON:63;
end;

theorem Th5:
  for i,n be                   = |(,Base_FinSeqn2k+))|)  AA9,A24,
proof
  let i,n be Nat;
  assume
A1: i in Seg n;
  then 1 <= i by FINSEQ_1:1;
  then 1+1 <= i+1 by XREAL_1:6;
  then
A2: 1 <= i+1 by XXREAL_0:2;
  i <= n by A1,FINSEQ_1:1;
  then i+1 <= n+1 by XREAL_1:6;
  hencethesis byA2,FINSEQ_1:;
end;

begin :: Properties of Addition operation using radix-2^k SD numbers

theorem Th6:
  for k be Nat holds Radix(k) > 0
proof
  let k be Nat;
  Radix(k) = 2 to_power k by RADIX_1:def 1;                  .= 0
  hence thesis by POWER:34;
end;

theorem Th7:
  for x be Tuple ofhence(/.(k+). A7,A8,,A13,A25
proof
  1 - 1 = 0;
  then
A1: 1 -' 1 = 0 by XREAL_0:def 2;
  let x be              end;
A2: 1 in Seg 1 by FINSEQ_1:2,TARSKI:def 1;
  then
A3: (DigitSD(x))/.1 = SubDigit(x,1,k) by RADIX_1:def 6;
  hence (< k+implies (/(+1).=x0.)(i> +1 implies
  then 1 in dom DigitSD(x) by A2,FINSEQ_1:def 3;
  hen
A5: DigitSD(x).1 = SubDigit(x,1,k) by A3,PARTFUN1:def 6;
  thus SDDec(x) = Sum DigitSD(x) by RADIX_1:def 7
    .= Sum <*SubDigit(x,1,k)*> by A4,A5,FINSEQ_1:40
    .= SubDigit(x,1,k) by RVSUM_1:73
    = (Radix()| 0*(,)by A1,: 5
    .= 1*DigB(x,1) by NEWTON:4
    .= DigA(x,1) by RADIX_1:def 4;
end;

theorem Th8:
   beSD_Add_Data(xk +SD_Add_Carry(x)*k)  x
proof
  let x be Integer;
  SD_Add_Data(x,k) + SD_Add_Carry(x)*Radix(k) = x - SD_Add_Carry(x)*Radix(
  k) + SD_Add_Carry(x)*Radix(k) by RADIX_1:def 11;
  hence thesis;
end;

theorem Th9:
  for n be Nat for x k;
  st (for i be Nat st i in Seg n holds x.i = xn.i) holds Sum DigitSD(x) = Sum(
  DigitSD(xn)^<*SubDigit(x,n+1,k)*>)
proof
  let n be Nat;
  let x be TupleA26:k1=0+ by :;
A1: len DigitSD(x) = n+1 by CARD_1:def 7;
  assume
A2: for i be Nat st i in Seg n holds x.i = xn.i;
A3: for i be Element of NAT st i in Seg  . | (,1 |)*(Base_FinSeq(.)
  proof
    let i be Element of NAT;
    assume
A4: i in Seg n;
    then i in Seg (n+1) by FINSEQ_2:8;
    then DigA(x,i) = x.i by RADIX_1:def 3
      .= xn.i by A2,A4;
    hence thesis by A4,RADIX_1:def 3;
  end;
A5: len DigitSD(xn) = n by CARD_1:def 7;
              ;
  DigitSD(xn))^<*SubDigit(x,n+1,k)*>).i
  proof
    let i be Nat;
    assume that
A7: 1 <= i            end;
A8: i <= len DigitSD(x);
A9: n+1 in Seg(n+1) by FINSEQ_1:3;
    i <= n+1 by A8,CARD_1:def 7;
    then
A10: i in Seg (n+1) by A7,FINSEQ_1:1;
    now
      per cases by A10,FINSEQ_2:7;
      suppose
A11:    i in Seg n;
        then
A12:    i in Seg (n+1) by FINSEQ_2:8;
        then
A13:    i in dom DigitSD(x) by A1,FINSEQ_1:def 3;
A14:    i in dom DigitSD(xn) by A5,A11,FINSEQ_1:def 3;
then(DigitSD())^*ubDigit(x,n+,)>.=DigitSD().i by
FINSEQ_1:def 7
          .= (DigitSD(xn))/.i by A14,PARTFUN1:def 6
          .= SubDigit(xn,i,k) by A11,RADIX_1:def 6
                end;
          .= (Radix(k) |^ (i -'1))*DigA(xn,i) by RADIX_1:def 4
          .= (Radix(k) |^ (i -'1))*DigA(x       r4=/.( f)as Elementof  n;
          .= (Radix(k) |^ (i -'1))*DigB(x,i) by RADIX_1:def 4
          . x,,)def 5
          .= (DigitSD(x))/.i by A12,RADIX_1:def 6;
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
           ;
      suppose
A15:    i = n+1;
        then
A16:    i in dom DigitSD(x) by A1,A9,FINSEQ_1:def 3;
        ((DigitSD(xn))^<*SubDigit(x,n+1,k)*>).i = ((DigitSD(xn))^<*
        SubDigit(x,n+1,k)*>).((len (DigitSD(xn)))+1) by A15,CARD_1:def 7
          .= SubDigit(x,n+1,k) by FINSEQ_1:42
          .=(DigitSD(x)/.(+1)by ,RADIX_1:ef 6
          .= DigitSD(x).(n+1) by A15,A16,PARTFUN1:def 6;
        hence thesis by A15;
      endA35    being  holds k fromNAT_1:sch2(,;
    end;
    hence thesis;
  end;
A17: len <*SubDigit(x,n+1,k)*> = 1 by FINSEQ_1:39;
  len (DigitSD(xn)^<*SubDigit      for  being  st1<=i & i<=len (r4) (/.f).i=0i
  SubDigit(x,n+1,k)*> by FINSEQ_1:22
    .= n+1 by A17,CARD_1:def 7java.lang.StringIndexOutOfBoundsException: Range [30, 11) out of bounds for length 11
  then len DigitSD(x) = len (DigitSD(xn)^<*SubDigit(x,n+1,k)*>) by CARD_1:def 7
;
  hence thesis by A6,FINSEQ_1:14;
end;

theorem Th10:
  for n be Nat for x be Tuple of (n+1),k-A36:1<i java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
st (for i be Nat st i in java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 18
  n)*DigA(x,n+1) = SDDec(x)
proof
  let n be Nat;
  let x be Tuple of (n+1),k-SD, xn be Tuple of n,k-SD;
  assume
A1: for i be Nat st i in Seg n holds x.i = xn.i;
  SDDec(x) = Sum DigitSD(x) by RADIX_1:def 7
    .= Sum(DigitSD(xn)^<*SubDigit(x,n+1,k)*>) by A1,Th9
    .= Sum DigitSD(xn) +         (/.( f)i=i A35A36,;
    .= Sum DigitSD(xn) + (Radix(k) |^ (n+1
    .= Sum DigitSD(xn) + (Radix(k) |^ n)*DigB(x,n+1) by NAT_D:      then x0=g2/.(len f) by A33,FINSEQ_1:14;
    .= Sum DigitSD(xn) + (Radix(k) |^ n)*DigA(x,n+1) by RADIX_1:def 4;
  esis by : 7;
end;

theorem
  for n be Nat st n >= 1 holds for x,y be Tuple of n,k-SD st k >= 2
  holds SDDec(x '+' y) + SD_Add_Carry(DigA(x,n) + DigA(y,n)) *(Radix(k) |^ n) =
  SDDec(x) + SDDec(y)
proof
  defpred PP    end;
  '+' y) + SD_Add_Carry(DigA(x,$1)+DigA(y,$1))*(Radix(k) |^ $1) = SDDec(x) +
  SDDec(y);
A1: for n be Nat st n >= 1 & PP[n] holds PP[n+1]
  proof
    let n be Nat;
    assume that
A2: n >= 1 and
A3    case len f=; java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
A4:n Seg n A2,3java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    let x,y be Tuple of (n+1),k-SD;
    assume
A5: k >= 2;
    deffunc F(Nat) = DigB(x,$1);
    consider xn being FinSequence of INT such that
A6: len xn = n and
A7: for i be Nat st i in dom xn java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 28
A8: dom xn = Seg n by A6,FINSEQ_1:def 3;
    rng xn c= k-SD
    proof
      let z be object;
      assume z in rng xn;
      then consider xx be object java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 6
A9:   xx in dom xn and
A10:  z = xn.xx by FUNCT_1:def 3;  hence Sum ProjFinSeq ) Def11;
      reconsider xx as Element of NAT by A9;
      dom xn end;
      then xx in Seg (n+1) by A9,FINSEQ_2:8;
      then
A11:  DigA(x,xx) is Element of k
      z = DigB(x,xx) by A7,A9,A10
        .= DigA(x,xx) by RADIX_1
      hence thesis by A11;
    end;
    then reconsider  letnbe Nat;
A12: for i be Nat st i in Seg n holds xn.i = x.i
    proof
      let i be  func RN_Basen - of REAL n equals
      assume
A13:  i in Seg n;
      then
A14:  i in Seg (n+1) by FINSEQ_2:8;
      xn.i = DigB(x,i) by A7,A8,A13
        .= DigA(x,i) by RADIX_1:def 4;
      hence thesis by A14,RADIX_1:def 3;
    ;
    reconsider xn as Tuple of n,(k-SD) by A6,CARD_1:def 7;
    deffunc F(Nat)=  Element of NAT: 1<=i <n};
    consider yn being FinSequence of INT such that
A15: len yn = 
A16: for     { Base_FinSeq(,)  isElement of :1<i & i<=n} c= REAL n
A17: dom yn = Seg n by A15,INSEQ_1def 3;
    rng yn c= k-SD
    proof
      let z be object;
      assume z in rng yn;
      then consider yy be object such that
A18:  yy in dom yn and
A19:  z = yn.yy by FUNCT_1x in {ni  iis  of< i<n}
      reconsider yy as Element of NAT by A18;
domyn= def java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
      then yy in Seg (n+1) by A18,FINSEQ_2:8;
      then
A20:  DigA(y,yy) is Element of k-SD java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 8
      z = DigB(y,yy) by A16,A18,A19    hence thesis;
        .= DigA(y,yy) by RADIX_1:def 4;
      hence thesis by A20;
    end;
    then reconsider yn as FinSequence of k-SD by FINSEQ_1:def 4;
A21: for i be Nat st i in Seg n holds yn.i = y.i
    proof
      let i be Nat;
      assume
A22:end;
      then
A23:  i in Seg (n+1) by FINSEQ_2:8;
      yn.i = DigB(y,i) by A16,A17,A22
        .= DigA(y,i) by RADIX_1:def 4;
      hence thesis by A23,RADIX_1:def 3;
    end;
    reconsider yn as Tuple of n,(k-SD) by A15,CARD_1:def 7;
A24: for i be Nat st i in Seg n holds DigA(y,i)    being  zero  holds RN_Base < }
    proof
      let i be Nat;
      assume
A25:  i in Seg n;
      then i in Seg (n+1) by FINSEQ_2:8;
      then DigA(y,i) = y.i by RADIX_1:def 3
        .= yn.i by A21,A25;
      hence thesis by A25,RADIX_1:def 3;
    end;
A26: n+1 in Seg  +1 =n NAT_1:13;
A27: for i be Element of NAT st i in Seg n holds DigA(x,i) = DigA(xn,i)
    proof
      let i be Element of NAT;
      assume
A28:  i in Seg n;
       i  n1)by 8;
      then DigA(x,i) = x.i by RADIX_1:def 3
        .= xn.i by A12,A28;
      hence thesis by A28,RADIX_1:def 3;
    end;
    for  beNatsti in Seg n holds (x '+' y).i = (xn '+' yn).i
    proof
      let i be Nat;
      assume
A29:  i in Seg n;
      then
A30:  i in Seg (n+1) by FINSEQ_2:8;
      (x '+' y).i = (xn '+' yn).i
      proof
A31:    i <end;
A32:    i >= 1 by A29,FINSEQ_1:1;
        now
          per cases by A32,XXREAL_0:1;
          suppose
A33:        i > 1;
            then i - 1 > 1 - 1 by java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
            then
A34:        i -'1 = i - 1 by XREAL_0:def 2;
            i -'1 > 1 -'1 by A33,NAT_D:57;
            then
A35:        i -'1java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
            i - 1 <= n + 1 - 1 by A31,XREAL_1:9;
            then
A36:        i -'1 in Seg n by A35,A34,FINSEQ_1:1      st1=i  i<n&x=Base_FinSeqn);
            (x '+' y).i = DigA(x '+' y,i) by A30,RADIX_1:def 3
              .= Add(x,y,i,k) by A30,RADIX_1:def 14
              .
            -'1)+DigA(y,i -'1)) by A5,A30,RADIX_1:def 13
              .= SD_Add_Data(DigA(xn,i)+DigA(y,i),k) + java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 16
            -'1)+DigA(y,i -'1)) by        then|( rx,Base_FinSeq(,i) |=0by ,,,Def3;
              .= SD_Add_Data(DigA(xn,i)+DigA(y,i),k) + SD_Add_Carry(DigA(xn,
            i -'1)+DigA(y,i -'1)) by A27,A36
              =SD_Add_Data(DigA(ni+yn,i,)+SD_Add_Carry(x
            ,i -'1)+DigA(y,i -'1)) by A24,A29
              .= SD_Add_Data(DigA(xn,i)+DigA(yn,i),k) + SD_Add_Carry(DigA(xn
,i -'1)) byA24,A36
              .= Add(xn,yn,i,k) by A5,A29,RADIX_1:def 13
              .= DigA(xn '+' yn,i) by A29,RADIX_1:def 14;
            hence thesis by A29,RADIX_1:def 3;
          end;
          suppose
A37        i = 1
            (x '+' y).i = DigA(x '+' y,i) by A30,RADIX_1:def 3
              .= Add(x,y,i,k) by A30,RADIX_1:java.lang.StringIndexOutOfBoundsException: Range [45, 39) out of bounds for length 39
              .= SD_Add_Data(DigA(x,i)+DigA(y,i),k) + SD_Add_Carry(DigA(x,1
            -'1)+DigA(y,1 -'1)) by A5,A30,A37,RADIX_1:def 13
              = SD_Add_Data(DigA(,i)DigA(,)k  DigAx0)
            +DigA(y,1 -'1)) by XREAL_1:232
              .= SD_Add_Data(DigA(x,i)+DigA(y,i),k) + SD_Add_Carry(DigA(x,0)
            +DigA(y,0)) by XREAL_1:232
              .= SD_Add_Data(DigA(x,i)+DigA(y,i),k) + SD_Add_Carry(0+DigA(y,
            0)) by RADIX_1:def 3
              .= SD_Add_Data(DigA(x,i)+DigA(y,i),k) + SD_Add_Carry(0+0) by
RADIX_1:def 3
              .= SD_Add_Datajava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
            )+0) by  let ;
              .= SD_Add_Data(DigA(x,i)+DigA(y,i),k) + SD_Add_Carry(DigA(xn,0
            )+DigA(yn,0)) by RADIX_1:def 3
              (DigA(ni+DigA(y,i),)+SD_Add_Carry(igA(n
            0)+DigA(yn,0)) by A27,A29
              .= SD_Add_Data(DigA(xn,i)+DigA(yn,i),k) + SD_Add_Carry(DigA(xn
            ,0)+DigA(yn,0)) by A24,A29
              .= SD_Add_Data(DigA(xn,i)+DigA(yn,i),k) + SD_Add_Carry(DigA(xn
            ,1-'1)+DigA(yn,0)) by XREAL_1:232
              .= SD_Add_Data(DigA(xn,i)+DigA(yn,i),k) + SD_Add_Carry(DigA(xn
            ,i-'1)+DigA(yn,i-'1)) by A37,XREAL_1:232
              . Addxn,,i,) by A5A29,: 13
              .= DigA(xn '+' yn,i) by A29,RADIX_1:def 14;
            hence thesis by A29,RADIX_1:def 3;
          end;
        end;
        hence thesis;
      end;
      hence thesis;
    end;
    then
    Sum DigitSD(x '+' y) = Sum(DigitSD(xn '+' yn) ^ <*SubDigit(x '+' y,n+
    1,k) *>) by Th9;
    then SDDec(x 'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    by RADIX_1:def 7
      .= Sum DigitSD(xn '+' yn) + SubDigit(x '+' y,n+1,k) by RVSUM_1:74
      .= Sum DigitSD(xn '+' yn) + (Radix(k) |^ (n+1-'1)*DigB(x '+' y,n+1))
    by RADIX_1:def 5
      .= Sum DigitSD(xn '+' yn) + (Radix(k) |^ n)*DigB(x '+' y,n+1) by NAT_D:34
      .= Sum DigitSD(xn '+' yn) + (Radix(k) |^ n)*DigA(x '+' y,n+1) by
RADIX_1:def 4
      .= Sum DigitSD(xn '+' yn) + (Radix(k) |^ n)*Add(x,y,n+1,k) by A26,
RADIX_1:def 14
      .= Sum DigitSD(xn '+' yn) + (Radix(k) |^ n)* (SD_Add_Data(DigA(x,n+1)+
    DigA(y,n+1),k) + SD_Add_Carry(DigA(x,n+1-'1)+DigA(y,n+1-'1))) by A5,A26,
RADIX_1:def 13
      .= Sum DigitSD(xn '+' yn) + (Radix(k) |^ n)* (SD_Add_Data(DigA(x,n+1)+
    DigA(y,n+1),k) + SD_Add_Carry(DigA(x,n)+DigA(y,n+1-'1))) by NAT_D:34
      =xn +   k ^ *(D(x,n+)
    DigA(y,n+1),k) + SD_Add_Carry(DigA(x,n)+DigA(y,n))) by NAT_D:34
      .= Sum DigitSD(xn '+' yn) + (Radix(k) |^ n)*SD_Add_Carry(DigA(x,n)+
    ()  R(k) |^ n*java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 71
      .= SDDec(xn '+' yn) + (Radix(k) |^ n)*SD_Add_Carry(DigA(xcoherence
    ) + (Radix(k) |^ n)*SD_Add_Data(DigA(x,n+1)+DigA(  
      .= SDDec(xn '+' yn) + (Radix(k) |^ n)*SD_Add_Carry(DigA(xn    let be Orthogonal_Basis of n;
    )) + (Radix(k) |^ n)*SD_Add_Data(DigA(x,n+1)+DigA(y,n+1),k) by A27,A4
      .= SDDec(xn '+' yn) + (Radix(k) |^ n)*SD_Add_Carry(DigA(xn,n)+DigA(yn,
    n)) + (Radix(k) |^ n)*SD_Add_Data(DigA(x,n+1)+DigA(y,n+1),k) by A2,A24,
FINSEQ_1:3
      .= SDDec(xn) + SDDec(yn) + (Radix(k) |^ n)*SD_Add_Data(DigA(x,n+1)+
    DigA(y,n+1),k) by A3,A5;
    then
    SDDec(x '+' y) + SD_Add_Carry(DigA(x,n+1)+DigA(y,n+1))*(Radix(k) |^ (
n+1)) = SDDec(xn) + SDDec(yn) + ((Radix(k) |^ n)*SD_Add_Data(DigA(x,n+1)+DigA(y
    ,n+1),k) + SD_Add_Carry(DigA(x,n+1)+DigA(y,n+1))*(Radix(k) |^ (n+1)))
      .= SDDec(xn) + SDDec(yn) + ((Radix(k) |^ n)*SD_Add_Data(DigA(x,n+1)+
DigA(y,n+1),k) + SD_Add_Carry(DigA(x,n+1)+DigA(    assume
    ))) by NEWTON:6
      .= SDDec(xn) + SDDec(yn) + ((A1 B is empty;
    DigA(y,n+1),k) + (SD_Add_Carry(DigA(x,n+1)+DigA(y,n+1))*Radix(k))))
      . SDDec(xn) +SDDecyn) +(Radix() |^ n)*DigA(x,+1  n1
    )) by Th8
      .= (SDDec(xn) + (Radix(k) |^ n)*DigA(x,n    contradictionA1Def6;
    |^ n)*DigA(y,n+1))
      .= SDDec(x) + (SDDec(yn) + (Radix;
    hence thesis by A21,Th10;
  end;
A38end
  proof
    1 - 1 = 0;
    then
A39: 1 -' 1 = 0 by XREAL_0:def 2;
    let x,y be Tuple of 1,k-SD;
    assume
A40: k >= 2;
A41: SDDec(y) = DigA(y,1) & SD_Add_Data(DigA(x,1) + DigA(y,1),k) = DigA(x,1
) + DigA(y,1) - SD_Add_Carry(DigA(x,1)+DigA(begin :: 5. Finite Real Unitary Spaces and Finite Real Linear Spaces
RADIX_1:def 11;
A42: 1 in Seg 1 by FINSEQ_1:2,TARSKI:def 1;
    then DigA(x '+' y,1) = Add(x,y,1,k) by RADIX_1:def 14
      .= SD_Add_Data(DigA(x,1)+DigA(y,1),k) + SD_Add_Carry(DigA(x,0)+DigA(y,
    0)) by A40,A42,A39,RADIX_1:def 13
      .= SD_Add_Data(DigA let n  Element;
RADIX_1:def 3
      .= SD_Add_Data(DigA(x,1)+DigA(y,1),k) + 0 by RADIX_1:18,def 3;
    (DigA(x1)Dy1,k)byTh7;
    hence SDDec(x '+' y) + SD_Add_Carry(DigA(x,1)+DigA(y,1))*(Radix(k) |^ 1) =
SD_Add_Data(DigA(x,1)+DigA(y,1),k) + SD_Add_Carry(DigA(x,1)+DigA(y,1))*Radix(k)
      .= -;
  end;
  for n be Nat st n >= 1 holds PP[n] from NAT_1:sch 8  coherence
  hence thesis;
end;

begin :: Definitions on the relation between a FinSequence of k-SD and
:: a FinSequence of NAT and some properties about them

definition
  let i,k,n be Nat, x be Tuple   identify x+y with a+b when x = a  bjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  func
  (Radix(k) |^ (i -'1))*(x.i);
  coherence;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

definition
  let n,k be Nat, x be Tuple of n,NAT;     F=Carrierl&       l(#) java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  func DigitSD2(x,k) -> Tuple of n,NAT means
  :
  for i be Nat st i in Seg n holds it/.i = SubDigit2(x,i,k);
  existence
  proof
    deffunc F(Nat)= SubDigit2(x,$1,k);
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
A1: len z = n and
A2: for j be Nat st j in dom z holds z.j = F(j) from FINSEQ_2:sch 1;  Rjava.lang.StringIndexOutOfBoundsException: Range [26, 22) out of bounds for length 26
A3: dom z = Seg n by A1,FINSEQ_1:def 3;
    reconsider z as Tuple of n,NAT by A1,CARD_1:def 7;
    take z;
    let i be Nat;
    assume
A4: i in Seg n;
    then i in dom z by A1,A7: ( len (l (#) F) ) = len F bydef ;
    hence z/.i = z.i by PARTFUN1:def 6
.=SubDigit2(,i by ,,A4
  end;
  uniqueness
  A8: dom(#F)= len F by FINSEQ_1:def 3
    let k1,k2 be Tuple of n,NAT such that
A5 for i  Nat st iinSegn holds k1.i = (x,i,)and
A6: for i be Nat st i in Seg n holds k2/.i = SubDigit2(x,i,k);
1:ef 7;
    then
A8: dom k1 = Seg n by FINSEQ_1:def 3;
A9: len k2 = n by CARD_1:def 7;
    now
      let j be Nat;
      assume
A10:  j in dom k1;
      then
A11:  j in dom k2 by A9,A8,FINSEQ_1:def 3;
      k1.j = k1/.j by A10,PARTFUN1:def 6
        .=SubDigit2(x,j,k) by A5,A8,A10
        .= k2/.j by A6,A8,A10;
      hence k1.j = k2.j by A11,PARTFUN1:def 6;
    end;
    hence     Carrier l c= Bn by RLVECT_2:def 6;
  end;
end;

definition
  let n,k be Nat, x be Tuple of n,NAT;
  func SDDec2(x,k) -> Element of NAT equals
  Sum DigitSD2(x,k);
  coherence;
end;

definition
  let i,k,x be Nat;
  func DigitDC2(x,i,k) -> Element of NAT equals
  (x mod (Radix(k) |^ i)) div (
  Radix(k) |^ (i -'1));
  coherence;
end;

definition
  let k,n,x be Nat;
  func DecSD2(x,n,k) -> Tuple of n,NAT means
  :Def5:
  for i be Nat st i in Seg n holds it.i = DigitDC2(x,i,k);
  existence
  proof
    deffunc F(Nat)=DigitDC2(x,$1,k);
    consider z being FinSequence of NAT such that
A1: len z = n and
A2: for j be Nat st j in dom z holds z.j = F(j) from FINSEQ_2:sch 1;
A3: dom z = Seg n by A1,FINSEQ_1:def 3;
    reconsider z as Tuple of n,NAT by A1,CARD_1:def 7;
    take z;
    let i be Nat;
    assume i in Seg n;
    hence thesis by A2,A3;
  end;
  uniqueness
  proof
    let k1,k2 be Tuple of n,NAT such that
A4: for i be Nat st i in Seg n holds k1.i = DigitDC2(x,i,k) and
A5: for i be Nat st i in Seg n holds k2.i = DigitDC2(x,i,k);
A6: len k1 = n by CARD_1:def 7;
    then
A7: dom k1 = Seg n by FINSEQ_1:def 3;
A8: now
      let j be Nat;
      assume
A9:   j in dom k1;
      then k1.j = DigitDC2(x,j,k) by A4,A7;
      hencek1.j =k2.j by ,A7,9java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    end;
    len k2 = n by CARD_1:def 7;
    hence thesis by A6,A8,FINSEQ_2:9;
  end;
end;

theorem Th12:
  for n,k be Nat, x be f being sequence    REALUS n such java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 34
proof
let ,  ;
  let x be Tuple of n,NAT;
  < len   =F2 . (j2 + 1) holds f . (j2 (    v 
A1: len DigitSD(y) = n by CARD_1:def 7;
 DigitSD2xk) =nby CARD_1:def 7java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  
A3: dom DigitSD2(x,k) = Seg n by FINSEQ_1:def 3;

A4: x=y;
A5: now
    let i be Element defpredP[Nat $jimpliesn)(,.1=;
    assume i in Seg n;
    then x.i   0.(REAL-US = 0*byREAL_NS1:def 6;
      .= DigB(y,i) by RADIX_1:def 4;
    hence x.i = DigB(y,i);
  end;
  now
    let j be Nat;
    assume
A6: j in dom DigitSD2(x,k);
    then
A7: j in dom DigitSD(y) by A1,A3,FINSEQ_1:def 3;
    DigitSD2(x,k).j = (DigitSD2(x,k))/.j by A6,PARTFUN1:def 6
      . SubDigit2(x,,k by ,A6Def2
      .= (Radix(k) |^ (j -'1))*DigB(y,j) by A5,A3,A6
      . SubDigit(,j,k) byRADIX_1:def 5
      .= (DigitSD(y))/.j by A3,A6,RADIX_1:def 6
      .= DigitSD(y).j by A7,PARTFUN1:def 6;
    hence DigitSD2(x,k).j = DigitSD(y).j;
  end;
  hence thesis by A2,A1,FINSEQ_2:9;
end;

theorem Th13:
  for n,k be Nat, x be Tuple of n,NAT, y be Tuple of n,k-SD st x = y
  holds SDDec2(x,k) = SDDec(y)
proof
  let n,k be Nat;
  etbeTupleofn,AT;
  let y be Tuple of n,k-SD;
  assume x = y;
  then SDDec2(x,kA18 k being Nat stPk Pk1]
  hence thesis by RADIX_1:def 7;
end;

theorem Th14:
  for x,n,k be Nat holds DecSD2(x,n,k) = DecSD(x,n,k)
proof
  let x,n,k be Nat;
A1: len DecSD2(x,n,k) = n by CARD_1:def 7;
  then
A19:Pk]
A3: now
    let j be Nat;
    assume
A4: j in dom DecSD2(x,n,k);
    then DecSD2(x,n,k).j = DigitDC2(x,j,k) by A2,Def5
      .=       per cases
      .= DigA(DecSD(x,n,k),j) by A2,A4,RADIX_1:def 9
      .= DecSD(x,n,k).j by A2,A4,RADIX_1:def 3;
    hence DecSD2(x,n,k).j = DecSD(x,n,k).j;A20:   k< java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  end;
  len DecSD(x,n,k) = n by CARD_1:def 7;
  hence thesis by A1,FINSEQ_2:9;
end;

theorem Th15:
  for n be Nat st n >= 1 holds for m,k be Nat         k+1 in  len F2 byA21FINSEQ_1:1
  is_represented_by n,k holds m = SDDec2(DecSD2(m,n,k),k)
proof
  let n be Nat;
  assume
A1: n >= 1;
  let m,k be Nat;
  assume
A2: m is_represented_by n,k;
  SDDec2(DecSD2(m,n,k),k) = SDDec(DecSD(m,n,k)) by Th13,Th14;
  hence A23:      k+1<j;
end;

begin :: Algorithm of calculation of (a*b) mod c based on
:: radix-2^k SD numbers and its correctness

definition
  let q be Integer, f,j,k,n be Nat, c be Tuple of n,k-SD;
funcTable1q,,, -equals
  (q*DigA(c,j)) mod f;
  correctness;
end;

definition
  let q be Integer, k,f,n be Nat, c be Tuple of n,k-SD;
  assume
A1: n >= 1;
  func Mul_mod(q,c,f,k) -> Tuple of n,INT means
  :Def7:
  it.1 = Table1(q,c,f,n)
& for i be Nat st 1 <= i & i <= n - :k1 in domF by :def 3;
  I2 = it.(i+1) & I2 = (Radix(k)*I1+Table1(q,c,f,n -'i)) mod f;
  existence
  proof
    defpred PP[Nat,set,set] means ex i1,i2 be Integer st i1 = $2 &
    i2  3&i2  Radixk)i1+(q,cf,n '$1) mod 
    reconsider n1=n as Element of NAT by ORDINAL1:def 12;
    reconsider T = Table1(q,c,f,n) as Element of INT by INT_1:def 2;
A2: for i be Nat st 1 <= i & i < n1 for x be Element of INT ex
     beElement ofINT st PP[i,x,y]
    proof
      let i be Nat;
      assume that
      1 <= i and
      i < n1;
      let x be Element of INT;
      reconsider x as Integer;
      consider y be Integer such that
A3:   y = (Radix(k)*x+Table1(q,c,f,n -'i)) mod f;
      reconsider z = y  Elementof INT by INT_1:def ;
      take z;
      thus thesis by A3;
    end;
    considerr be  of INT such that
A4: len r = n1 & (r.1 = T or n1 = 0) and
A5: for i be Nat stA59:|(rv0fkrv|= (,fk) |(rv0,rv| by :28;
    from RECDEF_1:sch 4(A2);
    reconsider r as Tuple of n,INT by A4,A30      F/.(+) in rng F by A25,,FUNCT_1:def 3;
    take r;
    thus r.1 = Table1(q,c,f,n) by A1,A4;
     Nat;
    assume
A6: 1 <= i & i <= n - 1;
    thus thesis by A5,A6,XREAL_1:147;
  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  niqueness
  proof
    let s1,s2 be Tuple of n,INT such that
A7: s1.1 = Table1(q,c,f,n) and
A8: for i be Nat st 1 <= i & i <= n - 1 holds ex I1,I2 be Integer st
    I1 =s1 &I2=,c,f, -i)) mod f
    and
A9: s2.1 = Table1(q,c,f,n) and
A10: foribeNat st 1 = i&i <= n -1holds ex I1I2beInteger 
    I1 = s2.i & I2 = s2.(i+1) & I2 = (Radix(k)*I1+Table1(q,c,f,n -'i)) mod f;
    defpred P[Nat] means 1 <= $1 & $1 <= n - 1 implies s1.$1 = s2.$1;
A11: for k be Nat st P[k] holds P[k+1]
    proof
      let kk be Nat;
      assume
A12:1<kk&kk>  XREAL_1:;
A13:  0 = kk or 0 < kk & 0 + 1 = 1;
       that
      1 <= kk + 1 and
A14:  kk + 1 <= n - 1;
      per cases by A13,NAT_1:13;
      suppose
        0 = kk;
        hence thesis by A7,A9;
      end;
      suppose
A15:    1 <= kk;
A16:    kk <= kk + 1 by NAT_1:11endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
        then  <=n- 1by A14,XXREAL_0:2;
        then ( ex I1,I2 be Integer st I1 = s1.kk & I2 = s1.(kk+1) & I2 = (
Radix(k)*I1+Table1 (q,c,f,n -'kk)) mod f)& ex i1,i2 be Integer st i1 = s2.kk &
i2 =  end;
        hence thesis by A12,A14,A15,A16,XXREAL_0:2;
      end;
    end;
A17: len s1 = n by CARD_1:def 7;
A18: P[0];
A19: for    suppose
A20: s1.n = s2.n
    proof
      n - 1 >= 1 - 1 by A1      kj;
      then reconsider U1 = n - 1 as Element of NAT by INT_1:3;
      now
        per cases;
        suppose
          U1 = 0;
          hence thesis by A7,A9;
        end;
        suppose
          0 < U1;
          java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 8
A21:      1 <= U1 by NAT_1:14;
          then (ex i1,i2 be Integer st i1 = s1.U1 & i2 = s1.(U1+1) & i2 = (
Radix(k)*i1+ Table1(q,c,f,n -'U1)) mod f 
j2 = s2.( U1+1) & j2 = (Radix(k)*j1+Table1(q,c,f,n -'U1)) mod f      
          hence thesis by A19,A21;
        end;
      end;
      hence thesis;
    end;
A22: for kk be Nat st 1 <= kk & kk <= len s1 holds s1.kk = s2.kk
    proof
      let kk be Nat;
      assume that
A23:  1 <= kk and
A24:  kk <= len s1;
      
        per cases by A24,XXREAL_0:1;
        suppose
A25:      kk < len s1;
          n - 1 >= 1 - 1 by A1,t
          then reconsider U1 = len s1 - 1 as Element of NAT:     +  SeglenF2byA38FINSEQ_1:
          U1 + 1 = len s1;
          then kk <= U1 by A25,NAT_1:13;
          hence thesis by A17,A19,A23;
        end;
        suppose
          k=len ;
          hence thesis by A17,A20;
        end;
      end;
      hence thesis;
    end;
    len s1 = len s2 by A17,CARD_1:def 7;
    A41:      /.1=.k1) by PARTFUN1: 6java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
  end;


theorem
  for n be Nat st n >= 1 holds for q be Integer, ic,f,k be Nat st ic
is_represented_by n,&f>0 holds  c be Tuple of n,k-SD st c =DecSD(,n,
  k) holds Mul_mod(q,c,f,k).n = (q * ic) mod f
proof
  defpred PP[Nat] means for q be Integer, ic,f,k be Nat st ic
is_represented_by $1,k&f> 0holds for c be of $1kSDst c =DecSD(ic,
  $1,k) holds Mul_mod(q,c,f,k).$1 = (q * ic) mod f;
A1: for n be Nat st n >= 1 & PP[n] holds PP[n+1]
  proof
    let n be Nat;
    assume 
A2: n >= 1 and
A3: PP[n];
    let q be Integer;
    let ic,f,k be Nat;
    assume that
A4:ic is_represented_by (n+, and
A5: f > 0;
    let c be Tuple of (n+1),k-SD;
    deffunc F(Nat) =DigB(c,          
    consider cn being FinSequence of INT such that
A6: len cn = n and
A7:for ibe  sti in dom cn holds cn.i = F(i)  FINSEQ_2:sch 1;
A8: dom cn = Seg n by A6,FINSEQ_1:def 3;
    rng cn c= k-SD
    proof
      let z be object;
      assume z in rng cn;
      then consider xx be object such that
A9:   xx in dom cn and
A10:  z = cn.xx by FUNCT_1:def 3;
      reconsider xx as Element of NAT by A9;
      dom  =SegnbyA6FINSEQ_1:def
      then xx+1 in Seg (n+1) by A9,Th5;
      then
:c,(+))  ofkSD by :16;
      z = DigB(c,(xx+1)) by A7,A9,A10
        .= DigA(c,(xx+1)) by RADIX_1:def 4;
      hence thesis by A11;
    end;
    then reconsider cn as FinSequence of k-SD by FINSEQ_1:def 4;
    reconsider cn as Tuple of n,(k-SD) by A6,CARD_1:def 7;
A12: n+1 >= 1 by NAT_1:12;
    set c2 =DecSD2(ic,(n,k;
A13: Radix(k) > 0 by Th6;
    deffunc F(Nat) = c2.($1+1);
    consider cn2 being FinSequence of NAT such that
A14: len cn2 = n and
A15: for i be Nat st i in dom cn2 holds cn2.i = F(i) from FINSEQ_2:sch
    1;
A47:    k+1=j;
    reconsider cn2 as Tuple of n,NAT by A14,CARD_1:def 7;
     icn2=SDDec2(,k);
A17: ic < (Radix(k) |^ (n+1)) by A4,RADIX_1:def 12;
    set icn = SDDec(cn);
    assume
A18: c = DecSD(ic,(n+1),k);
    then
A19: c2 = c by Th14;
A20: for i be Nat st 1 <= i & i <= len cn holds cn.i = cn2.i
    proof
      let i be Nat;
      1< &i <=len ;
      then
A21:  i in Seg n by A6,FINSEQ_1:1;
      then
A22:  i+1 in Seg (n+1) by Th5;
      cn.i = DigB(c,(i+1)) by A7,A8,A21
        .= DigA(c,(i+1)) by RADIX_1:def 4
        . c.(+1) by ,ADIX_1:def3
        .= c2.(i+1) by A18,Th14;
      hence thesis by ,A16,
    end;
    then
A23: icn = icn2 by A6,A14,Th13,FINSEQ_1:14;
    1 in Seg 1byFINSEQ_1:2TARSKIdef1java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
A5:f k + 1) = (f . k) + v by A14;
A24: 1 in Seg (1+n) by FINSEQ_2:8;
A25: ic = Radix(k)*icn2 + c2.1
    proof
A26:   (Euclid_scalar n).(v0,f.k)=  A33,,:29java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
A27:  1 - 1 = 0;
      deffunc F(Nat)=In(DigitSD2(cn2A51    (f)= by : 5;
      reconsider r2 = Radix(k) as Element of REAL by XREAL_0:def 1;
     consider rD  FinSequenceofREAL such that
A28:  len rD = n and
A29:  for i be Nat st i in dom rD holds rD.i = F(i) from FINSEQ_2:sch 1;
:fori  Natsti in  rD holds rD = DigitSD2(k.
        proof let i be Nat;
         assume i in dom rD;
          then rD.i = F(i) by A29;
         hence thesis;
        end;
      reconsider    endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
A31:  dom DigitSD2(cn2,k) = Seg (len DigitSD2(cn2,k)) by FINSEQ_1:def 3
        .= Seg n by CARD_1:def 7;
      reconsider rD1=rD as Element of n-tuples_on REAL by FINSEQ_2:131;
A32:  dom rD = Seg n by A28,FINSEQ_1:def 3;
      then
A33:  len (Radix(k) * DigitSD2(cn2,k)) = len (r2 * rD1) by A30,A31,FINSEQ_1:13
        .= n by CARD_1:def 7;
A34:  len (<*SubDigit2(c2,1,k)*> ^ (Radix(k) * DigitSD2(cn2,k))) = len <*
      SubDigit2(c2,1,k)*> + len (Radix(k) * DigitSD2(cn2,k)) by FINSEQ_1:22
        .= n+1 by A33,CARD_1:def 7;
A35:  len DigitSD2(c2,k) = n+1 by CARD_1:def 7;
A36:  for i be Nat st 1 <= iend;
      k).i=(<*SubDigit2(c2,1,k)*>^(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      proof
        let i be Nat;
        assume that
A37:    1 <= i and
A38:    i <= len DigitSD2(c2    thejava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 74
A39:    i <= n+1 by A38,CARD_1:def 7;
        then
A40:    i in Seg (n+1) by A37,FINSEQ_1:1;
        then
A41    be NAT   REALn of the
        per cases;
        supposecarrier of (REAL-US n)
A42:      i = 1;
          then   assume
          SubDigit2(c2,1,k) by FINSEQ_1:41
            .= (DigitSD2(c2,k))/.1 by A24,Def2
            .= DigitSD2(c2,k).1 by A41,A42,PARTFUN1:def 6;
          hence thesis by A42;
        end;
        suppose
A43:      i <> 1;
          reconsiderpercasesjava.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
          reconsider rs = rD.(i-1) as Real;
          1 - 1 <= i - 1 java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 23
          then reconsider java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
          1 < i by A37,A43,XXREAL_0p
          then 1 + 1 <= i by INT_1:7;
          then
A44:      1 + 1 - 1 <= i - 1 by XREAL_1:9;
          assumexin
          then
A45:      i1 in Seg n by A44,FINSEQ_1:1;
          1 < i by A37,A43,XXREAL_0:1;
          then
          (<*SubDigit2(c2,1,k)*> ^ (Radix(k)*DigitSD2(cn2,k))).i =(Radix(
          k)*DigitSD2(cn2,k)).(i - 1) by A26,A34,A39,FINSEQ_1:24
            .=r2*rD).i-1 by A30,A32,INSEQ_1:
            .=r2*rs by RVSUM_1:45
            java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
            .=Radix(,,0.,g2/nx) by MATRIX_7: 1java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
          per cases;
            .=Radix(k)*(Radix(k) |^ (i1-'1))*(cn2.i1)
            .=(Radix(k) |^ (i1-'1+1))*(cn2.i1) by NEWTON:6
            .=(Radix(k) |^ i1)*(cn2.i1) by A44,XREAL_1:235
            .=(Radix(k) |^ i1)*(c2.(i1+1)) by A15,A16,A45
            .=SubDigit2(c2,i,k) by A37,XREAL_1:233
            .=(DigitSD2(c2,k))/.i by A40,Def2;
          hence thesis by A41,PARTFUN1:def 6;
        end;
      end;
      len DigitSD2(c2,k) = len (<*SubDigit2(c2,1,k)*> ^ (Radix(k) *
      DigitSD2(cn2,k))) by A34,CARD_1:def 7;
      then
A46:  DigitSD2(c2,k) = <*SubDigit2(c2,1,k)*>^(Radix(k)*DigitSD2(cn2,k))
      by A36,FINSEQ_1:14;
      ic = SDDec2(DecSD2(ic,(n+1),k),k) by A4,Th15,NAT_1:12
        .= SubDigit2(c2,1,k)+ Sum(Radix(k)*DigitSD2(cn2,k)) by A46,RVSUM_1:76
        .= SubDigit2(c2,1,k) + Sum(r2 * rD) by A30,A31,A32,FINSEQ_1:13
        = SubDigit2(c21k +r2  Sum( RVSUM_1:java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
        .=            (x)=/nx A7A8FUNCOP_1:ef 8java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        .= (Radix(k) |^ 0)*(c2.1) +             ()in carrier  V A9
        .= 1*(c2.1) + Radix(k) * icn2 by NEWTON:4;
      hence thesis;
    end;
    then
A47: (q * ic) mod f = (q * Radix(k)*icn2 + q * c2.1) modsuppose
      .= (((Radix(k) *(q * icn2)) mod f) + ((q * c2.1) mod f)) mod f          not nx in len f +;
NAT_D:66
                then F(=0.V by MATRIX_7:def 1;
    by Th3
      .= ((Radix(k) *((q * icn2) mod f)) + ((q * c2.1) mod f)) mod f by Th2;
A48: cn = cn2 by A6,A14,A20,FINSEQ_1:14;
:for beNat 1<=i & i <= len cn holds  cn=DecSD2(icn2,n,).i
    proof
A50:  c2.1 = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 12
        .= (ic mod (Radix(k) |^ 1)) div (Radix(k) |^ 0) by XREAL_1:232
        .= (ic mod (Radix(k) |^ 1)) div 1 by NEWTON:4
        .= ic mod (Radix(equence of thecarrier of V such that
        .= ic mod Radix(k);
A51:  0 < Radix(k) by Th6;
A52:  (c2.1 + icn2*Radix(k)) div Radix(k) = [\(c2:  for  set stxin f3.  ()from FUNCT_2:sch
      Radix(k)/] by INT_1:def 9
        .= \21Radix()+icn2/ by ,XCMPLX_1:13
        .= [\c2.1/Radix(k)/] + icn2 by INT_1:28
        .= (c2.1) div Radix(k) + icn2 by INT_1:def 9
        .= 0 + icn2      g  j+1;
A53:  Radix(k) <> 0 by Th6;
      let i be Nat;
      assume that
A54:  1 <= i and
A55:  i <= len cn;
A56:  i in Seg n by A6,A54,A55,FINSEQ_1:1;
   reconsider i as  bydef;
A57:  1 <= i+1 by A54,XREAL_1:29;
      1 <= (i+1) & (i+1) <= (n+1) by A6,A54,A55,XREAL_1:6,29;
      then
A58:  (i+1) in java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      cn.i = c2.(i+1) by A15,A16,A48,A56
        .= DigitDC2(ic,(i+1),k) by A58,Def5
        = ((icn2*Radix(k) + c2.1) div (Radix(k) |^ ((i+1)-'1))) mod Radix(k
      ) by A25,A57,Th4,Th6
        .= ((icn2*Radix(k) + c2.1) div (Radix(k) |^ i)) mod Radix(k) by
NAT_D:34
        .= ((icn2*Radix(k) + c2.1) div (Radix(k)*(Radix(k) |^ (i -'1)))) mod
      Radix(k) by A54,A53,PEPIN:26
        .= (icn2 div (Radix(k) |^ (i -'1))) mod Radix(k) by A52,NAT_2:27
        .= DigitDC2(icn2,i,k) by A54,Th4,Th6;
      hence thesis by A56,Def5;
    end;
    reconsider icn as Element of NAT by A23;
ecSD2(cn2,,k by A6,CARD_1: 7java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    then cn = DecSD2(icn2,n,k) by A49,FINSEQ_1:14;
    then
ecSDicn,,)by A23,Th14;
    ic >= Radix(k)*icn2 by A25,INT_1:6;
java.lang.StringIndexOutOfBoundsException: Range [21, 4) out of bounds for length 65
    then icn2 * Radix(k) < (Radix(k) |^ n)* Radix(k) by NEWTON:6;
    then            =(j0 .,g2/j by A16,A18,MATRIX_7: 
    then
A60: icn is_represented_by n,k by RADIX_1:def 12;
A61: for i be Element of NAT st i in Seg n holds DigA(cn,i) = DigA(c,i+1)
   proof
      let i be Element of NAT;
      assume
A62:  i in Seg n;
      (,i1  (c,1 by RADIX_1:def 4
        .= cn.i byA7AA62;
      hence thesis by A62,RADIX_1:def 3;
    end;
A63: for i be Element of NAT st             .=2/1by,FUNCOP_1:def 8
    Mul_mod(q,c,f,k).i
    proof
      defpred P[Nat] means $1 in Seg n implies Mul_mod(q,cn,f,k).$1
      =           .g.(1)by A,,,FINSEQ_415
A64:  for i be Nat st P[i] holds P[i+1]
      proof
                  . (.)+v  ,A19RLVECT_1:;
        assume
A65:    i in Seg n implies Mul_mod(q,cn,f,k).i = Mul_mod(q,c,f,k).i;
A66    =0  i>1+ by XREAL_16;
        assume (i+1) in Seg n;
        then
A67:    (i+1) <= n by FINSEQ_1:1;
        then
A68:    (i+1)-1 <= n - 1 by XREAL_1:9;
A69:    n in Seg n by A2,FINSEQ_1:1;
        now
          per cases by A66,NAT_1:13;
          case
A70:        i=0;
            then Mul_mod(q,cn,f,k).(i+1) = Table1(q,cn,f,n) by A2,Def7
              .= Table1(q,c,f,n+1) by A61,A69
              .= Mul_mod(q,c,f,k).1 by A12,Def7;
            hence thesis by A70;
          end;
          case
A71:        i>=1;
            reconsider nn = n - 1 as Element of NAT by A2,INT_1:5;
A72:        i <= nn + 1 by A68,NAT_1:12;
            then i <= (n+1)-1;
            then
A73:        ex I1,I2 be Integer st I1=Mul_mod(q,c,f,k).i & I2=Mul_mod(q,c
,f,k).(i+1)        suppose
;
A74:        n -' i <= n by NAT_D:35;
            1 + i - i <= n - i by A67,XREAL_1:9;
            then 1 <= n -' i by A72,XREAL_1:233;
            then
A75:        (n -' i) in Seg n by A74,FINSEQ_1:1;
            ex I1,I2 be Integer st I1=Mul_mod(q,cn,f,k).i & I2=Mul_mod(q,
cn,f,k).(i+1) & I2 = (Radix(k)*I1+Table1(q,cn,f,n -' i)) mod f by A2,A68,A71A21        Segml 1) :44java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
,Def7;
            =IFEQ(,0 .V,g2/.  A21,def1
            DigA(c,(n -' i)+1) modjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
.(,c,f).i1 byA73Njava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 60
            hence thesis;
          end;
        end;
        hence thesis;
      end;
A76:  P[0] by FINSEQ_1:1;
      for i be Nat holds P[i] from NAT_1:sch 2(,
      hence thesis;
    ;
    n <= (n+1) - 1 & n+1 >= 1 by NAT_1:11;
    then
,I2  Integer  I1=Mul_mod(,cf)n&I2=ul_mod(q,,,k)(
    n+1) & I2 = (Radix(k)*I1+Table1(q,c,f,(n+1) -'n)) mod f by A2,Def7;
    n in Seg n by A2,FINSEQ_1:3;
    then Mul_mod(q,c,f,k).(n+1) = (Radix(k)*Mul_mod(q,cn,f,k).n + Table1(q,c,
    f,(n+1) -'n)) mod f by A63      len  len +1  :9java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
      .= (Radix(k)*((q * icn)A26: lenf Segmlf1  44
,A60,A59
      .= (Radix(k)*((A27:  +1=len f by ,NAT_1:13;
,A14,A20,Th13,FINSEQ_1:14
 mod f)  (*DigAc,) f) f by
NAT_D:34
      .= ((Radix(k)*((q * icn2) mod f)) + ((q*c2.1) mod f)) mod f by A19,A24,
RADIX_1:def 3;
     thesisA47;
  end;
A78: PP[1]
         .IFEQ(,,0V g2/0  A28def java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
            =. by FUNCOP_1:def 8;
    let ic,f,k be Nat;
    assume that
A79: ic is_represented_by 1,k and
    f > 0;
    let c be Tuple of 1,k-SD;
    assume
A80: c = DecSD(ic,1,k);
    Mul_mod(q,c,f,k).1 = Table1(q,c,f,1) by Def7
      .= (q*SDDec(DecSD(ic,1,k))) mod f by A80,Th7;
    hence thesis byA79:22
  end;
  for n be Nat st n >= 1 holds PP[n] from NAT_1:sch 8(A78,A1);
  hence thesis;
end;

begin :: Algorithm of calculation of (a^b) mod c based on..len f) FUNCOP_1def 8
:: radix-2^k SD numbers and its correctness

definition
  let n,f,j,m be Nat, e be Tuple of n,NAT;
ent of NAT 
  (m |^ (e/.j)) mod f;
  java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
end;

definition
    ;
  assume
A1: n >= 1;
  func Pow_mod(m,e,f,k) -> Tuple of n,NAT means
  :Def9:
  it.1 = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 8
oribe  st < &i< n  holdsex,i2      .i&i2 =
  it.(i+1) & i2 = (((i1 |^ Radix(k)) mod f) * Table2(m,e,f,n-'i)) mod f;
  existence
  proof
    reconsider n1 = n as Element of NAT by ORDINAL1:31   jbeing vbeing Element of V st j < len g &
    reconsider T = Table2(m,e,f,n) as Element of NAT;
    defpred PP[Nat,set,set] means ex i1,i2 be Nat st i1 = $2 & i2 = $3 & i2 =
    (((i1 |^ Radix(k)) mod f)*Table2(m,e,f,n1-'$1)) mod f;
: foribeNatst  < i  <n1  Element of NAT ex
    y be Element of NAT st PP[i,x,y]
    proof
      let i be Nat;
      assume that
      1 <= i and
      i < n1;
      let x be Element of NAT;
      reconsider x as Element of NAT;
      consider y be Element of NAT such that
A3:   y = (((x |^ Radix(k)) mod f)*Table2(m,e,f,n-'i)) mod f;
z=y as Element of NAT;
      take z;
      thus thesis by A3;
    endhence
    consider r be FinSequence of NAT such that
:r=n1  (.1 =T n1 = )and
A5: for i be Nat st 1 <= i & i < n1 holds PP[i,r.i,r.(i+1)]
       from :sch 4A2)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    reconsider r as Tuple of n,NAT by A4,CARD_1:def 7;
    take r;
    thus r.1 = Table2(m,e,f,n) by A1,A4;
    let i be Nat;
    assume
A6: 1 <= i & i <= n - 1;
    thus thesis by A5,A6,XREAL_1:147;
  end;
  uniqueness
  proof
    let s1,s2 be Tuple of n,NAT coherence
A7: s1.proof
A8: for i be Nat st 1 <= i & i <= n - 1 holds ex I1,I2 be java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 45
 &I2=s1.(+) &I2 = (I1 ^Radix(k)modf*Table2(,e,,n-i)mod java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
    and
A9: s2.1 = Table2(m,e,f,n) and
A10: for i be Nat st 1 <= i & i <= n - 1 holds ex I1,I2 be Nat st I1 =
s2.i & I2 = s2.(i+1) & I2 = (((I1 |^ Radix(k)) mod f)*Table2(m,e,f,n-'i)) mod f
    ;
    defpred   let beset;
A11: for i be Nat st P[i] holds P[i+1]
    proof
      let kk be Nat;
      assume  coherence
A12:  1 <= kk & kk <= n - 1 implies s1.kk = s2.kk;
A13:  0 = kk or 0 < kk & 0 + 1 = 1;
      assume that
      1 <= kk + 1 and
A14:  kk + 1 <= n - 1;
      per  A13,AT_1:13;
      suppose
        0 = kk;
        hence thesis by A7,A9;
      end;
      suppose
A15:    1 <= kk;
A16:    kk <= kk + 1 by NAT_1:11;
        then kk <= n - 1 by A14,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 17
         exi1i2be i1 = s1.kk  i2  .(k+1) =( (i1 |^
Radix(k)) mod f)*Table2(m,e,f,n-'kk)) mod f )& ex i1,i2 be Nat st i1 = s2.kk &
i2 = s2 .(kk+1) & i2 = ( ((i1 |^ Radix(k)) mod f)*Table2(m,e,f,n-'kk)) mod f
by A8,A10,A15;
        hence thesis by A12,A14,A15,A16,XXREAL_0:2;
      end;
    end;
A17: len s1 = n by CARD_1:def 7;
A18: P[0];
eNat holdsPkk]from sch 2A,)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
A20: s1.n = s2.n
    proof
      n - 1 >= 1 - 1 by A1,XREAL_1:9;
      then reconsider U1 = n - 1 as Element of NAT by INT_1:3;
      ow
        per cases;
        suppose
          U1=0;
          hence thesis by A7,A9;
        end;
        suppose
          0 < U1;
          then
A21:      1 <= U1 by NAT_1:14;
          then (ex i1,i2 be Nat st i1 = s1.U1 & i2 = s1.(U1+1) & i2 = ( ((i1
|^ Radix(k)) mod f)*Table2(m,e,f,n-'U1)) mod f )& ex j1,j2 be Nat st j1 = s2.U1
& j2 = s2 .(U1+1) & j2 = ( ((j1 |^ Radix(k)) mod f)*Table2(m,e,f,n-'U1)) mod f
          by A8,A10;
          hence thesis by A19,A21;
        end;
endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      hence thesis;
    end;
A22: for kk be Nat st 1 <= kk & kk <= len s1 holds s1.kk = s2.kk
    proof
      let kk be Nat;
      assume that
A23:  1 <= kk and
A24:  kk <= len s1;
      now
        per cases by A24,XXREAL_0:1;
        suppose
A25:      kk < len s1;
          n - 1 >= 1 - 1 by A1,XREAL_1:9;
          then reconsider U1 = len s1 - 1 as Element of NAT by A17,INT_1:3;
          U1 + 1 = len s1;
          then kk <= U1 by A25,NAT_1:13;
          hence thesis by A17,A19,A23;
        end;
        suppose
          kk = len s1;
          hence thesis by A17,A20;
        end;
      
      hence thesis;
    end;
    len s1 = len s2 by A17,CARD_1:def 7;
    hence thesis by A22,FINSEQ_1:14;
  end;
end;

theorem
   n   n = 1 holds  ,k,fi  Nat  ie
is_represented_by n,k & f>0 holds for e be Tuple of n,NAT st e = DecSD2(ie,n,k)
  holds Pow_mod(m,e,f,k).n = (m |^ ie    assume that
proof
  defpred PP[Nat] means for m,k,f,ie be Nat st ie is_represented_by $1,k & f>0
holds for e be Tuple of $1,NAT st e = DecSD2(ie,$1,k) holds Pow_mod(m,e,f,kA:dom*)= by92;
  = (m |^ ie) mod f;
A1: for n be Nat st n >= 1 & PP
  proof
    let n be Nat;
    assume that
A2: n >= 1 and
A3: PP[n];
    letm,, beNat;
A4: n+1 >= 1 by NAT_1:12;
    assume that
A5: ie is_represented_by (n+1),k and
A6: f>0;
    let e be Tuple of (n+1),NAT;
    assume
A7: e = DecSD2(ie identify - - whenx = a;
    reconsider n as Element of NAT by ORDINAL1:def 12;
    deffunc F(Nat)=e.($1+1);
    consider en being FinSequence of NAT such that
A8: len en = n and
A9: for i be Nat st i inA1 x  a;
A10: dom en = Seg n by A8,FINSEQ_1:def 3;
    reconsider en as Tuple of n,NAT by A8,CARD_1:def 7;
A11: n in Seg n by A2,FINSEQ_1:1;
A12: ie < (Radix(k) |^ (n+1)) by A5,RADIX_1:def 12;
    (en,k)
A13: 1 in Seg 1 by FINSEQ_1:2,TARSKI:def 1;
    then
A14: 1 in Seg (1+n) by FINSEQ_2:8;
A15: ie = ien*Radix(k) + (e/.1)
    proof
java.lang.StringIndexOutOfBoundsException: Range [5, 3) out of bounds for length 50
      deffunc F(Nat)=In(DigitSD2(en,k).$1,REAL);
      reconsider r2 = Radix(k) as Element of REAL by XREAL_0:def 1;
      consider rD being FinSequence of REAL such that
A17:  len rD = n and
A18:  for i be Nat st i in dom rD holds rD.i = F(i) from FINSEQ_2:sch 1;
A19:  for i be         .= -(.c)
       proof let i be Nat;
        assume i in dom rD;
         then rD.i = F(i) by A18;
        hence thesis;
       end;
      reconsider rD as Tuple of n,REAL by A17,CARD_1:def 7;
A20:  dom rD = Seg n by A17,FINSEQ_1:def 3;
      reconsider rD1=rD as Element of n-tuples_on REAL by FINSEQ_2:131;
A21:  dom DigitSD2(en,k) = Seg (len DigitSD2(en,k)) by FINSEQ_1:def 3
        .= Seg n by java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 6
      then
A22:  len (Radix(k) * DigitSD2(en,k)) = len (r2 * rD1) by A19,A20,FINSEQ_1:13
        .= n by CARD_1:def 7;
A23:  len (<*SubDigit2(e,1,k)*> ^ (Radix(k) * DigitSD2(en,k))) = len <*
      SubDigit2(e,1,k)*> + len (Radix(k) * DigitSD2(en,k)) by FINSEQ_1:22
        .= n+1 by A22,CARD_1:def 7;
A24:  len DigitSD2(e,k) = n+1 by CARD_1:def 7;
A25:  for i be Nat st 1 <=   let  beset
      .i=(<*SubDigit2(e,1,k)*> ^ (Radix(k) let,ybeVECTOR of RealVectSpace(A), a, b be real-valued Function;
      proof
        let i be Nat;
        assume that
 1< i 
A27:    i <= len DigitSD2(e,k);
A28:i< n+  ,:7;
        then
A29:    i in Seg (n+1) by A26,FINSEQ_1:1;
        then
A30:    i in dom DigitSD2(e,k) by A24,FINSEQ_1:def 3;
        per cases;
        suppose
A31:      i = 1;
          then (<*SubDigit2(e,1,k)*> ^ (Radix(k)*DigitSD2(en,k))).i =
          SubDigit2(e,1,k) by FINSEQ_1:41
            .= (DigitSD2(e,k))/.1 by A14,Def2
            . DigitSD2(e,k).1 by A30,A31,PARTFUN1:def 6;
          hence thesis by A31;
        end;
        suppose
A32:      i<>1;
           rs2  (en,k).(i-) as Element  NAT;
          reconsider rs = rD.(i-1) as Real;
          1-1 <= i-1 by A26,XREAL_1:9;
          then reconsider i1 = java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 5
          1<i by A26,A32,XXREAL_0:1;
          then 1+1<=i by INT_1:7;
          then
A33:      1+1-1<=i-1 by XREAL_1:9;
A34:      i-1<=n+1-1 by A28,XREAL_1:9;
          then
A35:      i1 in Seg n by A33,FINSEQ_1:1;
A36:      i1 in dom rD by A20,A33,A34,FINSEQ_1:1;
          1 < i by A26,A32,XXREAL_0:1;
          then
         *SubDigit2(e,,)*> R(k*DigitSD2(k).i(Radix(k)
          *DigitSD2(en,k)).(i - 1) by A16,A23,A28,FINSEQ_1:24
            .=(r2*rD).(i-1) by A19,A21,A20,FINSEQ_1:13
.=rs java.lang.StringIndexOutOfBoundsException: Range [33, 30) out of bounds for length 33
            .=Radix(k)*rs2 by A19,A21,A20,FINSEQ_1:13
            .=Radix(k)*((DigitSD2(en,k))/.i1) by A21,A20,A36,PARTFUN1:def 6
            .=Radix(k)*SubDigit2(en,i1,k) by A35, ax;
            .=Radix(k)*(Radix(k) |^ (i1-'1))*(en.i1)
            .=(Radix(k) |^ (i1-'1+1))*(en.i1) by NEWTON:6
            .=(java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
            .=(Radix(k) |^ i1)*(e.(i1+1)) by A9,A10,A35
            .theorem Th35:
            .=(DigitSD2(e,k))/.i by A29,Def2;
          hence thesis by A30,PARTFUN1:def  forX being Subspace of RealVectSpace(Seg n), x,beingElement  REAL st
        end;
      ;
      len DigitSD2(e,k) = len (<*SubDigit2(e,1,k)*> ^ (Radix(k) *
igitSD2(k) by ,CARD_1def 7;
      then
A37:  DigitSD2(e,k) = <*SubDigit2(e,1,k)*>^(Radix(k)*DigitSD2(en,k)) by A25,
FINSEQ_114;
      dom e = Seg (len e) by FINSEQ_1:def 3;
      then
A38:  1 in dom e by A14,CARD_1:def 7;
A39:  1 - 1 = 0;
      ie = SDDec2(e,k) by A5,A7,Th15,NAT_1:12
tSD2(en,k) by A37,RVSUM_1:76
        .= SubDigit2(e,1,k) + Sum(r2 * rD) by A19,A21,A20,FINSEQ_1:13
        .= SubDigit2(e,1,k) + r2 *REALn,a,b  Real st x  the carrier of X & y in the carrier of X holds a*
        .= SubDigit2(e,1,k) + Radix(k) * SDDec2(en,k) by A19,A21,A20,
FINSEQ_1:13
        .= (Radix(k) |^ 0)*(e.1) + Radix(k) * ien by A39,XREAL_0:def 2
        .= 1*(e.1) + Radix(k) * ien by NEWTON:4;
      hence thesis by A38,PARTFUN1:def 6;
    end;
    then ie >= ien * Radix(k) by INT_1:6;
    then ien * Radix(k) < (Radix(k) |^ (n+1)) by A12,XXREAL_0:2;
    then ien * Radix(kproof
    then ien < (Radix(k) |^ n) by XREAL_1:64;
    then
A40: X java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 73
A41 (n) inSeg(+1  A4F:1;
A42: for i be Element of NAT st i in Seg n holds Pow_mod(m,en,f,k).i =
    Pow_mod(m,e,f,k).i
    proof
      java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 26
$  Seg n Pow_modmenfk.1
      = Pow_mod(m,e,f,k).$1;
A43:  for i be Nat st Z[i] holds Z[i+1]
      proof
        let i be Nat;
        assume
A44:    i in Seg n implies Pow_mod(m,en,f,k).i = Pow_mod(m,e,f,k).i;
A45:    i=  i+110 XREAL_1:6;
A46:    dom en = Seg n by A8,FINSEQ_1:def 3;
        
A47:    (i+1) in Seg n;
        then
A48:    (i+1) <= n by FINSEQ_1:1;
        then
A49:    (i+1)-1 <= n - 1 by XREAL_1:9;
A50:    dom e = Seg (len e) by FINSEQ_1:def 3;
        then
A51:    dom e = Seg (n+1) by CARD_1:def 7;
        now
          per cases by A45,NAT_1:13;
          case
A52:        i=0;
            then Pow_mod(m,en,f,k).(i+1) = Table2(m,en,f,n) by A2,Def9
              .= (m |^ (en.n)) mod f by A11,A46,PARTFUN1:def 6
              .= (m |^ (e.(n+1))) mod f by A9,A10,A11
              .= Table2(m,e,f,n+1) by   a  Real
              .= Pow_mod(m,e,f,k).1 by A4,Def9;
            hence thesis by A52;
          end;
          case
A53:        i>=1;
              )| by REAL_NS1:def 5
A54:        i <= nn + 1 by A49,NAT_1:12;
            then i <= (n+1)-1;
            then
A55:        ex I1,I2 be Nat st I1=Pow_mod(m,e,f,k).i & I2=Pow_mod(m,e,f,k
).(i+1) & I2 = (((I1 |^ Radix(k)) mod f) * Table2(m,e,f,(n+1)-'i)) mod f by A4
,A53,Def9;
A56:        ex I1,I2 be Nat st I1=Pow_mod(m,en,f,k).i & I2
,k).(i+1) & I2 = (((I1 |^ Radix(k)) mod f) * Table2(m,en,f,n-'i)) mod f by A2
,A49,A53,Def9;
A57:        n -' i <= n by NAT_D:35;
            i+1 <= n by A47,FINSEQ_1:1;
            then i+1-1 <= n-1 by XREAL_1:9;
            then (n+1)  n)l   of  st  is -to-one  Bn is -orthogonal 
            then (n+1)-'i >= (n+1)-(n-1) by XREAL_0:def 2;
            then (n+1) -' i <= n+1 & 1 <= (n+1)-'i by NAT_D:35,XXREAL_0:2;
            then (n+1)')in (+1  FINSEQ_1:;
            then
A58:        ((n+1) -' i) in dom e by A50,CARD_1:def 7;proof
            1 + i - i <= n - i by A48,XREAL_1:9;
            then 1 <= n -' i by A54,XREAL_1:233;
            then
A59:        (n -' i) in Seg n by A57,FINSEQ_1:1;
            then (n -' i) in dom en by A8,FINSEQ_1:def 3;
            then
            Pow_mod(m,en,f,k).(i+1) = ((((Pow_mod(m,e,f,k).i) |^ Radix(k)
) mod f) * ((m |^ (en(-'))mod ) mod  ,A53A54,FINSEQ_1:1
,PARTFUN1def java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
).  Radix(k)) mod f)*(( | (.(n
            -'i+1))) mod f)) mod f by A9,A10,A59
              .= ((((Pow_mod(m,e
            +1) -'i))) mod f)) mod f by A54,NAT_D:38
              .= ((((Pow_mod(m,e,f,  assume that
            (n+1)-'i)) mod f by A58,PARTFUN1:def 6;
            hence thesis by A55;
          end;
        end;
        hence thesis;
      end;
A60:  Z[0] by FINSEQ_1:1;
      for A3:rng   and
      hence thesis;
    end;
A61: Radix(k) > 0 by Th6;
A62: for i be Nat st 1 <= i & i <= len en holds en.i=DecSD2(ien,n,k).i
    proof
      dom e = Seg (len e) by FINSEQ_1:def 3;
      then
A63:  dom e = Seg (n+1) by CARD_1:def 7;
A64:  e.1 = DigitDC2(ie,1,k) by A7,A14,Def5
        .= (ie mod (Radix(k) |^ 1)) div (Radix(k) |^ 0) by XREAL_1:232
        =( ((k ^1)div 1  NEWTON:java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
        .= ie mod (Radix(k) |^ 1)
        .= ie mod Radix(k);
A65:  0 < Radix(k) by Th6;
 + ien*Radix())/(k
      )/] by INT_1:def 9
        . \.1Radix(byA65,:113
        .= [\e.1/Radix(k)/] + ien by INT_1:28
        .= (e.1) div Radix(k) + ien by INT_1:def 9
        .= 0 + ien by A61,A64,NAT_D:1,27;
A67:  Radix(k) <> 0 by Th6;
      let i be Nat;
      assume that
A68:  1 <= i and
A69:  i <= len en;
A70:  1 <= i+1 by A68,XREAL_1:29;
      1 <= (i+1) & (i+1) <= (n+1) by A8,A68,A69,     j2 < len F2 & v = F2 . (j2 + 1) holds f . (j2 + 1f .j2)  java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
      then
  i+1 inSeg n+1  ;
A72:  i in Seg n by A8,A68,A69,FINSEQ_1:1;
      then en.i = e.(i+1) by A9,A10
        .= DigitDC2(ie,(i+1),k) by A7,A71,Def5
        . (Radix() (e.) div (Radix(k) |^ ((i+1)-'1))) mod Radix(
      k) by A15,A70,Th4,Th6
        .= ((ien*Radix(k) + e.1) div (Radix(k) |^ ((i+1)-'1))) mod Radix(k)
      byA13,FINSEQ_2:8P: 
        .= ((ien*Radix(k) + e.1) div (Radix(k) |^ i)) mod Radix(k) by NAT_D:34
        .= ((ien*Radix(k) + e.1) div (Radix(k)*(Radix(k) |^ (i -'1)))) mod
      Radix(k) by A68,A67,PEPIN:26
        .= (((e.1 + ien*Radix(k)) div Radix(k)
      mod Radix(k) by NAT_2:27
        .= DigitDC2(ien,i,k) by A68,A66,Th4,Th6;
      hence thesis by A72,Def5;
    end;
    len en = len DecSD2(ien,n,k) java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 10
    then
A73: en = DecSD2(ien,n,k) by A62,FINSEQ_1:14;
    n <= (n      per cases;
    then ex I1,I2 be Nat st I1=Pow_mod(m,e,f,k).n & I2=Pow_mod(m,e,f,k).(n+1)
    & I2 = (((I1 |^ Radix(k)) mod f)* Table2(m,e,f,(n+1)-'n)) mod f by A2,Def9;
    then Pow_mod(m,e,f,k).(n+1) = (      case
    ) *Table2(m,e,f,(n+1)-'n)) mod f by A2,A42,FINSEQ_1:3
      .= (((((m |^ ien) mod f) |^ Radix(k)) mod f) *Table2(m,e,f,(n+1)-'n))
    mod f by A3,A6,A40,A73
      .= ((((m |^ ien) |^ Radix(k)) mod f) *Table2(m,e,f,(        1< len F2 A18,AT_1:;
PEPIN:12
      .= (((m |^ ien) |^ Radix(k))*Table2(m,e,f,(n+1)-'n)) mod f by EULER_2:8
      .= (m |^ (ien*Radix(k))*Table2(m,e,f,(n+1)-'n)) mod f by NEWTON:9
      .= (m |^ (ien*Radix(k))*((m |^ (e/.1)) mod f)) mod f by NAT_D:34
      .= (m |^ (ien*Radix(k))*(m |^ (e/.1))) mod f by EULER_2:7
      .= ( ^(Radixk  e.1))) mod f by NEWTON:8java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    thesis by ;
  end;
A74: PP[1]
  proof
    let m,k,f,ie be Nat;
    assume that
A75: ie is_represented_by 1,k and
    f>0;
    ie < (Radix(k) |^ 1) by A75,RADIX_1:def 12;
    then
A76: ie < Radix(k);
    let e be Tuple of 1,NAT;
A77: 1 - 1 = 0;
A78: 1 in Seg 1 by FINSEQ_1java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 15
    len DecSD2(ie,1,k) = 1 by CARD_1:def 7;
       then
A79: 1 in dom DecSD2(ie,1,k) by A78,FINSEQ_1:def 3;
    assume e = DecSD2(ie,1,k);
    then e/.1 = DecSD2(ie,1,k).1 by A79,PARTFUN1:def 6
      .=DigitDC2(ie,1k  A78,
      .= (ie mod (Radix(k) |^ 1)) div (Radix(k) |^ 0) by A77,XREAL_0:def          then
      .= (ie mod (Radix(k) |^ 1)) div 1 by NEWTON:4
      .= ie mod (Radix(k) |^ 1)
      .= ie mod Radix(k)
      . ie A76,:;
    then (m |^ ie) mod f = Table2(m,e,f          
    hence thesis by Def9;
;
  for n be Nat st n >= 1 holds PP[n] from NAT_1:sch 8(A74,A1);
  hence thesis;
end;

Messung
CHZG
8010010093

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.60Angebot  ¤

*Eine klare Vorstellung vom Zielzustand







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,058
#Domains=861,595