:: Properties of Number-Valued Functions
:: by Library Committee
::
:: Received December 18, 2007
:: Copyright (c) 2007-2012 Association of Mizar Users


begin

Lm1: for f being FinSequence
for h being Function st dom h = dom f holds
h is FinSequence

proof end;

Lm2: for f, g being FinSequence
for h being Function st dom h = (dom f) /\ (dom g) holds
h is FinSequence

proof end;

registration
cluster Relation-like Function-like complex-valued FinSequence-like for set ;
existence
ex b1 being FinSequence st b1 is complex-valued
proof end;
end;

:: move somewhere
registration
let r be rational number ;
cluster |.r.| -> rational ;
coherence
|.r.| is rational
proof end;
end;

definition
let f1, f2 be complex-valued Function;
deffunc H1( set ) -> set = (f1 . $1) + (f2 . $1);
set X = (dom f1) /\ (dom f2);
func f1 + f2 -> Function means :Def1: :: VALUED_1:def 1
( dom it = (dom f1) /\ (dom f2) & ( for c being set st c in dom it holds
it . c = (f1 . c) + (f2 . c) ) );
existence
ex b1 being Function st
( dom b1 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b1 holds
b1 . c = (f1 . c) + (f2 . c) ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b1 holds
b1 . c = (f1 . c) + (f2 . c) ) & dom b2 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b2 holds
b2 . c = (f1 . c) + (f2 . c) ) holds
b1 = b2
proof end;
commutativity
for b1 being Function
for f1, f2 being complex-valued Function st dom b1 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b1 holds
b1 . c = (f1 . c) + (f2 . c) ) holds
( dom b1 = (dom f2) /\ (dom f1) & ( for c being set st c in dom b1 holds
b1 . c = (f2 . c) + (f1 . c) ) )
;
end;

:: deftheorem Def1 defines + VALUED_1:def 1 :
for f1, f2 being complex-valued Function
for b3 being Function holds
( b3 = f1 + f2 iff ( dom b3 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b3 holds
b3 . c = (f1 . c) + (f2 . c) ) ) );

registration
let f1, f2 be complex-valued Function;
cluster f1 + f2 -> complex-valued ;
coherence
f1 + f2 is complex-valued
proof end;
end;

registration
let f1, f2 be real-valued Function;
cluster f1 + f2 -> real-valued ;
coherence
f1 + f2 is real-valued
proof end;
end;

registration
let f1, f2 be RAT -valued Function;
cluster f1 + f2 -> RAT -valued ;
coherence
f1 + f2 is RAT -valued
proof end;
end;

registration
let f1, f2 be INT -valued Function;
cluster f1 + f2 -> INT -valued ;
coherence
f1 + f2 is INT -valued
proof end;
end;

registration
let f1, f2 be natural-valued Function;
cluster f1 + f2 -> natural-valued ;
coherence
f1 + f2 is natural-valued
proof end;
end;

definition
let C be set ;
let D1, D2 be complex-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: +
redefine func f1 + f2 -> PartFunc of C,COMPLEX;
coherence
f1 + f2 is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D1, D2 be real-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: +
redefine func f1 + f2 -> PartFunc of C,REAL;
coherence
f1 + f2 is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D1, D2 be rational-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: +
redefine func f1 + f2 -> PartFunc of C,RAT;
coherence
f1 + f2 is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D1, D2 be integer-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: +
redefine func f1 + f2 -> PartFunc of C,INT;
coherence
f1 + f2 is PartFunc of C,INT
proof end;
end;

definition
let C be set ;
let D1, D2 be natural-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: +
redefine func f1 + f2 -> PartFunc of C,NAT;
coherence
f1 + f2 is PartFunc of C,NAT
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty complex-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 + f2 -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = f1 + f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty real-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 + f2 -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = f1 + f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty rational-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 + f2 -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = f1 + f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty integer-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 + f2 -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = f1 + f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty natural-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 + f2 -> total for PartFunc of C,NAT;
coherence
for b1 being PartFunc of C,NAT st b1 = f1 + f2 holds
b1 is total
proof end;
end;

theorem :: VALUED_1:1
for C being set
for D1, D2 being non empty complex-membered set
for f1 being Function of C,D1
for f2 being Function of C,D2
for c being Element of C holds (f1 + f2) . c = (f1 . c) + (f2 . c)
proof end;

registration
let f1, f2 be complex-valued FinSequence;
cluster f1 + f2 -> FinSequence-like ;
coherence
f1 + f2 is FinSequence-like
proof end;
end;

begin

definition
let f be complex-valued Function;
let r be complex number ;
deffunc H1( set ) -> set = r + (f . $1);
func r + f -> Function means :Def2: :: VALUED_1:def 2
( dom it = dom f & ( for c being set st c in dom it holds
it . c = r + (f . c) ) );
existence
ex b1 being Function st
( dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = r + (f . c) ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = r + (f . c) ) & dom b2 = dom f & ( for c being set st c in dom b2 holds
b2 . c = r + (f . c) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def2 defines + VALUED_1:def 2 :
for f being complex-valued Function
for r being complex number
for b3 being Function holds
( b3 = r + f iff ( dom b3 = dom f & ( for c being set st c in dom b3 holds
b3 . c = r + (f . c) ) ) );

notation
let f be complex-valued Function;
let r be complex number ;
synonym f + r for r + f;
end;

registration
let f be complex-valued Function;
let r be complex number ;
cluster r + f -> complex-valued ;
coherence
r + f is complex-valued
proof end;
end;

registration
let f be real-valued Function;
let r be real number ;
cluster r + f -> real-valued ;
coherence
r + f is real-valued
proof end;
end;

registration
let f be RAT -valued Function;
let r be rational number ;
cluster r + f -> RAT -valued ;
coherence
r + f is RAT -valued
proof end;
end;

registration
let f be INT -valued Function;
let r be integer number ;
cluster r + f -> INT -valued ;
coherence
r + f is INT -valued
proof end;
end;

registration
let f be natural-valued Function;
let r be Nat;
cluster r + f -> natural-valued ;
coherence
r + f is natural-valued
proof end;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
let r be complex number ;
:: original: +
redefine func r + f -> PartFunc of C,COMPLEX;
coherence
r + f is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D be real-membered set ;
let f be PartFunc of C,D;
let r be real number ;
:: original: +
redefine func r + f -> PartFunc of C,REAL;
coherence
r + f is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
let r be rational number ;
:: original: +
redefine func r + f -> PartFunc of C,RAT;
coherence
r + f is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D be integer-membered set ;
let f be PartFunc of C,D;
let r be integer number ;
:: original: +
redefine func r + f -> PartFunc of C,INT;
coherence
r + f is PartFunc of C,INT
proof end;
end;

definition
let C be set ;
let D be natural-membered set ;
let f be PartFunc of C,D;
let r be Nat;
:: original: +
redefine func r + f -> PartFunc of C,NAT;
coherence
r + f is PartFunc of C,NAT
proof end;
end;

registration
let C be set ;
let D be non empty complex-membered set ;
let f be Function of C,D;
let r be complex number ;
cluster r + f -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = r + f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty real-membered set ;
let f be Function of C,D;
let r be real number ;
cluster r + f -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = r + f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty rational-membered set ;
let f be Function of C,D;
let r be rational number ;
cluster r + f -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = r + f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty integer-membered set ;
let f be Function of C,D;
let r be integer number ;
cluster r + f -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = r + f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty natural-membered set ;
let f be Function of C,D;
let r be Nat;
cluster r + f -> total for PartFunc of C,NAT;
coherence
for b1 being PartFunc of C,NAT st b1 = r + f holds
b1 is total
proof end;
end;

theorem :: VALUED_1:2
for C being non empty set
for D being non empty complex-membered set
for f being Function of C,D
for r being complex number
for c being Element of C holds (r + f) . c = r + (f . c)
proof end;

registration
let f be complex-valued FinSequence;
let r be complex number ;
cluster r + f -> FinSequence-like ;
coherence
r + f is FinSequence-like
proof end;
end;

begin

definition
let f be complex-valued Function;
let r be complex number ;
func f - r -> Function equals :: VALUED_1:def 3
(- r) + f;
coherence
(- r) + f is Function
;
end;

:: deftheorem defines - VALUED_1:def 3 :
for f being complex-valued Function
for r being complex number holds f - r = (- r) + f;

theorem :: VALUED_1:3
for f being complex-valued Function
for r being complex number holds
( dom (f - r) = dom f & ( for c being set st c in dom f holds
(f - r) . c = (f . c) - r ) )
proof end;

registration
let f be complex-valued Function;
let r be complex number ;
cluster f - r -> complex-valued ;
coherence
f - r is complex-valued
;
end;

registration
let f be real-valued Function;
let r be real number ;
cluster f - r -> real-valued ;
coherence
f - r is real-valued
;
end;

registration
let f be RAT -valued Function;
let r be rational number ;
cluster f - r -> RAT -valued ;
coherence
f - r is RAT -valued
;
end;

registration
let f be INT -valued Function;
let r be integer number ;
cluster f - r -> INT -valued ;
coherence
f - r is INT -valued
;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
let r be complex number ;
:: original: -
redefine func f - r -> PartFunc of C,COMPLEX;
coherence
f - r is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D be real-membered set ;
let f be PartFunc of C,D;
let r be real number ;
:: original: -
redefine func f - r -> PartFunc of C,REAL;
coherence
f - r is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
let r be rational number ;
:: original: -
redefine func f - r -> PartFunc of C,RAT;
coherence
f - r is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D be integer-membered set ;
let f be PartFunc of C,D;
let r be integer number ;
:: original: -
redefine func f - r -> PartFunc of C,INT;
coherence
f - r is PartFunc of C,INT
proof end;
end;

registration
let C be set ;
let D be non empty complex-membered set ;
let f be Function of C,D;
let r be complex number ;
cluster f - r -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = f - r holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty real-membered set ;
let f be Function of C,D;
let r be real number ;
cluster f - r -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = f - r holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty rational-membered set ;
let f be Function of C,D;
let r be rational number ;
cluster f - r -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = f - r holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty integer-membered set ;
let f be Function of C,D;
let r be integer number ;
cluster f - r -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = f - r holds
b1 is total
;
end;

theorem :: VALUED_1:4
for C being non empty set
for D being non empty complex-membered set
for f being Function of C,D
for r being complex number
for c being Element of C holds (f - r) . c = (f . c) - r
proof end;

registration
let f be complex-valued FinSequence;
let r be complex number ;
cluster f - r -> FinSequence-like ;
coherence
f - r is FinSequence-like
;
end;

begin

definition
let f1, f2 be complex-valued Function;
deffunc H1( set ) -> set = (f1 . $1) * (f2 . $1);
set X = (dom f1) /\ (dom f2);
func f1 (#) f2 -> Function means :Def4: :: VALUED_1:def 4
( dom it = (dom f1) /\ (dom f2) & ( for c being set st c in dom it holds
it . c = (f1 . c) * (f2 . c) ) );
existence
ex b1 being Function st
( dom b1 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b1 holds
b1 . c = (f1 . c) * (f2 . c) ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b1 holds
b1 . c = (f1 . c) * (f2 . c) ) & dom b2 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b2 holds
b2 . c = (f1 . c) * (f2 . c) ) holds
b1 = b2
proof end;
commutativity
for b1 being Function
for f1, f2 being complex-valued Function st dom b1 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b1 holds
b1 . c = (f1 . c) * (f2 . c) ) holds
( dom b1 = (dom f2) /\ (dom f1) & ( for c being set st c in dom b1 holds
b1 . c = (f2 . c) * (f1 . c) ) )
;
end;

:: deftheorem Def4 defines (#) VALUED_1:def 4 :
for f1, f2 being complex-valued Function
for b3 being Function holds
( b3 = f1 (#) f2 iff ( dom b3 = (dom f1) /\ (dom f2) & ( for c being set st c in dom b3 holds
b3 . c = (f1 . c) * (f2 . c) ) ) );

theorem :: VALUED_1:5
for f1, f2 being complex-valued Function
for c being set holds (f1 (#) f2) . c = (f1 . c) * (f2 . c)
proof end;

registration
let f1, f2 be complex-valued Function;
cluster f1 (#) f2 -> complex-valued ;
coherence
f1 (#) f2 is complex-valued
proof end;
end;

registration
let f1, f2 be real-valued Function;
cluster f1 (#) f2 -> real-valued ;
coherence
f1 (#) f2 is real-valued
proof end;
end;

registration
let f1, f2 be RAT -valued Function;
cluster f1 (#) f2 -> RAT -valued ;
coherence
f1 (#) f2 is RAT -valued
proof end;
end;

registration
let f1, f2 be INT -valued Function;
cluster f1 (#) f2 -> INT -valued ;
coherence
f1 (#) f2 is INT -valued
proof end;
end;

registration
let f1, f2 be natural-valued Function;
cluster f1 (#) f2 -> natural-valued ;
coherence
f1 (#) f2 is natural-valued
proof end;
end;

definition
let C be set ;
let D1, D2 be complex-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: (#)
redefine func f1 (#) f2 -> PartFunc of C,COMPLEX;
coherence
f1 (#) f2 is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D1, D2 be real-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: (#)
redefine func f1 (#) f2 -> PartFunc of C,REAL;
coherence
f1 (#) f2 is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D1, D2 be rational-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: (#)
redefine func f1 (#) f2 -> PartFunc of C,RAT;
coherence
f1 (#) f2 is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D1, D2 be integer-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: (#)
redefine func f1 (#) f2 -> PartFunc of C,INT;
coherence
f1 (#) f2 is PartFunc of C,INT
proof end;
end;

definition
let C be set ;
let D1, D2 be natural-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: (#)
redefine func f1 (#) f2 -> PartFunc of C,NAT;
coherence
f1 (#) f2 is PartFunc of C,NAT
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty complex-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 (#) f2 -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = f1 (#) f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty real-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 (#) f2 -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = f1 (#) f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty rational-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 (#) f2 -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = f1 (#) f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty integer-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 (#) f2 -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = f1 (#) f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty natural-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 (#) f2 -> total for PartFunc of C,NAT;
coherence
for b1 being PartFunc of C,NAT st b1 = f1 (#) f2 holds
b1 is total
proof end;
end;

registration
let f1, f2 be complex-valued FinSequence;
cluster f1 (#) f2 -> FinSequence-like ;
coherence
f1 (#) f2 is FinSequence-like
proof end;
end;

begin

definition
let f be complex-valued Function;
let r be complex number ;
deffunc H1( set ) -> set = r * (f . $1);
func r (#) f -> Function means :Def5: :: VALUED_1:def 5
( dom it = dom f & ( for c being set st c in dom it holds
it . c = r * (f . c) ) );
existence
ex b1 being Function st
( dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = r * (f . c) ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = r * (f . c) ) & dom b2 = dom f & ( for c being set st c in dom b2 holds
b2 . c = r * (f . c) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines (#) VALUED_1:def 5 :
for f being complex-valued Function
for r being complex number
for b3 being Function holds
( b3 = r (#) f iff ( dom b3 = dom f & ( for c being set st c in dom b3 holds
b3 . c = r * (f . c) ) ) );

notation
let f be complex-valued Function;
let r be complex number ;
synonym f (#) r for r (#) f;
end;

theorem Th6: :: VALUED_1:6
for f being complex-valued Function
for r being complex number
for c being set holds (r (#) f) . c = r * (f . c)
proof end;

registration
let f be complex-valued Function;
let r be complex number ;
cluster r (#) f -> complex-valued ;
coherence
r (#) f is complex-valued
proof end;
end;

registration
let f be real-valued Function;
let r be real number ;
cluster r (#) f -> real-valued ;
coherence
r (#) f is real-valued
proof end;
end;

registration
let f be RAT -valued Function;
let r be rational number ;
cluster r (#) f -> RAT -valued ;
coherence
r (#) f is RAT -valued
proof end;
end;

registration
let f be INT -valued Function;
let r be integer number ;
cluster r (#) f -> INT -valued ;
coherence
r (#) f is INT -valued
proof end;
end;

registration
let f be natural-valued Function;
let r be Nat;
cluster r (#) f -> natural-valued ;
coherence
r (#) f is natural-valued
proof end;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
let r be complex number ;
:: original: (#)
redefine func r (#) f -> PartFunc of C,COMPLEX;
coherence
r (#) f is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D be real-membered set ;
let f be PartFunc of C,D;
let r be real number ;
:: original: (#)
redefine func r (#) f -> PartFunc of C,REAL;
coherence
r (#) f is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
let r be rational number ;
:: original: (#)
redefine func r (#) f -> PartFunc of C,RAT;
coherence
r (#) f is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D be integer-membered set ;
let f be PartFunc of C,D;
let r be integer number ;
:: original: (#)
redefine func r (#) f -> PartFunc of C,INT;
coherence
r (#) f is PartFunc of C,INT
proof end;
end;

definition
let C be set ;
let D be natural-membered set ;
let f be PartFunc of C,D;
let r be Nat;
:: original: (#)
redefine func r (#) f -> PartFunc of C,NAT;
coherence
r (#) f is PartFunc of C,NAT
proof end;
end;

registration
let C be set ;
let D be non empty complex-membered set ;
let f be Function of C,D;
let r be complex number ;
cluster r (#) f -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = r (#) f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty real-membered set ;
let f be Function of C,D;
let r be real number ;
cluster r (#) f -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = r (#) f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty rational-membered set ;
let f be Function of C,D;
let r be rational number ;
cluster r (#) f -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = r (#) f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty integer-membered set ;
let f be Function of C,D;
let r be integer number ;
cluster r (#) f -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = r (#) f holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty natural-membered set ;
let f be Function of C,D;
let r be Nat;
cluster r (#) f -> total for PartFunc of C,NAT;
coherence
for b1 being PartFunc of C,NAT st b1 = r (#) f holds
b1 is total
proof end;
end;

theorem :: VALUED_1:7
for C being non empty set
for D being non empty complex-membered set
for f being Function of C,D
for r being complex number
for g being Function of C,COMPLEX st ( for c being Element of C holds g . c = r * (f . c) ) holds
g = r (#) f
proof end;

registration
let f be complex-valued FinSequence;
let r be complex number ;
cluster r (#) f -> FinSequence-like ;
coherence
r (#) f is FinSequence-like
proof end;
end;

begin

definition
let f be complex-valued Function;
func - f -> complex-valued Function equals :: VALUED_1:def 6
(- 1) (#) f;
coherence
(- 1) (#) f is complex-valued Function
;
involutiveness
for b1, b2 being complex-valued Function st b1 = (- 1) (#) b2 holds
b2 = (- 1) (#) b1
proof end;
end;

:: deftheorem defines - VALUED_1:def 6 :
for f being complex-valued Function holds - f = (- 1) (#) f;

theorem Th8: :: VALUED_1:8
for f being complex-valued Function holds
( dom (- f) = dom f & ( for c being set holds (- f) . c = - (f . c) ) )
proof end;

theorem :: VALUED_1:9
for f being complex-valued Function
for g being Function st dom f = dom g & ( for c being set st c in dom f holds
g . c = - (f . c) ) holds
g = - f
proof end;

registration
let f be complex-valued Function;
cluster - f -> complex-valued ;
coherence
- f is complex-valued
;
end;

registration
let f be real-valued Function;
cluster - f -> complex-valued real-valued ;
coherence
- f is real-valued
;
end;

registration
let f be RAT -valued Function;
cluster - f -> RAT -valued complex-valued ;
coherence
- f is RAT -valued
;
end;

registration
let f be INT -valued Function;
cluster - f -> INT -valued complex-valued ;
coherence
- f is INT -valued
;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
:: original: -
redefine func - f -> PartFunc of C,COMPLEX;
coherence
- f is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D be real-membered set ;
let f be PartFunc of C,D;
:: original: -
redefine func - f -> PartFunc of C,REAL;
coherence
- f is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
:: original: -
redefine func - f -> PartFunc of C,RAT;
coherence
- f is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D be integer-membered set ;
let f be PartFunc of C,D;
:: original: -
redefine func - f -> PartFunc of C,INT;
coherence
- f is PartFunc of C,INT
proof end;
end;

registration
let C be set ;
let D be non empty complex-membered set ;
let f be Function of C,D;
cluster - f -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = - f holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty real-membered set ;
let f be Function of C,D;
cluster - f -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = - f holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty rational-membered set ;
let f be Function of C,D;
cluster - f -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = - f holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty integer-membered set ;
let f be Function of C,D;
cluster - f -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = - f holds
b1 is total
;
end;

registration
let f be complex-valued FinSequence;
cluster - f -> complex-valued FinSequence-like ;
coherence
- f is FinSequence-like
;
end;

begin

definition
let f be complex-valued Function;
deffunc H1( set ) -> set = (f . $1) " ;
func f " -> complex-valued Function means :Def7: :: VALUED_1:def 7
( dom it = dom f & ( for c being set st c in dom it holds
it . c = (f . c) " ) );
existence
ex b1 being complex-valued Function st
( dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = (f . c) " ) )
proof end;
uniqueness
for b1, b2 being complex-valued Function st dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = (f . c) " ) & dom b2 = dom f & ( for c being set st c in dom b2 holds
b2 . c = (f . c) " ) holds
b1 = b2
proof end;
involutiveness
for b1, b2 being complex-valued Function st dom b1 = dom b2 & ( for c being set st c in dom b1 holds
b1 . c = (b2 . c) " ) holds
( dom b2 = dom b1 & ( for c being set st c in dom b2 holds
b2 . c = (b1 . c) " ) )
proof end;
end;

:: deftheorem Def7 defines " VALUED_1:def 7 :
for f, b2 being complex-valued Function holds
( b2 = f " iff ( dom b2 = dom f & ( for c being set st c in dom b2 holds
b2 . c = (f . c) " ) ) );

::better name
theorem Th10: :: VALUED_1:10
for f being complex-valued Function
for c being set holds (f ") . c = (f . c) "
proof end;

registration
let f be real-valued Function;
cluster f " -> complex-valued real-valued ;
coherence
f " is real-valued
proof end;
end;

registration
let f be RAT -valued Function;
cluster f " -> RAT -valued complex-valued ;
coherence
f " is RAT -valued
proof end;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
:: original: "
redefine func f " -> PartFunc of C,COMPLEX;
coherence
f " is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D be real-membered set ;
let f be PartFunc of C,D;
:: original: "
redefine func f " -> PartFunc of C,REAL;
coherence
f " is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
:: original: "
redefine func f " -> PartFunc of C,RAT;
coherence
f " is PartFunc of C,RAT
proof end;
end;

registration
let C be set ;
let D be non empty complex-membered set ;
let f be Function of C,D;
cluster f " -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = f " holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty real-membered set ;
let f be Function of C,D;
cluster f " -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = f " holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty rational-membered set ;
let f be Function of C,D;
cluster f " -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = f " holds
b1 is total
proof end;
end;

registration
let f be complex-valued FinSequence;
cluster f " -> complex-valued FinSequence-like ;
coherence
f " is FinSequence-like
proof end;
end;

begin

definition
let f be complex-valued Function;
func f ^2 -> Function equals :: VALUED_1:def 8
f (#) f;
coherence
f (#) f is Function
;
end;

:: deftheorem defines ^2 VALUED_1:def 8 :
for f being complex-valued Function holds f ^2 = f (#) f;

theorem Th11: :: VALUED_1:11
for f being complex-valued Function holds
( dom (f ^2) = dom f & ( for c being set holds (f ^2) . c = (f . c) ^2 ) )
proof end;

registration
let f be complex-valued Function;
cluster f ^2 -> complex-valued ;
coherence
f ^2 is complex-valued
;
end;

registration
let f be real-valued Function;
cluster f ^2 -> real-valued ;
coherence
f ^2 is real-valued
;
end;

registration
let f be RAT -valued Function;
cluster f ^2 -> RAT -valued ;
coherence
f ^2 is RAT -valued
;
end;

registration
let f be INT -valued Function;
cluster f ^2 -> INT -valued ;
coherence
f ^2 is INT -valued
;
end;

registration
let f be natural-valued Function;
cluster f ^2 -> natural-valued ;
coherence
f ^2 is natural-valued
;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
:: original: ^2
redefine func f ^2 -> PartFunc of C,COMPLEX;
coherence
f ^2 is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D be real-membered set ;
let f be PartFunc of C,D;
:: original: ^2
redefine func f ^2 -> PartFunc of C,REAL;
coherence
f ^2 is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
:: original: ^2
redefine func f ^2 -> PartFunc of C,RAT;
coherence
f ^2 is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D be integer-membered set ;
let f be PartFunc of C,D;
:: original: ^2
redefine func f ^2 -> PartFunc of C,INT;
coherence
f ^2 is PartFunc of C,INT
proof end;
end;

definition
let C be set ;
let D be natural-membered set ;
let f be PartFunc of C,D;
:: original: ^2
redefine func f ^2 -> PartFunc of C,NAT;
coherence
f ^2 is PartFunc of C,NAT
proof end;
end;

registration
let C be set ;
let D be non empty complex-membered set ;
let f be Function of C,D;
cluster f ^2 -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = f ^2 holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty real-membered set ;
let f be Function of C,D;
cluster f ^2 -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = f ^2 holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty rational-membered set ;
let f be Function of C,D;
cluster f ^2 -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = f ^2 holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty integer-membered set ;
let f be Function of C,D;
cluster f ^2 -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = f ^2 holds
b1 is total
;
end;

registration
let C be set ;
let D be non empty natural-membered set ;
let f be Function of C,D;
cluster f ^2 -> total for PartFunc of C,NAT;
coherence
for b1 being PartFunc of C,NAT st b1 = f ^2 holds
b1 is total
;
end;

registration
let f be complex-valued FinSequence;
cluster f ^2 -> FinSequence-like ;
coherence
f ^2 is FinSequence-like
;
end;

begin

definition
let f1, f2 be complex-valued Function;
func f1 - f2 -> Function equals :: VALUED_1:def 9
f1 + (- f2);
coherence
f1 + (- f2) is Function
;
end;

:: deftheorem defines - VALUED_1:def 9 :
for f1, f2 being complex-valued Function holds f1 - f2 = f1 + (- f2);

registration
let f1, f2 be complex-valued Function;
cluster f1 - f2 -> complex-valued ;
coherence
f1 - f2 is complex-valued
;
end;

registration
let f1, f2 be real-valued Function;
cluster f1 - f2 -> real-valued ;
coherence
f1 - f2 is real-valued
;
end;

registration
let f1, f2 be RAT -valued Function;
cluster f1 - f2 -> RAT -valued ;
coherence
f1 - f2 is RAT -valued
;
end;

registration
let f1, f2 be INT -valued Function;
cluster f1 - f2 -> INT -valued ;
coherence
f1 - f2 is INT -valued
;
end;

theorem Th12: :: VALUED_1:12
for f1, f2 being complex-valued Function holds dom (f1 - f2) = (dom f1) /\ (dom f2)
proof end;

theorem :: VALUED_1:13
for f1, f2 being complex-valued Function
for c being set st c in dom (f1 - f2) holds
(f1 - f2) . c = (f1 . c) - (f2 . c)
proof end;

theorem :: VALUED_1:14
for f1, f2 being complex-valued Function
for f being Function st dom f = dom (f1 - f2) & ( for c being set st c in dom f holds
f . c = (f1 . c) - (f2 . c) ) holds
f = f1 - f2
proof end;

definition
let C be set ;
let D1, D2 be complex-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: -
redefine func f1 - f2 -> PartFunc of C,COMPLEX;
coherence
f1 - f2 is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D1, D2 be real-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: -
redefine func f1 - f2 -> PartFunc of C,REAL;
coherence
f1 - f2 is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D1, D2 be rational-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: -
redefine func f1 - f2 -> PartFunc of C,RAT;
coherence
f1 - f2 is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D1, D2 be integer-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: -
redefine func f1 - f2 -> PartFunc of C,INT;
coherence
f1 - f2 is PartFunc of C,INT
proof end;
end;

Lm3: for C being set
for D1, D2 being non empty complex-membered set
for f1 being Function of C,D1
for f2 being Function of C,D2 holds dom (f1 - f2) = C

proof end;

registration
let C be set ;
let D1, D2 be non empty complex-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 - f2 -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = f1 - f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty real-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 - f2 -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = f1 - f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty rational-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 - f2 -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = f1 - f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty integer-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 - f2 -> total for PartFunc of C,INT;
coherence
for b1 being PartFunc of C,INT st b1 = f1 - f2 holds
b1 is total
proof end;
end;

theorem :: VALUED_1:15
for C being set
for D1, D2 being non empty complex-membered set
for f1 being Function of C,D1
for f2 being Function of C,D2
for c being Element of C holds (f1 - f2) . c = (f1 . c) - (f2 . c)
proof end;

registration
let f1, f2 be complex-valued FinSequence;
cluster f1 - f2 -> FinSequence-like ;
coherence
f1 - f2 is FinSequence-like
;
end;

begin

definition
let f1, f2 be complex-valued Function;
func f1 /" f2 -> Function equals :: VALUED_1:def 10
f1 (#) (f2 ");
coherence
f1 (#) (f2 ") is Function
;
end;

:: deftheorem defines /" VALUED_1:def 10 :
for f1, f2 being complex-valued Function holds f1 /" f2 = f1 (#) (f2 ");

theorem Th16: :: VALUED_1:16
for f1, f2 being complex-valued Function holds dom (f1 /" f2) = (dom f1) /\ (dom f2)
proof end;

theorem :: VALUED_1:17
for f1, f2 being complex-valued Function
for c being set holds (f1 /" f2) . c = (f1 . c) / (f2 . c)
proof end;

registration
let f1, f2 be complex-valued Function;
cluster f1 /" f2 -> complex-valued ;
coherence
f1 /" f2 is complex-valued
;
end;

registration
let f1, f2 be real-valued Function;
cluster f1 /" f2 -> real-valued ;
coherence
f1 /" f2 is real-valued
;
end;

registration
let f1, f2 be RAT -valued Function;
cluster f1 /" f2 -> RAT -valued ;
coherence
f1 /" f2 is RAT -valued
;
end;

definition
let C be set ;
let D1, D2 be complex-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: /"
redefine func f1 /" f2 -> PartFunc of C,COMPLEX;
coherence
f1 /" f2 is PartFunc of C,COMPLEX
proof end;
end;

definition
let C be set ;
let D1, D2 be real-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: /"
redefine func f1 /" f2 -> PartFunc of C,REAL;
coherence
f1 /" f2 is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D1, D2 be rational-membered set ;
let f1 be PartFunc of C,D1;
let f2 be PartFunc of C,D2;
:: original: /"
redefine func f1 /" f2 -> PartFunc of C,RAT;
coherence
f1 /" f2 is PartFunc of C,RAT
proof end;
end;

Lm4: for C being set
for D1, D2 being non empty complex-membered set
for f1 being Function of C,D1
for f2 being Function of C,D2 holds dom (f1 /" f2) = C

proof end;

registration
let C be set ;
let D1, D2 be non empty complex-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 /" f2 -> total for PartFunc of C,COMPLEX;
coherence
for b1 being PartFunc of C,COMPLEX st b1 = f1 /" f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty real-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 /" f2 -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = f1 /" f2 holds
b1 is total
proof end;
end;

registration
let C be set ;
let D1, D2 be non empty rational-membered set ;
let f1 be Function of C,D1;
let f2 be Function of C,D2;
cluster f1 /" f2 -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = f1 /" f2 holds
b1 is total
proof end;
end;

registration
let f1, f2 be complex-valued FinSequence;
cluster f1 /" f2 -> FinSequence-like ;
coherence
f1 /" f2 is FinSequence-like
;
end;

begin

definition
let f be complex-valued Function;
deffunc H1( set ) -> Element of REAL = |.(f . $1).|;
func |.f.| -> real-valued Function means :Def11: :: VALUED_1:def 11
( dom it = dom f & ( for c being set st c in dom it holds
it . c = |.(f . c).| ) );
existence
ex b1 being real-valued Function st
( dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = |.(f . c).| ) )
proof end;
uniqueness
for b1, b2 being real-valued Function st dom b1 = dom f & ( for c being set st c in dom b1 holds
b1 . c = |.(f . c).| ) & dom b2 = dom f & ( for c being set st c in dom b2 holds
b2 . c = |.(f . c).| ) holds
b1 = b2
proof end;
projectivity
for b1 being real-valued Function
for b2 being complex-valued Function st dom b1 = dom b2 & ( for c being set st c in dom b1 holds
b1 . c = |.(b2 . c).| ) holds
( dom b1 = dom b1 & ( for c being set st c in dom b1 holds
b1 . c = |.(b1 . c).| ) )
proof end;
end;

:: deftheorem Def11 defines |. VALUED_1:def 11 :
for f being complex-valued Function
for b2 being real-valued Function holds
( b2 = |.f.| iff ( dom b2 = dom f & ( for c being set st c in dom b2 holds
b2 . c = |.(f . c).| ) ) );

notation
let f be complex-valued Function;
synonym abs f for |.f.|;
end;

theorem :: VALUED_1:18
for f being complex-valued Function
for c being set holds |.f.| . c = |.(f . c).|
proof end;

registration
let f be RAT -valued Function;
cluster |.f.| -> RAT -valued real-valued ;
coherence
|.f.| is RAT -valued
proof end;
end;

registration
let f be INT -valued Function;
cluster |.f.| -> real-valued natural-valued ;
coherence
|.f.| is natural-valued
proof end;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
:: original: |.
redefine func |.f.| -> PartFunc of C,REAL;
coherence
|.f.| is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be complex-membered set ;
let f be PartFunc of C,D;
:: original: |.
redefine func abs f -> PartFunc of C,REAL;
coherence
|.f.| is PartFunc of C,REAL
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
:: original: |.
redefine func |.f.| -> PartFunc of C,RAT;
coherence
|.f.| is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D be rational-membered set ;
let f be PartFunc of C,D;
:: original: |.
redefine func abs f -> PartFunc of C,RAT;
coherence
|.f.| is PartFunc of C,RAT
proof end;
end;

definition
let C be set ;
let D be integer-membered set ;
let f be PartFunc of C,D;
:: original: |.
redefine func |.f.| -> PartFunc of C,NAT;
coherence
|.f.| is PartFunc of C,NAT
proof end;
end;

definition
let C be set ;
let D be integer-membered set ;
let f be PartFunc of C,D;
:: original: |.
redefine func abs f -> PartFunc of C,NAT;
coherence
|.f.| is PartFunc of C,NAT
proof end;
end;

registration
let C be set ;
let D be non empty complex-membered set ;
let f be Function of C,D;
cluster |.f.| -> total for PartFunc of C,REAL;
coherence
for b1 being PartFunc of C,REAL st b1 = |.f.| holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty rational-membered set ;
let f be Function of C,D;
cluster |.f.| -> total for PartFunc of C,RAT;
coherence
for b1 being PartFunc of C,RAT st b1 = |.f.| holds
b1 is total
proof end;
end;

registration
let C be set ;
let D be non empty integer-membered set ;
let f be Function of C,D;
cluster |.f.| -> total for PartFunc of C,NAT;
coherence
for b1 being PartFunc of C,NAT st b1 = |.f.| holds
b1 is total
proof end;
end;

registration
let f be complex-valued FinSequence;
cluster |.f.| -> real-valued FinSequence-like ;
coherence
|.f.| is FinSequence-like
proof end;
end;

theorem :: VALUED_1:19
for f, g being FinSequence
for h being Function st dom h = (dom f) /\ (dom g) holds
h is FinSequence by Lm2;

begin

definition
let p be Function;
let k be Nat;
func Shift (p,k) -> Function means :Def12: :: VALUED_1:def 12
( dom it = { (m + k) where m is Element of NAT : m in dom p } & ( for m being Element of NAT st m in dom p holds
it . (m + k) = p . m ) );
existence
ex b1 being Function st
( dom b1 = { (m + k) where m is Element of NAT : m in dom p } & ( for m being Element of NAT st m in dom p holds
b1 . (m + k) = p . m ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = { (m + k) where m is Element of NAT : m in dom p } & ( for m being Element of NAT st m in dom p holds
b1 . (m + k) = p . m ) & dom b2 = { (m + k) where m is Element of NAT : m in dom p } & ( for m being Element of NAT st m in dom p holds
b2 . (m + k) = p . m ) holds
b1 = b2
proof end;
end;

:: deftheorem Def12 defines Shift VALUED_1:def 12 :
for p being Function
for k being Nat
for b3 being Function holds
( b3 = Shift (p,k) iff ( dom b3 = { (m + k) where m is Element of NAT : m in dom p } & ( for m being Element of NAT st m in dom p holds
b3 . (m + k) = p . m ) ) );

registration
let p be Function;
let k be Nat;
cluster Shift (p,k) -> NAT -defined ;
coherence
Shift (p,k) is NAT -defined
proof end;
end;

theorem :: VALUED_1:20
for P, Q being Function
for k being Nat st P c= Q holds
Shift (P,k) c= Shift (Q,k)
proof end;

theorem :: VALUED_1:21
for n, m being Nat
for I being Function holds Shift ((Shift (I,m)),n) = Shift (I,(m + n))
proof end;

theorem :: VALUED_1:22
for s, f being Function
for n being Nat holds Shift ((f * s),n) = f * (Shift (s,n))
proof end;

theorem :: VALUED_1:23
for I, J being Function
for n being Nat holds Shift ((I +* J),n) = (Shift (I,n)) +* (Shift (J,n))
proof end;

:: from SCMPDS_4, 2008.03.16, A.T.
theorem Th24: :: VALUED_1:24
for p being Function
for k, il being Nat st il in dom p holds
il + k in dom (Shift (p,k))
proof end;

:: missing, 2008.03.16, A.T.
theorem Th25: :: VALUED_1:25
for p being Function
for k being Nat holds rng (Shift (p,k)) c= rng p
proof end;

theorem :: VALUED_1:26
for p being Function st dom p c= NAT holds
for k being Nat holds rng (Shift (p,k)) = rng p
proof end;

registration
let p be finite Function;
let k be Nat;
cluster Shift (p,k) -> finite ;
coherence
Shift (p,k) is finite
proof end;
end;

definition
let X be non empty ext-real-membered set ;
let s be sequence of X;
:: original: increasing
redefine attr s is increasing means :: VALUED_1:def 13
for n being Nat holds s . n < s . (n + 1);
compatibility
( s is increasing iff for n being Nat holds s . n < s . (n + 1) )
proof end;
:: original: decreasing
redefine attr s is decreasing means :: VALUED_1:def 14
for n being Nat holds s . n > s . (n + 1);
compatibility
( s is decreasing iff for n being Nat holds s . n > s . (n + 1) )
proof end;
:: original: non-decreasing
redefine attr s is non-decreasing means :: VALUED_1:def 15
for n being Nat holds s . n <= s . (n + 1);
compatibility
( s is non-decreasing iff for n being Nat holds s . n <= s . (n + 1) )
proof end;
:: original: non-increasing
redefine attr s is non-increasing means :: VALUED_1:def 16
for n being Nat holds s . n >= s . (n + 1);
compatibility
( s is non-increasing iff for n being Nat holds s . n >= s . (n + 1) )
proof end;
end;

:: deftheorem defines increasing VALUED_1:def 13 :
for X being non empty ext-real-membered set
for s being sequence of X holds
( s is increasing iff for n being Nat holds s . n < s . (n + 1) );

:: deftheorem defines decreasing VALUED_1:def 14 :
for X being non empty ext-real-membered set
for s being sequence of X holds
( s is decreasing iff for n being Nat holds s . n > s . (n + 1) );

:: deftheorem defines non-decreasing VALUED_1:def 15 :
for X being non empty ext-real-membered set
for s being sequence of X holds
( s is non-decreasing iff for n being Nat holds s . n <= s . (n + 1) );

:: deftheorem defines non-increasing VALUED_1:def 16 :
for X being non empty ext-real-membered set
for s being sequence of X holds
( s is non-increasing iff for n being Nat holds s . n >= s . (n + 1) );

:: from KURATO_2, 2008.09.05, A.T.
scheme :: VALUED_1:sch 1
SubSeqChoice{ F1() -> non empty set , F2() -> sequence of F1(), P1[ set ] } :
ex S1 being subsequence of F2() st
for n being Element of NAT holds P1[S1 . n]
provided
A1: for n being Element of NAT ex m being Element of NAT st
( n <= m & P1[F2() . m] )
proof end;

:: from AMISTD_2, 2010.02.05, A.T.
theorem :: VALUED_1:27
for k being Nat
for F being NAT -defined Function holds dom F, dom (Shift (F,k)) are_equipotent
proof end;

registration
let F be NAT -defined Function;
reduce Shift (F,0) to F;
reducibility
Shift (F,0) = F
proof end;
end;

theorem :: VALUED_1:28
for F being NAT -defined Function holds Shift (F,0) = F ;

registration
let X be non empty set ;
let F be X -valued Function;
let k be Nat;
cluster Shift (F,k) -> X -valued ;
coherence
Shift (F,k) is X -valued
proof end;
end;

registration
cluster Relation-like NAT -defined Function-like non empty for set ;
existence
ex b1 being Function st
( not b1 is empty & b1 is NAT -defined )
proof end;
end;

registration
let F be empty Function;
let k be Nat;
cluster Shift (F,k) -> empty ;
coherence
Shift (F,k) is empty
proof end;
end;

registration
let F be NAT -defined non empty Function;
let k be Nat;
cluster Shift (F,k) -> non empty ;
coherence
not Shift (F,k) is empty
proof end;
end;

theorem :: VALUED_1:29
for F being Function
for k being Nat st k > 0 holds
not 0 in dom (Shift (F,k))
proof end;

registration
cluster Relation-like NAT -defined Function-like non empty finite for set ;
existence
ex b1 being Function st
( b1 is NAT -defined & b1 is finite & not b1 is empty )
proof end;
end;

registration
let F be NAT -defined Relation;
cluster dom F -> natural-membered ;
coherence
dom F is natural-membered
;
end;

definition
let F be NAT -defined non empty finite Function;
func LastLoc F -> Element of NAT equals :: VALUED_1:def 17
max (dom F);
coherence
max (dom F) is Element of NAT
by ORDINAL1:def 12;
end;

:: deftheorem defines LastLoc VALUED_1:def 17 :
for F being NAT -defined non empty finite Function holds LastLoc F = max (dom F);

definition
let F be NAT -defined non empty finite Function;
func CutLastLoc F -> Function equals :: VALUED_1:def 18
F \ ((LastLoc F) .--> (F . (LastLoc F)));
coherence
F \ ((LastLoc F) .--> (F . (LastLoc F))) is Function
;
end;

:: deftheorem defines CutLastLoc VALUED_1:def 18 :
for F being NAT -defined non empty finite Function holds CutLastLoc F = F \ ((LastLoc F) .--> (F . (LastLoc F)));

registration
let F be NAT -defined non empty finite Function;
cluster CutLastLoc F -> NAT -defined finite ;
coherence
( CutLastLoc F is NAT -defined & CutLastLoc F is finite )
;
end;

theorem Th30: :: VALUED_1:30
for F being NAT -defined non empty finite Function holds LastLoc F in dom F by XXREAL_2:def 8;

theorem :: VALUED_1:31
for F, G being NAT -defined non empty finite Function st F c= G holds
LastLoc F <= LastLoc G by RELAT_1:11, XXREAL_2:59;

theorem :: VALUED_1:32
for F being NAT -defined non empty finite Function
for l being Element of NAT st l in dom F holds
l <= LastLoc F by XXREAL_2:def 8;

definition
let F be NAT -defined non empty Function;
func FirstLoc F -> Element of NAT equals :: VALUED_1:def 19
min (dom F);
coherence
min (dom F) is Element of NAT
by ORDINAL1:def 12;
end;

:: deftheorem defines FirstLoc VALUED_1:def 19 :
for F being NAT -defined non empty Function holds FirstLoc F = min (dom F);

theorem :: VALUED_1:33
for F being NAT -defined non empty finite Function holds FirstLoc F in dom F by XXREAL_2:def 7;

theorem :: VALUED_1:34
for F, G being NAT -defined non empty finite Function st F c= G holds
FirstLoc G <= FirstLoc F by RELAT_1:11, XXREAL_2:60;

theorem :: VALUED_1:35
for l1 being Element of NAT
for F being NAT -defined non empty finite Function st l1 in dom F holds
FirstLoc F <= l1 by XXREAL_2:def 7;

theorem Th36: :: VALUED_1:36
for F being NAT -defined non empty finite Function holds dom (CutLastLoc F) = (dom F) \ {(LastLoc F)}
proof end;

theorem :: VALUED_1:37
for F being NAT -defined non empty finite Function holds dom F = (dom (CutLastLoc F)) \/ {(LastLoc F)}
proof end;

registration
cluster Relation-like NAT -defined Function-like finite 1 -element for set ;
existence
ex b1 being Function st
( b1 is 1 -element & b1 is NAT -defined & b1 is finite )
proof end;
end;

registration
let F be NAT -defined finite 1 -element Function;
cluster CutLastLoc F -> empty ;
coherence
CutLastLoc F is empty
proof end;
end;

theorem :: VALUED_1:38
for F being NAT -defined non empty finite Function holds card (CutLastLoc F) = (card F) - 1
proof end;

begin

registration
let X be set ;
let f be X -defined complex-valued Function;
cluster - f -> X -defined complex-valued ;
coherence
- f is X -defined
proof end;
cluster f " -> X -defined complex-valued ;
coherence
f " is X -defined
proof end;
cluster f ^2 -> X -defined ;
coherence
f ^2 is X -defined
proof end;
cluster |.f.| -> X -defined real-valued ;
coherence
|.f.| is X -defined
proof end;
end;

registration
let X be set ;
cluster Relation-like X -defined RAT -valued Function-like total complex-valued ext-real-valued real-valued natural-valued for set ;
existence
ex b1 being X -defined natural-valued Function st b1 is total
proof end;
end;

registration
let X be set ;
let f be X -defined total complex-valued Function;
cluster - f -> total complex-valued ;
coherence
- f is total
proof end;
cluster f " -> total complex-valued ;
coherence
f " is total
proof end;
cluster f ^2 -> total ;
coherence
f ^2 is total
proof end;
cluster |.f.| -> total real-valued ;
coherence
|.f.| is total
proof end;
end;

registration
let X be set ;
let f be X -defined complex-valued Function;
let r be complex number ;
cluster r + f -> X -defined ;
coherence
r + f is X -defined
proof end;
cluster f - r -> X -defined ;
coherence
f - r is X -defined
;
cluster r (#) f -> X -defined ;
coherence
r (#) f is X -defined
proof end;
end;

registration
let X be set ;
let f be X -defined total complex-valued Function;
let r be complex number ;
cluster r + f -> total ;
coherence
r + f is total
proof end;
cluster f - r -> total ;
coherence
f - r is total
;
cluster r (#) f -> total ;
coherence
r (#) f is total
proof end;
end;

registration
let X be set ;
let f1 be complex-valued Function;
let f2 be X -defined complex-valued Function;
cluster f1 + f2 -> X -defined ;
coherence
f1 + f2 is X -defined
proof end;
cluster f1 - f2 -> X -defined ;
coherence
f1 - f2 is X -defined
;
cluster f1 (#) f2 -> X -defined ;
coherence
f1 (#) f2 is X -defined
proof end;
cluster f1 /" f2 -> X -defined ;
coherence
f1 /" f2 is X -defined
;
end;

registration
let X be set ;
let f1, f2 be X -defined total complex-valued Function;
cluster f1 + f2 -> total ;
coherence
f1 + f2 is total
proof end;
cluster f1 - f2 -> total ;
coherence
f1 - f2 is total
;
cluster f1 (#) f2 -> total ;
coherence
f1 (#) f2 is total
proof end;
cluster f1 /" f2 -> total ;
coherence
f1 /" f2 is total
;
end;

registration
let X be non empty set ;
let F be NAT -defined X -valued non empty finite Function;
cluster CutLastLoc F -> X -valued ;
coherence
CutLastLoc F is X -valued
;
end;

theorem :: VALUED_1:39
for f being Function
for i, n being Nat st i in dom (Shift (f,n)) holds
ex j being Nat st
( j in dom f & i = j + n )
proof end;