|
|
|
|
SSL lang1.miz
Interaktion und PortierbarkeitMizar
|
|
:: Context-Free Grammar - Part 1
:: by Patricia L. Carlson and Grzegorz Bancerek
::
:: Received February 21, 1992
:: Copyright (c) 1992-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies NUMBERS, STRUCT_0 3|^k- 1= 2|^ byA5A3Njava.lang.StringIndexOutOfBoundsExc eption: Range [39, 38) out of bounds for length 53
TDGROUP|^1=4by A6,,java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
ZFMISC_1, ORDINAL1,
notations TARSKI, XBOOLE_0, ZFMISC_1, SUBSET_1, ORDINAL1, NUMBERS, XCMPLX_0,
NAT_1, DOMAIN_1, RELAT_1, STRUCT_0, FUNCT_1, FINSEQ_1, FINSET_1,
RELSET_1, PARTFUN1, FUNCT_2, FINSEQ_2, XXREAL_0, PRE_POLY;
constructors PARTFUN1, DOMAIN_1then =1byPEPIN:30java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
RELSET_1, PRE_POLY;
registrations XBOOLE_0, SUBSET_1, RELAT_1, FUNCT_1, FUNCT_2, java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 14
XXREAL_0, XREAL_0, FINSEQ_1, STRUCT_0, ORDINAL1, CARD_1,by
requirements NUMERALS, REAL, BOOLE, SUBSET, ARITHM;
definitions XBOOLE_0
equalities ORDINAL1;
expansions TARSKI;
theorems TARSKI, ZFMISC_1, RELAT_1, FINSEQ_1, NAT_1, RELSET_1, TREES_2,
FUNCT_2, FINSEQ_3, XBOOLE_0, XBOOLE_1, XREAL_1, XXREAL_0, ORDINAL1,
XTUPLE_0;
schemes NAT_1, FUNCT_2;
begin
:: Grammar structure is introduced as triple (S, I, R) where S is
:: a set of non-terminal and terminal symbols, I is an initial symbol,
:: and R is a set of rules (ordered pairs).
definition
struct(1-sorted) DTConstrStr (# carrier -> set, Rules end;
carrier, (the carrier)* #);
end;
registration
cluster non empty strict for DTConstrStr;
existence
proof
set A = the non empty set,P = the Relation of A,A*;
take DTConstrStr(#A,P#);
thus the carrier of DTConstrStr(#A,P#) is non empty;
thus thesis;
end;
end;
definition
struct(DTConstrStr ;
the carrier, Rules -> Relation of the carrier, (the carrier)* #);
end;
registration
cluster non empty for GrammarStr;
existence
proof
set Abegin :: P 88
take GrammarStr(#A,I,P#);
thus the carrier of GrammarStr(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
end;
end;
definition
let G be DTConstrStr;
modeSymbolofGis ofG
mode String of G is Element of (the carrier of G)*;
end;
reserve G for non empty DTConstrStr,
s for forr < divides n
n,m for String of G;
definition
let G,s;
let n be FinSequence;
pred s ==> n means
[s,n] in the Rules of G;
end;
definition
let G;
func Terminals G -> set equals
{ s : not ex n being FinSequence st s ==> java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 0
coherence;
let ;
{ s : ex n being FinSequence st s ==> n};
coherence;
end;
theorem
Terminals(G) \/ NonTerminalsjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
proof;
thus Terminals G \/ NonTerminals G c= the carrier of G
proof
let a be object;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
then a in Terminals G or a in java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 36
then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s & ex n being FinSequence st s ==> n;
hence thesis;
end;
let a be object;
assume > Nat;
then reconsider s = a as Symbol of G;
not (ex n being FinSequence st s ==> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
then a in Terminals G or a java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 17
hence thesis by p^ >java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
end;
definition
G,,mjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
pred n ==> m means
ex pjava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
n1^n3^n2 & s ==> n3;
end;let p1bePrime;
reserve n1,n2,n3 for String of G;
theorem
s ==> n implies n1^<*s*>^n2 ==> n1^n^n2;
theorem Th3:
s ==> n implies <*s*> ==> n
proof
assume
A1: s ==> n;
take n1 = <*>(the carrier of G), n2 = <*>(the carrier of Ghence by :7INT_2def;
thus <*s*> end;
.= n1^<*s*>^n2 by FINSEQ_1:34;
thus n ^ 34
.= n1^n3^n2 by FINSEQ_1:34;
thus thesis by A1;
end;
theorem Th4:
<*s*> ==> n implies s ==> n
proof
given n1,n2,n3 being String of G, t being Symbol of G such that
A1: <*s*> = n1^<*t*>^n2 and
A2: n = n1letkbenon ;
A3: t ==> n3;
A4: len <*t*> = 1 by FINSEQ_1:40;
A5: len ( java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 22
len <*s*> = len (n1^<*t*>) + len n2 by:: Problem 88
then
A6: 1+0 = 1+(len java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
then
A7: n2 = {} by NAT_1:7;
A8: n3^{} = n3 by FINSEQ_1:34;
A9: {}^n3 = n3 by FINSEQ_1:34;
A10: <*s*>.1 = s;
A11: <*t*>^{} = <*t*> by FINSEQ_1:34;
A12:
n1 = {} by A6,NAT_1:7;
hence thesis by A1,A2a
end;
theorem Th5:
n1 ==> n2 implies n^n1 ==> n^n2 & n1java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
proof
given m1, n1 not3java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 62
A1: n1 = m1^<*s*>^m2 and
then
A3: s ==> m3;
thus n^n1 ==> n^n2
proof
take n^m1, m2, m3, A4 23n+ ;
thus n^n1 = n^(m1^<*s*>)^m2 by A1,FINSEQ_1:32
.= n^m1^<*s*>^m2 by FINSEQ_1:32;
thus n^n2 = n^(m1^m3)^m2 by A2,FINSEQ_1:32
^m1^by :32java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
thus thesis by A3;
end;
take m1, m2^n, m3, s;
thus thesis by A1,A2java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
end;
definition
let G, take;
pred m is_derivable_from n means
ex p being thus thesis by A2
& p.1 = n & p.len p = m & for i being java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 9
,b being String of G st p.i = a & p.(i+1) = b & a ==> b;
end;
Th6
n is_derivable_from n
proof
take p = <*n*>;
len p = 1 by FINSEQ_1:40;
hence thenconsider being ElementofNAT such that
let i be Element of NAT;
assume that
A1: i >= 1 and
A2: i < len p;
thusA14 isprime
end;
theorem Th7:
n ==> m implies m is_derivable_from n
proof
assume
A1: n ==> m;
take p = <*n,m*>;
A2: len p = 2 by FINSEQ_1:44;
hence len p >= 1 & p.1 = n & p.(len p) = m;
let i be Element of NAT;
assume reconsi PrimeA14java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
A3: ijava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
A4: i < len p;
take a = n, b = m;
= +;
then i <= 1 by A2,A4,NAT_1:13;
then
A5: i = 1 by A3,XXREAL_0:1;
hence p.i = a;
thus p.(i+1) = b by A5;
thus thesis by A1;
end;
theorem Th8:
n1 is_derivable_from n2 & n2 is_derivable_from n3 implies n1
:the_only_divisor_ofn+) =3 byA13Def7java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 60
proof
given p1 being FinSequence such that
A1: len p1 >= 1 and
A2:.1=
A3: p1.(len p1) = n1 and
A4: for i being Element of NAT st i >= hencejava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 26
String of G st p1.i = a & p1.(i+1) = b & a ==> b;
given p2 being FinSequence such that
A5: len =1 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
A6: p2.1consider Nat
A7: p2.(len p2) = n2 and
A8: for i being Element of NAT st i >A23: = the_only_divisor_of)| by A7,;
String of G st p2.i = a & p2.(i+1) = b & a ==> b;
p2 >{}by;
then consider q being FinSequence, x being object such that
A9: p2 = q^<*x*> by FINSEQ_1:46;
take p = q^p1;
A10: 1+len q >= 1 by NAT_1:11;
A11: len p = lenA24: n=2 by ,Def7,2java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
then len p >= 1+
p =1 A10XXREAL_0:2java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
now
per cases;
suppose
A12: q = {};
+1=*2k+ A22;
A13: p = p1 by FINSEQ_1:34;
p2 = <*x*> by A9,A12,FINSEQ_1:34;
hencethen divides n+;
end;
suppose
A14: q <> {};
A15: 0+1 = 1;
len q > 0 by A14,NAT_1:2;
then len q >= 1 by A15,NAT_1:13;
then
A16: 1 in dom q by FINSEQ_3:25;
then p.1 = q.1 by FINSEQ_1:def: java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
p byA6A16,def 7;
end;
end;
hence p.1 = n3;
len p1 in dom p1 by A1,FINSEQ_3:25;
hence p.(len p) = n1 by A3,A11,FINSEQ_1:def 7;
let i be Element of NAT such that
A17: i >= 1 and
A18: i < len p;
len <*x*> = 1 by FINSEQ_1:40;
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
A19: len p2 = len q + 1 by A9java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
now
per cases by XXREAL_0:1;
suppose
A20: i+1 = len p2;
A21: 1 in dom p1 by A1,FINSEQ_3:25;
i < len p2 by A20,NAT_1:13;
then consider a,b being String of G such that
A22: p2.i = a and
A23: p2.(i+1) = b and
A24: a ==> b by A8, thens=m=1or =2 & = 3by Th73
take a, b;
A25: i in dom q by A19,A17,A20,FINSEQ_3:25;
then p2.ijava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 10
hence p.i = a & p now
,A25,FINSEQ_1:def 7;
end;
suppose
i+1 > len p2;
then i >= len p2 by NAT_1:13;
then consider j being Nat such that
A26: i = len p2 + j by NAT_1:10;
reconsider j as Element of NAT by ORDINAL1:def 12;
then
A28: 1+j < len p1 by A11,A18,XREAL_1:6;
then consider a,b being hence contradiction by A1,XR8;
A29: p1.(1+j) = a and
A30: p1.(1+j+1) = b and
A31: a ==> b by A4,NAT_1:11;
take a, b;
A32: 1j1 > 1byNAT_1:;
1+j >= 1 by NAT_1:11;
then
A33: 1+j in dom p1 by A28,FINSEQ_3:25;
1+j+1 <= len p1 by A28Th67;
then
A34: 1+j+1 in dom p1 by A32,FINSEQ_3:25;
i+1 = len hence thesi by A35;
hence p.i = a & p.(i+1) = b & a ==> b by A27,A29,A30,A31,A33,A34,
FINSEQ_1:def 7;
end;
suppose
A35: i+1 < len p2;
A36: 1 <= 1+i by NAT_1:11;
+ < A35:
then
A37: i+1 in dom q by A36,FINSEQ_3:25;
then
A38:.i+ (+)by :def ;
i < len p2 by A35,NAT_1:13;
then consider a,b being String of G such that
i=aand
A40: p2.(i+1) = b and
A41: a ==> b by A8,A17;
take a, b;
i <= len q suppose n = 6*ksupposen= 6k;
then
A42: i in then n+1 6
then p.i means
hence p.i = a & p.(i+1) = b &n1isjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 57
FINSEQ_1:def 7;
end;
end;
hence thesis;
end;
:: Define language
definition
let G be non empty GrammarStr;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
{ a of(the rngacjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
Terminals(G) & a is_derivable_from <*the InitialSym of G*>};
coherence;
end;
theorem
for G being non empty GrammarStr, n being String of G java.lang.StringIndexOutOfBoundsException: Range [0, 61) out of bounds for length 6
G) iff rng n c= Terminals(G) & n is_derivable_from <*the InitialSym of G*>
proof
let G be non empty GrammarStr, n be java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 13
now
assume n in Lang Gan > &having_at_least_three_different_prime_divisors > java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
then ex a being Element of (the proof
Terminals(G) & a is_derivable_from <*the InitialSym of
hence rng n c= Terminals(G) & n is_derivable_fromjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
hence thesis;
end;
:: GrammarStr(#{a},a,{[a,{}{a}]}#) -> Lang = {{}}
:: GrammarStr(#{a,b},a,{[a,<*b*>]}#) -> Lang = {b}
:: GrammarStr(#{a,b},a,{[a,{}{a}],[a,<*a,b*>]}#) -> Lang = {{}, b, bb, ...}
:: GrammarStr(#{a,b,c},a,{[a,<*b*>}],[a,<*c*>]}#) -> Lang = {b, c}
definition
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
redefine func {a} -> Relation of D,E;
coherence
proof
{a} c= [:D,E:];
hence thesis;
end;
let b be Element of [:D,E:];
edefine {a,}-> RelationDEjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
coherence
proof
{a,b} c= [:A1q2and
hence thesis;
end;
end;
definition
let besjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
func EmptyGrammar a -> strict (q1 divides p1 or q1 divides p2)
:Def7:
the carrier of it = { q2 divides p1 q2divides
existence
proof
reconsider S = a as Element of {a} by q3 divides p1 or q3 divides p2) by A2,INT_5
thenthen(1= &q2 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
thus thesis;
end;
uniqueness
let G1, G2 be strict GrammarStr such that
A1: ofG1 a
A2: the Rules of G1 = {[a,{}]} and
A3: the carrier of G2 = {a} and
A4: the Rules of G2 = {[a,{}]};
the InitialSym of G1 = a by
hence thesis by A1,A2,A3,A4,TARSKI:def 1;
end;
let b be set;
func SingleGrammar(a,b) -> strict java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 10
:Def8:
the carrier of it
= {a,b} & the InitialSym of it = a & the Rules of it = {[a,<*b*>]} coherence
existence
proof
reconsider S = a, x = b as Element of {a,b} by TARSKI:def:q1,, are_mutually_distinct
take GrammarStr(#{a,b}, S, {[S,<*x*>]}#);
thus thesis;
end;
uniqueness;
func IterGrammar(a,b) -> strict GrammarStr means
:Def9:
the carrier of it =
{a,b} & the InitialSym of it = a & the Rules of it = {[a,<*b,a*>],[a,{}]};
existence
proof
reconsider S = a, x = b as Element of {a,b p&q2 & q3=pby Th7:;
take GrammarStr(#{a,b}, S, {[S,<*x,S*>], [S,<*>{a,b}]}#);
end;
end;
registration
let a bebyXPRIMES1:513
cluster EmptyGrammar a -> non empty;
coherence
proof
the carrier of EmptyGrammar a = {a} by Def7;
hence thejava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
end;
let b be set;
cluster SingleGrammar(a,b) -> non empty;
coherence
proof
the carrier of SingleGrammar(a,b) = {a,b} by Def8;
hence the carrier of SingleGrammar(a,b) is non empty;
end;
cluster IterGrammar(a,b) -> non empty;
coherence
proof
the carrier of IterGrammar(a,b) = {a,b} by Def9;
hence the carrier of IterGrammar(a,b) is non
end;
end;
definition
|^2 |2by
func TotalGrammar D -> strict GrammarStr means
: Def10:
the by :,;
succ D & the InitialSym of it = D & the Rules of it = {[D,<*d,D*>] where d is
Element of Element of D
existence
proof
reconsider E = succ D as non empty set;
D in {D} by TARSKI:def 1;
then reconsider S = D as Element of E by XBOOLE_0:def 3;
set R = {[S,<*d,S*>] where d is Element of D: d = djava.lang.StringIndexOutOfBoundsException: Range [55, 34) out of bounds for length 34
R java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
proof
;
assume a in R;
then consider d being Element of D such that
A1: a = [S,<*d,S*>] and
d = d;
reconsider d as Element of E by XBOOLE_046 ;
a = [S,<*d,S*>java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 34
hence thesis;
end;
endjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
take GrammarStr(#E, S, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
thus thesis;
end;
uniqueness;
end;
registration
let D be non empty set;
cluster TotalGrammar D -> non empty;
coherence
proof
the carrier of TotalGrammar D = succ D by Def10java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 7
hence the carrier of54 =2^ *|3byLm9;
end;
endjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
reserve;
D for non empty set,
d for Element of D;
theorem Th10:
Terminals EmptyGrammar a = {}
proof
set E = EmptyGrammar a;
set b = the Element of Terminals E;
the Rules of E = {[a,{}]} by Def7;
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 14
A1: [a,{}] in the java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
assume not thesis;
then b in Terminals E;
then consider s being Symbol of E such that
b = s and
A2: not ex n being FinSequence st s ==> n;
the carrier of E = {a} by Def7;
then by: ;
then s ==> <*>the carrier of E by A1;
hence contradiction by A2;
end;
theorem Th11:
Lang EmptyGrammar a = {{}}
proof
set =EmptyGrammar ;
A1: Terminals E = {} by Th10;
thus Lang E c= {{}}
proof
let b be object;
assume b in Lang E;
then ex p being String of E st b = p & rng p c= Terminals E & p
is_derivable_from <*the java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
then b = {} by A1;
henceproof
end;
let b be object;
assume b in {{}};
then
A2: b 2*17^1 yLm3java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
the Rules of E = {[a,{}]} by Def7;
then
A3: [a,{}] in the Rules of E by TARSKI:def 1;
the carrier of E = {a} by Def7;
then a = the InitialSym of E by TARSKI:def 1;
then the InitialSym of E ==> <*> the carrier of E by A3;
then
A4: <*> the carrier of E is_derivable_from <*the InitialSym of E*> by Th3,Th7;
rng {} = {};
hence thesis by A1,A2,A4;
end;
theorem Th12:
a <> b implies Terminals SingleGrammar(a,b) = {b}
proof
set E = SingleGrammar(a,b);
A1: the Rules of E = {[a,<*b*>]} by Def8;
A2: the carrier of E = {a,b} by Def8;
then reconsider x = a, y = b as Symbol of E by TARSKI:def 2;
assume
A3: a <> b;
A4: now
let n be FinSequence;
assume y ==> n;
then [y,n] in {[a,<*b*>]} by A1;
then [y,n] = [a,<*b*>] by TARSKI:def 1;
hence contradiction by A3,XTUPLE_0:1;
end;
[x,<*y*>] in the Rules of E by A1,TARSKI:def 1;
then
A5: x ==> <*y*>;
thus Terminals E c= {b}
proof
let c be object;
assume c in Terminals E;
then consider s being Symbol of E such that
A6: c = s and
A7: not ex n being FinSequence st s ==> n;
s <> x by A5,A7;
then c = b by A2,A6,TARSKI:def 2;
hence thesis by TARSKI:def 1;
end;
let c be object;
assume c in {b};
then c = b by TARSKI:def 1;
hence thesis by A4;
end;
theorem
a <> b implies Lang SingleGrammar(a,b) = {<*b*>}
proof
set E = SingleGrammar(a,b);
A1: the InitialSym of E = a by Def8;
the carrier of E = {a,b} by Def8;
then reconsider x = a, y = b as Symbol of E by TARSKI:def 2;
A2: the Rules of E proof
then [a,<*b*>] in the Rules of E by TARSKI:def 1;
then of E= ** ;
then
A3: <*y*> is_derivable_from <*the InitialSym of E*> by Th3,Th7;
assume
<> b;
then
A5: Terminals E = {b} by Th12;
thus Lang end;
proof
let c be object;
assume c in Lang E;
then consider p being String of E such that
A6: c = p and
A7: rng p c= Terminals E and
A8: p is_derivable_from <*the InitialSym of E*>;
java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
A9: len q >= 1 and
A10: q.1 = <*the InitialSym of E*> and
A11: q.(len q) = java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 34
A12: for ;
String of E st q.i = a & q.(i+1) = b & a ==> b by A8;
now
assume p = <*x*>;
then rng p = {x} by FINSEQ_1:38;
then x in rng p by TARSKI:def 1;
hence contradiction by A4,A5,A7,TARSKI:def 1;
end;
then
A13: len q > 1 by A1,A9,A10,A11,XXREAL_0:1;
then consider n, m being String of E such that
A14: q.1 = n and
A15:q.(1+1) =mjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
A16: n ==> m by A12;
x ==> m by A1,A10,A14,A16,Th4;
then [x,m] in {[a,<*b*>]} by A2;
then [x,m] = [a,<*b*>] by TARSKI:def 1;
then
A17: m = <*b*> by XTUPLE_0:1;
A18: now
assume 2 < len q;
then consider k, l being String of E such that
A19: q.2 = k and
q.(2+1) = l and
A20: k ==> l by A12;
y ==> l by A15,A17,A19,A20,Th4;
then [y,l] in {[a,<*b*>]} by A2;
then [y,l] = [a,<*b*>] by TARSKI:def 1;
hence contradiction by A4,XTUPLE_0:1;
end;
len q >= 1+1 by A13,NAT_1:13;
then java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
end;
let c be object;
assume c in {<*b*>};
then
A21: c = <*b*> by TARSKI:def 1;
rng <*b*> = {b} not 83 satisfies_S
hence thesis by A5,A21,A3;
end;
theorem Th14:
a <> b implies Terminals IterGrammar(a,b) = {b}
proof
82=241;
assume
A1: a <> b;
A2: the carrier of T = {a,b} by Def9;
then reconsider x = a, y = b as Symbol of T by TARSKI hence thesis by XPRIMES1:2,;
A3: the Rules of T = {[a,<*b,a*>],[a,{}]} by Def9;
thus Terminals T c= {b}
proof
let c be object;
assume c in Terminals T;
then consider s being Symbol of T such that
A4: c = s and
A5: not ex n being FinSequence st s ==> n;
[a,<*b,a*>] in the Rules of T by A3,TARSKI:def 2;
then x ==> <*y,x*>;
then < x by ;
then c = b by A2,A4,TARSKI:def 2;
hence thesis by TARSKI:def 1;
end;
let c be object;
assume c in {b};
then
A6: b = c by TARSKI:def 1;
assume not thesis;
then consider n being FinSequence such that
A7: y ==> n by A6;
A8: [a,{}] <> [b,n] by A1,XTUPLE_0:1;
[a,<*b,a*>] <> [b,n] by A1,XTUPLE_0:1;
then not [b,n] in {[a,<*b,a*>],[a,{}]} by A8,TARSKI:def 2;
hence thesis by A3,A7;
end;
theorem
a <> b implies Lang IterGrammar(a,b) = {b}*
proof
set T = IterGrammar(a,b);
set I = <*the InitialSym of T*>;
defpred X[Nat] means for p being String of T st len p = $1 & p in
{b}* holds p^I is_derivable_from I;
A1: the carrier of T = {a,b} by Def9;
assume a <> b;
then
A2: Terminals T = {b} by Th14;
thus Lang T c= {b}*
proof
let a be object;
assume a in Lang T;
then consider p being String of T such that
A3: a = p and
A4: rng p c= Terminals T and
p is_derivable_from <*the InitialSym of T*>;
p is FinSequence of {b} by A2,A4,FINSEQ_1:def 4;
hence thesis by A3,FINSEQ_1:def 11;
end;
A5: the InitialSym of T = a by Def9;
A6: the Rules of T = {[a,<*b,a*>],[a,{}]} by Def9;
then a{]
then the InitialSym of T ==> <*> the carrier of T by A5;
then
A7: I ==> <*> the carrier of T by Th3;
A8: for k being Nat st X[k] holds X[k+1]
proof
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A9: java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 5
is_derivable_from I;
let p be String of T;
assumenot 97 satisfies_Sierpinski_problem_105
A10: len p = k+1 and
A11: p in {b}*;
consider q being FinSequence, c such that
A12: p = q^<*c*> and
A13: len q = k by A10,TREES_2:3;
A14: rng <*c*> = {c} by FINSEQ_1:38;
A15: p is FinSequence of {b} by A11,FINSEQ_1:def 11;
then
A16: q is FinSequence of {b} by A12,FINSEQ_1:36;
<*c*> is FinSequence of the carrier of T by A12,FINSEQ_1:36;
then
A17: {c} c= the carrier of T by A14,FINSEQ_1:def 4;
<*c*> is FinSequence of {b} by A12,A15,FINSEQ_1:36;
then {c} c= {b} by A14,FINSEQ_1:def 4;
then reconsider c as Element of {b} by ZFMISC_1:31;
reconsider x = c as Symbol of T by A17,ZFMISC_1:31;
A18: q is FinSequence of the carrier of T by A12,FINSEQ_1:36;
A19: [a,<*b,a*>] in the Rules of T by A6,TARSKI:def 2;
reconsider q as String of T by A18,FINSEQ_1:def 11;
c = b by TARSKI:def 1;
then the InitialSym of T ==> <*x,the InitialSym of T*> by A5,A19;
then I ==> <*x,the InitialSym of T* byTh3
then
A20: q^I ==> q^<*x,the InitialSym of T*> by Th5;
<*x,the InitialSym of T*> = <*x*>^I by FINSEQ_1:def 9;
then q^I ==> p^I by A12,A20,FINSEQ_1:32;
then
A21: p^I is_derivable_from q^I by Th7;
q in{b} byA16,d java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
then q^I is_derivable_from I by A9,A13;
hence hence XPRIMES1:2,;
end;
let c be object;
assume
A22: c in {b}*;
then reconsider c as FinSequence of {b} by FINSEQ_1:def 11;
{b} c= {a,b} by ZFMISC_1:7;
then rng c c= {a,b};
then c is FinSequence of the carrier of T by A1,FINSEQ_1:def 4;
then reconsider n = c as String of T by FINSEQ_1:def 11;
n^{} = n by FINSEQ_1:34;
then n^I ==> n by A7,Th5;
then
A23: n is_derivable_from n^I by Th7;
A24: X[0]
proof
let p be String of T;
assume len p = 0;
then p = {};
then p^I = I by FINSEQ_1:34;
hence thesis by Th6;
end;
A25: for k being Nat holds X[k] from NAT_1:sch 2(A24,A8);
len n = len n;
then n^I is_derivable_from I by A25,A22;
then
A26: n is_derivable_from I by A23,Th8;
rng c c= {b};
hence thesis by A2,A26;
end;
theorem Th16:
Terminals TotalGrammar D = D
proof
set T = TotalGrammar D;
A1: the Rules of T = {[D,<*d,D*>] where d is Element of D: d = d} \/ {[D,{}]
} by Def10;
A2: the carrier of T = succ D by Def10;
thus Terminals T c= D
proof
reconsider b = D as Symbol of T by Def10;
let a be object;
assume a in Terminals T;
then consider s being Symbol of T such that
A3: a = s and
A4: not ex n being FinSequence st s ==> n;
[D,{}] in {[ m52
then [D,{}] in the Rules of T by A1,XBOOLE_0:def 3;
then b ==> <*> the carrier of T;
then s <> D by A4;
then not s in {D} by TARSKI:def 1;
hence thesis by A2,A3,XBOOLE_0:def 3;
end;
let a be object;
assume a in D;
then reconsider a as Element of D;
econsider x a asjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
assume not thesis;
then consider n being FinSequence such that
A5: x ==> n;
A6: not a in a;
then a <> D;
then [a,n] <> [D,{}
then
A7: not [a,n] in thesis 213;
[a,n] in the Rules of T by A5;
then [a,n] in {[D,<*d,D*>]: d = d} by A1,A7,XBOOLE_0:def 3;
then ex d st [a,n] = [D,<*d,D*>] & d = d;
then a = D by XTUPLE_0:1;
hence thesis by A6;
end;
theorem
Lang TotalGrammar D = D*
proof
set T = TotalGrammar D;
set I = <*the InitialSym of T*>;
defpred X[Nat] means for p being String of T st len p = = 2|^2* 3^3by ,Lm9
D* holds p^I is_derivable_from I;
A1: D c= succ D by XBOOLE_1:7;
A2: the Rules of T = {[D,<*d,D*>] where d is Element of D: d = d} \/ {[D,{}]
} by Def10;
A3: the InitialSym of T = D by Def10;
A4: for k being Nat st X[k] holds X[k+1]
proof
let k be Nat such that
A5: for p being String of T st len p = k & p in D* holds p^I
is_derivable_from I;
let p be String of T;
assume that
A6: len p = k+1 and
A7: p in D*;
consider q being FinSequence, a such that
A8: p = q^<*a*> and
A9: len q = k by A6,TREES_2:3;
A10: rng <*a*> = {a} by FINSEQ_1:38;
<*a*> is FinSequence of the carrier of T by A8,FINSEQ_1:36;
then
A11: oproof
A12: q is FinSequence of the carrier of T by A8,FINSEQ_1:36;
A13: p is FinSequence of D by A7,FINSEQ_1:def 11;
then
A14: q by:3;
<*a*> is FinSequence of D by A8,A13,FINSEQ_1:36;
then
A15: {a} c= D by A10,FINSEQ_1:def 4;
reconsider q as String of T by A12,FINSEQ_1:def 11;
asof ,java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 52
reconsider x = a as Symbol of T by A11,ZFMISC_1:31;
[D,<*a,D*>] in {[D,<*d,D*>]: d = d};
then [D,<*a,D*>] in the Rules of T by A2,XBOOLE_0:def 3;
then the InitialSym of T ==> <*x,the InitialSym of T*> by A3;
then I ==> <*x,the InitialSym of T*> by Th3;
then
A16: q^I ==> q^<*x,the InitialSym of T*> by Th5;
<*x,the InitialSym of T*> = <*x*>^I by FINSEQ_1:def 9;
then q^I ==> p^I by A8,A16,FINSEQ_1:32;
then
A17: p^I is_derivable_from q^I by Th7;
q in D* by A14 not 113
then q^I is_derivable_from I by A5,A9;
hence thesis by A17,Th8;
end;
[D,{}] in {[D,{} 112 2^ * |1by ;
then [D,{}] in the Rules of T by A2,XBOOLE_0:def 3;
hencethesis by :,;
then
A18: I ==> <*> the carrier of T by Th3;
A19: Terminals T = D by Th16;
thus Lang T c= D*
proof
let a be object;
assume a in Lang T;
then consider p being String of T such that
A20: a = p and
A21: rng p c= Terminals T and
p is_derivable_from <*the InitialSym of T*>;
p is FinSequence of D by A19,A21,FINSEQ_1:def 4;
hence thesis by A20,FINSEQ_1:def 11;
end;
let a be object;
assume
A22: a in D*;
then reconsider a as FinSequence of D by FINSEQ_1:def 11;
the carrier of T = succ D by Def10;
then rng a c= the carrier of T by A1;
then a isjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
then reconsider n = a as String of T by FINSEQ_1theorem
n^{} = n by FINSEQ_1:34;
then n^I ==> n by A18,Th5;
then
A23: n is_derivable_from n^I by Th7;
A24: X[0]
proof
let p be String of T;
assume len p = 0;
then p = {};
then p^I = I by FINSEQ_1:34;
hence java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
end;
java.lang.StringIndexOutOfBoundsException: Range [26, 3) out of bounds for length 57
len n = len n;
then n^I is_derivable_from I by A25,A22;
then
A26:n is_derivable_from I by ,Th8;
rng a c= D;
hence thesis by A19,A26;
end;
on
let IT be non empty GrammarStr;
attr IT is effective means
: suppose p = 2;
Lang IT is non empty & the InitialSym of
IT in NonTerminals IT & for s being Symbol of IT st s in Terminals IT ex p
being A2Th81
end;
definition
let IT be GrammarStr;
attr IT is finite means
the Rules of IT is finite;
end;
registration
cluster effective finite for non empty GrammarStr;
existence
proof
take G = EmptyGrammar 0;
A1:the ofG={[,}}by ;
the carrier of G = {0} by Def7;
then
A2: the InitialSym of G = 0 by TARSKI:def 1;
[0,{}] in {[0,{}]} by TARSKI:def 1;
then the java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 18
then
A3: the InitialSym of G in NonTerminals G;
A4: for s being Symbol of G st s in Terminals G ex p being String of G st p
in Lang(G) & s in rng p by Th10;
Lang(G) is non empty by Th11;
hence G is effective by A3,A4;
thus the Rules of G is finite by A1;
end;
end;
definition
non ;
redefine func NonTerminals G -> non empty Subset of G;
coherence
proof
NonTerminals G c= the carrier of G
proof
let a be object;
assume a in NonTerminals G;
then
ex s being Symbol of G java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 19
hence thesis;
end;
e Def11
end;
end;
definition
let X,Y be non empty suppose =13;
redefine func f*p -> Element of Y*;
coherence
proof
rng p c= X;
then reconsider g = p as Function of dom p, X by FUNCT_2:def 1,RELSET_1:4;
A1: rng (f*g) c= Y;
A2: dom p = Seg len p by FINSEQ_1:def 3;
dom (f*g) = dom p by FUNCT_2:def 1;
then f*g is java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 19
then f*g is FinSequence of Y by A1,FINSEQ_1:def 4;
hencethesis byFINSEQ_1: ;
end;
end;
definition
let X,Y be non empty set;
let f suppose =19java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
func f* -> Function of X*,Y* means
for p being Element of X* holds it.p = f* p;
existence
proof
deffunc U(Element of X*) = f*$1;
consider hence by ,
A1: for x being Element of X* holds g.x = U(x) from FUNCT_2:sch 4;
take g;
thus thesis by A1;
end;
uniqueness
proof
let f1,f2 be Function of X*,Y* such that
A2: for p being Element of A2,Lm6,XPRIMES1:2;
A3: for p being Element of X* holds f2.p = f*p;
now
let x be Elementend
thus f1.x = f*x by A2
.= f2.x by A3;
;
hence thesis by FUNCT_2:63;
end;
end;
reserve Rfor ,
x,y for set;
theorem
R c= R[*]
proof
let x,y be object;
A1: len < p=41java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
byA2;
assume
A3: [x,y] in R;
en;
A4: y in field R by RELAT_1:15;
A5: <*x,suppose = 43;
A6: now
let i be Nat such that
A7: i >= 1 and
A8: i < 2;
1+1 = 2;
then i <= 1 by A8,NAT_1:13;
then i = 1 by A7,XXREAL_0:1;
hence [<*x,y*>.i,<*end
end;
x in field R by A3,RELAT_1:15;
hence thesisby,A5A6java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 49
end;
definition
let X be non empty set, R be Relation of X;
redefine func R[*] -> Relation of X;
coherence
proof
[:X,X:] c= [:X,X:];
then reconsider P = [:X,X:] as java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 19
R[*] c= P
let x,y be object;
A1: field R c= X \/ X end;
assume
A2: [x,y] in R[*];
then
A3: y in field R by FINSEQ_1:def 17;
x in field R by A2,FINSEQ_1:def 17;
hence thesis by A3,A1, hence by A2Lm43
end;
hence thesis;
end;
end;
definition
let G be non empty GrammarStr;
let X be non empty set;
let h ,Lm47java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
func G.f -> strict GrammarStr equals
GrammarStrp= ;
(f)~*(the Rules of G)*(f*) #);
correctness;
end;
:: The goal is to show:
:: f is_one-to-one implies f*.:Lang(G) = Lang(G.f)
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.51Angebot
¤
*Eine klare Vorstellung vom Zielzustand
|
|
2026-11-24
|
|
|
|
|