:: by Marco B. Caminati

::

:: Received December 29, 2010

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

begin

definition

let X be set ;

let f be Function;

end;
let f be Function;

::################### Preliminary Definitions #########################

::#######################################################################

::#######################################################################

:: deftheorem DefInj1 defines -one-to-one FOMODEL0:def 1 :

for X being set

for f being Function holds

( f is X -one-to-one iff f | X is one-to-one );

for X being set

for f being Function holds

( f is X -one-to-one iff f | X is one-to-one );

:: deftheorem DefUnambiguous1 defines -unambiguous FOMODEL0:def 2 :

for D being non empty set

for f being BinOp of D

for X being set holds

( X is f -unambiguous iff f is [:X,D:] -one-to-one );

for D being non empty set

for f being BinOp of D

for X being set holds

( X is f -unambiguous iff f is [:X,D:] -one-to-one );

:: deftheorem DefPrefix defines -prefix FOMODEL0:def 3 :

for D being non empty set

for X being set holds

( X is D -prefix iff X is D -concatenation -unambiguous );

for D being non empty set

for X being set holds

( X is D -prefix iff X is D -concatenation -unambiguous );

Lm45: for Y being set

for g being Function st g is Y -valued & g is FinSequence-like holds

g is FinSequence of Y

proof end;

Lm28: for Y, A, B being set st Y c= Funcs (A,B) holds

union Y c= [:A,B:]

proof end;

LmOneOne: for X being set

for f being Function holds

( f is X -one-to-one iff for x, y being set st x in (dom f) /\ X & y in (dom f) /\ X & f . x = f . y holds

x = y )

proof end;

Lm12: for D being non empty set

for A, B being set

for f being BinOp of D st A c= B & f is B -one-to-one holds

f is A -one-to-one

proof end;

Lm18: for A, B being set

for m, n being Nat st m -tuples_on A meets n -tuples_on B holds

m = n

proof end;

Lm21: for i being Nat

for Y being set holds i -tuples_on Y = Funcs ((Seg i),Y)

proof end;

Lm11: for A, B being set

for m being Nat holds (m -tuples_on A) /\ (B *) c= m -tuples_on B

proof end;

theorem Lm22: :: FOMODEL0:1

for A, B being set

for m being Nat holds (m -tuples_on A) /\ (B *) = (m -tuples_on A) /\ (m -tuples_on B)

for m being Nat holds (m -tuples_on A) /\ (B *) = (m -tuples_on A) /\ (m -tuples_on B)

proof end;

Lm20: for A, B, C being set holds (Funcs (A,B)) /\ (Funcs (A,C)) = Funcs (A,(B /\ C))

proof end;

theorem Lm24: :: FOMODEL0:3

for A, B being set

for m being Nat holds m -tuples_on (A /\ B) = (m -tuples_on A) /\ (m -tuples_on B)

for m being Nat holds m -tuples_on (A /\ B) = (m -tuples_on A) /\ (m -tuples_on B)

proof end;

ThConcatenation: for D being non empty set

for x, y being FinSequence of D holds (D -concatenation) . (x,y) = x ^ y

proof end;

theorem Th4: :: FOMODEL0:4

for U being non empty set

for x, y being FinSequence st x is U -valued & y is U -valued holds

(U -concatenation) . (x,y) = x ^ y

for x, y being FinSequence st x is U -valued & y is U -valued holds

(U -concatenation) . (x,y) = x ^ y

proof end;

theorem Lm2: :: FOMODEL0:5

for D being non empty set

for x being set holds

( x is non empty FinSequence of D iff x in (D *) \ {{}} )

for x being set holds

( x is non empty FinSequence of D iff x in (D *) \ {{}} )

proof end;

Lm13: for D being non empty set

for B, A being set

for f being BinOp of D st B is f -unambiguous & A c= B holds

A is f -unambiguous

proof end;

Lm14: for D being non empty set

for f being BinOp of D holds {} is f -unambiguous

proof end;

Lm27: for f, g being FinSequence holds dom <:f,g:> = Seg (min ((len f),(len g)))

proof end;

::##################### Preliminary lemmas ############################

::############################## END ##################################

::############################ Type tuning ############################

::#######################################################################

::############################## END ##################################

::############################ Type tuning ############################

::#######################################################################

registration

let D be non empty set ;

coherence

for b_{1} being BinOp of D st b_{1} = D -pr1 holds

b_{1} is associative

end;
coherence

for b

b

proof end;

registration

let D be set ;

ex b_{1} being BinOp of D st b_{1} is associative

end;
cluster Relation-like [:D,D:] -defined D -valued Function-like quasi_total associative for Element of bool [:[:D,D:],D:];

existence ex b

proof end;

definition

let X be set ;

let Y be Subset of X;

:: original: *

redefine func Y * -> non empty Subset of (X *);

coherence

Y * is non empty Subset of (X *) by FINSEQ_1:62;

end;
let Y be Subset of X;

:: original: *

redefine func Y * -> non empty Subset of (X *);

coherence

Y * is non empty Subset of (X *) by FINSEQ_1:62;

registration

let D be non empty set ;

coherence

for b_{1} being BinOp of (D *) st b_{1} = D -concatenation holds

b_{1} is associative
by MONOID_0:67;

end;
coherence

for b

b

registration

let D be non empty set ;

let m be Nat;

ex b_{1} being Element of D * st b_{1} is m -element

end;
let m be Nat;

cluster Relation-like NAT -defined D -valued Function-like finite m -element FinSequence-like FinSubsequence-like countable finite-support for Element of D * ;

existence ex b

proof end;

definition

let X be set ;

let f be Function;

( f is X -one-to-one iff for x, y being set st x in X /\ (dom f) & y in X /\ (dom f) & f . x = f . y holds

x = y ) by LmOneOne;

end;
let f be Function;

redefine attr f is X -one-to-one means :DefInj2: :: FOMODEL0:def 5

for x, y being set st x in X /\ (dom f) & y in X /\ (dom f) & f . x = f . y holds

x = y;

compatibility for x, y being set st x in X /\ (dom f) & y in X /\ (dom f) & f . x = f . y holds

x = y;

( f is X -one-to-one iff for x, y being set st x in X /\ (dom f) & y in X /\ (dom f) & f . x = f . y holds

x = y ) by LmOneOne;

:: deftheorem DefInj2 defines -one-to-one FOMODEL0:def 5 :

for X being set

for f being Function holds

( f is X -one-to-one iff for x, y being set st x in X /\ (dom f) & y in X /\ (dom f) & f . x = f . y holds

x = y );

for X being set

for f being Function holds

( f is X -one-to-one iff for x, y being set st x in X /\ (dom f) & y in X /\ (dom f) & f . x = f . y holds

x = y );

registration

let D be non empty set ;

let f be BinOp of D;

existence

ex b_{1} being set st b_{1} is f -unambiguous

end;
let f be BinOp of D;

existence

ex b

proof end;

registration
end;

registration

coherence

for b_{1} being set st b_{1} is empty holds

b_{1} is empty-membered
;

let e be empty set ;

coherence

{e} is empty-membered

end;
for b

b

let e be empty set ;

coherence

{e} is empty-membered

proof end;

registration

let U be non empty set ;

let m1 be non zero Nat;

coherence

m1 -tuples_on U is with_non-empty_elements

end;
let m1 be non zero Nat;

coherence

m1 -tuples_on U is with_non-empty_elements

proof end;

registration

let X be empty-membered set ;

coherence

for b_{1} being Subset of X holds b_{1} is empty-membered

end;
coherence

for b

proof end;

registration

let A be set ;

let m0 be zero number ;

coherence

for b_{1} being set st b_{1} = m0 -tuples_on A holds

b_{1} is empty-membered
by COMPUT_1:5;

end;
let m0 be zero number ;

coherence

for b

b

registration
end;

registration

let D be non empty set ;

let f be BinOp of D;

let e be empty set ;

coherence

e /\ f is f -unambiguous by Lm14;

end;
let f be BinOp of D;

let e be empty set ;

coherence

e /\ f is f -unambiguous by Lm14;

registration
end;

registration
end;

::############################ Type tuning ############################

::############################## END ##################################

::########################### MultPlace ###############################

::#######################################################################

::############################## END ##################################

::########################### MultPlace ###############################

::#######################################################################

definition

let D be non empty set ;

let f be BinOp of D;

let x be FinSequence of D;

ex b_{1} being Function st

( dom b_{1} = NAT & b_{1} . 0 = x . 1 & ( for n being Nat holds b_{1} . (n + 1) = f . ((b_{1} . n),(x . (n + 2))) ) )

for b_{1}, b_{2} being Function st dom b_{1} = NAT & b_{1} . 0 = x . 1 & ( for n being Nat holds b_{1} . (n + 1) = f . ((b_{1} . n),(x . (n + 2))) ) & dom b_{2} = NAT & b_{2} . 0 = x . 1 & ( for n being Nat holds b_{2} . (n + 1) = f . ((b_{2} . n),(x . (n + 2))) ) holds

b_{1} = b_{2}

end;
let f be BinOp of D;

let x be FinSequence of D;

func MultPlace (f,x) -> Function means :DefMultPlace: :: FOMODEL0:def 6

( dom it = NAT & it . 0 = x . 1 & ( for n being Nat holds it . (n + 1) = f . ((it . n),(x . (n + 2))) ) );

existence ( dom it = NAT & it . 0 = x . 1 & ( for n being Nat holds it . (n + 1) = f . ((it . n),(x . (n + 2))) ) );

ex b

( dom b

proof end;

uniqueness for b

b

proof end;

:: deftheorem DefMultPlace defines MultPlace FOMODEL0:def 6 :

for D being non empty set

for f being BinOp of D

for x being FinSequence of D

for b_{4} being Function holds

( b_{4} = MultPlace (f,x) iff ( dom b_{4} = NAT & b_{4} . 0 = x . 1 & ( for n being Nat holds b_{4} . (n + 1) = f . ((b_{4} . n),(x . (n + 2))) ) ) );

for D being non empty set

for f being BinOp of D

for x being FinSequence of D

for b

( b

Lm1: for D being non empty set

for f being BinOp of D

for x being FinSequence of D

for m being Nat holds

( ( m + 1 <= len x implies (MultPlace (f,x)) . m in D ) & ( for n being Nat st n >= m + 1 holds

(MultPlace (f,(x | n))) . m = (MultPlace (f,x)) . m ) )

proof end;

definition

let D be non empty set ;

let f be BinOp of D;

let x be Element of (D *) \ {{}};

coherence

MultPlace (f,x) is Function ;

end;
let f be BinOp of D;

let x be Element of (D *) \ {{}};

coherence

MultPlace (f,x) is Function ;

:: deftheorem defines MultPlace FOMODEL0:def 7 :

for D being non empty set

for f being BinOp of D

for x being Element of (D *) \ {{}} holds MultPlace (f,x) = MultPlace (f,x);

for D being non empty set

for f being BinOp of D

for x being Element of (D *) \ {{}} holds MultPlace (f,x) = MultPlace (f,x);

definition

let D be non empty set ;

let f be BinOp of D;

ex b_{1} being Function of ((D *) \ {{}}),D st

for x being Element of (D *) \ {{}} holds b_{1} . x = (MultPlace (f,x)) . ((len x) - 1)

for b_{1}, b_{2} being Function of ((D *) \ {{}}),D st ( for x being Element of (D *) \ {{}} holds b_{1} . x = (MultPlace (f,x)) . ((len x) - 1) ) & ( for x being Element of (D *) \ {{}} holds b_{2} . x = (MultPlace (f,x)) . ((len x) - 1) ) holds

b_{1} = b_{2}

end;
let f be BinOp of D;

::# MultPlace is an operator which transforms a BinOp f into a function

::# operating # on an arbitrary (positive and natural) number of arguments by

::# recursively # associating f on the left # Too late I realized something

::# similar (yielding a functor rather than # a function, though) was

::# introduced in FINSOP_1

::# operating # on an arbitrary (positive and natural) number of arguments by

::# recursively # associating f on the left # Too late I realized something

::# similar (yielding a functor rather than # a function, though) was

::# introduced in FINSOP_1

func MultPlace f -> Function of ((D *) \ {{}}),D means :DefMultPlace2: :: FOMODEL0:def 8

for x being Element of (D *) \ {{}} holds it . x = (MultPlace (f,x)) . ((len x) - 1);

existence for x being Element of (D *) \ {{}} holds it . x = (MultPlace (f,x)) . ((len x) - 1);

ex b

for x being Element of (D *) \ {{}} holds b

proof end;

uniqueness for b

b

proof end;

:: deftheorem DefMultPlace2 defines MultPlace FOMODEL0:def 8 :

for D being non empty set

for f being BinOp of D

for b_{3} being Function of ((D *) \ {{}}),D holds

( b_{3} = MultPlace f iff for x being Element of (D *) \ {{}} holds b_{3} . x = (MultPlace (f,x)) . ((len x) - 1) );

for D being non empty set

for f being BinOp of D

for b

( b

LmMultPlace: for D being non empty set

for f being BinOp of D

for x being non empty FinSequence of D

for y being Element of D holds

( (MultPlace f) . <*y*> = y & (MultPlace f) . (x ^ <*y*>) = f . (((MultPlace f) . x),y) )

proof end;

Lm3: for D being non empty set

for f being BinOp of D

for X being set holds

( f is [:X,D:] -one-to-one iff for x, y, d1, d2 being set st x in X /\ D & y in X /\ D & d1 in D & d2 in D & f . (x,d1) = f . (y,d2) holds

( x = y & d1 = d2 ) )

proof end;

definition

let D be non empty set ;

let f be BinOp of D;

let X be set ;

( X is f -unambiguous iff for x, y, d1, d2 being set st x in X /\ D & y in X /\ D & d1 in D & d2 in D & f . (x,d1) = f . (y,d2) holds

( x = y & d1 = d2 ) )

end;
let f be BinOp of D;

let X be set ;

redefine attr X is f -unambiguous means :DefUnambiguous2: :: FOMODEL0:def 9

for x, y, d1, d2 being set st x in X /\ D & y in X /\ D & d1 in D & d2 in D & f . (x,d1) = f . (y,d2) holds

( x = y & d1 = d2 );

compatibility for x, y, d1, d2 being set st x in X /\ D & y in X /\ D & d1 in D & d2 in D & f . (x,d1) = f . (y,d2) holds

( x = y & d1 = d2 );

( X is f -unambiguous iff for x, y, d1, d2 being set st x in X /\ D & y in X /\ D & d1 in D & d2 in D & f . (x,d1) = f . (y,d2) holds

( x = y & d1 = d2 ) )

proof end;

:: deftheorem DefUnambiguous2 defines -unambiguous FOMODEL0:def 9 :

for D being non empty set

for f being BinOp of D

for X being set holds

( X is f -unambiguous iff for x, y, d1, d2 being set st x in X /\ D & y in X /\ D & d1 in D & d2 in D & f . (x,d1) = f . (y,d2) holds

( x = y & d1 = d2 ) );

for D being non empty set

for f being BinOp of D

for X being set holds

( X is f -unambiguous iff for x, y, d1, d2 being set st x in X /\ D & y in X /\ D & d1 in D & d2 in D & f . (x,d1) = f . (y,d2) holds

( x = y & d1 = d2 ) );

Lm19: for D being non empty set

for f being BinOp of D st f is associative holds

for d being Element of D

for m being Nat

for x being Element of (m + 1) -tuples_on D holds (MultPlace f) . (<*d*> ^ x) = f . (d,((MultPlace f) . x))

proof end;

Lm5: for D being non empty set

for X being non empty Subset of D

for f being BinOp of D

for m being Nat st f is associative & X is f -unambiguous holds

(MultPlace f) .: ((m + 1) -tuples_on X) is f -unambiguous

proof end;

Lm15: for D being non empty set

for Y being set

for f being BinOp of D

for m being Nat st f is associative & Y is f -unambiguous holds

(MultPlace f) .: ((m + 1) -tuples_on Y) is f -unambiguous

proof end;

Lm17: for D being non empty set

for X being non empty Subset of D

for f being BinOp of D

for m being Nat st f is associative & X is f -unambiguous holds

MultPlace f is (m + 1) -tuples_on X -one-to-one

proof end;

Lm26: for D being non empty set

for Y being set

for f being BinOp of D

for m being Nat st f is associative & Y is f -unambiguous holds

MultPlace f is (m + 1) -tuples_on Y -one-to-one

proof end;

::########################### MultPlace ###############################

::############################## END ##################################

::########################### FirstChar ###############################

::#######################################################################

::############################## END ##################################

::########################### FirstChar ###############################

::#######################################################################

definition

let D be non empty set ;

MultPlace (D -pr1) is Function of ((D *) \ {{}}),D ;

end;
::# A function-like extracting the first item of a non empty FinSequence of D

coherence MultPlace (D -pr1) is Function of ((D *) \ {{}}),D ;

:: deftheorem defines -firstChar FOMODEL0:def 10 :

for D being non empty set holds D -firstChar = MultPlace (D -pr1);

for D being non empty set holds D -firstChar = MultPlace (D -pr1);

Th2: for D being non empty set

for w being non empty FinSequence of D holds (D -firstChar) . w = w . 1

proof end;

theorem :: FOMODEL0:6

for U being non empty set

for p being FinSequence st p is U -valued & not p is empty holds

(U -firstChar) . p = p . 1

for p being FinSequence st p is U -valued & not p is empty holds

(U -firstChar) . p = p . 1

proof end;

::########################### FirstChar ###############################

::############################## END ##################################

::########################### MultiCat #################################

::######################################################################

::#When f is concatenation of strings, MultPlace(f) can be extended to the

::#empty finsequence of strings in the immediate way, obtaining the multiCat

::#function, which chains an arbitrary (natural) number of strings

::############################## END ##################################

::########################### MultiCat #################################

::######################################################################

::#When f is concatenation of strings, MultPlace(f) can be extended to the

::#empty finsequence of strings in the immediate way, obtaining the multiCat

::#function, which chains an arbitrary (natural) number of strings

definition

let D be non empty set ;

({} .--> {}) +* (MultPlace (D -concatenation)) is Function ;

end;
func D -multiCat -> Function equals :: FOMODEL0:def 11

({} .--> {}) +* (MultPlace (D -concatenation));

coherence ({} .--> {}) +* (MultPlace (D -concatenation));

({} .--> {}) +* (MultPlace (D -concatenation)) is Function ;

:: deftheorem defines -multiCat FOMODEL0:def 11 :

for D being non empty set holds D -multiCat = ({} .--> {}) +* (MultPlace (D -concatenation));

for D being non empty set holds D -multiCat = ({} .--> {}) +* (MultPlace (D -concatenation));

definition

let D be non empty set ;

:: original: -multiCat

redefine func D -multiCat -> Function of ((D *) *),(D *);

coherence

D -multiCat is Function of ((D *) *),(D *)

end;
:: original: -multiCat

redefine func D -multiCat -> Function of ((D *) *),(D *);

coherence

D -multiCat is Function of ((D *) *),(D *)

proof end;

Lm6: for D being non empty set holds (D -multiCat) | (((D *) *) \ {{}}) = MultPlace (D -concatenation)

proof end;

Lm16: for D being non empty set

for Y being set holds (D -multiCat) | (Y \ {{}}) = (MultPlace (D -concatenation)) | Y

proof end;

Lm9: for D being non empty set holds {} .--> {} tolerates MultPlace (D -concatenation)

proof end;

registration

let D be non empty set ;

let e be empty set ;

coherence

for b_{1} being set st b_{1} = (D -multiCat) . e holds

b_{1} is empty

end;
let e be empty set ;

coherence

for b

b

proof end;

Lm59: for D being non empty set

for B, A being set st B is D -prefix & A c= B holds

A is D -prefix

proof end;

registration

let D be non empty set ;

coherence

for b_{1} being Subset of (1 -tuples_on D) holds b_{1} is D -prefix

end;
coherence

for b

proof end;

theorem Lm25: :: FOMODEL0:7

for D being non empty set

for A being set

for m being Nat st A is D -prefix holds

(D -multiCat) .: (m -tuples_on A) is D -prefix

for A being set

for m being Nat st A is D -prefix holds

(D -multiCat) .: (m -tuples_on A) is D -prefix

proof end;

theorem :: FOMODEL0:8

for D being non empty set

for A being set

for m being Nat st A is D -prefix holds

D -multiCat is m -tuples_on A -one-to-one

for A being set

for m being Nat st A is D -prefix holds

D -multiCat is m -tuples_on A -one-to-one

proof end;

theorem :: FOMODEL0:10

theorem :: FOMODEL0:11

::#extending FUNCT_2:111

definition

let A, X be set ;

:: original: chi

redefine func chi (A,X) -> Function of X,BOOLEAN;

coherence

chi (A,X) is Function of X,BOOLEAN

end;
:: original: chi

redefine func chi (A,X) -> Function of X,BOOLEAN;

coherence

chi (A,X) is Function of X,BOOLEAN

proof end;

theorem :: FOMODEL0:13

theorem Th14: :: FOMODEL0:14

for D being non empty set

for d being non empty Element of (D *) * holds (D -multiCat) . d = (MultPlace (D -concatenation)) . d

for d being non empty Element of (D *) * holds (D -multiCat) . d = (MultPlace (D -concatenation)) . d

proof end;

registration
end;

registration

let X, Y be set ;

let f be X -defined Function;

let g be Y -defined Function;

coherence

for b_{1} being Function st b_{1} = <:f,g:> holds

b_{1} is X /\ Y -defined

end;
let f be X -defined Function;

let g be Y -defined Function;

coherence

for b

b

proof end;

registration

let X be set ;

let f, g be X -defined Function;

coherence

for b_{1} being Function st b_{1} = <:f,g:> holds

b_{1} is X -defined
;

end;
let f, g be X -defined Function;

coherence

for b

b

registration

let X, Y be set ;

let f be X -defined total Function;

let g be Y -defined total Function;

coherence

for b_{1} being X /\ Y -defined Function st b_{1} = <:f,g:> holds

b_{1} is total

end;
let f be X -defined total Function;

let g be Y -defined total Function;

coherence

for b

b

proof end;

registration

let X be set ;

let f, g be X -defined total Function;

coherence

for b_{1} being X -defined Function st b_{1} = <:f,g:> holds

b_{1} is total
;

end;
let f, g be X -defined total Function;

coherence

for b

b

registration

let X, Y be set ;

let f be X -valued Function;

let g be Y -valued Function;

coherence

for b_{1} being Function st b_{1} = <:f,g:> holds

b_{1} is [:X,Y:] -valued

end;
let f be X -valued Function;

let g be Y -valued Function;

coherence

for b

b

proof end;

registration

let D be non empty set ;

ex b_{1} being FinSequence st b_{1} is D -valued

end;
cluster Relation-like NAT -defined D -valued Function-like finite FinSequence-like FinSubsequence-like countable finite-support for set ;

existence ex b

proof end;

registration

let D be non empty set ;

let m be Nat;

ex b_{1} being D -valued FinSequence st b_{1} is m -element

end;
let m be Nat;

cluster Relation-like NAT -defined D -valued Function-like finite m -element FinSequence-like FinSubsequence-like countable finite-support for set ;

existence ex b

proof end;

registration

let X, Y be non empty set ;

let f be Function of X,Y;

let p be X -valued FinSequence;

coherence

f * p is FinSequence-like

end;
let f be Function of X,Y;

let p be X -valued FinSequence;

coherence

f * p is FinSequence-like

proof end;

registration

let X, Y be non empty set ;

let m be Nat;

let f be Function of X,Y;

let p be X -valued m -element FinSequence;

coherence

f * p is m -element

end;
let m be Nat;

let f be Function of X,Y;

let p be X -valued m -element FinSequence;

coherence

f * p is m -element

proof end;

definition

let D be non empty set ;

let f be BinOp of D;

let p, q be Element of D * ;

coherence

f * <:p,q:> is FinSequence of D

end;
let f be BinOp of D;

let p, q be Element of D * ;

coherence

f * <:p,q:> is FinSequence of D

proof end;

:: deftheorem defines AppliedPairwiseTo FOMODEL0:def 12 :

for D being non empty set

for f being BinOp of D

for p, q being Element of D * holds f AppliedPairwiseTo (p,q) = f * <:p,q:>;

for D being non empty set

for f being BinOp of D

for p, q being Element of D * holds f AppliedPairwiseTo (p,q) = f * <:p,q:>;

registration

let D be non empty set ;

let f be BinOp of D;

let m be Nat;

let p, q be m -element Element of D * ;

coherence

f AppliedPairwiseTo (p,q) is m -element ;

end;
let f be BinOp of D;

let m be Nat;

let p, q be m -element Element of D * ;

coherence

f AppliedPairwiseTo (p,q) is m -element ;

notation

let D be non empty set ;

let f be BinOp of D;

let p, q be Element of D * ;

synonym f _\ (p,q) for f AppliedPairwiseTo (p,q);

end;
let f be BinOp of D;

let p, q be Element of D * ;

synonym f _\ (p,q) for f AppliedPairwiseTo (p,q);

definition

compatibility

for b_{1} being set holds

( b_{1} = INT iff b_{1} = NAT \/ ([:{0},NAT:] \ {[0,0]}) )

end;
for b

( b

proof end;

theorem Th16: :: FOMODEL0:16

for Y being set

for m being Nat

for p being FinSequence st p is Y -valued & p is m -element holds

p in m -tuples_on Y

for m being Nat

for p being FinSequence st p is Y -valued & p is m -element holds

p in m -tuples_on Y

proof end;

::##############################Automatizations###############################

::############################################################################

::#To automatize things like A/\B c= A

::############################################################################

::#To automatize things like A/\B c= A

definition

let A, B be set ;

A /\ B is Subset of A by XBOOLE_1:17;

coherence

A /\ B is Subset of B by XBOOLE_1:17;

end;
::##############################Automatizations###############################

::############################################################################

::#To automatize things like A/\B c= A

coherence ::############################################################################

::#To automatize things like A/\B c= A

A /\ B is Subset of A by XBOOLE_1:17;

coherence

A /\ B is Subset of B by XBOOLE_1:17;

registration

let A, B be set ;

compatibility

A /\ B = A typed/\ B ;

compatibility

A typed/\ B = A /\ B ;

compatibility

A /\ B = A /\typed B ;

compatibility

A /\typed B = A /\ B ;

end;
compatibility

A /\ B = A typed/\ B ;

compatibility

A typed/\ B = A /\ B ;

compatibility

A /\ B = A /\typed B ;

compatibility

A /\typed B = A /\ B ;

definition
end;

registration

let A be set ;

let B be Subset of A;

compatibility

A /\ B = B null A by XBOOLE_1:28;

compatibility

B null A = A /\ B ;

end;
let B be Subset of A;

compatibility

A /\ B = B null A by XBOOLE_1:28;

compatibility

B null A = A /\ B ;

registration

let A, B, C be set ;

coherence

for b_{1} being set st b_{1} = (B \ A) /\ (A /\ C) holds

b_{1} is empty

end;
coherence

for b

b

proof end;

registration
end;

definition

let A, B be set ;

A is Subset of (A \/ B) by XBOOLE_1:7;

end;
::# to automatize like: A null B c= A\/B; then A c= A\/B; this is mainly

::# not to have to remember each time what XBOOLE_1 theorem is to be invoked,

::# as element as this file is imported via definitions directive

coherence ::# not to have to remember each time what XBOOLE_1 theorem is to be invoked,

::# as element as this file is imported via definitions directive

A is Subset of (A \/ B) by XBOOLE_1:7;

registration
end;

registration

let A be set ;

let B be Subset of A;

compatibility

A \/ B = A null B by XBOOLE_1:12;

compatibility

A null B = A \/ B ;

end;
let B be Subset of A;

compatibility

A \/ B = A null B by XBOOLE_1:12;

compatibility

A null B = A \/ B ;

Lm43: for m being Nat

for g, f being Function st f c= g holds

iter (f,m) c= iter (g,m)

proof end;

Lm31: for R being Relation holds R [*] is_transitive_in field R

proof end;

Lm32: for R being Relation holds field (R [*]) c= field R

proof end;

Lm37: for R being Relation holds R [*] is_reflexive_in field R

proof end;

Lm34: for R being Relation holds field (R [*]) = field R

proof end;

registration

let R be Relation;

coherence

for b_{1} being Relation st b_{1} = R [*] holds

b_{1} is transitive

for b_{1} being Relation st b_{1} = R [*] holds

b_{1} is reflexive

end;
coherence

for b

b

proof end;

coherence for b

b

proof end;

Lm38: for f being Function holds iter (f,0) c= f [*]

proof end;

Lm39: for m being Nat

for f being Function holds iter (f,(m + 1)) c= f [*]

proof end;

Lm40: for m being Nat

for f being Function holds iter (f,m) c= f [*]

proof end;

Lm35: for x being set

for m being Nat

for g, f being Function st rng f c= dom f & x in dom f & g . 0 = x & ( for i being Nat st i < m holds

g . (i + 1) = f . (g . i) ) holds

g . m = (iter (f,m)) . x

proof end;

definition

ex b_{1} being Function of COMPLEX,COMPLEX st

for z being complex number holds b_{1} . z = z + 1

for b_{1}, b_{2} being Function of COMPLEX,COMPLEX st ( for z being complex number holds b_{1} . z = z + 1 ) & ( for z being complex number holds b_{2} . z = z + 1 ) holds

b_{1} = b_{2}
end;

func plus -> Function of COMPLEX,COMPLEX means :DefPlus: :: FOMODEL0:def 19

for z being complex number holds it . z = z + 1;

existence for z being complex number holds it . z = z + 1;

ex b

for z being complex number holds b

proof end;

uniqueness for b

b

proof end;

:: deftheorem DefPlus defines plus FOMODEL0:def 19 :

for b_{1} being Function of COMPLEX,COMPLEX holds

( b_{1} = plus iff for z being complex number holds b_{1} . z = z + 1 );

for b

( b

Lm36: for x being set

for m being Nat

for f being Function

for p being FinSequence st rng f c= dom f & x in dom f & p . 1 = x & ( for i being Nat st i >= 1 & i < m + 1 holds

p . (i + 1) = f . (p . i) ) holds

p . (m + 1) = (iter (f,m)) . x

proof end;

Lm41: for z being set

for f being Function st z in f [*] & rng f c= dom f holds

ex n being Nat st z in iter (f,n)

proof end;

Lm42: for f being Function st rng f c= dom f holds

f [*] = union { (iter (f,mm)) where mm is Element of NAT : verum }

proof end;

theorem :: FOMODEL0:17

theorem :: FOMODEL0:18

registration
end;

registration

let D be non empty set ;

let d be Element of D;

coherence

for b_{1} being set st b_{1} = {((id D) . d)} \ {d} holds

b_{1} is empty

end;
let d be Element of D;

coherence

for b

b

proof end;

registration

let p be FinSequence;

let q be empty FinSequence;

compatibility

p ^ q = p null q by FINSEQ_1:34;

compatibility

p null q = p ^ q ;

compatibility

q ^ p = p null q by FINSEQ_1:34;

compatibility

p null q = q ^ p ;

end;
let q be empty FinSequence;

compatibility

p ^ q = p null q by FINSEQ_1:34;

compatibility

p null q = p ^ q ;

compatibility

q ^ p = p null q by FINSEQ_1:34;

compatibility

p null q = q ^ p ;

registration

let Y be set ;

let R be Y -defined Relation;

compatibility

R | Y = R null Y

R null Y = R | Y ;

end;
let R be Y -defined Relation;

compatibility

R | Y = R null Y

proof end;

compatibility R null Y = R | Y ;

theorem :: FOMODEL0:22

for D being non empty set

for m, n being Nat holds (m + n) -tuples_on D = (D -concatenation) .: [:(m -tuples_on D),(n -tuples_on D):]

for m, n being Nat holds (m + n) -tuples_on D = (D -concatenation) .: [:(m -tuples_on D),(n -tuples_on D):]

proof end;

Lm4: for A, B being set holds chi (A,B) = (B --> 0) +* ((A /\ B) --> 1)

proof end;

Lm10: for A, B being set holds chi (A,B) = ((B \ A) --> 0) +* ((A /\ B) --> 1)

proof end;

Lm29: for A, B being set holds chi (A,B) = ((B \ A) --> 0) \/ ((A /\ B) --> 1)

proof end;

theorem :: FOMODEL0:26

for Y being set

for f being Function st f is Y -valued & f is FinSequence-like holds

f is FinSequence of Y by Lm45;

for f being Function st f is Y -valued & f is FinSequence-like holds

f is FinSequence of Y by Lm45;

registration

let Y be set ;

let X be Subset of Y;

coherence

for b_{1} being Relation st b_{1} is X -valued holds

b_{1} is Y -valued

end;
let X be Subset of Y;

coherence

for b

b

proof end;

Lm46: for Y being set

for R being b

( f c= R & dom f = Y )

proof end;

Lm47: for R being Relation

for f being Function st dom f c= dom R & R c= f holds

R = f

proof end;

Lm48: for Y being set

for R, P being Relation

for Q being b

((P * Q) * (Q ~)) * R = P * R

proof end;

theorem :: FOMODEL0:27

for B, A being set

for U1, U2 being non empty set

for Q being quasi_total Relation of B,U1

for R being quasi_total Relation of B,U2

for P being Relation of A,B st ((P * Q) * (Q ~)) * R is Function-like holds

((P * Q) * (Q ~)) * R = P * R

for U1, U2 being non empty set

for Q being quasi_total Relation of B,U1

for R being quasi_total Relation of B,U2

for P being Relation of A,B st ((P * Q) * (Q ~)) * R is Function-like holds

((P * Q) * (Q ~)) * R = P * R

proof end;

registration

let U be non empty set ;

let p, q be U -valued FinSequence;

coherence

for b_{1} being FinSequence st b_{1} = p ^ q holds

b_{1} is U -valued

end;
let p, q be U -valued FinSequence;

coherence

for b

b

proof end;

definition

let U be non empty set ;

let X be set ;

( X is U -prefix iff for p1, q1, p2, q2 being U -valued FinSequence st p1 in X & p2 in X & p1 ^ q1 = p2 ^ q2 holds

( p1 = p2 & q1 = q2 ) )

end;
let X be set ;

redefine attr X is U -prefix means :: FOMODEL0:def 20

for p1, q1, p2, q2 being U -valued FinSequence st p1 in X & p2 in X & p1 ^ q1 = p2 ^ q2 holds

( p1 = p2 & q1 = q2 );

compatibility for p1, q1, p2, q2 being U -valued FinSequence st p1 in X & p2 in X & p1 ^ q1 = p2 ^ q2 holds

( p1 = p2 & q1 = q2 );

( X is U -prefix iff for p1, q1, p2, q2 being U -valued FinSequence st p1 in X & p2 in X & p1 ^ q1 = p2 ^ q2 holds

( p1 = p2 & q1 = q2 ) )

proof end;

:: deftheorem defines -prefix FOMODEL0:def 20 :

for U being non empty set

for X being set holds

( X is U -prefix iff for p1, q1, p2, q2 being b_{1} -valued FinSequence st p1 in X & p2 in X & p1 ^ q1 = p2 ^ q2 holds

( p1 = p2 & q1 = q2 ) );

for U being non empty set

for X being set holds

( X is U -prefix iff for p1, q1, p2, q2 being b

( p1 = p2 & q1 = q2 ) );

registration
end;

registration

let U be non empty set ;

let m be Nat;

let X be U -prefix set ;

coherence

for b_{1} being set st b_{1} = (U -multiCat) .: (m -tuples_on X) holds

b_{1} is U -prefix
by Lm25;

end;
let m be Nat;

let X be U -prefix set ;

coherence

for b

b

registration

let x be set ;

coherence

for b_{1} being set st b_{1} = (id {x}) \+\ {[x,x]} holds

b_{1} is empty

end;
coherence

for b

b

proof end;

registration

let x, y be set ;

coherence

for b_{1} being set st b_{1} = (x .--> y) \+\ {[x,y]} holds

b_{1} is empty

end;
coherence

for b

b

proof end;

registration

let x be set ;

coherence

for b_{1} being set st b_{1} = (id {x}) \+\ (x .--> x) holds

b_{1} is empty

end;
coherence

for b

b

proof end;

theorem :: FOMODEL0:30

for D being non empty set

for x being set holds

( x in (D *) \ {{}} iff ( x is b_{1} -valued FinSequence & not x is empty ) )

for x being set holds

( x in (D *) \ {{}} iff ( x is b

proof end;

theorem Th31: :: FOMODEL0:31

for D being non empty set

for d being Element of D

for f being BinOp of D holds

( (MultPlace f) . <*d*> = d & ( for x being b_{1} -valued FinSequence st not x is empty holds

(MultPlace f) . (x ^ <*d*>) = f . (((MultPlace f) . x),d) ) )

for d being Element of D

for f being BinOp of D holds

( (MultPlace f) . <*d*> = d & ( for x being b

(MultPlace f) . (x ^ <*d*>) = f . (((MultPlace f) . x),d) ) )

proof end;

registration
end;

:: deftheorem defines -SymbolSubstIn FOMODEL0:def 21 :

for x, y being set

for p being FinSequence holds (x,y) -SymbolSubstIn p = p +~ (x,y);

for x, y being set

for p being FinSequence holds (x,y) -SymbolSubstIn p = p +~ (x,y);

registration

let x, y be set ;

let m be Nat;

let p be m -element FinSequence;

coherence

for b_{1} being FinSequence st b_{1} = (x,y) -SymbolSubstIn p holds

b_{1} is m -element

end;
let m be Nat;

let p be m -element FinSequence;

coherence

for b

b

proof end;

registration

let x be set ;

let U be non empty set ;

let u be Element of U;

let p be U -valued FinSequence;

coherence

for b_{1} being FinSequence st b_{1} = (x,u) -SymbolSubstIn p holds

b_{1} is U -valued
;

end;
let U be non empty set ;

let u be Element of U;

let p be U -valued FinSequence;

coherence

for b

b

definition

let X, x, y be set ;

let p be X -valued FinSequence;

for b_{1} being FinSequence holds

( b_{1} = (x,y) -SymbolSubstIn p iff b_{1} = ((id X) +* (x,y)) * p )

end;
let p be X -valued FinSequence;

:: original: -SymbolSubstIn

redefine func (x,y) -SymbolSubstIn p -> FinSequence equals :: FOMODEL0:def 22

((id X) +* (x,y)) * p;

compatibility redefine func (x,y) -SymbolSubstIn p -> FinSequence equals :: FOMODEL0:def 22

((id X) +* (x,y)) * p;

for b

( b

proof end;

:: deftheorem defines -SymbolSubstIn FOMODEL0:def 22 :

for X, x, y being set

for p being b_{1} -valued FinSequence holds (x,y) -SymbolSubstIn p = ((id X) +* (x,y)) * p;

for X, x, y being set

for p being b

definition

let U be non empty set ;

let x be set ;

let u be Element of U;

let q be U -valued FinSequence;

:: original: -SymbolSubstIn

redefine func (x,u) -SymbolSubstIn q -> FinSequence of U;

coherence

(x,u) -SymbolSubstIn q is FinSequence of U by Lm45;

end;
let x be set ;

let u be Element of U;

let q be U -valued FinSequence;

:: original: -SymbolSubstIn

redefine func (x,u) -SymbolSubstIn q -> FinSequence of U;

coherence

(x,u) -SymbolSubstIn q is FinSequence of U by Lm45;

Lm53: for x2 being set

for U being non empty set

for u, u1 being Element of U holds

( ( u = u1 implies (u1,x2) -SymbolSubstIn <*u*> = <*x2*> ) & ( u <> u1 implies (u1,x2) -SymbolSubstIn <*u*> = <*u*> ) )

proof end;

Lm50: for x being set

for U being non empty set

for u being Element of U

for q1, q2 being b

proof end;

definition

let U be non empty set ;

let x be set ;

let u be Element of U;

set D = U * ;

deffunc H_{1}( Element of U * ) -> FinSequence of U = (x,u) -SymbolSubstIn $1;

ex b_{1} being Function of (U *),(U *) st

for q being U -valued FinSequence holds b_{1} . q = (x,u) -SymbolSubstIn q

for b_{1}, b_{2} being Function of (U *),(U *) st ( for q being U -valued FinSequence holds b_{1} . q = (x,u) -SymbolSubstIn q ) & ( for q being U -valued FinSequence holds b_{2} . q = (x,u) -SymbolSubstIn q ) holds

b_{1} = b_{2}

end;
let x be set ;

let u be Element of U;

set D = U * ;

deffunc H

func x SubstWith u -> Function of (U *),(U *) means :DefSubst: :: FOMODEL0:def 23

for q being U -valued FinSequence holds it . q = (x,u) -SymbolSubstIn q;

existence for q being U -valued FinSequence holds it . q = (x,u) -SymbolSubstIn q;

ex b

for q being U -valued FinSequence holds b

proof end;

uniqueness for b

b

proof end;

:: deftheorem DefSubst defines SubstWith FOMODEL0:def 23 :

for U being non empty set

for x being set

for u being Element of U

for b_{4} being Function of (U *),(U *) holds

( b_{4} = x SubstWith u iff for q being b_{1} -valued FinSequence holds b_{4} . q = (x,u) -SymbolSubstIn q );

for U being non empty set

for x being set

for u being Element of U

for b

( b

Lm54: for U being non empty set

for u, u1, u2 being Element of U holds

( ( u = u1 implies (u1 SubstWith u2) . <*u*> = <*u2*> ) & ( u <> u1 implies (u1 SubstWith u2) . <*u*> = <*u*> ) )

proof end;

registration

let U be non empty set ;

let x be set ;

let u be Element of U;

coherence

for b_{1} being Function st b_{1} = x SubstWith u holds

b_{1} is FinSequence-yielding

end;
let x be set ;

let u be Element of U;

coherence

for b

b

proof end;

registration

let F be FinSequence-yielding Function;

let x be set ;

coherence

F . x is FinSequence-like

end;
let x be set ;

coherence

F . x is FinSequence-like

proof end;

Lm55: for x being set

for U being non empty set

for u being Element of U

for q1, q2 being b

proof end;

registration

let U be non empty set ;

let x be set ;

let u be Element of U;

let m be Nat;

let p be U -valued m -element FinSequence;

coherence

for b_{1} being FinSequence st b_{1} = (x SubstWith u) . p holds

b_{1} is m -element

end;
let x be set ;

let u be Element of U;

let m be Nat;

let p be U -valued m -element FinSequence;

coherence

for b

b

proof end;

registration

let U be non empty set ;

let x be set ;

let u be Element of U;

let e be empty set ;

coherence

for b_{1} being set st b_{1} = (x SubstWith u) . e holds

b_{1} is empty

end;
let x be set ;

let u be Element of U;

let e be empty set ;

coherence

for b

b

proof end;

registration

let U be non empty set ;

coherence

for b_{1} being Function st b_{1} = U -multiCat holds

b_{1} is FinSequence-yielding

end;
coherence

for b

b

proof end;

registration

let U be non empty set ;

not for b_{1} being U -valued FinSequence holds b_{1} is empty

end;
cluster Relation-like NAT -defined U -valued Function-like non empty finite FinSequence-like FinSubsequence-like countable finite-support for set ;

existence not for b

proof end;

registration

let U be non empty set ;

let m1 be non zero Nat;

let n be Nat;

let p be U -valued m1 + n -element FinSequence;

coherence

for b_{1} being set st b_{1} = {(p . m1)} \ U holds

b_{1} is empty

end;
let m1 be non zero Nat;

let n be Nat;

let p be U -valued m1 + n -element FinSequence;

coherence

for b

b

proof end;

registration

let U be non empty set ;

let m, n be Nat;

let p be (m + 1) + n -element Element of U * ;

coherence

for b_{1} being set st b_{1} = {(p . (m + 1))} \ U holds

b_{1} is empty
;

end;
let m, n be Nat;

let p be (m + 1) + n -element Element of U * ;

coherence

for b

b

registration
end;

registration

let m be Nat;

let p be m + 1 -element FinSequence;

coherence

for b_{1} being set st b_{1} = ((p | (Seg m)) ^ <*(p . (m + 1))*>) \+\ p holds

b_{1} is empty

end;
let p be m + 1 -element FinSequence;

coherence

for b

b

proof end;

registration

let m, n be Nat;

let p be m + n -element FinSequence;

coherence

for b_{1} being FinSequence st b_{1} = p | (Seg m) holds

b_{1} is m -element

end;
let p be m + n -element FinSequence;

coherence

for b

b

proof end;

Lm51: for R being Relation holds

( R is {{}} -valued iff R is empty-yielding )

proof end;

registration

coherence

for b_{1} being Relation st b_{1} is {{}} -valued holds

b_{1} is empty-yielding
by Lm51;

coherence

for b_{1} being Relation st b_{1} is empty-yielding holds

b_{1} is {{}} -valued
by Lm51;

end;
for b

b

coherence

for b

b

theorem Th32: :: FOMODEL0:32

for x being set

for U being non empty set holds (U -multiCat) . x = (MultPlace (U -concatenation)) . x

for U being non empty set holds (U -multiCat) . x = (MultPlace (U -concatenation)) . x

proof end;

theorem Th33: :: FOMODEL0:33

for U being non empty set

for p being FinSequence

for q being b_{1} -valued FinSequence st p is U * -valued holds

(U -multiCat) . (p ^ <*q*>) = ((U -multiCat) . p) ^ q

for p being FinSequence

for q being b

(U -multiCat) . (p ^ <*q*>) = ((U -multiCat) . p) ^ q

proof end;

Lm52: for x being set

for U being non empty set

for u being Element of U

for p being FinSequence st p is U * -valued holds

(x SubstWith u) . ((U -multiCat) . p) = (U -multiCat) . ((x SubstWith u) * p)

proof end;

registration

let Y be set ;

let X be Subset of Y;

let R be Y -defined total Relation;

coherence

for b_{1} being X -defined Relation st b_{1} = R | X holds

b_{1} is total

end;
let X be Subset of Y;

let R be Y -defined total Relation;

coherence

for b

b

proof end;

theorem :: FOMODEL0:34

theorem :: FOMODEL0:35

theorem :: FOMODEL0:36

theorem :: FOMODEL0:37

theorem :: FOMODEL0:38

for U being non empty set holds (U -concatenation) .: (id (1 -tuples_on U)) = { <*u,u*> where u is Element of U : verum }

proof end;

registration

let f be Function;

let U be non empty set ;

let u be Element of U;

coherence

for b_{1} being set st b_{1} = ((f | U) . u) \+\ (f . u) holds

b_{1} is empty

end;
let U be non empty set ;

let u be Element of U;

coherence

for b

b

proof end;

registration

let f be Function;

let U1, U2 be non empty set ;

let u be Element of U1;

let g be Function of U1,U2;

coherence

for b_{1} being set st b_{1} = ((f * g) . u) \+\ (f . (g . u)) holds

b_{1} is empty

end;
let U1, U2 be non empty set ;

let u be Element of U1;

let g be Function of U1,U2;

coherence

for b

b

proof end;

registration
end;

registration

let x, y be real number ;

coherence

for b_{1} being ext-real number st b_{1} = (max (x,y)) - x holds

not b_{1} is negative

end;
coherence

for b

not b

proof end;

theorem :: FOMODEL0:39

registration

let Y be set ;

let X be Subset of Y;

coherence

for b_{1} being set st b_{1} = X \ Y holds

b_{1} is empty
by XBOOLE_1:37;

end;
let X be Subset of Y;

coherence

for b

b

registration

let x, y be set ;

coherence

for b_{1} being set st b_{1} = {x} \ {x,y} holds

b_{1} is empty

for b_{1} being set st b_{1} = ([x,y] `1) \+\ x holds

b_{1} is empty

end;
coherence

for b

b

proof end;

coherence for b

b

proof end;

registration

let x, y be set ;

coherence

for b_{1} being set st b_{1} = ([x,y] `2) \+\ y holds

b_{1} is empty

end;
coherence

for b

b

proof end;

registration

let n be positive Nat;

let X be non empty set ;

ex b_{1} being Element of (X *) \ {{}} st b_{1} is n -element

end;
let X be non empty set ;

cluster Relation-like NAT -defined Function-like finite n -element FinSequence-like FinSubsequence-like countable finite-support for Element of (X *) \ {{}};

existence ex b

proof end;

registration

let m1 be non zero Nat;

coherence

for b_{1} being FinSequence st b_{1} is m1 + 0 -element holds

not b_{1} is empty

end;
coherence

for b

not b

proof end;

registration

let R be Relation;

let x be set ;

coherence

for b_{1} being set st b_{1} = R null x holds

b_{1} is Relation-like
;

end;
let x be set ;

coherence

for b

b

registration

let f be Function-like set ;

let x be set ;

coherence

for b_{1} being set st b_{1} = f null x holds

b_{1} is Function-like
;

end;
let x be set ;

coherence

for b

b

registration

let p be FinSequence-like Relation;

let x be set ;

coherence

for b_{1} being Relation st b_{1} = p null x holds

b_{1} is FinSequence-like
;

end;
let x be set ;

coherence

for b

b

registration

let p be FinSequence;

let x be set ;

coherence

for b_{1} being FinSequence st b_{1} = p null x holds

b_{1} is len p -element
by CARD_1:def 7;

end;
let x be set ;

coherence

for b

b

registration

let p be non empty FinSequence;

coherence

for b_{1} being number st b_{1} = len p holds

not b_{1} is empty
;

end;
coherence

for b

not b

registration

let R be Relation;

let X be set ;

coherence

for b_{1} being Relation st b_{1} = R | X holds

b_{1} is X -defined

end;
let X be set ;

coherence

for b

b

proof end;

registration

let x be set ;

let e be empty set ;

coherence

for b_{1} being set st b_{1} = e null x holds

b_{1} is empty
;

end;
let e be empty set ;

coherence

for b

b

registration

let X be set ;

let e be empty set ;

coherence

for b_{1} being Relation st b_{1} = e null X holds

b_{1} is X -valued

end;
let e be empty set ;

coherence

for b

b

proof end;

registration

let Y be non empty FinSequence-membered set ;

coherence

for b_{1} being Function st b_{1} is Y -valued holds

b_{1} is FinSequence-yielding

end;
coherence

for b

b

proof end;

registration

let X, Y be set ;

coherence

for b_{1} being Element of Funcs (X,(Y *)) holds b_{1} is FinSequence-yielding
;

end;
coherence

for b

registration

let m, n be Nat;

let p be m -element FinSequence;

coherence

for b_{1} being Relation st b_{1} = p null n holds

b_{1} is Seg (m + n) -defined

end;
let p be m -element FinSequence;

coherence

for b

b

proof end;

Lm56: for m being Nat

for p1, p2, q1, q2 being FinSequence st p1 is m -element & q1 is m -element & p1 ^ p2 = q1 ^ q2 holds

( p1 = q1 & p2 = q2 )

proof end;

registration

let m, n be Nat;

let p be m -element FinSequence;

let q be n -element FinSequence;

coherence

for b_{1} being FinSequence st b_{1} = p ^ q holds

b_{1} is m + n -element

end;
let p be m -element FinSequence;

let q be n -element FinSequence;

coherence

for b

b

proof end;

theorem :: FOMODEL0:41

for m being Nat

for p1, p2, q1, q2 being FinSequence st p1 is m -element & q1 is m -element & ( p1 ^ p2 = q1 ^ q2 or p2 ^ p1 = q2 ^ q1 ) holds

( p1 = q1 & p2 = q2 )

for p1, p2, q1, q2 being FinSequence st p1 is m -element & q1 is m -element & ( p1 ^ p2 = q1 ^ q2 or p2 ^ p1 = q2 ^ q1 ) holds

( p1 = q1 & p2 = q2 )

proof end;

theorem :: FOMODEL0:42

for x being set

for U, U1 being non empty set st (U -multiCat) . x is U1 -valued & x in (U *) * holds

x is FinSequence of U1 *

for U, U1 being non empty set st (U -multiCat) . x is U1 -valued & x in (U *) * holds

x is FinSequence of U1 *

proof end;

registration

let m be Nat;

coherence

for b_{1} being FinSequence st b_{1} is m + 1 -element holds

not b_{1} is empty

end;
coherence

for b

not b

proof end;

registration

let U be non empty set ;

let u be Element of U;

coherence

for b_{1} being set st b_{1} = ((id U) . u) \+\ u holds

b_{1} is empty

end;
let u be Element of U;

coherence

for b

b

proof end;

registration

let U be non empty set ;

let p be U -valued non empty FinSequence;

coherence

for b_{1} being set st b_{1} = {(p . 1)} \ U holds

b_{1} is empty

end;
let p be U -valued non empty FinSequence;

coherence

for b

b

proof end;

theorem :: FOMODEL0:43

for x1, x2, y1, y2 being set

for f being Function holds

( ( x1 = x2 implies (f +* (x1 .--> y1)) +* (x2 .--> y2) = f +* (x2 .--> y2) ) & ( x1 <> x2 implies (f +* (x1 .--> y1)) +* (x2 .--> y2) = (f +* (x2 .--> y2)) +* (x1 .--> y1) ) )

for f being Function holds

( ( x1 = x2 implies (f +* (x1 .--> y1)) +* (x2 .--> y2) = f +* (x2 .--> y2) ) & ( x1 <> x2 implies (f +* (x1 .--> y1)) +* (x2 .--> y2) = (f +* (x2 .--> y2)) +* (x1 .--> y1) ) )

proof end;

registration

let X be set ;

let U be non empty set ;

existence

ex b_{1} being X -defined Function st

( b_{1} is U -valued & b_{1} is total )

end;
let U be non empty set ;

existence

ex b

( b

proof end;

registration

let X be set ;

let U be non empty set ;

let P be X -defined U -valued total Relation;

let Q be U -defined total Relation;

coherence

for b_{1} being X -defined Relation st b_{1} = P * Q holds

b_{1} is total

end;
let U be non empty set ;

let P be X -defined U -valued total Relation;

let Q be U -defined total Relation;

coherence

for b

b

proof end;

theorem :: FOMODEL0:44

for X being set

for p, p1, p2 being FinSequence st (p ^ p1) ^ p2 is X -valued holds

( p2 is X -valued & p1 is X -valued & p is X -valued )

for p, p1, p2 being FinSequence st (p ^ p1) ^ p2 is X -valued holds

( p2 is X -valued & p1 is X -valued & p is X -valued )

proof end;

registration

let X be set ;

let R be Relation;

coherence

for b_{1} being Relation st b_{1} = R null X holds

b_{1} is X \/ (rng R) -valued

end;
let R be Relation;

coherence

for b

b

proof end;

registration

coherence

for b_{1} being set st b_{1} is FinSequence-membered holds

b_{1} is finite-membered

end;
for b

b

proof end;

definition

let X be functional set ;

union { (rng x) where x is Element of X \/ {{}} : x in X } is set ;

end;
func SymbolsOf X -> set equals :: FOMODEL0:def 24

union { (rng x) where x is Element of X \/ {{}} : x in X } ;

coherence union { (rng x) where x is Element of X \/ {{}} : x in X } ;

union { (rng x) where x is Element of X \/ {{}} : x in X } is set ;

:: deftheorem defines SymbolsOf FOMODEL0:def 24 :

for X being functional set holds SymbolsOf X = union { (rng x) where x is Element of X \/ {{}} : x in X } ;

for X being functional set holds SymbolsOf X = union { (rng x) where x is Element of X \/ {{}} : x in X } ;

Lm58: for X being functional set st X is finite & X is finite-membered holds

SymbolsOf X is finite

proof end;

registration

existence

ex b_{1} being set st

( b_{1} is trivial & b_{1} is FinSequence-membered & not b_{1} is empty )

end;
ex b

( b

proof end;

registration
end;

registration

let z be non zero complex number ;

coherence

for b_{1} being ext-real number st b_{1} = abs z holds

b_{1} is positive
by COMPLEX1:47;

end;
coherence

for b

b

definition

let X be functional set ;

for b_{1} being set holds

( b_{1} = SymbolsOf X iff b_{1} = union { (rng x) where x is Element of X : x in X } )

end;
redefine func SymbolsOf X equals :: FOMODEL0:def 25

union { (rng x) where x is Element of X : x in X } ;

compatibility union { (rng x) where x is Element of X : x in X } ;

for b

( b

proof end;

:: deftheorem defines SymbolsOf FOMODEL0:def 25 :

for X being functional set holds SymbolsOf X = union { (rng x) where x is Element of X : x in X } ;

for X being functional set holds SymbolsOf X = union { (rng x) where x is Element of X : x in X } ;

Lm57: for B being functional set

for A being Subset of B holds { (rng x) where x is Element of A : x in A } c= { (rng x) where x is Element of B : x in B }

proof end;

theorem :: FOMODEL0:46

for B being functional set

for A being Subset of B holds SymbolsOf A c= SymbolsOf B by Lm57, ZFMISC_1:77;

for A being Subset of B holds SymbolsOf A c= SymbolsOf B by Lm57, ZFMISC_1:77;

registration

let X be set ;

let F be Subset of (bool X);

coherence

for b_{1} being set st b_{1} = (union F) \ X holds

b_{1} is empty
;

end;
let F be Subset of (bool X);

coherence

for b

b

theorem :: FOMODEL0:49

theorem :: FOMODEL0:50

theorem :: FOMODEL0:51

for f, g being Function holds

( f c= g iff for x being set st x in dom f holds

( x in dom g & f . x = g . x ) )

( f c= g iff for x being set st x in dom f holds

( x in dom g & f . x = g . x ) )

proof end;

registration

let U be non empty set ;

coherence

for b_{1} being Element of ((U *) \ {{}}) * st not b_{1} is empty holds

not b_{1} is empty-yielding

end;
coherence

for b

not b

proof end;

registration
end;

theorem Th52: :: FOMODEL0:52

for x being set

for U1, U2 being non empty set

for p being FinSequence holds

( ( (U1 -multiCat) . x <> {} & (U2 -multiCat) . x <> {} implies (U1 -multiCat) . x = (U2 -multiCat) . x ) & ( p is {} * -valued implies (U1 -multiCat) . p = {} ) & ( (U1 -multiCat) . p = {} & p is U1 * -valued implies p is {} * -valued ) )

for U1, U2 being non empty set

for p being FinSequence holds

( ( (U1 -multiCat) . x <> {} & (U2 -multiCat) . x <> {} implies (U1 -multiCat) . x = (U2 -multiCat) . x ) & ( p is {} * -valued implies (U1 -multiCat) . p = {} ) & ( (U1 -multiCat) . p = {} & p is U1 * -valued implies p is {} * -valued ) )

proof end;

registration
end;

registration

let Y be with_non-empty_elements set ;

coherence

for b_{1} being Y -valued Relation st not b_{1} is empty holds

not b_{1} is empty-yielding

end;
coherence

for b

not b

proof end;

registration

let X be with_non-empty_elements set ;

coherence

for b_{1} being Subset of X holds b_{1} is with_non-empty_elements

end;
coherence

for b

proof end;

registration

let U be non empty set ;

coherence

for b_{1} being set st b_{1} = U * holds

not b_{1} is finite

end;
coherence

for b

not b

proof end;

registration

let X be with_non-empty_element set ;

existence

ex b_{1} being Subset of X st

( b_{1} is with_non-empty_elements & not b_{1} is empty )

end;
existence

ex b

( b

proof end;

Lm60: for Y being set

for U being non empty set

for p being FinSequence st p <> {} & p is Y -valued & Y c= U * & Y is with_non-empty_elements holds

(U -multiCat) . p <> {}

proof end;

theorem :: FOMODEL0:53

for Y being set

for U1, U2 being non empty set

for p being FinSequence st U1 c= U2 & Y c= U1 * & p is Y -valued & p <> {} & Y is with_non-empty_elements holds

(U1 -multiCat) . p = (U2 -multiCat) . p

for U1, U2 being non empty set

for p being FinSequence st U1 c= U2 & Y c= U1 * & p is Y -valued & p <> {} & Y is with_non-empty_elements holds

(U1 -multiCat) . p = (U2 -multiCat) . p

proof end;

theorem :: FOMODEL0:54

for x, X being set

for U being non empty set st ex p being FinSequence st

( x = p & p is X * -valued ) holds

(U -multiCat) . x is X -valued

for U being non empty set st ex p being FinSequence st

( x = p & p is X * -valued ) holds

(U -multiCat) . x is X -valued

proof end;

registration

let X be set ;

let m be Nat;

coherence

for b_{1} being set st b_{1} = (m -tuples_on X) \ (X *) holds

b_{1} is empty

end;
let m be Nat;

coherence

for b

b

proof end;

registration

let X be set ;

coherence

for b_{1} being set st b_{1} = (bool X) \ X holds

not b_{1} is empty

end;
coherence

for b

not b

proof end;

registration

let X be set ;

let R be Relation;

coherence

for b_{1} being Relation st b_{1} = R null X holds

b_{1} is X \/ (dom R) -defined

end;
let R be Relation;

coherence

for b

b

proof end;

registration

let X be set ;

let f be X -defined Function;

let g be X -defined total Function;

compatibility

f +* g = g null f

g null f = f +* g ;

end;
let f be X -defined Function;

let g be X -defined total Function;

compatibility

f +* g = g null f

proof end;

compatibility g null f = f +* g ;

definition

let X be set ;

[:NAT,{ the Element of (bool (proj2 X)) \ (proj2 X)}:] is set ;

end;
func X -freeCountableSet -> set equals :: FOMODEL0:def 27

[:NAT,{ the Element of (bool (proj2 X)) \ (proj2 X)}:];

coherence [:NAT,{ the Element of (bool (proj2 X)) \ (proj2 X)}:];

[:NAT,{ the Element of (bool (proj2 X)) \ (proj2 X)}:] is set ;

:: deftheorem defines -freeCountableSet FOMODEL0:def 27 :

for X being set holds X -freeCountableSet = [:NAT,{ the Element of (bool (proj2 X)) \ (proj2 X)}:];

for X being set holds X -freeCountableSet = [:NAT,{ the Element of (bool (proj2 X)) \ (proj2 X)}:];

registration

let X be set ;

coherence

for b_{1} being set st b_{1} = X -freeCountableSet holds

not b_{1} is finite
;

end;
coherence

for b

not b

registration

let X be set ;

coherence

for b_{1} being set st b_{1} = X -freeCountableSet holds

b_{1} is countable
by CARD_4:7;

end;
coherence

for b

b

registration

let x be set ;

let p be FinSequence;

coherence

for b_{1} being set st b_{1} = ((<*x*> ^ p) . 1) \+\ x holds

b_{1} is empty

end;
let p be FinSequence;

coherence

for b

b

proof end;

registration

let m be Nat;

let m0 be zero number ;

let p be m -element FinSequence;

coherence

for b_{1} being Seg (m + m0) -defined Relation st b_{1} = p null m0 holds

b_{1} is total

end;
let m0 be zero number ;

let p be m -element FinSequence;

coherence

for b

b

proof end;

registration

let U be non empty set ;

let q1, q2 be U -valued FinSequence;

coherence

for b_{1} being set st b_{1} = ((U -multiCat) . <*q1,q2*>) \+\ (q1 ^ q2) holds

b_{1} is empty

end;
let q1, q2 be U -valued FinSequence;

coherence

for b

b

proof end;

::#######################################################################