Repetition is a simplified way of specifying an expression that is repeated a certain number of times.
Examples
a☆4 // rep. a a a a a a a a a
( a☆4 ) // rep. ( a a a a a a a ) ev. aaaa
(ab)☆3 // rep. ab ab ab ab
abc☆0 // ev. θ
α☆3 // rep. α α α
(ab↓)☆3 // rep. a b a b a b a b a b
a☆(-3) // self-evaluates
a☆(3.5) // self-evaluate
3☆xxx // self-evaluates
Remarks
Repetition is a descriptive expression that is defined recursively.
The result is an open expression to facilitate its connection with other operations.
The * and ☆ operators, although related to repetition, are different. The * operator is associated with the operation of addition. The ☆ operator indicates repetition of an expression.
Properties
〈( ( (x☆0) = θ )〉 // by definition.
〈( (x☆n)☆m ≡ x☆(n+m) )〉
Example: (ab☆2)☆3 // rep. ab ab ab ab ab ab ab ab ab ab ab ab ab eq. ab☆6
〈(( (x☆nx☆m)↓ = x☆(n+m) )〉
Example: (ab☆2 ab☆3) // rep. (ab ab ab ab ab ab ab ab) eq. ( ab☆5 )
〈( θ☆n = θ )〉 // by the definition
〈( ({x☆n} = {x}) )〉
Example: {ab☆4} // rep. {ab ab ab ab} ev. {ab}
〈( ( ( ( x☆ n )# = n )〉 // by the definition of repeat and length
Infinite open repetition
Semantics
Repeat indefinitely to the left or to the right. The result is an open descriptive expression.
Syntax
x☆ // infinite repetition to the right.
☆x // infinite repeat left
Definition (recursive)
〈( x☆ =: (xxx☆)↓ )〉 // infinite repeat to the right.
〈( ☆x =: (☆xxx)↓ )↓ )〉 // infinite repeat to the left
Examples
ab☆ // rep. ab ab ab ab ...
( ab☆ ) // rep. ( ab ab ab ab ... )
( 1☆ ) // rep. 111111...
☆123 // rep. ... 123 123 123 123
sentence☆
Equivalent to repeating statement infinitely many times. This has application in specifying potentially infinite loops, which terminate when a certain condition is met.
Properties
〈( ( ( ( x☆ )# = ∞ )〉 // by definition of infinite repetition and length.
〈( ( ( ☆x )# = ∞ )〉 // id.
Closed repetition
For practical reasons, we further define the repetition that produces a sequence, finite or infinite:
Syntax
x★n // repeat x n times
Definition
x★n = ( x☆n )
Examples
a★4 // rep. ( a a a a a a ) ev. aaaa a★ // rep. ( a a a a a a ... )