User blog:B1mb0w/Sequence Generator Code Version 2

Sequence Generator Code Version 2
I am developing general purpose code to generate long strings of finite integers according to rules that can be written using the correct syntax.

Version 2 of this code is being finalised and replaces my previous work on Version 1

Sequence Generator Code: Overview
Sequence Generator Code is intended to follow very general rules for generating long sequences of finite integers.

The main technique used to generate sequences is a type of cloning process where any section of the sequence can be used to build (and restrict) the values of another sequence. This technique is used in a heavily recursive process to generate arbitrary lengths of sequences. If the code syntax has been used correctly, then the sequence will be guaranteed to be finite and every integer will be finite.

Here is a very simple illustration of the cloning process used:

SequenceA = (0,1,2,0,0,0,8,1,SequenceB)

SequenceB < (2,0,0,0,8)

In this illustration, SequenceB will be generated as a clone from a section of SequenceA and then appended to SequenceA

The cloning process is straight forward. SequenceB integers may be any value from \(0\) up to the value of the relevant integer in the section being cloned.

SequenceA = (0,1,2,0,0,0,8,1,SequenceB)

SequenceB < (2,0,0,0,8)

SequenceB = (Integer1,...)

Therefore Integer1 may be either \(0, 1, 2\). The cloning process collapses and terminates if any integer in SequenceB is less than SequenceA. The process therefore would terminate if Integer1 was either \(0, 1\).

The cloning process must collapse and terminate at or before the last integer. Therefore, Integer4 for SequenceB must be either \(0, 1, 2, 3, 4, 5, 6, 7\) and never \(8\).

Using just these concepts we can see that SequenceB is restricted to a small number of valid sequences:

(0)

(1)

(2,0,0,0,0)

(2,0,0,0,1)

(2,0,0,0,2)

(2,0,0,0,3)

(2,0,0,0,4)

(2,0,0,0,5)

(2,0,0,0,6)

(2,0,0,0,7)

Refer to the section on Sequence Generator Code Syntax for more detailed explanation. A separate section will be written to explain the selection process for each finite integer ... WORK IN PROGRESS.

Sequence Generator Code needs to be be interpreted using a program in a conventional programming language. I am using VBA in Microsoft Excel to do this. The code will be added to this blog shortly. I plan to write a Javascript version in due course and make it available online on a web page.

WORK IN PROGRESS

Sequence Generator Code: Example
Here is example code from an early version of the Beta Function described on another blog. This version of the code is now superseded. Refer to my other blogs for the latest on this function.

b = (V_r='Beta Function r Parameter',V_v='Beta Function v Parameter',h_0)

h = (C_d<2,C_d=(0:C_x<V_v-U_x,(E_h=1,f_0)))

f = (g_x,g_x=(0:h_u,(h_U,E_h=C_d..h_U,f_x+1<g_x)))

g = (C_q<V_v+1,C_q=(0:h_x,1:t_a,(g_[q]<C_q..g_q-1,n_0<C_q-1,t_a)))

t = (h_T,g_E<C_q..t_x,g_C<C_q..h_T,g_x<C_q..g_E)

Simple Example
A simpler example of the code will be used to explain the syntax used for this code:

n = (V_r='real number',V_v=2,V_e=10,e_0)

e = (C_d<V_v+0,C_d=(0:C_x<V_e+0,(e_E<V_e+0,e_M<V_e+0,e_a<C_d..e_E)))

This simple example can be used to generate numbers using basic Exponentiation \(\uparrow\), Multiplication \(.\) and Addition \(+\). This is not intended to be interesting in itself, but helps to illustrate how the Sequence Generator Code does and how it can be used.

Here are the sequences generated for some real number inputs:

\(e_0=0\) = {"V_r":1,"V_v":2,"V_e":10,"e_0=0":{"C_d":0,"C_0":0}}

\(e_0=1\) = {"V_r":1.2,"V_v":2,"V_e":10,"e_0=1":{"C_d":0,"C_0":1}}

\(e_0=2\) = {"V_r":1.4,"V_v":2,"V_e":10,"e_0=2":{"C_d":0,"C_0":2}}

\(e_0=3\) = {"V_r":1.5,"V_v":2,"V_e":10,"e_0=3":{"C_d":0,"C_0":3}}

\(e_0=4\) = {"V_r":1.6,"V_v":2,"V_e":10,"e_0=4":{"C_d":0,"C_0":4}}

_E=1":{"C_d":0,"C_E":0},"e_M=10":{"C_d":0,"C_M":9},"e_a=7":{"C_d":0,"C_a":7}}}

\(e_0=108\) = {"V_r":3.16585,"V_v":2,"V_e":10,"e_0=108":{"C_d":1,"e_E=1":{"C_d":0,"C_E":0},"e_M=10":{"C_d":0,"C_M":9},"e_a=8":{"C_d":0,"C_a":8}}}

Sequence Generator Code: Syntax
Sequence Generator Code is intended to follow very general rules for generating long sequences of finite integers. Long sequences of final integers can be used to describe complex objects and mathematical statements, (Refer to my blog on the Beta Function for detailed code of how to generate very large numbers using the full power of the Veblen ordinals and FGH functions).

Other examples for using sequences can be to generate big numbers using simpler mathematical functions like exponentiation, multiplication and addition. This is what the Simple Example code does.

The syntax for Sequence Generator Code will be explained by following this simple example closely.

Building Different Sequence Types

n = (V_r='real number',V_v=2,V_e=10,e_0)

To build complex sequences, it is useful to define different sequence types. The syntax to do this is as follows:

SequenceTypeName = (Instruction1,Instruction2,...,InstructionN)

Every Sequence Type should be defined with instructions in one line of code. The instructions for the first sequence type of the Simple example are:

SequenceTypeName n

Instruction1     V_r='real number'

Instruction2     V_v=2

Instruction3     V_e=10

Instruction4     e_0

There are only two instruction types used for this Sequence Type. They are:

InstructionTypeVariable V_VariableName=Expression

InstructionTypeGenerate SequenceTypeName_SequenceInstanceName

InstructionTypeVariable is only used to set a value to a variable. A Variable is always designated with an Uppercase V followed by a single character to designate the name of the Variable. The syntax requires an equal "=" sign and a simple mathematical expression to calculate the value of the variable. The only type of expressions supported at this time are:
 * Expression=Value
 * Expression=ValueA+ValueB
 * Expression=ValueA-ValueB

InstructionTypeGenerate is used to generate a sequence. In this example, a SequenceTypeName called \(e\) sequence will be generated. The sequence is identified using an SequenceInstanceName which in this case is \(0\).

Please note that this is a very simple example, and so far we have not actually generated any finite integers for our sequence, apart from some descriptive variables.

Generating Integers for the Sequence

e = (C_d<V_v+0,C_d=(0:C_x<V_e+0,(e_E<V_e+0,e_M<V_e+0,e_a<C_d..e_E)))

In the simple example, the finite integers for the sequence are generated by the SequenceTypeName called \(e\) using the following instructions:

SequenceTypeName e

Instruction1     C_d<V_v+0

Instruction2     C_d=(0:C_x<V_e+0,(e_E<V_e+0,e_M<V_e+0,e_a<C_d..e_E))

Instruction2a           C_x<V_e+0

Instruction2b           (e_E<V_e+0,e_M<V_e+0,e_a<C_d..e_E)

Instruction2b1           e_E<V_e+0

Instruction2b2           e_M<V_e+0

Instruction2b3           e_a<C_d..e_E

Three new Instruction Types are used in for this Sequence Type:

InstructionTypeInteger C_IntegerName<Expression

InstructionTypeClone   SequenceTypeName_SequenceInstance<SequenceExisting

InstructionTypeSelect  C_IntegerName=(Value1:Instruction1,Value2:Instruction2,...,InstructionN)

InstructionTypeGroup   (Instruction1,Instruction2,...,InstructionN)

WORK IN PROGRESS

Sequence Generator Code: Interpreter
Sequence Generator Code needs to be be interpreted using a program in a conventional programming language. I am using VBA in Microsoft Excel to do this. The code will be added to this blog shortly. I plan to write a Javascript version in due course and make it available online on a web page.

WORK IN PROGRESS

Test Bed
Various results will be presented here while Version 2 is being stabilised:

WORK IN PROGRESS