:: Program Algebra over an Algebra
:: by Grzegorz Bancerek
environ
vocabularies AOFA_A00, AOFA_000, PROB_2, UNIALG_1, FUNCT_1, RELAT_1,
NAT_1, FUNCT_2, XBOOLE_0, MSUALG_1, FUNCOP_1, TREES_4, FINSET_1, MCART_1,
SUBSET_1, ZF_MODEL, PBOOLE, INCPROJ, MSUALG_3, AOFA_I00, CARD_3,
ZFMISC_1, MSAFREE, MEMBERED, MSATERM, STRUCT_0, PZFMISC1, GRAPHSP,
TARSKI, MARGREL1, REALSET1, PRELAMB, COMPUT_1, CARD_1, PARTFUN1, FUNCT_7,
FINSEQ_1, UNIALG_2, WELLORD1, XXREAL_0, XBOOLEAN, INT_1, NUMBERS,
ARYTM_1, ARYTM_3, ORDINAL4, FUNCT_4, FINSEQ_2, ORDINAL1, MSUALG_2,
FUNCT_6, FUNCT_5, FINSEQ_4, MSAFREE4, EXCHSORT, AFINSQ_1, RFINSEQ,
MATRIX_7, ALGSTR_4, SETLIM_2, MEMBER_1, GROUP_6, EQUATION, FOMODEL2;
notations TARSKI, XBOOLE_0, ZFMISC_1, XTUPLE_0, SUBSET_1, RELAT_1, FUNCT_1,
PARTFUN1, ORDINAL1, TREES_1, ENUMSET1, FUNCT_2, FINSET_1, FINSEQ_2,
FINSEQ_1, FINSEQ_4, RFINSEQ, FUNCT_4, BINOP_1, CARD_1, CARD_3, PROB_2,
NUMBERS, MEMBERED, FUNCOP_1, FUNCT_7, COMPUT_1, PBOOLE, PZFMISC1,
XBOOLEAN, MARGREL1, AFINSQ_1, XXREAL_0, XCMPLX_0, INT_1, FUNCT_5,
FUNCT_6, TREES_2, TREES_4, STRUCT_0, MATRIX_7, BORSUK_7, UNIALG_1,
UNIALG_2, FREEALG, TURING_1,
MSUALG_1, MSUALG_2, MSUALG_3, MSUALG_6, CIRCCOMB, AUTALG_1, MSAFREE,
MSAFREE1, MSATERM, MSAFREE3, AOFA_000, MSAFREE4, EXCHSORT;
constructors PZFMISC1, AOFA_000, CATALG_1, PUA2MSS1, MSAFREE1, MSUALG_3,
COMPUT_1, FINSEQ_4, MSAFREE4, AUTALG_1, EXCHSORT, AFINSQ_1, CIRCCOMB,
RFINSEQ, MATRIX_7, BORSUK_7, BINOP_1, TURING_1;
registrations RELAT_1, RELSET_1, FUNCT_1, FUNCOP_1, FINSEQ_1, UNIALG_1,
STRUCT_0, PUA2MSS1, PBOOLE, MSUALG_1, INSTALG1, MSAFREE1, CARD_3,
XBOOLE_0, AOFA_000, MSAFREE, ORDINAL1, INT_1, XREAL_0, FUNCT_4, FINSEQ_4,
CARD_1, MARGREL1, SUBSET_1, FINSEQ_2, NUMBERS, CATALG_1, TREES_2,
MSUALG_2, TREES_3, MSAFREE4, EXCHSORT, NAT_1, XTUPLE_0, FUNCT_7,
AFINSQ_1, XBOOLEAN, MEMBERED, FOMODEL0, PRE_CIRC, BORSUK_7, CIRCCOMB;
::RELAT_1
requirements BOOLE, SUBSET, NUMERALS, ARITHM, REAL;
definitions
TARSKI, XBOOLE_0, FUNCT_1, PARTFUN1, BINOP_1, PZFMISC1, FREEALG, UNIALG_1,
UNIALG_2, FUNCOP_1, FINSEQ_1, BORSUK_7, XBOOLEAN, STRUCT_0, CIRCCOMB,
AOFA_000, PBOOLE, MSUALG_1, PUA2MSS1, MSAFREE, MSAFREE1, MSAFREE4;
equalities BINOP_1, UNIALG_2, FUNCOP_1, FINSEQ_1, BORSUK_7, XBOOLEAN,
CARD_1, AOFA_000, MSUALG_1, PUA2MSS1, MSAFREE;
expansions TARSKI, FUNCT_1, PZFMISC1, UNIALG_1, AOFA_000, PBOOLE, MSUALG_1,
MSAFREE, XXREAL_0, XBOOLEAN;
theorems XBOOLE_1, ZFMISC_1, FUNCT_2, FUNCOP_1, TARSKI, XBOOLE_0, FINSEQ_1,
FINSEQ_3, FUNCT_7, ORDINAL1, PARTFUN1, DTCONSTR, MCART_1, SUBSET_1,
FUNCT_4, FREEALG, FINSEQ_4, NAT_1, FUNCT_1, XXREAL_0, TREES_9, TREES_1,
TREES_4, PBOOLE, AUTALG_1, CARD_5, MSATERM, RELAT_1, MSAFREE, UNIALG_1,
EXTENS_1, MSAFREE3, AOFA_000, ENUMSET1, CARD_1, FINSEQ_2, CARD_3,
FUNCT_6, GRFUNC_1, CIRCCMB3, RELSET_1, MARGREL1, COMPUT_1, INT_1,
MSUALG_2, MSUALG_3, FUNCT_5, EQUATION, MSAFREE4, CIRCCOMB, XREAL_1,
XTUPLE_0, RFINSEQ, FINSEQ_5, MATRIX_7, AFINSQ_1, BORSUK_7, XREGULAR,
ORDINAL3, PRALG_2, BINARITH, XBOOLEAN;
schemes XBOOLE_0, FUNCT_1, FUNCT_2, CLASSES1, PBOOLE, MSAFREE4;
begin :: Preliminary
reserve i for Nat, x,y,z for element;
reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of the carrier of S;
theorem Lm1:
for A,B being set
for R being A-valued Relation
holds R.:B c= A
proof
let A,B be set;
let R be A-valued Relation;
R.:B c= rng R & rng R c= A by RELAT_1:111,def 19;
hence R.:B c= A by XBOOLE_1:1;
end;
theorem FINSEQ2:
for I,J being set st I c= J holds i-tuples_on I c= i-tuples_on J
proof
let I,J be set;
assume Z0: I c= J;
let x; assume x in i-tuples_on I;
then x in {s where s is Element of I*: len s = i} by FINSEQ_2:def 4;
then consider s being Element of I* such that
A1: x = s & len s = i;
s in I* c= J* by Z0,FINSEQ_1:62;
then s is Element of J*;
then x in {s where s is Element of J*: len s = i} by A1;
hence x in i-tuples_on J by FINSEQ_2:def 4;
end;
theorem COMPUTu1c22:
for I,J being non empty set
for f being homogeneous PartFunc of I*, J holds
f is quasi_total non empty iff dom f = (arity f)-tuples_on I
proof let X,Y be non empty set;
let f being homogeneous PartFunc of X*, Y;
A1: dom f c= (arity f)-tuples_on X by COMPUT_1:20;
hereby
assume f is quasi_total non empty;
then reconsider
f9 = f as quasi_total non empty homogeneous PartFunc of X*, Y;
consider x being element such that
A2: x in dom f9 by XBOOLE_0:def 1;
reconsider x9 = x as FinSequence of X by A1,A2,FINSEQ_2:131;
A3: len x9 = arity f by A2,MARGREL1:def 25;
now
let z be element;
thus z in dom f implies z in (arity f)-tuples_on X by A1;
assume z in (arity f)-tuples_on X;
then reconsider z9 = z as Element of (arity f)-tuples_on X;
len z9=arity f by CARD_1:def 7;
hence z in dom f by A2,A3,MARGREL1:def 22;
end;
hence dom f = (arity f)-tuples_on X by TARSKI:2;
end;
assume
A4: dom f = (arity f)-tuples_on X;
now
let x, y be FinSequence of X;
assume that
A5: len x = len y and
A6: x in dom f;
len x = arity f by A4,A6,CARD_1:def 7;
then y is Element of (arity f)-tuples_on X by A5,FINSEQ_2:92;
hence y in dom f by A4;
end;
hence f is quasi_total by MARGREL1:def 22;
thus thesis by A4;
end;
definition
let I be set;
let f be ManySortedSet of I;
let i be element;
let x;
redefine func f+*(i,x) -> ManySortedSet of I;
coherence
proof
dom(f+*(i,x)) = dom f by FUNCT_7:30 .= I by PARTFUN1:def 2;
hence thesis by PARTFUN1:def 2,RELAT_1:def 18;
end;
end;
definition
let A, B be set, f be Function of A, B, x be element, y be Element of B;
redefine func f+*(x,y) -> Function of A, B;
coherence
proof reconsider x as set by TARSKI:1;
f+*(x,y) is Function of A,B;
hence thesis;
end;
end;
definition
let I be set;
let A,B be ManySortedSet of I;
let F be ManySortedFunction of A,B;
let x;
redefine func F.x -> Function of A.x,B.x;
coherence
proof reconsider x as set by TARSKI:1;
F.x is Function of A.x,B.x;
hence thesis;
end;
end;
registration
let I be set;
let f be non-empty ManySortedSet of I;
let i be element;
let x be non empty set;
cluster f+*(i,x) -> non-empty;
coherence
proof
now
thus f+*(i,x) is ManySortedSet of I;
let y; assume
A1: y in I; dom f = I by PARTFUN1:def 2; then
(y <> i implies (f+*(i,x)).y = f.y) &
(y = i implies (f+*(i,x)).y = x) by A1,FUNCT_7:31,32;
hence (f+*(i,x)).y is non empty by A1;
end;
hence thesis by PBOOLE:def 13;
end;
end;
theorem Th71:
for I being set
for f,g being ManySortedSet of I st f c= g holds f# c= g#
proof
let I be set;
let f,g be ManySortedSet of I;
assume Z0: f c= g;
let x; assume x in I*; then
reconsider p = x as Element of I*;
A1: f#.p = product(f*p) & g#.p = product(g*p) by FINSEQ_2:def 5;
let y; assume y in f#.x; then
consider h being Function such that
A2: y = h & dom h = dom(f*p) &
for x st x in dom(f*p) holds h.x in (f*p).x
by A1,CARD_3:def 5;
p is FinSequence of I by FINSEQ_1:def 11; then
A3: dom f = I & dom g = I & rng p c= I by PARTFUN1:def 2,FINSEQ_1:def 4; then
A4: dom(f*p) = dom p & dom(g*p) = dom p by RELAT_1:27;
now
let x; assume x in dom(g*p); then
A5: h.x in (f*p).x & (f*p).x = f.(p.x) & (g*p).x = g.(p.x) & p.x in rng p
by A2,A4,FUNCT_1:13,def 3; then
f.(p.x) c= g.(p.x) by A3,Z0,PBOOLE:def 2;
hence h.x in (g*p).x by A5;
end;
hence y in g#.x by A1,A2,A4,CARD_3:9;
end;
theorem
for I being non empty set
for J being set
for A,B being ManySortedSet of I st A c= B
for f being Function of J,I holds A*f c= B*f
proof
let I be non empty set;
let J be set;
let A,B be ManySortedSet of I;
assume Z1: A c= B;
let f be Function of J,I;
let x; assume Z2: x in J; then
reconsider i = f.x as Element of I by FUNCT_2:5;
(A*f).x = A.i & (B*f).x = B.i by Z2,FUNCT_2:15;
hence (A*f).x c= (B*f).x by Z1,PBOOLE:def 2;
end;
theorem
for I being set
for A,B being ManySortedSet of I st A c= B
holds product A c= product B
proof
let I be set;
let A,B be ManySortedSet of I;
assume Z0: A c= B;
let x; assume x in product A; then
consider g being Function such that
A1: x = g & dom g = dom A &
for y st y in dom A holds g.y in A.y
by CARD_3:def 5;
A2: dom A = I & dom B = I by PARTFUN1:def 2;
now let y; assume y in I; then
g.y in A.y & A.y c= B.y by Z0,A1,A2,PBOOLE:def 2;
hence g.y in B.y;
end;
hence x in product B by A1,A2,CARD_3:9;
end;
registration
let f be Function-yielding Function;
cluster Frege f -> Function-yielding;
coherence
proof
let x; assume
A0: x in dom Frege f; then
A1: x in product doms f by FUNCT_6:def 7;
reconsider x as Element of product doms f by A0,FUNCT_6:def 7;
consider h being Function such that
A2: (Frege f).x = h & dom h = dom f &
for y being set st y in dom h holds h.y = (uncurry f).(y,x.y)
by A1,FUNCT_6:def 7;
thus thesis by A2;
end;
end;
theorem
for f,g being Function-yielding Function holds doms (f*g) = (doms f)*g
proof
let f,g be Function-yielding Function;
A1: dom doms (f*g) = dom (f*g) & dom doms f = dom f
by FUNCT_6:def 2;
A6: dom doms (f*g) = dom((doms f)*g)
proof
thus dom doms (f*g) c= dom((doms f)*g)
proof
let x; assume x in dom doms (f*g); then
A2: x in dom(f*g) & (f*g).x is Function by A1; then
A3: x in dom g & g.x in dom f & (f*g).x = f.(g.x) by FUNCT_1:11,12; then
g.x in dom doms f by A2,FUNCT_6:22;
hence thesis by A3,FUNCT_1:11;
end;
let x; assume x in dom((doms f)*g); then
A4: x in dom g & g.x in dom doms f by FUNCT_1:11; then
A5: g.x in dom f & f.(g.x) is Function & f.(g.x) = (f*g).x
by A1,FUNCT_1:13; then
x in dom(f*g) by A4,FUNCT_1:11;
hence thesis by A5,FUNCT_6:22;
end;
now let x;
assume x in dom doms (f*g); then
A7: x in dom g & g.x in dom doms f & (doms (f*g)).x = proj1((f*g).x)
by A1,A6,FUNCT_1:11,FUNCT_6:def 2; then
A8: (doms f).(g.x) = proj1(f.(g.x)) by A1,FUNCT_6:def 2;
thus (doms(f*g)).x = (doms f).(g.x) by A7,A8,FUNCT_1:13
.= ((doms f)*g).x by A7,FUNCT_1:13;
end;
hence doms (f*g) = (doms f)*g by A6,FUNCT_1:2;
end;
theorem Th95:
for f,g being Function st g = f.x holds g.y = f..(x,y)
proof
let f,g be Function such that
A0: g = f.x;
A1: f..(x,y) = (uncurry f).(x,y) by FUNCT_6:def 5;
per cases;
suppose
x in dom f & y in dom g; then
A3: [x,y] in dom uncurry f & f.[x,y]`1 is Function by A0,FUNCT_5:def 2;
[x,y]`1 = x & [x,y]`2 = y;
hence g.y = f..(x,y) by A0,A1,A3,FUNCT_5:def 2;
end;
suppose
A3: y nin dom g or x nin dom f; then
A4: (f.x = 0 or g.y = 0) & dom {} = {}
by FUNCT_1:def 2;
now
assume [x,y] in dom uncurry f; then
consider a being set, h being Function, b being set such that
A5: [x,y] = [a,b] & a in dom f & h = f.a & b in dom h by FUNCT_5:def 2;
a = x & b = y by A5,XTUPLE_0:1;
hence contradiction by A0,A3,A5;
end; then
f..(x,y) = 0 & g.y = 0 by A0,A1,A4,FUNCT_1:def 2;
hence g.y = f..(x,y);
end;
end;
definition
let I be set;
let i be Element of I;
let x;
func i-singleton(x) -> ManySortedSet of I equals (EmptyMS I)+*(i,{x});
coherence;
end;
theorem ThS1:
for I being non empty set
for i,j being Element of I
for x holds (i-singleton x).i = {x} & (i <> j implies (i-singleton x).j = {})
proof
let I be non empty set;
let i,j be Element of I;
let x;
dom(EmptyMS I) = I by PARTFUN1:def 2;
hence (i-singleton x).i = {x} by FUNCT_7:31;
assume i <> j;
hence (i-singleton x).j = (EmptyMS I).j by FUNCT_7:32 .= {};
end;
theorem
for I being non empty set
for i being Element of I
for A being ManySortedSet of I
for x st x in A.i holds i-singleton x is ManySortedSubset of A
proof
let I be non empty set;
let i be Element of I;
let A be ManySortedSet of I;
let x;
assume Z0: x in A.i;
let y;
assume y in I; then
(y = i implies (i-singleton x).y = {x}) &
(y <> i implies (i-singleton x).y = {}) by ThS1;
hence (i-singleton x).y c= A.y by Z0,XBOOLE_1:2,ZFMISC_1:31;
end;
definition
let I be set;
let A,B be ManySortedSet of I;
let F be ManySortedFunction of A,B;
let i be element such that A: i in I;
let j be element such that B: j in A.i;
let v be element such that C: v in B.i;
func F+*(i,j,v) -> ManySortedFunction of A,B means
it.i = F.i+*(j,v) & for s being element st s in I & s <> i holds it.s = F.s;
existence
proof
defpred P[element,element] means ($1 = i implies $2 = F.i+*(j,v)) &
($1 <> i implies $2 = F.$1);
A1: for x st x in I ex y st P[x,y]
proof
let x; assume x in I;
per cases;
suppose
C1: x = i;
take F.i+*(j,v);
thus thesis by C1;
end;
suppose
C2: x <> i;
take F.x;
thus thesis by C2;
end;
end;
consider f being Function such that
A2: dom f = I & for x st x in I holds P[x,f.x] from CLASSES1:sch 1(A1);
reconsider f as ManySortedSet of I by A2,RELAT_1:def 18,PARTFUN1:def 2;
f is Function-yielding
proof
let x; assume x in dom f; then
(x = i implies f.x = F.i+*(j,v)) & (x <> i implies f.x = F.x) by A2;
hence thesis;
end; then
reconsider f as ManySortedFunction of I;
f is ManySortedFunction of A,B
proof
reconsider j as Element of A.i by B;
reconsider v as Element of B.i by C;
let x being set; assume x in I; then
P[x,f.x] & F.i+*(j,v) is Function of A.i,B.i by A2;
hence thesis;
end;
then reconsider f as ManySortedFunction of A,B;
take f;
thus f.i = F.i+*(j,v) by A,A2;
thus thesis by A2;
end;
uniqueness
proof let f1,f2 be ManySortedFunction of A,B such that
A1: f1.i = F.i+*(j,v) &
for s being element st s in I & s <> i holds f1.s = F.s
and
A2: f2.i = F.i+*(j,v) &
for s being element st s in I & s <> i holds f2.s = F.s;
now let x; assume
A3: x in I;
per cases;
suppose x = i;
hence f1.x = f2.x by A1,A2;
end;
suppose x <> i; then
f1.x = F.x & f2.x = F.x by A1,A2,A3;
hence f1.x = f2.x;
end;
end;
hence thesis by PBOOLE:3;
end;
end;
definition
let a,b,c,d,x,y,z,v be set;
func (a,b,c,d) --> (x,y,z,v) -> set equals
((a,b,c) --> (x,y,z)) +* (d .--> v);
coherence;
end;
registration
let a,b,c,d,x,y,z,v be set;
cluster (a,b,c,d) --> (x,y,z,v) -> Relation-like Function-like;
coherence;
end;
theorem Th21:
for a1,a2,a3,b1,b2,b3 being set holds
((a1,a2,a3)-->(b1,b2,b3)).a3 = b3 &
(a2 <> a3 implies ((a1,a2,a3)-->(b1,b2,b3)).a2 = b2) &
(a1 <> a2 & a1 <> a3 implies ((a1,a2,a3)-->(b1,b2,b3)).a1 = b1)
proof
let a1,a2,a3,b1,b2,b3 be set;
A1: dom ({a3}-->b3) = {a3} & a3 in {a3} by TARSKI:def 1,FUNCOP_1:13;
hence ((a1,a2,a3)-->(b1,b2,b3)).a3 = ({a3}-->b3).a3 by FUNCT_4:13
.= b3 by A1,FUNCOP_1:7;
thus (a2 <> a3 implies ((a1,a2,a3)-->(b1,b2,b3)).a2 = b2)
proof
assume a2 <> a3; then a2 nin {a3} by TARSKI:def 1;
hence ((a1,a2,a3)-->(b1,b2,b3)).a2 = ((a1,a2)-->(b1,b2)).a2
by A1,FUNCT_4:11 .= b2 by FUNCT_4:63;
end;
assume Z2: a1 <> a2;
assume Z3: a1 <> a3;
a1 nin {a3} by Z3,TARSKI:def 1;
hence ((a1,a2,a3)-->(b1,b2,b3)).a1 = ((a1,a2)-->(b1,b2)).a1
by A1,FUNCT_4:11 .= b1 by Z2,FUNCT_4:63;
end;
theorem Th21a:
for a1,a2,a3,a4,b1,b2,b3,b4 being set holds
dom((a1,a2,a3,a4)-->(b1,b2,b3,b4)) = {a1,a2,a3,a4}
proof
let a1,a2,a3,a4,b1,b2,b3,b4 be set;
thus dom((a1,a2,a3,a4)-->(b1,b2,b3,b4))
= dom((a1,a2,a3)-->(b1,b2,b3))\/dom(a4.-->b4) by FUNCT_4:def 1
.= {a1,a2,a3}\/dom(a4.-->b4) by BORSUK_7:21
.= {a1,a2,a3}\/{a4} by FUNCOP_1:13
.= {a1,a2,a3,a4} by ENUMSET1:6;
end;
theorem Th21b:
for a1,a2,a3,a4,b1,b2,b3,b4 being set holds
((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a4 = b4 &
(a3 <> a4 implies ((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a3 = b3) &
(a2 <> a3 & a2 <> a4 implies ((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a2 = b2) &
(a1 <> a2 & a1 <> a3 & a1 <> a4 implies
((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a1 = b1)
proof
let a1,a2,a3,a4,b1,b2,b3,b4 be set;
A1: dom ({a4}-->b4) = {a4} & a4 in {a4} by TARSKI:def 1,FUNCOP_1:13;
hence ((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a4 = ({a4}-->b4).a4 by FUNCT_4:13
.= b4 by A1,FUNCOP_1:7;
thus (a3 <> a4 implies ((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a3 = b3)
proof
assume a3 <> a4; then a3 nin {a4} by TARSKI:def 1;
hence ((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a3 = ((a1,a2,a3)-->(b1,b2,b3)).a3
by A1,FUNCT_4:11 .= b3 by Th21;
end;
hereby
assume Z2: a2 <> a3;
assume Z3: a2 <> a4;
a2 nin {a4} by Z3,TARSKI:def 1;
hence ((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a2 = ((a1,a2,a3)-->(b1,b2,b3)).a2
by A1,FUNCT_4:11 .= b2 by Z2,Th21;
end;
assume Z1: a1 <> a2;
assume Z2: a1 <> a3;
assume Z3: a1 <> a4;
a1 nin {a4} by Z3,TARSKI:def 1;
hence ((a1,a2,a3,a4)-->(b1,b2,b3,b4)).a1 = ((a1,a2,a3)-->(b1,b2,b3)).a1
by A1,FUNCT_4:11 .= b1 by Z1,Z2,Th21;
end;
theorem Th23:
for a1,a2,a3,b1,b2,b3 being set holds
a2 <> a3 & a1 <> a2 & a1 <> a3 implies
rng ((a1,a2,a3)-->(b1,b2,b3)) = {b1,b2,b3}
proof
let a1,a2,a3,b1,b2,b3 be set;
assume Z0: a2 <> a3;
assume Z1: a1 <> a2;
assume Z2: a1 <> a3;
set f = (a1,a2,a3)-->(b1,b2,b3);
thus rng (f) c= {b1,b2,b3}
proof
let x; assume x in rng f; then
consider y such that
A1: y in dom f & x = f.y by FUNCT_1:def 3;
dom f = {a1,a2,a3} by BORSUK_7:21; then
y = a1 or y = a2 or y = a3 by A1,ENUMSET1:def 1; then
x = b1 or x = b2 or x = b3 by A1,Z0,Z1,Z2,Th21;
hence thesis by ENUMSET1:def 1;
end;
let x; assume x in {b1,b2,b3}; then
A2: x = b1 or x = b2 or x = b3 by ENUMSET1:def 1;
A3: a1 in {a1,a2,a3} & a2 in {a1,a2,a3} & a3 in {a1,a2,a3} by ENUMSET1:def 1;
A4: dom f = {a1,a2,a3} by BORSUK_7:21;
f.a1 = b1 & f.a2 = b2 & f.a3 = b3 by Z0,Z1,Z2,Th21;
hence thesis by A2,A3,A4,FUNCT_1:def 3;
end;
theorem Th23a:
for a1,a2,a3,a4,b1,b2,b3,b4 being set holds
a2 <> a3 & a1 <> a2 & a1 <> a3 & a4 <> a1 & a4 <> a2 & a4 <> a3 implies
rng ((a1,a2,a3,a4)-->(b1,b2,b3,b4)) = {b1,b2,b3,b4}
proof
let a1,a2,a3,a4,b1,b2,b3,b4 be set;
assume Z0: a2 <> a3;
assume Z1: a1 <> a2;
assume Z2: a1 <> a3;
assume Z3: a4 <> a1 & a4 <> a2 & a4 <> a3;
set f = (a1,a2,a3,a4)-->(b1,b2,b3,b4);
thus rng (f) c= {b1,b2,b3,b4}
proof
let x; assume x in rng f; then
consider y such that
A1: y in dom f & x = f.y by FUNCT_1:def 3;
dom f = {a1,a2,a3,a4} by Th21a; then
y = a1 or y = a2 or y = a3 or y = a4 by A1,ENUMSET1:def 2; then
x = b1 or x = b2 or x = b3 or x = b4 by A1,Z0,Z1,Z2,Z3,Th21b;
hence thesis by ENUMSET1:def 2;
end;
let x; assume x in {b1,b2,b3,b4}; then
A2: x = b1 or x = b2 or x = b3 or x = b4 by ENUMSET1:def 2;
A3: a1 in {a1,a2,a3,a4} & a2 in {a1,a2,a3,a4} & a3 in {a1,a2,a3,a4} &
a4 in {a1,a2,a3,a4} by ENUMSET1:def 2;
A4: dom f = {a1,a2,a3,a4} by Th21a;
f.a1 = b1 & f.a2 = b2 & f.a3 = b3 & f.a4 = b4 by Z0,Z1,Z2,Z3,Th21b;
hence thesis by A2,A3,A4,FUNCT_1:def 3;
end;
theorem Th24:
for X being set, a1,a2,a3 being element
st a1 in X & a2 in X & a3 in X
holds {a1,a2,a3} c= X
proof
let X be set, a1,a2,a3 be element; assume
A1: a1 in X & a2 in X & a3 in X;
let x; assume x in {a1,a2,a3};
hence thesis by A1,ENUMSET1:def 1;
end;
theorem Th24a:
for X being set, a1,a2,a3,a4 being element
st a1 in X & a2 in X & a3 in X & a4 in X
holds {a1,a2,a3,a4} c= X
proof
let X be set, a1,a2,a3,a4 be element; assume
A1: a1 in X & a2 in X & a3 in X & a4 in X;
let x; assume x in {a1,a2,a3,a4};
hence thesis by A1,ENUMSET1:def 2;
end;
theorem
for X being set, a1,a2,a3,a4,a5,a6 being element
st a1 in X & a2 in X & a3 in X & a4 in X & a5 in X & a6 in X
holds {a1,a2,a3,a4,a5,a6} c= X
proof
let X be set, a1,a2,a3,a4,a5,a6 be element; assume
A1: a1 in X & a2 in X & a3 in X & a4 in X & a5 in X & a6 in X;
let x; assume x in {a1,a2,a3,a4,a5,a6};
hence thesis by A1,ENUMSET1:def 4;
end;
theorem
for X being set, a1,a2,a3,a4,a5,a6,a7,a8,a9 being element
st a1 in X & a2 in X & a3 in X & a4 in X & a5 in X & a6 in X & a7 in X &
a8 in X & a9 in X
holds {a1,a2,a3,a4,a5,a6,a7,a8,a9} c= X
proof
let X be set, a1,a2,a3,a4,a5,a6,a7,a8,a9 be element; assume
A1: a1 in X & a2 in X & a3 in X & a4 in X & a5 in X & a6 in X & a7 in X &
a8 in X & a9 in X;
let x; assume x in {a1,a2,a3,a4,a5,a6,a7,a8,a9};
hence thesis by A1,ENUMSET1:def 7;
end;
theorem Th49a:
for X be set, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 being element
st a1 in X & a2 in X & a3 in X & a4 in X & a5 in X & a6 in X & a7 in X &
a8 in X & a9 in X & a10 in X
holds {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10} c= X
proof
let X be set, a1,a2,a3,a4,a5,a6,a7,a8,a9,b1 be element; assume
A1: a1 in X & a2 in X & a3 in X & a4 in X & a5 in X & a6 in X & a7 in X &
a8 in X & a9 in X & b1 in X;
let x; assume x in {a1,a2,a3,a4,a5,a6,a7,a8,a9,b1};
hence thesis by A1,ENUMSET1:def 8;
end;
theorem
for a1,a2,a3,a4,a5,a6,a7,a8,a9 being element holds
{a1}\/{a2,a3,a4,a5,a6,a7,a8,a9} = {a1,a2,a3,a4,a5,a6,a7,a8,a9}
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9 be element;
thus {a1}\/{a2,a3,a4,a5,a6,a7,a8,a9} c= {a1,a2,a3,a4,a5,a6,a7,a8,a9}
proof
let x; assume x in {a1}\/{a2,a3,a4,a5,a6,a7,a8,a9}; then
x in {a1} or x in {a2,a3,a4,a5,a6,a7,a8,a9} by XBOOLE_0:def 3; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 by TARSKI:def 1,ENUMSET1:def 6;
hence thesis by ENUMSET1:def 7;
end;
let x; assume
x in {a1,a2,a3,a4,a5,a6,a7,a8,a9}; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 by ENUMSET1:def 7; then
x in {a1} or x in {a2,a3,a4,a5,a6,a7,a8,a9} by TARSKI:def 1,ENUMSET1:def 6;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th50a:
for a1,a2,a3,a4,a5,a6,a7,a8,a9,b1 being element holds
{a1}\/{a2,a3,a4,a5,a6,a7,a8,a9,b1} = {a1,a2,a3,a4,a5,a6,a7,a8,a9,b1}
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 be element;
thus {a1}\/{a2,a3,a4,a5,a6,a7,a8,a9,a10}
c= {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10}
proof
let x; assume x in {a1}\/{a2,a3,a4,a5,a6,a7,a8,a9,a10}; then
x in {a1} or x in {a2,a3,a4,a5,a6,a7,a8,a9,a10} by XBOOLE_0:def 3; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 or x = a10 by TARSKI:def 1,ENUMSET1:def 7;
hence thesis by ENUMSET1:def 8;
end;
let x; assume
x in {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10}; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 or x = a10 by ENUMSET1:def 8; then
x in {a1} or x in {a2,a3,a4,a5,a6,a7,a8,a9,a10}
by TARSKI:def 1,ENUMSET1:def 7;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th51:
for a1,a2,a3,a4,a5,a6,a7,a8,a9 being element holds
{a1,a2,a3,a4,a5,a6,a7,a8}\/{a9} = {a1,a2,a3,a4,a5,a6,a7,a8,a9}
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9 be element;
thus {a1,a2,a3,a4,a5,a6,a7,a8}\/{a9} c= {a1,a2,a3,a4,a5,a6,a7,a8,a9}
proof
let x; assume x in {a1,a2,a3,a4,a5,a6,a7,a8}\/{a9}; then
x in {a9} or x in {a1,a2,a3,a4,a5,a6,a7,a8} by XBOOLE_0:def 3; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 by TARSKI:def 1,ENUMSET1:def 6;
hence thesis by ENUMSET1:def 7;
end;
let x; assume
x in {a1,a2,a3,a4,a5,a6,a7,a8,a9}; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 by ENUMSET1:def 7; then
x in {a9} or x in {a1,a2,a3,a4,a5,a6,a7,a8} by TARSKI:def 1,ENUMSET1:def 6;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th51a:
for a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 being element holds
{a1,a2,a3,a4,a5,a6,a7,a8,a9}\/{a10} = {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10}
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 be element;
thus {a1,a2,a3,a4,a5,a6,a7,a8,a9}\/{a10}
c= {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10}
proof
let x; assume x in {a1,a2,a3,a4,a5,a6,a7,a8,a9}\/{a10}; then
x in {a10} or x in {a1,a2,a3,a4,a5,a6,a7,a8,a9} by XBOOLE_0:def 3; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 or x = a10 by TARSKI:def 1,ENUMSET1:def 7;
hence thesis by ENUMSET1:def 8;
end;
let x; assume
x in {a1,a2,a3,a4,a5,a6,a7,a8,a9,a10}; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 or x = a10 by ENUMSET1:def 8; then
x in {a10} or x in {a1,a2,a3,a4,a5,a6,a7,a8,a9}
by TARSKI:def 1,ENUMSET1:def 7;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th52:
for a1,a2,a3,a4,a5,a6,a7,a8,a9 being element holds
{a1,a2,a3}\/{a4,a5,a6,a7,a8,a9} = {a1,a2,a3,a4,a5,a6,a7,a8,a9}
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9 be element;
thus {a1,a2,a3}\/{a4,a5,a6,a7,a8,a9} c= {a1,a2,a3,a4,a5,a6,a7,a8,a9}
proof
let x; assume x in {a1,a2,a3}\/{a4,a5,a6,a7,a8,a9}; then
x in {a1,a2,a3} or x in {a4,a5,a6,a7,a8,a9} by XBOOLE_0:def 3; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 by ENUMSET1:def 1,def 4;
hence thesis by ENUMSET1:def 7;
end;
let x; assume
x in {a1,a2,a3,a4,a5,a6,a7,a8,a9}; then
x = a1 or x = a2 or x = a3 or x = a4 or x = a5 or x = a6 or x = a7 or
x = a8 or x = a9 by ENUMSET1:def 7; then
x in {a1,a2,a3} or x in {a4,a5,a6,a7,a8,a9} by ENUMSET1:def 1,def 4;
hence thesis by XBOOLE_0:def 3;
end;
theorem Th25:
for a1,a2,a3,a4 being set st a1 <> a2 & a1 <> a3 & a1 <> a4 &
a2 <> a3 & a2 <> a4 & a3 <> a4
holds <*a1,a2,a3,a4*> is one-to-one
proof
let a1,a2,a3,a4 be set;
assume Z0: a1 <> a2;
assume Z1: a1 <> a3;
assume Z2: a1 <> a4;
assume Z3: a2 <> a3;
assume Z4: a2 <> a4;
assume Z5: a3 <> a4;
A1: dom <*a1,a2,a3,a4*> = Seg 4 by FINSEQ_1:89;
let x,y; assume x in dom <*a1,a2,a3,a4*>;
then
A2: x = 1 or x = 2 or x = 3 or x = 4 by A1,ENUMSET1:def 2,FINSEQ_3:2;
assume
A4: y in dom <*a1,a2,a3,a4*>;
<*a1,a2,a3,a4*>.1 = a1 & <*a1,a2,a3,a4*>.2 = a2 & <*a1,a2,a3,a4*>.3 = a3 &
<*a1,a2,a3,a4*>.4 = a4 by FINSEQ_4:76;
hence thesis by Z0,Z1,Z2,Z3,Z4,Z5,A2,A1,A4,ENUMSET1:def 2,FINSEQ_3:2;
end;
definition
let a1,a2,a3,a4,a5,a6 be set;
func <*a1,a2,a3,a4,a5,a6*> -> FinSequence equals <*a1,a2,a3,a4,a5*>^<*a6*>;
coherence;
end;
definition
let X be non empty set;
let a1,a2,a3,a4,a5,a6 be Element of X;
redefine func <*a1,a2,a3,a4,a5,a6*> -> FinSequence of X;
coherence
proof
<*a1,a2,a3,a4,a5*>^<*a6*> is FinSequence of X;
hence thesis;
end;
end;
registration
let a1,a2,a3,a4,a5,a6 be set;
cluster <*a1,a2,a3,a4,a5,a6*> -> 6-element;
coherence
proof
thus thesis;
end;
end;
theorem
for a1,a2,a3,a4,a5,a6 being set
for f being FinSequence holds f = <*a1,a2,a3,a4,a5,a6*> iff len f = 6 &
f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5 & f.6 = a6
proof
let a1,a2,a3,a4,a5,a6 be set;
let f be FinSequence;
A0: now
let f be FinSequence;
assume Z0: f = <*a1,a2,a3,a4,a5,a6*>;
hence len f = len <*a1,a2,a3,a4,a5*>+len <*a6*>
by FINSEQ_1:22 .= 5+len <*a6*> by FINSEQ_4:78 .= 5+1 by FINSEQ_1:39
.= 6;
dom <*a1,a2,a3,a4,a5*> = Seg 5 by FINSEQ_1:89; then
1 in dom <*a1,a2,a3,a4,a5*> & 2 in dom <*a1,a2,a3,a4,a5*> &
3 in dom <*a1,a2,a3,a4,a5*> & 4 in dom <*a1,a2,a3,a4,a5*> &
5 in dom <*a1,a2,a3,a4,a5*>; then
f.1 = <*a1,a2,a3,a4,a5*>.1 & f.2 = <*a1,a2,a3,a4,a5*>.2 &
f.3 = <*a1,a2,a3,a4,a5*>.3 & f.4 = <*a1,a2,a3,a4,a5*>.4 &
f.5 = <*a1,a2,a3,a4,a5*>.5 by Z0,FINSEQ_1:def 7;
hence f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5
by FINSEQ_4:78;
A1: len <*a1,a2,a3,a4,a5*> = 5 by FINSEQ_4:78;
1 in Seg 1; then
1 in dom <*a6*> & 5+1 = 6 by FINSEQ_1:89;
hence f.6 = <*a6*>.1 by Z0,A1,FINSEQ_1:def 7 .= a6 by FINSEQ_1:40;
end;
hence f = <*a1,a2,a3,a4,a5,a6*> implies len f = 6 &
f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5 & f.6 = a6;
assume Z1: len f = 6; len <*a1,a2,a3,a4,a5,a6*> = 6 by A0; then
A2: dom f = Seg 6 & dom <*a1,a2,a3,a4,a5,a6*> = Seg 6 by Z1,FINSEQ_1:def 3;
assume Z2: f.1 = a1;
assume Z3: f.2 = a2;
assume Z4: f.3 = a3;
assume Z5: f.4 = a4;
assume Z6: f.5 = a5;
assume Z7: f.6 = a6;
now let x;
assume x in Seg 6; then
x = 1 or x = 2 or x = 3 or x = 4 or x = 5 or x = 6
by FINSEQ_3:4,ENUMSET1:def 4;
hence f.x = <*a1,a2,a3,a4,a5,a6*>.x by A0,Z2,Z3,Z4,Z5,Z6,Z7;
end;
hence f = <*a1,a2,a3,a4,a5,a6*> by A2,FUNCT_1:2;
end;
theorem
for a1,a2,a3,a4,a5,a6 being set holds
rng <*a1,a2,a3,a4,a5,a6*> = {a1,a2,a3,a4,a5,a6}
proof
let a1,a2,a3,a4,a5,a6 be set;
thus rng <*a1,a2,a3,a4,a5,a6*>
= rng <*a1,a2,a3,a4,a5*> \/ rng <*a6*> by FINSEQ_1:31
.= {a1,a2,a3,a4,a5} \/ rng <*a6*> by CIRCCMB3:14
.= {a1,a2,a3,a4,a5} \/ {a6} by FINSEQ_1:39
.= {a1,a2,a3,a4,a5,a6} by ENUMSET1:15;
end;
definition
let a1,a2,a3,a4,a5,a6,a7 be set;
func <*a1,a2,a3,a4,a5,a6,a7*> -> FinSequence equals
<*a1,a2,a3,a4,a5*>^<*a6,a7*>;
coherence;
end;
definition
let X be non empty set;
let a1,a2,a3,a4,a5,a6,a7 be Element of X;
redefine func <*a1,a2,a3,a4,a5,a6,a7*> -> FinSequence of X;
coherence
proof
<*a1,a2,a3,a4,a5*>^<*a6,a7*> is FinSequence of X;
hence thesis;
end;
end;
registration
let a1,a2,a3,a4,a5,a6,a7 be set;
cluster <*a1,a2,a3,a4,a5,a6,a7*> -> 7-element;
coherence
proof
thus thesis;
end;
end;
theorem
for a1,a2,a3,a4,a5,a6,a7 being set
for f being FinSequence holds f = <*a1,a2,a3,a4,a5,a6,a7*> iff len f = 7 &
f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5 & f.6 = a6 & f.7 = a7
proof
let a1,a2,a3,a4,a5,a6,a7 be set;
let f be FinSequence;
A0: now
let f be FinSequence;
assume Z0: f = <*a1,a2,a3,a4,a5,a6,a7*>;
hence len f = len <*a1,a2,a3,a4,a5*>+len <*a6,a7*>
by FINSEQ_1:22 .= 5+len <*a6,a7*> by FINSEQ_4:78 .= 5+2 by FINSEQ_1:44
.= 7;
dom <*a1,a2,a3,a4,a5*> = Seg 5 by FINSEQ_1:89; then
1 in dom <*a1,a2,a3,a4,a5*> & 2 in dom <*a1,a2,a3,a4,a5*> &
3 in dom <*a1,a2,a3,a4,a5*> & 4 in dom <*a1,a2,a3,a4,a5*> &
5 in dom <*a1,a2,a3,a4,a5*>; then
f.1 = <*a1,a2,a3,a4,a5*>.1 & f.2 = <*a1,a2,a3,a4,a5*>.2 &
f.3 = <*a1,a2,a3,a4,a5*>.3 & f.4 = <*a1,a2,a3,a4,a5*>.4 &
f.5 = <*a1,a2,a3,a4,a5*>.5 by Z0,FINSEQ_1:def 7;
hence f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5
by FINSEQ_4:78;
A1: len <*a1,a2,a3,a4,a5*> = 5 by FINSEQ_4:78;
A2: 1 in Seg 2 & 2 in Seg 2; then
1 in dom <*a6,a7*> & 5+1 = 6 by FINSEQ_1:89;
hence f.6 = <*a6,a7*>.1 by Z0,A1,FINSEQ_1:def 7 .= a6 by FINSEQ_1:44;
2 in dom <*a6,a7*> & 5+2 = 7 by A2,FINSEQ_1:89;
hence f.7 = <*a6,a7*>.2 by Z0,A1,FINSEQ_1:def 7 .= a7 by FINSEQ_1:44;
end;
hence f = <*a1,a2,a3,a4,a5,a6,a7*> implies len f = 7 &
f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5 & f.6 = a6 & f.7=a7;
assume Z1: len f = 7; len <*a1,a2,a3,a4,a5,a6,a7*> = 7 by A0; then
A2: dom f = Seg 7 & dom <*a1,a2,a3,a4,a5,a6,a7*> = Seg 7 by Z1,FINSEQ_1:def 3;
assume Z2: f.1 = a1;
assume Z3: f.2 = a2;
assume Z4: f.3 = a3;
assume Z5: f.4 = a4;
assume Z6: f.5 = a5;
assume Z7: f.6 = a6;
assume Z8: f.7 = a7;
now let x;
assume x in Seg 7; then
x = 1 or x = 2 or x = 3 or x = 4 or x = 5 or x = 6 or x = 7
by FINSEQ_3:5,ENUMSET1:def 5;
hence f.x = <*a1,a2,a3,a4,a5,a6,a7*>.x by A0,Z2,Z3,Z4,Z5,Z6,Z7,Z8;
end;
hence f = <*a1,a2,a3,a4,a5,a6,a7*> by A2,FUNCT_1:2;
end;
theorem
for a1,a2,a3,a4,a5,a6,a7 being set holds
rng <*a1,a2,a3,a4,a5,a6,a7*> = {a1,a2,a3,a4,a5,a6,a7}
proof
let a1,a2,a3,a4,a5,a6,a7 be set;
thus rng <*a1,a2,a3,a4,a5,a6,a7*>
= rng <*a1,a2,a3,a4,a5*> \/ rng <*a6,a7*> by FINSEQ_1:31
.= {a1,a2,a3,a4,a5} \/ rng <*a6,a7*> by CIRCCMB3:14
.= {a1,a2,a3,a4,a5} \/ {a6,a7} by FINSEQ_2:127
.= {a1,a2,a3,a4,a5,a6,a7} by ENUMSET1:20;
end;
definition
let a1,a2,a3,a4,a5,a6,a7,a8 be set;
func <*a1,a2,a3,a4,a5,a6,a7,a8*> -> FinSequence equals
<*a1,a2,a3,a4,a5*>^<*a6,a7,a8*>;
coherence;
end;
definition
let X be non empty set;
let a1,a2,a3,a4,a5,a6,a7,a8 be Element of X;
redefine func <*a1,a2,a3,a4,a5,a6,a7,a8*> -> FinSequence of X;
coherence
proof
<*a1,a2,a3,a4,a5*>^<*a6,a7,a8*> is FinSequence of X;
hence thesis;
end;
end;
registration
let a1,a2,a3,a4,a5,a6,a7,a8 be set;
cluster <*a1,a2,a3,a4,a5,a6,a7,a8*> -> 8-element;
coherence
proof
thus thesis;
end;
end;
theorem Th6b:
for a1,a2,a3,a4,a5,a6,a7,a8 being set
for f being FinSequence holds f = <*a1,a2,a3,a4,a5,a6,a7,a8*> iff len f = 8 &
f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5 & f.6 = a6 & f.7 = a7 &
f.8 = a8
proof
let a1,a2,a3,a4,a5,a6,a7,a8 be set;
let f be FinSequence;
A0: now
let f be FinSequence;
assume Z0: f = <*a1,a2,a3,a4,a5,a6,a7,a8*>;
hence len f = len <*a1,a2,a3,a4,a5*>+len <*a6,a7,a8*>
by FINSEQ_1:22 .= 5+len <*a6,a7,a8*> by FINSEQ_4:78 .= 5+3 by FINSEQ_1:45
.= 8;
dom <*a1,a2,a3,a4,a5*> = Seg 5 by FINSEQ_1:89; then
1 in dom <*a1,a2,a3,a4,a5*> & 2 in dom <*a1,a2,a3,a4,a5*> &
3 in dom <*a1,a2,a3,a4,a5*> & 4 in dom <*a1,a2,a3,a4,a5*> &
5 in dom <*a1,a2,a3,a4,a5*>; then
f.1 = <*a1,a2,a3,a4,a5*>.1 & f.2 = <*a1,a2,a3,a4,a5*>.2 &
f.3 = <*a1,a2,a3,a4,a5*>.3 & f.4 = <*a1,a2,a3,a4,a5*>.4 &
f.5 = <*a1,a2,a3,a4,a5*>.5 by Z0,FINSEQ_1:def 7;
hence f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5
by FINSEQ_4:78;
A1: len <*a1,a2,a3,a4,a5*> = 5 by FINSEQ_4:78;
A2: 1 in Seg 3 & 2 in Seg 3 & 3 in Seg 3; then
1 in dom <*a6,a7,a8*> & 5+1 = 6 by FINSEQ_1:89;
hence f.6 = <*a6,a7,a8*>.1 by Z0,A1,FINSEQ_1:def 7 .= a6 by FINSEQ_1:45;
2 in dom <*a6,a7,a8*> & 5+2 = 7 by A2,FINSEQ_1:89;
hence f.7 = <*a6,a7,a8*>.2 by Z0,A1,FINSEQ_1:def 7 .= a7 by FINSEQ_1:45;
3 in dom <*a6,a7,a8*> & 5+3 = 8 by A2,FINSEQ_1:89;
hence f.8 = <*a6,a7,a8*>.3 by Z0,A1,FINSEQ_1:def 7 .= a8 by FINSEQ_1:45;
end;
hence f = <*a1,a2,a3,a4,a5,a6,a7,a8*> implies len f = 8 &
f.1 = a1 & f.2 = a2 & f.3 = a3 & f.4 = a4 & f.5 = a5 & f.6 = a6 & f.7=a7 &
f.8 = a8;
assume Z1: len f = 8; len <*a1,a2,a3,a4,a5,a6,a7,a8*> = 8 by A0; then
A2: dom f = Seg 8 & dom <*a1,a2,a3,a4,a5,a6,a7,a8*> = Seg 8
by Z1,FINSEQ_1:def 3;
assume Z2: f.1 = a1;
assume Z3: f.2 = a2;
assume Z4: f.3 = a3;
assume Z5: f.4 = a4;
assume Z6: f.5 = a5;
assume Z7: f.6 = a6;
assume Z8: f.7 = a7;
assume Z9: f.8 = a8;
now let x;
assume x in Seg 8; then
x = 1 or x = 2 or x = 3 or x = 4 or x = 5 or x = 6 or x = 7 or x = 8
by FINSEQ_3:6,ENUMSET1:def 6;
hence f.x = <*a1,a2,a3,a4,a5,a6,a7,a8*>.x by A0,Z2,Z3,Z4,Z5,Z6,Z7,Z8,Z9;
end;
hence f = <*a1,a2,a3,a4,a5,a6,a7,a8*> by A2,FUNCT_1:2;
end;
theorem Th5b:
for a1,a2,a3,a4,a5,a6,a7,a8 being set holds
rng <*a1,a2,a3,a4,a5,a6,a7,a8*> = {a1,a2,a3,a4,a5,a6,a7,a8}
proof
let a1,a2,a3,a4,a5,a6,a7,a8 be set;
thus rng <*a1,a2,a3,a4,a5,a6,a7,a8*>
= rng <*a1,a2,a3,a4,a5*> \/ rng <*a6,a7,a8*> by FINSEQ_1:31
.= {a1,a2,a3,a4,a5} \/ rng <*a6,a7,a8*> by CIRCCMB3:14
.= {a1,a2,a3,a4,a5} \/ {a6,a7,a8} by FINSEQ_2:128
.= {a1,a2,a3,a4,a5,a6,a7,a8} by ENUMSET1:26;
end;
theorem Th5c:
for a1,a2,a3,a4,a5,a6,a7,a8,a9 being set holds
rng(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>) = {a1,a2,a3,a4,a5,a6,a7,a8,a9}
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9 be set;
thus rng(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>)
= rng <*a1,a2,a3,a4,a5,a6,a7,a8*> \/ rng <*a9*> by FINSEQ_1:31
.= {a1,a2,a3,a4,a5,a6,a7,a8} \/ rng <*a9*> by Th5b
.= {a1,a2,a3,a4,a5,a6,a7,a8} \/ {a9} by FINSEQ_1:38
.= {a1,a2,a3,a4,a5,a6,a7,a8,a9} by Th51;
end;
theorem Th60a:
Seg 9 = {1,2,3,4,5,6,7,8,9}
proof
thus Seg 9 = Seg 8 \/ {8+1} by FINSEQ_1:9
.= {1,2,3,4,5,6,7,8,9} by FINSEQ_3:6,Th51;
end;
theorem Th60b:
Seg 10 = {1,2,3,4,5,6,7,8,9,10}
proof
thus Seg 10 = Seg 9 \/ {9+1} by FINSEQ_1:9
.= {1,2,3,4,5,6,7,8,9,10} by Th60a,Th51a;
end;
theorem Th60:
for a1,a2,a3,a4,a5,a6,a7,a8,a9 being set holds
dom (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>) = Seg 9 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).1 = a1 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).2 = a2 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).3 = a3 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).4 = a4 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).5 = a5 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).6 = a6 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).7 = a7 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).8 = a8 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).9 = a9
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9 be set;
thus dom (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>)
= Seg (len <*a1,a2,a3,a4,a5,a6,a7,a8*> + len <*a9*>) by FINSEQ_1:def 7
.= Seg (8+len <*a9*>) by Th6b
.= Seg (8+1) by FINSEQ_1:40 .= Seg 9;
A1: len <*a1,a2,a3,a4,a5,a6,a7,a8*> = 8 by Th6b; then
1 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).1
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.1 by FINSEQ_1:def 7 .= a1 by Th6b;
2 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).2
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.2 by FINSEQ_1:def 7 .= a2 by Th6b;
3 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).3
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.3 by FINSEQ_1:def 7 .= a3 by Th6b;
4 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).4
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.4 by FINSEQ_1:def 7 .= a4 by Th6b;
5 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).5
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.5 by FINSEQ_1:def 7 .= a5 by Th6b;
6 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).6
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.6 by FINSEQ_1:def 7 .= a6 by Th6b;
7 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).7
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.7 by FINSEQ_1:def 7 .= a7 by Th6b;
8 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).8
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.8 by FINSEQ_1:def 7 .= a8 by Th6b;
len <*a9*> = 1 by FINSEQ_1:40; then
1 in dom <*a9*> by FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9*>).9
= <*a9*>.1 by A1,FINSEQ_1:def 7 .= a9 by FINSEQ_1:40;
end;
theorem Th61:
for a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 being set holds
dom (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>) = Seg 10 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).1 = a1 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).2 = a2 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).3 = a3 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).4 = a4 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).5 = a5 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).6 = a6 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).7 = a7 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).8 = a8 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).9 = a9 &
(<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).10 = a10
proof
let a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 be set;
thus dom (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>)
= Seg (len <*a1,a2,a3,a4,a5,a6,a7,a8*> + len <*a9,a10*>) by FINSEQ_1:def 7
.= Seg (8+len <*a9,a10*>) by Th6b
.= Seg (8+2) by FINSEQ_1:44 .= Seg 10;
A1: len <*a1,a2,a3,a4,a5,a6,a7,a8*> = 8 by Th6b; then
1 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).1
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.1 by FINSEQ_1:def 7 .= a1 by Th6b;
2 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).2
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.2 by FINSEQ_1:def 7 .= a2 by Th6b;
3 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).3
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.3 by FINSEQ_1:def 7 .= a3 by Th6b;
4 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).4
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.4 by FINSEQ_1:def 7 .= a4 by Th6b;
5 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).5
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.5 by FINSEQ_1:def 7 .= a5 by Th6b;
6 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).6
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.6 by FINSEQ_1:def 7 .= a6 by Th6b;
7 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).7
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.7 by FINSEQ_1:def 7 .= a7 by Th6b;
8 in dom <*a1,a2,a3,a4,a5,a6,a7,a8*> by A1,FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).8
= <*a1,a2,a3,a4,a5,a6,a7,a8*>.8 by FINSEQ_1:def 7 .= a8 by Th6b;
len <*a9,a10*> = 2 by FINSEQ_1:44; then
1 in dom <*a9,a10*> & 9 = 8+1 by FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).9
= <*a9,a10*>.1 by A1,FINSEQ_1:def 7 .= a9 by FINSEQ_1:44;
len <*a9,a10*> = 2 by FINSEQ_1:44; then
2 in dom <*a9,a10*> by FINSEQ_3:25;
hence (<*a1,a2,a3,a4,a5,a6,a7,a8*>^<*a9,a10*>).10
= <*a9,a10*>.2 by A1,FINSEQ_1:def 7 .= a10 by FINSEQ_1:44;
end;
definition
let I,J be set;
let S be ManySortedSet of I;
mode ManySortedMSSet of S,J -> ManySortedFunction of I means: MSMS1:
for i,j being element st i in I holds dom(it.i) = S.i &
(j in S.i implies it.i.j is ManySortedSet of J);
existence
proof
set f = the ManySortedSet of J;
deffunc F(element) = S.$1 --> f;
consider X being ManySortedSet of I such that
A1: for x st x in I holds X.x = F(x) from PBOOLE:sch 4;
X is Function-yielding
proof
let x; assume x in dom X; then
x in I by PARTFUN1:def 2; then
X.x = F(x) by A1;
hence thesis;
end; then
reconsider X as ManySortedFunction of I;
take X;
let i,j be element; assume
A2: i in I; then
X.i = F(i) by A1;
hence dom(X.i) = S.i by FUNCOP_1:13;
assume j in S.i; then
X.i = F(i) & F(i).j = f by A1,A2,FUNCOP_1:7;
hence thesis;
end;
end;
definition
let I,J be set;
let S1 be ManySortedSet of I;
let S2 be ManySortedSet of J;
mode ManySortedMSSet of S1,S2 -> ManySortedMSSet of S1,J means: MSMS:
for i,a being set st i in I & a in S1.i
holds it.i.a is ManySortedSubset of S2;
existence
proof
set f = the ManySortedSubset of S2;
deffunc F(element) = S1.$1 --> f;
consider X being ManySortedSet of I such that
A1: for x st x in I holds X.x = F(x) from PBOOLE:sch 4;
X is Function-yielding
proof
let x; assume x in dom X; then
x in I by PARTFUN1:def 2; then
X.x = F(x) by A1;
hence thesis;
end; then
reconsider X as ManySortedFunction of I;
X is ManySortedMSSet of S1,J
proof
let i,j be element; assume
A2: i in I; then
X.i = F(i) by A1;
hence dom(X.i) = S1.i by FUNCOP_1:13;
assume j in S1.i; then
X.i = F(i) & F(i).j = f by A1,A2,FUNCOP_1:7;
hence thesis;
end; then
reconsider X as ManySortedMSSet of S1,J;
take X;
let i,j be set; assume i in I & j in S1.i; then
X.i = F(i) & F(i).j = f by A1,FUNCOP_1:7;
hence thesis;
end;
end;
registration
let I be set;
let X,Y be ManySortedSet of I;
let f be ManySortedMSSet of X,Y;
let x,y being set;
cluster f.x.y -> Function-like Relation-like;
coherence
proof
(x in dom f or x nin dom f) & dom f = I by PARTFUN1:def 2; then
x in I & dom(f.x) = X.x & (y in X.x or y nin X.x) or f.x = {} & dom {} = {}
by MSMS1,FUNCT_1:def 2;
hence thesis by MSMS1,FUNCT_1:def 2;
end;
end;
definition
let S be ManySortedSign;
let o,a be element;
let r be Element of S;
pred o is_of_type a,r means: TYPEOF:
(the Arity of S).o = a & (the ResultSort of S).o = r;
end;
theorem ThType:
for S being non void non empty ManySortedSign
for o being OperSymbol of S, r being SortSymbol of S, a being element holds
o is_of_type a,r iff the_arity_of o = a & the_result_sort_of o = r by TYPEOF;
theorem Th0:
for S being non void non empty ManySortedSign
for o being OperSymbol of S
for r being SortSymbol of S st o is_of_type {}, r
for A being MSAlgebra over S
st (the Sorts of A).r <> {}
holds Den(In(o, the carrier' of S), A).{} is
Element of (the Sorts of A).r
proof
let S be non void non empty ManySortedSign;
let o be OperSymbol of S;
let r be SortSymbol of S;
assume
Z0: (the Arity of S).o = {} & (the ResultSort of S).o = r;
reconsider s = o as OperSymbol of S;
A2: In(o, the carrier' of S) = o by SUBSET_1:def 8;
let A be MSAlgebra over S;
assume Z2: (the Sorts of A).r <> {};
Aa: <*>the carrier of S in (the carrier of S)* by FINSEQ_1:def 11;
((the Sorts of A)#*the Arity of S).o
= (the Sorts of A)#.{} by Z0,FUNCT_2:15
.= product ((the Sorts of A)*{}) by Aa,FINSEQ_2:def 5
.= product {}; then
A6: {} in Args(s, A) by CARD_3:10,TARSKI:def 1;
Result(s, A) = (the Sorts of A).the_result_sort_of s by FUNCT_2:15;
hence Den(In(o, the carrier' of S), A).{} is
Element of (the Sorts of A).r by A2,Z0,Z2,A6,FUNCT_2:5;
end;
theorem Th1:
for S being non void non empty ManySortedSign
for o,a being element
for r being SortSymbol of S st o is_of_type <*a*>, r
for A being MSAlgebra over S
st (the Sorts of A).a <> {} & (the Sorts of A).r <> {}
for x being Element of (the Sorts of A).a
holds Den(In(o, the carrier' of S), A).<*x*> is
Element of (the Sorts of A).r
proof
let S be non void non empty ManySortedSign;
let o,a be element;
let r be SortSymbol of S;
assume
Z0: (the Arity of S).o = <*a*> & (the ResultSort of S).o = r; then
A1: o in dom the Arity of S & dom the Arity of S c= the carrier' of S
by FUNCT_1:def 2,RELAT_1:def 18; then
reconsider s = o as OperSymbol of S;
reconsider aa = a as set by TARSKI:1;
A2: In(o, the carrier' of S) = o by A1,SUBSET_1:def 8;
let A be MSAlgebra over S;
assume Z1: (the Sorts of A).a <> {};
assume Z2: (the Sorts of A).r <> {};
let x be Element of (the Sorts of A).a;
V1: <*aa*> = the_arity_of s by Z0;
A5: dom the Sorts of A = the carrier of S by PARTFUN1:def 2;
((the Sorts of A)#*the Arity of S).o
= (the Sorts of A)#.<*a*> by Z0,A1,FUNCT_2:15
.= product ((the Sorts of A)*<*a*>) by V1,FINSEQ_2:def 5
.= product <*(the Sorts of A).a*> by V1,FUNCT_7:18,A5,FINSEQ_2:34; then
A6: <*x*> in Args(s, A) by Z1,FINSEQ_3:123;
Result(s, A) = (the Sorts of A).the_result_sort_of s by FUNCT_2:15;
hence Den(In(o, the carrier' of S), A).<*x*> is
Element of (the Sorts of A).r by A2,Z0,Z2,A6,FUNCT_2:5;
end;
theorem Th2:
for S being non void non empty ManySortedSign
for o,a,b being element
for r being SortSymbol of S st o is_of_type <*a,b*>, r
for A being MSAlgebra over S
st (the Sorts of A).a <> {} & (the Sorts of A).b <> {} &
(the Sorts of A).r <> {}
for x being Element of (the Sorts of A).a
for y being Element of (the Sorts of A).b
holds Den(In(o, the carrier' of S), A).<*x,y*> is
Element of (the Sorts of A).r
proof
let S be non void non empty ManySortedSign;
let o,a,b be element;
let r be SortSymbol of S;
assume
Z0: (the Arity of S).o = <*a,b*> & (the ResultSort of S).o = r; then
A1: o in dom the Arity of S & dom the Arity of S c= the carrier' of S
by FUNCT_1:def 2,RELAT_1:def 18; then
reconsider s = o as OperSymbol of S;
A2: In(o, the carrier' of S) = o by A1,SUBSET_1:def 8;
let A be MSAlgebra over S;
assume Z1: (the Sorts of A).a <> {};
assume Z2: (the Sorts of A).b <> {};
assume Z3: (the Sorts of A).r <> {};
let x be Element of (the Sorts of A).a;
let y be Element of (the Sorts of A).b;
A0: <*a,b*> = the_arity_of s by Z0;
dom the Sorts of A = the carrier of S by PARTFUN1:def 2; then
A7: the Sorts of A is Function of the carrier of S, rng the Sorts of A &
rng the Sorts of A <> {} by FUNCT_2:2;
((the Sorts of A)#*the Arity of S).o
= (the Sorts of A)#.<*a,b*> by Z0,A1,FUNCT_2:15
.= product ((the Sorts of A)*<*a,b*>) by A0,FINSEQ_2:def 5
.= product <*(the Sorts of A).a, (the Sorts of A).b*>
by A0,A7,FINSEQ_2:36; then
A6: <*x,y*> in Args(s, A) by Z1,Z2,FINSEQ_3:124;
Result(s, A) = (the Sorts of A).the_result_sort_of s by FUNCT_2:15;
hence Den(In(o, the carrier' of S), A).<*x,y*> is
Element of (the Sorts of A).r by A2,Z0,Z3,A6,FUNCT_2:5;
end;
theorem Th3:
for S being non void non empty ManySortedSign
for o,a,b,c being element
for r being SortSymbol of S st o is_of_type <*a,b,c*>, r
for A being MSAlgebra over S
st (the Sorts of A).a <> {} & (the Sorts of A).b <> {} &
(the Sorts of A).c <> {} & (the Sorts of A).r <> {}
for x being Element of (the Sorts of A).a
for y being Element of (the Sorts of A).b
for z being Element of (the Sorts of A).c
holds Den(In(o, the carrier' of S), A).<*x,y,z*> is
Element of (the Sorts of A).r
proof
let S be non void non empty ManySortedSign;
let o,a,b,c be element;
let r be SortSymbol of S;
assume
Z0: (the Arity of S).o = <*a,b,c*> & (the ResultSort of S).o = r; then
A1: o in dom the Arity of S & dom the Arity of S c= the carrier' of S
by FUNCT_1:def 2,RELAT_1:def 18; then
reconsider s = o as OperSymbol of S;
A2: In(o, the carrier' of S) = o by A1,SUBSET_1:def 8;
let A be MSAlgebra over S;
assume Z1: (the Sorts of A).a <> {};
assume Z2: (the Sorts of A).b <> {};
assume Z2a: (the Sorts of A).c <> {};
assume Z3: (the Sorts of A).r <> {};
let x be Element of (the Sorts of A).a;
let y be Element of (the Sorts of A).b;
let z be Element of (the Sorts of A).c;
A0: <*a,b,c*> = the_arity_of s by Z0;
dom the Sorts of A = the carrier of S by PARTFUN1:def 2; then
A7: the Sorts of A is Function of the carrier of S, rng the Sorts of A &
rng the Sorts of A <> {} by FUNCT_2:2;
((the Sorts of A)#*the Arity of S).o
= (the Sorts of A)#.<*a,b,c*> by Z0,A1,FUNCT_2:15
.= product ((the Sorts of A)*<*a,b,c*>) by A0,FINSEQ_2:def 5
.= product <*(the Sorts of A).a, (the Sorts of A).b, (the Sorts of A).c*>
by A0,A7,FINSEQ_2:37; then
A6: <*x,y,z*> in Args(s, A) by Z1,Z2,Z2a,FINSEQ_3:125;
Result(s, A) = (the Sorts of A).the_result_sort_of s by FUNCT_2:15;
hence Den(In(o, the carrier' of S), A).<*x,y,z*> is
Element of (the Sorts of A).r by A2,Z0,Z3,A6,FUNCT_2:5;
end;
theorem Th77:
for S1,S2 being ManySortedSign
st the ManySortedSign of S1 = the ManySortedSign of S2
for o,a be set, r1 be Element of S1 for r2 being Element of S2 st r1 = r2
holds o is_of_type a,r1 implies o is_of_type a,r2
proof
let S1,S2 be ManySortedSign;
assume Z0: the ManySortedSign of S1 = the ManySortedSign of S2;
let o,a be set;
let r1 be Element of S1;
let r2 be Element of S2;
assume Z1: r1 = r2;
assume (the Arity of S1).o = a & (the ResultSort of S1).o = r1;
hence (the Arity of S2).o = a & (the ResultSort of S2).o = r2 by Z0,Z1;
end;
theorem Arg0:
for o being OperSymbol of S, r being SortSymbol of S,
A being MSAlgebra over S holds
o is_of_type {},r implies {} in Args(o,A)
proof
let o be OperSymbol of S;
let r be SortSymbol of S;
let A be MSAlgebra over S;
assume Z0: (the Arity of S).o = {} & (the ResultSort of S).o = r;
Args(o,A) = product ((the Sorts of A)*the_arity_of o) by PRALG_2:3
.= {{}} by Z0,CARD_3:10;
hence {} in Args(o,A) by TARSKI:def 1;
end;
theorem Arg1:
for o being OperSymbol of S, s,r being SortSymbol of S,
A being MSAlgebra over S holds
o is_of_type <*s*>,r & x in (the Sorts of A).s implies <*x*> in Args(o,A)
proof
let o be OperSymbol of S;
let s,r be SortSymbol of S;
let A be MSAlgebra over S;
assume Z0: (the Arity of S).o = <*s*> & (the ResultSort of S).o = r;
assume Z1: x in (the Sorts of A).s;
A1: dom the Sorts of A = the carrier of S by PARTFUN1:def 2;
Args(o,A) = product ((the Sorts of A)*the_arity_of o) by PRALG_2:3
.= product <*(the Sorts of A).s*> by Z0,A1,FINSEQ_2:34;
hence <*x*> in Args(o,A) by Z1,FINSEQ_3:123;
end;
Lm2:
now
let I be set;
let A being ManySortedSet of I;
A1: dom A = I by PARTFUN1:def 2;
rng A c= bool Union A
proof
let x; reconsider X = x as set by TARSKI:1;
assume x in rng A;
then X c= union rng A = Union A by ZFMISC_1:74,CARD_3:def 4;
hence thesis;
end;
hence A is Function of I, bool Union A by A1,FUNCT_2:2;
end;
theorem Arg2:
for o being OperSymbol of S, s1,s2,r being SortSymbol of S,
A being MSAlgebra over S holds
o is_of_type <*s1,s2*>,r &
x in (the Sorts of A).s1 & y in (the Sorts of A).s2
implies <*x,y*> in Args(o,A)
proof
let o be OperSymbol of S;
let s1,s2,r be SortSymbol of S;
let A be MSAlgebra over S;
assume Z0: (the Arity of S).o = <*s1,s2*> & (the ResultSort of S).o = r;
assume Z1: x in (the Sorts of A).s1 & y in (the Sorts of A).s2;
then reconsider x as Element of (the Sorts of A).s1;
reconsider y as Element of (the Sorts of A).s2 by Z1;
A2: the Sorts of A is Function of the carrier of S, bool Union the Sorts of A
by Lm2;
A1: dom the Sorts of A = the carrier of S by PARTFUN1:def 2;
Args(o,A) = product ((the Sorts of A)*the_arity_of o) by PRALG_2:3
.= product <*(the Sorts of A).s1,(the Sorts of A).s2*>
by Z0,A1,A2,FINSEQ_2:36;
hence thesis by Z1,FINSEQ_3:124;
end;
theorem Arg3:
for o being OperSymbol of S, s1,s2,s3,r being SortSymbol of S,
A being MSAlgebra over S holds
o is_of_type <*s1,s2,s3*>,r & x in (the Sorts of A).s1 &
y in (the Sorts of A).s2 & z in (the Sorts of A).s3
implies <*x,y,z*> in Args(o,A)
proof
let o be OperSymbol of S;
let s1,s2,s3,r be SortSymbol of S;
let A be MSAlgebra over S;
assume Z0: (the Arity of S).o = <*s1,s2,s3*> & (the ResultSort of S).o = r;
assume Z1: x in (the Sorts of A).s1 & y in (the Sorts of A).s2 &
z in (the Sorts of A).s3;
A1: dom the Sorts of A = the carrier of S by PARTFUN1:def 2;
A2: the Sorts of A is Function of the carrier of S, bool Union the Sorts of A
by Lm2;
Args(o,A) = product ((the Sorts of A)*the_arity_of o) by PRALG_2:3
.= product <*(the Sorts of A).s1,(the Sorts of A).s2,(the Sorts of A).s3*>
by Z0,A1,A2,FINSEQ_2:37;
hence <*x,y,z*> in Args(o,A) by Z1,FINSEQ_3:125;
end;
begin :: Free Variables
definition
let S be non empty non void ManySortedSign;
struct (MSAlgebra over S) VarMSAlgebra over S (#
Sorts -> ManySortedSet of the carrier of S,
Charact -> ManySortedFunction of (the Sorts)# * the Arity of S,
the Sorts * the ResultSort of S,
free-vars -> ManySortedMSSet of the Sorts, the Sorts
#);
end;
registration
let S be non empty non void ManySortedSign;
let U be non-empty ManySortedSet of the carrier of S;
let C be ManySortedFunction of U# * the Arity of S,
U * the ResultSort of S;
let v be ManySortedMSSet of U,U;
cluster VarMSAlgebra(#U, C, v#) -> non-empty;
coherence
proof
thus the Sorts of VarMSAlgebra(#U, C, v#) is non-empty;
end;
end;
registration
let S be non empty non void ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
cluster non-empty (X,S)-terms for strict VarMSAlgebra over S;
existence
proof
set v = the ManySortedMSSet of the Sorts of Free(S,X),
the Sorts of Free(S,X);
take A=VarMSAlgebra(#the Sorts of Free(S,X), the Charact of Free(S,X), v#);
thus A is non-empty;
thus the Sorts of A is ManySortedSubset of the Sorts of Free(S,X)
proof
thus the Sorts of A c= the Sorts of Free(S,X);
end;
end;
end;
registration
let S be non empty non void ManySortedSign;
cluster non-empty disjoint_valued for VarMSAlgebra over S;
existence
proof
set A = the non-empty disjoint_valued MSAlgebra over S;
set v = the ManySortedMSSet of the Sorts of A, the Sorts of A;
take V = VarMSAlgebra(#the Sorts of A,the Charact of A,v#);
thus the Sorts of V is non-empty;
thus the Sorts of V is disjoint_valued;
end;
let X be non-empty ManySortedSet of the carrier of S;
cluster all_vars_including -> non-empty for (X,S)-terms VarMSAlgebra over S;
coherence;
end;
definition
let S be non empty non void ManySortedSign;
let A be non-empty VarMSAlgebra over S;
let a be SortSymbol of S;
let t be Element of A,a;
func vf t -> ManySortedSubset of the Sorts of A equals
(the free-vars of A).a.t;
coherence by MSMS;
end;
definition
let S be non empty non void ManySortedSign;
let A be non-empty VarMSAlgebra over S;
attr A is vf-correct means
for o being OperSymbol of S
for p being FinSequence st p in Args(o,A)
for b being Element of A, the_result_sort_of o st b = Den(o,A).p
for s being SortSymbol of S holds (vf b).s c= union {(vf a).s where s0 is
SortSymbol of S, a is Element of A,s0: ex i being Nat st
i in dom the_arity_of o & s0 = (the_arity_of o).i & a = p.i};
end;
theorem Th8A:
for S being non empty non void ManySortedSign
for A,B being MSAlgebra over S st the MSAlgebra of A = the MSAlgebra of B
for G being MSSubset of A
for H being MSSubset of B st G = H
holds GenMSAlg G = GenMSAlg H
proof
let S be non empty non void ManySortedSign;
let A,B be MSAlgebra over S such that
A1: the MSAlgebra of A = the MSAlgebra of B;
let G be MSSubset of A;
let H be MSSubset of B such that
A2: G = H;
A3: G is MSSubset of GenMSAlg G & H is MSSubset of GenMSAlg H
by MSUALG_2:def 17;
GenMSAlg G is MSSubAlgebra of B & GenMSAlg H is MSSubAlgebra of A
by A1,MSAFREE4:28;
then GenMSAlg G is MSSubAlgebra of GenMSAlg H &
GenMSAlg H is MSSubAlgebra of GenMSAlg G by A2,A3,MSUALG_2:def 17;
hence GenMSAlg G = GenMSAlg H by MSUALG_2:7;
end;
theorem Th9A:
for S being non empty non void ManySortedSign
for A,B being MSAlgebra over S st the MSAlgebra of A = the MSAlgebra of B
for G being GeneratorSet of A holds G is GeneratorSet of B
proof
let S be non empty non void ManySortedSign;
let A,B be MSAlgebra over S such that
A1: the MSAlgebra of A = the MSAlgebra of B;
let G be GeneratorSet of A;
reconsider H = G as MSSubset of B by A1;
GenMSAlg H = GenMSAlg G by A1,Th8A;
hence G is GeneratorSet of B by A1,MSAFREE:def 4;
end;
theorem Th10A:
for S being non empty non void ManySortedSign
for A,B being non-empty MSAlgebra over S
st the MSAlgebra of A = the MSAlgebra of B
for G being GeneratorSet of A
for H being GeneratorSet of B st G = H
holds G is free implies H is free
proof
let S be non empty non void ManySortedSign;
let A,B be non-empty MSAlgebra over S such that
A1: the MSAlgebra of A = the MSAlgebra of B;
let G be GeneratorSet of A;
let H be GeneratorSet of B; assume
A2: G = H;
assume
A3: for U1 be non-empty MSAlgebra over S
for f be ManySortedFunction of G,the Sorts of U1
ex h be ManySortedFunction of A,U1 st
h is_homomorphism A,U1 & h || G = f;
let U1 be non-empty MSAlgebra over S;
let f be ManySortedFunction of H,the Sorts of U1;
consider h being ManySortedFunction of A,U1 such that
A4: h is_homomorphism A,U1 & h || G = f by A2,A3;
reconsider g = h as ManySortedFunction of B,U1 by A1;
take g;
the MSAlgebra of U1 = the MSAlgebra of U1;
hence g is_homomorphism B,U1 by A1,A4,MSAFREE4:30;
thus g || H = f by A1,A2,A4;
end;
registration
let S be non empty non void ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
cluster all_vars_including inheriting_operations free_in_itself
for non-empty (X,S)-terms strict VarMSAlgebra over S;
existence
proof
set v = the ManySortedMSSet of the Sorts of Free(S,X),
the Sorts of Free(S,X);
set A=VarMSAlgebra(#the Sorts of Free(S,X), the Charact of Free(S,X), v#);
A is X,S-terms
proof
thus the Sorts of A is ManySortedSubset of the Sorts of Free(S,X)
proof
thus the Sorts of A c= the Sorts of Free(S,X);
end;
end;
then reconsider A as non-empty (X,S)-terms strict VarMSAlgebra over S;
take A;
A0: the MSAlgebra of A = FreeMSA X by MSAFREE3:31;
thus FreeGen X is ManySortedSubset of the Sorts of A &
for o being OperSymbol of S, p being FinSequence holds
(p in Args(o, Free(S,X)) &
Den(o,Free(S,X)).p in (the Sorts of A).the_result_sort_of o implies
p in Args(o,A) & Den(o,A).p = Den(o,Free(S,X)).p) by MSAFREE3:31;
let f be ManySortedFunction of FreeGen X, the Sorts of A;
let G be MSSubset of A; assume
A1: G = FreeGen X; then
reconsider F = G as non-empty GeneratorSet of the MSAlgebra of A
by MSAFREE3:31;
reconsider H = F as non-empty GeneratorSet of A by Th9A;
H is free by Th10A,A0,A1,MSAFREE:16;
hence thesis by A1,MSAFREE:def 5;
end;
end;
definition
let S be non empty non void ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
let A be non-empty (X,S)-terms VarMSAlgebra over S;
attr A is vf-free means: VFFREE:
for s,r being SortSymbol of S
for t being Element of A,s holds (vf t).r =
{t|p where p is Element of dom t: ((t|p).{})`2 = r};
end;
scheme Scheme{I() -> non empty set,
X,Y() -> non-empty ManySortedSet of I(), F(element,element,element) -> set}:
ex f being ManySortedMSSet of X(),Y() st
for s,r being Element of I() for t being Element of X().s
holds f.s.t.r = F(s,r,t)
provided
A0: for s,r being Element of I() for t being Element of X().s holds
F(s,r,t) is Subset of Y().r
proof
defpred P[element,element] means
ex f being ManySortedFunction of X().$1 st $2 = f &
for r being Element of I() for t being Element of X().$1 holds
dom (f.t) = I() & f.t.r = F($1,r,t);
A1: for s being element st s in I() ex y st P[s,y]
proof
let s be element; assume
s in I(); then reconsider s0 = s as Element of I();
defpred Q[element,element] means
ex g being Function st $2 = g & dom g = I() &
for r being Element of I() holds g.r = F(s,r,$1);
A3: for t being element st t in X().s ex y st Q[t,y]
proof
let t be element; assume
t in X().s;
deffunc G(set) = F(s,$1,t);
consider g being Function such that
A5: dom g = I() & for r being Element of I() holds g.r = G(r)
from FUNCT_1:sch 4;
take g,g; thus thesis by A5;
end;
consider f being Function such that
A6: dom f = X().s & for t being element st t in X().s holds Q[t,f.t]
from CLASSES1:sch 1(A3);
reconsider f as ManySortedSet of X().s
by A6,RELAT_1:def 18,PARTFUN1:def 2;
f is Function-yielding
proof
let x; assume x in dom f; then
Q[x,f.x] by A6;
hence thesis;
end; then
reconsider f as ManySortedFunction of X().s;
take f,f; thus f = f;
let r be Element of I();
let t be Element of X().s;
t in X().s0; then
Q[t,f.t] by A6;
hence dom (f.t) = I() & f.t.r = F(s,r,t);
end;
consider F being Function such that
A7: dom F = I() & for x st x in I() holds P[x,F.x]
from CLASSES1:sch 1(A1);
reconsider F as ManySortedSet of I() by A7,RELAT_1:def 18,PARTFUN1:def 2;
F is Function-yielding
proof
let x; assume x in dom F; then
P[x,F.x] by A7;
hence thesis;
end; then
reconsider F as ManySortedFunction of I();
F is ManySortedMSSet of X(),I()
proof
let i,j being element; assume i in I(); then
consider f being ManySortedFunction of X().i such that
A8: F.i = f &
for r being Element of I() for t being Element of X().i holds
dom (f.t) = I() & f.t.r = F(i,r,t) by A7;
thus dom(F.i) = X().i by A8,PARTFUN1:def 2;
assume j in X().i; then
dom(f.j) = I() by A8;
hence F.i.j is ManySortedSet of I() by A8,RELAT_1:def 18,PARTFUN1:def 2;
end; then
reconsider F as ManySortedMSSet of X(),I();
F is ManySortedMSSet of X(),Y()
proof
let i,a be set; assume
A9: i in I() & a in X().i; then
reconsider g = F.i.a as ManySortedSet of I() by MSMS1;
consider f being ManySortedFunction of X().i such that
A8: F.i = f &
for r being Element of I() for t being Element of X().i holds
dom (f.t) = I() & f.t.r = F(i,r,t) by A7,A9;
g is ManySortedSubset of Y()
proof
let x; assume x in I(); then
g.x = F(i,x,a) & F(i,x,a) is Subset of Y().x by A0,A9,A8;
hence thesis;
end;
hence thesis;
end; then
reconsider F as ManySortedMSSet of X(),Y();
take F;
let s,r be Element of I();
let t be Element of X().s;
P[s,F.s] by A7;
hence F.s.t.r = F(s,r,t);
end;
theorem ThT:
for S being non empty non void ManySortedSign
for X being non-empty ManySortedSet of the carrier of S
for A being all_vars_including inheriting_operations free_in_itself
(X,S)-terms MSAlgebra over S
ex VF being ManySortedMSSet of the Sorts of A,the Sorts of A,
B being all_vars_including inheriting_operations free_in_itself
(X,S)-terms VarMSAlgebra over S
st B = VarMSAlgebra(#the Sorts of A, the Charact of A, VF#) &
B is vf-free
proof
let S be non empty non void ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
let A be all_vars_including inheriting_operations free_in_itself
(X,S)-terms MSAlgebra over S;
deffunc F((Element of S),(Element of S),Element of A,$1) =
{$3|p where p is Element of dom $3: (($3|p).{})`2 = $2};
WW: for s,r being SortSymbol of S for t being Element of A,s holds
F(s,r,t) is Subset of (the Sorts of A).r
proof
let s,r be SortSymbol of S;
let t be Element of (the Sorts of A).s;
F(s,r,t) c= (the Sorts of A).r
proof
let x; assume x in F(s,r,t); then
consider p being Element of dom t such that
B0: x = t|p & ((t|p).{})`2 = r;
reconsider tp = t|p as Element of A by MSAFREE4:44;
reconsider t1 = tp as Term of S,X by MSAFREE4:42;
per cases by MSATERM:2;
suppose
ex s being SortSymbol of S, v being Element of X.s st t1.{} = [v,s];
then consider s1 being SortSymbol of S, v being Element of X.s1
such that
B2: tp.{} = [v,s1];
B3: s1 = r by B0,B2,MCART_1:7; then
t1 = root-tree [v,r] by B2,MSATERM:5; then
the_sort_of t1 = r by B3,MSATERM:14; then
t1 in FreeSort(X,r) by MSATERM:def 5; then
tp in (the Sorts of FreeMSA X).r by MSAFREE:def 11; then
tp in (the Sorts of Free(S,X)).r by MSAFREE3:31;
hence thesis by B0,MSAFREE4:43;
end;
suppose tp.{} in [:the carrier' of S,{the carrier of S}:]; then
(tp.{})`2 in {the carrier of S} by MCART_1:10; then
r = the carrier of S & r in the carrier of S by B0,TARSKI:def 1;
hence thesis;
end;
end;
hence F(s,r,t) is Subset of (the Sorts of A).r;
end;
consider v being ManySortedMSSet of the Sorts of A,the Sorts of A such that
A0: for x,z being Element of the carrier of S
for y being Element of (the Sorts of A).x holds v.x.y.z = F(x,z,y)
from Scheme(WW);
set B = VarMSAlgebra(#the Sorts of A, the Charact of A, v#);
take v;
A1: B is (X,S)-terms
proof
thus the Sorts of B is ManySortedSubset of the Sorts of Free(S,X)
by MSAFREE4:def 6;
end;
then reconsider B as (X,S)-terms strict VarMSAlgebra over S;
A1: B is all_vars_including inheriting_operations free_in_itself
proof
thus FreeGen X is ManySortedSubset of the Sorts of B by MSAFREE4:def 7;
hereby
let o be OperSymbol of S, p be FinSequence; assume
p in Args(o, Free(S,X)) &
Den(o,Free(S,X)).p in (the Sorts of B).the_result_sort_of o; then
p in Args(o,A) & Den(o,A).p = Den(o,Free(S,X)).p by MSAFREE4:def 8;
hence p in Args(o,B) & Den(o,B).p = Den(o,Free(S,X)).p;
end;
let f be ManySortedFunction of FreeGen X, the Sorts of B;
let G be ManySortedSubset of the Sorts of B such that
A2: G = FreeGen X;
reconsider H = G as MSSubset of A;
consider h being ManySortedFunction of A,A such that
A3: h is_homomorphism A,A & f = h || H by A2,MSAFREE4:def 9;
reconsider g = h as ManySortedFunction of B,B;
take g;
the MSAlgebra of B = the MSAlgebra of A;
hence g is_homomorphism B,B by A3,MSAFREE4:30;
thus thesis by A3;
end;
reconsider B as all_vars_including inheriting_operations free_in_itself
(X,S)-terms strict VarMSAlgebra over S by A1;
B is vf-free
proof
let s,r be (Element of S), t be Element of (the Sorts of B).s;
thus (vf t).r
= {t|p where p is Element of dom t: ((t|p).{})`2 = r} by A0;
end;
hence thesis;
end;
registration
let S be non empty non void ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
cluster strict vf-free for all_vars_including inheriting_operations
free_in_itself (X,S)-terms VarMSAlgebra over S;
existence
proof
set A = the all_vars_including inheriting_operations free_in_itself
(X,S)-terms MSAlgebra over S;
consider VF being ManySortedMSSet of the Sorts of A,the Sorts of A,
B being all_vars_including inheriting_operations free_in_itself
(X,S)-terms VarMSAlgebra over S such that
A1: B = VarMSAlgebra(#the Sorts of A, the Charact of A, VF#) &
B is vf-free by ThT;
take B; thus thesis by A1;
end;
end;
theorem Th69:
for S being non empty non void ManySortedSign
for X being non-empty ManySortedSet of the carrier of S
for A being vf-free all_vars_including inheriting_operations (X,S)-terms
VarMSAlgebra over S
for s being SortSymbol of S
for t being Element of A,s holds vf t is ManySortedSubset of FreeGen X
proof
let S be non empty non void ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
let A be vf-free all_vars_including inheriting_operations (X,S)-terms
VarMSAlgebra over S;
let s be SortSymbol of S;
let t be Element of A,s;
let x; assume x in the carrier of S; then
reconsider r = x as SortSymbol of S;
let y; assume y in (vf t).x; then
y in {t|p where p is Element of dom t: ((t|p).{})`2 = r} by VFFREE; then
consider p being Element of dom t such that
A1: y = t|p & ((t|p).{})`2 = r;
t is Element of (the Sorts of A).s; then
reconsider tp = t|p as Element of A by MSAFREE4:44;
A2: tp is Term of S,X by MSAFREE4:42;
per cases by A2,MSATERM:2;
suppose tp.{} in [:the carrier' of S, {the carrier of S}:]; then
r in {the carrier of S} by A1,MCART_1:10; then
r = the carrier of S by TARSKI:def 1; then
r in r;
hence thesis;
end;
suppose
ex s being SortSymbol of S, v being Element of X.s st tp.{} = [v,s]; then
consider s1 being SortSymbol of S, v being Element of X.s1 such that
A3: tp.{} = [v,s1];
tp = root-tree [v,s1] by A2,A3,MSATERM:5; then
tp in FreeGen(s1, X) by MSAFREE:def 15; then
tp in (FreeGen X).s1 by MSAFREE:def 16;
hence y in (FreeGen X).x by A1,A3,MCART_1:7;
end;
end;
theorem
for S being non empty non void ManySortedSign
for X being non-empty ManySortedSet of the carrier of S
for A being vf-free non-empty (X,S)-terms VarMSAlgebra over S
for s being SortSymbol of S
for x being Element of A,s st x in (FreeGen X).s holds
vf x = s-singleton(x)
proof
let S be non empty non void ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
let A be vf-free non-empty (X,S)-terms VarMSAlgebra over S;
let s be SortSymbol of S;
let x be Element of A,s;
assume x in (FreeGen X).s; then
x in FreeGen(s,X) by MSAFREE:def 16; then
consider a being set such that
A1: a in X.s & x = root-tree [a,s] by MSAFREE:def 15;
A2: dom root-tree [a,s] = {{}} & (root-tree [a,s]).{} = [a,s]
by TREES_4:3,TREES_1:29;
A3: [a,s]`2 = s;
now
let y; assume y in the carrier of S; then
reconsider r = y as SortSymbol of S;
AA: {x|p where p is Element of dom x: ((x|p).{})`2 = r} = (s-singletonx).y
proof
thus
{x|p where p is Element of dom x: ((x|p).{})`2 = r} c= (s-singletonx).y
proof
let z be element; assume
z in {x|p where p is Element of dom x: ((x|p).{})`2 = r}; then
consider p being Element of dom x such that
A4: z = x|p & ((x|p).{})`2 = r;
p = {} by A1,A2; then
A5: z = x by A4,TREES_9:1; then
(s-singletonx).r = {x} by A1,A2,A3,A4,ThS1;
hence z in (s-singletonx).y by A5,TARSKI:def 1;
end;
let z be element;
reconsider p = {} as Element of dom x by A1,A2,TARSKI:def 1;
assume
A6: z in (s-singletonx).y; then
A8: r = s by ThS1; then
z in {x} by A6,ThS1; then
A7: z = x by TARSKI:def 1; then
z = x|p by TREES_9:1;
hence thesis by A1,A2,A3,A7,A8;
end;
thus (vf x).y = (s-singletonx).y by AA,VFFREE;
end;
hence vf x = s-singleton(x) by PBOOLE:3;
end;
begin :: Algebra with undefined values
definition
let I be set;
let S be ManySortedSet of I;
mode ManySortedElement of S is Element of S;
end;
definition
let I be non empty set;
let A be non-empty ManySortedSet of I;
let e be ManySortedElement of A;
let i be Element of I;
redefine func e.i -> Element of A.i;
coherence by PBOOLE:def 14;
end;
definition
let S be non empty non void ManySortedSign;
struct (MSAlgebra over S) UndefMSAlgebra over S (#
Sorts -> ManySortedSet of the carrier of S,
Charact -> ManySortedFunction of (the Sorts)# * the Arity of S,
the Sorts * the ResultSort of S,
undefined-map -> ManySortedElement of the Sorts
#);
end;
registration
let S be non empty non void ManySortedSign;
cluster non-empty for UndefMSAlgebra over S;
existence
proof
set D = the non-empty ManySortedSet of S;
set c = the ManySortedFunction of D#*the Arity of S, D*the ResultSort of S;
set u = the ManySortedElement of D;
take A = UndefMSAlgebra(#D,c,u#);
thus the Sorts of A is non-empty;
end;
end;
definition
let S be non empty non void ManySortedSign;
let A be UndefMSAlgebra over S;
let s be SortSymbol of S;
let a be Element of A,s;
attr a is undefined means: UNDEF:
a = (the undefined-map of A).s;
end;
definition
let S be non empty non void ManySortedSign;
let A be MSAlgebra over S;
let s be SortSymbol of S;
let a be Element of A,s;
attr a is defined means: DEF:
for B being UndefMSAlgebra over S st B = A
holds a <> (the undefined-map of B).s;
end;
definition
let S be non empty non void ManySortedSign;
let A be MSAlgebra over S;
func DefSorts A -> ManySortedSubset of the Sorts of A means: DEFS:
for B being UndefMSAlgebra over S st A = B
for U being ManySortedSet of the carrier of S st
for s being SortSymbol of S holds U.s = {(the undefined-map of B).s}
holds it = (the Sorts of A) (\) U if A is UndefMSAlgebra over S
otherwise it = the Sorts of A;
existence
proof
hereby assume A is UndefMSAlgebra over S;
then reconsider B = A as UndefMSAlgebra over S;
deffunc F(element) = {(the undefined-map of B).$1};
consider U being ManySortedSet of the carrier of S such that
A1: for x st x in the carrier of S holds U.x = F(x)
from PBOOLE:sch 4;
(the Sorts of A)(\)U c= (the Sorts of A) by PBOOLE:56;
then reconsider X = (the Sorts of A)(\)U as ManySortedSubset of
the Sorts of A by PBOOLE:def 18;
take X;
let C be UndefMSAlgebra over S; assume
A2: A = C;
let V be ManySortedSet of the carrier of S; assume
A3: for s being SortSymbol of S holds V.s = {(the undefined-map of C).s};
U = V
proof let s be SortSymbol of S;
thus U.s = F(s) by A1 .= V.s by A2,A3;
end;
hence X = (the Sorts of A)(\)V;
end;
the Sorts of A c= the Sorts of A;
then the Sorts of A is MSSubset of A by PBOOLE:def 18;
hence thesis;
end;
uniqueness
proof
let X1,X2 be ManySortedSubset of the Sorts of A;
hereby
assume A is UndefMSAlgebra over S;
then reconsider U = A as UndefMSAlgebra over S;
assume that
A2: for B being UndefMSAlgebra over S st A = B
for U being ManySortedSet of the carrier of S st
for s being SortSymbol of S holds U.s = {(the undefined-map of B).s}
holds X1 = (the Sorts of A) (\) U and
A3: for B being UndefMSAlgebra over S st A = B
for U being ManySortedSet of the carrier of S st
for s being SortSymbol of S holds U.s = {(the undefined-map of B).s}
holds X2 = (the Sorts of A) (\) U;
deffunc F(element) = {(the undefined-map of U).$1};
consider V being ManySortedSet of the carrier of S such that
A1: for x st x in the carrier of S holds V.x = F(x)
from PBOOLE:sch 4;
A4: for s being SortSymbol of S holds V.s = {(the undefined-map of U).s}
by A1;
hence X1 = (the Sorts of A) (\) V by A2,A1 .= X2 by A4,A3,A1;
end;
thus thesis;
end;
consistency;
end;
theorem Th218:
for S1,S2 being non empty non void ManySortedSign
for A1 being UndefMSAlgebra over S1
for A2 being UndefMSAlgebra over S2 st
the Sorts of A1 = the Sorts of A2 &
the undefined-map of A1 = the undefined-map of A2
holds DefSorts A1 = DefSorts A2
proof
let S1,S2 be non empty non void ManySortedSign;
let A1 be UndefMSAlgebra over S1;
let A2 be UndefMSAlgebra over S2;
assume
Z1: the Sorts of A1 = the Sorts of A2 &
the undefined-map of A1 = the undefined-map of A2;
dom the Sorts of A1 = the carrier of S1 by PARTFUN1:def 2;
then
Z0: the carrier of S1 = the carrier of S2 by Z1,PARTFUN1:def 2;
deffunc U1(element) = {(the undefined-map of A1).$1};
consider U1 being ManySortedSet of S1 such that
B1: for x being SortSymbol of S1 holds U1.x = U1(x) from PBOOLE:sch 5;
deffunc U2(element) = {(the undefined-map of A2).$1};
consider U2 being ManySortedSet of S2 such that
B2: for x being SortSymbol of S2 holds U2.x = U2(x) from PBOOLE:sch 5;
BY: DefSorts A2 = (the Sorts of A2)(\)U2 &
DefSorts A1 = (the Sorts of A1)(\)U1 by B1,B2,DEFS;
thus dom DefSorts A1 = the carrier of S1 by PARTFUN1:def 2
.= dom DefSorts A2 by Z0,PARTFUN1:def 2;
let x; assume x in dom DefSorts A1;
then
Z2: x in the carrier of S1 by PARTFUN1:def 2;
hence (DefSorts A1).x = (the Sorts of A1).x \ U1.x
by BY,PBOOLE:def 6
.= (the Sorts of A1).x \ {(the undefined-map of A1).x} by Z2,B1
.= (the Sorts of A2).x \ U2.x by Z0,Z1,Z2,B2
.= (DefSorts A2).x by Z0,Z2,BY,PBOOLE:def 6;
end;
definition
let S be non empty non void ManySortedSign;
let A be MSAlgebra over S;
attr A is with_defined_elements means: WDE:
DefSorts A is non-empty;
end;
definition
let S be non empty non void ManySortedSign;
let A be non-empty UndefMSAlgebra over S;
let s be SortSymbol of S;
let a be Element of A,s;
redefine attr a is defined means: DEF1:
a in (DefSorts A).s;
compatibility
proof
A1: a is defined iff
for B being UndefMSAlgebra over S st B = A
holds a <> (the undefined-map of B).s by DEF;
deffunc U(element) = {(the undefined-map of A).$1};
consider U being ManySortedSet of S such that
A2: for s1 being SortSymbol of S holds U.s1 = U(s1) from PBOOLE:sch 5;
DefSorts A = (the Sorts of A) (\) U by A2,DEFS;
then
A3: (DefSorts A).s = (the Sorts of A).s \ U.s by PBOOLE:def 6
.= ((the Sorts of A).s) \ {(the undefined-map of A).s} by A2;
hereby assume a is defined;
then a <> (the undefined-map of A).s & a in (the Sorts of A).s by A1;
hence a in (DefSorts A).s by A3,ZFMISC_1:56;
end;
assume a in (DefSorts A).s;
hence for B being UndefMSAlgebra over S st B = A
holds a <> (the undefined-map of B).s by A3,ZFMISC_1:56;
end;
end;
definition
let S be non empty non void ManySortedSign;
let A be UndefMSAlgebra over S;
attr A is undef-consequent means: UDCNS:
for o being OperSymbol of S
for p being FinSequence st p in Args(o, A) &
ex i being Nat, s being SortSymbol of S,a being Element of A,s st
i in dom the_arity_of o & s = (the_arity_of o).i & a = p.i & a is undefined
for b being Element of A, the_result_sort_of o
st b = Den(o,A).p holds b is undefined;
end;
definition
let I be set;
let A be ManySortedSet of I;
func succ A -> ManySortedSet of I means: SUCC:
for i being set st i in I holds it.i = succ (A.i);
existence
proof
deffunc F(element) = succ (A.$1);
consider f being ManySortedSet of I such that
A1: for i being element st i in I holds f.i = F(i) from PBOOLE:sch 4;
take f; thus thesis by A1;
end;
uniqueness
proof
let f1,f2 be ManySortedSet of I such that
A1: for i being set st i in I holds f1.i = succ (A.i) and
A2: for i being set st i in I holds f2.i = succ (A.i);
let i be element;
assume i in I;
then f1.i = succ(A.i) & f2.i = succ(A.i) by A1,A2;
hence thesis;
end;
end;
registration
let I be set;
cluster non-empty for ManySortedFunction of I;
existence
proof
take f = I-->id {0};
thus thesis;
end;
let A be ManySortedSet of I;
cluster succ A -> non-empty;
coherence
proof
let i be element;
assume i in I;
then (succ A).i = succ (A.i) by SUCC;
then A.i in (succ A).i by ORDINAL1:6;
hence thesis;
end;
end;
definition
let S be non empty non void ManySortedSign;
let A be MSAlgebra over S;
let B be UndefMSAlgebra over S;
attr B is A-undef means:AUNDEF:
B is undef-consequent &
the undefined-map of B = the Sorts of A &
the Sorts of B = succ the Sorts of A &
for o being OperSymbol of S, a being Element of Args(o,A)
st Args(o,A) <> {} holds Den(o,B).a <> Den(o,A).a implies
Den(o,B).a = (the undefined-map of B).the_result_sort_of o;
end;
theorem Lem7:
for S being non empty non void ManySortedSign
for A being MSAlgebra over S
for B being UndefMSAlgebra over S st B is A-undef
holds DefSorts B = the Sorts of A
proof
let S be non empty non void ManySortedSign;
let A be MSAlgebra over S;
let B be UndefMSAlgebra over S;
assume Z0: B is A-undef;
then
A1: the undefined-map of B = the Sorts of A &
the Sorts of B = succ the Sorts of A by AUNDEF;
let s be SortSymbol of S;
deffunc F(element) = {(the undefined-map of B).$1};
consider V being ManySortedSet of the carrier of S such that
A2: for x st x in the carrier of S holds V.x = F(x)
from PBOOLE:sch 4;
now
given x such that
A4: x in (the Sorts of A).s & x in F(s);
x = (the Sorts of A).s by A1,A4,TARSKI:def 1;
hence contradiction by A4;
end;
then
A3: (the Sorts of A).s misses F(s) by XBOOLE_0:3;
for s being SortSymbol of S holds V.s = {(the undefined-map of B).s}
by A2;
then DefSorts B = (the Sorts of B)(\)V by DEFS;
hence (DefSorts B).s = (the Sorts of B).s\V.s by PBOOLE:def 6
.= succ ((the Sorts of A).s)\V.s by A1,SUCC
.= succ ((the Sorts of A).s)\F(s) by A2
.= (the Sorts of A).s\/F(s)\F(s) by A1,ORDINAL1:def 1
.= (the Sorts of A).s by A3,XBOOLE_1:88;
end;
registration
let S be non empty ManySortedSign;
let A be MSAlgebra over S;
cluster the Charact of A -> Function-yielding;
coherence;
end;
registration
let S be non empty non void ManySortedSign;
cluster with_defined_elements -> non-empty for MSAlgebra over S;
coherence
proof
let A be MSAlgebra over S;
assume
AA: DefSorts A is non-empty;
per cases;
suppose
A0: A is UndefMSAlgebra over S;
then reconsider B = A as UndefMSAlgebra over S;
deffunc F(element) = {(the undefined-map of B).$1};
consider V being ManySortedSet of the carrier of S such that
A1: for x st x in the carrier of S holds V.x = F(x)
from PBOOLE:sch 4;
for s being SortSymbol of S holds V.s = F(s) by A1;
then DefSorts A = (the Sorts of A) (\) V by DEFS;
then DefSorts A c= the Sorts of A by PBOOLE:56;
hence the Sorts of A is non-empty by AA,PBOOLE:131;
end;
suppose A is not UndefMSAlgebra over S;
then DefSorts A = the Sorts of A by DEFS;
hence the Sorts of A is non-empty by AA;
end;
end;
end;
scheme UndefAlgebra{S() -> non empty non void ManySortedSign,
A() -> non-empty MSAlgebra over S(),
P[element,element]}:
ex B being strict UndefMSAlgebra over S() st
B is A()-undef with_defined_elements &
the undefined-map of B = the Sorts of A() &
the Sorts of B = succ the Sorts of A() &
for o being OperSymbol of S() for a being Element of Args(o,A()) holds
(not P[o,a] implies Den(o,B).a = Den(o,A()).a) &
(P[o,a] implies Den(o,B).a = (the undefined-map of B).the_result_sort_of o)
proof
set S = S(), A = A();
deffunc F(element) = succ ((the Sorts of A).$1);
set X = succ the Sorts of A;
A1: for x st x in the carrier of S holds X.x = F(x) by SUCC;
reconsider X as non-empty ManySortedSet of the carrier of S;
deffunc H(element) =
{a where a is Element of ((the Sorts of A)#*the Arity of S).$1: P[$1,a]};
consider H being ManySortedSet of the carrier' of S such that
H0: for o being OperSymbol of S holds H.o = H(o) from PBOOLE:sch 5;
deffunc K(element) = (H.$1)-->((the Sorts of A)*the ResultSort of S).$1;
X1: now
let o be OperSymbol of S;
thus H.o c= Args(o,A)
proof let x; assume x in H.(o);
then x in H(o) by H0;
then ex a being Element of ((the Sorts of A)#*the Arity of S).o st
x = a & P[o,a];
hence thesis;
end;
end;
deffunc G(element) = (((X#*the Arity of S).$1)-->
((the Sorts of A)*the ResultSort of S).$1)
+*(((the Charact of A).$1)+*K($1));
consider ch being ManySortedSet of the carrier' of S such that
A2: for x st x in the carrier' of S holds ch.x = G(x)
from PBOOLE:sch 4;
X2: now let o being OperSymbol of S;
Y1: dom K(o) = H.o = H(o) by FUNCOP_1:13,H0;
then
Y3: dom K(o) c= Args(o,A) by X1;
Y2: dom ((the Charact of A).o) = Args(o,A) by FUNCT_2:def 1;
hence dom (((the Charact of A).o)+*K(o))
= Args(o,A) \/ H(o) by Y1,FUNCT_4:def 1
.= dom ((the Charact of A).o) by Y1,Y2,Y3,XBOOLE_1:12;
end;
ch is Function-yielding
proof let x; assume x in dom ch; then
x in the carrier' of S by PARTFUN1:def 2; then
ch.x = G(x) by A2;
hence thesis;
end; then
reconsider ch as ManySortedFunction of the carrier' of S;
the Sorts of A is ManySortedSubset of X
proof
let x; assume x in the carrier of S; then
X.x = F(x) by A1 .= ((the Sorts of A).x)\/{(the Sorts of A).x}
by ORDINAL1:def 1;
hence thesis by XBOOLE_1:7;
end; then
reconsider Y = the Sorts of A as ManySortedSubset of X;
X is ManySortedSubset of X
proof
let x; thus thesis;
end; then
reconsider X1 = X as ManySortedSubset of X;
ch is ManySortedFunction of X#*the Arity of S, X*the ResultSort of S
proof
let x being set; assume x in the carrier' of S; then
reconsider x as OperSymbol of S;
Y# c= X# & the_arity_of x in (the carrier of S)* &
dom the Arity of S = the carrier' of S &
the Charact of A is ManySortedFunction of Y#*the Arity of S,
Y*the ResultSort of S
by Th71,FUNCT_2:def 1, PBOOLE:def 18; then
B1: Y#.the_arity_of x c= X#.the_arity_of x &
(Y#*the Arity of S).x = Y#.the_arity_of x &
(X1#*the Arity of S).x = X#.the_arity_of x &
(the Charact of A).x is Function of (Y#*the Arity of S).x,
(Y*the ResultSort of S).x by PBOOLE:def 2,def 15,FUNCT_1:13; then
B2: dom((the Charact of A).x) = (Y#*the Arity of S).x & ch.x = G(x)
by A2,XBOOLE_1:12,FUNCT_2:def 1; then
(X#*the Arity of S).x \/ (Y#*the Arity of S).x = (X#*the Arity of S).x &
dom(((the Charact of A).x)+*K(x)) = dom((the Charact of A).x) &
dom((X#*the Arity of S).x-->((the Sorts of A)*the ResultSort of S).x) =
(X#*the Arity of S).x
by X2,B1,A2,XBOOLE_1:12,FUNCT_2:def 1; then
A5: dom(ch.x) = (X#*the Arity of S).x by B2,FUNCT_4:def 1;
dom the ResultSort of S = the carrier' of S by FUNCT_2:def 1; then
A7: (Y*the ResultSort of S).x = Y.the_result_sort_of x &
(X*the ResultSort of S).x = X.the_result_sort_of x by FUNCT_1:13;
then
A6: (Y*the ResultSort of S).x c= (X*the ResultSort of S).x
by PBOOLE:def 18,PBOOLE:def 2;
A8: rng ((X#*the Arity of S).x --> ((the Sorts of A)*the ResultSort of S).x)
c= {((the Sorts of A)*the ResultSort of S).x} by FUNCOP_1:13;
X.the_result_sort_of x = succ(Y.the_result_sort_of x) by A1; then
Y.the_result_sort_of x in X.the_result_sort_of x by ORDINAL1:8; then
{Y.the_result_sort_of x} c= X.the_result_sort_of x by ZFMISC_1:31; then
A9: rng ((X#*the Arity of S).x --> ((the Sorts of A)*the ResultSort of S).x)
c= X.the_result_sort_of x by A7,A8,XBOOLE_1:1;
((the Sorts of A)*the ResultSort of S).x in
succ (((the Sorts of A)*the ResultSort of S).x)
= succ ((the Sorts of A).the_result_sort_of x) by FUNCT_2:15,ORDINAL1:6;
then rng K(x) c= {((the Sorts of A)*the ResultSort of S).x}
c= succ ((the Sorts of A).the_result_sort_of x)
= X.the_result_sort_of x &
rng((the Charact of A).x) c= ((the Sorts of A)*the ResultSort of S).x
c= succ ((the Sorts of A).the_result_sort_of x)
by SUCC,RELAT_1:def 19,ORDINAL3:1,FUNCOP_1:13,ZFMISC_1:31;
then rng K(x) c= X.the_result_sort_of x & rng((the Charact of A).x)
c= X.the_result_sort_of x by XBOOLE_1:1;
then rng((the Charact of A).x+*K(x))
c= rng((the Charact of A).x)\/ rng K(x) c= X.the_result_sort_of x
by XBOOLE_1:8,FUNCT_4:17;
then rng((the Charact of A).x+*K(x)) c= X.the_result_sort_of x
by XBOOLE_1:1; then
B2: rng ((X#*the Arity of S).x --> ((the Sorts of A)*the ResultSort of S).x)
\/rng((the Charact of A).x+*K(x)) c= X.the_result_sort_of x
by A9,XBOOLE_1:8;
rng G(x) c= rng ((X#*the Arity of S).x --> (Y*the ResultSort of S).x)
\/rng((the Charact of A).x+*K(x)) by FUNCT_4:17; then
rng G(x) c= (X*the ResultSort of S).x & ch.x = G(x)
by A2,A7,B2,XBOOLE_1:1;
hence thesis by A5,FUNCT_2:2;
end; then
reconsider ch as ManySortedFunction of X#*the Arity of S,
X*the ResultSort of S;
the Sorts of A is ManySortedElement of X
proof
let x; assume x in the carrier of S; then
X.x = F(x) by A1;
hence thesis by ORDINAL1:8;
end; then
reconsider u = the Sorts of A as ManySortedElement of X;
take B = UndefMSAlgebra(#X,ch,u#);
thus B is A-undef
proof
hereby
let o be OperSymbol of S;
let p be FinSequence such that
C1: p in Args(o, B);
given i being Nat, s being SortSymbol of S, a being Element of B,s
such that
C2: i in dom the_arity_of o & s = (the_arity_of o).i & a = p.i &
a is undefined;
D0: now
assume
D1: p in Args(o, A);
D2: dom (Y*the_arity_of o) = dom the_arity_of o by PARTFUN1:def 2;
dom the Arity of S = the carrier' of S by FUNCT_2:def 1; then
Args(o,A) = Y#.the_arity_of o by FUNCT_1:13
.= product (Y*the_arity_of o) by FINSEQ_2:def 5; then
p.i in (Y*the_arity_of o).i by C2,D1,D2,CARD_3:9; then
a in Y.s & u.s = a by C2,UNDEF,FUNCT_1:13;
hence contradiction;
end;
let b be Element of B, the_result_sort_of o;
assume
C3: b = Den(o,B).p;
C4: dom Den(o,A) = Args(o,A) by FUNCT_2:def 1;
then
C41: dom (Den(o,A)+*K(o)) = Args(o,A) by X2;
C5: dom the ResultSort of S = the carrier' of S by FUNCT_2:def 1;
b = G(o).p by A2,C3
.= (Args(o,B)-->(Y*the ResultSort of S).o).p by C41,D0,FUNCT_4:11
.= (Y*the ResultSort of S).o by C1,FUNCOP_1:7
.= u.the_result_sort_of o by C5,FUNCT_1:13;
hence b is undefined by UNDEF;
end;
thus the undefined-map of B = the Sorts of A;
thus the Sorts of B = succ the Sorts of A by A1,SUCC;
hereby let o be OperSymbol of S;
let a be Element of Args(o,A);
assume Args(o,A) <> {};
assume
D0: Den(o,B).a <> Den(o,A).a;
D1: dom Den(o,A) = Args(o,A) by FUNCT_2:def 1;
then
D2: dom(Den(o,A)+*K(o)) = Args(o,A) by X2;
D3: Den(o,B).a = ((((X#*the Arity of S).o)-->
((the Sorts of A)*the ResultSort of S).o)+*
(((the Charact of A).o)+*K(o))).a
by A2
.= (Den(o,A)+*K(o)).a by D2,FUNCT_4:13;
then a in dom K(o) by D0,FUNCT_4:11;
then Den(o,B).a = K(o).a & a in H.o by D3,FUNCOP_1:13,FUNCT_4:13;
hence Den(o,B).a = ((the Sorts of A)*the ResultSort of S).o
by FUNCOP_1:7
.= (the undefined-map of B).the_result_sort_of o by FUNCT_2:15;
end;
end;
then DefSorts B = the Sorts of A by Lem7;
hence DefSorts B is non-empty;
thus the undefined-map of B = the Sorts of A;
thus the Sorts of B = succ the Sorts of A by A1,SUCC;
let o be OperSymbol of S;
let a being Element of Args(o,A);
reconsider b = a as Element of ((the Sorts of A)#*the Arity of S).o
by FUNCT_2:15;
AD: dom Den(o,A) = Args(o,A) by FUNCT_2:def 1;
then
AE: dom(Den(o,A)+*K(o)) = Args(o,A) by X2;
hereby
assume
E0: not P[o,a];
E1: now assume a in H(o);
then consider c being Element of ((the Sorts of A)#*the Arity of S).o
such that
E3: b = c & P[o,c];
thus contradiction by E0,E3;
end;
E2: dom K(o) = H.o by FUNCOP_1:13 .= H(o) by H0;
thus Den(o,B).a
= ch.o.a
.= G(o).a by A2
.= ((the Charact of A).o+*K(o)).a by AE,FUNCT_4:13
.= Den(o,A).a by E1,E2,FUNCT_4:11;
end;
assume P[o,a];
then
E1: b in H(o) & H.o = H(o) by H0;
then
E2: dom K(o) = H(o) by FUNCOP_1:13;
thus Den(o,B).a
= ch.o.a
.= G(o).a by A2
.= ((the Charact of A).o+*K(o)).a by AE,FUNCT_4:13
.= K(o).a by E1,E2,FUNCT_4:13
.= ((the Sorts of A)*the ResultSort of S).o by E1,FUNCOP_1:7
.= (the undefined-map of B).the_result_sort_of o by FUNCT_2:15;
end;
theorem Th100:
for A being non-empty MSAlgebra over S
ex B being strict UndefMSAlgebra over S st
B is A-undef with_defined_elements &
the undefined-map of B = the Sorts of A &
the Sorts of B = succ the Sorts of A &
for o being OperSymbol of S for a being Element of Args(o,A) holds
Den(o,B).a = Den(o,A).a
proof
let A be non-empty MSAlgebra over S;
deffunc F(element) = succ ((the Sorts of A).$1);
set X = succ the Sorts of A;
A1: for x st x in the carrier of S holds X.x = F(x) by SUCC;
reconsider X as non-empty ManySortedSet of the carrier of S;
deffunc G(element) = (((X#*the Arity of S).$1)-->
((the Sorts of A)*the ResultSort of S).$1)
+*((the Charact of A).$1);
consider ch being ManySortedSet of the carrier' of S such that
A2: for x st x in the carrier' of S holds ch.x = G(x)
from PBOOLE:sch 4;
ch is Function-yielding
proof let x; assume x in dom ch; then
x in the carrier' of S by PARTFUN1:def 2; then
ch.x = G(x) by A2;
hence thesis;
end; then
reconsider ch as ManySortedFunction of the carrier' of S;
the Sorts of A is ManySortedSubset of X
proof
let x; assume x in the carrier of S; then
X.x = F(x) by A1 .= ((the Sorts of A).x)\/{(the Sorts of A).x}
by ORDINAL1:def 1;
hence thesis by XBOOLE_1:7;
end; then
reconsider Y = the Sorts of A as ManySortedSubset of X;
X is ManySortedSubset of X
proof
let x; thus thesis;
end; then
reconsider X1 = X as ManySortedSubset of X;
ch is ManySortedFunction of X#*the Arity of S, X*the ResultSort of S
proof
let x being set; assume x in the carrier' of S; then
reconsider x as OperSymbol of S;
Y# c= X# & the_arity_of x in (the carrier of S)* &
dom the Arity of S = the carrier' of S &
the Charact of A is ManySortedFunction of Y#*the Arity of S,
Y*the ResultSort of S
by Th71,FUNCT_2:def 1, PBOOLE:def 18; then
B1: Y#.the_arity_of x c= X#.the_arity_of x &
(Y#*the Arity of S).x = Y#.the_arity_of x &
(X1#*the Arity of S).x = X#.the_arity_of x &
(the Charact of A).x is Function of (Y#*the Arity of S).x,
(Y*the ResultSort of S).x by PBOOLE:def 2,def 15,FUNCT_1:13; then
(X#*the Arity of S).x \/ (Y#*the Arity of S).x = (X#*the Arity of S).x &
dom((X#*the Arity of S).x-->((the Sorts of A)*the ResultSort of S).x) =
(X#*the Arity of S).x &
dom((the Charact of A).x) = (Y#*the Arity of S).x & ch.x = G(x)
by A2,XBOOLE_1:12,FUNCT_2:def 1; then
A5: dom(ch.x) = (X#*the Arity of S).x by FUNCT_4:def 1;
dom the ResultSort of S = the carrier' of S by FUNCT_2:def 1; then
A7: (Y*the ResultSort of S).x = Y.the_result_sort_of x &
(X*the ResultSort of S).x = X.the_result_sort_of x by FUNCT_1:13;
then
A6: (Y*the ResultSort of S).x c= (X*the ResultSort of S).x
by PBOOLE:def 18,PBOOLE:def 2;
A8: rng ((X#*the Arity of S).x --> ((the Sorts of A)*the ResultSort of S).x)
c= {((the Sorts of A)*the ResultSort of S).x} by FUNCOP_1:13;
X.the_result_sort_of x = succ(Y.the_result_sort_of x) by A1; then
Y.the_result_sort_of x in X.the_result_sort_of x by ORDINAL1:8; then
{Y.the_result_sort_of x} c= X.the_result_sort_of x by ZFMISC_1:31; then
A9: rng ((X#*the Arity of S).x --> ((the Sorts of A)*the ResultSort of S).x)
c= X.the_result_sort_of x by A7,A8,XBOOLE_1:1;
rng((the Charact of A).x) c= X.the_result_sort_of x
by A6,A7,B1,RELAT_1:def 19; then
B2: rng ((X#*the Arity of S).x --> ((the Sorts of A)*the ResultSort of S).x)
\/rng((the Charact of A).x) c= X.the_result_sort_of x
by A9,XBOOLE_1:8;
rng G(x) c= rng ((X#*the Arity of S).x --> (Y*the ResultSort of S).x)
\/rng((the Charact of A).x) by FUNCT_4:17; then
rng G(x) c= (X*the ResultSort of S).x & ch.x = G(x)
by A2,A7,B2,XBOOLE_1:1;
hence thesis by A5,FUNCT_2:2;
end; then
reconsider ch as ManySortedFunction of X#*the Arity of S,
X*the ResultSort of S;
the Sorts of A is ManySortedElement of X
proof
let x; assume x in the carrier of S; then
X.x = F(x) by A1;
hence thesis by ORDINAL1:8;
end; then
reconsider u = the Sorts of A as ManySortedElement of X;
take B = UndefMSAlgebra(#X,ch,u#);
thus B is A-undef
proof
hereby
let o be OperSymbol of S;
let p be FinSequence such that
C1: p in Args(o, B);
given i being Nat, s being SortSymbol of S, a being Element of B,s
such that
C2: i in dom the_arity_of o & s = (the_arity_of o).i & a = p.i &
a is undefined;
D0: now
assume
D1: p in Args(o, A);
D2: dom (Y*the_arity_of o) = dom the_arity_of o by PARTFUN1:def 2;
dom the Arity of S = the carrier' of S by FUNCT_2:def 1; then
Args(o,A) = Y#.the_arity_of o by FUNCT_1:13
.= product (Y*the_arity_of o) by FINSEQ_2:def 5; then
p.i in (Y*the_arity_of o).i by C2,D1,D2,CARD_3:9; then
a in Y.s & u.s = a by C2,UNDEF,FUNCT_1:13;
hence contradiction;
end;
let b be Element of B, the_result_sort_of o;
assume
C3: b = Den(o,B).p;
C4: dom Den(o,A) = Args(o,A) by FUNCT_2:def 1;
C5: dom the ResultSort of S = the carrier' of S by FUNCT_2:def 1;
b = G(o).p by A2,C3
.= (Args(o,B)-->(Y*the ResultSort of S).o).p by C4,D0,FUNCT_4:11
.= (Y*the ResultSort of S).o by C1,FUNCOP_1:7
.= u.the_result_sort_of o by C5,FUNCT_1:13;
hence b is undefined by UNDEF;
end;
thus the undefined-map of B = the Sorts of A;
thus the Sorts of B = succ the Sorts of A by A1,SUCC;
hereby let o be OperSymbol of S;
let a be Element of Args(o,A);
assume Args(o,A) <> {};
assume
D0: Den(o,B).a <> Den(o,A).a;
D1: dom Den(o,A) = Args(o,A) by FUNCT_2:def 1;
Den(o,B).a = ((((X#*the Arity of S).o)-->
((the Sorts of A)*the ResultSort of S).o)+*((the Charact of A).o)).a
by A2
.= Den(o,A).a by D1,FUNCT_4:13;
hence Den(o,B).a = (the undefined-map of B).the_result_sort_of o by D0;
end;
end;
then DefSorts B = the Sorts of A by Lem7;
hence DefSorts B is non-empty;
thus the undefined-map of B = the Sorts of A;
thus the Sorts of B = succ the Sorts of A by A1,SUCC;
let o be OperSymbol of S;
let a being Element of Args(o,A);
AD: dom Den(o,A) = Args(o,A) by FUNCT_2:def 1;
thus Den(o,B).a
= ch.o.a
.= G(o).a by A2
.= (the Charact of A).o.a by AD,FUNCT_4:13
.= Den(o,A).a;
end;
registration
let S be non empty non void ManySortedSign;
let A be non-empty MSAlgebra over S;
cluster A-undef -> undef-consequent for UndefMSAlgebra over S;
coherence by AUNDEF;
cluster A-undef with_defined_elements for strict UndefMSAlgebra over S;
existence
proof
ex B being strict UndefMSAlgebra over S st
B is A-undef with_defined_elements &
the undefined-map of B = the Sorts of A &
the Sorts of B = succ the Sorts of A &
for o being OperSymbol of S for a being Element of Args(o,A) holds
Den(o,B).a = Den(o,A).a by Th100;
hence thesis;
end;
end;
registration
let S be non empty non void ManySortedSign;
cluster with_defined_elements for MSAlgebra over S;
existence
proof
set A = the non-empty MSAlgebra over S;
set B = the A-undef with_defined_elements strict UndefMSAlgebra over S;
take B;
thus thesis;
end;
end;
registration
let S be non empty non void ManySortedSign;
let A be with_defined_elements MSAlgebra over S;
cluster DefSorts A -> non-empty;
coherence by WDE;
let s be SortSymbol of S;
cluster defined for Element of A,s;
existence
proof
set x = the Element of (DefSorts A).s;
DefSorts A is non-empty by WDE;
then
A0: (DefSorts A).s is non empty by PBOOLE:def 13;
then x in (DefSorts A).s &
(DefSorts A).s c= (the Sorts of A).s by PBOOLE:def 2,def 18;
then x in (the Sorts of A).s;
then reconsider x as Element of A,s;
take x;
let B be UndefMSAlgebra over S; assume
A2: B = A;
deffunc F(element) = {(the undefined-map of B).$1};
consider V being ManySortedSet of the carrier of S such that
A1: for x st x in the carrier of S holds V.x = F(x)
from PBOOLE:sch 4;
for s being SortSymbol of S holds V.s = F(s) by A1;
then DefSorts B = (the Sorts of B)(\)V by DEFS;
then (DefSorts B).s = (the Sorts of B).s\V.s by PBOOLE:def 6
.= (the Sorts of B).s\{(the undefined-map of B).s} by A1;
hence x <> (the undefined-map of B).s by A0,A2,ZFMISC_1:56;
end;
end;
registration
let S;
let A be with_defined_elements UndefMSAlgebra over S;
let s be SortSymbol of S;
cluster defined for Element of A,s;
existence
proof
reconsider B = A as with_defined_elements MSAlgebra over S;
set a = the defined Element of B,s;
A1: a <> (the undefined-map of A).s by DEF;
reconsider a as Element of A,s;
take a;
for B being UndefMSAlgebra over S st B = A
holds a <> (the undefined-map of B).s by A1;
hence thesis by DEF;
end;
end;
begin :: Program algebra
definition
let J be non empty non void ManySortedSign;
let T be MSAlgebra over J;
let X be GeneratorSet of T;
struct (UAStr) ProgramAlgStr over J,T,X(#
carrier -> set,
charact -> PFuncFinSequence of the carrier,
assignments ->
Function of Union [|X, the Sorts of T|], the carrier
#);
end;
definition
let J be non empty non void ManySortedSign;
let T be MSAlgebra over J;
let X be GeneratorSet of T;
let A be ProgramAlgStr over J,T,X;
attr A is disjoint_valued means
the Sorts of T is disjoint_valued &
the assignments of A is one-to-one;
end;
registration
let J be non empty non void ManySortedSign;
let T be MSAlgebra over J;
let X be GeneratorSet of T;
cluster partial quasi_total non-empty for strict ProgramAlgStr over J,T,X;
existence
proof
set A = the non empty set;
set char = the quasi_total homogeneous
non empty non-empty PFuncFinSequence of A;
set assign = the Function of Union [|X, the Sorts of T|], A;
take P = ProgramAlgStr(#A, char, assign#);
thus the charact of P is homogeneous quasi_total;
thus the charact of P <> {};
thus thesis;
end;
end;
registration
let J be non empty non void ManySortedSign;
let T be MSAlgebra over J;
let X be GeneratorSet of T;
cluster with_empty-instruction with_catenation with_if-instruction
with_while-instruction
for partial quasi_total non-empty non empty strict ProgramAlgStr over J,T,X;
existence
proof
set U = the IfWhileAlgebra;
set I = the Function of Union [|X, the Sorts of T|], the carrier of U;
set A = ProgramAlgStr(#the carrier of U, the charact of U, I#);
A is partial quasi_total non-empty
proof
thus the charact of A is homogeneous;
thus the charact of A is quasi_total;
thus the charact of A <> {} & the charact of A is non-empty;
end; then
reconsider A as partial quasi_total non-empty strict
ProgramAlgStr over J,T,X;
take A;
thus 1 in dom the charact of A &
(the charact of A).1 is 0-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 10;
thus 2 in dom the charact of A &
(the charact of A).2 is 2-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 11;
thus 3 in dom the charact of A &
(the charact of A).3 is 3-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 12;
thus 4 in dom the charact of A &
(the charact of A).4 is 2-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 13;
thus thesis;
end;
end;
theorem
for U1,U2 be preIfWhileAlgebra st the UAStr of U1 = the UAStr of U2
holds EmptyIns U1 = EmptyIns U2 &
for I1,J1 being Element of U1
for I2,J2 being Element of U2 st I1 = I2 & J1 = J2
holds I1\;J1 = I2\;J2 & while(I1,J1) = while(I2,J2) &
for C1 being Element of U1
for C2 being Element of U2 st C1 = C2
holds if-then-else(C1,I1,J1) = if-then-else(C2,I2,J2)
proof
let U1,U2 be preIfWhileAlgebra;
assume Z0: the UAStr of U1 = the UAStr of U2;
thus EmptyIns U1 = EmptyIns U2 by Z0;
let I1,J1 be Element of U1;
let I2,J2 be Element of U2;
assume Z1: I1 = I2;
assume Z2: J1 = J2;
thus I1\;J1 = I2\;J2 by Z0,Z1,Z2;
thus while(I1,J1) = while(I2,J2) by Z0,Z1,Z2;
let C1 be Element of U1;
let C2 be Element of U2;
assume Z3: C1 = C2;
thus if-then-else(C1,I1,J1) = if-then-else(C2,I2,J2) by Z0,Z1,Z2,Z3;
end;
theorem Th8:
for U1,U2 be preIfWhileAlgebra st the UAStr of U1 = the UAStr of U2
holds ElementaryInstructions U1 = ElementaryInstructions U2
proof
let U1,U2 be preIfWhileAlgebra;
assume Z0: the UAStr of U1 = the UAStr of U2;
set Y1 = {I1 \; I2 where I1,I2 is Algorithm of U1: I1 <> I1\;I2 &
I2 <> I1\;I2};
set Y2 = {I1 \; I2 where I1,I2 is Algorithm of U2: I1 <> I1\;I2 &
I2 <> I1\;I2};
A1: Y1 = Y2
proof
thus Y1 c= Y2
proof
let x; assume x in Y1; then
consider I1,I2 being Algorithm of U1 such that
A2: x = I1\;I2 & I1 <> I1\;I2 & I2 <> I1\;I2;
reconsider I1,I2 as Algorithm of U2 by Z0;
x = I1\;I2 by Z0,A2;
hence thesis by A2;
end;
let x; assume x in Y2; then
consider I1,I2 being Algorithm of U2 such that
A2: x = I1\;I2 & I1 <> I1\;I2 & I2 <> I1\;I2;
reconsider I1,I2 as Algorithm of U1 by Z0;
x = I1\;I2 by Z0,A2;
hence thesis by A2;
end;
thus ElementaryInstructions U1 = ElementaryInstructions U2 by A1,Z0;
end;
theorem Th9b:
for U1,U2 being Universal_Algebra
for S1 being Subset of U1, S2 being Subset of U2 st S1 = S2
for o1 being operation of U1, o2 being operation of U2 st o1 = o2
holds S1 is_closed_on o1 implies S2 is_closed_on o2
proof
let U1,U2 be Universal_Algebra;
let S1 be Subset of U1;
let S2 be Subset of U2;
assume Z1: S1 = S2;
let o1 be operation of U1;
let o2 be operation of U2;
assume Z2: o1 = o2;
assume
Z3: for s being FinSequence of S1 st len s = arity o1 holds o1.s in S1;
let s be FinSequence of S2;
reconsider s1 = s as FinSequence of S1 by Z1;
assume len s = arity o2;
hence thesis by Z1,Z2,Z3;
end;
theorem Th9a:
for U1,U2 being Universal_Algebra st the UAStr of U1 = the UAStr of U2
for S1 being Subset of U1, S2 being Subset of U2 st S1 = S2
holds S1 is opers_closed implies S2 is opers_closed
proof
let U1,U2 be Universal_Algebra;
assume Z0: the UAStr of U1 = the UAStr of U2;
let S1 be Subset of U1;
let S2 be Subset of U2;
assume Z1: S1 = S2;
assume
Z2: for o be operation of U1 holds S1 is_closed_on o;
let o be operation of U2;
reconsider o1 = o as operation of U1 by Z0;
thus thesis by Z0,Z1,Z2,Th9b;
end;
theorem Th9:
for U1,U2 being Universal_Algebra st the UAStr of U1 = the UAStr of U2
for G being GeneratorSet of U1 holds G is GeneratorSet of U2
proof
let U1,U2 be Universal_Algebra;
assume Z0: the UAStr of U1 = the UAStr of U2;
let G be GeneratorSet of U1;
reconsider G2 = G as Subset of U2 by Z0;
G2 is GeneratorSet of U2
proof
let A be Subset of U2;
reconsider B = A as Subset of U1 by Z0;
assume A is opers_closed;
hence thesis by Z0,Th9a,FREEALG:def 4;
end;
hence G is GeneratorSet of U2;
end;
theorem Th10:
for U1,U2 be Universal_Algebra st the UAStr of U1 = the UAStr of U2
holds signature U1 = signature U2
proof
let U1,U2 be Universal_Algebra;
assume Z0: the UAStr of U1 = the UAStr of U2;
A1: len signature U2 = len the charact of U1 by Z0,UNIALG_1:def 4;
now
let i; assume
A2: i in dom signature U2;
let h be homogeneous non empty PartFunc of (the carrier of U1)*,
the carrier of U1 such that
A3: h = (the charact of U1).i;
reconsider h2 = h as homogeneous non empty PartFunc of (the
carrier of U2)*,the carrier of U2 by Z0;
thus (signature U2).i = arity h by Z0,A2,A3,UNIALG_1:def 4;
end;
hence signature U1 = signature U2 by A1,UNIALG_1:def 4;
end;
registration
let J be non empty non void ManySortedSign;
let T be MSAlgebra over J;
let X be GeneratorSet of T;
cluster non degenerated well_founded ECIW-strict infinite
for with_empty-instruction with_catenation with_if-instruction
with_while-instruction
partial quasi_total non-empty non empty strict ProgramAlgStr over J,T,X;
existence
proof
set U = the infinite IfWhileAlgebra;
set I = the Function of Union [|X, the Sorts of T|], the carrier of U;
set A = ProgramAlgStr(#the carrier of U, the charact of U,I#);
A is partial quasi_total non-empty
proof
thus the charact of A is homogeneous;
thus the charact of A is quasi_total;
thus the charact of A <> {} & the charact of A is non-empty;
end; then
reconsider A as partial quasi_total non-empty strict
ProgramAlgStr over J,T,X;
A is with_empty-instruction with_catenation with_if-instruction
with_while-instruction
proof
thus 1 in dom the charact of A &
(the charact of A).1 is 0-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 10;
thus 2 in dom the charact of A &
(the charact of A).2 is 2-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 11;
thus 3 in dom the charact of A &
(the charact of A).3 is 3-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 12;
thus 4 in dom the charact of A &
(the charact of A).4 is 2-ary non empty homogeneous
quasi_total PartFunc of (the carrier of A)*, the carrier of A
by AOFA_000:def 13;
end; then
reconsider A as with_empty-instruction with_catenation with_if-instruction
with_while-instruction
partial quasi_total non-empty strict ProgramAlgStr over J,T,X;
take A; set W = U;
hereby let I1,I2 be Element of A;
reconsider J1 = I1, J2 = I2 as Element of W;
EmptyIns A = EmptyIns W & I1\;I2 = J1\;J2;
hence (I1 <> EmptyIns A implies I1\;I2 <> I2) &
(I2 <> EmptyIns A implies I1\;I2 <> I1) &
(I1 <> EmptyIns A or I2 <> EmptyIns A implies I1\;I2 <> EmptyIns A)
by AOFA_000:def 24;
end;
hereby let C,I1,I2 be Element of A;
reconsider C1 = C, J1 = I1, J2 = I2 as Element of W;
if-then-else(C,I1,I2) = if-then-else(C1,J1,J2) & EmptyIns W = EmptyIns A;
hence if-then-else(C,I1,I2) <> EmptyIns A by AOFA_000:def 24;
end;
hereby let C,I be Element of A;
reconsider C1 = C, J = I as Element of W;
EmptyIns A = EmptyIns W & while(C,I) = while(C1,J);
hence while(C,I) <> EmptyIns A by AOFA_000:def 24;
end;
hereby let I1,I2,C,J1,J2 be Element of A;
reconsider C1 = C, K1 = I1, K2 = I2, L1 = J1, L2 = J2 as Element of W;
if-then-else(C,J1,J2) = if-then-else(C1,L1,L2) & I1\;I2 = K1\;K2 &
EmptyIns W = EmptyIns A;
hence I1 = EmptyIns A or I2 = EmptyIns A or
I1\;I2 <> if-then-else(C,J1,J2) by AOFA_000:def 24;
end;
hereby let I1,I2,C,J be Element of A;
reconsider C1 = C, K1 = I1, K2 = I2, L = J as Element of W;
EmptyIns W = EmptyIns A & I1\;I2 = K1\;K2 & while(C,J) = while(C1,L);
hence I1 <> EmptyIns A & I2 <> EmptyIns A implies I1\;I2 <> while(C,J)
by AOFA_000:def 24;
end;
hereby let C1,I1,I2,C2,J be Element of A;
reconsider C3 = C1, K1 = I1, K2 = I2, C4 = C2, L = J as Element of W;
while(C2,J) = while(C4,L) &
if-then-else(C1,I1,I2) = if-then-else(C3,K1,K2);
hence if-then-else(C1,I1,I2) <> while(C2,J) by AOFA_000:def 24;
end;
thus A is well_founded
proof
A8: the UAStr of W = the UAStr of A; then
ElementaryInstructions W = ElementaryInstructions A &
ElementaryInstructions W is GeneratorSet of W by Th8,AOFA_000:def 25;
hence ElementaryInstructions A is GeneratorSet of A by A8,Th9;
end;
the UAStr of A = the UAStr of W; then
signature A = signature W by Th10;
hence signature A = ECIW-signature by AOFA_000:def 27;
the UAStr of A = the UAStr of U; then
ElementaryInstructions A = ElementaryInstructions U by Th8;
hence ElementaryInstructions A is infinite;
end;
end;
definition
let J be non empty non void ManySortedSign;
let T be MSAlgebra over J;
let X be GeneratorSet of T;
mode preIfWhileAlgebra of X is
with_empty-instruction with_catenation with_if-instruction
with_while-instruction
partial quasi_total non-empty non empty ProgramAlgStr over J,T,X;
end;
definition
let J be non empty non void ManySortedSign;
let T be MSAlgebra over J;
let X be GeneratorSet of T;
mode IfWhileAlgebra of X is
non degenerated well_founded ECIW-strict preIfWhileAlgebra of X;
end;
definition
let J be non empty non void ManySortedSign;
let T be non-empty MSAlgebra over J;
let X be non-empty GeneratorSet of T;
let A be non empty ProgramAlgStr over J,T,X;
let a be SortSymbol of J;
let x be Element of X.a;
let t be Element of T,a;
func x:=(t,A) -> Algorithm of A equals (the assignments of A).[x,t];
coherence
proof
[|X, the Sorts of T|].a = [:X.a, (the Sorts of T).a:] by PBOOLE:def 16;then
dom [|X, the Sorts of T|] = the carrier of J &
[x,t] in [|X, the Sorts of T|].a by ZFMISC_1:87,PARTFUN1:def 2;
hence thesis by CARD_5:2,FUNCT_2:5;
end;
end;
registration
let S be set;
let T be disjoint_valued non-empty ManySortedSet of S;
cluster non-empty for ManySortedSubset of T;
existence
proof
set Y = the non-empty ManySortedSubset of T;
take Y; thus thesis;
end;
end;
definition
let J be non void non empty ManySortedSign;
let T,C be non-empty MSAlgebra over J;
let X be non-empty GeneratorSet of T;
func C-States(X) -> Subset of MSFuncs(X, the Sorts of C) means: ST:
for s being ManySortedFunction of X, the Sorts of C holds s in it iff
ex f being ManySortedFunction of T,C st f is_homomorphism T,C & s = f||X;
existence
proof
defpred P[element] means ex f being ManySortedFunction of T, C st
f is_homomorphism T,C & $1 = f||X;
consider A being set such that
A1: for x holds x in A iff x in MSFuncs(X, the Sorts of C) & P[x]
from XBOOLE_0:sch 1;
A c= MSFuncs(X, the Sorts of C)
proof
let x; thus thesis by A1;
end; then
reconsider A as Subset of MSFuncs(X, the Sorts of C);
take A; let s be ManySortedFunction of X, the Sorts of C;
X is_transformable_to the Sorts of C
proof
let i be set; assume i in the carrier of J; then
reconsider i as SortSymbol of J;
(the Sorts of C).i is non empty;
hence thesis;
end;
hence thesis by A1,AUTALG_1:20;
end;
uniqueness
proof let A1,A2 be Subset of MSFuncs(X, the Sorts of C) such that
A1: for s being ManySortedFunction of X, the Sorts of C holds s in A1 iff
ex f being ManySortedFunction of T,C st f is_homomorphism T,C & s = f||X
and
A2: for s being ManySortedFunction of X, the Sorts of C holds s in A2 iff
ex f being ManySortedFunction of T,C st f is_homomorphism T,C & s = f||X;
A4: X is_transformable_to the Sorts of C
proof
let i be set; assume i in the carrier of J; then
reconsider i as SortSymbol of J;
(the Sorts of C).i is non empty;
hence thesis;
end;
thus A1 c= A2
proof
let x; assume
A3: x in A1; then
reconsider x as ManySortedFunction of X, the Sorts of C
by A4,AUTALG_1:19;
ex f being ManySortedFunction of T,C st f is_homomorphism T,C & x = f||X
by A1,A3;
hence thesis by A2;
end;
let x; assume
A3: x in A2; then
reconsider x as ManySortedFunction of X, the Sorts of C
by A4,AUTALG_1:19;
ex f being ManySortedFunction of T,C st f is_homomorphism T,C & x = f||X
by A2,A3;
hence thesis by A1;
end;
end;
definition
let S be non empty non void ManySortedSign;
let A,B be MSAlgebra over S;
attr B is A-sup-image means: SUP:
the Sorts of A is_transformable_to the Sorts of B &
ex h being ManySortedFunction of A,B st h is_homomorphism A,B;
end;
registration
let S be non empty non void ManySortedSign;
let A be MSAlgebra over S;
cluster A-sup-image for MSAlgebra over S;
existence
proof
take A; thus the Sorts of A is_transformable_to the Sorts of A;
take id the Sorts of A;
thus thesis by MSUALG_3:9;
end;
end;
registration
let S be non empty non void ManySortedSign;
let A be non-empty MSAlgebra over S;
cluster A-sup-image for non-empty MSAlgebra over S;
existence
proof
take A; thus the Sorts of A is_transformable_to the Sorts of A;
take id the Sorts of A;
thus thesis by MSUALG_3:9;
end;
end;
definition
let S be non empty non void ManySortedSign;
let A be MSAlgebra over S;
mode sup-image of A is A-sup-image MSAlgebra over S;
end;
registration
let J be non void non empty ManySortedSign;
let T be non-empty MSAlgebra over J;
let C be non-empty sup-image of T;
let X be non-empty GeneratorSet of T;
cluster C-States(X) -> non empty;
coherence
proof
consider h being ManySortedFunction of T,C such that
A1: h is_homomorphism T,C by SUP;
h||X in C-States(X) by A1,ST;
hence thesis;
end;
end;
theorem Th101:
for B being non void non empty ManySortedSign
for T,C being non-empty MSAlgebra over B
for X being non-empty GeneratorSet of T
for g being set st g in C-States(X)
holds g is ManySortedFunction of X, the Sorts of C
proof
let B be non void non empty ManySortedSign;
let T,C be non-empty MSAlgebra over B;
let X be non-empty GeneratorSet of T;
X is_transformable_to the Sorts of C
proof
let i be set; assume i in the carrier of B; then
reconsider i as SortSymbol of B;
(the Sorts of C).i is non empty;
hence thesis;
end;
hence thesis by AUTALG_1:19;
end;
registration
let B be non void non empty ManySortedSign;
let T,C be non-empty MSAlgebra over B;
let X be non-empty GeneratorSet of T;
cluster -> Relation-like Function-like for Element of C-States(X);
coherence
proof
let g be Element of (C)-States(X);
(C)-States(X) is empty or (C)-States(X) is non empty;
hence thesis by Th101;
end;
end;
registration
let B be non void non empty ManySortedSign;
let T,C be non-empty MSAlgebra over B;
let X be non-empty GeneratorSet of T;
cluster -> Function-yielding the carrier of B-defined
for Element of C-States(X);
coherence
proof
let g be Element of (C)-States(X);
(C)-States(X) is empty or (C)-States(X) is non empty; then
g is empty or g in (C)-States(X) by SUBSET_1:def 1;
hence thesis by Th101,RELAT_1:171;
end;
end;
registration
let B be non void non empty ManySortedSign;
let T be non-empty MSAlgebra over B;
let C be non-empty sup-image of T;
let X be non-empty GeneratorSet of T;
cluster -> total for Element of C-States(X);
coherence
proof
let g be Element of (C)-States(X);
g is ManySortedFunction of X, the Sorts of C by Th101;
thus thesis by Th101;::,RELAT_1:171;
end;
end;
definition
let B be non void non empty ManySortedSign;
let T be non-empty MSAlgebra over B;
let C be non-empty MSAlgebra over B;
let X be non-empty GeneratorSet of T;
let a be SortSymbol of B;
let x be Element of X.a;
let f be Element of C,a;
func f-States(X,x) -> Subset of (C)-States(X) means
for s being ManySortedFunction of X, the Sorts of C holds
s in it iff s in (C)-States(X) & s.a.x <> f;
existence
proof
defpred P[element] means ex s being ManySortedFunction of X, the Sorts of C
st s = $1 & s.a.x <> f;
consider S being set such that
A1: for x holds x in S iff x in C-StatesX & P[x] from XBOOLE_0:sch 1;
S c= C-StatesX
proof
let x; thus thesis by A1;
end; then
reconsider S as Subset of C-StatesX;
take S; let s be ManySortedFunction of X, the Sorts of C;
hereby
assume s in S; then
s in C-StatesX & P[s] by A1;
hence s in (C)-States(X) & s.a.x <> f;
end;
thus thesis by A1;
end;
uniqueness
proof
let S1,S2 be Subset of C-StatesX such that
A1: for s being ManySortedFunction of X, the Sorts of C holds
s in S1 iff s in (C)-States(X) & s.a.x <> f and
A2: for s being ManySortedFunction of X, the Sorts of C holds
s in S2 iff s in (C)-States(X) & s.a.x <> f;
thus S1 c= S2
proof
let c be element; assume
A3: c in S1; then
reconsider s = c as ManySortedFunction of X, the Sorts of C by Th101;
s in (C)-States(X) & s.a.x <> f by A1,A3;
hence thesis by A2;
end;
let c be element; assume
A3: c in S2; then
reconsider s = c as ManySortedFunction of X, the Sorts of C by Th101;
s in (C)-States(X) & s.a.x <> f by A2,A3;
hence thesis by A1;
end;
end;
registration
let S be non empty non void ManySortedSign;
let A be non-empty MSAlgebra over S;
let o be OperSymbol of S;
cluster -> Function-like Relation-like for Element of Args(o,A);
coherence
proof
let a be Element of Args(o,A);
dom the Arity of S = the carrier' of S by FUNCT_2:def 1; then
Args(o,A) = (the Sorts of A)#.the_arity_of o by FUNCT_1:13
.= product ((the Sorts of A)*the_arity_of o) by FINSEQ_2:def 5;
hence thesis;
end;
end;
definition
let B be non void non empty ManySortedSign;
let X be non-empty ManySortedSet of the carrier of B;
let T be (X,B)-terms non-empty MSAlgebra over B;
let C be non-empty sup-image of T;
let a be SortSymbol of B;
let t be Element of T, a;
let s be Function-yielding Function;
given h being ManySortedFunction of T,C,
Q being GeneratorSet of T such that
A1: h is_homomorphism T,C & Q = doms s & s = h||Q;
func t value_at(C, s) -> Element of C, a means
ex f being ManySortedFunction of T,C,
Q being GeneratorSet of T st
f is_homomorphism T,C & Q = doms s & s = f||Q & it = f.a.t;
existence
proof
reconsider d = h.a.t as Element of (the Sorts of C).a by FUNCT_2:5;
take d;
take h; thus thesis by A1;
end;
uniqueness
proof
let d1,d2 be Element of C, a;
given f being ManySortedFunction of T,C,
Q being GeneratorSet of T such that
A1: f is_homomorphism T,C & Q = doms s & s = f||Q & d1 = f.a.t;
given g being ManySortedFunction of T,C,
Q being GeneratorSet of T such that
A2: g is_homomorphism T,C & Q = doms s & s = g||Q & d2 = g.a.t;
thus thesis by A1,A2,EXTENS_1:19;
end;
end;
begin :: Generator system
definition
let S,X;
let T be non-empty (X,S)-terms MSAlgebra over S;
struct GeneratorSystem over S,X,T(#
generators -> non-empty GeneratorSet of T,
supported-var -> (ManySortedFunction of the generators, FreeGen X),
supported-term -> ManySortedMSSet of the generators, the carrier of S
#);
end;
definition
let S,X;
let T be non-empty (X,S)-terms MSAlgebra over S;
let G be GeneratorSystem over S,X,T;
let s be SortSymbol of S;
mode Element of G,s -> Element of T,s means: ELEM:
it in (the generators of G).s;
existence
proof
set t = the Element of (the generators of G).s;
(the generators of G).s c= (the Sorts of T).s &
t in (the generators of G).s
by PBOOLE:def 2,PBOOLE:def 18;
hence thesis;
end;
end;
definition
let S,X;
let T be non-empty (X,S)-terms MSAlgebra over S;
let G be GeneratorSystem over S,X,T;
let s be SortSymbol of S;
func G.s -> Component of the generators of G equals
(the generators of G).s;
coherence;
let g be Element of G,s;
func supp-var g -> Element of (FreeGen X).s equals
(the supported-var of G).s.g;
coherence
proof
thus thesis by ELEM,FUNCT_2:5;
end;
end;
definition
let S,X;
let T be non-empty (X,S)-terms VarMSAlgebra over S;
let G be GeneratorSystem over S,X,T;
let s be SortSymbol of S;
let g be Element of G,s;
assume
A: (the supported-term of G).s.g is ManySortedFunction of vf g, the Sorts of T;
func supp-term g -> ManySortedFunction of vf g, the Sorts of T
equals
(the supported-term of G).s.g;
coherence by A;
end;
definition
let S be non void non empty ManySortedSign;
let X be non-empty ManySortedSet of the carrier of S;
let T be non-empty (X,S)-terms VarMSAlgebra over S;
let C be non-empty sup-image of T;
let G be GeneratorSystem over S,X,T;
attr G is C-supported means: SUPP:
FreeGen X is ManySortedSubset of the generators of G &
for s being SortSymbol of S holds dom ((the supported-term of G).s) = G.s &
for t being Element of G,s holds
(the supported-term of G).s.t is ManySortedFunction of vf t, the Sorts of T &
(t in (FreeGen X).s implies supp-term t = id (s-singleton(t)) &
supp-var t = t) &
(for v being Element of C-States the generators of G
st v.s.(supp-var t) = v.s.t
for r being SortSymbol of S
for x being Element of (FreeGen X).r
for q being Element of (the Sorts of T).r
st x in (vf t).r & q = (supp-term t).r.x & q value_at(C,v) is defined
holds v.r.x = q value_at(C, v)) &
(t nin (FreeGen X).s implies
for H being ManySortedSubset of the generators of G st H = FreeGen X
for v being Element of C, s
for f being ManySortedFunction of the generators of G, the Sorts of C
st f in C-States the generators of G
for u being ManySortedFunction of FreeGen X, the Sorts of C
st for a being SortSymbol of S for z being Element of (FreeGen X).a
st z in (vf t).a holds
for q being Element of T,a st q = (supp-term t).a.z
holds u.a.z = q value_at(C, (f||H)+*(s,supp-var t,v))
for H being ManySortedSubset of the Sorts of T st H = FreeGen X
for h being ManySortedFunction of T,C st h is_homomorphism T,C & h||H = u
holds v = h.s.t);
end;
definition
let S;
let X be non-empty countable ManySortedSet of S;
let A be vf-free all_vars_including inheriting_operations free_in_itself
(X,S)-terms VarMSAlgebra over S;
let C be non-empty sup-image of A such that
S: C is Equations(S,A)-satisfying;
let G be GeneratorSystem over S,X,A such that
A: G is C-supported;
let s be Element of C-States the generators of G;
let r be SortSymbol of S;
let v be Element of C,r;
let t be Element of G,r;
func succ(s,t,v) -> Element of C-States the generators of G means
it.r.t = v &
for p being SortSymbol of S
for x being Element of (FreeGen X).p st p = r implies x <> t holds
(x nin (vf t).p implies it.p.x = s.p.x) &
for u being ManySortedFunction of FreeGen X, the Sorts of C
for H being ManySortedSubset of the generators of G st H = FreeGen X
for f being ManySortedFunction of the generators of G, the Sorts of C st
f = s & u = (f||H)+*(r,supp-var t,v) holds
(x in (vf t).p implies for q being Element of A,p st q = (supp-term t).p.x
holds it.p.x = q value_at(C, u));
existence
proof
reconsider H = FreeGen X as ManySortedSubset of the generators of G
by A,SUPP;
reconsider I = FreeGen X as GeneratorSet of A by MSAFREE4:45;
reconsider f1 = s as ManySortedFunction of the generators of G,
the Sorts of C by Th101;
set g = f1||H;
set r0 = r;
defpred P[element,element] means
ex f being Function st f = $2 &
dom f = H.$1 & ($1 = r0 & t in H.r0 implies f.t = v) &
for r being SortSymbol of S st $1 = r
for x being Element of H.r st r = r0 implies x <> t holds
(x nin (vf t).r implies f.x = g.r.x) & (x in (vf t).r implies
for q being Element of A,r st q = (supp-term t).r.x
for u being ManySortedFunction of H, the Sorts of C
st u = g+*(r0,supp-var t,v)
holds f.x = q value_at(C, u));
A1: for x st x in the carrier of S ex y st P[x,y]
proof
let x;
assume x in the carrier of S; then
reconsider p = x as SortSymbol of S;
defpred Q[element,element] means
(p = r & $1 = t implies $2 = v) &
((p = r implies $1 <> t) implies
($1 nin (vf t).x implies $2 = g.x.$1) &
($1 in (vf t).x implies
for r being SortSymbol of S st x = r
for q being Element of (the Sorts of A).r st q = (supp-term t).r.$1
for u being ManySortedFunction of H, the Sorts of C
st u = g+*(r0,supp-var t,v)
holds $2 = q value_at(C, u)));
B2: for y st y in H.x ex z st Q[y,z]
proof
let y; assume y in H.x;
per cases;
suppose
C1: p = r & y = t;
take z = v;
thus thesis by C1;
end;
suppose
C2: (p = r implies y <> t) & y in (vf t).x; then
reconsider q = (supp-term t).p.y as Element of (the Sorts of A).p
by FUNCT_2:5;
take z = q value_at(C, g+*(r0,supp-var t,v));
thus thesis by C2;
end;
suppose
C3: (p = r implies y <> t) & y nin (vf t).x;
take z = g.x.y;
thus thesis by C3;
end;
end;
consider j being Function such that
B3: dom j = H.x & for y st y in H.x holds Q[y,j.y]
from CLASSES1:sch 1(B2);
take j;
thus P[x,j]
proof
take f = j;
thus f = j & dom f = H.x by B3;
thus x = r0 & t in H.r0 implies f.t = v by B3;
let r be SortSymbol of S; assume
B4: x = r;
let x be Element of H.r;
assume
B5: r = r0 implies x <> t;
hence (x nin (vf t).r implies f.x = g.r.x) by B3,B4;
thus (x in (vf t).r implies
for q being Element of A,r st q = (supp-term t).r.x
for u being ManySortedFunction of H, the Sorts of C
st u = g+*(r0,supp-var t,v)
holds f.x = q value_at(C, u)) by B4,B3,B5;
end;
end;
consider k being Function such that
A2: dom k = the carrier of S &
for x st x in the carrier of S holds P[x,k.x]
from CLASSES1:sch 1(A1);
reconsider k as ManySortedSet of the carrier of S
by A2,RELAT_1:def 18,PARTFUN1:def 2;
k is Function-yielding
proof
let x; assume x in dom k; then
P[x,k.x] by A2;
hence thesis;
end; then
reconsider k as ManySortedFunction of the carrier of S;
k is ManySortedFunction of H, the Sorts of C
proof
let x being set; assume x in the carrier of S; then
reconsider p = x as SortSymbol of S;
consider f being Function such that
A3: k.p = f & dom f = H.p & (p = r0 & t in H.r0 implies f.t = v) &
for r being SortSymbol of S st p = r
for x being Element of H.r st r = r0 implies x <> t holds
(x nin (vf t).r implies f.x = g.r.x) & (x in (vf t).r implies
for q being Element of A,r st q = (supp-term t).r.x
for u being ManySortedFunction of H, the Sorts of C
st u = g+*(r0,supp-var t,v)
holds f.x = q value_at(C, u)) by A2;
rng f c= (the Sorts of C).p
proof
let y; assume y in rng f; then
consider z such that
A4: z in dom f & y = f.z by FUNCT_1:def 3;
per cases;
suppose
A5: r = p & z = t;
thus y in (the Sorts of C).p by A3,A4,A5;
end;
suppose (p = r implies t <> z) & z nin (vf t).p; then
y = g.p.z by A3,A4;
hence y in (the Sorts of C).p by A3,A4,FUNCT_2:5;
end;
suppose
A5: (p = r implies t <> z) & z in (vf t).p;
vf t is ManySortedSubset of H by Th69; then
(vf t).p c= H.p by PBOOLE:def 2,def 18; then
reconsider z as Element of H.p by A5;
reconsider q = (supp-term t).p.z as Element of (the Sorts of A).p
by A5,FUNCT_2:5;
reconsider u = g+*(r0,supp-var t,v) as
ManySortedFunction of H, the Sorts of C;
y = q value_at(C,u) by A4,A5,A3;
hence thesis;
end;
end;
hence thesis by A3,FUNCT_2:2;
end; then
reconsider k as ManySortedFunction of H, the Sorts of C;
I is Equations(S,A)-free by MSAFREE4:75;
then consider h being ManySortedFunction of A,C such that
A6: h is_homomorphism A,C & k = h||I by S,MSAFREE4:def 12;
reconsider w = h||the generators of G as
Element of C-States the generators of G by A6,ST;
take w;
hereby per cases;
suppose
Z4: t in H.r0;
H2: P[r0,k.r0] by A2;
thus w.r.t = ((h.r)|((the generators of G).r)).t by MSAFREE:def 1
.= h.r.t by ELEM,FUNCT_1:49 .= ((h.r)|(H.r)).t by Z4,FUNCT_1:49
.= v by H2,Z4,A6,MSAFREE:def 1;
end;
suppose
H0: t nin H.r0;
H4: now let a be SortSymbol of S;
H5: P[a,k.a] by A2;
let z be Element of (FreeGen X).a;
a = r0 implies t <> z by H0;
hence z in (vf t).a implies
for q being Element of A,a st q = (supp-term t).a.z
holds k.a.z = q value_at(C, g+*(r0,supp-var t,v)) by H5;
end;
thus w.r.t = ((h.r)|((the generators of G).r)).t by MSAFREE:def 1
.= h.r.t by ELEM,FUNCT_1:49
.= v by A6,H0,H4,A,SUPP;
end;
end;
let p be SortSymbol of S;
let x be Element of (FreeGen X).p; assume
Z3: p = r implies x <> t;
reconsider x0 = x as Element of H.p;
consider f being Function such that
A7: f = k.p & dom f = H.p & (p = r & t in H.r0 implies f.t = v) &
for r being SortSymbol of S st p = r
for x being Element of H.r st r = r0 implies x <> t holds
(x nin (vf t).r implies f.x = g.r.x) & (x in (vf t).r implies
for q being Element of A,r st q = (supp-term t).r.x
for u being ManySortedFunction of H, the Sorts of C
st u = g+*(r0,supp-var t,v)
holds f.x = q value_at(C, u)) by A2;
H0: x in H.p & H.p c= (the generators of G).p by PBOOLE:def 2,def 18;
H2: w.p.x = (h.p)|((the generators of G).p).x by MSAFREE:def 1
.= h.p.x by H0,FUNCT_1:49
.= (h.p)|(I.p).x by FUNCT_1:49
.= k.p.x by A6,MSAFREE:def 1;
g.p.x = (f1.p)|(H.p).x by MSAFREE:def 1 .= s.p.x by FUNCT_1:49;
hence x nin (vf t).p implies w.p.x = s.p.x by Z3,A7,H2;
let u be ManySortedFunction of FreeGen X, the Sorts of C;
let H be ManySortedSubset of the generators of G such that
A8: H = FreeGen X;
let f be ManySortedFunction of the generators of G, the Sorts of C such
that
A9: f = s & u = (f||H)+*(r,supp-var t,v);
assume
G1: x in (vf t).p;
let q be Element of A,p; assume q = (supp-term t).p.x;
hence w.p.x = q value_at(C, u) by Z3,H2,A7,A8,A9,G1;
end;
uniqueness
proof
let w1,w2 be Element of C-States the generators of G; assume that
A1: w1.r.t = v &
for p being SortSymbol of S
for x being Element of (FreeGen X).p st p = r implies x <> t holds
(x nin (vf t).p implies w1.p.x = s.p.x) &
for u being ManySortedFunction of FreeGen X, the Sorts of C
for H being ManySortedSubset of the generators of G st H = FreeGen X
for f being ManySortedFunction of the generators of G, the Sorts of C st
f = s & u = (f||H)+*(r,supp-var t,v) holds
(x in (vf t).p implies for q being Element of A,p st q = (supp-term t).p.x
holds w1.p.x = q value_at(C, u)) and
A2: w2.r.t = v &
for p being SortSymbol of S
for x being Element of (FreeGen X).p st p = r implies x <> t holds
(x nin (vf t).p implies w2.p.x = s.p.x) &
for u being ManySortedFunction of FreeGen X, the Sorts of C
for H being ManySortedSubset of the generators of G st H = FreeGen X
for f being ManySortedFunction of the generators of G, the Sorts of C st
f = s & u = (f||H)+*(r,supp-var t,v) holds
(x in (vf t).p implies for q being Element of A,p st q = (supp-term t).p.x
holds w2.p.x = q value_at(C, u));
reconsider g1 = w1, g2 = w2 as ManySortedFunction of the generators of G,
the Sorts of C by Th101;
reconsider H = FreeGen X as ManySortedSubset of the generators of G
by A,SUPP;
S1: now let x; assume x in the carrier of S; then
reconsider p = x as SortSymbol of S;
A4: dom((g1||H).p) = H.p & dom((g2||H).p) = H.p by FUNCT_2:def 1;
now let y; assume
A8: y in H.p;
per cases;
suppose
A5: y = t & p = r;
thus (g1||H).p.y = ((g1.p)|(H.p)).y by MSAFREE:def 1
.= v by A1,A5,A8,FUNCT_1:49
.= ((g2.p)|(H.p)).y by A2,A5,A8,FUNCT_1:49
.= (g2||H).p.y by MSAFREE:def 1;
end;
suppose
A5: (p = r implies y <> t) & y nin (vf t).p;
thus (g1||H).p.y = ((g1.p)|(H.p)).y by MSAFREE:def 1
.= g1.p.y by A8,FUNCT_1:49
.= s.p.y by A1,A5,A8 .= g2.p.y by A2,A5,A8
.= ((g2.p)|(H.p)).y by A8,FUNCT_1:49
.= (g2||H).p.y by MSAFREE:def 1;
end;
suppose
A7: (p = r implies y <> t) & y in (vf t).p;
reconsider q = (supp-term t).p.y as Element of A,p by A7,FUNCT_2:5;
reconsider f = s as ManySortedFunction of the generators of G,
the Sorts of C by Th101;
reconsider u = (f||H)+*(r,supp-var t,v) as ManySortedFunction of
FreeGen X, the Sorts of C;
thus (g1||H).p.y = ((g1.p)|(H.p)).y by MSAFREE:def 1
.= g1.p.y by A8,FUNCT_1:49 .= q value_at(C, u) by A1,A7,A8
.= w2.p.y by A2,A7,A8
.= ((g2.p)|(H.p)).y by A8,FUNCT_1:49
.= (g2||H).p.y by MSAFREE:def 1;
end;
end;
hence (g1||H).x = (g2||H).x by A4,FUNCT_1:2;
end;
consider h1 being ManySortedFunction of A,C such that
B1: h1 is_homomorphism A,C & g1 = h1||the generators of G by ST;
consider h2 being ManySortedFunction of A,C such that
B2: h2 is_homomorphism A,C & g2 = h2||the generators of G by ST;
reconsider I = H as GeneratorSet of A by MSAFREE4:45;
h1||I = g1||H & h2||I = g2||H by B1,B2,EQUATION:5;
hence thesis by S1,B1,B2,EXTENS_1:19,PBOOLE:3;
end;
end;
definition
let B be non void non empty ManySortedSign;
let Y be non-empty countable ManySortedSet of the carrier of B;
let T be vf-free all_vars_including inheriting_operations free_in_itself
(Y,B)-terms VarMSAlgebra over B;
let C be non-empty sup-image of T;
let X be GeneratorSystem over B,Y,T;
let A be preIfWhileAlgebra of the generators of X;
let a be SortSymbol of B;
let x be Element of (the generators of X).a;
let z be Element of C,a;
func C-Execution(A,x,z) -> Subset of
Funcs([:C-States(the generators of X), the carrier of A:],
C-States(the generators of X)) means
for f being Function of [:C-States(the generators of X), the carrier of A:],
C-States(the generators of X) holds
f in it iff f is ExecutionFunction of A, C-States(the generators of X),
z-States(the generators of X, x) &
for s being Element of C-States(the generators of X)
for b being SortSymbol of B
for v being Element of (the generators of X).b
for v0 being Element of X,b st v0 = v
for t being Element of T, b
holds f.(s, v:=(t,A)) = succ(s,v0,t value_at(C,s));
existence
proof
defpred P[element] means
ex f being Function of [:C-States(the generators of X), the carrier of A:],
C-States(the generators of X) st
$1 = f & f is ExecutionFunction of A, C-States(the generators of X),
z-States(the generators of X, x) &
for s being Element of C-States(the generators of X)
for b being SortSymbol of B
for v being Element of (the generators of X).b
for v0 being Element of X, b st v0 = v
for t being Element of T, b
holds f.(s, v:=(t,A)) = succ(s,v0,t value_at(C, s));
consider Z being set such that
A1: for c being element holds c in Z iff
c in Funcs([:C-States(the generators of X), the carrier of A:],
C-States(the generators of X)) & P[c]
from XBOOLE_0:sch 1;
Z c= Funcs([:C-States(the generators of X), the carrier of A:],
C-States(the generators of X))
proof
let x; thus thesis by A1;
end; then
reconsider Z as Subset of Funcs([:C-States(the generators of X),
the carrier of A:],
C-States(the generators of X));
take Z;
let f be Function of [:C-States(the generators of X), the carrier of A:],
C-States(the generators of X);
hereby assume f in Z; then P[f] by A1;
hence f is ExecutionFunction of A, C-States(the generators of X),
z-States(the generators of X, x) &
for s being Element of C-States(the generators of X)
for b being SortSymbol of B
for v being Element of (the generators of X).b
for v0 being Element of X, b st v0 = v
for t being Element of T, b
holds f.(s, v:=(t,A)) = succ(s,v0,t value_at(C, s));
end;
f in Funcs([:C-States(the generators of X), the carrier of A:],
C-States(the generators of X)) by FUNCT_2:8;
hence thesis by A1;
end;
uniqueness
proof
let Z1,Z2 be Subset of Funcs([:C-States(the generators of X),
the carrier of A:],C-States(the generators of X))
such that
A1: for f being Function of [:C-States(the generators of X),the carrier of A:],
C-States(the generators of X) holds
f in Z1 iff f is ExecutionFunction of A, C-States(the generators of X),
z-States(the generators of X, x) &
for s being Element of C-States(the generators of X)
for b being SortSymbol of B
for v being Element of (the generators of X).b
for v0 being Element of X, b st v0 = v
for t being Element of T, b
holds f.(s, v:=(t,A)) = succ(s,v0,t value_at(C, s)) and
A2: for f being Function of [:C-States(the generators of X),the carrier of A:],
C-States(the generators of X) holds
f in Z2 iff f is ExecutionFunction of A, C-States(the generators of X),
z-States(the generators of X, x) &
for s being Element of C-States(the generators of X)
for b being SortSymbol of B
for v being Element of (the generators of X).b
for v0 being Element of X, b st v0 = v
for t being Element of T, b
holds f.(s, v:=(t,A)) = succ(s,v0,t value_at(C, s));
thus Z1 c= Z2
proof
let c be element; assume
A3: c in Z1; then
reconsider f = c as Function of [:C-States(the generators of X),
the carrier of A:], C-States(the generators of X) by FUNCT_2:66;
f is ExecutionFunction of A, C-States(the generators of X),
z-States(the generators of X, x) &
for s being Element of C-States(the generators of X)
for b being SortSymbol of B
for v being Element of (the generators of X).b
for v0 being Element of X, b st v0 = v
for t being Element of T, b
holds f.(s, v:=(t,A)) = succ(s,v0,t value_at(C, s)) by A1,A3;
hence thesis by A2;
end;
let c be element; assume
A3: c in Z2; then
reconsider f = c as Function of [:C-States(the generators of X),
the carrier of A:],
C-States(the generators of X) by FUNCT_2:66;
f is ExecutionFunction of A, C-States(the generators of X),
z-States(the generators of X, x) &
for s being Element of C-States(the generators of X)
for b being SortSymbol of B
for v being Element of (the generators of X).b
for v0 being Element of X, b st v0 = v
for t being Element of T, b
holds f.(s, v:=(t,A)) = succ(s,v0,t value_at(C, s)) by A2,A3;
hence thesis by A1;
end;
end;
begin :: Boolean signature
definition
struct (ManySortedSign) ConnectivesSignature (#
carrier,carrier' -> set,
Arity -> Function of the carrier',(the carrier)*,
ResultSort -> Function of the carrier', the carrier,
connectives -> FinSequence of the carrier'
#);
end;
definition
let S be ConnectivesSignature;
attr S is 1-1-connectives means: ONETOONE:
the connectives of S is one-to-one;
end;
definition
let n be Nat;
let S be ConnectivesSignature;
attr S is n-connectives means: CONN:
len the connectives of S = n;
end;
registration
let n be Nat;
cluster n-connectives non empty non void for strict ConnectivesSignature;
existence
proof
set S = the non empty non void ManySortedSign;
set o = the OperSymbol of S;
reconsider c = n|->o as n-element FinSequence of the carrier' of S;
take C = ConnectivesSignature(# the carrier of S, the carrier' of S,
the Arity of S, the ResultSort of S, c #);
thus len the connectives of C = n by CARD_1:def 7;
thus the carrier of C is non empty;
thus the carrier' of C is non empty;
end;
end;
definition
struct (ConnectivesSignature) BoolSignature (#
carrier,carrier' -> set,
Arity -> Function of the carrier',(the carrier)*,
ResultSort -> Function of the carrier', the carrier,
bool-sort -> (Element of the carrier),
connectives -> FinSequence of the carrier'
#);
end;
registration
let n be Nat;
cluster n-connectives non empty non void for strict BoolSignature;
existence
proof
set S = the non empty non void ManySortedSign;
set o = the OperSymbol of S;
reconsider c = n|->o as n-element FinSequence of the carrier' of S;
set b = the SortSymbol of S;
take C = BoolSignature(# the carrier of S, the carrier' of S,
the Arity of S, the ResultSort of S, b, c #);
thus len the connectives of C = n by CARD_1:def 7;
thus the carrier of C is non empty;
thus the carrier' of C is non empty;
end;
end;
definition
let B be BoolSignature;
attr B is bool-correct means: CORRECT:
len the connectives of B >= 3 &
(the connectives of B).1 is_of_type {}, the bool-sort of B &
(the connectives of B).2 is_of_type <*the bool-sort of B*>,
the bool-sort of B &
(the connectives of B).3 is_of_type
<*the bool-sort of B, the bool-sort of B*>, the bool-sort of B;
end;
registration
cluster 3-connectives 1-1-connectives bool-correct non empty non void
for strict BoolSignature;
existence
proof
set X = {0}, Y = {0,1,2};
reconsider 00 = 0 as Element of X by TARSKI:def 1;
reconsider 01 = 1, 02 = 2, y0 = 0 as Element of Y by ENUMSET1:def 1;
set a = (0,1,2)-->({},<*00*>,<*00,00*>);
set r = {0,1,2}-->00;
<*>X in X* & <*00*> in X* & <*00,00*> in X* by FINSEQ_1:def 11; then
{{},<*00*>,<*00,00*>} c= X* by Th24; then
rng a c= X* & dom a = Y by BORSUK_7:21,Th23; then
reconsider a as Function of Y,X* by FUNCT_2:2;
reconsider r as Function of Y,X;
take B = BoolSignature(#X,Y,a,r,00,<*y0,01,02*>#);
thus len the connectives of B = 3 by FINSEQ_1:45;
thus the connectives of B is one-to-one by FINSEQ_3:95;
thus len the connectives of B >= 3 by FINSEQ_1:45;
(the connectives of B).1 = 0 by FINSEQ_1:45;
hence (the Arity of B).((the connectives of B).1) = {} by Th21;
thus (the ResultSort of B).((the connectives of B).1) = the bool-sort of B;
(the connectives of B).2 = 1 by FINSEQ_1:45;
hence (the Arity of B).((the connectives of B).2) = <*the bool-sort of B*>
by Th21;
thus (the ResultSort of B).((the connectives of B).2) = the bool-sort of B
by FINSEQ_1:45;
(the connectives of B).3 = 2 by FINSEQ_1:45;
hence (the Arity of B).((the connectives of B).3) =
<*the bool-sort of B, the bool-sort of B*> by Th21;
thus (the ResultSort of B).((the connectives of B).3) = the bool-sort of B
by FINSEQ_1:45;
thus the carrier of B is non empty;
thus the carrier' of B is non empty;
thus thesis;
end;
end;
registration
cluster 1-1-connectives non empty non void for ConnectivesSignature;
existence
proof
set S = the 1-1-connectives bool-correct non empty non void
BoolSignature;
take S;
thus thesis;
end;
end;
registration
let S be 1-1-connectives non empty non void ConnectivesSignature;
cluster the connectives of S -> one-to-one;
coherence by ONETOONE;
end;
definition
let S be non empty non void BoolSignature;
let B be MSAlgebra over S;
attr B is bool-correct means: BOOL2:
(DefSorts B).the bool-sort of S = BOOLEAN &
Den(In((the connectives of S).1, the carrier' of S), B).{} = TRUE &
for x,y be boolean set holds
Den(In((the connectives of S).2, the carrier' of S), B).<*x*> = 'not' x &
Den(In((the connectives of S).3, the carrier' of S), B).<*x,y*> = x '&' y;
end;
theorem ThF1:
for A,B being non empty set, n being Nat
for f being Function of n-tuples_on A,B holds
f is homogeneous quasi_total non empty PartFunc of A*,B &
for g being homogeneous Function st f = g holds g is n-ary
proof
let A,B be non empty set;
let n be Nat;
let f be Function of n-tuples_on A,B;
A0: n in NAT by ORDINAL1:def 12; then
n-tuples_on A c= A*
by FINSEQ_2:134; then
reconsider f as PartFunc of A*,B by RELSET_1:7;
A1: dom f = n-tuples_on A by FUNCT_2:def 1; then
reconsider f as homogeneous PartFunc of A*,B by A0,COMPUT_1:16;
set t = the Element of n-tuples_on A;
arity f = len t by A1,MARGREL1:def 25 .= n by A0,FINSEQ_2:133;
hence thesis by A1,COMPUT_1:def 21,COMPUTu1c22;
end;
registration
let A,B be non empty set;
let n be Nat;
cluster n-ary for homogeneous quasi_total non empty PartFunc of A*,B;
existence
proof
set f = the Function of n-tuples_on A,B;
A0: n in NAT by ORDINAL1:def 12; then
n-tuples_on A c= A*
by FINSEQ_2:134; then
reconsider f as PartFunc of A*,B by RELSET_1:7;
A1: dom f = n-tuples_on A by FUNCT_2:def 1; then
reconsider f as homogeneous PartFunc of A*,B by A0,COMPUT_1:16;
set t = the Element of n-tuples_on A;
A2: arity f = len t by A1,MARGREL1:def 25 .= n by A0,FINSEQ_2:133; then
reconsider f as homogeneous quasi_total non empty PartFunc of A*,B
by A1,COMPUTu1c22;
take f;
thus thesis by A2,COMPUT_1:def 21;
end;
end;
scheme Sch1 {A,B() -> non empty set, F(element) -> Element of B()}:
ex f being 1-ary homogeneous quasi_total non empty PartFunc of A()*,B() st
for a being Element of A() holds f.<*a*> = F(a)
proof
deffunc G(Element of 1-tuples_on A()) = F($1.1);
consider f being Function of 1-tuples_on A(), B() such that
A1: for a being Element of 1-tuples_on A() holds f.a = G(a) from FUNCT_2:sch 4;
reconsider f as 1-ary homogeneous quasi_total non empty PartFunc of
A()*,B() by ThF1;
take f;
let a be Element of A();
reconsider p = <*a*> as Element of 1-tuples_on A() by FINSEQ_2:98;
thus f.<*a*> = G(p) by A1 .= F(a) by FINSEQ_1:40;
end;
scheme Sch2 {A,B() -> non empty set,
F(element,element) -> Element of B()}:
ex f being 2-ary homogeneous quasi_total non empty PartFunc of A()*,B() st
for a,b being Element of A() holds f.<*a,b*> = F(a,b)
proof
deffunc G(Element of 2-tuples_on A()) = F($1.1,$1.2);
consider f being Function of 2-tuples_on A(), B() such that
A1: for a being Element of 2-tuples_on A() holds f.a = G(a) from FUNCT_2:sch 4;
reconsider f as 2-ary homogeneous quasi_total non empty PartFunc of
A()*,B() by ThF1;
take f;
let a,b be Element of A();
reconsider p = <*a,b*> as Element of 2-tuples_on A() by FINSEQ_2:101;
thus f.<*a,b*> = G(p) by A1 .= F(a,p.2) by FINSEQ_1:44
.= F(a,b) by FINSEQ_1:44;
end;
theorem ThF2:
for S being non empty non void ManySortedSign
for A being non-empty ManySortedSet of the carrier of S
for f being ManySortedFunction of A#*the Arity of S, A*the ResultSort of S
for o being OperSymbol of S
for d being Function of (A#*the Arity of S).o, (A*the ResultSort of S).o
holds
f+*(o,d) is ManySortedFunction of A#*the Arity of S, A*the ResultSort of S
proof
let S be non empty non void ManySortedSign;
let A be non-empty ManySortedSet of the carrier of S;
let f be ManySortedFunction of A#*the Arity of S, A*the ResultSort of S;
let o be OperSymbol of S;
let d be Function of (A#*the Arity of S).o, (A*the ResultSort of S).o;
let x be set; assume x in the carrier' of S; then
reconsider x as OperSymbol of S;
dom f = the carrier' of S by PARTFUN1:def 2; then
(x = o implies f+*(o,d).x = d) & (x <> o implies f+*(o,d).x = f.x)
by FUNCT_7:31,32;
hence thesis;
end;
definition
let S be non empty non void ManySortedSign;
let A be UndefMSAlgebra over S;
attr A is limited-by-undefined means: LBU:
DefSorts A c= the undefined-map of A;
end;
theorem Th58a:
for S being non empty non void ManySortedSign
for A being non-empty UndefMSAlgebra over S
:: st A is limited-by-undefined
for s being SortSymbol of S
holds (the Sorts of A).s = (DefSorts A).s \/ {(the undefined-map of A).s}
proof
let S be non empty non void ManySortedSign;
let A be non-empty UndefMSAlgebra over S;
:: assume
:: DefSorts A c= the undefined-map of A;
deffunc U(element) = {(the undefined-map of A).$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
let x be SortSymbol of S;
set u = the undefined-map of A;
DefSorts A = (the Sorts of A)(\)U by BZ,DEFS;
then
A1: (DefSorts A).x = (the Sorts of A).x\U.x & U.x = U(x) by BZ,PBOOLE:def 6;
u.x is Element of (the Sorts of A).x by PBOOLE:def 14;
then {u.x} c= (the Sorts of A).x by ZFMISC_1:31;
hence (the Sorts of A).x = (DefSorts A).x\/{u.x} by A1,XBOOLE_1:45;
end;
theorem Th58:
for S being non empty non void ManySortedSign
for A being non-empty UndefMSAlgebra over S
st the undefined-map of A = DefSorts A
holds the Sorts of A = succ DefSorts A
proof
let S be non empty non void ManySortedSign;
let A be non-empty UndefMSAlgebra over S;
assume
Z0: the undefined-map of A = DefSorts A;
deffunc U(element) = {(the undefined-map of A).$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
let x be SortSymbol of S;
set u = the undefined-map of A;
DefSorts A = (the Sorts of A)(\)U by BZ,DEFS;
then
A1: (DefSorts A).x = (the Sorts of A).x\U.x & U.x = U(x) by BZ,PBOOLE:def 6;
u.x is Element of (the Sorts of A).x by PBOOLE:def 14;
then {u.x} c= (the Sorts of A).x by ZFMISC_1:31;
then (the Sorts of A).x = (DefSorts A).x\/{u.x} by A1,XBOOLE_1:45;
hence (the Sorts of A).x = (DefSorts A).x\/{(DefSorts A).x} by Z0
.= succ ((DefSorts A).x) by ORDINAL1:def 1
.= (succ DefSorts A).x by SUCC;
end;
registration
let S be non empty non void ManySortedSign;
cluster limited-by-undefined with_defined_elements
for UndefMSAlgebra over S;
existence
proof
set X = the non-empty ManySortedSet of the carrier of S;
set Ch = the ManySortedFunction of (succ X)#*the Arity of S,
(succ X)*the ResultSort of S;
X is ManySortedElement of succ X
proof
let x be element; assume x in the carrier of S;
then X.x in succ (X.x) = (succ X).x by SUCC,ORDINAL1:6;
hence X.x is Element of (succ X).x;
end;
then reconsider u = X as ManySortedElement of succ X;
take A = UndefMSAlgebra(#succ X, Ch, u#);
deffunc U(element) = {u.$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
AA: (succ X)(\)U = X
proof
let x be SortSymbol of S;
X.x nin X.x;
then
A2: {X.x} misses X.x by ZFMISC_1:50;
thus ((succ X)(\)U).x = (succ X).x\U.x by PBOOLE:def 6
.= succ(X.x)\U.x by SUCC
.= succ(X.x)\U(x) by BZ
.= X.x\/{X.x}\{X.x} by ORDINAL1:def 1
.= X.x by A2,XBOOLE_1:88;
end;
then
BB: the undefined-map of A = DefSorts A by BZ,DEFS;
hence DefSorts A c= the undefined-map of A;
:: thus the undefined-map of A = DefSorts A by BB;
thus DefSorts A is non-empty by AA,BZ,DEFS;
end;
end;
theorem ThB0:
for S being bool-correct non empty non void BoolSignature
for A being non-empty ManySortedSet of the carrier of S
ex B being with_defined_elements strict UndefMSAlgebra over S st
DefSorts B = A+*(the bool-sort of S, BOOLEAN) &
B is limited-by-undefined & the undefined-map of B = DefSorts B &
B is bool-correct undef-consequent
proof
let S be bool-correct non empty non void BoolSignature;
let A be non-empty ManySortedSet of the carrier of S;
set A1 = A+*(the bool-sort of S, BOOLEAN);
set Ch = the ManySortedFunction of A1#*the Arity of S,
A1*the ResultSort of S;
deffunc F((Element of BOOLEAN),Element of BOOLEAN)
= $1 '&' $2 qua Element of BOOLEAN;
consider f being 2-ary homogeneous quasi_total non empty PartFunc of
BOOLEAN*, BOOLEAN such that
A1: for a,b being Element of BOOLEAN holds f.<*a,b*> = F(a,b) from Sch2;
deffunc F(Element of BOOLEAN) = 'not' $1;
consider f1 being 1-ary homogeneous quasi_total non empty PartFunc of
BOOLEAN*, BOOLEAN such that
A2: for a being Element of BOOLEAN holds f1.<*a*> = F(a) from Sch1;
B1: dom f1 = (arity f1)-tuples_on BOOLEAN by COMPUT_1:22
.= 1-tuples_on BOOLEAN by COMPUT_1:def 21;
B2: rng f1 c= BOOLEAN by RELAT_1:def 19;
B3: dom f = (arity f)-tuples_on BOOLEAN by COMPUT_1:22
.= 2-tuples_on BOOLEAN by COMPUT_1:def 21;
B4: rng f c= BOOLEAN by RELAT_1:def 19;
A3: 3 <= len the connectives of S by CORRECT; then
1 <= len the connectives of S & 2 <= len the connectives of S
by XXREAL_0:2; then
B5: 1 in dom the connectives of S & 2 in dom the connectives of S &
3 in dom the connectives of S by A3,FINSEQ_3:25; then
reconsider o1 = (the connectives of S).2, o2 = (the connectives of S).3,
o0 = (the connectives of S).1 as OperSymbol of S by B5,DTCONSTR:2;
set Ch1 = Ch+*(o1, f1)+*(o2,f);
set bs = the bool-sort of S;
A4: <*bs*> in (the carrier of S)* by FINSEQ_1:def 11;
A6: dom A = the carrier of S & dom A1 = the carrier of S
by PARTFUN1:def 2; then
A5: A1.bs = BOOLEAN by FUNCT_7:31;
o1 is_of_type <*bs*>,bs by CORRECT; then
A8: the_arity_of o1 = <*bs*> & the_result_sort_of o1 = bs by TYPEOF; then
A71:(A1#*the Arity of S).o1 = A1#.<*bs*> by FUNCT_2:15
.= product (A1*<*bs*>) by A4,FINSEQ_2:def 5
.= product <*A1.bs*> by A6,FINSEQ_2:34
.= 1-tuples_on BOOLEAN by A5,FINSEQ_3:126;
(A1*the ResultSort of S).o1 = A1.bs by A8,FUNCT_2:15; then
f1 is Function of (A1#*the Arity of S).o1, (A1*the ResultSort of S).o1
by A71,A5,B1,B2,FUNCT_2:2; then
reconsider Ch2 = Ch+*(o1,f1) as ManySortedFunction of A1#*the Arity of S,
A1*the ResultSort of S by ThF2;
A4: <*bs,bs*> in (the carrier of S)* by FINSEQ_1:def 11;
o2 is_of_type <*bs,bs*>,bs by CORRECT; then
A9: the_arity_of o2 = <*bs,bs*> & the_result_sort_of o2 = bs by TYPEOF; then
A72:(A1#*the Arity of S).o2 = A1#.<*bs,bs*> by FUNCT_2:15
.= product (A1*<*bs,bs*>) by A4,FINSEQ_2:def 5
.= product <*A1.bs,A1.bs*> by A6,FINSEQ_2:125
.= 2-tuples_on BOOLEAN by A5,FINSEQ_3:128;
(A1*the ResultSort of S).o2 = A1.bs by A9,FUNCT_2:15; then
f is Function of (A1#*the Arity of S).o2, (A1*the ResultSort of S).o2
by A72,A5,B3,B4,FUNCT_2:2; then
reconsider Ch1 = Ch2+*(o2,f) as ManySortedFunction of A1#*the Arity of S,
A1*the ResultSort of S by ThF2;
reconsider t = TRUE as Element of BOOLEAN;
set f0 = (0-tuples_on BOOLEAN)-->t;
dom f0 = 0-tuples_on BOOLEAN & rng f0 c= {t} & {t} c= BOOLEAN
by ZFMISC_1:31,FUNCOP_1:13; then
reconsider f0 as Function of 0-tuples_on BOOLEAN, BOOLEAN
by FUNCT_2:2,XBOOLE_1:1;
A4: <*>the carrier of S in (the carrier of S)* by FINSEQ_1:def 11;
o0 is_of_type {},bs by CORRECT; then
aA9: the_arity_of o0 = {} & the_result_sort_of o0 = bs by TYPEOF; then
A7: (A1#*the Arity of S).o0 = A1#.{} by FUNCT_2:15
.= product (A1*{}) by A4,FINSEQ_2:def 5
.= product (<*>BOOLEAN)
.= 0-tuples_on BOOLEAN by FINSEQ_2:94,CARD_3:10;
(A1*the ResultSort of S).o0 = A1.bs by aA9,FUNCT_2:15; then
reconsider Ch3 = Ch1+*(o0,f0) as ManySortedFunction of A1#*the Arity of S,
A1*the ResultSort of S by A7,A5,ThF2;
set B = MSAlgebra(#A1,Ch3#);
B is non-empty
proof
thus the Sorts of B is non-empty;
end; then
reconsider B as non-empty strict MSAlgebra over S;
consider B1 being strict UndefMSAlgebra over S such that
AA: B1 is B-undef with_defined_elements &
the undefined-map of B1 = the Sorts of B &
the Sorts of B1 = succ the Sorts of B &
for o being OperSymbol of S for a being Element of Args(o,B) holds
Den(o,B1).a = Den(o,B).a by Th100;
reconsider B1 as with_defined_elements strict B-undef UndefMSAlgebra over S
by AA;
take B1;
thus DefSorts B1 = A+*(the bool-sort of S, BOOLEAN) by Lem7;
hence DefSorts B1 c= the undefined-map of B1 &
the undefined-map of B1 = DefSorts B1 &
:: the Sorts of B1 = succ DefSorts B1 &
(DefSorts B1).the bool-sort of S = BOOLEAN by AA,A6,FUNCT_7:31;
C0: len the_arity_of o0 = 0 & len the_arity_of o1 = 1 & len the_arity_of o2 = 2
by A8,A9,aA9,FINSEQ_1:40,44;
C2: dom Ch2 = the carrier' of S & dom Ch = the carrier' of S &
dom Ch1 = the carrier' of S by PARTFUN1:def 2;
C3: Ch3.o1 = Ch1.o1 by A8,aA9,FUNCT_7:32 .= Ch2.o1 by C0,FUNCT_7:32
.= f1 by C2,FUNCT_7:31;
C4: Ch3.o0 = f0 by C2,FUNCT_7:31;
C5: Args(o0,B) = 0-tuples_on BOOLEAN by A7;
C6: In((the connectives of S).1, the carrier' of S) = o0 & {} in {{}} &
0-tuples_on BOOLEAN = {<*>BOOLEAN}
by SUBSET_1:def 8,TARSKI:def 1,FINSEQ_2:94;
then Den(In((the connectives of S).1, the carrier' of S), B).{} =
TRUE & {} in Args(o0,B) by C4,C5,FUNCOP_1:7;
hence Den(In((the connectives of S).1, the carrier' of S), B1).{} =
TRUE by C4,C6,AA;
hereby let x,y be boolean set;
C5: Args(o1,B) = 1-tuples_on BOOLEAN by A71;
C4: x in BOOLEAN & y in BOOLEAN by MARGREL1:def 12;
C7: In((the connectives of S).2, the carrier' of S) = o1
by SUBSET_1:def 8;
then Den(In((the connectives of S).2, the carrier' of S), B).<*x*>
= 'not' x & <*x*> in Args(o1,B) by A2,C3,C4,C5,FINSEQ_2:98;
hence Den(In((the connectives of S).2, the carrier' of S), B1).<*x*>
= 'not' x by A2,C3,C4,C5,C7,AA;
C6: Args(o2,B) = 2-tuples_on BOOLEAN by A72;
C3: Ch3.o2 = Ch1.o2 by A9,aA9,FUNCT_7:32 .= f by C2,FUNCT_7:31;
C9: In((the connectives of S).3, the carrier' of S) = o2 by SUBSET_1:def 8;
then Den(In((the connectives of S).3, the carrier' of S), B).<*x,y*>
= x '&' y & <*x,y*> in Args(o2,B) by A1,C3,C4,C6,FINSEQ_2:101;
hence Den(In((the connectives of S).3, the carrier' of S), B1).<*x,y*>
= x '&' y by A1,C3,C4,C6,C9,AA;
end;
thus thesis by AA;
end;
registration
let S be bool-correct non empty non void BoolSignature;
cluster limited-by-undefined bool-correct with_defined_elements
undef-consequent for strict UndefMSAlgebra over S;
existence
proof
set A = the non-empty ManySortedSet of the carrier of S;
ex B being with_defined_elements strict UndefMSAlgebra over S st
DefSorts B = A+*(the bool-sort of S, BOOLEAN) &
:: the undefined-map of B = DefSorts B &
:: the Sorts of B = succ DefSorts B &
B is limited-by-undefined & the undefined-map of B = DefSorts B &
B is bool-correct undef-consequent by ThB0;
hence thesis;
end;
cluster bool-correct with_defined_elements for MSAlgebra over S;
existence
proof
set A = the non-empty ManySortedSet of the carrier of S;
ex B being with_defined_elements strict UndefMSAlgebra over S st
DefSorts B = A+*(the bool-sort of S, BOOLEAN) &
:: the undefined-map of B = DefSorts B &
:: the Sorts of B = succ DefSorts B &
B is limited-by-undefined & the undefined-map of B = DefSorts B &
B is bool-correct undef-consequent by ThB0;
hence thesis;
end;
end;
definition
let S be bool-correct non empty non void BoolSignature;
let B be non-empty MSAlgebra over S;
set f = the bool-sort of S, L = B;
A: (the connectives of S).1 is_of_type {}, f by CORRECT;
B: (the connectives of S).2 is_of_type <*f*>, f by CORRECT;
E: (the connectives of S).3 is_of_type <*f,f*>, f by CORRECT;
D:len the connectives of S >= 3 by CORRECT; then
1 <= len the connectives of S & 2 <= len the connectives of S
by XXREAL_0:2; then
F:2 in dom the connectives of S & 1 in dom the connectives of S &
3 in dom the connectives of S by D,FINSEQ_3:25;
G: (the connectives of S).1 in rng the connectives of S &
rng the connectives of S c= the carrier' of S
by F,RELAT_1:def 19,FUNCT_1:def 3;
func \trueB -> Element of B, the bool-sort of S equals
Den(In((the connectives of S).1, the carrier' of S), B).{};
coherence by A,Th0,G;
let p be Element of B, the bool-sort of S;
func \notp -> Element of B, the bool-sort of S equals
Den(In((the connectives of S).2, the carrier' of S), B).<*p*>;
coherence by B,Th1;
let q be Element of B, the bool-sort of S;
func p\andq -> Element of B, the bool-sort of S equals
Den(In((the connectives of S).3, the carrier' of S), B).<*p,q*>;
coherence by E,Th2;
end;
definition
let S be bool-correct non empty non void BoolSignature;
let B be non-empty MSAlgebra over S;
func \falseB -> Element of B, the bool-sort of S equals \not\trueB;
coherence;
let p be Element of B, the bool-sort of S;
let q be Element of B, the bool-sort of S;
func p\orq -> Element of B, the bool-sort of S equals \not(\notp\and\notq);
coherence;
func p\impq -> Element of B, the bool-sort of S equals \not(p\and\notq);
coherence;
end;
definition
let S be bool-correct non empty non void BoolSignature;
let B be non-empty MSAlgebra over S;
let p be Element of B, the bool-sort of S;
let q be Element of B, the bool-sort of S;
func p\iffq -> Element of B, the bool-sort of S equals
p\andq\or(\notp\and\notq);
coherence;
end;
theorem Th17:
for S being bool-correct non empty non void BoolSignature
for B being bool-correct with_defined_elements UndefMSAlgebra over S
holds \trueB = TRUE & \falseB = FALSE &
for x,y being defined Element of B, the bool-sort of S
for a,b being boolean number st a = x & b = y holds
\notx = 'not' a & x\andy = a '&' b & x\ory = a 'or' b &
x\impy = a => b & x\iffy = a <=> b
proof
let S be bool-correct non empty non void BoolSignature;
let B be bool-correct with_defined_elements UndefMSAlgebra over S;
A0: (DefSorts B).the bool-sort of S = BOOLEAN &
Den(In((the connectives of S).1, the carrier' of S), B).{} = TRUE &
for x,y be boolean set holds
Den(In((the connectives of S).2, the carrier' of S), B).<*x*> = 'not' x &
Den(In((the connectives of S).3, the carrier' of S), B).<*x,y*> = x '&' y
by BOOL2;
thus \trueB = TRUE by A0;
hence \falseB
= Den(In((the connectives of S).2, the carrier' of S), B).<*TRUE*>
.= 'not' TRUE by A0 .= FALSE by MARGREL1:11;
let x,y be defined Element of B, the bool-sort of S;
let a,b be boolean number;
assume Z0: a = x;
assume Z1: b = y;
thus \notx = 'not' a by A0,Z0;
thus x\andy = a '&' b by A0,Z0,Z1;
thus x\ory = \not(\notx\and\noty)
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).<*a*>,
Den(In((the connectives of S).2, the carrier' of S), B).<*b*>*>*> by Z0,Z1
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).<*a*>,
'not' b*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*'not' a, 'not' b*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*'not' a '&' 'not' b*> by A0
.= 'not' ('not' a '&' 'not' b) by A0
.= a 'or' b;
thus x\impy = \not(x\and\noty)
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*a,Den(In((the connectives of S).2, the carrier' of S), B).<*b*>*>*>
by Z0,Z1
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*a, 'not' b*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*a '&' 'not' b*> by A0
.= 'not' (a '&' 'not' b) by A0
.= 'not' a 'or' 'not' 'not' b by BINARITH:4
.= a => b;
thus x\iffy = x\andy\or\notx\and\noty
.= \not(\not(x\andy)\and\not(\notx\and\noty))
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*a,b*>*>,
Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).<*a*>,
Den(In((the connectives of S).2, the carrier' of S), B).<*b*>*>*>*>*>
by Z0,Z1
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*a,b*>*>,
Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).<*a*>,
'not' b*>*>*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*a,b*>*>,
Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*'not' a, 'not' b*>*>*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*a,b*>*>,
Den(In((the connectives of S).2, the carrier' of S), B).
<*'not' a '&' 'not' b*>*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*Den(In((the connectives of S).2, the carrier' of S), B).
<*a '&' b*>,
Den(In((the connectives of S).2, the carrier' of S), B).
<*'not' a '&' 'not' b*>*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*'not' (a '&' b),
Den(In((the connectives of S).2, the carrier' of S), B).
<*'not' a '&' 'not' b*>*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*Den(In((the connectives of S).3, the carrier' of S), B).
<*'not'(a '&' b), 'not'('not' a '&' 'not' b)*>*> by A0
.= Den(In((the connectives of S).2, the carrier' of S), B).
<*'not'(a '&' b) '&' 'not'('not' a '&' 'not' b)*> by A0
.= 'not' ('not'(a '&' b) '&' 'not'('not' a '&' 'not' b)) by A0
.= (a '&' b) 'or' ('not' a '&' 'not' b)
.= (a 'or' ('not' a '&' 'not' b)) '&' (b 'or' ('not' a '&' 'not' b))
by XBOOLEAN:9
.= (a 'or' 'not' b) '&' (b 'or' ('not' a '&' 'not' b)) by XBOOLEAN:12
.= (a 'or' 'not' b) '&' (b 'or' 'not' a) by XBOOLEAN:12
.= a <=> b;
end;
begin :: Algebra with integers
definition
let i be Nat;
let s be element;
let S be BoolSignature;
attr S is (i,s) integer means: INT1:
len the connectives of S >= i+6 &
ex I being Element of S st I = s &
I <> the bool-sort of S &
(the connectives of S).i is_of_type {},I & :: 0
(the connectives of S).(i+1) is_of_type {},I & :: 1
(the connectives of S).i <> (the connectives of S).(i+1) &
(the connectives of S).(i+2) is_of_type <*I*>,I & :: -
(the connectives of S).(i+3) is_of_type <*I,I*>,I & :: +
(the connectives of S).(i+4) is_of_type <*I,I*>,I & :: *
(the connectives of S).(i+5) is_of_type <*I,I*>,I & :: div
(the connectives of S).(i+3) <> (the connectives of S).(i+4) &
(the connectives of S).(i+3) <> (the connectives of S).(i+5) &
(the connectives of S).(i+4) <> (the connectives of S).(i+5) &
(the connectives of S).(i+6) is_of_type <*I,I*>,the bool-sort of S; :: <=
end;
theorem Th200:
ex S being 10-connectives non empty non void strict BoolSignature st
S is 1-1-connectives (4,1) integer bool-correct & the carrier of S = {0,1} &
ex I being SortSymbol of S st I = 1 &
(the connectives of S).4 is_of_type {},I
proof
set X = {0,1}, Y = {0,1,2,3,4,5,6,7,8,9};
reconsider 00 = 0, x1 = 1 as Element of X by TARSKI:def 2;
reconsider y0 = 0, 01 = 1, 02 = 2, 03 = 3, 04 = 4, 05 = 5, 06 = 6,
07 = 7, 08 = 8, 09 = 9 as Element of Y by ENUMSET1:def 8;
set aa = <*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>;
set a = aa+*({0}-->{});
set r = ({0,1,2,9}-->00)\/({3,4,5,6,7,8}-->x1);
<*00*> in X* & <*00,00*> in X* & <*x1*> in X* & <*x1,x1*> in X* &
<*>X in X* by FINSEQ_1:def 11; then
A0: {{},<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>}
c= X* &
rng a c= rng aa \/ rng ({0}-->{}) & dom a = dom aa \/ dom({0}-->{}) &
dom ({0}-->{}) = {0} & rng ({0}-->{}) = {{}}
by Th49a,FUNCT_4:17,def 1,FUNCOP_1:8,13; then
rng a c= {<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>,
<*x1,x1*>}\/{{}} by Th5c; then
rng a c= {{},<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>,
<*x1,x1*>} & dom aa = Seg 9 by Th50a,FINSEQ_1:89; then
rng a c= X* & dom a = Y by A0,Th50a,Th60a,XBOOLE_1:1; then
reconsider a as Function of Y,X* by FUNCT_2:2;
A1: dom({0,1,2,9}-->00) = {0,1,2,9} & dom({3,4,5,6,7,8}-->x1) = {3,4,5,6,7,8}
by FUNCOP_1:13;
{0,1,2,9} misses {3,4,5,6,7,8}
proof
assume {0,1,2,9} meets {3,4,5,6,7,8}; then
consider x such that
A2: x in {0,1,2,9} & x in {3,4,5,6,7,8} by XBOOLE_0:3;
(x = 0 or x = 1 or x = 2 or x = 9) & (x = 3 or x = 4 or x = 5 or x = 6 or
x = 7 or x = 8) by A2,ENUMSET1:def 2,def 4;
hence thesis;
end; then
reconsider r as Function by A1,GRFUNC_1:13;
A3: dom r = {0,1,2,9}\/{3,4,5,6,7,8} by A1,XTUPLE_0:23
.= {0,1,2}\/{9}\/{3,4,5,6,7,8} by ENUMSET1:6
.= {0,1,2}\/{3,4,5,6,7,8}\/{9} by XBOOLE_1:4
.= {0,1,2,3,4,5,6,7,8}\/{9} by Th52
.= Y by Th51a;
rng r = rng({0,1,2,9}-->00)\/rng({3,4,5,6,7,8}-->x1) by RELAT_1:12
.={00}\/rng({3,4,5,6,7,8}-->x1) by FUNCOP_1:8 .= {00}\/{x1} by FUNCOP_1:8
.= X by ENUMSET1:1; then
reconsider r as Function of Y,X by A3,FUNCT_2:2;
set B = BoolSignature(#X,Y,a,r,00,<*y0,01,02,03,04,05,06,07*>^<*08,09*>#);
AA: len the connectives of B = len <*y0,01,02,03,04,05,06,07*>+len<*08,09*>
by FINSEQ_1:22 .= 8+len <*08,09*> by Th6b .= 8+2 by FINSEQ_1:44 .= 10;
B is 10-connectives non empty non void
proof
thus len the connectives of B = 10 by AA;
thus the carrier of B is non empty;
thus the carrier' of B is non empty;
end; then
reconsider B as 10-connectives non empty non void strict BoolSignature;
take B;
thus the connectives of B is one-to-one
proof
let x,y; assume
F1: x in dom the connectives of B & y in dom the connectives of B;
set c = the connectives of B;
F2: dom c = Seg 10 by Th61;
F4: y=1 or y=2 or y=3 or y=4 or y=5 or y=6 or y=7 or y=8 or y=9 or y=10
by F1,F2,Th60b,ENUMSET1:def 8;
c.1 = y0 & c.2 = 01 & c.3 = 02 & c.4 = 03 & c.5 = 04 & c.6 = 05 &
c.7 = 06 & c.8 = 07 & c.9 = 08 & c.10 = 09 by Th61;
hence thesis by F2,F4,F1,Th60b,ENUMSET1:def 8;
end;
thus B is (4,1) integer
proof
thus len the connectives of B >= 4+6 by AA;
reconsider I = x1 as Element of B;
take I; thus I = 1;
thus I <> the bool-sort of B;
A4: (the connectives of B).4 = 3 & 3 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).4)
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).3 by FUNCT_4:11 .= {} by Th60;
3 in {3,4,5,6,7,8} & I in {I} by TARSKI:def 1,ENUMSET1:def 4; then
[3,I] in {3,4,5,6,7,8}-->x1 by ZFMISC_1:87; then
[3,I] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).4) = I
by A4,FUNCT_1:1;
A5: (the connectives of B).5 = 4 & 4 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).(4+1))
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).4 by FUNCT_4:11 .= {} by Th60;
4 in {3,4,5,6,7,8} & I in {I} by TARSKI:def 1,ENUMSET1:def 4; then
[4,I] in {3,4,5,6,7,8}-->x1 by ZFMISC_1:87; then
[4,I] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).(4+1)) = I
by A5,FUNCT_1:1;
thus (the connectives of B).4 <> (the connectives of B).(4+1)
by A4,Th61;
A6: (the connectives of B).6 = 5 & 5 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).(4+2))
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).5 by FUNCT_4:11 .= <*I*> by Th60;
5 in {3,4,5,6,7,8} & I in {I} by TARSKI:def 1,ENUMSET1:def 4; then
[5,I] in {3,4,5,6,7,8}-->x1 by ZFMISC_1:87; then
[5,I] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).(4+2)) = I
by A6,FUNCT_1:1;
A5: (the connectives of B).7 = 6 & 6 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).(4+3))
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).6 by FUNCT_4:11 .= <*I,I*> by Th60;
6 in {3,4,5,6,7,8} & I in {I} by TARSKI:def 1,ENUMSET1:def 4; then
[6,I] in {3,4,5,6,7,8}-->x1 by ZFMISC_1:87; then
[6,I] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).(4+3)) = I
by A5,FUNCT_1:1;
aA5: (the connectives of B).8 = 7 & 7 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).(4+4))
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).7 by FUNCT_4:11 .= <*I,I*> by Th60;
7 in {3,4,5,6,7,8} & I in {I} by TARSKI:def 1,ENUMSET1:def 4; then
[7,I] in {3,4,5,6,7,8}-->x1 by ZFMISC_1:87; then
[7,I] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).(4+4)) = I
by aA5,FUNCT_1:1;
A5: (the connectives of B).9 = 8 & 8 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).(4+5))
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).8 by FUNCT_4:11 .= <*I,I*> by Th60;
8 in {3,4,5,6,7,8} & I in {I} by TARSKI:def 1,ENUMSET1:def 4; then
[8,I] in {3,4,5,6,7,8}-->x1 by ZFMISC_1:87; then
[8,I] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).(4+5)) = I
by A5,FUNCT_1:1;
thus (the connectives of B).(4+3) <> (the connectives of B).(4+4)
by aA5,Th61;
thus (the connectives of B).(4+3) <> (the connectives of B).(4+5)
by A5,Th61;
thus (the connectives of B).(4+4) <> (the connectives of B).(4+5)
by A5,Th61;
A5: (the connectives of B).10 = 9 & 9 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).(4+6))
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).9 by FUNCT_4:11 .= <*I,I*> by Th60;
9 in {0,1,2,9} & the bool-sort of B in {the bool-sort of B}
by TARSKI:def 1,ENUMSET1:def 2; then
[9,00] in {0,1,2,9}-->00 by ZFMISC_1:87; then
[9,00] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).(4+6)) =
the bool-sort of B by A5,FUNCT_1:1;
end;
thus len the connectives of B >= 3 by AA;
A4: (the connectives of B).1 = 0 & 0 in {0} by Th61,TARSKI:def 1;
hence (the Arity of B).((the connectives of B).1)
= ({0}-->{}).0 by A0,FUNCT_4:13
.= {};
0 in {0,1,2,9} & 00 in {00} by TARSKI:def 1,ENUMSET1:def 2; then
[0,the bool-sort of B] in {0,1,2,9}-->00 by ZFMISC_1:87; then
[0,the bool-sort of B] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).1) = the bool-sort of B
by A4,FUNCT_1:1;
A5: (the connectives of B).2 = 1 & 1 nin {0} by Th61,TARSKI:def 1;
hence (the Arity of B).((the connectives of B).2)
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).1 by A0,FUNCT_4:11 .= <*the bool-sort of B*> by Th60;
1 in {0,1,2,9} & 00 in {00} by TARSKI:def 1,ENUMSET1:def 2; then
[1,the bool-sort of B] in {0,1,2,9}-->00 by ZFMISC_1:87; then
[1,the bool-sort of B] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).2) = the bool-sort of B
by A5,FUNCT_1:1;
A5: (the connectives of B).3 = 2 & 2 nin {0} by Th61,TARSKI:def 1;
hence (the Arity of B).((the connectives of B).3)
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).2 by A0,FUNCT_4:11
.= <*the bool-sort of B,the bool-sort of B*> by Th60;
2 in {0,1,2,9} & 00 in {00} by TARSKI:def 1,ENUMSET1:def 2; then
[2,the bool-sort of B] in {0,1,2,9}-->00 by ZFMISC_1:87; then
[2,the bool-sort of B] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).3) = the bool-sort of B
by A5,FUNCT_1:1;
thus the carrier of B = {0,1};
reconsider I = 1 as SortSymbol of B;
take I; thus I = 1;
A4: (the connectives of B).4 = 3 & 3 nin dom ({0}-->{})
by A0,Th61;
hence (the Arity of B).((the connectives of B).4)
= (<*<*00*>,<*00,00*>,{},{},<*x1*>,<*x1,x1*>,<*x1,x1*>,<*x1,x1*>*>^
<*<*x1,x1*>*>).3 by FUNCT_4:11 .= {} by Th60;
3 in {3,4,5,6,7,8} & I in {I} by TARSKI:def 1,ENUMSET1:def 4; then
[3,I] in {3,4,5,6,7,8}-->x1 by ZFMISC_1:87; then
[3,I] in r by XBOOLE_0:def 3;
hence (the ResultSort of B).((the connectives of B).4) = I
by A4,FUNCT_1:1;
end;
registration
cluster 10-connectives 1-1-connectives (4,1) integer
bool-correct non empty non void for strict BoolSignature;
existence
proof
consider S being 10-connectives non empty non void strict BoolSignature
such that
A1: S is 1-1-connectives (4,1) integer bool-correct &
the carrier of S = {0,1} &
ex I being SortSymbol of S st I = 1 &
(the connectives of S).4 is_of_type {},I by Th200;
take S; thus thesis by A1;
end;
end;
definition
let S be non empty non void BoolSignature;
let N be element;
let I be SortSymbol of S;
attr I is N integer means: INT3: I = N;
end;
definition
let S be non empty non void BoolSignature;
let I be SortSymbol of S;
attr I is integer means: INT4: I is 1 integer;
end;
registration
let S be non empty non void BoolSignature;
cluster integer -> 1 integer for SortSymbol of S;
coherence by INT4;
cluster 1 integer -> integer for SortSymbol of S;
coherence by INT4;
end;
registration
let S be (4,1) integer non empty non void BoolSignature;
cluster integer for SortSymbol of S;
existence
proof
consider I being SortSymbol of S such that
A: I = 1 and I <> the bool-sort of S &
(the connectives of S).4 is_of_type {},I &
(the connectives of S).(4+1) is_of_type {},I &
(the connectives of S).4 <> (the connectives of S).(4+1) &
(the connectives of S).(4+2) is_of_type <*I*>,I &
(the connectives of S).(4+3) is_of_type <*I,I*>,I &
(the connectives of S).(4+4) is_of_type <*I,I*>,I &
(the connectives of S).(4+5) is_of_type <*I,I*>,I &
(the connectives of S).(4+3) <> (the connectives of S).(4+4) &
(the connectives of S).(4+3) <> (the connectives of S).(4+5) &
(the connectives of S).(4+4) <> (the connectives of S).(4+5) &
(the connectives of S).(4+6) is_of_type <*I,I*>,the bool-sort of S by INT1;
take I; thus I = 1 by A;
end;
end;
theorem ThI:
for S being (4,1) integer non empty non void BoolSignature
for I being integer SortSymbol of S holds
I <> the bool-sort of S &
(the connectives of S).4 is_of_type {},I &
(the connectives of S).(4+1) is_of_type {},I &
(the connectives of S).4 <> (the connectives of S).(4+1) &
(the connectives of S).(4+2) is_of_type <*I*>,I &
(the connectives of S).(4+3) is_of_type <*I,I*>,I &
(the connectives of S).(4+4) is_of_type <*I,I*>,I &
(the connectives of S).(4+5) is_of_type <*I,I*>,I &
(the connectives of S).(4+3) <> (the connectives of S).(4+4) &
(the connectives of S).(4+3) <> (the connectives of S).(4+5) &
(the connectives of S).(4+4) <> (the connectives of S).(4+5) &
(the connectives of S).(4+6) is_of_type <*I,I*>,the bool-sort of S
proof
let S be (4,1) integer non empty non void BoolSignature;
let I be integer SortSymbol of S;
A1: I = 1 by INT3;
ex I being SortSymbol of S st I = 1 &
I <> the bool-sort of S &
(the connectives of S).4 is_of_type {},I &
(the connectives of S).(4+1) is_of_type {},I &
(the connectives of S).4 <> (the connectives of S).(4+1) &
(the connectives of S).(4+2) is_of_type <*I*>,I &
(the connectives of S).(4+3) is_of_type <*I,I*>,I &
(the connectives of S).(4+4) is_of_type <*I,I*>,I &
(the connectives of S).(4+5) is_of_type <*I,I*>,I &
(the connectives of S).(4+3) <> (the connectives of S).(4+4) &
(the connectives of S).(4+3) <> (the connectives of S).(4+5) &
(the connectives of S).(4+4) <> (the connectives of S).(4+5) &
(the connectives of S).(4+6) is_of_type <*I,I*>,the bool-sort of S by INT1;
hence thesis by A1;
end;
definition
let S be (4,1) integer non empty non void BoolSignature;
let A be non-empty MSAlgebra over S;
let I be integer SortSymbol of S;
set f = the bool-sort of S, L = A;
A: I = 1 & I <> the bool-sort of S &
(the connectives of S).4 is_of_type {},I &
(the connectives of S).(4+1) is_of_type {},I &
(the connectives of S).4 <> (the connectives of S).(4+1) &
(the connectives of S).(4+2) is_of_type <*I*>,I &
(the connectives of S).(4+3) is_of_type <*I,I*>,I &
(the connectives of S).(4+4) is_of_type <*I,I*>,I &
(the connectives of S).(4+5) is_of_type <*I,I*>,I &
(the connectives of S).(4+3) <> (the connectives of S).(4+4) &
(the connectives of S).(4+3) <> (the connectives of S).(4+5) &
(the connectives of S).(4+4) <> (the connectives of S).(4+5) &
(the connectives of S).(4+6) is_of_type <*I,I*>,the bool-sort of S
by INT3,ThI;
len the connectives of S >= 4+6 by INT1; then
4 <= len the connectives of S & 5 <= len the connectives of S &
6 <= len the connectives of S & 7 <= len the connectives of S &
8 <= len the connectives of S & 9 <= len the connectives of S &
10 <= len the connectives of S
by XXREAL_0:2; then
F:4 in dom the connectives of S & 5 in dom the connectives of S &
6 in dom the connectives of S & 7 in dom the connectives of S &
8 in dom the connectives of S & 9 in dom the connectives of S &
10 in dom the connectives of S by FINSEQ_3:25;
G: (the connectives of S).4 in rng the connectives of S &
rng the connectives of S c= the carrier' of S
by F,RELAT_1:def 19,FUNCT_1:def 3;
func \0(A,I) -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).4, the carrier' of S), A).{};
coherence by ThI,Th0,G;
G: (the connectives of S).5 in rng the connectives of S &
rng the connectives of S c= the carrier' of S
by F,RELAT_1:def 19,FUNCT_1:def 3;
func \1(A,I) -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).5, the carrier' of S), A).{};
coherence by ThI,Th0,G;
let a be Element of (the Sorts of A).I;
func -a -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).6, the carrier' of S), A).<*a*>;
coherence by A,Th1;
let b be Element of (the Sorts of A).I;
func a+b -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).7, the carrier' of S), A).<*a,b*>;
coherence by A,Th2;
func a*b -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).8, the carrier' of S), A).<*a,b*>;
coherence by A,Th2;
func a div b -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).9, the carrier' of S), A).<*a,b*>;
coherence by A,Th2;
func leq(a,b) -> Element of (the Sorts of A).the bool-sort of S equals
Den(In((the connectives of S).10, the carrier' of S), A).<*a,b*>;
coherence by A,Th2;
end;
definition
let S be (4,1) integer non empty non void BoolSignature;
let A be non-empty MSAlgebra over S;
let I be integer SortSymbol of S;
let a,b be Element of A,I;
func a-b -> Element of A,I equals a+-b;
coherence;
func a mod b -> Element of A,I equals a+-(a div b)*b;
coherence;
end;
registration
let S be (4,1) integer non empty non void BoolSignature;
let X be non-empty ManySortedSet of the carrier of S;
cluster X.1 -> non empty;
coherence
proof set i = 4;
consider I being Element of S such that
A1: I = 1 and I <> the bool-sort of S &
(the connectives of S).i is_of_type {},I &
(the connectives of S).(i+1) is_of_type {},I &
(the connectives of S).i <> (the connectives of S).(i+1) &
(the connectives of S).(i+2) is_of_type <*I*>,I &
(the connectives of S).(i+3) is_of_type <*I,I*>,I &
(the connectives of S).(i+4) is_of_type <*I,I*>,I &
(the connectives of S).(4+5) is_of_type <*I,I*>,I &
(the connectives of S).(4+3) <> (the connectives of S).(4+4) &
(the connectives of S).(4+3) <> (the connectives of S).(4+5) &
(the connectives of S).(4+4) <> (the connectives of S).(4+5) &
(the connectives of S).(4+6) is_of_type <*I,I*>,the bool-sort of S
by INT1;
thus thesis by A1;
end;
end;
definition
let n be Nat;
let s be element;
let S be bool-correct non empty non void BoolSignature;
let A be bool-correct MSAlgebra over S;
attr A is (n,s) integer means: INT2:
ex I being SortSymbol of S st I = s &
(the connectives of S).n is_of_type {},I & (DefSorts A).I = INT &
Den(In((the connectives of S).n, the carrier' of S), A).{} = 0 &
Den(In((the connectives of S).(n+1), the carrier' of S), A).{} = 1 &
for i,j being Integer holds
Den(In((the connectives of S).(n+2), the carrier' of S), A).<*i*> = -i &
Den(In((the connectives of S).(n+3), the carrier' of S), A).<*i,j*> = i+j &
Den(In((the connectives of S).(n+4), the carrier' of S), A).<*i,j*> = i*j &
(j <> 0 implies
Den(In((the connectives of S).(n+5), the carrier' of S), A).<*i,j*>
= i div j) &
Den(In((the connectives of S).(n+6), the carrier' of S), A).<*i,j*>
= IFGT(i,j,FALSE,TRUE);
end;
definition
let S be non empty non void BoolSignature;
let I be element;
let n be Nat;
let A be with_defined_elements UndefMSAlgebra over S;
attr A is n,I with_undefined_division_by_0 means: UDD:
for J being SortSymbol of S st I = J
for a being defined Element of (the Sorts of A).J
holds Den(In((the connectives of S).(n+5), the carrier' of S),A).
<*a, Den(In((the connectives of S).n, the carrier' of S),A).{}*> =
(the undefined-map of A).J;
end;
definition
let S be (4,1) integer non empty non void BoolSignature;
let A be with_defined_elements UndefMSAlgebra over S;
attr A is with_undefined_division_by_0 means: WUD:
A is 4,1 with_undefined_division_by_0;
end;
definition
let S be (4,1) integer non empty non void BoolSignature;
let A be with_defined_elements UndefMSAlgebra over S;
redefine attr A is with_undefined_division_by_0 means
for I being integer SortSymbol of S
for a being defined Element of (the Sorts of A).I
holds a div \0(A,I) is undefined;
compatibility
proof
thus A is with_undefined_division_by_0 implies
for I being integer SortSymbol of S
for a being defined Element of (the Sorts of A).I
holds a div \0(A,I) is undefined
proof
assume
A1: for J being SortSymbol of S st 1 = J
for a being defined Element of (the Sorts of A).J
holds Den(In((the connectives of S).(4+5), the carrier' of S),A).
<*a, Den(In((the connectives of S).4, the carrier' of S),A).{}*> =
(the undefined-map of A).J;
let I be integer SortSymbol of S;
let a be defined Element of (the Sorts of A).I;
1 = I by INT3;
hence a div \0(A,I) = (the undefined-map of A).I by A1,INT3;
end;
assume
A2: for I being integer SortSymbol of S
for a being defined Element of (the Sorts of A).I
holds a div \0(A,I) is undefined;
let J being SortSymbol of S; assume 1 = J;
then reconsider I = J as 1 integer SortSymbol of S by INT3;
let a being defined Element of (the Sorts of A).J;
reconsider b = a as defined Element of A,I;
b div \0(A,I) is undefined by A2;
hence Den(In((the connectives of S).(4+5), the carrier' of S),A).
<*a, Den(In((the connectives of S).4, the carrier' of S),A).{}*> =
(the undefined-map of A).J by UNDEF;
end;
end;
Lm3: now
let n be Nat;
let X,Y be set;
let f be Function;
let u be Element of succ Y;
assume dom f = n-tuples_on X & (rng f c= Y or rng f c= succ Y) or
f is Function of n-tuples_on X, Y;
then
A1: dom f c= n-tuples_on X & (rng f c= Y or rng f c= succ Y)
by RELAT_1:def 18,def 19;
A2: Y c= succ Y & X c= succ X by ORDINAL3:1;
then n-tuples_on X c= n-tuples_on succ X by FINSEQ2;
then dom f c= n-tuples_on succ X by A1,XBOOLE_1:1;
then
A3: n-tuples_on succ X = (n-tuples_on succ X) \/ dom f by XBOOLE_1:12;
dom ((n-tuples_on succ X)-->u) = n-tuples_on succ X by FUNCOP_1:13;
then
A4: dom (((n-tuples_on succ X)-->u)+*f) = n-tuples_on succ X
by A3,FUNCT_4:def 1;
rng ((n-tuples_on succ X)-->u) c= {u} c= succ Y
by ZFMISC_1:31,FUNCOP_1:13;
then rng ((n-tuples_on succ X)-->u) c= succ Y & rng f c= succ Y
by A1,A2,XBOOLE_1:1;
then rng (((n-tuples_on succ X)-->u)+*f) c=
rng ((n-tuples_on succ X)-->u) \/ rng f c= (succ Y)\/succ Y
by XBOOLE_1:13,FUNCT_4:17;
then rng (((n-tuples_on succ X)-->u)+*f) c= succ Y by XBOOLE_1:1;
hence ((n-tuples_on succ X)-->u)+*f is
Function of n-tuples_on succ X,succ Y
by A4,FUNCT_2:2;
end;
theorem Th199:
for n being Nat, I being element st n >= 1
for S being bool-correct non empty non void BoolSignature
st S is (n,I) integer
ex A being bool-correct with_defined_elements strict UndefMSAlgebra over S st
A is limited-by-undefined & the undefined-map of A = DefSorts A &
A is (n,I) integer undef-consequent n,I with_undefined_division_by_0
proof
let n be Nat;
let J be element; assume
ZZ: n >= 1;
let S be bool-correct non empty non void BoolSignature;
assume Z0: S is (n,J) integer;
then consider I being Element of S such that
A1: I = J & I <> the bool-sort of S &
(the connectives of S).n is_of_type {},I &
(the connectives of S).(n+1) is_of_type {},I &
(the connectives of S).n <> (the connectives of S).(n+1) &
(the connectives of S).(n+2) is_of_type <*I*>,I &
(the connectives of S).(n+3) is_of_type <*I,I*>,I &
(the connectives of S).(n+4) is_of_type <*I,I*>,I &
(the connectives of S).(n+5) is_of_type <*I,I*>,I &
(the connectives of S).(n+3) <> (the connectives of S).(n+4) &
(the connectives of S).(n+3) <> (the connectives of S).(n+5) &
(the connectives of S).(n+4) <> (the connectives of S).(n+5) &
(the connectives of S).(n+6) is_of_type <*I,I*>,the bool-sort of S by INT1;
set X = the non-empty ManySortedSet of the carrier of S;
set A = X+*(I,INT);
consider B being with_defined_elements strict UndefMSAlgebra over S
such that
B0: DefSorts B = A+*(the bool-sort of S,BOOLEAN) &
:: the undefined-map of B = DefSorts B &
:: the Sorts of B = succ DefSorts B &
B is limited-by-undefined & the undefined-map of B = DefSorts B &
B is bool-correct undef-consequent by ThB0;
set C = the Sorts of B;
set Df = DefSorts B;
set Ch = the Charact of B;
set bs = the bool-sort of S;
set sc = the undefined-map of B;
A2: len the connectives of S >= n+6 by Z0,INT1;
n+4 <= n+4+2 & n+3 <= n+3+3 & n+2 <= n+2+4 & n+1 <= n+1+5 & n <= n+6 &
1 <= 1+(n+5) & 2 <= 2+(n+4) & 3 <= 3+(n+3) & 1 <= 1+(n+3) & 1 <= 1+(n+2) &
n+5 <= n+5+1 & 1 <= 1+(n+1) & 1 <= n+1 by NAT_1:12;
then n+5 <= len the connectives of S & n+4 <= len the connectives of S &
n+3 <= len the connectives of S & n+2 <= len the connectives of S &
n+1 <= len the connectives of S & 3 <= len the connectives of S &
1 <= len the connectives of S & 2 <= len the connectives of S &
n <= len the connectives of S by A2,XXREAL_0:2; then
AA: 1 in dom the connectives of S & 2 in dom the connectives of S &
3 in dom the connectives of S & n in dom the connectives of S &
n+1 in dom the connectives of S & n+2 in dom the connectives of S &
n+3 in dom the connectives of S & n+4 in dom the connectives of S &
n+5 in dom the connectives of S & n+6 in dom the connectives of S
by A2,ZZ,FINSEQ_3:25,NAT_1:12; then
reconsider o01 = (the connectives of S).1, o02 = (the connectives of S).2,
o03 = (the connectives of S).3,
o1 = (the connectives of S).n, o2 = (the connectives of S).(n+1),
o3 = (the connectives of S).(n+2), o4 = (the connectives of S).(n+3),
o5 = (the connectives of S).(n+4), o6 = (the connectives of S).(n+5),
o7 = (the connectives of S).(n+6) as OperSymbol of S by DTCONSTR:2;
set g0 = (0-tuples_on INT)-->0;
set g1 = (0-tuples_on INT)-->1;
BB: dom g0 = 0-tuples_on INT & dom g1 = 0-tuples_on INT by FUNCOP_1:13;
{0} c= INT & {1} c= INT by INT_1:def 2,ZFMISC_1:31; then
rng g0 c= INT & rng g1 c= INT by FUNCOP_1:8; then
reconsider g0,g1 as Function of 0-tuples_on INT, INT by BB,FUNCT_2:2;
deffunc F(Element of INT) = In(-$1,INT) qua Element of INT;
consider f1 being 1-ary homogeneous quasi_total non empty PartFunc of
INT*, INT such that
aA3: for a being Element of INT holds f1.<*a*> = F(a) from Sch1;
B1: dom f1 = (arity f1)-tuples_on INT by COMPUT_1:22
.= 1-tuples_on INT by COMPUT_1:def 21;
B2: rng f1 c= INT by RELAT_1:def 19;
A4: <*I*> in (the carrier of S)* by FINSEQ_1:def 11;
A6: dom A = the carrier of S & dom X = the carrier of S &
dom C = the carrier of S by PARTFUN1:def 2;
A5: (DefSorts B).I = A.I by B0,A1,FUNCT_7:32 .= INT by A6,FUNCT_7:31;
then
A51:C.I = (succ DefSorts B).I = succ INT by B0,Th58,SUCC;
reconsider u = INT as Element of succ INT by ORDINAL1:6;
cA8: the_arity_of o3 = <*I*> & the_result_sort_of o3 = I by A1,TYPEOF; then
A7: (C#*the Arity of S).o3 = C#.<*I*> by FUNCT_2:15
.= product (C*<*I*>) by A4,FINSEQ_2:def 5
.= product <*C.I*> by A6,FINSEQ_2:34
.= 1-tuples_on succ INT by A51,FINSEQ_3:126;
(C*the ResultSort of S).o3 = C.I by cA8,FUNCT_2:15; then
((1-tuples_on succ INT)-->u)+*f1 is
Function of (C#*the Arity of S).o3, (C*the ResultSort of S).o3
by A7,A51,B1,B2,Lm3; then
reconsider Ch1 = (the Charact of B)+*(o3,((1-tuples_on succ INT)-->u)+*f1)
as ManySortedFunction of
C#*the Arity of S, C*the ResultSort of S by ThF2;
deffunc F((Element of INT),Element of INT) = In($1+$2,INT);
consider f2 being 2-ary homogeneous quasi_total non empty PartFunc of
INT*, INT such that
bA3: for a,b being Element of INT holds f2.<*a,b*> = F(a,b) from Sch2;
B12: dom f2 = (arity f2)-tuples_on INT by COMPUT_1:22
.= 2-tuples_on INT by COMPUT_1:def 21;
B2: rng f2 c= INT by RELAT_1:def 19;
A4: <*I,I*> in (the carrier of S)* by FINSEQ_1:def 11;
bA8: the_arity_of o4 = <*I,I*> & the_result_sort_of o4 = I by A1,TYPEOF; then
A7: (C#*the Arity of S).o4 = C#.<*I,I*> by FUNCT_2:15
.= product (C*<*I,I*>) by A4,FINSEQ_2:def 5
.= product <*C.I,C.I*> by A6,FINSEQ_2:125
.= 2-tuples_on succ INT by A51,FINSEQ_3:128;
(C*the ResultSort of S).o4 = C.I by bA8,FUNCT_2:15; then
((2-tuples_on succ INT)-->u)+*f2 is
Function of (C#*the Arity of S).o4, (C*the ResultSort of S).o4
by A7,A51,B12,B2,Lm3; then
reconsider Ch2 = Ch1+*(o4,((2-tuples_on succ INT)-->u)+*f2)
as ManySortedFunction of
C#*the Arity of S, C*the ResultSort of S by ThF2;
deffunc F((Element of INT),Element of INT) = In($1*$2,INT);
consider f3 being 2-ary homogeneous quasi_total non empty PartFunc of
INT*, INT such that
cA3: for a,b being Element of INT holds f3.<*a,b*> = F(a,b) from Sch2;
B13: dom f3 = (arity f3)-tuples_on INT by COMPUT_1:22
.= 2-tuples_on INT by COMPUT_1:def 21;
B2: rng f3 c= INT by RELAT_1:def 19;
dA8: the_arity_of o5 = <*I,I*> & the_result_sort_of o5 = I by A1,TYPEOF; then
A7: (C#*the Arity of S).o5 = C#.<*I,I*> by FUNCT_2:15
.= product (C*<*I,I*>) by A4,FINSEQ_2:def 5
.= product <*C.I,C.I*> by A6,FINSEQ_2:125
.= 2-tuples_on succ INT by A51,FINSEQ_3:128;
(C*the ResultSort of S).o5 = C.I by dA8,FUNCT_2:15; then
((2-tuples_on succ INT)-->u)+*f3 is
Function of (C#*the Arity of S).o5, (C*the ResultSort of S).o5
by A7,A51,B13,B2,Lm3; then
reconsider Ch3 = Ch2+*(o5,((2-tuples_on succ INT)-->u)+*f3)
as ManySortedFunction of
C#*the Arity of S, C*the ResultSort of S by ThF2;
deffunc F((Element of INT),Element of INT)
= In(IFEQ($2,0, (the undefined-map of B).I, $1 div $2), succ INT);
consider fa being 2-ary homogeneous quasi_total non empty PartFunc of
INT*, succ INT such that
dA3: for a,b being Element of INT holds fa.<*a,b*> = F(a,b) from Sch2;
B1a:dom fa = (arity fa)-tuples_on INT by COMPUTu1c22
.= 2-tuples_on INT by COMPUT_1:def 21;
B2: rng fa c= succ INT by RELAT_1:def 19;
gA8: the_arity_of o6 = <*I,I*> & the_result_sort_of o6 = I by A1,TYPEOF; then
A7: (C#*the Arity of S).o6 = C#.<*I,I*> by FUNCT_2:15
.= product (C*<*I,I*>) by A4,FINSEQ_2:def 5
.= product <*C.I,C.I*> by A6,FINSEQ_2:125
.= 2-tuples_on succ INT by A51,FINSEQ_3:128;
(C*the ResultSort of S).o6 = C.I by gA8,FUNCT_2:15; then
((2-tuples_on succ INT)-->u)+*fa is
Function of (C#*the Arity of S).o6, (C*the ResultSort of S).o6
by A7,A51,B1a,B2,Lm3; then
reconsider Ch3a = Ch3+*(o6,((2-tuples_on succ INT)-->u)+*fa)
as ManySortedFunction of
C#*the Arity of S, C*the ResultSort of S by ThF2;
deffunc G(Element of 2-tuples_on INT)
= In(IFGT($1/.1,$1/.2,FALSE,TRUE),BOOLEAN);
consider f4 being Function of 2-tuples_on INT, BOOLEAN such that
E1: for p being Element of 2-tuples_on INT holds f4.p = G(p)
from FUNCT_2:sch 4;
aA8: the_arity_of o7 = <*I,I*> & the_result_sort_of o7 = bs by A1,TYPEOF; then
A7: (C#*the Arity of S).o7 = C#.<*I,I*> by FUNCT_2:15
.= product (C*<*I,I*>) by A4,FINSEQ_2:def 5
.= product <*C.I,C.I*> by A6,FINSEQ_2:125
.= 2-tuples_on succ INT by A51,FINSEQ_3:128;
reconsider w = BOOLEAN as Element of succ BOOLEAN by ORDINAL1:6;
BS: C.bs = (succ Df).bs by B0,Th58 .= succ (Df.bs) by B0,Th58,SUCC
.= succ BOOLEAN by A6,B0,FUNCT_7:31; then
BQ: (C*the ResultSort of S).o7 = succ BOOLEAN by aA8,FUNCT_2:15;
then ((2-tuples_on succ INT)-->w)+*f4 is Function of
(C#*the Arity of S).o7, (C*the ResultSort of S).o7 by A7,A51,Lm3;
then reconsider Ch4 = Ch3a+*(o7,((2-tuples_on succ INT)-->w)+*f4)
as ManySortedFunction of
C#*the Arity of S, C*the ResultSort of S by BQ,A7,ThF2;
A4: <*>the carrier of S in (the carrier of S)* by FINSEQ_1:def 11;
fA8: the_arity_of o1 = {} & the_result_sort_of o1 = I by A1,TYPEOF; then
A7: (C#*the Arity of S).o1 = C#.{} by FUNCT_2:15
.= product (C*<*>succ INT) by A4,FINSEQ_2:def 5
.= 0-tuples_on succ INT by CARD_3:10,FINSEQ_2:94;
(C*the ResultSort of S).o1
= succ INT by A51,fA8,FUNCT_2:15; then
((0-tuples_on succ INT)-->u)+*g0 is Function of
(C#*the Arity of S).o1, (C*the ResultSort of S).o1 by A7,A51,Lm3;
then reconsider Ch5 = Ch4+*(o1,((0-tuples_on succ INT)-->u)+*g0)
as ManySortedFunction of
C#*the Arity of S, C*the ResultSort of S by A7,A51,ThF2;
eA8: the_arity_of o2 = {} & the_result_sort_of o2 = I by A1,TYPEOF; then
A7: (C#*the Arity of S).o2 = C#.{} by FUNCT_2:15
.= product (C*<*>succ INT) by A4,FINSEQ_2:def 5
.= 0-tuples_on succ INT by CARD_3:10,FINSEQ_2:94;
(C*the ResultSort of S).o2 = succ INT by A51,eA8,FUNCT_2:15; then
((0-tuples_on succ INT)-->u)+*g1 is Function of
(C#*the Arity of S).o2, (C*the ResultSort of S).o2 by A7,A51,Lm3;
then reconsider Ch6 = Ch5+*(o2,((0-tuples_on succ INT)-->u)+*g1)
as ManySortedFunction of
C#*the Arity of S, C*the ResultSort of S by A51,A7,ThF2;
E2: dom Ch5 = the carrier' of S & dom Ch4 = the carrier' of S &
dom Ch3 = the carrier' of S & dom Ch2 = the carrier' of S &
dom Ch1 = the carrier' of S & dom Ch = the carrier' of S &
dom Ch3a = the carrier' of S by PARTFUN1:def 2;
set D = UndefMSAlgebra(#C,Ch6,sc#);
deffunc U(SortSymbol of S) = {(the undefined-map of D).$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
for x being SortSymbol of S holds U.x = {(the undefined-map of B).x} by BZ;
then
AV: DefSorts D = C(\)U = DefSorts B by BZ,DEFS;
o01 is_of_type {}, bs & o02 is_of_type <*bs*>, bs &
o03 is_of_type <*bs,bs*>, bs by CORRECT; then
E0: the_arity_of o01 = {} & the_result_sort_of o01 = bs &
the_result_sort_of o02 = bs & the_result_sort_of o03 = bs &
the_arity_of o02 = <*bs*> & the_arity_of o03 = <*bs,bs*> &
len <*bs*> = 1 & len <*I,I*> = 2 & <*I,I*>.1 = I & <*bs,bs*>.1 = bs
by TYPEOF,FINSEQ_1:40,44; then
E3: o01 <> o4 & o01 <> o3 & o01 <> o2 & o01 <> o1 & o01 <> o5 & o01 <> o6 &
o02 <> o4 & o02 <> o3 & o02 <> o2 & o02 <> o1 & o02 <> o5 & o02 <> o6 &
o03 <> o4 & o03 <> o3 & o03 <> o2 & o03 <> o1 & o03 <> o5 & o03 <> o6 &
o01 <> o7 & o02 <> o7 & o03 <> o7
by A1,TYPEOF;
1E4: Ch6.o01 = Ch5.o01 by E3,FUNCT_7:32
.= Ch4.o01 by E3,FUNCT_7:32
.= Ch3a.o01 by E3,FUNCT_7:32
.= Ch3.o01 by E3,FUNCT_7:32 .= Ch2.o01 by E3,FUNCT_7:32
.= Ch1.o01 by E3,FUNCT_7:32
.= Ch.o01 by E3,FUNCT_7:32;
2E4: Ch6.o02 = Ch5.o02 by E3,FUNCT_7:32
.= Ch4.o02 by E3,FUNCT_7:32
.= Ch3a.o02 by E3,FUNCT_7:32
.= Ch3.o02 by E3,FUNCT_7:32
.= Ch2.o02 by E3,FUNCT_7:32
.= Ch1.o02 by E3,FUNCT_7:32
.= Ch.o02 by E3,FUNCT_7:32;
2E5: In((the connectives of S).2, the carrier' of S) = o02
by SUBSET_1:def 8;
E6: Ch6.o03 = Ch5.o03 by E3,FUNCT_7:32
.= Ch4.o03 by E3,FUNCT_7:32
.= Ch3a.o03 by E3,FUNCT_7:32
.= Ch3.o03 by E3,FUNCT_7:32
.= Ch2.o03 by E3,FUNCT_7:32
.= Ch1.o03 by E3,FUNCT_7:32
.= Ch.o03 by E3,FUNCT_7:32;
E7: In((the connectives of S).3, the carrier' of S) = o03
by SUBSET_1:def 8;
dom A = the carrier of S by PARTFUN1:def 2;
then
BS: (DefSorts D).the bool-sort of S = BOOLEAN by B0,AV,FUNCT_7:31;
D is with_defined_elements bool-correct
proof
thus DefSorts D is non-empty by AV;
dom A = the carrier of S by PARTFUN1:def 2;
hence (DefSorts D).the bool-sort of S = BOOLEAN by B0,AV,FUNCT_7:31;
thus Den(In((the connectives of S).1, the carrier' of S), D).{}
= Den(o01,B).{} by 1E4,SUBSET_1:def 8
.= Den(In((the connectives of S).1, the carrier' of S), B).{}
by AA,SUBSET_1:def 8
.= TRUE by B0,BOOL2;
let x,y be boolean set;
thus Den(In((the connectives of S).2, the carrier' of S), D).<*x*>
= Den(o02,B).<*x*> by 2E4,SUBSET_1:def 8
.= 'not' x by B0,2E5,BOOL2;
thus Den(In((the connectives of S).3, the carrier' of S), D).<*x,y*>
= Den(o03,B).<*x,y*> by E6,SUBSET_1:def 8 .= x '&' y by B0,E7,BOOL2;
end; then
reconsider D as bool-correct with_defined_elements strict
UndefMSAlgebra over S;
take D;
DS: DefSorts D = DefSorts B by Th218;
hence
UD: DefSorts D c= the undefined-map of D &
the undefined-map of D = DefSorts D by B0;
the Sorts of D = succ DefSorts D by DS,B0,Th58;
X1: {} in {{}} & 0-tuples_on INT = {<*>INT} &
0-tuples_on succ INT = {<*>succ INT} by TARSKI:def 1,FINSEQ_2:94;
X2: In(o1, the carrier' of S) = o1 & In(o2, the carrier' of S) = o2
by SUBSET_1:def 8;
X3: Ch6.o1 = Ch5.o1 by A1,FUNCT_7:32
.= ((0-tuples_on succ INT)-->u)+*g0 by E2,FUNCT_7:31;
E8a: o6 <> o1 & o6 <> o2 & o6 <> o7 by A1,TYPEOF,gA8;
E9a: Ch6.o6 = Ch5.o6 by E8a,FUNCT_7:32
.= Ch4.o6 by E8a,FUNCT_7:32
.= Ch3a.o6 by E8a,FUNCT_7:32
.= ((2-tuples_on succ INT)-->u)+*fa by E2,FUNCT_7:31;
EE: In(o6, the carrier' of S) = o6 by SUBSET_1:def 8;
DI: (DefSorts D).I = A.I by A1,AV,B0,FUNCT_7:32
.= INT by A6,FUNCT_7:31;
len <*I*> = 1 & len <*I,I*> = 2 by FINSEQ_1:40,44; then
E8: o3 <> o4 & o3 <> o5 & o3 <> o6 & o3 <> o1 & o3 <> o2 & o3 <> o7
by A1,TYPEOF,bA8,cA8,dA8,gA8;
E9: Ch6.o3 = Ch5.o3 by cA8,eA8,FUNCT_7:32
.= Ch4.o3 by cA8,fA8,FUNCT_7:32
.= Ch3a.o3 by E8,FUNCT_7:32
.= Ch3.o3 by E8,FUNCT_7:32
.= Ch2.o3 by E8,FUNCT_7:32
.= Ch1.o3 by E8,FUNCT_7:32
.= ((1-tuples_on succ INT)-->u)+*f1 by E2,FUNCT_7:31;
2E9: Ch6.o4 = Ch5.o4 by bA8,eA8,FUNCT_7:32
.= Ch4.o4 by bA8,fA8,FUNCT_7:32
.= Ch3a.o4 by A1,aA8,bA8,FUNCT_7:32
.= Ch3.o4 by A1,TYPEOF,bA8,FUNCT_7:32
.= Ch2.o4 by A1,FUNCT_7:32
.= ((2-tuples_on succ INT)-->u)+*f2 by E2,FUNCT_7:31;
3E8: o5 <> o6 & o5 <> o1 & o5 <> o2 & o5 <> o7 by A1,TYPEOF,dA8;
3E9: Ch6.o5 = Ch5.o5 by 3E8,FUNCT_7:32
.= Ch4.o5 by 3E8,FUNCT_7:32
.= Ch3a.o5 by 3E8,FUNCT_7:32
.= Ch3.o5 by A1,TYPEOF,dA8,FUNCT_7:32
.= ((2-tuples_on succ INT)-->u)+*f3 by E2,FUNCT_7:31;
E9b: Ch6.o7 = Ch5.o7 by aA8,eA8,FUNCT_7:32
.= Ch4.o7 by aA8,fA8,FUNCT_7:32
.= ((2-tuples_on succ INT)-->w)+*f4 by E2,FUNCT_7:31;
hereby ::D is (n,J) integer
take I; thus I = J by A1;
thus (the connectives of S).n is_of_type {},I by A1;
thus (DefSorts D).I = INT by DI;
thus Den(In((the connectives of S).n, the carrier' of S), D).{}
= g0.{} by X1,X2,X3,BB,FUNCT_4:13
.= 0 by X1,X2;
Ch6.o2 = ((0-tuples_on succ INT)-->u)+*g1 by E2,FUNCT_7:31;
hence Den(In((the connectives of S).(n+1), the carrier' of S), D).{}
= g1.{} by X1,X2,BB,FUNCT_4:13
.= 1 by X1,X2,FUNCOP_1:7;
let i,j being Integer;
EE: In(o3, the carrier' of S) = o3 & i in INT & -i in INT
by SUBSET_1:def 8,INT_1:def 2;
then <*i*> in 1-tuples_on INT by FINSEQ_2:98;
hence Den(In((the connectives of S).(n+2), the carrier' of S), D).<*i*>
= f1.<*i*> by EE,E9,B1,FUNCT_4:13
.= In(-i,INT) by EE,aA3,E9 .= -i by INT_1:def 2,SUBSET_1:def 8;
E9: Ch6.o4 = Ch5.o4 by bA8,eA8,FUNCT_7:32
.= Ch4.o4 by bA8,fA8,FUNCT_7:32
.= Ch3a.o4 by A1,aA8,bA8,FUNCT_7:32
.= Ch3.o4 by A1,TYPEOF,bA8,FUNCT_7:32
.= Ch2.o4 by A1,FUNCT_7:32
.= ((2-tuples_on succ INT)-->u)+*f2 by E2,FUNCT_7:31;
EE: In(o4, the carrier' of S) = o4 & i in INT & j in INT & i+j in INT
by SUBSET_1:def 8,INT_1:def 2;
then <*i,j*> in 2-tuples_on INT by FINSEQ_2:101;
hence Den(In((the connectives of S).(n+3), the carrier' of S), D).<*i,j*>
= f2.<*i,j*> by EE,E9,B12,FUNCT_4:13
.= In(i+j,INT) by EE,bA3,E9 .= i+j by INT_1:def 2,SUBSET_1:def 8;
E8: o5 <> o6 & o5 <> o1 & o5 <> o2 & o5 <> o7 by A1,TYPEOF,dA8;
E9: Ch6.o5 = Ch5.o5 by E8,FUNCT_7:32
.= Ch4.o5 by E8,FUNCT_7:32
.= Ch3a.o5 by E8,FUNCT_7:32
.= Ch3.o5 by A1,TYPEOF,dA8,FUNCT_7:32
.= ((2-tuples_on succ INT)-->u)+*f3 by E2,FUNCT_7:31;
F1: In(o5, the carrier' of S) = o5 & i in INT & j in INT & i*j in INT
by SUBSET_1:def 8,INT_1:def 2;
then <*i,j*> in 2-tuples_on INT by FINSEQ_2:101;
hence Den(In((the connectives of S).(n+4), the carrier' of S), D).<*i,j*>
= f3.<*i,j*> by F1,E9,B13,FUNCT_4:13
.= In(i*j,INT) by F1,cA3,E9 .= i*j by INT_1:def 2,SUBSET_1:def 8;
hereby assume
E7: j <> 0;
EB: i div j in INT c= succ INT by INT_1:def 2,ORDINAL3:1;
EE: In(o6, the carrier' of S) = o6 & i in INT & j in INT & i div j in INT
by SUBSET_1:def 8,INT_1:def 2;
then <*i,j*> in 2-tuples_on INT by FINSEQ_2:101;
hence Den(In((the connectives of S).(n+5), the carrier' of S), D).
<*i,j*> = fa.<*i,j*> by EE,E9a,B1a,FUNCT_4:13
.= In(IFEQ(j,0, (the undefined-map of B).I, i div j), succ INT)
by EE,dA3,E9
.= In(i div j, succ INT) by E7,FUNCOP_1:def 8
.= i div j by EB,SUBSET_1:def 8,INT_1:def 2;
end;
E9: Ch6.o7 = Ch5.o7 by aA8,eA8,FUNCT_7:32
.= Ch4.o7 by aA8,fA8,FUNCT_7:32
.= ((2-tuples_on succ INT)-->w)+*f4 by E2,FUNCT_7:31;
reconsider p = <*i,j*> as Element of 2-tuples_on INT by F1,FINSEQ_2:101;
dom <*i,j*> = Seg 2 by FINSEQ_1:89; then
1 in dom <*i,j*> & 2 in dom <*i,j*>; then
F2: p/.1 = p.1 & p/.2 = p.2 & p.1 = i & p.2 = j
by FINSEQ_1:44,PARTFUN1:def 6;
F1: In(o7, the carrier' of S) = o7 & i in INT & j in INT &
(i > j implies IFGT(i,j,FALSE,TRUE) = FALSE) & (i <= j implies
IFGT(i,j,FALSE,TRUE) = TRUE) & FALSE in BOOLEAN & TRUE in BOOLEAN
by SUBSET_1:def 8,INT_1:def 2,XXREAL_0:def 11;
then dom f4 = 2-tuples_on INT & <*i,j*> in 2-tuples_on INT
by FUNCT_2:def 1,FINSEQ_2:101;
hence Den(In((the connectives of S).(n+6), the carrier' of S), D).<*i,j*>
= f4.<*i,j*> by E9,E2,F1,FUNCT_7:32,FUNCT_4:13
.= G(p) by E9,E1
.= IFGT(i,j,FALSE,TRUE) by F1,F2,SUBSET_1:def 8;
end;
thus D is undef-consequent
proof
let o be OperSymbol of S;
let p be FinSequence such that
Z11: p in Args(o, D);
given i being Nat, s being SortSymbol of S,a being Element of D,s such
that
Z12: i in dom the_arity_of o & s = (the_arity_of o).i &
a = p.i & a is undefined;
now set f = (DefSorts D)*the_arity_of o;
given g being Function such that
AA1: p = g & dom g = dom f &
for y being element st y in dom f holds g.y in f.y;
rng the_arity_of o c= the carrier of S = dom DefSorts D
by PARTFUN1:def 2,FINSEQ_1:def 4;
then dom f = dom the_arity_of o by RELAT_1:27;
then a in f.i = (DefSorts D).s = (the undefined-map of D).s
by UD,Z12,AA1,FUNCT_1:13;
then f.i in f.i by Z12,UNDEF;
hence contradiction by UNDEF;
end;
then
BB1: p nin product ((DefSorts D)*the_arity_of o) by CARD_3:def 5;
let b be Element of D, the_result_sort_of o;
assume
Z13: b = Den(o,D).p;
per cases;
suppose o = o01;
hence b is undefined by E0,Z12;
end;
suppose
CC2: o = o02;
then
AA4: Den(o,D) = Ch.o02 by 2E4 .= Den(o02,B);
AA3: dom the Sorts of B = the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
AA2: Args(o02,B) = product ((the Sorts of B)*<*bs*>) by E0,PRALG_2:3
.= product <*(the Sorts of B).bs*> by AA3,FINSEQ_2:34
.= product <*(the Sorts of D).bs*> by A1,FUNCT_7:32
.= product ((the Sorts of D)*<*bs*>) by AA3,FINSEQ_2:34
.= Args(o,D) by CC2,E0,PRALG_2:3;
reconsider c = p.i as Element of B,s by Z12;
Result(o02,B) = (the Sorts of B).the_result_sort_of o02 by PRALG_2:3;
then reconsider d = Den(o02,B).p as Element of B,the_result_sort_of o02
by AA2,Z11,FUNCT_2:5;
a = (the undefined-map of D).s = (the undefined-map of B).s
by A1,Z12,UNDEF,FUNCT_7:32;
then c is undefined by Z12,UNDEF;
then d is undefined by B0,Z11,Z12,Z13,AA2,AA4,CC2,UDCNS;
then d = (the undefined-map of D).the_result_sort_of o by CC2,UNDEF;
hence b is undefined by Z13,AA4,UNDEF;
end;
suppose
CC2: o = o03;
then
AA4: Den(o,D) = Ch.o03 by E6 .= Den(o03,B);
AA3: dom the Sorts of B = the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
AA5: the Sorts of D is Function of the carrier of S,
bool Union the Sorts of D &
the Sorts of B is Function of the carrier of S,
bool Union the Sorts of B by Lm2;
AA2: Args(o03,B) = product ((the Sorts of B)*<*bs,bs*>) by E0,PRALG_2:3
.= product <*(the Sorts of B).bs,(the Sorts of B).bs*>
by AA3,AA5,FINSEQ_2:36
.= product <*(the Sorts of D).bs,(the Sorts of B).bs*> by A1,FUNCT_7:32
.= product <*(the Sorts of D).bs,(the Sorts of D).bs*> by A1,FUNCT_7:32
.= product ((the Sorts of D)*<*bs,bs*>) by AA3,AA5,FINSEQ_2:36
.= Args(o,D) by CC2,E0,PRALG_2:3;
reconsider c = p.i as Element of B,s by Z12;
Result(o03,B) = (the Sorts of B).the_result_sort_of o03 by PRALG_2:3;
then reconsider d = Den(o03,B).p as Element of B,the_result_sort_of o03
by AA2,Z11,FUNCT_2:5;
a = (the undefined-map of D).s = (the undefined-map of B).s
by A1,Z12,UNDEF,FUNCT_7:32;
then c is undefined by Z12,UNDEF;
then d is undefined by B0,Z11,Z12,Z13,AA2,AA4,CC2,UDCNS;
then d = (the undefined-map of D).the_result_sort_of o by CC2,UNDEF;
hence b is undefined by Z13,AA4,UNDEF;
end;
suppose
CC2: o = o1 or o = o2;
then dom the_arity_of o = {} by eA8,fA8;
hence b is undefined by Z12;
end;
suppose
CC2: o = o3;
Ch6.o3 = ((1-tuples_on succ INT)-->u)+*f1 by E9;
BB2: dom DefSorts D = the carrier of S & I in the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
BB3: 1-tuples_on succ INT = product <*succ INT*> by FINSEQ_3:126
.= product((the Sorts of D)*<*I*>) by BB2,CC2,A51,cA8,FINSEQ_2:34
.= Args(o,D) by CC2,cA8,PRALG_2:3;
dom f1 = 1-tuples_on INT by B1 .= product <*INT*> by FINSEQ_3:126
.= product((DefSorts D)*<*I*>) by BB2,DS,CC2,A5,cA8,FINSEQ_2:34;
then Den(o,D).p = ((1-tuples_on succ INT)-->u).p
by CC2,cA8,E9,BB1,FUNCT_4:11
.= u by BB3,Z11,FUNCOP_1:7
.= (the undefined-map of D).the_result_sort_of o by DS,A5,cA8,UD,CC2;
hence b is undefined by Z13,UNDEF;
end;
suppose
CC2: o = o4;
Ch6.o4 = ((2-tuples_on succ INT)-->u)+*f2 by 2E9;
BB2: dom DefSorts D = the carrier of S & I in the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
BB4: the Sorts of B is Function of the carrier of S,
bool Union the Sorts of B &
DefSorts B is Function of the carrier of S,
bool Union DefSorts B by Lm2;
BB3: 2-tuples_on succ INT = product <*succ INT,succ INT*> by FINSEQ_3:128
.= product((the Sorts of D)*<*I,I*>) by BB4,BB2,CC2,A51,bA8,FINSEQ_2:36
.= Args(o,D) by CC2,bA8,PRALG_2:3;
dom f2 = 2-tuples_on INT by B12 .= product <*INT,INT*> by FINSEQ_3:128
.= product((DefSorts D)*<*I,I*>) by BB4,BB2,DS,CC2,A5,bA8,FINSEQ_2:36;
then Den(o,D).p = ((2-tuples_on succ INT)-->u).p
by CC2,bA8,2E9,BB1,FUNCT_4:11
.= u by BB3,Z11,FUNCOP_1:7
.= (the undefined-map of D).the_result_sort_of o by DS,A5,bA8,UD,CC2;
hence b is undefined by Z13,UNDEF;
end;
suppose
CC2: o = o5;
Ch6.o5 = ((2-tuples_on succ INT)-->u)+*f3 by 3E9;
BB2: dom DefSorts D = the carrier of S & I in the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
BB4: the Sorts of B is Function of the carrier of S,
bool Union the Sorts of B &
DefSorts B is Function of the carrier of S,
bool Union DefSorts B by Lm2;
BB3: 2-tuples_on succ INT = product <*succ INT,succ INT*> by FINSEQ_3:128
.= product((the Sorts of D)*<*I,I*>) by BB4,BB2,CC2,A51,dA8,FINSEQ_2:36
.= Args(o,D) by CC2,dA8,PRALG_2:3;
dom f3 = 2-tuples_on INT by B13 .= product <*INT,INT*> by FINSEQ_3:128
.= product((DefSorts D)*<*I,I*>) by BB4,BB2,DS,CC2,A5,dA8,FINSEQ_2:36;
then Den(o,D).p = ((2-tuples_on succ INT)-->u).p
by CC2,dA8,3E9,BB1,FUNCT_4:11
.= u by BB3,Z11,FUNCOP_1:7
.= (the undefined-map of D).the_result_sort_of o by DS,A5,dA8,UD,CC2;
hence b is undefined by Z13,UNDEF;
end;
suppose
CC2: o = o6;
E9: Ch6.o6 = ((2-tuples_on succ INT)-->u)+*fa by E9a;
BB2: dom DefSorts D = the carrier of S & I in the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
BB4: the Sorts of B is Function of the carrier of S,
bool Union the Sorts of B &
DefSorts B is Function of the carrier of S,
bool Union DefSorts B by Lm2;
BB3: 2-tuples_on succ INT = product <*succ INT,succ INT*> by FINSEQ_3:128
.= product((the Sorts of D)*<*I,I*>) by BB4,BB2,CC2,A51,dA8,FINSEQ_2:36
.= Args(o,D) by CC2,gA8,PRALG_2:3;
dom fa = 2-tuples_on INT by B1a .= product <*INT,INT*> by FINSEQ_3:128
.= product((DefSorts D)*<*I,I*>) by BB4,BB2,DS,CC2,A5,gA8,FINSEQ_2:36;
then Den(o,D).p = ((2-tuples_on succ INT)-->u).p
by CC2,E9,gA8,BB1,FUNCT_4:11
.= u by BB3,Z11,FUNCOP_1:7
.= (the undefined-map of D).the_result_sort_of o by DS,A5,gA8,UD,CC2;
hence b is undefined by Z13,UNDEF;
end;
suppose
CC2: o = o7;
E9: Ch6.o7 = ((2-tuples_on succ INT)-->w)+*f4 by E9b;
BB2: dom DefSorts D = the carrier of S & I in the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
BB4: the Sorts of B is Function of the carrier of S,
bool Union the Sorts of B &
DefSorts B is Function of the carrier of S,
bool Union DefSorts B by Lm2;
BB3: 2-tuples_on succ INT = product <*succ INT,succ INT*> by FINSEQ_3:128
.= product((the Sorts of D)*<*I,I*>) by BB4,BB2,CC2,A51,dA8,FINSEQ_2:36
.= Args(o,D) by CC2,aA8,PRALG_2:3;
dom f4 = 2-tuples_on INT by FUNCT_2:def 1
.= product <*INT,INT*> by FINSEQ_3:128
.= product((DefSorts D)*<*I,I*>) by BB4,BB2,DS,CC2,A5,aA8,FINSEQ_2:36;
then Den(o,D).p = ((2-tuples_on succ INT)-->w).p
by CC2,E9,aA8,BB1,FUNCT_4:11
.= w by BB3,Z11,FUNCOP_1:7
.= (the undefined-map of D).the_result_sort_of o by DS,BS,aA8,UD,CC2;
hence b is undefined by Z13,UNDEF;
end;
suppose
CC7: o <> o01 & o <> o02 & o <> o03 & o <> o1 & o <> o2 & o <> o3 &
o <> o4 & o <> o5 & o <> o6 & o <> o7;
AA4: Den(o,D) = Ch6.o .= Ch5.o by CC7,FUNCT_7:32
.= Ch4.o by CC7,FUNCT_7:32
.= Ch3a.o by CC7,FUNCT_7:32
.= Ch3.o by CC7,FUNCT_7:32
.= Ch2.o by CC7,FUNCT_7:32
.= Ch1.o by CC7,FUNCT_7:32
.= Ch.o by CC7,FUNCT_7:32 .= Den(o,B);
AA3: dom the Sorts of B = the carrier of S &
dom the Sorts of D = the carrier of S by PARTFUN1:def 2;
AA2: Args(o,B) = product ((the Sorts of B)*the_arity_of o) by PRALG_2:3
.= Args(o,D) by PRALG_2:3;
reconsider c = p.i as Element of B,s by Z12;
Result(o,B) = (the Sorts of B).the_result_sort_of o by PRALG_2:3;
then reconsider d = Den(o,B).p as Element of B,the_result_sort_of o
by AA2,Z11,FUNCT_2:5;
a = (the undefined-map of D).s = (the undefined-map of B).s
by A1,Z12,UNDEF,FUNCT_7:32;
then c is undefined by Z12,UNDEF;
then d is undefined by B0,Z11,Z12,Z13,AA2,AA4,UDCNS;
then d = (the undefined-map of D).the_result_sort_of o by UNDEF;
hence b is undefined by Z13,AA4,UNDEF;
end;
end;
let I1 be SortSymbol of S;
assume Z0: J = I1;
let a be defined Element of (the Sorts of D).I1;
a in (DefSorts D).I by A1,Z0,DEF1;
then reconsider i = a, z = 0 as Element of INT by DI,INT_1:def 2;
IZ: <*i,z*> in 2-tuples_on INT by FINSEQ_2:101;
D is limited-by-undefined by UD;
then
SI: (the undefined-map of D).I1 in (the Sorts of D).I1 = (succ DefSorts D).I1
= succ ((DefSorts D).I1)
= succ INT by A1,Z0,DI,UD,Th58,SUCC,PBOOLE:def 14;
thus Den(In((the connectives of S).(n+5), the carrier' of S),D).
<*a, Den(In((the connectives of S).n, the carrier' of S),D).{}*>
= Ch6.o6.<*a, Ch6.o1.{}*> by X2,EE
.= Ch6.o6.<*a, g0.{}*> by X1,X2,X3,BB,FUNCT_4:13
.= Ch6.o6.<*a, 0*> by X1,X2
.= fa.<*i,z*> by IZ,EE,E9a,B1a,FUNCT_4:13
.= In(IFEQ(z,z, (the undefined-map of B).I, i div z), succ INT)
by EE,dA3,E9a
.= In((the undefined-map of D).I1, succ INT) by Z0,A1,FUNCOP_1:def 8
.= (the undefined-map of D).I1 by SI,SUBSET_1:def 8;
end;
registration
let S be (4,1) integer bool-correct non empty non void BoolSignature;
cluster (4,1) integer undef-consequent with_undefined_division_by_0
limited-by-undefined for
bool-correct with_defined_elements strict UndefMSAlgebra over S;
existence
proof
consider A being bool-correct with_defined_elements strict
UndefMSAlgebra over S such that
A0: A is limited-by-undefined and the undefined-map of A = DefSorts A and
A1: A is (4,1) integer undef-consequent and
A2: A is 4,1 with_undefined_division_by_0 by Th199;
take A; thus A is 4,1 integer undef-consequent by A1;
thus A is with_undefined_division_by_0 by A2,WUD;
thus thesis by A0;
end;
end;
theorem
for S being (4,1) integer bool-correct non empty non void BoolSignature
for A being (4,1) integer bool-correct with_defined_elements
UndefMSAlgebra over S
for I being integer SortSymbol of S holds
(DefSorts A).I = INT & \0(A,I) = 0 & \1(A,I) = 1 &
for i,j being Integer,a,b being Element of (the Sorts of A).I
st a = i & b = j
holds -a = -i & a+b = i+j & a-b = i-j & a*b = i*j &
(j <> 0 implies a div b = i div j & a mod b = i mod j) &
leq(a,b) = IFGT(i,j,FALSE,TRUE) &
(leq(a,b) = TRUE iff i <= j) & (leq(a,b) = FALSE iff i > j)
proof
let S be (4,1) integer bool-correct non empty non void BoolSignature;
let A be (4,1) integer bool-correct with_defined_elements
UndefMSAlgebra over S;
let I be integer SortSymbol of S;
set n = 4;
consider J being SortSymbol of S such that
A1: J = 1 &
(the connectives of S).n is_of_type {},J & (DefSorts A).J = INT &
Den(In((the connectives of S).n, the carrier' of S), A).{} = 0 &
Den(In((the connectives of S).(n+1), the carrier' of S), A).{} = 1 &
for i,j being Integer holds
Den(In((the connectives of S).(n+2), the carrier' of S), A).<*i*> = -i &
Den(In((the connectives of S).(n+3), the carrier' of S), A).<*i,j*> = i+j &
Den(In((the connectives of S).(n+4), the carrier' of S), A).<*i,j*> = i*j &
(j <> 0 implies
Den(In((the connectives of S).(n+5), the carrier' of S), A).<*i,j*>
= i div j) &
Den(In((the connectives of S).(n+6), the carrier' of S), A).<*i,j*>
= IFGT(i,j,FALSE,TRUE) by INT2;
thus (DefSorts A).I = INT by A1,INT3;
thus \0(A,I) = 0 by A1;
thus \1(A,I) = 1 by A1;
let i,j be Integer;
let a,b be Element of (the Sorts of A).I;
assume Z0: a = i;
assume Z1: b = j;
thus -a = -i by A1,Z0;
thus a+b = i+j by A1,Z0,Z1;
A9: Den(In((the connectives of S).(n+2), the carrier' of S), A).<*j*> = -j &
Den(In((the connectives of S).(n+2), the carrier' of S), A).<*(i div j)*j*>
= -((i div j)*j) &
Den(In((the connectives of S).(n+3), the carrier' of S), A).
<*i,-(i div j)*j*> = i+-(i div j)*j &
Den(In((the connectives of S).(n+3), the carrier' of S), A).<*i,-j*>
= i+-j &
Den(In((the connectives of S).(n+4), the carrier' of S), A).<*i div j,j*>
= (i div j)*j by A1;
thus a-b = a+-b
.= Den(In((the connectives of S).(n+3), the carrier' of S), A).<*i,-b*>
by A1,Z0,Z1
.= Den(In((the connectives of S).(n+3), the carrier' of S), A).<*i,-j*>
by A1,Z0,Z1
.= i+-j by A9,Z0,Z1 .= i-j;
thus a*b = i*j by A1,Z0,Z1;
hereby
assume Z2: j <> 0;
hence a div b = i div j by A1,Z0,Z1;
thus a mod b = a+-(a div b)*b
.= Den(In((the connectives of S).(n+3), the carrier' of S), A).
<*i,Den(In((the connectives of S).(n+2), the carrier' of S), A).
<*Den(In((the connectives of S).(n+4), the carrier' of S), A).
<*i div j,j*>*>*> by A9,A1,Z0,Z1,Z2
.= i +-(i div j)*j by A9,A1,Z0,Z1,Z2
.= i-(i div j)*j
.= i mod j by Z2,INT_1:def 10;
end;
thus
A3: leq(a,b) = IFGT(i,j,FALSE,TRUE) by A1,Z0,Z1;
thus (leq(a,b) = TRUE iff i <= j)
proof
hereby
assume Z3: leq(a,b) = TRUE;
thus i <= j by A3,Z3,XXREAL_0:def 11;
end;
assume i <= j;
hence leq(a,b) = TRUE by A3,XXREAL_0:def 11;
end;
hereby
assume leq(a,b) = FALSE;
hence i > j by A3,XXREAL_0:def 11;
end;
assume i > j;
hence leq(a,b) = FALSE by A3,XXREAL_0:def 11;
end;
begin :: Algebras with arrays
definition
let I,N be element;
let n be Nat;
let S be ConnectivesSignature;
attr S is (n,I,N)-array means: ARRAY1:
len the connectives of S >= n+3 & :: I=L - type of elements of an array
:: N=K - intgers
:: J - array of I
ex J,K,L being Element of S st L = I & K = N & J <> L & J <> K &
(the connectives of S).n is_of_type <*J,K*>, L & ::(a,i) -> a[i]
(the connectives of S).(n+1) is_of_type <*J,K,L*>, J & :: a[i]:=x
(the connectives of S).(n+2) is_of_type <*J*>, K & :: length
(the connectives of S).(n+3) is_of_type <*K,L*>, J; :: init
end;
theorem Th68:
for S1,S2 being non empty non void ConnectivesSignature
st the ConnectivesSignature of S1 = the ConnectivesSignature of S2
for I,N being element for n being Nat
st S1 is n,I,N-array holds S2 is n,I,N-array
proof
let S1,S2 be non empty non void ConnectivesSignature;
assume Z0: the ConnectivesSignature of S1 = the ConnectivesSignature of S2;
let I,N be element;
let n be Nat;
assume Z1: len the connectives of S1 >= n+3;
given J,K,L being Element of S1 such that
Z2: L = I & K = N & J <> L & J <> K &
(the connectives of S1).n is_of_type <*J,K*>, L &
(the connectives of S1).(n+1) is_of_type <*J,K,L*>, J &
(the connectives of S1).(n+2) is_of_type <*J*>, K &
(the connectives of S1).(n+3) is_of_type <*K,L*>, J;
thus len the connectives of S2 >= n+3 by Z0,Z1;
reconsider J,K,L as Element of S2 by Z0;
take J,K,L;
the ManySortedSign of S1 = the ManySortedSign of S2 by Z0;
hence thesis by Z0,Z2,Th77;
end;
definition
let S be non empty non void ConnectivesSignature;
let I,N be element;
let n be Nat;
let A be with_defined_elements MSAlgebra over S;
attr A is (n,I,N)-array means: ARRAY2:
ex J,K being Element of S st K = I &
(the connectives of S).n is_of_type <*J,N*>, K &
(DefSorts A).J = ((DefSorts A).K)^omega &
(DefSorts A).N = INT &
(for a being 0-based finite array of (DefSorts A).K holds
(for i being Integer st i in dom a holds
Den((the connectives of S)/.n,A).<*a,i*> = a.i &
for x being defined Element of A,K holds
Den((the connectives of S)/.(n+1),A).<*a,i,x*> = a+*(i,x)) &
Den((the connectives of S)/.(n+2),A).<*a*> = card a) &
for i being Integer, x being defined Element of A,K st i >= 0 holds
Den((the connectives of S)/.(n+3),A).<*i,x*> = i-->x;
end;
definition
let B be non empty BoolSignature;
let C be non empty ConnectivesSignature;
func B+*C -> strict BoolSignature means: COMB:
the ManySortedSign of it = B+*C &
the bool-sort of it = the bool-sort of B &
the connectives of it = (the connectives of B)^the connectives of C;
uniqueness;
existence
proof
the carrier of B+*C = (the carrier of B)\/the carrier of C
by CIRCCOMB:def 2; then
reconsider b = the bool-sort of B as SortSymbol of B+*C by XBOOLE_0:def 3;
A1: the carrier' of B+*C = (the carrier' of B)\/the carrier' of C
by CIRCCOMB:def 2;
rng the connectives of B c= the carrier' of B &
rng the connectives of C c= the carrier' of C by RELAT_1:def 19; then
(rng the connectives of B)\/rng the connectives of C c=
the carrier' of B+*C by A1,XBOOLE_1:13; then
rng((the connectives of B)^the connectives of C) c=
the carrier' of B+*C by FINSEQ_1:31; then
reconsider c = (the connectives of B)^the connectives of C as
FinSequence of the carrier' of B+*C by FINSEQ_1:def 4;
take BoolSignature(#
the carrier of B+*C, the carrier' of B+*C,
the Arity of B+*C, the ResultSort of B+*C, b, c
#);
thus thesis;
end;
end;
theorem Th190:
for B being non empty BoolSignature
for C being non empty ConnectivesSignature holds
the carrier of B+*C = (the carrier of B)\/the carrier of C &
the carrier' of B+*C = (the carrier' of B)\/the carrier' of C &
the Arity of B+*C = (the Arity of B)+*the Arity of C &
the ResultSort of B+*C = (the ResultSort of B)+*the ResultSort of C
proof
let B be non empty BoolSignature;
let C be non empty ConnectivesSignature;
the ManySortedSign of B+*C = (B qua non empty ManySortedSign)+*C by COMB;
hence thesis by CIRCCOMB:def 2;
end;
registration
let B be non empty BoolSignature;
let C be non empty ConnectivesSignature;
cluster B+*C -> non empty;
coherence
proof
the carrier of B+*C = (the carrier of B)\/the carrier of C by Th190;
hence the carrier of B+*C is non empty;
end;
end;
registration
let B be non void non empty BoolSignature;
let C be non empty ConnectivesSignature;
cluster B+*C -> non void;
coherence
proof
the carrier' of B+*C = (the carrier' of B)\/the carrier' of C by Th190;
hence the carrier' of B+*C is non empty;
end;
end;
registration
let n1,n2 be Nat;
let B be n1-connectives non empty non void BoolSignature;
let C be n2-connectives non empty non void ConnectivesSignature;
cluster B+*C -> n1+n2-connectives;
coherence
proof
thus len the connectives of B+*C
= len((the connectives of B)^the connectives of C) by COMB
.= (len the connectives of B)+len the connectives of C by FINSEQ_1:22
.= n1+len the connectives of C by CONN
.= n1+n2 by CONN;
end;
end;
theorem Th201:
for M,O being set for N,I be element st I in M & N in M
ex C being 4-connectives non empty non void strict ConnectivesSignature st
C is (1,I,N)-array 1-1-connectives &
M c= the carrier of C & O misses the carrier' of C &
(the ResultSort of C).((the connectives of C).2) nin M
proof
let M,O be set; let N,I be element;
assume Z0: I in M & N in M;
set X = succ M; set Y = {O, succ O, succ succ O, succ succ succ O};
reconsider o0 = O, o1 = succ O, o2 = succ succ O,
o3 = succ succ succ O as Element of Y by ENUMSET1:def 2;
A1: X = M \/ {M} by ORDINAL1:def 1; then
reconsider m = M, i = I, n = N as Element of X
by Z0,XBOOLE_0:def 3,ORDINAL1:6;
set A = (o0,o1,o2,o3)-->(<*m,n*>,<*m,n,i*>,<*m*>,<*n,i*>);
A6: o0 in o1 & o1 in o2 & o2 in o3 by ORDINAL1:6; then
A7: o0 <> o1 & o1 <> o2 & o0 <> o2 & o0 <> o3 & o1 <> o3 & o2 <> o3
by XREGULAR:7; then
rng A = {<*m,n*>,<*m,n,i*>,<*m*>,<*n,i*>} & <*m,n*> in X* &
<*m,n,i*> in X* &
<*m*> in X* & <*n,i*> in X* by Th23a,FINSEQ_1:def 11; then
dom A = Y & rng A c= X* by Th21a,Th24a; then
reconsider A as Function of Y,X* by FUNCT_2:2;
set R = (o0,o1,o2,o3)-->(i,m,n,m);
rng R = {i,m,n,m} by A7,Th23a; then
dom R = Y & rng R c= X by Th21a,Th24a; then
reconsider R as Function of Y,X by FUNCT_2:2;
set c = <*o0,o1,o2,o3*>;
set C = ConnectivesSignature(#X,Y,A,R,c#);
C is 4-connectives
proof
thus len the connectives of C = 4 by CARD_1:def 7;
end; then
reconsider C as 4-connectives non empty non void strict
ConnectivesSignature;
take C;
thus C is (1,I,N)-array
proof
thus len the connectives of C >= 1+3 by CARD_1:def 7;
reconsider K = n, L = i, J = m as Element of C;
take J,K,L;
thus L = I & K = N;
thus J <> L & J <> K by Z0;
c.1 = o0 & o0 <> o1 & o0 <> o2 & o0 <> o3 by A6,FINSEQ_4:76,XREGULAR:7;
hence (the Arity of C).((the connectives of C).1) = <*J,K*> &
(the ResultSort of C).((the connectives of C).1) = L by Th21b;
c.2 = o1 & o2 <> o1 & o1 <> o3 by A6,FINSEQ_4:76;
hence (the Arity of C).((the connectives of C).(1+1)) = <*J,K,L*> &
(the ResultSort of C).((the connectives of C).(1+1)) = J by Th21b;
c.3 = o2 & o2 <> o3 by A6,FINSEQ_4:76;
hence (the Arity of C).((the connectives of C).(1+2)) = <*J*> &
(the ResultSort of C).((the connectives of C).(1+2)) = K by Th21b;
c.4 = o3 by FINSEQ_4:76;
hence (the Arity of C).((the connectives of C).(1+3)) = <*K,L*> &
(the ResultSort of C).((the connectives of C).(1+3)) = J by Th21b;
end;
thus the connectives of C is one-to-one by A7,Th25;
thus M c= the carrier of C by A1,XBOOLE_1:7;
now
given x such that
A5: x in O & x in the carrier' of C;
x = o0 or x = o1 or x = o2 or x = o3 by A5,ENUMSET1:def 2;
hence contradiction by A5,A6,XREGULAR:7,8;
end;
hence O misses the carrier' of C by XBOOLE_0:3;
c.2 = o1 & o2 <> o1 & o1 <> o3 by A6,FINSEQ_4:76;
then (the ResultSort of C).((the connectives of C).(1+1)) = m by Th21b;
hence thesis;
end;
registration
let I,N be element;
cluster (1,I,N)-array 4-connectives for non empty non void strict
ConnectivesSignature;
existence
proof
I in {I,N} & N in {I,N} by TARSKI:def 2; then
ex C being 4-connectives non empty non void strict ConnectivesSignature st
C is (1,I,N)-array 1-1-connectives &
{I,N} c= the carrier of C & {} misses the carrier' of C &
(the ResultSort of C).((the connectives of C).2) nin {I,N} by Th201;
hence thesis;
end;
end;
theorem Th202:
for n,m being Nat st m > 0
for B being n-connectives non empty non void BoolSignature
for I,N being element
for C being non empty non void ConnectivesSignature
st C is (m,I,N)-array
holds B+*C is (n+m,I,N)-array
proof
let n,m be Nat such that
A0: m > 0;
let B be n-connectives non empty non void BoolSignature;
let I,N be element;
let C be non empty non void ConnectivesSignature;
assume Z1: len the connectives of C >= m+3;
given J,K,L being Element of C such that
Z2: L = I & K = N & J <> L & J <> K &
(the connectives of C).m is_of_type <*J,K*>, L &
(the connectives of C).(m+1) is_of_type <*J,K,L*>, J &
(the connectives of C).(m+2) is_of_type <*J*>, K &
(the connectives of C).(m+3) is_of_type <*K,L*>, J;
set S = B+*C;
A2: len the connectives of B = n by CONN;
A3: the connectives of S = (the connectives of B)^the connectives of C
by COMB; then
A1: len the connectives of S = n+len the connectives of C by A2,FINSEQ_1:22;
n+(m+3) = n+m+3;
hence len the connectives of S >= n+m+3 by Z1,A1,XREAL_1:6;
the carrier of S = (the carrier of B)\/the carrier of C by Th190; then
reconsider J0 = J, K0 = K, L0 = L as Element of S by XBOOLE_0:def 3;
take J0,K0,L0;
thus L0 = I & K0 = N & J0 <> L0 & J0 <> K0 by Z2;
m+0 <= m+3 by XREAL_1:6; then
0+1 <= m & m <= len the connectives of C by A0,Z1,XXREAL_0:2,NAT_1:13; then
A4: m in dom the connectives of C by FINSEQ_3:25;
A6: dom the Arity of C = the carrier' of C by FUNCT_2:def 1;
A7: the Arity of S = (the Arity of B)+*the Arity of C by Th190; then
A8: (the Arity of S).((the connectives of C).m) =
(the Arity of C).((the connectives of C).m)
by A4,A6,FUNCT_1:102,FUNCT_4:13;
A9: (the connectives of S).(n+m) = (the connectives of C).m
by A2,A3,A4,FINSEQ_1:def 7;
hence (the Arity of S).((the connectives of S).(n+m)) = <*J0,K0*>
by Z2,A8,TYPEOF;
B6: dom the ResultSort of C = the carrier' of C by FUNCT_2:def 1;
B7: the ResultSort of S = (the ResultSort of B)+*the ResultSort of C by Th190;
then
(the ResultSort of S).((the connectives of C).m) =
(the ResultSort of C).((the connectives of C).m)
by A4,B6,FUNCT_1:102,FUNCT_4:13;
hence (the ResultSort of S).((the connectives of S).(n+m)) = L0
by Z2,A9,TYPEOF;
m+1 <= m+3 by XREAL_1:6; then
1 <= m+1 & m+1 <= len the connectives of C by Z1,XXREAL_0:2,NAT_1:11;
then
A4: m+1 in dom the connectives of C by FINSEQ_3:25;
A8: (the Arity of S).((the connectives of C).(m+1)) =
(the Arity of C).((the connectives of C).(m+1))
by A4,A6,A7,FUNCT_1:102,FUNCT_4:13;
n+m+1 = n+(m+1); then
A9: (the connectives of S).(n+m+1) = (the connectives of C).(m+1)
by A2,A3,A4,FINSEQ_1:def 7;
hence (the Arity of S).((the connectives of S).(n+m+1)) = <*J0,K0,L0*>
by Z2,A8,TYPEOF;
(the ResultSort of S).((the connectives of C).(m+1)) =
(the ResultSort of C).((the connectives of C).(m+1))
by A4,B6,B7,FUNCT_1:102,FUNCT_4:13;
hence (the ResultSort of S).((the connectives of S).(n+m+1)) = J0
by Z2,A9,TYPEOF;
m+2 <= m+2+1 by NAT_1:11;
then m+2 <= len the connectives of C by Z1,XXREAL_0:2;
then
A4: m+2 in dom the connectives of C by NAT_1:12,FINSEQ_3:25;
A8: (the Arity of S).((the connectives of C).(m+2)) =
(the Arity of C).((the connectives of C).(m+2))
by A4,A6,A7,FUNCT_1:102,FUNCT_4:13;
n+m+2 = n+(m+2); then
A9: (the connectives of S).(n+m+2) = (the connectives of C).(m+2)
by A2,A3,A4,FINSEQ_1:def 7;
hence (the Arity of S).((the connectives of S).(n+m+2)) = <*J0*>
by Z2,A8,TYPEOF;
(the ResultSort of S).((the connectives of C).(m+2)) =
(the ResultSort of C).((the connectives of C).(m+2))
by A4,B6,B7,FUNCT_1:102,FUNCT_4:13;
hence (the ResultSort of S).((the connectives of S).(n+m+2)) = K0
by Z2,A9,TYPEOF;
A4: m+3 in dom the connectives of C by Z1,NAT_1:12,FINSEQ_3:25;
A8: (the Arity of S).((the connectives of C).(m+3)) =
(the Arity of C).((the connectives of C).(m+3))
by A4,A6,A7,FUNCT_1:102,FUNCT_4:13;
n+m+3 = n+(m+3); then
A9: (the connectives of S).(n+m+3) = (the connectives of C).(m+3)
by A2,A3,A4,FINSEQ_1:def 7;
hence (the Arity of S).((the connectives of S).(n+m+3)) = <*K0,L0*>
by Z2,A8,TYPEOF;
(the ResultSort of S).((the connectives of C).(m+3)) =
(the ResultSort of C).((the connectives of C).(m+3))
by A4,B6,B7,FUNCT_1:102,FUNCT_4:13;
hence (the ResultSort of S).((the connectives of S).(n+m+3)) = J0
by Z2,A9,TYPEOF;
end;
theorem Th203:
for m being Nat st m > 0
for s being set
for B being non empty non void BoolSignature
for C being non empty non void ConnectivesSignature
st B is (m,s) integer & the carrier' of B misses the carrier' of C
holds B+*C is (m,s) integer
proof
let m be Nat;
assume Z0: m > 0;
let s be set;
let B be non empty non void BoolSignature;
let C be non empty non void ConnectivesSignature;
assume Z1: len the connectives of B >= m+6;
given I being Element of B such that
Z3: I = s & I <> the bool-sort of B &
(the connectives of B).m is_of_type {},I &
(the connectives of B).(m+1) is_of_type {},I &
(the connectives of B).m <> (the connectives of B).(m+1) &
(the connectives of B).(m+2) is_of_type <*I*>,I &
(the connectives of B).(m+3) is_of_type <*I,I*>,I &
(the connectives of B).(m+4) is_of_type <*I,I*>,I &
(the connectives of B).(m+5) is_of_type <*I,I*>,I &
(the connectives of B).(m+3) <> (the connectives of B).(m+4) &
(the connectives of B).(m+3) <> (the connectives of B).(m+5) &
(the connectives of B).(m+4) <> (the connectives of B).(m+5) &
(the connectives of B).(m+6) is_of_type <*I,I*>,the bool-sort of B;
assume Z2: the carrier' of B misses the carrier' of C;
set S = B+*C;
A6: the connectives of S = (the connectives of B)^the connectives of C
by COMB; then
len the connectives of S = (len the connectives of B)+
len the connectives of C by FINSEQ_1:22;
hence len the connectives of S >= m+6 by Z1,NAT_1:12;
the carrier of S = (the carrier of B)\/the carrier of C by Th190; then
reconsider I as Element of S by XBOOLE_0:def 3;
take I; thus I = s by Z3;
thus I <> the bool-sort of S by Z3,COMB;
Lm: now
let i be Nat;
assume 1 <= i & i <= len the connectives of B; then
D1: i in dom the connectives of B by FINSEQ_3:25; then
(the connectives of B).i in the carrier' of B by FUNCT_1:102; then
D2: (the connectives of B).i nin the carrier' of C by Z2,XBOOLE_0:3;
D3: dom the Arity of C = the carrier' of C &
dom the ResultSort of C = the carrier' of C by FUNCT_2:def 1;
the Arity of S = (the Arity of B)+*the Arity of C &
the ResultSort of S = (the ResultSort of B)+*the ResultSort of C
by Th190; then
D4: (the Arity of S).((the connectives of B).i) =
(the Arity of B).((the connectives of B).i) &
(the ResultSort of S).((the connectives of B).i) =
(the ResultSort of B).((the connectives of B).i) by D2,D3,FUNCT_4:11;
thus
D6: (the connectives of S).i = (the connectives of B).i
by A6,D1,FINSEQ_1:def 7;
let x; let I be Element of B; let J be Element of S;
assume
D5: I = J & (the connectives of B).i is_of_type x,I;
thus (the connectives of S).i is_of_type x,J
proof
thus (the Arity of S).((the connectives of S).i) = x &
(the ResultSort of S).((the connectives of S).i) = J
by D4,D5,D6,TYPEOF;
end;
end;
m+0 <= m+6 by XREAL_1:6; then
E1: 0+1 <= m & m <= len the connectives of B by Z0,Z1,XXREAL_0:2,NAT_1:13;
hence (the connectives of S).m is_of_type {},I by Lm,Z3;
m+1 <= m+6 by XREAL_1:6; then
E2: 0+1 <= m+1 & m+1 <= len the connectives of B by Z1,XXREAL_0:2,NAT_1:11;
hence (the connectives of S).(m+1) is_of_type {},I by Lm,Z3;
(the connectives of S).m = (the connectives of B).m &
(the connectives of S).(m+1) = (the connectives of B).(m+1) by E1,E2,Lm;
hence (the connectives of S).m <> (the connectives of S).(m+1) by Z3;
m+2 <= m+6 by XREAL_1:6; then
0+1 <= m+2 & m+2 <= len the connectives of B by Z1,XXREAL_0:2,NAT_1:12;
hence (the connectives of S).(m+2) is_of_type <*I*>,I by Lm,Z3;
m+3 <= m+6 by XREAL_1:6; then
E3: 0+1 <= m+3 & m+3 <= len the connectives of B by Z1,XXREAL_0:2,NAT_1:12;
hence (the connectives of S).(m+3) is_of_type <*I,I*>,I by Z3,Lm;
m+4 <= m+6 by XREAL_1:6; then
E4: 0+1 <= m+4 & m+4 <= len the connectives of B by Z1,XXREAL_0:2,NAT_1:12;
hence (the connectives of S).(m+4) is_of_type <*I,I*>,I by Z3,Lm;
m+5 <= m+6 by XREAL_1:6; then
E5: 0+1 <= m+5 & m+5 <= len the connectives of B by Z1,XXREAL_0:2,NAT_1:12;
hence (the connectives of S).(m+5) is_of_type <*I,I*>,I by Z3,Lm;
(the connectives of S).(m+3) = (the connectives of B).(m+3) &
(the connectives of S).(m+5) = (the connectives of B).(m+5) &
(the connectives of S).(m+4) = (the connectives of B).(m+4) by E3,E4,E5,Lm;
hence (the connectives of S).(m+3) <> (the connectives of S).(m+4)&
(the connectives of S).(m+3) <> (the connectives of S).(m+5)&
(the connectives of S).(m+4) <> (the connectives of S).(m+5) by Z3;
0+1 <= m+6 & the bool-sort of S = the bool-sort of B by COMB,NAT_1:12;
hence (the connectives of S).(m+6) is_of_type <*I,I*>,the bool-sort of S
by Z1,Z3,Lm;
end;
theorem Th204:
for B being bool-correct non empty non void BoolSignature
for C being non empty non void ConnectivesSignature
st the carrier' of B misses the carrier' of C
holds B+*C is bool-correct
proof
let B be bool-correct non empty non void BoolSignature;
let C be non empty non void ConnectivesSignature;
assume Z1: the carrier' of B misses the carrier' of C;
set S = B+*C;
A1: the connectives of S = (the connectives of B)^the connectives of C
by COMB; then
A2: len the connectives of S = (len the connectives of B)+
len the connectives of C by FINSEQ_1:22;
A3: len the connectives of B >= 3 by CORRECT;
hence len the connectives of S >= 3 by A2,NAT_1:12;
Lm: now
let i be Nat;
assume 1 <= i & i <= len the connectives of B; then
D1: i in dom the connectives of B by FINSEQ_3:25; then
(the connectives of B).i in the carrier' of B by FUNCT_1:102; then
D2: (the connectives of B).i nin the carrier' of C by Z1,XBOOLE_0:3;
D3: dom the Arity of C = the carrier' of C &
dom the ResultSort of C = the carrier' of C by FUNCT_2:def 1;
the Arity of S = (the Arity of B)+*the Arity of C &
the ResultSort of S = (the ResultSort of B)+*the ResultSort of C
by Th190; then
D4: (the Arity of S).((the connectives of B).i) =
(the Arity of B).((the connectives of B).i) &
(the ResultSort of S).((the connectives of B).i) =
(the ResultSort of B).((the connectives of B).i) by D2,D3,FUNCT_4:11;
thus
D6: (the connectives of S).i = (the connectives of B).i
by A1,D1,FINSEQ_1:def 7;
let x; let I be Element of B; let J be Element of S;
assume
D5: I = J & (the connectives of B).i is_of_type x,I;
thus (the connectives of S).i is_of_type x,J
proof
thus (the Arity of S).((the connectives of S).i) = x &
(the ResultSort of S).((the connectives of S).i) = J
by D4,D5,D6,TYPEOF;
end;
end;
A4: the bool-sort of S = the bool-sort of B by COMB;
A5: 1 <= len the connectives of B by A3,XXREAL_0:2;
(the connectives of B).1 is_of_type {}, the bool-sort of B by CORRECT;
hence (the connectives of S).1 is_of_type {}, the bool-sort of S
by Lm,A4,A5;
A6: 2 <= len the connectives of B by A3,XXREAL_0:2;
(the connectives of B).2 is_of_type <*the bool-sort of B*>,
the bool-sort of B by CORRECT;
hence (the connectives of S).2 is_of_type <*the bool-sort of S*>,
the bool-sort of S by Lm,A4,A6;
(the connectives of B).3 is_of_type
<*the bool-sort of B, the bool-sort of B*>, the bool-sort of B by CORRECT;
hence thesis by Lm,A3,A4;
end;
definition
let n be Nat;
let B be BoolSignature;
attr B is n array-correct means: ARRAY3:
(the ResultSort of B).((the connectives of B).(n+1)) <> the bool-sort of B;
end;
registration
cluster 1-1-connectives 14-connectives (11,1,1)-array 11 array-correct
(4,1) integer bool-correct non empty non void for strict BoolSignature;
existence
proof
consider S being 1-1-connectives 10-connectives (4,1) integer bool-correct
non empty non void strict BoolSignature such that
A1: the carrier of S = {0,1} &
ex I being SortSymbol of S st I = 1 &
(the connectives of S).4 is_of_type {},I by Th200;
consider C being 4-connectives non empty non void
strict ConnectivesSignature such that
A2: C is (1,1,1)-array 1-1-connectives &
the carrier of S c= the carrier of C &
the carrier' of S misses the carrier' of C &
(the ResultSort of C).((the connectives of C).2) nin {0,1}
by A1,Th201;
take G = S+*C;
A4: the connectives of G = (the connectives of S)^the connectives of C by COMB;
A6: the ResultSort of G = (the ResultSort of S)+*the ResultSort of C by Th190;
rng the connectives of S c= the carrier' of S &
rng the connectives of C c= the carrier' of C by RELAT_1:def 19;
hence the connectives of G is one-to-one by A4,A2,XBOOLE_1:64,FINSEQ_3:91;
thus G is 14-connectives;
10+1=11 & 1 > 0;
hence G is (11,1,1)-array by A2,Th202;
the bool-sort of G = the bool-sort of S by COMB;
then
Aa: the bool-sort of G in {0,1} by A1;
1+3 <= len the connectives of C by A2,ARRAY1;
then 2 <= len the connectives of C by XXREAL_0:2;
then 2 in dom the connectives of C &
len the connectives of S = 10 by CONN,FINSEQ_3:25;
then (the connectives of C).(1+1) = (the connectives of G).(10+(1+1)) &
(the connectives of C).(1+1) in the carrier' of C &
dom the ResultSort of C = the carrier' of C
by A4,FUNCT_1:102,FINSEQ_1:def 7,FUNCT_2:def 1;
hence (the ResultSort of G).((the connectives of G).(11+1))
<> the bool-sort of G by A2,Aa,A6,FUNCT_4:13;
thus G is (4,1) integer by A2,Th203;
thus G is bool-correct by A2,Th204;
thus G is non empty non void;
end;
end;
registration
let S be (11,1,1)-array non empty non void BoolSignature;
cluster integer for SortSymbol of S;
existence
proof
consider J,K,L being Element of S such that
A1: L = 1 & K = 1 & J <> L & J <> K &
(the connectives of S).11 is_of_type <*J,K*>, L &
(the connectives of S).(11+1) is_of_type <*J,K,L*>, J &
(the connectives of S).(11+2) is_of_type <*J*>, K &
(the connectives of S).(11+3) is_of_type <*K,L*>, J by ARRAY1;
take K; thus K = 1 by A1;
end;
end;
definition
let S be (11,1,1)-array non empty non void BoolSignature;
consider J,K,L being Element of S such that
A: L = 1 & K = 1 & J <> L & J <> K &
(the connectives of S).11 is_of_type <*J,K*>, L &
(the connectives of S).(11+1) is_of_type <*J,K,L*>, J &
(the connectives of S).(11+2) is_of_type <*J*>, K &
(the connectives of S).(11+3) is_of_type <*K,L*>, J by ARRAY1;
func the_array_sort_of S -> SortSymbol of S equals
(the ResultSort of S).((the connectives of S).12);
coherence by A,TYPEOF;
end;
definition
let S be (4,1) integer (11,1,1)-array non empty non void BoolSignature;
let A be non-empty MSAlgebra over S;
let a be Element of (the Sorts of A).the_array_sort_of S;
let I be integer SortSymbol of S;
consider J,K,L being Element of S such that
A: L = 1 & K = 1 & J <> L & J <> K &
(the connectives of S).11 is_of_type <*J,K*>, L &
(the connectives of S).(11+1) is_of_type <*J,K,L*>, J &
(the connectives of S).(11+2) is_of_type <*J*>, K &
(the connectives of S).(11+3) is_of_type <*K,L*>, J by ARRAY1;
B: the_array_sort_of S = J by A,TYPEOF;
C: I = 1 by INT3;
func length(a,I) -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).13, the carrier' of S), A).<*a*>;
coherence by A,B,C,Th1;
let i be Element of (the Sorts of A).I;
func a.(i) -> Element of (the Sorts of A).I equals
Den(In((the connectives of S).11, the carrier' of S), A).<*a,i*>;
coherence by A,B,C,Th2;
let x be Element of (the Sorts of A).I;
func (a,i)<-x -> Element of (the Sorts of A).the_array_sort_of S equals
Den(In((the connectives of S).12, the carrier' of S), A).<*a,i,x*>;
coherence by A,B,C,Th3;
end;
definition
let S be bool-correct non empty non void BoolSignature;
let I,s be element;
let n,m be Nat;
let A be with_defined_elements UndefMSAlgebra over S;
attr A is n,m,I,s with_undefined_index_overflow means
for J,K being SortSymbol of S st I = J & s = K
for a being defined Element of (the Sorts of A).K
for i,x being defined Element of (the Sorts of A).J
st Den(In((the connectives of S).(n+6), the carrier' of S),A).
<*Den(In((the connectives of S).n, the carrier' of S),A).{},i*> = \falseA
or Den(In((the connectives of S).(n+6), the carrier' of S),A).
<*Den(In((the connectives of S).(m+2), the carrier' of S),A).<*a*>,i*>
= \trueA
holds Den(In((the connectives of S).m, the carrier' of S),A).<*a,i*>
= (the undefined-map of A).J &
Den(In((the connectives of S).(m+1), the carrier' of S),A).<*a,i,x*>
= (the undefined-map of A).K;
end;
definition
let S be (4,1) integer (11,1,1)-array bool-correct non empty non void
BoolSignature;
let A be with_defined_elements UndefMSAlgebra over S;
attr A is with_undefined_index_overflow means: IOUD:
A is 4,11,1,the_array_sort_of S with_undefined_index_overflow;
end;
definition
let S be (4,1) integer (11,1,1)-array bool-correct non empty non void
BoolSignature;
let A be with_defined_elements UndefMSAlgebra over S;
redefine attr A is with_undefined_index_overflow means
for I being integer SortSymbol of S
for a being defined Element of (the Sorts of A).the_array_sort_of S
for i,x being defined Element of (the Sorts of A).I
st leq(\0(A,I),i) = \falseA or leq(length(a,I),i) = \trueA
holds a.i is undefined & (a,i)<-x is undefined;
compatibility
proof
thus A is with_undefined_index_overflow implies
for I being integer SortSymbol of S
for a being defined Element of (the Sorts of A).the_array_sort_of S
for i,x being defined Element of (the Sorts of A).I
st leq(\0(A,I),i) = \falseA or leq(length(a,I),i) = \trueA
holds a.i is undefined & (a,i)<-x is undefined
proof assume
A1: for J,K being SortSymbol of S st 1 = J & the_array_sort_of S = K
for a being defined Element of (the Sorts of A).K
for i,x being defined Element of (the Sorts of A).J
st Den(In((the connectives of S).(4+6), the carrier' of S),A).
<*Den(In((the connectives of S).4, the carrier' of S),A).{},i*> = \falseA
or Den(In((the connectives of S).(4+6), the carrier' of S),A).
<*Den(In((the connectives of S).(11+2), the carrier' of S),A).<*a*>,i*>
= \trueA
holds Den(In((the connectives of S).11, the carrier' of S),A).<*a,i*>
= (the undefined-map of A).J &
Den(In((the connectives of S).(11+1), the carrier' of S),A).<*a,i,x*>
= (the undefined-map of A).K;
let I be integer SortSymbol of S;
let a be defined Element of (the Sorts of A).the_array_sort_of S;
let i,x be defined Element of (the Sorts of A).I; assume
A2: leq(\0(A,I),i) = \falseA or leq(length(a,I),i) = \trueA;
I = 1 by INT3;
hence a.i = (the undefined-map of A).I &
(a,i)<-x = (the undefined-map of A).the_array_sort_of S by A1,A2;
end;
assume
A2: for I being integer SortSymbol of S
for a being defined Element of (the Sorts of A).the_array_sort_of S
for i,x being defined Element of (the Sorts of A).I
st leq(\0(A,I),i) = \falseA or leq(length(a,I),i) = \trueA
holds a.i is undefined & (a,i)<-x is undefined;
let J,K be SortSymbol of S such that
A3: 1 = J & the_array_sort_of S = K;
let a be defined Element of (the Sorts of A).K;
let i,x be defined Element of (the Sorts of A).J; assume
A4: Den(In((the connectives of S).(4+6), the carrier' of S),A).
<*Den(In((the connectives of S).4, the carrier' of S),A).{},i*> = \falseA
or Den(In((the connectives of S).(4+6), the carrier' of S),A).
<*Den(In((the connectives of S).(11+2), the carrier' of S),A).<*a*>,i*>
= \trueA;
reconsider I = J as 1 integer SortSymbol of S by A3,INT3;
reconsider j = i, y = x as defined Element of (the Sorts of A).I;
reconsider b = a as defined Element of (the Sorts of A).the_array_sort_of S
by A3;
leq(\0(A,I),j) = \falseA or leq(length(b,I),j) = \trueA by A4;
then b.j is undefined & (b,j)<-y is undefined by A2;
hence Den(In((the connectives of S).11, the carrier' of S),A).<*a,i*>
= (the undefined-map of A).J &
Den(In((the connectives of S).(11+1), the carrier' of S),A).<*a,i,x*>
= (the undefined-map of A).K by A3,UNDEF;
end;
end;
definition
let S be (4,1) integer (11,1,1)-array non empty non void BoolSignature;
let A be non-empty MSAlgebra over S;
let I be integer SortSymbol of S;
consider J,K,L being Element of S such that
A: L = 1 & K = 1 & J <> L & J <> K &
(the connectives of S).11 is_of_type <*J,K*>, L &
(the connectives of S).(11+1) is_of_type <*J,K,L*>, J &
(the connectives of S).(11+2) is_of_type <*J*>, K &
(the connectives of S).(11+3) is_of_type <*K,L*>, J by ARRAY1;
B: the_array_sort_of S = J by A,TYPEOF;
C: I = 1 by INT3;
let i be Element of (the Sorts of A).I;
let x be Element of (the Sorts of A).I;
func init.array(i,x) -> Element of (the Sorts of A).the_array_sort_of S
equals
Den(In((the connectives of S).14, the carrier' of S), A).<*i,x*>;
coherence by A,B,C,Th2;
end;
registration
let X be non empty set;
cluster <*X*> -> non-empty;
coherence
proof
now
let x; assume x in dom <*X*>;
then x in Seg 1 by FINSEQ_1:89;
then x = 1 by FINSEQ_1:2,TARSKI:def 1;
hence <*X*>.x is non empty by FINSEQ_1:40;
end;
hence thesis by FUNCT_1:def 9;
end;
let Y,Z be non empty set;
cluster <*X,Y,Z*> -> non-empty;
coherence
proof
thus thesis;
end;
end;
registration
let X be functional non empty set;
let Y,Z be non empty set;
let f be Element of product <*X,Y,Z*>;
cluster f.1 -> Relation-like Function-like;
coherence
proof
consider x,y,z being set such that
A1: x in X & y in Y & z in Z & f = <*x,y,z*> by FINSEQ_3:125;
thus thesis by A1,FINSEQ_1:45;
end;
end;
registration
let X be integer-membered non empty set;
let Y be non empty set;
let f be Element of product <*X,Y*>;
cluster f.1 -> integer;
coherence
proof
consider x,y being set such that
A1: x in X & y in Y & f = <*x,y*> by FINSEQ_3:124;
thus thesis by A1,FINSEQ_1:44;
end;
end;
theorem Th212:
for I,N being element
for S being (1,I,N)-array non empty non void ConnectivesSignature
for Y being non empty set
for X being non-empty ManySortedSet of Y st
((the ResultSort of S).((the connectives of S).2) nin Y or
X.((the ResultSort of S).((the connectives of S).2)) = (X.I)^omega) &
X.N = INT & I in Y
ex A being with_defined_elements strict UndefMSAlgebra over S st
A is limited-by-undefined & the undefined-map of A = DefSorts A &
A is (1,I,N)-array undef-consequent & DefSorts A tolerates X &
for a being 0-based finite array of (DefSorts A).I
for i being Integer st i nin dom a holds
Den(In((the connectives of S).1, the carrier' of S),A).<*a,i*>
= (the undefined-map of A).I &
for x being Element of (DefSorts A).I holds
Den(In((the connectives of S).2, the carrier' of S),A).<*a,i,x*>
= (the undefined-map of A).the_result_sort_of
In((the connectives of S).2, the carrier' of S)
proof
let I,N be element;
let S be (1,I,N)-array non empty non void ConnectivesSignature;
let A be non empty set;
let V be non-empty ManySortedSet of A;
assume Z0: (the ResultSort of S).((the connectives of S).2) nin A or
V.((the ResultSort of S).((the connectives of S).2)) = (V.I)^omega;
assume Z1: V.N = INT & I in A;
set X0 = the non-empty ManySortedSet of the carrier of S;
set X = (X0)+*(V|the carrier of S);
reconsider X as non-empty ManySortedSet of the carrier of S;
A1: len the connectives of S >= 1+3 by ARRAY1;
consider J,K,L being Element of S such that
A2: L = I & K = N & J <> L & J <> K &
(the connectives of S).1 is_of_type <*J,K*>, L &
(the connectives of S).(1+1) is_of_type <*J,K,L*>, J &
(the connectives of S).(1+2) is_of_type <*J*>, K &
(the connectives of S).(1+3) is_of_type <*K,L*>, J by ARRAY1;
AZ: J nin A or V.J = (V.L)^omega by Z0,A2,TYPEOF;
set Z = X+*(N,INT);
set Y = Z+*(J,(Z.L)^omega);
set O = the ManySortedFunction of Y# * the Arity of S,
Y * the ResultSort of S;
X3: dom V = A & dom X = the carrier of S by PARTFUN1:def 2;
then
X0: dom (V|the carrier of S) = A /\ the carrier of S by RELAT_1:61;
then I in dom (V|the carrier of S) by Z1,A2,XBOOLE_0:def 4;
then
X1: X.I = (V|the carrier of S).I by FUNCT_4:13 .= V.I by A2,FUNCT_1:49;
N in dom V by Z1,FUNCT_1:def 2;
then N in dom (V|the carrier of S) by X3,X0,A2,XBOOLE_0:def 4;
then
X2: X.N = (V|the carrier of S).N by FUNCT_4:13 .= V.N by A2,FUNCT_1:49;
deffunc F(Function) = IFIN($1.2,proj1($1.1),$1..(1,$1.2),
the Element of Y.L);
N = I or N <> I;
then
Ya: Z.I = X.I or Z.I = INT & X.I = INT by Z1,A2,X2,X3,FUNCT_7:31,32;
consider f being Function such that
A3: dom f = product <*Y.J,Y.K*> &
for x being Element of product <*Y.J,Y.K*> holds f.x = F(x)
from FUNCT_1:sch 4;
Aa: dom Y = the carrier of S & dom Z = the carrier of S &
dom X = the carrier of S by PARTFUN1:def 2;
then
Sx: Y.L = Z.L & Z.K = INT by A2,FUNCT_7:31,32;
then
A5: Y.J = (Y.L)^omega & Y.K = INT by Aa,A2,FUNCT_7:31,32;
rng f c= Y.L
proof
let x; assume x in rng f;
then consider y such that
A4: y in dom f & x = f.y by FUNCT_1:def 3;
reconsider y as Element of product <*Y.J,Y.K*> by A3,A4;
A6: x = F(y) by A3,A4;
consider a,b being set such that
A7: a in Y.J & b in Y.K & y = <*a,b*> by FINSEQ_3:124;
reconsider a as Element of (Y.L)^omega by Sx,A7,Aa,FUNCT_7:31;
A8: a = y.1 & b = y.2 & a is XFinSequence of Y.L by A7,FINSEQ_1:44;
per cases;
suppose
B1: y.2 in proj1(y.1);
then x = y..(1,y.2) by A6,MATRIX_7:def 1 .= a.b by A8,Th95;
hence thesis by A8,B1,FUNCT_1:102;
end;
suppose y.2 nin proj1(y.1);
then x = the Element of Y.L by A6,MATRIX_7:def 1;
hence thesis;
end;
end;
then reconsider f as Function of product <*Y.J,Y.K*>, Y.L by A3,FUNCT_2:2;
1 <= len the connectives of S by A1,XXREAL_0:2;
then
F1: 1 in dom the connectives of S by FINSEQ_3:25;
then reconsider o1 = (the connectives of S).1 as OperSymbol of S
by FUNCT_1:102;
K1: (the Arity of S).o1 = <*J,K*> & (the ResultSort of S).o1 = L by A2,TYPEOF;
<*J,K*> in (the carrier of S)* by FINSEQ_1:def 11;
then Y#.((the Arity of S).o1) = product (Y*<*J,K*>) &
Y*<*J,K*> = <*Y.J,Y.K*> &
Y.((the ResultSort of S).o1) = Y.L by K1,Aa,FINSEQ_2:def 5,125;
then (Y#*(the Arity of S)).o1 = product <*Y.J,Y.K*> &
(Y*(the ResultSort of S)).o1 = Y.L by FUNCT_2:15;
then reconsider f as Function of (Y#*(the Arity of S)).o1,
(Y*(the ResultSort of S)).o1;
deffunc G(Element of product <*(Y.L)^omega,Y.K,Y.L*>) = $1.1+*($1.2,$1.3);
consider g being Function such that
B3: dom g = product <*(Y.L)^omega,Y.K,Y.L*> &
for x being Element of product <*(Y.L)^omega,Y.K,Y.L*> holds g.x = G(x)
from FUNCT_1:sch 4;
rng g c= Y.J
proof
let x; assume x in rng g;
then consider y such that
A4: y in dom g & x = g.y by FUNCT_1:def 3;
reconsider y as Element of product <*(Y.L)^omega,Y.K,Y.L*> by B3,A4;
consider a,b,c being set such that
A7: a in (Y.L)^omega & b in Y.K & c in Y.L & y = <*a,b,c*> by FINSEQ_3:125;
reconsider a as XFinSequence of Y.L by A7;
reconsider c as Element of Y.L by A7;
A8: a = y.1 & b = y.2 & c = y.3 by A7,FINSEQ_1:45;
x = a+*(b,c) by A8,B3,A4;
hence thesis by A5,AFINSQ_1:def 7;
end;
then reconsider g as Function of product <*Y.J,Y.K,Y.L*>, Y.J
by A5,B3,FUNCT_2:2;
2 <= len the connectives of S by A1,XXREAL_0:2;
then
F2: 2 in dom the connectives of S by FINSEQ_3:25;
then reconsider o2 = (the connectives of S).2 as OperSymbol of S
by FUNCT_1:102;
K2: (the Arity of S).o2 = <*J,K,L*> & (the ResultSort of S).o2 = J
by A2,TYPEOF;
<*J,K,L*> in (the carrier of S)* by FINSEQ_1:def 11;
then Y#.((the Arity of S).o2) = product (Y*<*J,K,L*>) &
Y*<*J,K,L*> = <*Y.J,Y.K,Y.L*> &
Y.((the ResultSort of S).o2) = Y.J by K2,Aa,FINSEQ_2:def 5,126;
then (Y#*(the Arity of S)).o2 = product <*Y.J,Y.K,Y.L*> &
(Y*(the ResultSort of S)).o2 = Y.J by FUNCT_2:15;
then reconsider g as Function of (Y#*(the Arity of S)).o2,
(Y*(the ResultSort of S)).o2;
deffunc H(Element of product <*(Y.L)^omega *>) = card ($1.1);
consider h being Function such that
B4: dom h = product <*(Y.L)^omega *> &
for x being Element of product <*(Y.L)^omega *> holds h.x = H(x)
from FUNCT_1:sch 4;
rng h c= Y.K
proof
let x; assume x in rng h;
then consider y such that
A4: y in dom h & x = h.y by FUNCT_1:def 3;
reconsider y as Element of product <*(Y.L)^omega*> by B4,A4;
A6: x = H(y) by B4,A4;
consider a being set such that
A7: a in (Y.L)^omega & y = <*a*> by FINSEQ_3:123;
reconsider a as 0-based finite array of Y.L by A7;
x = len a by A6,A7,FINSEQ_1:40;
hence thesis by A5,INT_1:def 2;
end;
then reconsider h as Function of product <*Y.J*>, Y.K by A5,B4,FUNCT_2:2;
3 <= len the connectives of S by A1,XXREAL_0:2; then
F3: 3 in dom the connectives of S by FINSEQ_3:25;
then reconsider o3 = (the connectives of S).3 as OperSymbol of S
by FUNCT_1:102;
K3: (the Arity of S).o3 = <*J*> & (the ResultSort of S).o3 = K by A2,TYPEOF;
<*J*> in (the carrier of S)* by FINSEQ_1:def 11;
then Y#.((the Arity of S).o3) = product (Y*<*J*>) & Y*<*J*> = <*Y.J*> &
Y.((the ResultSort of S).o3) = Y.K by K3,Aa,FINSEQ_2:def 5,FINSEQ_2:34;
then (Y#*(the Arity of S)).o3 = product <*Y.J*> &
(Y*(the ResultSort of S)).o3 = Y.K by FUNCT_2:15;
then reconsider h as Function of (Y#*(the Arity of S)).o3,
(Y*(the ResultSort of S)).o3;
deffunc H(Element of product <*INT,Y.L*>)
= IFGT(0,$1.1,{},($1.1)-->($1.2));
consider j being Function such that
B5: dom j = product <*INT,Y.L*> &
for x being Element of product <*INT,Y.L*> holds j.x = H(x)
from FUNCT_1:sch 4;
rng j c= Y.J
proof
let x; assume x in rng j;
then consider y such that
A4: y in dom j & x = j.y by FUNCT_1:def 3;
reconsider y as Element of product <*Y.K,Y.L*>
by B5,A4,Sx,Aa,A2,FUNCT_7:31,32;
consider b,c being set such that
A7: b in Y.K & c in Y.L & y = <*b,c*> by FINSEQ_3:124;
reconsider c as Element of Y.L by A7;
reconsider b as Integer by A7,A5;
A8: b = y.1 & c = y.2 by A7,FINSEQ_1:44;
x = IFGT(0,b,{},b-->c) by A8,B5,A4;
then x = {} or b >= 0 & x = b-->c &
(b is non negative implies b is Nat) by XXREAL_0:def 11;
then x = <%>(Y.L) or ex b being non negative integer set st x = b-->c;
hence thesis by A5,A7,AFINSQ_1:def 7;
end;
then reconsider j as Function of product <*Y.K,Y.L*>, Y.J
by A5,B5,FUNCT_2:2;
F4: 4 in dom the connectives of S by A1,FINSEQ_3:25;
then reconsider o4 = (the connectives of S).4 as OperSymbol of S
by FUNCT_1:102;
K4: (the Arity of S).o4 = <*K,L*> & (the ResultSort of S).o4 = J
by A2,TYPEOF;
<*K,L*> in (the carrier of S)* by FINSEQ_1:def 11;
then Y#.((the Arity of S).o4) = product (Y*<*K,L*>) &
Y*<*K,L*> = <*Y.K,Y.L*> &
Y.((the ResultSort of S).o4) = Y.J by K4,Aa,FINSEQ_2:def 5,125;
then (Y#*(the Arity of S)).o4 = product <*Y.K,Y.L*> &
(Y*(the ResultSort of S)).o4 = Y.J by FUNCT_2:15;
then reconsider j as Function of (Y#*(the Arity of S)).o4,
(Y*(the ResultSort of S)).o4;
set U = O+*(o1,f)+*(o2,g)+*(o3,h)+*(o4,j);
Ac: dom O = the carrier' of S & dom (O+*(o1,f)) = the carrier' of S &
dom (O+*(o1,f)+*(o2,g)) = the carrier' of S & dom U = the carrier' of S &
dom (O+*(o1,f)+*(o2,g)+*(o3,h)) = the carrier' of S by PARTFUN1:def 2;
card ((the Arity of S).o1) = 2 & card ((the Arity of S).o2) = 3 &
card ((the Arity of S).o3) = 1 & card ((the Arity of S).o4) = 2
by K1,K2,K3,K4,CARD_1:def 7;
then
Ab: o1 <> o2 & o2 <> o3 & o3 <> o1 & o1 <> o4 & o2 <> o4 & o3 <> o4
by TYPEOF,K4,A2;
S1: U.o1 = (O+*(o1,f)+*(o2,g)+*(o3,h)).o1 by Ab,FUNCT_7:32
.= (O+*(o1,f)+*(o2,g)).o1 by Ab,FUNCT_7:32
.= (O+*(o1,f)).o1 by Ab,FUNCT_7:32 .= f by Ac,FUNCT_7:31;
S2: U.o2 = (O+*(o1,f)+*(o2,g)+*(o3,h)).o2 by Ab,FUNCT_7:32
.= (O+*(o1,f)+*(o2,g)).o2 by Ab,FUNCT_7:32 .= g by Ac,FUNCT_7:31;
S3: U.o3 = (O+*(o1,f)+*(o2,g)+*(o3,h)).o3 by Ab,FUNCT_7:32
.= h by Ac,FUNCT_7:31;
S4: U.o4 = j by Ac,FUNCT_7:31;
U is ManySortedFunction of Y#*the Arity of S, Y*the ResultSort of S
proof
let x be set; assume x in the carrier' of S;
then reconsider o = x as OperSymbol of S;
per cases;
suppose o = o1 or o = o2 or o = o3 or o = o4;
hence U.x is Function of (Y#*the Arity of S).x,
(Y*the ResultSort of S).x
by S1,S2,S3,Ac,FUNCT_7:31;
end;
suppose
S4: o <> o1 & o <> o2 & o <> o3 & o <> o4;
U.o = (O+*(o1,f)+*(o2,g)+*(o3,h)).o by S4,FUNCT_7:32
.= (O+*(o1,f)+*(o2,g)).o by S4,FUNCT_7:32
.= (O+*(o1,f)).o by S4,FUNCT_7:32 .= O.o by S4,FUNCT_7:32;
hence U.x is Function of (Y#*the Arity of S).x,
(Y*the ResultSort of S).x;
end;
end;
then reconsider U as ManySortedFunction of Y#*the Arity of S,
Y*the ResultSort of S;
set A = MSAlgebra(#Y, U#);
A is non-empty
proof
thus the Sorts of A is non-empty;
end;
then reconsider A as non-empty strict MSAlgebra over S;
defpred P[OperSymbol of S,Function] means
($1 = (the connectives of S).1 or $1 = (the connectives of S).2) &
$2.2 nin proj1($2.1);
consider B being strict UndefMSAlgebra over S such that
AA: B is A-undef with_defined_elements &
the undefined-map of B = the Sorts of A &
the Sorts of B = succ the Sorts of A &
for o being OperSymbol of S for a being Element of Args(o,A) holds
(not P[o,a] implies Den(o,B).a = Den(o,A).a) &
(P[o,a] implies Den(o,B).a = (the undefined-map of B).the_result_sort_of o)
from UndefAlgebra;
reconsider B as A-undef with_defined_elements strict UndefMSAlgebra over S
by AA;
take B;
deffunc U(element) = {(the undefined-map of B).$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
DefSorts B = the Sorts of A
proof
let s be SortSymbol of S;
thus (DefSorts B).s = ((the Sorts of B)(\)U).s by BZ,DEFS
.= (the Sorts of B).s\U.s by PBOOLE:def 6
.= (the Sorts of B).s\U(s) by BZ
.= succ ((the Sorts of A).s) \ U(s) by AA,SUCC
.= (the Sorts of A).s by AA,ORDINAL1:37;
end;
hence DefSorts B c= the undefined-map of B &
the undefined-map of B = DefSorts B by AA;
AB: DefSorts B = the Sorts of A by Lem7;
then
AC: (DefSorts B).J = ((DefSorts B).L)^omega &
(DefSorts B).N = INT by A2,Sx,Aa,FUNCT_7:31,32;
thus B is (1,I,N)-array
proof
take J,L; thus L = I by A2;
thus (the connectives of S).1 is_of_type <*J,N*>, L by A2;
AB: DefSorts B = the Sorts of A by Lem7;
hence (DefSorts B).J = ((DefSorts B).L)^omega &
(DefSorts B).N = INT by A2,Sx,Aa,FUNCT_7:31,32;
hereby
let a be 0-based finite array of (DefSorts B).L;
W1: a in (Y.L)^omega by AB,AFINSQ_1:def 7;
hereby let i be Integer; assume
W0: i in dom a;
W5: i in Y.N by A2,A5,INT_1:def 2;
then
W2: <*a,i*> in product <*(Y.L)^omega,Y.N*> by W1,FINSEQ_3:124;
W3: <*a,i*>.1 = a & <*a,i*>.2 = i by FINSEQ_1:44;
W4: (the connectives of S)/.1 = o1 by F1,PARTFUN1:def 6;
then
W6: <*a,i*> in Args((the connectives of S)/.1,A) by A2,A5,W1,W5,Arg2;
not P[(the connectives of S)/.1,<*a,i*>] by W3,W4,W0;
hence Den((the connectives of S)/.1,B).<*a,i*>
= Den((the connectives of S)/.1,A).<*a,i*> by AA,W6
.= F(<*a,i*>) by W4,A2,A3,A5,S1,W2
.= <*a,i*>..(1,i) by W3,W0,MATRIX_7:def 1 .= a.i by W3,Th95;
let x be defined Element of B,L;
W00: a is set & i is set & x is set & x in Y.L by AB,DEF1,TARSKI:1;
then
W2: <*a,i,x*> in product <*(Y.L)^omega,Y.N,Y.L*>
by AB,A5,W1,W4,W5,FINSEQ_3:125;
W3: <*a,i,x*>.1 = a & <*a,i,x*>.2 = i & <*a,i,x*>.3 = x by FINSEQ_1:45;
W4: (the connectives of S)/.2 = o2 by F2,PARTFUN1:def 6;
then
W6: <*a,i,x*> in Args((the connectives of S)/.(1+1),A)
by A2,A5,W00,W1,W5,AB,Arg3;
not P[(the connectives of S)/.(1+1),<*a,i,x*>] by W3,W4,W0;
hence Den((the connectives of S)/.(1+1),B).<*a,i,x*>
= Den((the connectives of S)/.(1+1),A).<*a,i,x*> by AA,W6
.= a+*(i,x) by A2,B3,S2,W2,W3,W4;
end;
W2: <*a*> in product <*(Y.L)^omega*> by W1,FINSEQ_3:123;
W3: <*a*>.1 = a by FINSEQ_1:40;
W4: (the connectives of S)/.3 = o3 by F3,PARTFUN1:def 6;
then
W5: <*a*> in Args(o3,A) by A2,A5,W1,AB,Arg1;
W7: (the connectives of S)/.1 = o1 & (the connectives of S)/.2 = o2
by F1,F2,PARTFUN1:def 6;
then the_arity_of ((the connectives of S)/.1) = <*J,K*> &
the_arity_of ((the connectives of S)/.2) = <*J,K,L*> &
the_arity_of ((the connectives of S)/.3) = <*J*> by A2,W4,ThType;
then len the_arity_of ((the connectives of S)/.1) = 2 &
len the_arity_of ((the connectives of S)/.2) = 3 &
len the_arity_of ((the connectives of S)/.3) = 1 by CARD_1:def 7;
then (the connectives of S).1 <> (the connectives of S)/.3 &
(the connectives of S).2 <> (the connectives of S)/.3 by W7;
then not P[(the connectives of S)/.3,<*a*>];
hence Den((the connectives of S)/.(1+2),B).<*a*>
= Den((the connectives of S)/.(1+2),A).<*a*> by AA,W4,W5
.= card a by B4,S3,W2,W3,W4;
end;
let i be Integer;
let x be defined Element of B,L;
assume N1: i >= 0;
F7: o4 = (the connectives of S)/.(1+3) by F4,PARTFUN1:def 6;
F8: i in INT & x in Y.L by AB,DEF1,INT_1:def 2;
then
F9: <*i,x*> in product <*INT,Y.L*> & <*i,x*>.1 = i & <*i,x*>.2 = x
by FINSEQ_1:44,FINSEQ_3:124;
then
F10: <*i,x*> in Args(o4, A) by A2,A5,F8,AB,Arg2;
W7: (the connectives of S)/.1 = o1 & (the connectives of S)/.2 = o2
by F1,F2,PARTFUN1:def 6;
then the_arity_of ((the connectives of S)/.1) = <*J,K*> &
the_arity_of ((the connectives of S)/.2) = <*J,K,L*> &
the_arity_of ((the connectives of S)/.4) = <*K,L*> by A2,F7,ThType;
then (the_arity_of ((the connectives of S)/.1)).1 = J &
(the_arity_of ((the connectives of S)/.2)).1 = J &
(the_arity_of ((the connectives of S)/.4)).1 = K by FINSEQ_1:44,45;
then (the connectives of S).1 <> (the connectives of S)/.4 &
(the connectives of S).2 <> (the connectives of S)/.4 by W7,A2;
then not P[(the connectives of S)/.4,<*i,x*>];
hence Den((the connectives of S)/.(1+3),B).<*i,x*>
= Den((the connectives of S)/.(1+3),A).<*i,x*> by AA,F7,F10
.= IFGT(0,i,{},i-->x) by B5,S4,F7,F9
.= i-->x by N1,XXREAL_0:def 11;
end;
AB: DefSorts B = the Sorts of A by Lem7;
thus B is undef-consequent;
thus DefSorts B tolerates V
proof
let x; assume
Ab: x in dom (DefSorts B)/\dom V;
then x in (the carrier of S)/\dom V by Ab,PARTFUN1:def 2;
then
AD: x in dom(V|the carrier of S) by RELAT_1:61;
then
AX: X.x = (V|the carrier of S).x by FUNCT_4:13 .= V.x by AD,FUNCT_1:47;
per cases;
suppose x <> N & x <> J;
then Z.x = X.x & Y.x = Z.x by FUNCT_7:32;
hence (DefSorts B).x = V.x by AX,AB;
end;
suppose x = N;
hence (DefSorts B).x = V.x by Z1,Sx,AB,A2,FUNCT_7:32;
end;
suppose
F1: x = J;
then x nin dom V or x in dom V & V.x = (V.L)^omega
by AZ,PARTFUN1:def 2;
hence (DefSorts B).x = V.x
by Ab,Ya,F1,Aa,AB,A2,FUNCT_7:31,XBOOLE_0:def 4,X1;
end;
end;
let a be 0-based finite array of (DefSorts B).I;
let i be Integer;
UU: a in (the Sorts of A).J & i in (the Sorts of A).K
by AB,AC,A2,INT_1:def 2,AFINSQ_1:def 7;
then
VV: <*a,i*> in Args(o1,A) by A2,Arg2;
assume Z10: i nin dom a;
WW: In(o1, the carrier' of S) = o1 & <*a,i*>.1 = a & <*a,i*>.2 = i
by SUBSET_1:def 8,FINSEQ_1:44;
then P[In((the connectives of S).1, the carrier' of S),<*a,i*>] by Z10;
hence Den(In((the connectives of S).1, the carrier' of S),B).<*a,i*>
= (the undefined-map of B).the_result_sort_of
In((the connectives of S).1, the carrier' of S) by AA,VV,WW
.= (the undefined-map of B).I by A2,WW,ThType;
let x be Element of (DefSorts B).I;
x in (the Sorts of A).L by AB,A2;
then
VV: <*a,i,x*> in Args(o2,A) by UU,A2,Arg3;
WW: In(o2, the carrier' of S) = o2 & <*a,i,x*>.1 = a & <*a,i,x*>.2 = i
by SUBSET_1:def 8,FINSEQ_1:45;
then P[In((the connectives of S).2, the carrier' of S),<*a,i,x*>] by Z10;
hence Den(In((the connectives of S).2, the carrier' of S),B).<*a,i,x*>
= (the undefined-map of B).the_result_sort_of
In((the connectives of S).2, the carrier' of S) by AA,VV,WW;
end;
registration
let I,N be element;
let S be (1,I,N)-array non empty non void ConnectivesSignature;
cluster (1,I,N)-array for with_defined_elements strict UndefMSAlgebra over S;
existence
proof
set Y = {I,N};
set V = (I,N)-->(INT,INT);
consider J,K,L being Element of S such that
A2: L = I & K = N & J <> L & J <> K &
(the connectives of S).1 is_of_type <*J,K*>, L &
(the connectives of S).(1+1) is_of_type <*J,K,L*>, J &
(the connectives of S).(1+2) is_of_type <*J*>, K &
(the connectives of S).(1+3) is_of_type <*K,L*>, J by ARRAY1;
(the ResultSort of S).((the connectives of S).2) = J by A2,TYPEOF;
then
A3: (the ResultSort of S).((the connectives of S).2) nin Y by A2,TARSKI:def 2;
dom V = Y & V = (I.-->INT)+*(N.-->INT) by FUNCT_4:62,def 4;
then reconsider V as non-empty ManySortedSet of Y
by RELAT_1:def 18,PARTFUN1:def 2;
V.N = INT & I in Y by TARSKI:def 2,FUNCT_4:63;
then consider A being with_defined_elements strict UndefMSAlgebra over S
such that
A is limited-by-undefined and the undefined-map of A = DefSorts A and
:: the undefined-map of A = DefSorts A &
:: the Sorts of A = succ DefSorts A and
A1: A is (1,I,N)-array undef-consequent & DefSorts A tolerates V &
for a being 0-based finite array of (DefSorts A).I
for i being Integer st i nin dom a holds
Den(In((the connectives of S).1, the carrier' of S),A).<*a,i*>
= (the undefined-map of A).I &
for x being Element of (DefSorts A).I holds
Den(In((the connectives of S).2, the carrier' of S),A).<*a,i,x*>
= (the undefined-map of A).the_result_sort_of
In((the connectives of S).2, the carrier' of S)
by A3,Th212;
take A; thus thesis by A1;
end;
end;
definition
let S1 be non empty non void BoolSignature;
let S2 be non empty non void ConnectivesSignature;
let A1 be ManySortedSet of the carrier of S1;
let A2 be ManySortedSet of the carrier of S2;
redefine func A1+*A2 -> ManySortedSet of the carrier of S1+*S2;
coherence
proof
dom(A1+*A2) = dom A1 \/ dom A2 by FUNCT_4:def 1
.= (the carrier of S1)\/ dom A2 by PARTFUN1:def 2
.= (the carrier of S1)\/the carrier of S2 by PARTFUN1:def 2
.= the carrier of S1+*S2 by Th190;
hence thesis by PARTFUN1:def 2,RELAT_1:def 18;
end;
end;
definition
let S1 be non empty non void BoolSignature;
let S2 be non empty non void ConnectivesSignature;
let A1 be ManySortedSet of the carrier' of S1;
let A2 be ManySortedSet of the carrier' of S2;
redefine func A1+*A2 -> ManySortedSet of the carrier' of S1+*S2;
coherence
proof
dom(A1+*A2) = dom A1 \/ dom A2 by FUNCT_4:def 1
.= (the carrier' of S1)\/ dom A2 by PARTFUN1:def 2
.= (the carrier' of S1)\/the carrier' of S2 by PARTFUN1:def 2
.= the carrier' of S1+*S2 by Th190;
hence thesis by PARTFUN1:def 2,RELAT_1:def 18;
end;
end;
definition
let S1 be non empty non void BoolSignature;
let S2 be non empty non void ConnectivesSignature;
let A1 be with_defined_elements UndefMSAlgebra over S1;
let A2 be with_defined_elements UndefMSAlgebra over S2 such that
A: the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2;
func (S1,A1) +* (S2,A2) ->
strict with_defined_elements UndefMSAlgebra over S1+*S2 means: COMB2:
the Sorts of it = (the Sorts of A1)+*the Sorts of A2 &
the Charact of it = (the Charact of A1)+*the Charact of A2 &
the undefined-map of it = (the undefined-map of A1)+*the undefined-map of A2;
existence
proof
the ManySortedSign of S1+*S2 = (S1 qua non empty ManySortedSign)+*S2
by COMB; then
reconsider A = A1+*A2 as MSAlgebra over S1+*S2;
reconsider u = (the undefined-map of A1)+*the undefined-map of A2 as
ManySortedSet of the carrier of S1+*S2;
set S = S1+*S2;
A1: dom the Sorts of A1 = the carrier of S1 &
dom the undefined-map of A1 = the carrier of S1 &
dom the undefined-map of A2 = the carrier of S2 &
dom the Sorts of A2 = the carrier of S2 by PARTFUN1:def 2;
A2: the Sorts of A1 tolerates the Sorts of A2 by A,CIRCCOMB:def 3;
u is ManySortedElement of the Sorts of A
proof
let x; assume x in the carrier of S;
then x in (the carrier of S1)\/the carrier of S2 by Th190;
then per cases by XBOOLE_0:def 3;
suppose x in the carrier of S1;
then u.x = (the undefined-map of A1).x &
(the undefined-map of A1).x is Element of (the Sorts of A1).x &
(the Sorts of A1).x = ((the Sorts of A1)+*(the Sorts of A2)).x
by A,A1,A2,FUNCT_4:15,PBOOLE:def 14;
hence u.x is Element of (the Sorts of A).x by A2,CIRCCOMB:def 4;
end;
suppose x in the carrier of S2;
then u.x = (the undefined-map of A2).x &
(the undefined-map of A2).x is Element of (the Sorts of A2).x &
(the Sorts of A2).x = ((the Sorts of A1)+*(the Sorts of A2)).x
by A,A1,FUNCT_4:13,PBOOLE:def 14;
hence u.x is Element of (the Sorts of A).x by A2,CIRCCOMB:def 4;
end;
end;
then reconsider u as ManySortedElement of the Sorts of A;
set B = UndefMSAlgebra(#the Sorts of A, the Charact of A,u#);
deffunc U(element) = {u.$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
deffunc U1(element) = {(the undefined-map of A1).$1};
consider U1 being ManySortedSet of S1 such that
B1: for x being SortSymbol of S1 holds U1.x = U1(x) from PBOOLE:sch 5;
deffunc U2(element) = {(the undefined-map of A2).$1};
consider U2 being ManySortedSet of S2 such that
B2: for x being SortSymbol of S2 holds U2.x = U2(x) from PBOOLE:sch 5;
BY: DefSorts B = (the Sorts of B)(\)U & DefSorts A2 = (the Sorts of A2)(\)U2 &
DefSorts A1 = (the Sorts of A1)(\)U1 by BZ,B1,B2,DEFS;
A3: dom U1 = the carrier of S1 & dom U2 = the carrier of S2 &
dom U = the carrier of S &
dom DefSorts A1 = the carrier of S1 & dom DefSorts A2 = the carrier of S2 &
dom DefSorts B = the carrier of S
by PARTFUN1:def 2;
A9: dom the undefined-map of A1 = the carrier of S1 &
dom the undefined-map of A2 = the carrier of S2 by PARTFUN1:def 2;
A8: the Sorts of B = (the Sorts of A1)+*the Sorts of A2 by A2,CIRCCOMB:def 4;
A6: DefSorts A1 tolerates DefSorts A2
proof
let x; assume
D0: x in (dom DefSorts A1)/\(dom DefSorts A2);
then
D1: x in the carrier of S1 & x in the carrier of S2
by A3,XBOOLE_0:def 4;
then
D2: x is SortSymbol of S1 & x is SortSymbol of S2;
then (DefSorts A1).x = (the Sorts of A1).x \ U1.x & U1.x = U1(x) &
(DefSorts A2).x = (the Sorts of A2).x \ U2.x & U2.x = U2(x) &
(the undefined-map of A1).x = (the undefined-map of A2).x &
(the Sorts of A).x = (the Sorts of A1).x &
(the Sorts of A).x = (the Sorts of A2).x
by B1,B2,A,A1,A2,A3,A8,BY,D0,
DEFS,PARTFUN1:def 4,PBOOLE:def 6,FUNCT_4:13,15;
hence (DefSorts A1).x = (DefSorts A2).x;
end;
now
thus dom DefSorts B = (the carrier of S1)\/the carrier of S2
by A3,Th190
.= dom ((DefSorts A1)+*DefSorts A2) by A3,FUNCT_4:def 1;
let x; assume
A4: x in dom DefSorts B;
then
A5: (DefSorts B).x = (the Sorts of B).x \ U.x & U.x = U(x)
by A3,BZ,BY,PBOOLE:def 6;
then x in (the carrier of S1)\/the carrier of S2 by A3,A4,Th190;
then per cases by XBOOLE_0:def 3;
suppose
C1: x in the carrier of S1;
then u.x = (the undefined-map of A1).x & U1.x = U1(x) & U.x = U(x) &
(the Sorts of A1).x = ((the Sorts of A1)+*(the Sorts of A2)).x &
(DefSorts A1).x = (the Sorts of A1).x \ U1.x &
(the Sorts of B).x = (the Sorts of A1).x
by A,A1,A2,A3,A4,A8,A9,B1,BY,BZ,FUNCT_4:15,PBOOLE:def 6;
hence (DefSorts B).x = ((DefSorts A1)+*DefSorts A2).x
by A1,A3,A5,A6,C1,FUNCT_4:15;
end;
suppose
C2: x in the carrier of S2;
u.x = (the undefined-map of A2).x & U2.x = U2(x) & U.x = U(x) &
(the Sorts of A2).x = ((the Sorts of A1)+*(the Sorts of A2)).x &
(DefSorts B).x = (the Sorts of B).x \ U.x &
(DefSorts A2).x = (the Sorts of A2).x \ U2.x &
(the Sorts of B).x = (the Sorts of A2).x
by C2,A,A1,A2,A3,A4,A8,A9,B2,BZ,BY,FUNCT_4:13,PBOOLE:def 6;
hence (DefSorts B).x = ((DefSorts A1)+*DefSorts A2).x
by C2,A1,A5,A3,FUNCT_4:13;
end;
end;
then
A7: DefSorts B = (DefSorts A1)+*DefSorts A2 by FUNCT_1:def 11;
B is with_defined_elements
proof
let s be element; assume s in the carrier of S;
then s in (the carrier of S1) \/ the carrier of S2 by Th190;
then s in the carrier of S1 or s in the carrier of S2 by XBOOLE_0:def 3;
then (DefSorts B).s = (DefSorts A1).s & s in the carrier of S1 or
(DefSorts B).s = (DefSorts A2).s & s in the carrier of S2
by A3,A6,A7,FUNCT_4:13,15;
hence (DefSorts B).s is non empty;
end; then
reconsider B as with_defined_elements strict UndefMSAlgebra over S1+*S2;
take B; thus thesis by A2,A7,CIRCCOMB:def 4;
end;
uniqueness;
end;
theorem Th216:
for B,C being non empty non void ConnectivesSignature
for A1 being with_defined_elements UndefMSAlgebra over B
for A2 being with_defined_elements UndefMSAlgebra over C
st the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2
holds DefSorts A1 tolerates DefSorts A2
proof
let S1,S2 be non empty non void ConnectivesSignature;
let A1 be with_defined_elements UndefMSAlgebra over S1;
let A2 be with_defined_elements UndefMSAlgebra over S2;
A1: dom the Sorts of A1 = the carrier of S1 &
dom the undefined-map of A1 = the carrier of S1 &
dom the undefined-map of A2 = the carrier of S2 &
dom the Sorts of A2 = the carrier of S2 by PARTFUN1:def 2;
assume Z0: the Sorts of A1 tolerates the Sorts of A2;
assume Z1: the undefined-map of A1 tolerates the undefined-map of A2;
deffunc U1(element) = {(the undefined-map of A1).$1};
consider U1 being ManySortedSet of S1 such that
B1: for x being SortSymbol of S1 holds U1.x = U1(x) from PBOOLE:sch 5;
deffunc U2(element) = {(the undefined-map of A2).$1};
consider U2 being ManySortedSet of S2 such that
B2: for x being SortSymbol of S2 holds U2.x = U2(x) from PBOOLE:sch 5;
BY: DefSorts A2 = (the Sorts of A2)(\)U2 &
DefSorts A1 = (the Sorts of A1)(\)U1 by B1,B2,DEFS;
A3: dom U1 = the carrier of S1 & dom U2 = the carrier of S2 &
dom DefSorts A1 = the carrier of S1 & dom DefSorts A2 = the carrier of S2
by PARTFUN1:def 2;
let x; assume
D0: x in (dom DefSorts A1)/\(dom DefSorts A2);
then
D1: x in the carrier of S1 & x in the carrier of S2
by A3,XBOOLE_0:def 4;
then
D2: x is SortSymbol of S1 & x is SortSymbol of S2;
then (DefSorts A1).x = (the Sorts of A1).x \ U1.x & U1.x = U1(x) &
(DefSorts A2).x = (the Sorts of A2).x \ U2.x & U2.x = U2(x) &
(the undefined-map of A1).x = (the undefined-map of A2).x &
(the Sorts of A1).x = (the Sorts of A2).x
by B1,B2,Z0,Z1,A1,A3,BY,D0,
DEFS,PARTFUN1:def 4,PBOOLE:def 6,FUNCT_4:13,15;
hence (DefSorts A1).x = (DefSorts A2).x;
end;
theorem Th217:
for B being non empty non void BoolSignature
for A1 being with_defined_elements UndefMSAlgebra over B
for C being non empty non void ConnectivesSignature
for A2 being with_defined_elements UndefMSAlgebra over C
for S being non empty non void BoolSignature
st the BoolSignature of S = B+*C &
the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2
for A being UndefMSAlgebra over S
st the UndefMSAlgebra of A = (B,A1)+*(C,A2)
holds DefSorts A = (DefSorts A1)+*(DefSorts A2)
proof
let S1 be non empty non void BoolSignature;
let A1 be with_defined_elements UndefMSAlgebra over S1;
let S2 be non empty non void ConnectivesSignature;
let A2 be with_defined_elements UndefMSAlgebra over S2;
let S be non empty non void BoolSignature;
assume ZZ: the BoolSignature of S = S1+*S2;
assume Z0: the Sorts of A1 tolerates the Sorts of A2;
assume Z1: the undefined-map of A1 tolerates the undefined-map of A2;
let A be UndefMSAlgebra over S such that
Z3: the UndefMSAlgebra of A = (S1,A1)+*(S2,A2);
A1: dom the Sorts of A1 = the carrier of S1 &
dom the undefined-map of A1 = the carrier of S1 &
dom the undefined-map of A2 = the carrier of S2 &
dom the Sorts of A2 = the carrier of S2 by PARTFUN1:def 2;
set u = the undefined-map of A;
deffunc U(element) = {u.$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
deffunc U1(element) = {(the undefined-map of A1).$1};
consider U1 being ManySortedSet of S1 such that
B1: for x being SortSymbol of S1 holds U1.x = U1(x) from PBOOLE:sch 5;
deffunc U2(element) = {(the undefined-map of A2).$1};
consider U2 being ManySortedSet of S2 such that
B2: for x being SortSymbol of S2 holds U2.x = U2(x) from PBOOLE:sch 5;
BY: DefSorts A = (the Sorts of A)(\)U & DefSorts A2 = (the Sorts of A2)(\)U2 &
DefSorts A1 = (the Sorts of A1)(\)U1 by ZZ,BZ,B1,B2,DEFS;
B3: u = (the undefined-map of A1)+*the undefined-map of A2
by ZZ,Z0,Z1,Z3,COMB2;
A3: dom U1 = the carrier of S1 & dom U2 = the carrier of S2 &
dom U = the carrier of S &
dom DefSorts A1 = the carrier of S1 & dom DefSorts A2 = the carrier of S2 &
dom DefSorts A = the carrier of S
by PARTFUN1:def 2;
A9: dom the undefined-map of A1 = the carrier of S1 &
dom the undefined-map of A2 = the carrier of S2 by PARTFUN1:def 2;
A8: the Sorts of A = (the Sorts of A1)+*the Sorts of A2 by ZZ,Z0,Z1,Z3,COMB2;
A6: DefSorts A1 tolerates DefSorts A2 by Z0,Z1,Th216;
now
thus dom DefSorts A = (the carrier of S1)\/the carrier of S2
by ZZ,Z3,A3,Th190
.= dom ((DefSorts A1)+*DefSorts A2) by A3,FUNCT_4:def 1;
let x; assume
A4: x in dom DefSorts A;
then
A5: (DefSorts A).x = (the Sorts of A).x \ U.x & U.x = U(x)
by A3,BZ,BY,PBOOLE:def 6;
then x in (the carrier of S1)\/the carrier of S2 by ZZ,A3,A4,Th190;
then per cases by XBOOLE_0:def 3;
suppose
C1: x in the carrier of S1;
then u.x = (the undefined-map of A1).x & U1.x = U1(x) & U.x = U(x) &
(the Sorts of A1).x = ((the Sorts of A1)+*(the Sorts of A2)).x &
(DefSorts A1).x = (the Sorts of A1).x \ U1.x &
(the Sorts of A).x = (the Sorts of A1).x
by B3,ZZ,Z0,Z1,Z3,A1,A3,A4,A8,A9,B1,BY,BZ,FUNCT_4:15,PBOOLE:def 6;
hence (DefSorts A).x = ((DefSorts A1)+*DefSorts A2).x
by A1,A3,A5,A6,C1,ZZ,Z3,FUNCT_4:15;
end;
suppose
C2: x in the carrier of S2;
then u.x = (the undefined-map of A2).x & U2.x = U2(x) & U.x = U(x) &
(the Sorts of A2).x = ((the Sorts of A1)+*(the Sorts of A2)).x &
(DefSorts A).x = (the Sorts of A).x \ U.x &
(DefSorts A2).x = (the Sorts of A2).x \ U2.x &
(the Sorts of A).x = (the Sorts of A2).x
by B3,Z0,Z1,A1,A3,A4,A8,A9,B2,BZ,BY,FUNCT_4:13,PBOOLE:def 6;
hence (DefSorts A).x = ((DefSorts A1)+*DefSorts A2).x
by C2,A1,A5,A3,FUNCT_4:13;
end;
end;
hence DefSorts A = (DefSorts A1)+*DefSorts A2 by FUNCT_1:def 11;
end;
theorem Th208:
for B being non empty non void BoolSignature
for A1 being limited-by-undefined with_defined_elements
UndefMSAlgebra over B
for C being non empty non void ConnectivesSignature
for A2 being limited-by-undefined with_defined_elements
UndefMSAlgebra over C
for S being non empty non void BoolSignature
st the BoolSignature of S = B+*C &
the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2
for A being UndefMSAlgebra over S
st the UndefMSAlgebra of A = (B,A1)+*(C,A2)
holds A is limited-by-undefined
proof
let B be non empty non void BoolSignature;
let A1 be limited-by-undefined with_defined_elements
UndefMSAlgebra over B;
let C be non empty non void ConnectivesSignature;
let A2 be limited-by-undefined with_defined_elements
UndefMSAlgebra over C;
let S be non empty non void BoolSignature;
assume
A1: the BoolSignature of S = B+*C &
the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2;
let A be UndefMSAlgebra over S;
assume
A2: the UndefMSAlgebra of A = (B,A1)+*(C,A2);
A9: the undefined-map of A = (the undefined-map of A1)+*the undefined-map of A2
by A1,A2,COMB2;
let a be element;
assume
A3: a in the carrier of S;
A4: DefSorts A = (DefSorts A1)+*DefSorts A2 by A1,A2,Th217;
A7: DefSorts A1 c= the undefined-map of A1 by LBU;
A8: DefSorts A2 c= the undefined-map of A2 by LBU;
B3: the carrier of S = (the carrier of B)\/the carrier of C by A1,Th190;
per cases;
suppose
B1: a in the carrier of C;
then
A5: a in dom the undefined-map of A2 &
a in dom DefSorts A2 by PARTFUN1:def 2;
then (the undefined-map of A).a = (the undefined-map of A2).a
by A9,FUNCT_4:13;
then (DefSorts A2).a c= (the undefined-map of A).a by B1,A8,PBOOLE:def 2;
hence (DefSorts A).a c= (the undefined-map of A).a by A4,A5,FUNCT_4:13;
end;
suppose
B1: a nin the carrier of C;
then
B2: a in the carrier of B by B3,A3,XBOOLE_0:def 3;
A5: a nin dom the undefined-map of A2 &
a nin dom DefSorts A2 by B1,PARTFUN1:def 2;
then (the undefined-map of A).a = (the undefined-map of A1).a
by A9,FUNCT_4:11;
then (DefSorts A1).a c= (the undefined-map of A).a by B2,A7,PBOOLE:def 2;
hence (DefSorts A).a c= (the undefined-map of A).a by A5,A4,A7,FUNCT_4:11;
end;
end;
theorem Th205:
for B being bool-correct non empty non void BoolSignature
for A1 being bool-correct with_defined_elements UndefMSAlgebra over B
for C being non empty non void ConnectivesSignature
st the carrier' of B misses the carrier' of C
for A2 being with_defined_elements UndefMSAlgebra over C
st the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2
holds (B,A1)+*(C,A2) is bool-correct
proof
let B be bool-correct non empty non void BoolSignature;
let A1 be bool-correct with_defined_elements UndefMSAlgebra over B;
let C be non empty non void ConnectivesSignature;
assume Z0: the carrier' of B misses the carrier' of C;
let A2 be with_defined_elements UndefMSAlgebra over C;
assume Z1: the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2;
set S = B+*C qua strict BoolSignature;
set A = (B,A1)+*(C,A2);
A1: (DefSorts A1).the bool-sort of B = BOOLEAN &
Den(In((the connectives of B).1, the carrier' of B), A1).{} = TRUE &
for x,y be boolean set holds
Den(In((the connectives of B).2, the carrier' of B), A1).<*x*> = 'not' x &
Den(In((the connectives of B).3, the carrier' of B), A1).<*x,y*> = x '&' y
by BOOL2;
A2: dom the Sorts of A1 = the carrier of B by PARTFUN1:def 2;
A3: the Sorts of A = (the Sorts of A1)+*the Sorts of A2 &
the Charact of A = (the Charact of A1)+*the Charact of A2
by Z1,COMB2;
DefSorts A = (DefSorts A1)+*DefSorts A2 &
DefSorts A1 tolerates DefSorts A2 & dom DefSorts A1 = the carrier of B &
the bool-sort of S = the bool-sort of B
by Z1,Th216,Th217,COMB,PARTFUN1:def 2;
hence (DefSorts A).the bool-sort of S = (DefSorts A1).the bool-sort of B
by Z1,A1,A2,A3,FUNCT_4:15 .= BOOLEAN by BOOL2;
A5: the connectives of S = (the connectives of B)^the connectives of C by COMB;
A4: len the connectives of B >= 3 by CORRECT; then
len the connectives of B >= 2 & len the connectives of B >= 1
by XXREAL_0:2; then
A6: 1 in dom the connectives of B & 2 in dom the connectives of B &
3 in dom the connectives of B by A4,FINSEQ_3:25;
As: dom the connectives of B c= dom the connectives of S
by A5,FINSEQ_1:26;
A8: dom the Charact of A1 = the carrier' of B &
dom the Charact of A2 = the carrier' of C by PARTFUN1:def 2;
A9: (the connectives of S).1 in the carrier' of S &
(the connectives of S).2 in the carrier' of S &
(the connectives of S).3 in the carrier' of S &
(the connectives of B).1 in the carrier' of B &
(the connectives of B).2 in the carrier' of B &
(the connectives of B).3 in the carrier' of B by As,A6,FUNCT_1:102;
AA: (the connectives of S).1
= In((the connectives of S).1, the carrier' of S) &
(the connectives of S).2
= In((the connectives of S).2, the carrier' of S) &
(the connectives of S).3
= In((the connectives of S).3, the carrier' of S) &
(the connectives of B).1
= In((the connectives of B).1, the carrier' of B) &
(the connectives of B).2
= In((the connectives of B).2, the carrier' of B) &
(the connectives of B).3
= In((the connectives of B).3, the carrier' of B)
by SUBSET_1:def 8,As,A6,FUNCT_1:102;
(the connectives of S).1 = (the connectives of B).1 &
(the connectives of S).2 = (the connectives of B).2 &
(the connectives of S).3 = (the connectives of B).3
by A5,A6,FINSEQ_1:def 7; then
(the connectives of S).1
= In((the connectives of B).1, the carrier' of B) &
(the connectives of S).2
= In((the connectives of B).2, the carrier' of B) &
(the connectives of S).3
= In((the connectives of B).3, the carrier' of B)
by As,A6,FUNCT_1:102,SUBSET_1:def 8; then
In((the connectives of S).1, the carrier' of S)
= In((the connectives of B).1, the carrier' of B) &
In((the connectives of S).2, the carrier' of S)
= In((the connectives of B).2, the carrier' of B) &
In((the connectives of S).3, the carrier' of S)
= In((the connectives of B).3, the carrier' of B)
by A6,A9,SUBSET_1:def 8; then
Den(In((the connectives of S).1, the carrier' of S),A)
= Den(In((the connectives of B).1, the carrier' of B),A1) &
Den(In((the connectives of S).2, the carrier' of S),A)
= Den(In((the connectives of B).2, the carrier' of B),A1) &
Den(In((the connectives of S).3, the carrier' of S),A)
= Den(In((the connectives of B).3, the carrier' of B),A1)
by Z0,A3,A8,AA,FUNCT_4:16;
hence
Den(In((the connectives of S).1, the carrier' of S), A).{} = TRUE &
for x,y be boolean set holds
Den(In((the connectives of S).2, the carrier' of S), A).<*x*> = 'not' x &
Den(In((the connectives of S).3, the carrier' of S), A).<*x,y*> = x '&' y
by BOOL2;
end;
theorem Th206:
for n being Nat, I being set st n >= 4
for B being bool-correct non empty non void BoolSignature
st B is (n,I) integer
for A1 being bool-correct with_defined_elements UndefMSAlgebra over B
st A1 is (n,I) integer
for C being non empty non void ConnectivesSignature
st the carrier' of B misses the carrier' of C
for A2 being with_defined_elements UndefMSAlgebra over C
st the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2
for S being bool-correct non empty non void BoolSignature
st the BoolSignature of S = B+*C
for A being bool-correct with_defined_elements UndefMSAlgebra over S
st the UndefMSAlgebra of A = (B,A1)+*(C,A2)
holds A is (n,I) integer &
(A1 is n,I with_undefined_division_by_0 implies
A is n,I with_undefined_division_by_0)
proof
let n be Nat, s be set such that
ZZ: n >= 4;
let B be bool-correct non empty non void BoolSignature;
assume Z2: B is (n,s) integer;
let A1 be bool-correct with_defined_elements UndefMSAlgebra over B;
given I being SortSymbol of B such that
Z3: I = s &
(the connectives of B).n is_of_type {},I & (DefSorts A1).I = INT &
Den(In((the connectives of B).n, the carrier' of B), A1).{} = 0 &
Den(In((the connectives of B).(n+1), the carrier' of B), A1).{} = 1 &
for i,j being Integer holds
Den(In((the connectives of B).(n+2), the carrier' of B), A1).<*i*> = -i &
Den(In((the connectives of B).(n+3), the carrier' of B), A1).<*i,j*>
= i+j &
Den(In((the connectives of B).(n+4), the carrier' of B), A1).<*i,j*>
= i*j &
(j <> 0 implies
Den(In((the connectives of B).(n+5), the carrier' of B), A1).<*i,j*>
= i div j) &
Den(In((the connectives of B).(n+6), the carrier' of B), A1).<*i,j*>
= IFGT(i,j,FALSE,TRUE);
let C be non empty non void ConnectivesSignature;
assume
Z0: the carrier' of B misses the carrier' of C;
let A2 be with_defined_elements UndefMSAlgebra over C;
assume
Z1: the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2;
let S be bool-correct non empty non void BoolSignature;
assume
Z4: the BoolSignature of S = B+*C;
let A be bool-correct with_defined_elements UndefMSAlgebra over S;
assume
Z5: the UndefMSAlgebra of A = (B,A1)+*(C,A2);
A2: dom the Sorts of A1 = the carrier of B & dom DefSorts A1 = the carrier of B
by PARTFUN1:def 2;
A3: the Sorts of A = (the Sorts of A1)+*the Sorts of A2 &
the Charact of A = (the Charact of A1)+*the Charact of A2 &
the undefined-map of A = (the undefined-map of A1)+*the undefined-map of A2
by Z1,Z5,COMB2;
A6: len the connectives of B >= n+6 & n <= n+6 by Z2,INT1,NAT_1:12;
then 1 <= n & n <= len the connectives of B by ZZ,XXREAL_0:2;
then
A8: n in dom the connectives of B &
the connectives of S = (the connectives of B)^the connectives of C
by Z4,COMB,FINSEQ_3:25;
then
A4: (the connectives of S).n = (the connectives of B).n &
(the connectives of B).n in the carrier' of B
by FUNCT_1:102,FINSEQ_1:def 7;
Lm: now
let i be Nat;
assume i >= 4 & i <= n+6;
then 1 <= i & i <= len the connectives of B by A6,XXREAL_0:2;
then
L0: i in dom the connectives of B by FINSEQ_3:25;
then
L1: (the connectives of B).i in the carrier' of B &
(the connectives of B).i = (the connectives of S).i
by A8,FUNCT_1:102,FINSEQ_1:def 7;
the carrier' of S = (the carrier' of B)\/the carrier' of C
by Z4,Th190;
then (the connectives of S).i in the carrier' of S by L1,XBOOLE_0:def 3;
then
L2: In((the connectives of B).i, the carrier' of B) =
(the connectives of B).i &
In((the connectives of S).i, the carrier' of S) =
(the connectives of S).i by L0,FUNCT_1:102,SUBSET_1:def 8;
dom the Charact of A1 = the carrier' of B &
dom the Charact of A2 = the carrier' of C by PARTFUN1:def 2;
hence Den(In((the connectives of S).i, the carrier' of S), A)
= Den(In((the connectives of B).i, the carrier' of B), A1)
by A3,L1,L2,Z0,FUNCT_4:16;
end;
CC: DefSorts A = DefSorts (B,A1)+*(C,A2) = (DefSorts A1)+*DefSorts A2 &
DefSorts A1 tolerates DefSorts A2 by Z1,Z4,Z5,Th216,Th217,Th218;
thus A is (n,s) integer
proof
the carrier of S = (the carrier of B)\/the carrier of C by Z4,Th190; then
reconsider I as SortSymbol of S by XBOOLE_0:def 3;
take I; thus I = s by Z3;
A5: dom the ResultSort of B = the carrier' of B &
dom the ResultSort of C = the carrier' of C &
dom the Arity of B = the carrier' of B &
dom the Arity of C = the carrier' of C by FUNCT_2:def 1;
the ResultSort of S = (the ResultSort of B)+*the ResultSort of C &
the Arity of S = (the Arity of B)+*the Arity of C by Z4,Th190;
then (the ResultSort of S).((the connectives of S).n) =
(the ResultSort of B).((the connectives of B).n) &
(the Arity of S).((the connectives of S).n) =
(the Arity of B).((the connectives of B).n) by Z0,A4,A5,FUNCT_4:16;
hence (the Arity of S).((the connectives of S).n) = {} &
(the ResultSort of S).((the connectives of S).n) = I by Z3,TYPEOF;
the ManySortedSign of S = the ManySortedSign of B+*C by Z4;
then
CC: DefSorts A = DefSorts (B,A1)+*(C,A2) = (DefSorts A1)+*DefSorts A2 &
DefSorts A1 tolerates DefSorts A2 by Z1,Z4,Z5,Th216,Th217,Th218;
hence (DefSorts A).I = (DefSorts A1).I by A2,A3,Z3,Z1,FUNCT_4:15
.= INT by INT2,Z3;
n <= n+6 by NAT_1:11;
hence Den(In((the connectives of S).n, the carrier' of S), A).{} = 0
by ZZ,Z3,Lm;
n+1 >= 4 & n+1 <= n+6 by ZZ,NAT_1:12,XREAL_1:6;
hence Den(In((the connectives of S).(n+1), the carrier' of S), A).{} = 1
by Z3,Lm;
let i,j be Integer;
n+2 >= 4 & n+2 <= n+6 by ZZ,NAT_1:12,XREAL_1:6;
hence Den(In((the connectives of S).(n+2), the carrier' of S), A).<*i*>
= Den(In((the connectives of B).(n+2), the carrier' of B), A1).<*i*> by Lm
.= -i by Z3;
n+3 >= 4 & n+3 <= n+6 by ZZ,NAT_1:12,XREAL_1:6;
hence Den(In((the connectives of S).(n+3), the carrier' of S), A).<*i,j*>
= Den(In((the connectives of B).(n+3), the carrier' of B), A1).<*i,j*>
by Lm
.= i+j by Z3;
n+4 >= 4 & n+4 <= n+6 by NAT_1:12,XREAL_1:6;
hence Den(In((the connectives of S).(n+4), the carrier' of S), A).<*i,j*>
= Den(In((the connectives of B).(n+4), the carrier' of B), A1).<*i,j*>
by Lm
.= i*j by Z3;
hereby assume
A7: j <> 0;
n+5 >= 4 & n+5 <= n+6 by NAT_1:12,XREAL_1:6;
hence Den(In((the connectives of S).(n+5), the carrier' of S), A).<*i,j*>
= Den(In((the connectives of B).(n+5), the carrier' of B), A1).<*i,j*>
by Lm
.= i div j by A7,Z3;
end;
n+6 >= 4 by NAT_1:12;
hence Den(In((the connectives of S).(n+6), the carrier' of S), A).<*i,j*>
= Den(In((the connectives of B).(n+6), the carrier' of B), A1).<*i,j*>
by Lm
.= IFGT(i,j,FALSE,TRUE) by Z3;
end;
assume
C0: for J being SortSymbol of B st s = J
for a being defined Element of (the Sorts of A1).J
holds Den(In((the connectives of B).(n+5), the carrier' of B),A1).
<*a, Den(In((the connectives of B).n, the carrier' of B),A1).{}*> =
(the undefined-map of A1).J;
::A1 is n,s with_undefined_division_by_0;
let J be SortSymbol of S such that
C1: s = J;
let a be defined Element of (the Sorts of A).J;
dom DefSorts A1 = the carrier of B by PARTFUN1:def 2;
then a in (DefSorts A).J = (DefSorts A1).I c= (the Sorts of A1).I
by C1,Z3,CC,DEF1,FUNCT_4:15,PBOOLE:def 2,def 18;
then reconsider c = a as defined Element of A1,I by DEF1;
C2: 4 <= 4+(n+1) & n+5 <= n+5+1 by NAT_1:11;
C3: dom the undefined-map of A1 = the carrier of B by PARTFUN1:def 2;
n <= n+6 by NAT_1:11;
hence Den(In((the connectives of S).(n+5), the carrier' of S),A).
<*a, Den(In((the connectives of S).n, the carrier' of S),A).{}*>
= Den(In((the connectives of S).(n+5), the carrier' of S),A).
<*a, Den(In((the connectives of B).n, the carrier' of B),A1).{}*>
by ZZ,Lm
.= Den(In((the connectives of B).(n+5), the carrier' of B),A1).
<*c, Den(In((the connectives of B).n, the carrier' of B),A1).{}*>
by C2,Lm
.= (the undefined-map of A1).I by C0,Z3
.= (the undefined-map of A).J by A3,C1,C3,Z1,Z3,FUNCT_4:15;
end;
theorem Th206a:
for n,m being Nat, s,r being set st n >= 1
for B being m-connectives non empty non void BoolSignature
for A1 being with_defined_elements UndefMSAlgebra over B
for C being non empty non void ConnectivesSignature
st the carrier' of B misses the carrier' of C & C is (n,s,r)-array
for A2 being with_defined_elements UndefMSAlgebra over C
st the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2 &
A2 is (n,s,r)-array
for S being non empty non void BoolSignature
st the BoolSignature of S = B+*C
for A being with_defined_elements UndefMSAlgebra over S
st the UndefMSAlgebra of A = (B,A1)+*(C,A2) holds A is (m+n,s,r)-array &
(B tolerates C & the Charact of A1 tolerates the Charact of A2 &
A1 is undef-consequent & A2 is undef-consequent
implies A is undef-consequent)
proof
let n,m be Nat;
let s,r be set;
assume
Z0: n >= 1;
let B be m-connectives non empty non void BoolSignature;
let A1 be with_defined_elements UndefMSAlgebra over B;
let C be non empty non void ConnectivesSignature;
assume the carrier' of B misses the carrier' of C;
assume
Z2: C is (n,s,r)-array;
then
A0: len the connectives of C >= n+3 &
ex J,K,L being Element of C st L = s & K = r & J <> L & J <> K &
(the connectives of C).n is_of_type <*J,K*>, L &
(the connectives of C).(n+1) is_of_type <*J,K,L*>, J &
(the connectives of C).(n+2) is_of_type <*J*>, K &
(the connectives of C).(n+3) is_of_type <*K,L*>, J by ARRAY1;
let A2 be with_defined_elements UndefMSAlgebra over C;
assume
Z3: the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2;
given J,K being Element of C such that
Z4: K = s &
(the connectives of C).n is_of_type <*J,r*>, K &
(DefSorts A2).J = ((DefSorts A2).K)^omega &
(DefSorts A2).r = INT &
(for a being 0-based finite array of (DefSorts A2).K holds
(for i being Integer st i in dom a holds
Den((the connectives of C)/.n,A2).<*a,i*> = a.i &
for x being defined Element of A2,K holds
Den((the connectives of C)/.(n+1),A2).<*a,i,x*> = a+*(i,x)) &
Den((the connectives of C)/.(n+2),A2).<*a*> = card a) &
for i being Integer, x being defined Element of A2,K st i >= 0
holds Den((the connectives of C)/.(n+3),A2).<*i,x*> = i-->x;
let S be non empty non void BoolSignature;
assume Z5: the BoolSignature of S = B+*C;
set k = K;
the carrier of S = (the carrier of B)\/the carrier of C by Z5,Th190;
then reconsider J,K as Element of S by XBOOLE_0:def 3;
reconsider k0 = K as Element of B+*C by Z5;
let A be with_defined_elements UndefMSAlgebra over S;
assume
Z6: the UndefMSAlgebra of A = (B,A1)+*(C,A2);
the ManySortedSign of S = the ManySortedSign of B+*C by Z5;
then
AX: DefSorts A = DefSorts (B,A1)+*(C,A2) = (DefSorts A1)+*DefSorts A2
by Z3,Z6,Th217,Th218;
hereby
take J,K; thus K = s by Z4;
AB: len the connectives of B = m by CONN;
AA: the connectives of S = (the connectives of B)^the connectives of C
by Z5,COMB;
A2: dom the Sorts of A2 = the carrier of C by PARTFUN1:def 2;
INT <> {}; then
A3: r in dom DefSorts A2 = the carrier of C
by A0,Z4,FUNCT_1:def 2,PARTFUN1:def 2;
then reconsider R = r as Element of C by A2,Z4,FUNCT_1:def 2;
A5: the Arity of S = (the Arity of B)+*the Arity of C by Z5,Th190;
0+1=1;
then n > 0 by Z0,NAT_1:13;
then
Ab: B+*C is (m+n,s,r)-array by Z2,Th202;
then
A4: len the connectives of B+*C >= m+n+3 by ARRAY1;
consider J0,K0,L0 being Element of B+*C such that
Aa: L0 = s & K0 = r & J0 <> L0 & J0 <> K0 &
(the connectives of B+*C).(m+n) is_of_type <*J0,K0*>, L0 &
(the connectives of B+*C).(m+n+1) is_of_type <*J0,K0,L0*>, J0 and
(the connectives of B+*C).(m+n+2) is_of_type <*J0*>, K0 &
(the connectives of B+*C).(m+n+3) is_of_type <*K0,L0*>, J0 by Ab,ARRAY1;
A7: the Sorts of A = (the Sorts of A1)+*the Sorts of A2 &
the Charact of A = (the Charact of A1)+*the Charact of A2
by Z3,Z6,COMB2;
m+n <= m+n+3 & n <= n+3 by NAT_1:11;
then 1 <= m+n & m+n <= len the connectives of S &
1 <= n & n <= len the connectives of C
by Z0,Z5,A0,A4,NAT_1:12,XXREAL_0:2;
then
A9: m+n in dom the connectives of S & n in dom the connectives of C &
dom the Sorts of A2 = the carrier of C &
dom the Arity of C = the carrier' of C
by PARTFUN1:def 2,FINSEQ_3:25,FUNCT_2:def 1;
then
A8: (the connectives of S)/.(m+n) = (the connectives of S).(m+n) &
(the connectives of C)/.n = (the connectives of C).n &
(the connectives of C).n = (the connectives of S).(m+n)
by AA,AB,PARTFUN1:def 6,FINSEQ_1:def 7;
(the Arity of S).((the connectives of S).(m+n))
= (the Arity of C).((the connectives of C).n) by A5,A8,A9,FUNCT_4:13;
then <*J0,r*> = (the Arity of C).((the connectives of C).n) by Z5,Aa,TYPEOF
.= <*J,r*> by Z4,TYPEOF;
then J0 = <*J,r*>.1 by FINSEQ_1:44 .= J by FINSEQ_1:44;
then (the connectives of B+*C).(m+n) is_of_type <*J,r*>, k0 &
the ManySortedSign of S = the ManySortedSign of B+*C by Z5,Aa,Z4;
hence (the connectives of S).(m+n) is_of_type <*J,r*>, K by Z5,Th77;
DefSorts A = (DefSorts A1)+*DefSorts A2 &
dom DefSorts A1 = the carrier of B & dom DefSorts A2 = the carrier of C
by AX,PARTFUN1:def 2;
then (DefSorts A).K = (DefSorts A2).K &
(DefSorts A).r = (DefSorts A2).r &
(DefSorts A).J = (DefSorts A2).J by A2,A3,A7,FUNCT_4:13;
hence (DefSorts A).J = ((DefSorts A).K)^omega & (DefSorts A).r = INT by Z4;
hereby
let a be 0-based finite array of (DefSorts A).K;
hereby
let i be Integer; assume
B1: i in dom a;
(the connectives of C).n in the carrier' of C &
dom the Charact of A2 = the carrier' of C &
dom DefSorts A2 = the carrier of C &
DefSorts A = (DefSorts A1)+*DefSorts A2
by A8,AX,PARTFUN1:def 2;
then (the Charact of A2).((the connectives of C)/.n)
= (the Charact of A).((the connectives of S)/.(m+n)) &
(DefSorts A2).s = (DefSorts A).s
by Z4,A7,A8,FUNCT_4:13;
hence Den((the connectives of S)/.(m+n),A).<*a,i*> = a.i by B1,Z4;
let x be defined Element of A,K;
m+n+1 <= m+n+1+2 & n+1 <= n+1+2 by NAT_1:11;
then 1 <= m+n+1 & m+n+1 <= len the connectives of S &
1 <= n+1 & n+1 <= len the connectives of C
by Z5,A0,A4,NAT_1:12,XXREAL_0:2;
then
A9: m+n+1 in dom the connectives of S & n+1 in dom the connectives of C &
dom the Sorts of A2 = the carrier of C
by PARTFUN1:def 2,FINSEQ_3:25;
A8: (the connectives of S)/.(m+n+1) = (the connectives of S).(m+n+1) &
(the connectives of C)/.(n+1) = (the connectives of C).(n+1) &
(the connectives of C).(n+1) = (the connectives of S).(m+(n+1))
by AA,AB,A9,PARTFUN1:def 6,FINSEQ_1:def 7;
then (the connectives of C).(n+1) in the carrier' of C &
dom the Charact of A2 = the carrier' of C & m+(n+1) = m+n+1 &
dom DefSorts A2 = the carrier of C &
DefSorts A = (DefSorts A1)+*DefSorts A2
by AX,PARTFUN1:def 2;
then
BB: (the Charact of A2).((the connectives of C)/.(n+1))
= (the Charact of A).((the connectives of S)/.(m+n+1)) &
(DefSorts A2).k = (DefSorts A).k0
by A7,A8,FUNCT_4:13;
then x in (DefSorts A2).k c= (the Sorts of A2).k
by DEF1,PBOOLE:def 2,def 18;
then x is defined Element of A2,k by DEF1;
hence Den((the connectives of S)/.(m+n+1),A).<*a,i,x*> = a+*(i,x)
by Z4,B1,BB;
end;
m+n+2 <= m+n+2+1 & m+n+3 <= len the connectives of S &
n+2+1 >= n+2 & n+3 <= len the connectives of C
by Ab,Z2,Z5,ARRAY1,NAT_1:11;
then 1 <= m+n+2 & m+n+2 <= len the connectives of S &
1 <= n+2 & n+2 <= len the connectives of C by XXREAL_0:2,NAT_1:12;
then
A9: m+n+2 in dom the connectives of S & n+2 in dom the connectives of C &
dom the Sorts of A2 = the carrier of C
by PARTFUN1:def 2,FINSEQ_3:25;
A8: (the connectives of S)/.(m+n+2) = (the connectives of S).(m+n+2) &
(the connectives of C)/.(n+2) = (the connectives of C).(n+2) &
(the connectives of C).(n+2) = (the connectives of S).(m+(n+2))
by AA,AB,A9,PARTFUN1:def 6,FINSEQ_1:def 7;
then (the connectives of C).(n+2) in the carrier' of C &
dom the Charact of A2 = the carrier' of C & m+(n+2) = m+n+2 &
dom DefSorts A2 = the carrier of C &
DefSorts A = (DefSorts A1)+*DefSorts A2
by AX,PARTFUN1:def 2;
then (the Charact of A2).((the connectives of C)/.(n+2))
= (the Charact of A).((the connectives of S)/.(m+n+2)) &
(DefSorts A2).k = (DefSorts A).k0
by A7,A8,FUNCT_4:13;
hence Den((the connectives of S)/.(m+n+2),A).<*a*> = card a by Z4;
end;
let i be Integer;
let x be defined Element of A,K;
assume Z8: i >= 0;
1 <= m+n+3 & m+n+3 <= len the connectives of S &
1 <= n+3 & n+3 <= len the connectives of C
by Z2,Z5,Ab,ARRAY1,NAT_1:12;
then
A9: m+n+3 in dom the connectives of S & n+3 in dom the connectives of C &
dom the Sorts of A2 = the carrier of C
by PARTFUN1:def 2,FINSEQ_3:25;
A8: (the connectives of S)/.(m+n+3) = (the connectives of S).(m+n+3) &
(the connectives of C)/.(n+3) = (the connectives of C).(n+3) &
(the connectives of C).(n+3) = (the connectives of S).(m+(n+3))
by AA,AB,A9,PARTFUN1:def 6,FINSEQ_1:def 7;
then (the connectives of C).(n+3) in the carrier' of C &
dom the Charact of A2 = the carrier' of C & m+(n+3) = m+n+3 &
dom DefSorts A2 = the carrier of C &
DefSorts A = (DefSorts A1)+*DefSorts A2
by AX,PARTFUN1:def 2;
then
BB: (the Charact of A2).((the connectives of C)/.(n+3))
= (the Charact of A).((the connectives of S)/.(m+n+3)) &
(DefSorts A2).k = (DefSorts A).k0
by A7,A8,FUNCT_4:13;
then x in (DefSorts A2).k c= (the Sorts of A2).k
by DEF1,PBOOLE:def 2,def 18;
then x is defined Element of A2,k by DEF1;
hence Den((the connectives of S)/.(m+n+3),A).<*i,x*> = i-->x
by BB,Z4,Z6,Z8;
end;
hereby assume that
A0: B tolerates C and
AA: the Charact of A1 tolerates the Charact of A2 and
A1: A1 is undef-consequent & A2 is undef-consequent;
thus A is undef-consequent
proof
let o be OperSymbol of S;
let p be FinSequence such that
A2: p in Args(o, A);
given i being Nat, s being SortSymbol of S,a being Element of A,s such
that
A3: i in dom the_arity_of o & s = (the_arity_of o).i &
a = p.i & a is undefined;
let b be Element of A, the_result_sort_of o; assume
A4: b = Den(o,A).p;
A7: the Sorts of A = (the Sorts of A1)+*the Sorts of A2 &
the Charact of A = (the Charact of A1)+*the Charact of A2 &
the undefined-map of A = (the undefined-map of A1)+*
the undefined-map of A2 by Z3,Z6,COMB2;
the carrier' of S = (the carrier' of B)\/the carrier' of C by Z5,Th190;
then per cases by XBOOLE_0:def 3;
suppose o in the carrier' of C;
then reconsider o9 = o as OperSymbol of C;
AA7: the ManySortedSign of S = B+*(C qua non empty ManySortedSign)
by Z5,COMB;
then reconsider o1 = o as OperSymbol of
B+*(C qua non void non empty ManySortedSign);
A8: the_arity_of o9 = the_arity_of o1 by CIRCCOMB:14
.= the_arity_of o by AA7;
A8a: the_result_sort_of o9 = the_result_sort_of o1 by CIRCCOMB:14
.= the_result_sort_of o by AA7;
B0: dom the Sorts of A = the carrier of S &
dom the Sorts of A2 = the carrier of C &
dom the Charact of A = the carrier' of S &
dom the Charact of A2 = the carrier' of C &
dom the undefined-map of A = the carrier of S &
dom the undefined-map of A2 = the carrier of C &
rng the_arity_of o c= the carrier of S &
rng the_arity_of o9 c= the carrier of C
by PARTFUN1:def 2,FINSEQ_1:def 4;
A9: (the Sorts of A)*the_arity_of o = (the Sorts of A2)*the_arity_of o9
proof
B1: dom((the Sorts of A)*the_arity_of o) = dom the_arity_of o &
dom((the Sorts of A2)*the_arity_of o9) = dom the_arity_of o
by B0,A8,RELAT_1:27;
hence dom((the Sorts of A)*the_arity_of o) =
dom((the Sorts of A2)*the_arity_of o9);
let x; assume
B2: x in dom((the Sorts of A)*the_arity_of o);
then (the_arity_of o9).x in rng the_arity_of o9
by A8,B1,FUNCT_1:def 3;
then (the Sorts of A).((the_arity_of o).x)
= (the Sorts of A2).((the_arity_of o9).x) by A7,A8,B0,FUNCT_4:13;
hence ((the Sorts of A)*the_arity_of o).x
= (the Sorts of A2).((the_arity_of o9).x) by B1,B2,FUNCT_1:13
.= ((the Sorts of A2)*the_arity_of o9).x by A8,B1,B2,FUNCT_1:13;
end;
A5: Args(o9,A2) = product ((the Sorts of A2)*the_arity_of o9)
by PRALG_2:3
.= product ((the Sorts of A)*the_arity_of o) by A9
.= Args(o,A) by PRALG_2:3;
A6: Den(o,A) = Den(o9,A2) by B0,A7,FUNCT_4:13;
s in rng the_arity_of o9 by A3,A8,FUNCT_1:def 3;
then reconsider s9 = s as SortSymbol of C by B0;
(the Sorts of A).s9 = (the Sorts of A2).s9 by B0,A7,FUNCT_4:13;
then reconsider c = a as Element of A2,s9;
(the Sorts of A).the_result_sort_of o9
= (the Sorts of A2).the_result_sort_of o9 by B0,A7,FUNCT_4:13;
then reconsider d = b as Element of A2, the_result_sort_of o9 by A8a;
a = (the undefined-map of A).s by A3,UNDEF
.= (the undefined-map of A2).s9 by B0,A7,FUNCT_4:13;
then c is undefined by UNDEF;
then d is undefined by A1,A2,A3,A4,A5,A6,A8,UDCNS;
then d = (the undefined-map of A2).the_result_sort_of o by A8a,UNDEF;
hence b = (the undefined-map of A).the_result_sort_of o
by A7,B0,A8a,FUNCT_4:13;
end;
suppose o in the carrier' of B;
then reconsider o9 = o as OperSymbol of B;
AA7: the ManySortedSign of S = B+*(C qua non empty ManySortedSign)
by Z5,COMB;
then reconsider o1 = o as OperSymbol of
B+*(C qua non void non empty ManySortedSign);
A8: the_arity_of o9 = the_arity_of o1 by A0,CIRCCOMB:16
.= the_arity_of o by AA7;
A8a: the_result_sort_of o9 = the_result_sort_of o1 by A0,CIRCCOMB:16
.= the_result_sort_of o by AA7;
B0: dom the Sorts of A = the carrier of S &
dom the Sorts of A1 = the carrier of B &
dom the Charact of A = the carrier' of S &
dom the Charact of A1 = the carrier' of B &
dom the undefined-map of A = the carrier of S &
dom the undefined-map of A1 = the carrier of B &
rng the_arity_of o c= the carrier of S &
rng the_arity_of o9 c= the carrier of B
by PARTFUN1:def 2,FINSEQ_1:def 4;
A9: (the Sorts of A)*the_arity_of o = (the Sorts of A1)*the_arity_of o9
proof
B1: dom((the Sorts of A)*the_arity_of o) = dom the_arity_of o &
dom((the Sorts of A1)*the_arity_of o9) = dom the_arity_of o
by B0,A8,RELAT_1:27;
hence dom((the Sorts of A)*the_arity_of o) =
dom((the Sorts of A1)*the_arity_of o9);
let x; assume
B2: x in dom((the Sorts of A)*the_arity_of o);
then (the_arity_of o9).x in rng the_arity_of o9
by A8,B1,FUNCT_1:def 3;
then (the Sorts of A).((the_arity_of o).x)
= (the Sorts of A1).((the_arity_of o9).x)
by Z3,A7,A8,B0,FUNCT_4:15;
hence ((the Sorts of A)*the_arity_of o).x
= (the Sorts of A1).((the_arity_of o9).x) by B1,B2,FUNCT_1:13
.= ((the Sorts of A1)*the_arity_of o9).x by A8,B1,B2,FUNCT_1:13;
end;
A5: Args(o9,A1) = product ((the Sorts of A1)*the_arity_of o9)
by PRALG_2:3
.= product ((the Sorts of A)*the_arity_of o) by A9
.= Args(o,A) by PRALG_2:3;
A6: Den(o,A) = Den(o9,A1) by AA,B0,A7,FUNCT_4:15;
s in rng the_arity_of o9 by A3,A8,FUNCT_1:def 3;
then reconsider s9 = s as SortSymbol of B by B0;
(the Sorts of A).s9 = (the Sorts of A1).s9 by Z3,B0,A7,FUNCT_4:15;
then reconsider c = a as Element of A1,s9;
(the Sorts of A).the_result_sort_of o9
= (the Sorts of A1).the_result_sort_of o9 by Z3,B0,A7,FUNCT_4:15;
then reconsider d = b as Element of A1, the_result_sort_of o9 by A8a;
a = (the undefined-map of A).s by A3,UNDEF
.= (the undefined-map of A1).s9 by Z3,B0,A7,FUNCT_4:15;
then c is undefined by UNDEF;
then d is undefined by A1,A2,A3,A4,A5,A6,A8,UDCNS;
then d = (the undefined-map of A1).the_result_sort_of o by A8a,UNDEF;
hence b = (the undefined-map of A).the_result_sort_of o
by Z3,A7,B0,A8a,FUNCT_4:15;
end;
end;
end;
end;
theorem Th206b:
for n,n1,m being Nat, r being set st n >= 1 & n1 >= 4
for B being bool-correct non empty non void BoolSignature
st B is m-connectives
for A1 being bool-correct with_defined_elements UndefMSAlgebra over B
st B is (n1,r) integer & A1 is (n1,r) integer
for C being non empty non void ConnectivesSignature
st the carrier' of B misses the carrier' of C & C is (n,r,r)-array
for A2 being with_defined_elements UndefMSAlgebra over C
st the Sorts of A1 tolerates the Sorts of A2 &
the undefined-map of A1 tolerates the undefined-map of A2 &
A2 is (n,r,r)-array
for S being bool-correct non empty non void BoolSignature
st the BoolSignature of S = B+*C
for A being bool-correct with_defined_elements UndefMSAlgebra over S
st the UndefMSAlgebra of A = (B,A1)+*(C,A2) &
for a being 0-based finite array of INT
for i being Integer st i nin dom a holds
Den(In((the connectives of C).n, the carrier' of C),A2).<*a,i*>
= (the undefined-map of A2).r &
for x being Integer holds
Den(In((the connectives of C).(n+1), the carrier' of C),A2).<*a,i,x*>
= (the undefined-map of A2).the_result_sort_of
In((the connectives of C).(n+1), the carrier' of C)
holds A is n1,n+m,r, the_result_sort_of
In((the connectives of S).(n+m+1), the carrier' of S)
with_undefined_index_overflow
proof
let n,n1,m be Nat;
let r be set;
assume Z0: n >= 1 & n1 >= 4;
let B be bool-correct non empty non void BoolSignature;
assume ZY: B is m-connectives;
let A1 be bool-correct with_defined_elements UndefMSAlgebra over B;
assume ZZ: B is (n1,r) integer & A1 is n1,r integer;
let C be non empty non void ConnectivesSignature;
assume Z2: the carrier' of B misses the carrier' of C;
assume Z3: C is (n,r,r)-array;
then consider J,K,L being Element of C such that
I1: L = r & K = r & J <> L & J <> K and
(the connectives of C).n is_of_type <*J,K*>, L &
(the connectives of C).(n+1) is_of_type <*J,K,L*>, J &
(the connectives of C).(n+2) is_of_type <*J*>, K &
(the connectives of C).(n+3) is_of_type <*K,L*>, J by ARRAY1;
let A2 be with_defined_elements UndefMSAlgebra over C;
assume Z4: the Sorts of A1 tolerates the Sorts of A2;
assume Z5: the undefined-map of A1 tolerates the undefined-map of A2;
assume Z6: A2 is (n,r,r)-array;
let S be bool-correct non empty non void BoolSignature;
assume Z7: the BoolSignature of S = B+*C;
let A be bool-correct with_defined_elements UndefMSAlgebra over S;
assume Z8: the UndefMSAlgebra of A = (B,A1)+*(C,A2);
0+1=1;
then n > 0 by Z0,NAT_1:13;
then B+*C is (m+n,r,r)-array & the ConnectivesSignature of S =
the ConnectivesSignature of B+*C by ZY,Z3,Z7,Th202;
then
Ab: S is (m+n,r,r)-array by Z7,Th68;
then
A4: len the connectives of S >= m+n+3 by ARRAY1;
consider J0,K0,L0 being Element of S such that
Ax: L0 = r & K0 = r & J0 <> L0 & J0 <> K0 &
(the connectives of S).(m+n) is_of_type <*J0,K0*>, L0 &
(the connectives of S).(m+n+1) is_of_type <*J0,K0,L0*>, J0 and
(the connectives of S).(m+n+2) is_of_type <*J0*>, K0 &
(the connectives of S).(m+n+3) is_of_type <*K0,L0*>, J0 by Ab,ARRAY1;
A is n1,r integer by ZY,ZZ,Z0,Z2,Z3,Z4,Z5,Z6,Z7,Z8,Th206;
then consider I being SortSymbol of S such that
II: I = r &
(the connectives of S).n1 is_of_type {},I & (DefSorts A).I = INT &
Den(In((the connectives of S).n1, the carrier' of S), A).{} = 0 &
Den(In((the connectives of S).(n1+1), the carrier' of S), A).{} = 1 &
for i,j being Integer holds
Den(In((the connectives of S).(n1+2), the carrier' of S), A).<*i*> = -i &
Den(In((the connectives of S).(n1+3), the carrier' of S), A).<*i,j*>
= i+j &
Den(In((the connectives of S).(n1+4), the carrier' of S), A).<*i,j*>
= i*j &
(j <> 0 implies
Den(In((the connectives of S).(n1+5), the carrier' of S), A).<*i,j*>
= i div j) &
Den(In((the connectives of S).(n1+6), the carrier' of S), A).<*i,j*>
= IFGT(i,j,FALSE,TRUE) by INT2;
A is n+m,r,r-array by Z0,ZY,Z2,Z3,Z4,Z5,Z6,Z7,Z8,Th206a;
then consider J,K being Element of S such that
AA: K = r &
(the connectives of S).(n+m) is_of_type <*J,r*>, K &
(DefSorts A).J = ((DefSorts A).K)^omega &
(DefSorts A).r = INT &
(for a being 0-based finite array of (DefSorts A).K holds
(for i being Integer st i in dom a holds
Den((the connectives of S)/.(n+m),A).<*a,i*> = a.i &
for x being defined Element of A,K holds
Den((the connectives of S)/.(n+m+1),A).<*a,i,x*> = a+*(i,x)) &
Den((the connectives of S)/.(n+m+2),A).<*a*> = card a) &
for i being Integer, x being defined Element of A,K st i >= 0 holds
Den((the connectives of S)/.(n+m+3),A).<*i,x*> = i-->x by ARRAY2;
assume Z9: for a being 0-based finite array of INT
for i being Integer st i nin dom a holds
Den(In((the connectives of C).n, the carrier' of C),A2).<*a,i*>
= (the undefined-map of A2).r &
for x being Integer holds
Den(In((the connectives of C).(n+1), the carrier' of C),A2).<*a,i,x*>
= (the undefined-map of A2).the_result_sort_of
In((the connectives of C).(n+1), the carrier' of C);
set s = the_result_sort_of
In((the connectives of S).(n+m+1), the carrier' of S);
n+m+1 <= n+m+1+2 by NAT_1:11;
then
1 <= n+m+1 <= len the connectives of S by A4,NAT_1:11,XXREAL_0:2;
then n+m+1 in dom the connectives of S by FINSEQ_3:25;
then (the connectives of S).(n+m+1) in the carrier' of S by FUNCT_1:102;
then In((the connectives of S).(n+m+1), the carrier' of S)
= (the connectives of S).(n+m+1) by SUBSET_1:def 8;
then
B0: s = J0 by Ax,Z7,ThType;
n+m <= n+m+3 by NAT_1:11;
then
1 <= n+m <= len the connectives of S by Z0,A4,NAT_1:12,XXREAL_0:2;
then n+m in dom the connectives of S by FINSEQ_3:25;
then (the connectives of S).(n+m) in the carrier' of S by FUNCT_1:102;
then In((the connectives of S).(n+m), the carrier' of S)
= (the connectives of S).(n+m) by SUBSET_1:def 8;
then
<*J,r*> = the_arity_of In((the connectives of S).(n+m), the carrier' of S)
= <*J0,K0*> &
K = the_result_sort_of In((the connectives of S).(n+m), the carrier' of S)
= L0 by Ax,AA,ThType;
then
B4: J0 = J & K = L0 & K0 = r by FINSEQ_1:77;
let J1,K1 be SortSymbol of S such that
B1: r = J1 & s = K1;
let a be defined Element of (the Sorts of A).K1;
(DefSorts A).K1 = (DefSorts A).s = (DefSorts A).J0 = (DefSorts A).J
= ((DefSorts A).K)^omega = ((DefSorts A).L0)^omega = INT^omega
by B0,B1,B4,Ax,AA,II;
reconsider b = a as Element of INT^omega by B0,B1,B4,Ax,DEF1,AA,II;
let i,x be defined Element of (the Sorts of A).J1;
reconsider j = i, y = x as Element of INT by DEF1,II,AA,B1;
n+m+2 <= n+m+2+1 & 1 <= n+m+1+1 by NAT_1:11;
then
1 <= n+m+2 <= len the connectives of S by A4,NAT_1:11,XXREAL_0:2;
then n+m+2 in dom the connectives of S by FINSEQ_3:25;
then (the connectives of S).(n+m+2) in the carrier' of S &
(the connectives of S)/.(n+m+2) = (the connectives of S).(n+m+2)
by FUNCT_1:102,PARTFUN1:def 6;
then
B5: In((the connectives of S).(n+m+2), the carrier' of S)
= (the connectives of S)/.(n+m+2) by SUBSET_1:def 8;
assume Den(In((the connectives of S).(n1+6), the carrier' of S),A).
<*Den(In((the connectives of S).n1, the carrier' of S),A).{},i*> = \falseA
or Den(In((the connectives of S).(n1+6), the carrier' of S),A).
<*Den(In((the connectives of S).(n+m+2), the carrier' of S),A).<*a*>,i*>
= \trueA; then
Den(In((the connectives of S).(n1+6), the carrier' of S),A).
<*0,i*> = \falseA or
Den(In((the connectives of S).(n1+6), the carrier' of S),A).
<*card b, j*> = \trueA by B5,B1,II,AA; then
B2: IFGT(0,j,FALSE,TRUE) = \falseA or
Den(In((the connectives of S).(n1+6), the carrier' of S),A).<*card b,i*>
= \trueA by B5,B1,II,AA; then
B2: (IFGT(0,j,FALSE,TRUE) = \falseA or
IFGT(card b,j,FALSE,TRUE) = \trueA = TRUE) &
TRUE <> FALSE by B5,B1,II,AA,Th17; then
B2: (IFGT(0,j,FALSE,TRUE) = FALSE or IFGT(card b,j,FALSE,TRUE) = TRUE) &
TRUE <> FALSE by B5,B1,II,AA,Th17; then
B2: 0 > j or card b <= j by XXREAL_0:def 11;
now assume j in dom b;
then j is Nat & j in card b & Segm card b = card b;
then j >= 0 & j < card b by NAT_1:2,44;
hence contradiction by B2;
end;
then
BB: Den(In((the connectives of C).n, the carrier' of C),A2).<*b,j*>
= (the undefined-map of A2).r &
Den(In((the connectives of C).(n+1), the carrier' of C),A2).<*b,j,y*>
= (the undefined-map of A2).the_result_sort_of
In((the connectives of C).(n+1), the carrier' of C) by Z9;
C1: the connectives of S = (the connectives of B)^the connectives of C
by Z7,COMB;
C2: len the connectives of B = m by ZY,CONN;
C3: len the connectives of B >= n1+6 & len the connectives of C >= n+3
by ZZ,Z3,INT1,ARRAY1;
FF: the Charact of A = (the Charact of A1)+*the Charact of A2 &
the undefined-map of A = (the undefined-map of A1)+*
the undefined-map of A2 by Z4,Z5,Z7,Z8,COMB2;
GG: dom the Charact of A2 = the carrier' of C &
dom the undefined-map of A2 = the carrier of C by PARTFUN1:def 2;
n <= n+3 & n+1 <= n+1+2 by NAT_1:11;
then 1 <= n <= len the connectives of C >= n+1 >= 1
by C3,Z0,NAT_1:11,XXREAL_0:2;
then n in dom the connectives of C & n+1 in dom the connectives of C
by FINSEQ_3:25;
then
CD: (the connectives of S).(m+n) = (the connectives of C).n &
(the connectives of S).(m+(n+1)) = (the connectives of C).(n+1) &
(the connectives of C).n in the carrier' of C &
(the connectives of C).(n+1) in the carrier' of C &
the carrier' of C c= (the carrier' of B)\/the carrier' of C
= the carrier' of S
by C1,C2,Z7,Th190,XBOOLE_1:7,FUNCT_1:102,FINSEQ_1:def 7;
then
CC: In((the connectives of S).(n+m), the carrier' of S)
= (the connectives of C).n
= In((the connectives of C).n, the carrier' of C) &
In((the connectives of S).(n+m+1), the carrier' of S)
= (the connectives of C).(n+1)
= In((the connectives of C).(n+1), the carrier' of C) by SUBSET_1:def 8;
the ResultSort of S = (the ResultSort of B)+*the ResultSort of C &
dom the ResultSort of C = the carrier' of C by Z7,Th190,FUNCT_2:def 1;
then
DD: the_result_sort_of In((the connectives of C).(n+1),the carrier' of C) = s
by CD,CC,FUNCT_4:13;
thus Den(In((the connectives of S).(n+m), the carrier' of S),A).<*a,i*>
= Den(In((the connectives of C).n, the carrier' of C),A2).<*b,j*>
by CC,CD,FF,GG,FUNCT_4:13
.= (the undefined-map of A2).r by BB,B1,CD
.= (the undefined-map of A).J1 by I1,B1,FF,GG,FUNCT_4:13;
m+(n+1) = n+m+1;
hence Den(In((the connectives of S).(n+m+1), the carrier' of S),A).
<*a,i,x*>
= Den(In((the connectives of C).(n+1), the carrier' of C),A2).<*b,j,y*>
by CC,CD,FF,GG,FUNCT_4:13
.= (the undefined-map of A2).the_result_sort_of
In((the connectives of C).(n+1), the carrier' of C) by BB,CD,B1
.= (the undefined-map of A).K1 by DD,BB,B1,CD,FF,GG,FUNCT_4:13;
end;
theorem Th209:
for n being Nat, s being set
for S1,S2 being BoolSignature st
the bool-sort of S1 = the bool-sort of S2 &
len the connectives of S2 >= 3 &
for i st i >= 1 & i <= 3 holds
(the Arity of S1).((the connectives of S1).i)
= (the Arity of S2).((the connectives of S2).i) &
(the ResultSort of S1).((the connectives of S1).i)
= (the ResultSort of S2).((the connectives of S2).i)
holds S1 is bool-correct implies S2 is bool-correct
proof
let n be Nat;
let s be set;
let S1,S2 be BoolSignature;
assume Z0: the bool-sort of S1 = the bool-sort of S2;
assume Z1: len the connectives of S2 >= 3;
assume Z2: for i st i >= 1 & i <= 3 holds
(the Arity of S1).((the connectives of S1).i)
= (the Arity of S2).((the connectives of S2).i) &
(the ResultSort of S1).((the connectives of S1).i)
= (the ResultSort of S2).((the connectives of S2).i);
set B = S1;
assume
Z3: len the connectives of B >= 3 &
(the connectives of B).1 is_of_type {}, the bool-sort of B &
(the connectives of B).2 is_of_type <*the bool-sort of B*>,
the bool-sort of B &
(the connectives of B).3 is_of_type
<*the bool-sort of B, the bool-sort of B*>, the bool-sort of B;
thus len the connectives of S2 >= 3 by Z1;
thus (the Arity of S2).((the connectives of S2).1)
= (the Arity of S1).((the connectives of S1).1) by Z2
.= {} by Z3,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).1)
= (the ResultSort of S1).((the connectives of S1).1) by Z2
.= the bool-sort of S2 by Z0,Z3,TYPEOF;
thus (the Arity of S2).((the connectives of S2).2)
= (the Arity of S1).((the connectives of S1).2) by Z2
.= <*the bool-sort of S2*> by Z0,Z3,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).2)
= (the ResultSort of S1).((the connectives of S1).2) by Z2
.= the bool-sort of S2 by Z0,Z3,TYPEOF;
thus (the Arity of S2).((the connectives of S2).3)
= (the Arity of S1).((the connectives of S1).3) by Z2
.= <*the bool-sort of S2,the bool-sort of S2*> by Z0,Z3,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).3)
= (the ResultSort of S1).((the connectives of S1).3) by Z2
.= the bool-sort of S2 by Z0,Z3,TYPEOF;
end;
theorem Th210:
for n being Nat, s being set
for S1,S2 being non empty BoolSignature st
n >= 1 & the bool-sort of S1 = the bool-sort of S2 &
len the connectives of S2 >= n+6 &
(the connectives of S2).n <> (the connectives of S2).(n+1) &
(the connectives of S2).(n+3) <> (the connectives of S2).(n+4) &
(the connectives of S2).(n+3) <> (the connectives of S2).(n+5) &
(the connectives of S2).(n+4) <> (the connectives of S2).(n+5) &
for i st i >= n & i <= n+6 holds
(the Arity of S1).((the connectives of S1).i)
= (the Arity of S2).((the connectives of S2).i) &
(the ResultSort of S1).((the connectives of S1).i)
= (the ResultSort of S2).((the connectives of S2).i)
holds S1 is (n,s) integer implies S2 is (n,s) integer
proof
let n be Nat;
let s be set;
let S1,S2 be non empty BoolSignature;
assume Z0: n >= 1 & the bool-sort of S1 = the bool-sort of S2;
assume Z1: len the connectives of S2 >= n+6;
assume
ZZ: (the connectives of S2).n <> (the connectives of S2).(n+1) &
(the connectives of S2).(n+3) <> (the connectives of S2).(n+4) &
(the connectives of S2).(n+3) <> (the connectives of S2).(n+5) &
(the connectives of S2).(n+4) <> (the connectives of S2).(n+5);
assume Z2: for i st i >= n & i <= n+6 holds
(the Arity of S1).((the connectives of S1).i)
= (the Arity of S2).((the connectives of S2).i) &
(the ResultSort of S1).((the connectives of S1).i)
= (the ResultSort of S2).((the connectives of S2).i);
assume len the connectives of S1 >= n+6;
given I being Element of S1 such that
Z4: I = s & I <> the bool-sort of S1 &
(the connectives of S1).n is_of_type {},I &
(the connectives of S1).(n+1) is_of_type {},I &
(the connectives of S1).n <> (the connectives of S1).(n+1) &
(the connectives of S1).(n+2) is_of_type <*I*>,I &
(the connectives of S1).(n+3) is_of_type <*I,I*>,I &
(the connectives of S1).(n+4) is_of_type <*I,I*>,I &
(the connectives of S1).(n+5) is_of_type <*I,I*>,I &
(the connectives of S1).(n+3) <> (the connectives of S1).(n+4) &
(the connectives of S1).(n+3) <> (the connectives of S1).(n+5) &
(the connectives of S1).(n+4) <> (the connectives of S1).(n+5) &
(the connectives of S1).(n+6) is_of_type <*I,I*>,the bool-sort of S1;
thus len the connectives of S2 >= n+6 by Z1;
A0: n <= n+6 by NAT_1:11;
then n <= len the connectives of S2 by Z1,XXREAL_0:2;
then
Ad: n in dom the connectives of S2 by Z0,FINSEQ_3:25;
AB: (the ResultSort of S2).((the connectives of S2).n)
= (the ResultSort of S1).((the connectives of S1).n) by Z2,A0
.= I by Z4,TYPEOF;
reconsider J = I as Element of S2 by AB,Ad,FUNCT_2:5,FUNCT_1:102;
take J;
thus J = s & J <> the bool-sort of S2 by Z0,Z4;
thus (the Arity of S2).((the connectives of S2).n)
= (the Arity of S1).((the connectives of S1).n) by Z2,A0
.= {} by Z4,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).n)
= (the ResultSort of S1).((the connectives of S1).n) by Z2,A0
.= J by Z4,TYPEOF;
A1: n+0 <= n+1 & n+1 <= n+6 by XREAL_1:6;
hence (the Arity of S2).((the connectives of S2).(n+1))
= (the Arity of S1).((the connectives of S1).(n+1)) by Z2
.= {} by Z4,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).(n+1))
= (the ResultSort of S1).((the connectives of S1).(n+1)) by Z2,A1
.= J by Z4,TYPEOF;
thus (the connectives of S2).n <> (the connectives of S2).(n+1) by ZZ;
A2: n+0 <= n+2 & n+2 <= n+6 by XREAL_1:6;
hence (the Arity of S2).((the connectives of S2).(n+2))
= (the Arity of S1).((the connectives of S1).(n+2)) by Z2
.= <*J*> by Z4,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).(n+2))
= (the ResultSort of S1).((the connectives of S1).(n+2)) by Z2,A2
.= J by Z4,TYPEOF;
A3: n+0 <= n+3 & n+3 <= n+6 by XREAL_1:6;
hence (the Arity of S2).((the connectives of S2).(n+3))
= (the Arity of S1).((the connectives of S1).(n+3)) by Z2
.= <*J,J*> by Z4,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).(n+3))
= (the ResultSort of S1).((the connectives of S1).(n+3)) by Z2,A3
.= J by Z4,TYPEOF;
A4: n+0 <= n+4 & n+4 <= n+6 by XREAL_1:6;
hence (the Arity of S2).((the connectives of S2).(n+4))
= (the Arity of S1).((the connectives of S1).(n+4)) by Z2
.= <*J,J*> by Z4,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).(n+4))
= (the ResultSort of S1).((the connectives of S1).(n+4)) by Z2,A4
.= J by Z4,TYPEOF;
A6: n+0 <= n+5 & n+5 <= n+6 by XREAL_1:6;
hence (the Arity of S2).((the connectives of S2).(n+5))
= (the Arity of S1).((the connectives of S1).(n+5)) by Z2
.= <*J,J*> by Z4,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).(n+5))
= (the ResultSort of S1).((the connectives of S1).(n+5)) by Z2,A6
.= J by Z4,TYPEOF;
thus (the connectives of S2).(n+3) <> (the connectives of S2).(n+4) by ZZ;
thus (the connectives of S2).(n+3) <> (the connectives of S2).(n+5) by ZZ;
thus (the connectives of S2).(n+4) <> (the connectives of S2).(n+5) by ZZ;
A5: n+0 <= n+6 by XREAL_1:6;
hence (the Arity of S2).((the connectives of S2).(n+6))
= (the Arity of S1).((the connectives of S1).(n+6)) by Z2
.= <*J,J*> by Z4,TYPEOF;
thus (the ResultSort of S2).((the connectives of S2).(n+6))
= (the ResultSort of S1).((the connectives of S1).(n+6)) by Z2,A5
.= the bool-sort of S2 by Z0,Z4,TYPEOF;
end;
theorem Th211:
for n,m being Nat, s,r being set
for S1,S2 being non empty ConnectivesSignature st
1 <= n & len the connectives of S1 >= n+3 &
for i st i >= n & i <= n+3 holds
(the Arity of S1).((the connectives of S1).i)
= (the Arity of S2).((the connectives of S2).(i+m)) &
(the ResultSort of S1).((the connectives of S1).i)
= (the ResultSort of S2).((the connectives of S2).(i+m))
holds S2 is (n+m,s,r)-array implies S1 is (n,s,r)-array
proof
let n,m be Nat;
let s,r be set;
let S1,S2 be non empty ConnectivesSignature;
assume Z0: 1 <= n;
assume Z1: len the connectives of S1 >= n+3;
assume Z2: for i st i >= n & i <= n+3 holds
(the Arity of S1).((the connectives of S1).i)
= (the Arity of S2).((the connectives of S2).(i+m)) &
(the ResultSort of S1).((the connectives of S1).i)
= (the ResultSort of S2).((the connectives of S2).(i+m));
assume len the connectives of S2 >= n+m+3;
given J,K,L being Element of S2 such that
Z5: L = s & K = r & J <> L & J <> K &
(the connectives of S2).(n+m) is_of_type <*J,K*>, L &
(the connectives of S2).(n+m+1) is_of_type <*J,K,L*>, J &
(the connectives of S2).(n+m+2) is_of_type <*J*>, K &
(the connectives of S2).(n+m+3) is_of_type <*K,L*>, J;
thus len the connectives of S1 >= n+3 by Z1;
B0: n <= n+3 by NAT_1:11;
then (the Arity of S1).((the connectives of S1).n)
= (the Arity of S2).((the connectives of S2).(n+m)) &
(the ResultSort of S1).((the connectives of S1).n)
= (the ResultSort of S2).((the connectives of S2).(n+m)) by Z2;
then
A0: (the Arity of S1).((the connectives of S1).n) = <*J,K*> &
(the ResultSort of S1).((the connectives of S1).n) = L by Z5,TYPEOF;
B1: n <= n+1 & n+1 <= n+1+2 & n+3 = n+1+2 by NAT_1:11;
then (the Arity of S1).((the connectives of S1).(n+1))
= (the Arity of S2).((the connectives of S2).(n+1+m)) &
(the ResultSort of S1).((the connectives of S1).(n+1))
= (the ResultSort of S2).((the connectives of S2).(n+1+m)) by Z2;
then
A1: (the Arity of S1).((the connectives of S1).(n+1)) = <*J,K,L*> &
(the ResultSort of S1).((the connectives of S1).(n+1)) = J by Z5,TYPEOF;
B2: n+2 <= n+2+1 & n <= n+2 by NAT_1:11;
then (the Arity of S1).((the connectives of S1).(n+2))
= (the Arity of S2).((the connectives of S2).(n+2+m)) &
(the ResultSort of S1).((the connectives of S1).(n+2))
= (the ResultSort of S2).((the connectives of S2).(n+2+m)) by Z2;
then
A2: (the Arity of S1).((the connectives of S1).(n+2)) = <*J*> &
(the ResultSort of S1).((the connectives of S1).(n+2)) = K by Z5,TYPEOF;
n <= n+3 by NAT_1:11;
then (the Arity of S1).((the connectives of S1).(n+3))
= (the Arity of S2).((the connectives of S2).(n+3+m)) &
(the ResultSort of S1).((the connectives of S1).(n+3))
= (the ResultSort of S2).((the connectives of S2).(n+3+m)) by Z2;
then
A3: (the Arity of S1).((the connectives of S1).(n+3)) = <*K,L*> &
(the ResultSort of S1).((the connectives of S1).(n+3)) = J by Z5,TYPEOF;
n <= len the connectives of S1 & 1 <= n+1 & 1 <= n+1+1 &
n+1 <= len the connectives of S1 & n+2 <= len the connectives of S1 &
1 <= n+3 by Z1,B0,B1,B2,XXREAL_0:2,NAT_1:11;
then n in dom the connectives of S1 & n+1 in dom the connectives of S1 &
n+2 in dom the connectives of S1 by Z0,FINSEQ_3:25;
then reconsider J,K,L as Element of S1 by A0,A1,A2,FUNCT_1:102,FUNCT_2:5;
take J,K,L;
thus L = s & K = r & J <> L & J <> K by Z5;
thus thesis by A0,A1,A2,A3,TYPEOF;
end;
theorem Th207:
for j,k be set, i,m,n being Nat st m >= 4 & m+6 <= n & i >= 1
for S being 1-1-connectives bool-correct non empty non void BoolSignature
st S is (n+i,j,k)-array (m,k) integer
ex B being bool-correct non empty non void BoolSignature,
C being non empty non void ConnectivesSignature st
the BoolSignature of S = B+*C &
B is n-connectives (m,k) integer & C is (i,j,k)-array &
the carrier of B = the carrier of C &
the carrier' of B = (the carrier' of S)\rng the connectives of C &
the carrier' of C = rng the connectives of C &
the connectives of B = (the connectives of S)|n &
the connectives of C = (the connectives of S)/^n
proof
let j,k be set;
let i,m,n be Nat;
assume Z0: m >= 4;
assume Z1: m+6 <= n & i >= 1;
let S be 1-1-connectives bool-correct non empty non void BoolSignature;
assume Z2: len the connectives of S >= n+i+3;
given J,K,L being Element of S such that
Z4: L = j & K = k & J <> L & J <> K &
(the connectives of S).(n+i) is_of_type <*J,K*>, L &
(the connectives of S).(n+i+1) is_of_type <*J,K,L*>, J &
(the connectives of S).(n+i+2) is_of_type <*J*>, K &
(the connectives of S).(n+i+3) is_of_type <*K,L*>, J;
ZZ: S is (i+n,j,k)-array by Z2,Z4,ARRAY1;
assume Z3: len the connectives of S >= m+6;
given I being Element of S such that
Z5: I = k & I <> the bool-sort of S &
(the connectives of S).m is_of_type {},I &
(the connectives of S).(m+1) is_of_type {},I &
(the connectives of S).m <> (the connectives of S).(m+1) &
(the connectives of S).(m+2) is_of_type <*I*>,I &
(the connectives of S).(m+3) is_of_type <*I,I*>,I &
(the connectives of S).(m+4) is_of_type <*I,I*>,I &
(the connectives of S).(m+5) is_of_type <*I,I*>,I &
(the connectives of S).(m+3) <> (the connectives of S).(m+4) &
(the connectives of S).(m+3) <> (the connectives of S).(m+5) &
(the connectives of S).(m+4) <> (the connectives of S).(m+5) &
(the connectives of S).(m+6) is_of_type <*I,I*>,the bool-sort of S;
ZY: S is (m,k) integer by Z3,Z5,INT1;
set r = (the connectives of S)/^n;
set W = rng r;
Ae: n+i+3 = n+(i+3) & n <= n+(i+3) by NAT_1:12;
then
A1: len the connectives of S >= n by Z2,XXREAL_0:2;
then len r = (len the connectives of S)-n by RFINSEQ:def 1;
then
Af: len r >= n+(i+3)-n by Z2,XREAL_1:9;
then
len r >= i+3 & i+1+2 >= 2 by NAT_1:11;
then len r >= 2 by XXREAL_0:2;
then r <> {} by FINSEQ_1:20,XXREAL_0:2; then
reconsider W as non empty set;
set O = (the carrier' of S)\W;
m <= m+6 by NAT_1:11;
then m <= n by Z1,XXREAL_0:2;
then
A7: 4 <= n by Z0,XXREAL_0:2;
then
A5: 1 <= n & 1 <= m by Z0,XXREAL_0:2;
n <= n+(i+3) by NAT_1:11;
then 1 <= n+i+3 by A5,XXREAL_0:2;
then 1 <= len the connectives of S by Z2,XXREAL_0:2;
then
A6: 1 in dom the connectives of S by FINSEQ_3:25;
then
A3: (the connectives of S).1 in the carrier' of S by FUNCT_1:102;
now assume (the connectives of S).1 in W;
then consider x such that
B1: x in dom r & (the connectives of S).1 = r.x by FUNCT_1:def 3;
reconsider x as Nat by B1;
r.x = (the connectives of S).(x+n) & n+x in dom the connectives of S
by A1,B1,RFINSEQ:def 1,FINSEQ_5:26;
then 1 = n+x & n = n+0 by A6,B1,FUNCT_1:def 4;
then x = 0 by A5,XREAL_1:6,NAT_1:3;
hence contradiction by B1,FINSEQ_3:24;
end;
then reconsider O as non empty set by A3,XBOOLE_0:def 5;
C2: W c= the carrier' of S by FINSEQ_1:def 4;
reconsider A = (the Arity of S)|O as Function of O, (the carrier of S)*
by FUNCT_2:32;
reconsider Ac = (the Arity of S)|W as Function of W, (the carrier of S)*
by C2,FUNCT_2:32;
reconsider R = (the ResultSort of S)|O as Function of O, the carrier of S
by FUNCT_2:32;
reconsider Rc = (the ResultSort of S)|W as Function of W, the carrier of S
by C2,FUNCT_2:32;
set s = the bool-sort of S;
set p = (the connectives of S)|n;
rng p c= O
proof let x; assume x in rng p;
then consider y such that
F1: y in dom p & x = p.y by FUNCT_1:def 3;
F2: x in the carrier' of S by F1,FUNCT_1:102;
assume x nin O;
then x in W by F2,XBOOLE_0:def 5;
then consider z such that
F3: z in dom r & x = r.z by FUNCT_1:def 3;
reconsider y as Nat by F1;
reconsider z as Nat by F3;
F4: y in dom the connectives of S & x = (the connectives of S).y
by F1,RELAT_1:57,FUNCT_1:47;
y <= len p & len p <= n by F1,FINSEQ_3:25,FINSEQ_5:17;
then
F5: y <= n by XXREAL_0:2;
r.z = (the connectives of S).(z+n) & n+z in dom the connectives of S
by A1,F3,RFINSEQ:def 1,FINSEQ_5:26;
then y = n+z & n = n+0 by F4,F3,FUNCT_1:def 4;
then z = 0 by F5,XREAL_1:6,NAT_1:3;
hence contradiction by F3,FINSEQ_3:24;
end;
then reconsider c = p as FinSequence of O
by FINSEQ_1:def 4;
reconsider cc = r as FinSequence of W
by FINSEQ_1:def 4;
set B = BoolSignature(#the carrier of S,O,A,R,s,c#);
set C = ConnectivesSignature(#the carrier of S,W,Ac,Rc,cc#);
now
5 <= m+1+5 by NAT_1:11;
then 3 <= m+6 by XXREAL_0:2;
hence len the connectives of S >= 3 by Z3,XXREAL_0:2;
n <= n+(i+3) by NAT_1:11;
then n <= len the connectives of S by Z2,XXREAL_0:2;
then len the connectives of B = n by FINSEQ_1:59;
hence
G1: len the connectives of B >= 3 by A7,XXREAL_0:2;
let z be Nat; assume
G2: z >= 1 & z <= 3;
then z <= len the connectives of B by G1,XXREAL_0:2;
then z in dom the connectives of B by G2,FINSEQ_3:25;
then
G3: (the connectives of B).z in O &
(the connectives of B).z = (the connectives of S).z by FUNCT_1:47,102;
thus (the Arity of S).((the connectives of S).z)
= (the Arity of B).((the connectives of B).z) by G3,FUNCT_1:49;
thus (the ResultSort of S).((the connectives of S).z)
= (the ResultSort of B).((the connectives of B).z) by G3,FUNCT_1:49;
end;
then reconsider B as bool-correct non empty non void BoolSignature
by Th209;
reconsider C as non empty non void ConnectivesSignature;
take B, C;
C3: the carrier of S = (the carrier of B)\/the carrier of C;
C4: the carrier' of S = (the carrier' of B)\/the carrier' of C
by FINSEQ_1:def 4,XBOOLE_1:45;
dom the Arity of S = the carrier' of S by FUNCT_2:def 1;
then
C5: the Arity of S = (the Arity of B)+*the Arity of C by C4,FUNCT_4:70;
dom the ResultSort of S = the carrier' of S by FUNCT_2:def 1;
then the ResultSort of S = (the ResultSort of B)+*the ResultSort of C
by C4,FUNCT_4:70;
then
C1: the ManySortedSign of S = (B qua non empty ManySortedSign)+*C
by C3,C4,C5,CIRCCOMB:def 2;
the connectives of S = c^cc by RFINSEQ:8;
hence the BoolSignature of S = B+*C by C1,COMB;
thus
A9: len the connectives of B = n by Ae,Z2,XXREAL_0:2,FINSEQ_1:59;
now
thus 1 <= m & the bool-sort of B = the bool-sort of S by Z0,XXREAL_0:2;
thus len the connectives of B >= m+6 by Z1,Ae,Z2,XXREAL_0:2,FINSEQ_1:59;
m <= m+6 & m+1 <= m+1+5 by NAT_1:11;
then m >= 1 & m <= len the connectives of B &
m+1 >= 1 & m+1 <= len the connectives of B
by Z0,Z1,A9,XXREAL_0:2,NAT_1:11;
then m in dom the connectives of B & m+1 in dom the connectives of B
by FINSEQ_3:25;
then (the connectives of B).m = (the connectives of S).m &
(the connectives of B).(m+1) = (the connectives of S).(m+1)
by FUNCT_1:47;
hence (the connectives of B).m <> (the connectives of B).(m+1) by Z5;
m+3 <= m+3+3 & m+4 <= m+4+2 & m+5 <= m+5+1 by NAT_1:11;
then m+2+1 >= 1 & m+3 <= len the connectives of B &
m+3+1 >= 1 & m+4 <= len the connectives of B &
m+4+1 >= 1 & m+5 <= len the connectives of B
by Z1,A9,XXREAL_0:2,NAT_1:11;
then m+3 in dom the connectives of B & m+4 in dom the connectives of B &
m+5 in dom the connectives of B by FINSEQ_3:25;
then (the connectives of B).(m+3) = (the connectives of S).(m+3) &
(the connectives of B).(m+4) = (the connectives of S).(m+4) &
(the connectives of B).(m+5) = (the connectives of S).(m+5)
by FUNCT_1:47;
hence (the connectives of B).(m+3) <> (the connectives of B).(m+4) &
(the connectives of B).(m+3) <> (the connectives of B).(m+5) &
(the connectives of B).(m+4) <> (the connectives of B).(m+5) by Z5;
let z be Nat; assume z >= m & z <= m+6;
then 1 <= z & z <= len the connectives of B by Z1,A9,A5,XXREAL_0:2;
then z in dom the connectives of B by FINSEQ_3:25;
then
G3: (the connectives of B).z in O &
(the connectives of B).z = (the connectives of S).z by FUNCT_1:47,102;
thus (the Arity of S).((the connectives of S).z)
= (the Arity of B).((the connectives of B).z) by G3,FUNCT_1:49;
thus (the ResultSort of S).((the connectives of S).z)
= (the ResultSort of B).((the connectives of B).z) by G3,FUNCT_1:49;
end;
hence B is (m,k) integer by ZY,Th210;
now
thus len the connectives of C >= i+3 by Af;
thus 1 <= i by Z1;
let z be Nat; assume z >= i & z <= i+3;
then 1 <= z & z <= len r by Af,Z1,XXREAL_0:2;
then z in dom r by FINSEQ_3:25;
then
G3: (the connectives of C).z in W &
(the connectives of C).z = (the connectives of S).(z+n)
by A1,FUNCT_1:102,RFINSEQ:def 1;
thus (the Arity of C).((the connectives of C).z)
= (the Arity of S).((the connectives of S).(z+n)) by G3,FUNCT_1:49;
thus (the ResultSort of C).((the connectives of C).z)
= (the ResultSort of S).((the connectives of S).(z+n)) by G3,FUNCT_1:49;
end;
hence C is (i,j,k)-array by ZZ,Th211;
thus thesis;
end;
theorem Th213:
for s,I being element
for S being bool-correct non empty non void BoolSignature
st S is (4,I) integer
for X being non empty set
st s in the carrier of S & s <> I & s <> the bool-sort of S
ex A being bool-correct with_defined_elements strict UndefMSAlgebra over S st
A is limited-by-undefined & the undefined-map of A = DefSorts A &
A is (4,I) integer undef-consequent & (DefSorts A).s = X &
A is 4,I with_undefined_division_by_0
proof
let s,I be element;
let S be bool-correct non empty non void BoolSignature;
assume Z0: S is (4,I) integer;
then consider J being Element of S such that
A0: J = I & J <> the bool-sort of S &
(the connectives of S).4 is_of_type {},J &
(the connectives of S).(4+1) is_of_type {},J &
(the connectives of S).4 <> (the connectives of S).(4+1) &
(the connectives of S).(4+2) is_of_type <*J*>,J &
(the connectives of S).(4+3) is_of_type <*J,J*>,J &
(the connectives of S).(4+4) is_of_type <*J,J*>,J &
(the connectives of S).(4+5) is_of_type <*J,J*>,J &
(the connectives of S).(4+3) <> (the connectives of S).(4+4) &
(the connectives of S).(4+3) <> (the connectives of S).(4+5) &
(the connectives of S).(4+4) <> (the connectives of S).(4+5) &
(the connectives of S).(4+6) is_of_type <*J,J*>,the bool-sort of S by INT1;
A1: len the connectives of S >= 3 &
(the connectives of S).1 is_of_type {}, the bool-sort of S &
(the connectives of S).2 is_of_type <*the bool-sort of S*>,
the bool-sort of S &
(the connectives of S).3 is_of_type
<*the bool-sort of S, the bool-sort of S*>, the bool-sort of S
by CORRECT;
let X be non empty set;
assume Z1: s in the carrier of S;
assume Z2: s <> I;
assume Z3: s <> the bool-sort of S;
consider A being bool-correct with_defined_elements strict
UndefMSAlgebra over S such that
A2: A is limited-by-undefined & the undefined-map of A = DefSorts A &
A is (4,I) integer undef-consequent &
A is 4,I with_undefined_division_by_0 by Z0,Th199;
A3: (DefSorts A).the bool-sort of S = BOOLEAN &
Den(In((the connectives of S).1, the carrier' of S), A).{} = TRUE &
for x,y be boolean set holds
Den(In((the connectives of S).2, the carrier' of S), A).<*x*> = 'not' x &
Den(In((the connectives of S).3, the carrier' of S), A).<*x,y*> = x '&' y
by BOOL2;
consider K being SortSymbol of S such that
A4: K = I & (the connectives of S).4 is_of_type {},K &
(DefSorts A).K = INT &
Den(In((the connectives of S).4, the carrier' of S), A).{} = 0 &
Den(In((the connectives of S).(4+1), the carrier' of S), A).{} = 1 &
for i,j being Integer holds
Den(In((the connectives of S).(4+2), the carrier' of S), A).<*i*> = -i &
Den(In((the connectives of S).(4+3), the carrier' of S), A).<*i,j*> = i+j &
Den(In((the connectives of S).(4+4), the carrier' of S), A).<*i,j*> = i*j &
(j <> 0 implies
Den(In((the connectives of S).(4+5), the carrier' of S), A).<*i,j*>
= i div j) &
Den(In((the connectives of S).(4+6), the carrier' of S), A).<*i,j*>
= IFGT(i,j,FALSE,TRUE) by A2,INT2;
set Q = (the Sorts of A)+*(s,succ X);
set u = (the undefined-map of A)+*(s,X);
deffunc F(OperSymbol of S) =
(Q#*the Arity of S).$1 --> u.the_result_sort_of $1;
B0: dom the Sorts of A = the carrier of S & dom Q = the carrier of S &
dom the undefined-map of A = the carrier of S by PARTFUN1:def 2;
consider F being ManySortedSet of the carrier' of S such that
F0: for o being OperSymbol of S holds F.o = F(o) from PBOOLE:sch 5;
F is ManySortedFunction of Q#*the Arity of S, Q*the ResultSort of S
proof let x be set; assume x in the carrier' of S;
then reconsider o = x as OperSymbol of S;
F3: F.o = F(o) by F0;
F1: dom F(o) = (Q#*the Arity of S).o & rng F(o) c= {u.the_result_sort_of o}
by FUNCOP_1:13;
F2: (Q*the ResultSort of S).o = Q.the_result_sort_of o by FUNCT_2:15;
per cases;
suppose the_result_sort_of o = s;
then u.the_result_sort_of o = X & Q.the_result_sort_of o = succ X
by B0,FUNCT_7:31;
then u.the_result_sort_of o in Q.the_result_sort_of o by ORDINAL1:6;
then {u.the_result_sort_of o} c= Q.the_result_sort_of o by ZFMISC_1:31;
then rng F(o) c= (Q*the ResultSort of S).o by F2,F1,XBOOLE_1:1;
hence F.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x by F1,F3,FUNCT_2:2;
end;
suppose the_result_sort_of o <> s;
then u.the_result_sort_of o
= (the undefined-map of A).the_result_sort_of o &
Q.the_result_sort_of o = (the Sorts of A).the_result_sort_of o
by FUNCT_7:32;
then u.the_result_sort_of o in Q.the_result_sort_of o by PBOOLE:def 14;
then {u.the_result_sort_of o} c= Q.the_result_sort_of o by ZFMISC_1:31;
then rng F(o) c= (Q*the ResultSort of S).o by F2,F1,XBOOLE_1:1;
hence F.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x by F1,F3,FUNCT_2:2;
end;
end;
then reconsider F as ManySortedFunction of Q#*the Arity of S,
Q*the ResultSort of S;
set Ch = F+*((the Charact of A)|((the connectives of S).:Seg 10));
dom the Charact of A = the carrier' of S by PARTFUN1:def 2;
then
N2: dom ((the Charact of A)|((the connectives of S).:Seg 10))
= (the connectives of S).:Seg 10 by Lm1,RELAT_1:62;
reconsider Ch as ManySortedFunction of the carrier' of S;
Ch is ManySortedFunction of Q#*the Arity of S, Q*the ResultSort of S
proof
let x be set; assume
x in the carrier' of S;
then reconsider o = x as OperSymbol of S;
per cases;
suppose
N3: x in (the connectives of S).:Seg 10;
then
NN: Ch.x = ((the Charact of A)|((the connectives of S).:Seg 10)).x
by N2,FUNCT_4:13
.= (the Charact of A).x by N3,FUNCT_1:49;
N5: ((the Sorts of A)#*the Arity of S).o
= (the Sorts of A)#.((the Arity of S).o) &
((the Sorts of A)*the ResultSort of S).o
= (the Sorts of A).((the ResultSort of S).o) &
(Q#*the Arity of S).o = Q#.((the Arity of S).x) &
(Q*the ResultSort of S).o = Q.((the ResultSort of S).x) by FUNCT_2:15;
consider y such that
N6: y in dom the connectives of S & y in Seg 10 &
o = (the connectives of S).y
by N3,FUNCT_1:def 6;
per cases by N6,Th60b,ENUMSET1:def 8;
suppose y = 1;
then (the Arity of S).o = {} &
(the ResultSort of S).o = the bool-sort of S &
<*>the carrier of S in (the carrier of S)* &
(the Sorts of A).the bool-sort of S
= (succ DefSorts A).the bool-sort of S
= succ((DefSorts A).the bool-sort of S)
by A1,A2,N6,Th58,SUCC,TYPEOF,FINSEQ_1:def 11;
then (the Sorts of A)#.((the Arity of S).o)
= product ((the Sorts of A)*<*>the carrier of S) &
Q#.((the Arity of S).o) = product (Q*<*>the carrier of S) &
(the Sorts of A).((the ResultSort of S).o) = succ BOOLEAN &
Q.((the ResultSort of S).o) = succ BOOLEAN
by Z3,A2,A3,SUCC,FINSEQ_2:def 5,FUNCT_7:32;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x by NN,N5,PBOOLE:def 15;
end;
suppose y = 2;
then (the Arity of S).o = <*the bool-sort of S*> &
(the ResultSort of S).o = the bool-sort of S &
<*the bool-sort of S*> in (the carrier of S)*
by A1,N6,TYPEOF,FINSEQ_1:def 11;
then
N7: (the Sorts of A)#.((the Arity of S).o) = product ((the Sorts of A)*
<*the bool-sort of S*>) &
Q#.((the Arity of S).o) = product (Q*<*the bool-sort of S*>) &
(the Sorts of A).((the ResultSort of S).o)
= (succ DefSorts A).((the ResultSort of S).o)
= succ BOOLEAN &
Q.((the ResultSort of S).o)
= (the Sorts of A).((the ResultSort of S).o)
by Z3,A2,A3,Th58,SUCC,FINSEQ_2:def 5,FUNCT_7:32;
dom the Sorts of A = the carrier of S &
dom Q = the carrier of S by PARTFUN1:def 2;
then (the Sorts of A)*<*the bool-sort of S*>
= <*(the Sorts of A).the bool-sort of S*> &
Q*<*the bool-sort of S*> = <*Q.the bool-sort of S*> &
(the Sorts of A).the bool-sort of S = Q.the bool-sort of S
by Z3,FUNCT_7:32,FINSEQ_2:34;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x
by NN,N5,N7,PBOOLE:def 15;
end;
suppose y = 3;
then (the Arity of S).o = <*the bool-sort of S,the bool-sort of S*> &
(the ResultSort of S).o = the bool-sort of S &
<*the bool-sort of S,the bool-sort of S*> in (the carrier of S)*
by A1,N6,TYPEOF,FINSEQ_1:def 11;
then
N7: (the Sorts of A)#.((the Arity of S).o) = product ((the Sorts of A)*
<*the bool-sort of S,the bool-sort of S*>) &
Q#.((the Arity of S).o)
= product (Q*<*the bool-sort of S,the bool-sort of S*>) &
Q.((the ResultSort of S).o)
= (the Sorts of A).((the ResultSort of S).o)
by Z3,A3,SUCC,FINSEQ_2:def 5,FUNCT_7:32;
dom the Sorts of A = the carrier of S &
dom Q = the carrier of S by PARTFUN1:def 2;
then (the Sorts of A)*<*the bool-sort of S,the bool-sort of S*>
= <*(the Sorts of A).the bool-sort of S,
(the Sorts of A).the bool-sort of S*> &
Q*<*the bool-sort of S,the bool-sort of S*>
= <*Q.the bool-sort of S,Q.the bool-sort of S*> &
(the Sorts of A).the bool-sort of S = Q.the bool-sort of S
by Z3,FUNCT_7:32,FINSEQ_2:125;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x
by NN,N5,N7,PBOOLE:def 15;
end;
suppose y = 4 or y = 5;
then (the Arity of S).o = {} &
(the ResultSort of S).o = J &
<*>the carrier of S in (the carrier of S)*
by A0,N6,TYPEOF,FINSEQ_1:def 11;
then (the Sorts of A)#.((the Arity of S).o)
= product ((the Sorts of A)*<*>the carrier of S) &
Q#.((the Arity of S).o) = product (Q*<*>the carrier of S) &
Q.((the ResultSort of S).o)
= (the Sorts of A).((the ResultSort of S).o)
by Z2,A0,A4,SUCC,FINSEQ_2:def 5,FUNCT_7:32;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x
by NN,N5,PBOOLE:def 15;
end;
suppose y = 6;
then (the Arity of S).o = <*J*> &
(the ResultSort of S).o = J &
<*J*> in (the carrier of S)* by A0,N6,TYPEOF,FINSEQ_1:def 11;
then
N7: (the Sorts of A)#.((the Arity of S).o) = product ((the Sorts of A)*
<*J*>) &
Q#.((the Arity of S).o) = product (Q*<*J*>) &
Q.((the ResultSort of S).o)
= (the Sorts of A).((the ResultSort of S).o)
by Z2,A0,A4,SUCC,FINSEQ_2:def 5,FUNCT_7:32;
dom the Sorts of A = the carrier of S &
dom Q = the carrier of S by PARTFUN1:def 2;
then (the Sorts of A)*<*J*> = <*(the Sorts of A).J*> &
Q*<*J*> = <*Q.J*> &
(the Sorts of A).J = Q.J
by A0,Z2,FUNCT_7:32,FINSEQ_2:34;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x
by NN,N5,N7,PBOOLE:def 15;
end;
suppose y = 7 or y = 8 or y = 9;
then (the Arity of S).o = <*J,J*> &
(the ResultSort of S).o = J &
<*J,J*> in (the carrier of S)*
by A0,N6,TYPEOF,FINSEQ_1:def 11;
then
N7: (the Sorts of A)#.((the Arity of S).o) = product ((the Sorts of A)*
<*J,J*>) &
Q#.((the Arity of S).o) = product (Q*<*J,J*>) &
Q.((the ResultSort of S).o)
= (the Sorts of A).((the ResultSort of S).o)
by Z2,A0,A4,SUCC,FINSEQ_2:def 5,FUNCT_7:32;
dom the Sorts of A = the carrier of S &
dom Q = the carrier of S by PARTFUN1:def 2;
then (the Sorts of A)*<*J,J*>
= <*(the Sorts of A).J,(the Sorts of A).J*> &
Q*<*J,J*> = <*Q.J,Q.J*> &
(the Sorts of A).J = Q.J
by Z2,A0,FUNCT_7:32,FINSEQ_2:125;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x
by NN,N5,N7,PBOOLE:def 15;
end;
suppose y = 10;
then (the Arity of S).o = <*J,J*> &
(the ResultSort of S).o = the bool-sort of S &
<*J,J*> in (the carrier of S)*
by A0,N6,TYPEOF,FINSEQ_1:def 11;
then
N7: (the Sorts of A)#.((the Arity of S).o) = product ((the Sorts of A)*
<*J,J*>) &
Q#.((the Arity of S).o) = product (Q*<*J,J*>) &
Q.((the ResultSort of S).o)
= (the Sorts of A).((the ResultSort of S).o)
by Z3,A3,SUCC,FINSEQ_2:def 5,FUNCT_7:32;
dom the Sorts of A = the carrier of S &
dom Q = the carrier of S by PARTFUN1:def 2;
then (the Sorts of A)*<*J,J*>
= <*(the Sorts of A).J,(the Sorts of A).J*> &
Q*<*J,J*> = <*Q.J,Q.J*> &
(the Sorts of A).J = Q.J
by Z2,A0,FUNCT_7:32,FINSEQ_2:125;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x
by NN,N5,N7,PBOOLE:def 15;
end;
end;
suppose
x nin (the connectives of S).:Seg 10;
then Ch.x = F.x by N2,FUNCT_4:11;
hence Ch.x is Function of (Q#*the Arity of S).x,
(Q*the ResultSort of S).x;
end;
end;
then reconsider Ch as ManySortedFunction of Q#*the Arity of S,
Q*the ResultSort of S;
set u = (DefSorts A)+*(s,X);
BB: dom Q = the carrier of S & dom the Sorts of A = the carrier of S &
dom the undefined-map of A = the carrier of S &
dom DefSorts A = the carrier of S by PARTFUN1:def 2;
u is ManySortedElement of Q
proof
let x; assume
A0: x in the carrier of S;
A1: dom DefSorts A = the carrier of S by PARTFUN1:def 2;
per cases;
suppose x <> s;
then u.x = (DefSorts A).x & Q.x = (the Sorts of A).x
= (succ DefSorts A).x
= succ ((DefSorts A).x) by A0,A1,A2,Th58,SUCC,FUNCT_7:32;
hence u.x is Element of Q.x by ORDINAL1:6;
end;
suppose x = s;
then u.x = X & Q.x = succ X by A0,A1,BB,FUNCT_7:31;
hence thesis by ORDINAL1:6;
end;
end;
then reconsider u as ManySortedElement of Q;
set A0 = UndefMSAlgebra(#Q,Ch,u#);
deffunc U(SortSymbol of S) = {u.$1};
consider U being ManySortedSet of S such that
BZ: for x being SortSymbol of S holds U.x = U(x) from PBOOLE:sch 5;
deffunc U1(SortSymbol of S) = {(the undefined-map of A).$1};
consider U1 being ManySortedSet of S such that
B1: for x being SortSymbol of S holds U1.x = U1(x) from PBOOLE:sch 5;
D1: DefSorts A0 = Q(\)U & DefSorts A = (the Sorts of A)(\)U1 by B1,BZ,DEFS;
DS: DefSorts A0 = (DefSorts A)+*(s,X)
proof
let x be SortSymbol of S;
D2: (DefSorts A0).x = Q.x \ U.x & U.x = U(x) &
(DefSorts A).x = (the Sorts of A).x \ U1.x & U1.x = U1(x)
by BZ,B1,D1,PBOOLE:def 6;
per cases;
suppose x = s;
then Q.x = succ X & U(x) = {X} & succ X \ {X} = X &
((DefSorts A)+*(s,X)).x = X by BB,FUNCT_7:31,ORDINAL1:37;
hence (DefSorts A0).x = ((DefSorts A)+*(s,X)).x by D2;
end;
suppose x <> s;
then ((DefSorts A)+*(s,X)).x = (DefSorts A).x &
Q.x = (the Sorts of A).x & U(x) = {(DefSorts A).x}
by FUNCT_7:32;
hence (DefSorts A0).x = ((DefSorts A)+*(s,X)).x by D2,A2;
end;
end;
AB: A0 is bool-correct
proof
thus (DefSorts A0).the bool-sort of S
= (DefSorts A).the bool-sort of S by DS,Z3,FUNCT_7:32
.= BOOLEAN by BOOL2;
4+6 <= len the connectives of S by Z0,INT1;
then 1 <= len the connectives of S by XXREAL_0:2;
then
M0: 1 in dom the connectives of S by FINSEQ_3:25;
then (the connectives of S).1 in the carrier' of S by FUNCT_1:102;
then
M1: In((the connectives of S).1, the carrier' of S)
= (the connectives of S).1 by SUBSET_1:def 8;
1 in Seg 10;
then
M3: (the connectives of S).1 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).1, the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).1) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).1, the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).1, the carrier' of S), A0).{}
= TRUE by BOOL2;
let x,y be boolean set;
4+6 <= len the connectives of S by Z0,INT1;
then 2 <= len the connectives of S by XXREAL_0:2;
then
M0: 2 in dom the connectives of S by FINSEQ_3:25;
then (the connectives of S).2 in the carrier' of S by FUNCT_1:102;
then
M1: In((the connectives of S).2, the carrier' of S)
= (the connectives of S).2 by SUBSET_1:def 8;
2 in Seg 10;
then
M3: In((the connectives of S).2, the carrier' of S)
in (the connectives of S).:Seg 10 by M0,M1,FUNCT_1:def 6;
then Den(In((the connectives of S).2, the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).2) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).2, the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).2, the carrier' of S), A0).<*x*>
= 'not' x by BOOL2;
4+6 <= len the connectives of S by Z0,INT1;
then 3 <= len the connectives of S by XXREAL_0:2;
then
M0: 3 in dom the connectives of S by FINSEQ_3:25;
then (the connectives of S).3 in the carrier' of S by FUNCT_1:102;
then
M1: In((the connectives of S).3, the carrier' of S)
= (the connectives of S).3 by SUBSET_1:def 8;
3 in Seg 10;
then
M3: (the connectives of S).3 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).3, the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).3) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).3, the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).3, the carrier' of S), A0).<*x,y*>
= x '&' y by BOOL2;
end;
A0 is with_defined_elements
proof
thus DefSorts A0 is non-empty by DS;
end;
then reconsider A0 as bool-correct with_defined_elements strict
UndefMSAlgebra
over S by AB;
take A0;
thus DefSorts A0 c= the undefined-map of A0 by DS;
thus the undefined-map of A0 = DefSorts A0 by DS;
:: the Sorts of A0 = succ DefSorts A0
:: proof
:: let x be SortSymbol of S;
:: BB: dom the Sorts of A = the carrier of S & dom DefSorts A = the carrier of S
:: by PARTFUN1:def 2;
:: per cases;
:: suppose x = s;
:: then Q.x = succ X & (DefSorts A0).x = X by DS,BB,FUNCT_7:31;
:: hence (the Sorts of A0).x = (succ DefSorts A0).x by SUCC;
:: end;
:: suppose x <> s;
:: then Q.x = (the Sorts of A).x & (DefSorts A0).x = (DefSorts A).x &
:: x in the carrier of S by DS,FUNCT_7:32;
:: hence (the Sorts of A0).x = (succ DefSorts A0).x by DS,A2,Th58
:: .= succ ((DefSorts A0).x) by A2,SUCC
:: .= (succ DefSorts A0).x by SUCC;
:: end;
:: end;
DI: (DefSorts A0).I = INT by DS,A4,Z2,FUNCT_7:32;
thus A0 is (4,I) integer
proof
take K;
thus K = I & (the connectives of S).4 is_of_type {},K by A4;
thus (DefSorts A0).K = INT by DS,A4,Z2,FUNCT_7:32;
4+6 <= len the connectives of S by Z0,INT1;
then 4 <= len the connectives of S by XXREAL_0:2;
then
M0: 4 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).4, the carrier' of S)
= (the connectives of S).4 by FUNCT_1:102,SUBSET_1:def 8;
4 in Seg 10;
then
M3: (the connectives of S).4 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).4,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).4) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).4,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).4, the carrier' of S), A0).{} = 0
by A4;
4+6 <= len the connectives of S by Z0,INT1;
then 5 <= len the connectives of S by XXREAL_0:2;
then
M0: 5 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).5, the carrier' of S)
= (the connectives of S).5 by FUNCT_1:102,SUBSET_1:def 8;
5 in Seg 10;
then
M3: (the connectives of S).5 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).5,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).5) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).5,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).(4+1),
the carrier' of S), A0).{} = 1 by A4;
let i,j be Integer;
4+6 <= len the connectives of S by Z0,INT1;
then 6 <= len the connectives of S by XXREAL_0:2;
then
M0: 6 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).6, the carrier' of S)
= (the connectives of S).6 by FUNCT_1:102,SUBSET_1:def 8;
6 in Seg 10;
then
M3: (the connectives of S).6 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).6,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).6) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).6,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).(4+2),
the carrier' of S), A0).<*i*> = -i by A4;
4+6 <= len the connectives of S by Z0,INT1;
then 7 <= len the connectives of S by XXREAL_0:2;
then
M0: 7 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).7, the carrier' of S)
= (the connectives of S).7 by FUNCT_1:102,SUBSET_1:def 8;
7 in Seg 10;
then
M3: (the connectives of S).7 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).7,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).7) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).7,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).(4+3),
the carrier' of S), A0).<*i,j*> = i+j by A4;
4+6 <= len the connectives of S by Z0,INT1;
then 8 <= len the connectives of S by XXREAL_0:2;
then
M0: 8 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).8, the carrier' of S)
= (the connectives of S).8 by FUNCT_1:102,SUBSET_1:def 8;
8 in Seg 10;
then
M3: (the connectives of S).8 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).8,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).8) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).8,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).(4+4),
the carrier' of S), A0).<*i,j*> = i*j by A4;
hereby assume
M4: j <> 0;
4+6 <= len the connectives of S by Z0,INT1;
then 9 <= len the connectives of S by XXREAL_0:2;
then
M0: 9 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).9, the carrier' of S)
= (the connectives of S).9 by FUNCT_1:102,SUBSET_1:def 8;
9 in Seg 10;
then
M3: (the connectives of S).9 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).9,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).9) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).9,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).(4+5),
the carrier' of S), A0).<*i,j*> = i div j by M4,A4;
end;
4+6 <= len the connectives of S by Z0,INT1;
then
M0: 10 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).10, the carrier' of S)
= (the connectives of S).10 by FUNCT_1:102,SUBSET_1:def 8;
10 in Seg 10;
then
M3: (the connectives of S).10 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).10,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).10) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).10,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).(4+6), the carrier' of S), A0)
.<*i,j*> = IFGT(i,j,FALSE,TRUE) by A4;
end;
thus A0 is undef-consequent
proof
let o be OperSymbol of S;
let p be FinSequence such that
AA2: p in Args(o, A0);
given j being Nat, r being SortSymbol of S,a being Element of A0,r such
that
AA3: j in dom the_arity_of o & r = (the_arity_of o).j &
a = p.j & a is undefined;
let b be Element of A0, the_result_sort_of o; assume
AA4: b = Den(o,A0).p;
per cases;
suppose o in rng ((the connectives of S)|Seg 10);
then consider i being element such that
AA5: i in dom ((the connectives of S)|Seg 10) &
o = ((the connectives of S)|Seg 10).i
by FUNCT_1:def 3;
M0: i in dom the connectives of S by AA5,RELAT_1:57;
then reconsider i as Nat by AA5;
M1: In((the connectives of S).i, the carrier' of S)
= (the connectives of S).i = o
by M0,FUNCT_1:102,SUBSET_1:def 8,AA5,FUNCT_1:47;
MM: i in Seg 10 by AA5,RELAT_1:57;
then
M3: o in (the connectives of S).:Seg 10 by M0,M1,FUNCT_1:def 6;
then
M4: Den(In((the connectives of S).i,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).i) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).i,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
AAA: (the Sorts of A0).the bool-sort of S
= (the Sorts of A).the bool-sort of S &
(the Sorts of A0).I = (the Sorts of A).I by Z2,Z3,FUNCT_7:32;
AB2: the Sorts of A is Function of the carrier of S,
bool Union the Sorts of A &
the Sorts of A0 is Function of the carrier of S,
bool Union the Sorts of A0 by Lm2;
M6: (the Sorts of A)*the_arity_of o = (the Sorts of A0)*the_arity_of o
proof
per cases by MM,Th60b,ENUMSET1:def 8;
suppose i = 1 or i = 4 or i = 5;
then
M7: the_arity_of o = {} by M1,A1,A0,ThType;
hence (the Sorts of A)*the_arity_of o = {}
.= (the Sorts of A0)*the_arity_of o by M7;
end;
suppose i = 2;
then the_arity_of o = <*the bool-sort of S*> by M1,A1,ThType;
then (the Sorts of A)*the_arity_of o
= <*(the Sorts of A).the bool-sort of S*> &
(the Sorts of A0)*the_arity_of o
= <*(the Sorts of A0).the bool-sort of S*> by B0,FINSEQ_2:34;
hence thesis by AAA;
end;
suppose i = 3;
then the_arity_of o = <*the bool-sort of S,the bool-sort of S*>
by M1,A1,ThType;
then (the Sorts of A)*the_arity_of o
= <*(the Sorts of A).the bool-sort of S,
(the Sorts of A).the bool-sort of S*> &
(the Sorts of A0)*the_arity_of o
= <*(the Sorts of A0).the bool-sort of S,
(the Sorts of A0).the bool-sort of S*> by A0,AB2,FINSEQ_2:36;
hence thesis by AAA;
end;
suppose i = 6;
then the_arity_of o = <*I*> by M1,A0,ThType;
then (the Sorts of A)*the_arity_of o = <*(the Sorts of A).I*> &
(the Sorts of A0)*the_arity_of o = <*(the Sorts of A0).I*>
by A0,B0,FINSEQ_2:34;
hence thesis by AAA;
end;
suppose i = 7 or i = 8 or i = 9 or i = 10;
then the_arity_of o = <*I,I*> by M1,A0,ThType;
then (the Sorts of A)*the_arity_of o
= <*(the Sorts of A).I,(the Sorts of A).I*> &
(the Sorts of A0)*the_arity_of o
= <*(the Sorts of A0).I,(the Sorts of A0).I*>
by A0,AB2,FINSEQ_2:36;
hence thesis by AAA;
end;
end;
M5: Args(o,A) = product ((the Sorts of A)*the_arity_of o) by PRALG_2:3
.= Args(o,A0) by M6,PRALG_2:3;
M8: r = the bool-sort of S or r = I
proof
i = 1 or ... or i = 10 by MM,Th60b,ENUMSET1:def 8;
then the_arity_of o = {} or
the_arity_of o = <*the bool-sort of S*> or
the_arity_of o = <*the bool-sort of S,the bool-sort of S*> or
the_arity_of o = <*I*> or the_arity_of o = <*I,I*>
by M1,A0,A1,ThType;
then (rng the_arity_of o = {} or
rng the_arity_of o = {the bool-sort of S} or
rng the_arity_of o = {the bool-sort of S,the bool-sort of S} or
rng the_arity_of o = {I} or rng the_arity_of o = {I,I}) &
r in rng the_arity_of o
by AA3,FUNCT_1:def 3,FINSEQ_1:39,FINSEQ_2:127;
hence thesis by TARSKI:def 1,def 2;
end;
then reconsider c = a as Element of A,r by AAA;
M9: the_result_sort_of o = the bool-sort of S or the_result_sort_of o = I
proof
i = 1 or ... or i = 10 by MM,Th60b,ENUMSET1:def 8;
hence the_result_sort_of o = the bool-sort of S or
the_result_sort_of o = I
by M1,A0,A1,ThType;
end;
then reconsider d = b as Element of A, the_result_sort_of o by AAA;
BBB: (the undefined-map of A0).the bool-sort of S
= (the undefined-map of A).the bool-sort of S &
(the undefined-map of A0).I = (the undefined-map of A).I
by A2,DS,Z2,Z3,FUNCT_7:32;
a = (the undefined-map of A0).r by AA3,UNDEF;
then c is undefined by M8,BBB,UNDEF;
then d is undefined by AA2,AA3,AA4,M1,M4,M5,A2,UDCNS;
then d = (the undefined-map of A).the_result_sort_of o by UNDEF;
hence b is undefined by BBB,M9,UNDEF;
end;
suppose o nin rng ((the connectives of S)|Seg 10);
then o nin (the connectives of S).:Seg 10 by RELAT_1:115;
then o nin dom((the Charact of A)|((the connectives of S).:Seg 10))
by RELAT_1:57;
then
N1: Den(o,A0) = F.o by FUNCT_4:11 .= F(o) by F0;
Args(o,A0) = (Q#*the Arity of S).o;
hence b = ((the undefined-map of A)+*(s,X)).the_result_sort_of o
by AA2,AA4,N1,FUNCOP_1:7
.= (the undefined-map of A0).the_result_sort_of o by A2;
end;
end;
dom DefSorts A = the carrier of S by PARTFUN1:def 2;
hence (DefSorts A0).s = X by DS,Z1,FUNCT_7:31;
let I1 be SortSymbol of S;
assume ZZ0: I = I1; set D = A0, n = 4;
MM: (the Sorts of A0).I = (the Sorts of A).I by Z2,FUNCT_7:32;
let a be defined Element of (the Sorts of D).I1;
reconsider b = a as Element of (the Sorts of A).I1 by ZZ0,MM;
MN: (DefSorts A).I1 = (DefSorts A0).I1 & a in (DefSorts A0).I1
by DEF1,DS,Z2,ZZ0,FUNCT_7:32;
then reconsider b as defined Element of A,I1 by DEF1;
4+6 <= len the connectives of S by Z0,INT1;
then 4 <= len the connectives of S by XXREAL_0:2;
then
M0: 4 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).4, the carrier' of S)
= (the connectives of S).4 by FUNCT_1:102,SUBSET_1:def 8;
4 in Seg 10;
then
M3: (the connectives of S).4 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then
M4: Den(In((the connectives of S).4,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).4) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).4,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
LC: 4+6 <= len the connectives of S by Z0,INT1;
then 9 <= len the connectives of S by XXREAL_0:2;
then
M0: 9 in dom the connectives of S by FINSEQ_3:25;
then
M1: In((the connectives of S).9, the carrier' of S)
= (the connectives of S).9 by FUNCT_1:102,SUBSET_1:def 8;
9 in Seg 10;
then
M3: (the connectives of S).9 in (the connectives of S).:Seg 10
by M0,FUNCT_1:def 6;
then Den(In((the connectives of S).9,the carrier' of S), A0)
= ((the Charact of A)|((the connectives of S).:Seg 10))
.((the connectives of S).9) by M1,N2,FUNCT_4:13
.= Den(In((the connectives of S).9,the carrier' of S), A)
by M1,M3,FUNCT_1:49;
hence Den(In((the connectives of S).(n+5), the carrier' of S),D).
<*a, Den(In((the connectives of S).n, the carrier' of S),D).{}*>
= Den(In((the connectives of S).(n+5), the carrier' of S),A).
<*b, Den(In((the connectives of S).n, the carrier' of S),A).{}*> by M4
.= (the undefined-map of A).I1 by MM,ZZ0,UDD,A2
.= (the undefined-map of D).I1 by A2,ZZ0,Z2,FUNCT_7:32;
end;
registration
let S be 1-1-connectives (11,1,1)-array 11 array-correct (4,1) integer
bool-correct non empty non void BoolSignature;
cluster (11,1,1)-array (4,1) integer undef-consequent
limited-by-undefined
with_undefined_division_by_0 with_undefined_index_overflow for bool-correct
with_defined_elements strict UndefMSAlgebra over S;
existence
proof
11=10+1 & 4+6<=10; then
consider B being bool-correct non empty non void BoolSignature,
C being non empty non void ConnectivesSignature such that
A1: the BoolSignature of S = B+*C &
B is 10-connectives (4,1) integer & C is (1,1,1)-array &
the carrier of B = the carrier of C &
the carrier' of B = (the carrier' of S)\rng the connectives of C &
the carrier' of C = rng the connectives of C &
the connectives of B = (the connectives of S)|10 &
the connectives of C = (the connectives of S)/^10 by Th207;
reconsider B as (4,1) integer bool-correct non empty non void
BoolSignature by A1;
reconsider C as (1,1,1)-array non empty non void ConnectivesSignature
by A1;
AA: B tolerates C
proof
dom the Arity of B = the carrier' of B &
dom the Arity of C = the carrier' of C by FUNCT_2:def 1;
then dom the Arity of B misses dom the Arity of C by A1,XBOOLE_1:79;
hence the Arity of B tolerates the Arity of C by PARTFUN1:56;
dom the ResultSort of B = the carrier' of B &
dom the ResultSort of C = the carrier' of C by FUNCT_2:def 1;
then dom the ResultSort of B misses dom the ResultSort of C
by A1,XBOOLE_1:79;
hence the ResultSort of B tolerates the ResultSort of C by PARTFUN1:56;
end;
set s = ((the ResultSort of C).((the connectives of C).2));
Am: the carrier' of B misses the carrier' of C by A1,XBOOLE_1:79;
1+3 <= len the connectives of C by ARRAY1;
then 2 <= len the connectives of C by XXREAL_0:2;
then
Ac: 2 in dom the connectives of C by FINSEQ_3:25;
then
A3: s in the carrier of B by A1,FUNCT_1:102,FUNCT_2:5;
consider J,K,L being Element of C such that
A4: L = 1 & K = 1 & J <> L & J <> K &
(the connectives of C).1 is_of_type <*J,K*>, L &
(the connectives of C).(1+1) is_of_type <*J,K,L*>, J &
(the connectives of C).(1+2) is_of_type <*J*>, K &
(the connectives of C).(1+3) is_of_type <*K,L*>, J by ARRAY1;
Aa: s <> 1 by A4,TYPEOF;
Ab: the connectives of S = (the connectives of B)^the connectives of C
by A1,COMB;
Ad: the ResultSort of S = (the ResultSort of B)+*the ResultSort of C
by A1,Th190;
Ae: (the ResultSort of S).((the connectives of S).(11+1))
<> the bool-sort of S by A1,Ac,ARRAY3,RFINSEQ:def 3;
Af: len the connectives of B = 10 by A1,CONN;
then (the connectives of C).(1+1) = (the connectives of S).(10+(1+1)) &
(the connectives of C).(1+1) in the carrier' of C &
dom the ResultSort of C = the carrier' of C
by Ab,Ac,FUNCT_1:102,FINSEQ_1:def 7,FUNCT_2:def 1;
then (the ResultSort of S).((the connectives of S).(10+(1+1))) = s &
the bool-sort of B = the bool-sort of S by A1,COMB,Ad,FUNCT_4:13;
then consider A1 being bool-correct with_defined_elements strict
UndefMSAlgebra over B such that
A5: A1 is limited-by-undefined & the undefined-map of A1 = DefSorts A1 &
A1 is (4,1) integer undef-consequent & (DefSorts A1).s = INT^omega &
A1 is 4,1 with_undefined_division_by_0 by A3,Aa,Ae,Th213;
AB: B is 10-connectives by Af,CONN;
consider I being SortSymbol of B such that
A3: I = 1 &
(the connectives of B).4 is_of_type {},I & (DefSorts A1).I = INT &
Den(In((the connectives of B).4, the carrier' of B), A1).{} = 0 &
Den(In((the connectives of B).(4+1), the carrier' of B), A1).{} = 1 &
for i,j being Integer holds
Den(In((the connectives of B).(4+2), the carrier' of B), A1).<*i*> = -i &
Den(In((the connectives of B).(4+3), the carrier' of B), A1).<*i,j*>
= i+j &
Den(In((the connectives of B).(4+4), the carrier' of B), A1).<*i,j*>
= i*j &
(j <> 0 implies
Den(In((the connectives of B).(4+5), the carrier' of B), A1).<*i,j*>
= i div j) &
Den(In((the connectives of B).(4+6), the carrier' of B), A1).<*i,j*>
= IFGT(i,j,FALSE,TRUE) by A5,INT2;
consider A2 being with_defined_elements strict UndefMSAlgebra over C
such that
AX: A2 is limited-by-undefined & the undefined-map of A2 = DefSorts A2 &
A2 is (1,1,1)-array undef-consequent & DefSorts A2 tolerates DefSorts A1
and
AZ: for a being 0-based finite array of (DefSorts A2).1
for i being Integer st i nin dom a holds
Den(In((the connectives of C).1, the carrier' of C),A2).<*a,i*>
= (the undefined-map of A2).1 &
for x being Element of (DefSorts A2).1 holds
Den(In((the connectives of C).2, the carrier' of C),A2).<*a,i,x*>
= (the undefined-map of A2).the_result_sort_of
In((the connectives of C).2, the carrier' of C)
by A3,A5,Th212;
dom the Charact of A1 = the carrier' of B &
dom the Charact of A2 = the carrier' of C by PARTFUN1:def 2;
then dom the Charact of A1 misses dom the Charact of A2 by A1,XBOOLE_1:79;
then
BB: the Charact of A1 tolerates the Charact of A2 by PARTFUN1:56;
reconsider A = (B,A1)+*(C,A2) as strict UndefMSAlgebra over S by A1;
AY: the Sorts of A1 tolerates the Sorts of A2
proof let x;
assume x in (dom the Sorts of A1) /\ dom the Sorts of A2;
then
B1: x in dom the Sorts of A1 = the carrier of B = dom DefSorts A1 &
x in dom the Sorts of A2 = the carrier of C = dom DefSorts A2
by XBOOLE_0:def 4,PARTFUN1:def 2;
then x in (dom DefSorts A1) /\ dom DefSorts A2 by XBOOLE_0:def 4;
then
B2: (DefSorts A1).x = (DefSorts A2).x by AX,PARTFUN1:def 4;
hence (the Sorts of A1).x = (succ DefSorts A1).x by A5,Th58
.= succ ((DefSorts A1).x) by B1,A5,Th58,SUCC
.= (succ DefSorts A2).x by B1,B2,AX,SUCC
.= (the Sorts of A2).x by B1,AX,Th58;
end;
A4: A is with_defined_elements
proof
the UndefMSAlgebra of A = (B,A1)+*(C,A2);
then DefSorts A = (DefSorts A1)+*DefSorts A2 by A1,A5,AX,AY,Th217;
hence DefSorts A is non-empty;
end;
then (B,A1)+*(C,A2) is bool-correct by Am,A5,AX,AY,Th205,A1,XBOOLE_1:79;
then (DefSorts (B,A1)+*(C,A2)).the bool-sort of S = BOOLEAN &
DefSorts (B,A1)+*(C,A2) = DefSorts A &
Den(In((the connectives of B+*C).1, the carrier' of B+*C),
(B,A1)+*(C,A2)).{} = TRUE &
for x,y be boolean set holds
Den(In((the connectives of B+*C).2, the carrier' of B+*C),
(B,A1)+*(C,A2)).<*x*> = 'not' x &
Den(In((the connectives of B+*C).3, the carrier' of B+*C),
(B,A1)+*(C,A2)).<*x,y*> = x '&' y by BOOL2,A1,Th218;
then (DefSorts A).the bool-sort of S = BOOLEAN &
Den(In((the connectives of S).1, the carrier' of S), A).{} = TRUE &
for x,y be boolean set holds
Den(In((the connectives of S).2, the carrier' of S), A).<*x*> = 'not' x &
Den(In((the connectives of S).3, the carrier' of S), A).<*x,y*> = x '&' y
by A1;
then reconsider A = (B,A1)+*(C,A2) as bool-correct with_defined_elements
strict UndefMSAlgebra over S by A4,BOOL2;
take A;
11=10+1;
hence A is (11,1,1)-array by Am,A1,AB,A5,AY,AX,XBOOLE_1:79,Th206a;
thus A is (4,1) integer by Am,A1,AX,AY,A5,Th206,XBOOLE_1:79;
thus A is undef-consequent by AA,BB,Am,A1,AX,AY,A5,Th206a;
the undefined-map of A1 = DefSorts A1 &
the undefined-map of A2 = DefSorts A2 by A5,AX,LBU;
then the undefined-map of A1 tolerates the undefined-map of A2 &
the BoolSignature of S = B+*C &
the UndefMSAlgebra of A = (B,A1)+*(C,A2) by A1,AX;
hence A is limited-by-undefined by AY,A5,AX,Th208;
A is 4,1 with_undefined_division_by_0 by Am,A1,AX,AY,A5,Th206,XBOOLE_1:79;
hence A is with_undefined_division_by_0 by WUD;
A2 is 1,1,1-array by AX;
then ex J,K being Element of C st K = 1 &
(the connectives of C).(1) is_of_type <*J,1*>, K &
(DefSorts A2).J = ((DefSorts A2).K)^omega &
(DefSorts A2).1 = INT &
(for a being 0-based finite array of (DefSorts A2).K holds
(for i being Integer st i in dom a holds
Den((the connectives of C)/.(1),A2).<*a,i*> = a.i &
for x being defined Element of A2,K holds
Den((the connectives of C)/.(1+1),A2).<*a,i,x*> = a+*(i,x)) &
Den((the connectives of C)/.(1+2),A2).<*a*> = card a) &
for i being Integer, x being defined Element of A2,K st i >= 0 holds
Den((the connectives of C)/.(1+3),A2).<*i,x*> = i-->x by ARRAY2;
then
YY: (DefSorts A2).1 = INT;
now let a be 0-based finite array of INT;
let i be Integer; assume
Y1: i nin dom a;
hence Den(In((the connectives of C).1, the carrier' of C),A2).<*a,i*>
= (the undefined-map of A2).1 by YY,AZ;
let x be Integer; x is Element of (DefSorts A2).1 by YY,INT_1:def 2;
hence Den(In((the connectives of C).(1+1), the carrier' of C),A2).
<*a,i,x*> = (the undefined-map of A2).the_result_sort_of
In((the connectives of C).(1+1), the carrier' of C) by Y1,YY,AZ;
end;
then
XX: A is 4,1+10,1,the_result_sort_of
In((the connectives of S).(1+10+1), the carrier' of S)
with_undefined_index_overflow
by Th206b,AA,BB,AX,AY,A5,AB,Am,A1;
LC: 11+3 <= len the connectives of S by ARRAY1;
1 <= 12 <= len the connectives of S by LC,XXREAL_0:2;
then 12 in dom the connectives of S by FINSEQ_3:25;
then (the connectives of S).(12) in the carrier' of S by FUNCT_1:102;
then In((the connectives of S).(12), the carrier' of S)
= (the connectives of S).(12) by SUBSET_1:def 8;
then A is 4,11,1,the_array_sort_of S with_undefined_index_overflow
by XX;
hence A is with_undefined_index_overflow by IOUD;
end;
end;