:: by Grzegorz Bancerek

::

:: Received January 11, 1989

:: Copyright (c) 1990-2012 Association of Mizar Users

begin

:: The results of axioms of Nats

theorem Th1: :: NAT_1:1

for X being Subset of REAL st 0 in X & ( for x being Real st x in X holds

x + 1 in X ) holds

for n being Nat holds n in X

x + 1 in X ) holds

for n being Nat holds n in X

proof end;

:: Addition and multiplication

:: The Nats are real numbers therefore some theorems of real

:: numbers are translated for Nats.

:: The Nats are real numbers therefore some theorems of real

:: numbers are translated for Nats.

definition

let n be Nat;

let k be Element of NAT ;

:: original: +

redefine func n + k -> Element of NAT ;

coherence

n + k is Element of NAT by ORDINAL1:def 12;

end;
let k be Element of NAT ;

:: original: +

redefine func n + k -> Element of NAT ;

coherence

n + k is Element of NAT by ORDINAL1:def 12;

definition

let n be Element of NAT ;

let k be Nat;

:: original: +

redefine func n + k -> Element of NAT ;

coherence

n + k is Element of NAT by ORDINAL1:def 12;

end;
let k be Nat;

:: original: +

redefine func n + k -> Element of NAT ;

coherence

n + k is Element of NAT by ORDINAL1:def 12;

:: Like addition, the result of multiplication of two Nats is

:: a Nat.

:: a Nat.

definition

let n be Nat;

let k be Element of NAT ;

:: original: *

redefine func n * k -> Element of NAT ;

coherence

n * k is Element of NAT by ORDINAL1:def 12;

end;
let k be Element of NAT ;

:: original: *

redefine func n * k -> Element of NAT ;

coherence

n * k is Element of NAT by ORDINAL1:def 12;

definition

let n be Element of NAT ;

let k be Nat;

:: original: *

redefine func n * k -> Element of NAT ;

coherence

n * k is Element of NAT by ORDINAL1:def 12;

end;
let k be Nat;

:: original: *

redefine func n * k -> Element of NAT ;

coherence

n * k is Element of NAT by ORDINAL1:def 12;

:: Order relation ::

:: Some theorems of not great relation "<=" in real numbers are translated

:: to Nat easy and it is necessary to have them here.

:: Some theorems of not great relation "<=" in real numbers are translated

:: to Nat easy and it is necessary to have them here.

registration

not for b_{1} being Nat holds b_{1} is zero
end;

cluster non zero epsilon-transitive epsilon-connected ordinal natural complex ext-real real finite cardinal for set ;

existence not for b

proof end;

registration

let m be Nat;

let n be non zero Nat;

coherence

not m + n is empty by Th7;

coherence

not n + m is empty ;

end;
let n be non zero Nat;

coherence

not m + n is empty by Th7;

coherence

not n + m is empty ;

scheme :: NAT_1:sch 3

DefbyInd{ F_{1}() -> Nat, F_{2}( Nat, Nat) -> Nat, P_{1}[ Nat, Nat] } :

DefbyInd{ F

( ( for k being Nat ex n being Nat st P_{1}[k,n] ) & ( for k, n, m being Nat st P_{1}[k,n] & P_{1}[k,m] holds

n = m ) )

providedn = m ) )

A1:
for k, n being Nat holds

( P_{1}[k,n] iff ( ( k = 0 & n = F_{1}() ) or ex m, l being Nat st

( k = m + 1 & P_{1}[m,l] & n = F_{2}(k,l) ) ) )

( P

( k = m + 1 & P

proof end;

:: Principle of minimum

:: Principle of maximum

:: Exact division and rest of division

theorem :: NAT_1:18

for n, m, k, t, k1, t1 being Nat st n = (m * k) + t & t < m & n = (m * k1) + t1 & t1 < m holds

( k = k1 & t = t1 )

( k = k1 & t = t1 )

proof end;

registration
end;

registration
end;

begin

:: from ALGSEQ_1

registration

not for b_{1} being Element of NAT holds b_{1} is zero
end;

cluster non zero epsilon-transitive epsilon-connected ordinal natural complex ext-real real finite cardinal for Element of NAT ;

existence not for b

proof end;

:: from JORDAN4

:: from SCMFSA_7, 2006.03.15, A.T.

:: from BINOM, 2006.05.28, A.T.

:: from BINOM, 2006.05.28, A.T.

:: from INT_2, 2006.05.30, AG

:: Moved from CQC_THE1 on 07.07.2006 by AK

theorem Th31: :: NAT_1:31

for n being Nat holds

( not n <= 7 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 )

( not n <= 7 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 )

proof end;

theorem Th32: :: NAT_1:32

for n being Nat holds

( not n <= 8 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 )

( not n <= 8 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 )

proof end;

theorem Th33: :: NAT_1:33

for n being Nat holds

( not n <= 9 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 )

( not n <= 9 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 )

proof end;

theorem Th34: :: NAT_1:34

for n being Nat holds

( not n <= 10 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 )

( not n <= 10 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 )

proof end;

theorem Th35: :: NAT_1:35

for n being Nat holds

( not n <= 11 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 )

( not n <= 11 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 )

proof end;

theorem Th36: :: NAT_1:36

for n being Nat holds

( not n <= 12 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 or n = 12 )

( not n <= 12 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 or n = 12 )

proof end;

theorem Th37: :: NAT_1:37

for n being Nat holds

( not n <= 13 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 or n = 12 or n = 13 )

( not n <= 13 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 or n = 12 or n = 13 )

proof end;

:: compare BINARITH:sch 1, 2006.07.19, A.T.

:: from HENMODEL, 2007.03.15, A.T.

definition

let A be set ;

( ( A is non empty Subset of NAT implies ex b_{1} being Element of NAT st

( b_{1} in A & ( for k being Nat st k in A holds

b_{1} <= k ) ) ) & ( A is not non empty Subset of NAT implies ex b_{1} being Element of NAT st b_{1} = 0 ) )

for b_{1}, b_{2} being Element of NAT holds

( ( A is non empty Subset of NAT & b_{1} in A & ( for k being Nat st k in A holds

b_{1} <= k ) & b_{2} in A & ( for k being Nat st k in A holds

b_{2} <= k ) implies b_{1} = b_{2} ) & ( A is not non empty Subset of NAT & b_{1} = 0 & b_{2} = 0 implies b_{1} = b_{2} ) )

for b_{1} being Element of NAT holds verum
;

end;
func min* A -> Element of NAT means :Def1: :: NAT_1:def 1

( it in A & ( for k being Nat st k in A holds

it <= k ) ) if A is non empty Subset of NAT

otherwise it = 0 ;

existence ( it in A & ( for k being Nat st k in A holds

it <= k ) ) if A is non empty Subset of NAT

otherwise it = 0 ;

( ( A is non empty Subset of NAT implies ex b

( b

b

proof end;

uniqueness for b

( ( A is non empty Subset of NAT & b

b

b

proof end;

consistency for b

:: deftheorem Def1 defines min* NAT_1:def 1 :

for A being set

for b_{2} being Element of NAT holds

( ( A is non empty Subset of NAT implies ( b_{2} = min* A iff ( b_{2} in A & ( for k being Nat st k in A holds

b_{2} <= k ) ) ) ) & ( A is not non empty Subset of NAT implies ( b_{2} = min* A iff b_{2} = 0 ) ) );

for A being set

for b

( ( A is non empty Subset of NAT implies ( b

b

definition
end;

:: from RECDEF_1, 2008.02.21, A.T.

scheme :: NAT_1:sch 13

RecUn{ F_{1}() -> set , F_{2}() -> Function, F_{3}() -> Function, P_{1}[ set , set , set ] } :

provided

RecUn{ F

provided

A1:
dom F_{2}() = NAT
and

A2: F_{2}() . 0 = F_{1}()
and

A3: for n being Nat holds P_{1}[n,F_{2}() . n,F_{2}() . (n + 1)]
and

A4: dom F_{3}() = NAT
and

A5: F_{3}() . 0 = F_{1}()
and

A6: for n being Nat holds P_{1}[n,F_{3}() . n,F_{3}() . (n + 1)]
and

A7: for n being Nat

for x, y1, y2 being set st P_{1}[n,x,y1] & P_{1}[n,x,y2] holds

y1 = y2

A2: F

A3: for n being Nat holds P

A4: dom F

A5: F

A6: for n being Nat holds P

A7: for n being Nat

for x, y1, y2 being set st P

y1 = y2

proof end;

scheme :: NAT_1:sch 14

RecUnD{ F_{1}() -> non empty set , F_{2}() -> Element of F_{1}(), P_{1}[ set , set , set ], F_{3}() -> Function of NAT,F_{1}(), F_{4}() -> Function of NAT,F_{1}() } :

provided

RecUnD{ F

provided

A1:
F_{3}() . 0 = F_{2}()
and

A2: for n being Nat holds P_{1}[n,F_{3}() . n,F_{3}() . (n + 1)]
and

A3: F_{4}() . 0 = F_{2}()
and

A4: for n being Nat holds P_{1}[n,F_{4}() . n,F_{4}() . (n + 1)]
and

A5: for n being Nat

for x, y1, y2 being Element of F_{1}() st P_{1}[n,x,y1] & P_{1}[n,x,y2] holds

y1 = y2

A2: for n being Nat holds P

A3: F

A4: for n being Nat holds P

A5: for n being Nat

for x, y1, y2 being Element of F

y1 = y2

proof end;

scheme :: NAT_1:sch 15

LambdaRecUn{ F_{1}() -> set , F_{2}( set , set ) -> set , F_{3}() -> Function, F_{4}() -> Function } :

provided

LambdaRecUn{ F

provided

A1:
dom F_{3}() = NAT
and

A2: F_{3}() . 0 = F_{1}()
and

A3: for n being Nat holds F_{3}() . (n + 1) = F_{2}(n,(F_{3}() . n))
and

A4: dom F_{4}() = NAT
and

A5: F_{4}() . 0 = F_{1}()
and

A6: for n being Nat holds F_{4}() . (n + 1) = F_{2}(n,(F_{4}() . n))

A2: F

A3: for n being Nat holds F

A4: dom F

A5: F

A6: for n being Nat holds F

proof end;

scheme :: NAT_1:sch 16

LambdaRecUnD{ F_{1}() -> non empty set , F_{2}() -> Element of F_{1}(), F_{3}( set , set ) -> Element of F_{1}(), F_{4}() -> Function of NAT,F_{1}(), F_{5}() -> Function of NAT,F_{1}() } :

provided

LambdaRecUnD{ F

provided

A1:
F_{4}() . 0 = F_{2}()
and

A2: for n being Nat holds F_{4}() . (n + 1) = F_{3}(n,(F_{4}() . n))
and

A3: F_{5}() . 0 = F_{2}()
and

A4: for n being Nat holds F_{5}() . (n + 1) = F_{3}(n,(F_{5}() . n))

A2: for n being Nat holds F

A3: F

A4: for n being Nat holds F

proof end;

:: missing, 2008.02.22, A.T.

registration

let x, y be Nat;

coherence

min (x,y) is natural by XXREAL_0:15;

coherence

max (x,y) is natural by XXREAL_0:16;

end;
coherence

min (x,y) is natural by XXREAL_0:15;

coherence

max (x,y) is natural by XXREAL_0:16;

definition

let x, y be Element of NAT ;

:: original: min

redefine func min (x,y) -> Element of NAT ;

coherence

min (x,y) is Element of NAT by XXREAL_0:15;

:: original: max

redefine func max (x,y) -> Element of NAT ;

coherence

max (x,y) is Element of NAT by XXREAL_0:16;

end;
:: original: min

redefine func min (x,y) -> Element of NAT ;

coherence

min (x,y) is Element of NAT by XXREAL_0:15;

:: original: max

redefine func max (x,y) -> Element of NAT ;

coherence

max (x,y) is Element of NAT by XXREAL_0:16;

:: from SCMFSA_9, 2008.02.25, A.T.

:: Added by AK, 2007.10.09

definition

let D be set ;

let f be Function of NAT,D;

let n be Nat;

:: original: .

redefine func f . n -> Element of D;

coherence

f . n is Element of D

end;
let f be Function of NAT,D;

let n be Nat;

:: original: .

redefine func f . n -> Element of D;

coherence

f . n is Element of D

proof end;

:: from MODELC_2, 2008.08.18, A.T.

:: from SEQM_3, BHSP_3, COMSEQ_3, KURATO_2, LOPBAN_3, CLVECT_2, CLOPBAN3

:: (generalized), 2008.08.23, A.T.

:: (generalized), 2008.08.23, A.T.

definition

let s be ManySortedSet of NAT ;

let k be Nat;

ex b_{1} being ManySortedSet of NAT st

for n being Nat holds b_{1} . n = s . (n + k)

for b_{1}, b_{2} being ManySortedSet of NAT st ( for n being Nat holds b_{1} . n = s . (n + k) ) & ( for n being Nat holds b_{2} . n = s . (n + k) ) holds

b_{1} = b_{2}

end;
let k be Nat;

func s ^\ k -> ManySortedSet of NAT means :Def3: :: NAT_1:def 3

for n being Nat holds it . n = s . (n + k);

existence for n being Nat holds it . n = s . (n + k);

ex b

for n being Nat holds b

proof end;

uniqueness for b

b

proof end;

:: deftheorem Def3 defines ^\ NAT_1:def 3 :

for s being ManySortedSet of NAT

for k being Nat

for b_{3} being ManySortedSet of NAT holds

( b_{3} = s ^\ k iff for n being Nat holds b_{3} . n = s . (n + k) );

for s being ManySortedSet of NAT

for k being Nat

for b

( b

Lm1: for s being ManySortedSet of NAT

for k being Nat holds rng (s ^\ k) c= rng s

proof end;

registration

let X be non empty set ;

let s be X -valued ManySortedSet of NAT ;

let k be Nat;

coherence

s ^\ k is X -valued

end;
let s be X -valued ManySortedSet of NAT ;

let k be Nat;

coherence

s ^\ k is X -valued

proof end;

definition

let X be non empty set ;

let s be sequence of X;

let k be Nat;

:: original: ^\

redefine func s ^\ k -> sequence of X;

coherence

s ^\ k is sequence of X

end;
let s be sequence of X;

let k be Nat;

:: original: ^\

redefine func s ^\ k -> sequence of X;

coherence

s ^\ k is sequence of X

proof end;

theorem Th48: :: NAT_1:48

for X being non empty set

for s being sequence of X

for k, m being Nat holds (s ^\ k) ^\ m = s ^\ (k + m)

for s being sequence of X

for k, m being Nat holds (s ^\ k) ^\ m = s ^\ (k + m)

proof end;

theorem :: NAT_1:49

for X being non empty set

for s being sequence of X

for k, m being Nat holds (s ^\ k) ^\ m = (s ^\ m) ^\ k

for s being sequence of X

for k, m being Nat holds (s ^\ k) ^\ m = (s ^\ m) ^\ k

proof end;

registration

let N be sequence of NAT;

let X be non empty set ;

let s be sequence of X;

coherence

( s * N is Function-like & s * N is NAT -defined & s * N is X -valued ) ;

end;
let X be non empty set ;

let s be sequence of X;

coherence

( s * N is Function-like & s * N is NAT -defined & s * N is X -valued ) ;

registration
end;

:::definition

::: let X be non empty set;

::: mode sequence of X is X-valued ManySortedSet of NAT;

:::end;

::: let X be non empty set;

::: mode sequence of X is X-valued ManySortedSet of NAT;

:::end;

theorem :: NAT_1:50

for X being non empty set

for s being sequence of X

for k being Nat

for N being sequence of NAT holds (s * N) ^\ k = s * (N ^\ k)

for s being sequence of X

for k being Nat

for N being sequence of NAT holds (s * N) ^\ k = s * (N ^\ k)

proof end;

theorem :: NAT_1:52

for Y being set

for X being non empty set

for s being sequence of X st ( for n being Nat holds s . n in Y ) holds

rng s c= Y

for X being non empty set

for s being sequence of X st ( for n being Nat holds s . n in Y ) holds

rng s c= Y

proof end;

:: from UPROOTS, 2009.07.21, A.T.

theorem :: NAT_1:55

:: from JORDAN2C, 2011.07.03, A.T.

theorem Th57: :: NAT_1:57

for n being Nat

for m being Nat st n <= m & m <= n + 3 & not m = n & not m = n + 1 & not m = n + 2 holds

m = n + 3

for m being Nat st n <= m & m <= n + 3 & not m = n & not m = n + 1 & not m = n + 2 holds

m = n + 3

proof end;

theorem :: NAT_1:58

for n being Nat

for m being Nat st n <= m & m <= n + 4 & not m = n & not m = n + 1 & not m = n + 2 & not m = n + 3 holds

m = n + 4

for m being Nat st n <= m & m <= n + 4 & not m = n & not m = n + 1 & not m = n + 2 & not m = n + 3 holds

m = n + 4

proof end;

:: from GLIB_002, 2011.07.30, A.T.

theorem :: NAT_1:60

for n being Nat holds

( not n <= 14 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 or n = 12 or n = 13 or n = 14 )

( not n <= 14 or n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 or n = 12 or n = 13 or n = 14 )

proof end;