:: Arithmetic of Non Negative Rational Numbers
:: by Grzegorz Bancerek
::
:: Received March 7, 1998
:: Copyright (c) 1998 Association of Mizar Users
Lm1:
{} in omega
by ORDINAL1:def 12;
Lm2:
1 in omega
;
:: deftheorem defines one ARYTM_3:def 1 :
:: deftheorem Def2 defines are_relative_prime ARYTM_3:def 2 :
theorem :: ARYTM_3:1
canceled;
theorem :: ARYTM_3:2
canceled;
theorem :: ARYTM_3:3
canceled;
theorem :: ARYTM_3:4
canceled;
theorem :: ARYTM_3:5
theorem Th6: :: ARYTM_3:6
theorem Th7: :: ARYTM_3:7
defpred S1[ set ] means ex B being Ordinal st
( B c= $1 & $1 in omega & $1 <> {} & ( for c, d1, d2 being natural Ordinal holds
( not d1,d2 are_relative_prime or not $1 = c *^ d1 or not B = c *^ d2 ) ) );
theorem :: ARYTM_3:8
:: deftheorem Def3 defines divides ARYTM_3:def 3 :
theorem Th9: :: ARYTM_3:9
theorem Th10: :: ARYTM_3:10
theorem Th11: :: ARYTM_3:11
theorem :: ARYTM_3:12
canceled;
theorem Th13: :: ARYTM_3:13
theorem Th14: :: ARYTM_3:14
theorem Th15: :: ARYTM_3:15
theorem Th16: :: ARYTM_3:16
Lm3:
1 = succ {}
;
:: deftheorem Def4 defines lcm ARYTM_3:def 4 :
theorem Th17: :: ARYTM_3:17
theorem Th18: :: ARYTM_3:18
:: deftheorem Def5 defines hcf ARYTM_3:def 5 :
theorem Th19: :: ARYTM_3:19
theorem Th20: :: ARYTM_3:20
theorem Th21: :: ARYTM_3:21
theorem Th22: :: ARYTM_3:22
theorem Th23: :: ARYTM_3:23
theorem Th24: :: ARYTM_3:24
theorem Th25: :: ARYTM_3:25
:: deftheorem defines RED ARYTM_3:def 6 :
theorem Th26: :: ARYTM_3:26
theorem :: ARYTM_3:27
theorem Th28: :: ARYTM_3:28
theorem Th29: :: ARYTM_3:29
theorem :: ARYTM_3:30
theorem Th31: :: ARYTM_3:31
theorem Th32: :: ARYTM_3:32
theorem Th33: :: ARYTM_3:33
set RATplus = { [a,b] where a, b is Element of omega : ( a,b are_relative_prime & b <> {} ) } ;
1,1 are_relative_prime
by Th6;
then
[1,1] in { [a,b] where a, b is Element of omega : ( a,b are_relative_prime & b <> {} ) }
;
then reconsider RATplus = { [a,b] where a, b is Element of omega : ( a,b are_relative_prime & b <> {} ) } as non empty set ;
Lm4:
for a, b being natural Ordinal st [a,b] in RATplus holds
( a,b are_relative_prime & b <> {} )
:: deftheorem defines RAT+ ARYTM_3:def 7 :
Lm5:
omega c= RAT+
by XBOOLE_1:7;
theorem :: ARYTM_3:34
canceled;
theorem Th35: :: ARYTM_3:35
theorem Th36: :: ARYTM_3:36
theorem Th37: :: ARYTM_3:37
theorem Th38: :: ARYTM_3:38
theorem Th39: :: ARYTM_3:39
definition
let x be
Element of
RAT+ ;
func numerator x -> Element of
omega means :
Def8:
:: ARYTM_3:def 8
it = x if x in omega otherwise ex
a being
natural Ordinal st
x = [it,a];
existence
( ( x in omega implies ex b1 being Element of omega st b1 = x ) & ( not x in omega implies ex b1 being Element of omega ex a being natural Ordinal st x = [b1,a] ) )
correctness
consistency
for b1 being Element of omega holds verum;
uniqueness
for b1, b2 being Element of omega holds
( ( x in omega & b1 = x & b2 = x implies b1 = b2 ) & ( not x in omega & ex a being natural Ordinal st x = [b1,a] & ex a being natural Ordinal st x = [b2,a] implies b1 = b2 ) );
by ZFMISC_1:33;
func denominator x -> Element of
omega means :
Def9:
:: ARYTM_3:def 9
it = 1
if x in omega otherwise ex
a being
natural Ordinal st
x = [a,it];
existence
( ( x in omega implies ex b1 being Element of omega st b1 = 1 ) & ( not x in omega implies ex b1 being Element of omega ex a being natural Ordinal st x = [a,b1] ) )
correctness
consistency
for b1 being Element of omega holds verum;
uniqueness
for b1, b2 being Element of omega holds
( ( x in omega & b1 = 1 & b2 = 1 implies b1 = b2 ) & ( not x in omega & ex a being natural Ordinal st x = [a,b1] & ex a being natural Ordinal st x = [a,b2] implies b1 = b2 ) );
by ZFMISC_1:33;
end;
:: deftheorem Def8 defines numerator ARYTM_3:def 8 :
:: deftheorem Def9 defines denominator ARYTM_3:def 9 :
theorem Th40: :: ARYTM_3:40
theorem Th41: :: ARYTM_3:41
theorem Th42: :: ARYTM_3:42
theorem Th43: :: ARYTM_3:43
theorem :: ARYTM_3:44
definition
let i,
j be
natural Ordinal;
func i / j -> Element of
RAT+ equals :
Def10:
:: ARYTM_3:def 10
{} if j = {} RED i,
j if RED j,
i = 1
otherwise [(RED i,j),(RED j,i)];
coherence
( ( j = {} implies {} is Element of RAT+ ) & ( RED j,i = 1 implies RED i,j is Element of RAT+ ) & ( not j = {} & not RED j,i = 1 implies [(RED i,j),(RED j,i)] is Element of RAT+ ) )
consistency
for b1 being Element of RAT+ st j = {} & RED j,i = 1 holds
( b1 = {} iff b1 = RED i,j )
by Th31;
end;
:: deftheorem Def10 defines / ARYTM_3:def 10 :
theorem Th45: :: ARYTM_3:45
theorem Th46: :: ARYTM_3:46
theorem Th47: :: ARYTM_3:47
theorem Th48: :: ARYTM_3:48
theorem Th49: :: ARYTM_3:49
theorem Th50: :: ARYTM_3:50
theorem Th51: :: ARYTM_3:51
:: deftheorem defines + ARYTM_3:def 11 :
:: deftheorem defines *' ARYTM_3:def 12 :
theorem Th52: :: ARYTM_3:52
theorem Th53: :: ARYTM_3:53
theorem Th54: :: ARYTM_3:54
theorem Th55: :: ARYTM_3:55
theorem Th56: :: ARYTM_3:56
theorem Th57: :: ARYTM_3:57
theorem Th58: :: ARYTM_3:58
theorem Th59: :: ARYTM_3:59
theorem Th60: :: ARYTM_3:60
theorem Th61: :: ARYTM_3:61
theorem Th62: :: ARYTM_3:62
theorem Th63: :: ARYTM_3:63
theorem Th64: :: ARYTM_3:64
theorem :: ARYTM_3:65
theorem Th66: :: ARYTM_3:66
:: deftheorem Def13 defines <=' ARYTM_3:def 13 :
theorem :: ARYTM_3:67
canceled;
theorem :: ARYTM_3:68
theorem Th69: :: ARYTM_3:69
theorem Th70: :: ARYTM_3:70
theorem Th71: :: ARYTM_3:71
theorem :: ARYTM_3:72
theorem Th73: :: ARYTM_3:73
theorem Th74: :: ARYTM_3:74
theorem :: ARYTM_3:75
theorem :: ARYTM_3:76
theorem :: ARYTM_3:77
theorem Th78: :: ARYTM_3:78
theorem Th79: :: ARYTM_3:79
theorem Th80: :: ARYTM_3:80
theorem :: ARYTM_3:81
theorem :: ARYTM_3:82
theorem Th83: :: ARYTM_3:83
theorem :: ARYTM_3:84
canceled;
theorem :: ARYTM_3:85
theorem :: ARYTM_3:86
theorem Th87: :: ARYTM_3:87
theorem :: ARYTM_3:88
theorem :: ARYTM_3:89
theorem Th90: :: ARYTM_3:90
theorem :: ARYTM_3:91
theorem :: ARYTM_3:92
theorem :: ARYTM_3:93
theorem Th94: :: ARYTM_3:94
theorem :: ARYTM_3:95
theorem :: ARYTM_3:96
theorem :: ARYTM_3:97
theorem :: ARYTM_3:98
theorem :: ARYTM_3:99
theorem :: ARYTM_3:100
theorem :: ARYTM_3:101
theorem :: ARYTM_3:102
theorem :: ARYTM_3:103