:: IRRAT_1 semantic presentation

notation
let c1 be real number ;
antonym irrational c1 for rational c1;
end;

notation
let c1, c2 be real number ;
synonym c1 .^. c2 for c1 to_power c2;
end;

theorem Th1: :: IRRAT_1:1
for b1 being Nat st b1 is prime holds
sqrt b1 is irrational
proof end;

theorem Th2: :: IRRAT_1:2
ex b1, b2 being real number st
( b1 is irrational & b2 is irrational & not b1 .^. b2 is irrational )
proof end;

scheme :: IRRAT_1:sch 1
s1{ F1( set ) -> real number } :
( ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = F1(b2) & ( for b1, b2 being Real_Sequence st ( for b3 being Nat holds b1 . b3 = F1(b3) ) & ( for b3 being Nat holds b2 . b3 = F1(b3) ) holds
b1 = b2 ) )
proof end;

definition
let c1 be Nat;
func aseq c1 -> Real_Sequence means :Def1: :: IRRAT_1:def 1
for b1 being Nat holds a2 . b1 = (b1 - a1) / b1;
correctness
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = (b2 - c1) / b2
;
uniqueness
for b1, b2 being Real_Sequence st ( for b3 being Nat holds b1 . b3 = (b3 - c1) / b3 ) & ( for b3 being Nat holds b2 . b3 = (b3 - c1) / b3 ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def1 defines aseq IRRAT_1:def 1 :
for b1 being Nat
for b2 being Real_Sequence holds
( b2 = aseq b1 iff for b3 being Nat holds b2 . b3 = (b3 - b1) / b3 );

definition
let c1 be Nat;
func bseq c1 -> Real_Sequence means :Def2: :: IRRAT_1:def 2
for b1 being Nat holds a2 . b1 = (b1 choose a1) * (b1 .^. (- a1));
correctness
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = (b2 choose c1) * (b2 .^. (- c1))
;
uniqueness
for b1, b2 being Real_Sequence st ( for b3 being Nat holds b1 . b3 = (b3 choose c1) * (b3 .^. (- c1)) ) & ( for b3 being Nat holds b2 . b3 = (b3 choose c1) * (b3 .^. (- c1)) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def2 defines bseq IRRAT_1:def 2 :
for b1 being Nat
for b2 being Real_Sequence holds
( b2 = bseq b1 iff for b3 being Nat holds b2 . b3 = (b3 choose b1) * (b3 .^. (- b1)) );

definition
let c1 be Nat;
func cseq c1 -> Real_Sequence means :Def3: :: IRRAT_1:def 3
for b1 being Nat holds a2 . b1 = (a1 choose b1) * (a1 .^. (- b1));
correctness
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = (c1 choose b2) * (c1 .^. (- b2))
;
uniqueness
for b1, b2 being Real_Sequence st ( for b3 being Nat holds b1 . b3 = (c1 choose b3) * (c1 .^. (- b3)) ) & ( for b3 being Nat holds b2 . b3 = (c1 choose b3) * (c1 .^. (- b3)) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def3 defines cseq IRRAT_1:def 3 :
for b1 being Nat
for b2 being Real_Sequence holds
( b2 = cseq b1 iff for b3 being Nat holds b2 . b3 = (b1 choose b3) * (b1 .^. (- b3)) );

theorem Th3: :: IRRAT_1:3
for b1, b2 being Nat holds (cseq b1) . b2 = (bseq b2) . b1
proof end;

definition
func dseq -> Real_Sequence means :Def4: :: IRRAT_1:def 4
for b1 being Nat holds a1 . b1 = (1 + (1 / b1)) .^. b1;
correctness
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = (1 + (1 / b2)) .^. b2
;
uniqueness
for b1, b2 being Real_Sequence st ( for b3 being Nat holds b1 . b3 = (1 + (1 / b3)) .^. b3 ) & ( for b3 being Nat holds b2 . b3 = (1 + (1 / b3)) .^. b3 ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def4 defines dseq IRRAT_1:def 4 :
for b1 being Real_Sequence holds
( b1 = dseq iff for b2 being Nat holds b1 . b2 = (1 + (1 / b2)) .^. b2 );

definition
func eseq -> Real_Sequence means :Def5: :: IRRAT_1:def 5
for b1 being Nat holds a1 . b1 = 1 / (b1 ! );
correctness
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = 1 / (b2 ! )
;
uniqueness
for b1, b2 being Real_Sequence st ( for b3 being Nat holds b1 . b3 = 1 / (b3 ! ) ) & ( for b3 being Nat holds b2 . b3 = 1 / (b3 ! ) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def5 defines eseq IRRAT_1:def 5 :
for b1 being Real_Sequence holds
( b1 = eseq iff for b2 being Nat holds b1 . b2 = 1 / (b2 ! ) );

theorem Th4: :: IRRAT_1:4
for b1, b2 being Nat st b1 > 0 holds
b1 .^. (- (b2 + 1)) = (b1 .^. (- b2)) / b1
proof end;

Lemma9: for b1, b2, b3, b4, b5 being real number holds b1 / ((b2 * b3) * (b4 / b5)) = (b5 / b3) * (b1 / (b2 * b4))
by XCMPLX_1:235;

theorem Th5: :: IRRAT_1:5
canceled;

theorem Th6: :: IRRAT_1:6
for b1, b2 being Nat holds b1 choose (b2 + 1) = ((b1 - b2) / (b2 + 1)) * (b1 choose b2)
proof end;

theorem Th7: :: IRRAT_1:7
for b1, b2 being Nat st b1 > 0 holds
(bseq (b2 + 1)) . b1 = ((1 / (b2 + 1)) * ((bseq b2) . b1)) * ((aseq b2) . b1)
proof end;

theorem Th8: :: IRRAT_1:8
for b1, b2 being Nat st b1 > 0 holds
(aseq b2) . b1 = 1 - (b2 / b1)
proof end;

theorem Th9: :: IRRAT_1:9
for b1 being Nat holds
( aseq b1 is convergent & lim (aseq b1) = 1 )
proof end;

theorem Th10: :: IRRAT_1:10
for b1 being real number
for b2 being Real_Sequence st ( for b3 being Nat holds b2 . b3 = b1 ) holds
( b2 is convergent & lim b2 = b1 )
proof end;

theorem Th11: :: IRRAT_1:11
for b1 being Nat holds (bseq 0) . b1 = 1
proof end;

theorem Th12: :: IRRAT_1:12
for b1 being Nat holds (1 / (b1 + 1)) * (1 / (b1 ! )) = 1 / ((b1 + 1) ! )
proof end;

theorem Th13: :: IRRAT_1:13
for b1 being Nat holds
( bseq b1 is convergent & lim (bseq b1) = 1 / (b1 ! ) & lim (bseq b1) = eseq . b1 )
proof end;

theorem Th14: :: IRRAT_1:14
for b1, b2 being Nat st b1 < b2 holds
( 0 < (aseq b1) . b2 & (aseq b1) . b2 <= 1 )
proof end;

theorem Th15: :: IRRAT_1:15
for b1, b2 being Nat st b1 > 0 holds
( 0 <= (bseq b2) . b1 & (bseq b2) . b1 <= 1 / (b2 ! ) & (bseq b2) . b1 <= eseq . b2 & 0 <= (cseq b1) . b2 & (cseq b1) . b2 <= 1 / (b2 ! ) & (cseq b1) . b2 <= eseq . b2 )
proof end;

theorem Th16: :: IRRAT_1:16
for b1 being Real_Sequence st b1 ^\ 1 is summable holds
( b1 is summable & Sum b1 = (b1 . 0) + (Sum (b1 ^\ 1)) )
proof end;

theorem Th17: :: IRRAT_1:17
for b1 being Nat
for b2 being non empty set
for b3 being FinSequence of b2 st 1 <= b1 & b1 < len b3 holds
(b3 /^ 1) . b1 = b3 . (b1 + 1)
proof end;

theorem Th18: :: IRRAT_1:18
for b1 being FinSequence of REAL st len b1 > 0 holds
Sum b1 = (b1 . 1) + (Sum (b1 /^ 1))
proof end;

theorem Th19: :: IRRAT_1:19
for b1 being Nat
for b2 being Real_Sequence
for b3 being FinSequence of REAL st len b3 = b1 & ( for b4 being Nat st b4 < b1 holds
b2 . b4 = b3 . (b4 + 1) ) & ( for b4 being Nat st b4 >= b1 holds
b2 . b4 = 0 ) holds
( b2 is summable & Sum b2 = Sum b3 )
proof end;

theorem Th20: :: IRRAT_1:20
for b1, b2 being Nat
for b3, b4 being real number st b3 <> 0 & b4 <> 0 & b1 <= b2 holds
(b3,b4 In_Power b2) . (b1 + 1) = ((b2 choose b1) * (b3 .^. (b2 - b1))) * (b4 .^. b1)
proof end;

theorem Th21: :: IRRAT_1:21
for b1, b2 being Nat st b1 > 0 & b2 <= b1 holds
(cseq b1) . b2 = (1,(1 / b1) In_Power b1) . (b2 + 1)
proof end;

theorem Th22: :: IRRAT_1:22
for b1 being Nat st b1 > 0 holds
( cseq b1 is summable & Sum (cseq b1) = (1 + (1 / b1)) .^. b1 & Sum (cseq b1) = dseq . b1 )
proof end;

theorem Th23: :: IRRAT_1:23
( dseq is convergent & lim dseq = number_e )
proof end;

theorem Th24: :: IRRAT_1:24
( eseq is summable & Sum eseq = exp 1 )
proof end;

theorem Th25: :: IRRAT_1:25
for b1 being Nat
for b2 being Real_Sequence st ( for b3 being Nat holds b2 . b3 = (Partial_Sums (cseq b3)) . b1 ) holds
( b2 is convergent & lim b2 = (Partial_Sums eseq ) . b1 )
proof end;

theorem Th26: :: IRRAT_1:26
for b1 being real number
for b2 being Real_Sequence st b2 is convergent & lim b2 = b1 holds
for b3 being real number st b3 > 0 holds
ex b4 being Nat st
for b5 being Nat st b5 >= b4 holds
b2 . b5 > b1 - b3
proof end;

theorem Th27: :: IRRAT_1:27
for b1 being real number
for b2 being Real_Sequence st ( for b3 being real number st b3 > 0 holds
ex b4 being Nat st
for b5 being Nat st b5 >= b4 holds
b2 . b5 > b1 - b3 ) & ex b3 being Nat st
for b4 being Nat st b4 >= b3 holds
b2 . b4 <= b1 holds
( b2 is convergent & lim b2 = b1 )
proof end;

theorem Th28: :: IRRAT_1:28
for b1 being Real_Sequence st b1 is summable holds
for b2 being real number st b2 > 0 holds
ex b3 being Nat st (Partial_Sums b1) . b3 > (Sum b1) - b2
proof end;

theorem Th29: :: IRRAT_1:29
for b1 being Nat st b1 >= 1 holds
dseq . b1 <= Sum eseq
proof end;

theorem Th30: :: IRRAT_1:30
for b1 being Nat
for b2 being Real_Sequence st b2 is summable & ( for b3 being Nat holds b2 . b3 >= 0 ) holds
Sum b2 >= (Partial_Sums b2) . b1
proof end;

theorem Th31: :: IRRAT_1:31
( dseq is convergent & lim dseq = Sum eseq )
proof end;

definition
redefine func number_e -> set equals :Def6: :: IRRAT_1:def 6
Sum eseq ;
compatibility
for b1 being set holds
( b1 = number_e iff b1 = Sum eseq )
by Th23, Th31;
end;

:: deftheorem Def6 defines number_e IRRAT_1:def 6 :
number_e = Sum eseq ;

definition
redefine func number_e -> set equals :: IRRAT_1:def 7
exp 1;
compatibility
for b1 being set holds
( b1 = number_e iff b1 = exp 1 )
by Def6, Th24;
end;

:: deftheorem Def7 defines number_e IRRAT_1:def 7 :
number_e = exp 1;

theorem Th32: :: IRRAT_1:32
for b1 being real number st not b1 is irrational holds
ex b2 being Nat st
( b2 >= 2 & (b2 ! ) * b1 is integer )
proof end;

theorem Th33: :: IRRAT_1:33
for b1, b2 being Nat holds (b1 ! ) * (eseq . b2) = (b1 ! ) / (b2 ! )
proof end;

theorem Th34: :: IRRAT_1:34
for b1, b2 being Nat holds (b1 ! ) / (b2 ! ) > 0
proof end;

theorem Th35: :: IRRAT_1:35
for b1 being Real_Sequence st b1 is summable & ( for b2 being Nat holds b1 . b2 > 0 ) holds
Sum b1 > 0
proof end;

theorem Th36: :: IRRAT_1:36
for b1 being Nat holds (b1 ! ) * (Sum (eseq ^\ (b1 + 1))) > 0
proof end;

theorem Th37: :: IRRAT_1:37
for b1, b2 being Nat st b1 <= b2 holds
(b2 ! ) / (b1 ! ) is integer
proof end;

theorem Th38: :: IRRAT_1:38
for b1 being Nat holds (b1 ! ) * ((Partial_Sums eseq ) . b1) is integer
proof end;

theorem Th39: :: IRRAT_1:39
for b1, b2 being Nat
for b3 being real number st b3 = 1 / (b1 + 1) holds
(b1 ! ) / (((b1 + b2) + 1) ! ) <= b3 .^. (b2 + 1)
proof end;

theorem Th40: :: IRRAT_1:40
for b1 being Nat
for b2 being real number st b1 > 0 & b2 = 1 / (b1 + 1) holds
(b1 ! ) * (Sum (eseq ^\ (b1 + 1))) <= b2 / (1 - b2)
proof end;

theorem Th41: :: IRRAT_1:41
for b1, b2 being real number st b2 >= 2 & b1 = 1 / (b2 + 1) holds
b1 / (1 - b1) < 1
proof end;

theorem Th42: :: IRRAT_1:42
number_e is irrational
proof end;