begin
:: deftheorem defines AllSymbolsOf FOMODEL1:def 1 :
for S being Language-like holds AllSymbolsOf S = the carrier of S;
:: deftheorem defines LettersOf FOMODEL1:def 2 :
for S being Language-like holds LettersOf S = the adicity of S " {0};
:: deftheorem defines OpSymbolsOf FOMODEL1:def 3 :
for S being Language-like holds OpSymbolsOf S = the adicity of S " (NAT \ {0});
:: deftheorem defines RelSymbolsOf FOMODEL1:def 4 :
for S being Language-like holds RelSymbolsOf S = the adicity of S " (INT \ NAT);
:: deftheorem defines TermSymbolsOf FOMODEL1:def 5 :
for S being Language-like holds TermSymbolsOf S = the adicity of S " NAT;
:: deftheorem defines LowerCompoundersOf FOMODEL1:def 6 :
for S being Language-like holds LowerCompoundersOf S = the adicity of S " (INT \ {0});
:: deftheorem defines TheEqSymbOf FOMODEL1:def 7 :
for S being Language-like holds TheEqSymbOf S = the ZeroF of S;
:: deftheorem defines TheNorSymbOf FOMODEL1:def 8 :
for S being Language-like holds TheNorSymbOf S = the OneF of S;
:: deftheorem defines OwnSymbolsOf FOMODEL1:def 9 :
for S being Language-like holds OwnSymbolsOf S = the carrier of S \ { the ZeroF of S, the OneF of S};
:: deftheorem defines AtomicFormulaSymbolsOf FOMODEL1:def 10 :
for S being Language-like holds AtomicFormulaSymbolsOf S = (AllSymbolsOf S) \ {(TheNorSymbOf S)};
:: deftheorem defines AtomicTermsOf FOMODEL1:def 11 :
for S being Language-like holds AtomicTermsOf S = 1 -tuples_on (LettersOf S);
:: deftheorem defines operational FOMODEL1:def 12 :
for S being Language-like holds
( S is operational iff not OpSymbolsOf S is empty );
:: deftheorem defines relational FOMODEL1:def 13 :
for S being Language-like holds
( S is relational iff not (RelSymbolsOf S) \ {(TheEqSymbOf S)} is empty );
:: deftheorem DefLiteral defines literal FOMODEL1:def 14 :
for S being Language-like
for s being Element of S holds
( s is literal iff s in LettersOf S );
:: deftheorem DefLowCompounding defines low-compounding FOMODEL1:def 15 :
for S being Language-like
for s being Element of S holds
( s is low-compounding iff s in LowerCompoundersOf S );
:: deftheorem DefOperational defines operational FOMODEL1:def 16 :
for S being Language-like
for s being Element of S holds
( s is operational iff s in OpSymbolsOf S );
:: deftheorem DefRelational defines relational FOMODEL1:def 17 :
for S being Language-like
for s being Element of S holds
( s is relational iff s in RelSymbolsOf S );
:: deftheorem DefTermal0 defines termal FOMODEL1:def 18 :
for S being Language-like
for s being Element of S holds
( s is termal iff s in TermSymbolsOf S );
:: deftheorem DefOwn defines own FOMODEL1:def 19 :
for S being Language-like
for s being Element of S holds
( s is own iff s in OwnSymbolsOf S );
:: deftheorem DefOfAtomicFormula defines ofAtomicFormula FOMODEL1:def 20 :
for S being Language-like
for s being Element of S holds
( s is ofAtomicFormula iff s in AtomicFormulaSymbolsOf S );
:: deftheorem DefTrivialArity1 defines TrivialArity FOMODEL1:def 21 :
for S being ZeroOneStr
for s being Element of the carrier of S \ { the OneF of S} holds
( ( s = the ZeroF of S implies TrivialArity s = - 2 ) & ( not s = the ZeroF of S implies TrivialArity s = 0 ) );
:: deftheorem DefTrivialArity2 defines TrivialArity FOMODEL1:def 22 :
for S being non degenerated ZeroOneStr
for b2 being Function of ( the carrier of S \ { the OneF of S}),INT holds
( b2 = S TrivialArity iff for s being Element of the carrier of S \ { the OneF of S} holds b2 . s = TrivialArity s );
Lm6:
for S being non degenerated ZeroOneStr holds (S TrivialArity) . the ZeroF of S = - 2
:: deftheorem DefEligible defines eligible FOMODEL1:def 23 :
for S being Language-like holds
( S is eligible iff ( not LettersOf S is finite & the adicity of S . (TheEqSymbOf S) = - 2 ) );
Lm7:
ex S being Language-like st
( not S is degenerated & S is eligible )
Lm5:
for S being non degenerated Language-like holds TheEqSymbOf S in (AllSymbolsOf S) \ {(TheNorSymbOf S)}
theorem Lm8:
:: deftheorem defines ar FOMODEL1:def 24 :
for S being Language
for s being ofAtomicFormula Element of S holds ar s = the adicity of S . s;
:: deftheorem defines -cons FOMODEL1:def 25 :
for S being Language holds S -cons = (AllSymbolsOf S) -concatenation ;
:: deftheorem defines -multiCat FOMODEL1:def 26 :
for S being Language holds S -multiCat = (AllSymbolsOf S) -multiCat ;
:: deftheorem defines -firstChar FOMODEL1:def 27 :
for S being Language holds S -firstChar = (AllSymbolsOf S) -firstChar ;
:: deftheorem DefSPrefix defines -prefix FOMODEL1:def 28 :
for S being Language
for X being set holds
( X is S -prefix iff X is AllSymbolsOf S -prefix );
:: deftheorem defines Compound FOMODEL1:def 29 :
for S being Language
for s being ofAtomicFormula Element of S
for Strings being set holds Compound (s,Strings) = { (<*s*> ^ ((S -multiCat) . StringTuple)) where StringTuple is Element of ((AllSymbolsOf S) *) * : ( rng StringTuple c= Strings & StringTuple is abs (ar s) -element ) } ;
:: deftheorem DefTerm defines -termsOfMaxDepth FOMODEL1:def 30 :
for S being Language
for b2 being Function holds
( b2 = S -termsOfMaxDepth iff ( dom b2 = NAT & b2 . 0 = AtomicTermsOf S & ( for n being Nat holds b2 . (n + 1) = (union { (Compound (s,(b2 . n))) where s is ofAtomicFormula Element of S : s is operational } ) \/ (b2 . n) ) ) );
Lm9:
for m being Nat
for S being Language holds (S -termsOfMaxDepth) . m c= ((AllSymbolsOf S) *) \ {{}}
Lm2:
for m, n being Nat
for S being Language holds (S -termsOfMaxDepth) . m c= (S -termsOfMaxDepth) . (m + n)
:: deftheorem defines AllTermsOf FOMODEL1:def 31 :
for S being Language holds AllTermsOf S = union (rng (S -termsOfMaxDepth));
theorem Lm4:
Lm26:
for x being set
for S being Language st x in AllTermsOf S holds
ex nn being Element of NAT st x in (S -termsOfMaxDepth) . nn
:: deftheorem DefTermal2 defines termal FOMODEL1:def 32 :
for S being Language
for w being string of S holds
( w is termal iff w in AllTermsOf S );
:: deftheorem DefTermal defines -termal FOMODEL1:def 33 :
for m being Nat
for S being Language
for w being string of S holds
( w is m -termal iff w in (S -termsOfMaxDepth) . m );
Lm1:
for mm being Element of NAT
for S being Language
for w being b1 + 1 -termal string of S st not w is mm -termal holds
ex s being termal Element of S ex T being Element of ((S -termsOfMaxDepth) . mm) * st
( T is abs (ar s) -element & w = <*s*> ^ ((S -multiCat) . T) )
Lm19:
for mm being Element of NAT
for S being Language
for w being b1 + 1 -termal string of S ex s being termal Element of S ex T being Element of ((S -termsOfMaxDepth) . mm) * st
( T is abs (ar s) -element & w = <*s*> ^ ((S -multiCat) . T) )
:: deftheorem defines ar FOMODEL1:def 34 :
for S being Language
for t being termal string of S holds ar t = ar ((S -firstChar) . t);
theorem Lm333:
Lm27:
for m being Nat
for S being Language holds (S -termsOfMaxDepth) . m is S -prefix
:: deftheorem DefAtomic defines 0wff FOMODEL1:def 35 :
for S being Language
for phi being string of S holds
( phi is 0wff iff ex s being relational Element of S ex V being abs (ar b3) -element Element of (AllTermsOf S) * st phi = <*s*> ^ ((S -multiCat) . V) );
:: deftheorem defines AtomicFormulasOf FOMODEL1:def 36 :
for S being Language holds AtomicFormulasOf S = { phi where phi is string of S : phi is 0wff } ;
Lm3:
for S being Language holds AllTermsOf S is S -prefix
:: deftheorem DefSubTerms1 defines SubTerms FOMODEL1:def 37 :
for S being Language
for t being termal string of S
for b3 being Element of (AllTermsOf S) * holds
( b3 = SubTerms t iff ( b3 is abs (ar ((S -firstChar) . t)) -element & t = <*((S -firstChar) . t)*> ^ ((S -multiCat) . b3) ) );
:: deftheorem DefSubTerms2 defines SubTerms FOMODEL1:def 38 :
for S being Language
for phi being 0wff string of S
for b3 being abs (ar ((b1 -firstChar) . b2)) -element Element of (AllTermsOf S) * holds
( b3 = SubTerms phi iff phi = <*((S -firstChar) . phi)*> ^ ((S -multiCat) . b3) );
:: deftheorem defines -subTerms FOMODEL1:def 39 :
for S being Language
for b2 being Function of (AllTermsOf S),((AllTermsOf S) *) holds
( b2 = S -subTerms iff for t being Element of AllTermsOf S holds b2 . t = SubTerms t );
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem Th11:
theorem Th12:
theorem
theorem
theorem
:: deftheorem DefDepth2 defines Depth FOMODEL1:def 40 :
for S being Language
for t being termal string of S
for b3 being Nat holds
( b3 = Depth t iff ( t is b3 -termal & ( for n being Nat st t is n -termal holds
b3 <= n ) ) );
theorem Th16:
Lm11:
for m being Nat
for S being Language holds (S -termsOfMaxDepth) . m c= (TermSymbolsOf S) *
theorem
:: deftheorem DefExt0 defines -extending FOMODEL1:def 41 :
for S1, S2 being Language-like holds
( S2 is S1 -extending iff ( the adicity of S1 c= the adicity of S2 & TheEqSymbOf S1 = TheEqSymbOf S2 & TheNorSymbOf S1 = TheNorSymbOf S2 ) );
:: deftheorem DefExt1 defines extendWith FOMODEL1:def 42 :
for f being INT -valued Function
for L being non empty Language-like
for b3 being non empty strict Language-like holds
( b3 = L extendWith f iff ( the adicity of b3 = (f | ((dom f) \ { the OneF of L})) +* the adicity of L & the ZeroF of b3 = the ZeroF of L & the OneF of b3 = the OneF of L ) );
Lm12:
for S1 being non empty Language-like
for f being INT -valued Function holds
( LettersOf (S1 extendWith f) = ((f | ((dom f) \ (AllSymbolsOf S1))) " {0}) \/ (LettersOf S1) & the adicity of (S1 extendWith f) | (OwnSymbolsOf S1) = the adicity of S1 | (OwnSymbolsOf S1) )
:: deftheorem defines addLettersNotIn FOMODEL1:def 43 :
for S being Language
for X being functional set holds S addLettersNotIn X = S extendWith ((((AllSymbolsOf S) \/ (SymbolsOf X)) -freeCountableSet) --> 0);