We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Dafne

From Esolang
Jump to navigation Jump to search
The title of this article is not correct because of technical limitations. The correct title is actually
(or
Dafne).
Not to be confused with wikipedia:Dafny.


Dafne
Designed by User:Miui
Appeared in 2026
Memory system Cell-based
Dimensions two-dimensional
Computational class L-system
Major implementations Dafne's github (WIP)
Turtles demo
Influenced by Counterfish
TernLSB
BackroomsTDP
File extension(s) Dafne.exe, bf, .png

Dafne is an Lindenmayer system based on the SATOR square created by User:Miui.
It also shares some similarities (namely ternary encoding) with TernLSB.

A Dafne automaton.

L-systems

The formal classification of Dafne is unknown (it is locally concatenative and has more than 2 variables), but the basic framework can be represented a couple of ways where G = (V, ω, P).

D0L

G' = (V', ω', P')
V' = {R, O, T, A, S, P, E, N}
ω' = ROTAS
P' = { R→D, O→A, T→F, A→N, S→E, P→B, E→R, N→0 }

DP0L


V = {A, B, C, D, E, F, G, H, I, J, K, L, M,
     N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0}
ω = A
P = { k → (k)(k+1)(k+2)(k+3)(k+4)(k+5)(k+6)  :  k ∈ ℤ₂₇ }

T0L( G = (V, ω, P, h)

G = (V, ω, P, h)

V = {A…Z, 0}                          (ℤ₂₇)
ω = A
P = { k → (k)(k+1)(k+2)(k+3)(k+4)(k+5)(k+6) : k ∈ ℤ₂₇ }
h = boustrophedon fold:
      row i kept as-is   if i even
      row i reversed     if i odd

in general the closed form is.

block[R·5+r, C·5+p] = (seed[r,p] + (C + 7R) · M[r,p]) mod 27

Lattice

Formally: L = (ℤ³, M′)

where M′ = [[0,4,7],[4,8,5],[7,5,0]] is the Gram matrix

derived from

M = ⎡  0   4   8   3   7  ⎤
    ⎢  4   8   3   4   5  ⎥
    ⎢  8   3   7   5   3  ⎥
    ⎢  3   4   5   3   1  ⎥
    ⎣  7   5   3   1   0  ⎦

pseudocode provided for verification (generated by Claude)

"""
DAFNE LATTICE — complete construction and verification.
L = (Z^3, M') : even Lorentzian lattice, signature (2,1), det -112.
Extracted as the non-degenerate quotient of the DAFNE mixing matrix M mod 27.
Radical (excluded): Z_27 x Z_3, gens (1,7,1,9,18),(0,9,9,9,0) in Z_27^5.
Run: python dafne_lattice.py  -> full verification report.
"""
from fractions import Fraction
from math import gcd, isclose, pi, sqrt
import cmath

# ---------- 1. THE LATTICE ----------
GRAM = [[0,4,7],[4,8,5],[7,5,0]]            # M' on basis e1,e2,e3
DET  = -112                                  # = -(2^4 * 7)
SIG  = (2,1)                                 # Lorentzian
def B(u,v): return sum(u[i]*GRAM[i][j]*v[j] for i in range(3) for j in range(3))
def Q(v):  return B(v,v)                     # even: Q in 2Z always

# ---------- 2. DUAL BASIS (exact) ----------
def inv3(Mat, den):
    adj=[[0]*3 for _ in range(3)]
    idx=[(1,2),(0,2),(0,1)]
    for i in range(3):
        for j in range(3):
            r=[x for x in range(3) if x!=i]; c=[x for x in range(3) if x!=j]
            m=Mat[r[0]][c[0]]*Mat[r[1]][c[1]]-Mat[r[0]][c[1]]*Mat[r[1]][c[0]]
            adj[j][i]=(-1)**(i+j)*m
    return [[Fraction(adj[i][j],den) for j in range(3)] for i in range(3)]
GRAM_INV = inv3(GRAM, DET)                   # columns = dual basis e1*,e2*,e3*

# ---------- 3. STRUCTURE: U(7) ⊥ <112>, glue Z_7 ----------
E1,E2,E3=(1,0,0),(0,1,0),(0,0,1); W=(5,-7,4)
# 7*e2 = 5*e1 + 4*e3 - w   (glue relation)

# ---------- 4. DISCRIMINANT FORM  D = Z_112,  q(k) = 25 k^2 /112 mod 2 ----------
DD=112
def q_disc(k): 
    x=Fraction(25*k*k,112); return x - 2*(x.numerator//(2*x.denominator))

# ---------- 5. WEIL REP  rho: Mp2(Z) -> GL(C[Z_112]) ----------
def rho_T():   # diagonal e^{2 pi i q(k)}  ... q in Q/2Z -> e^{pi i * q} convention? use e^{2πi q/2}=e^{πi q}
    return [cmath.exp(1j*pi*float(q_disc(k))) for k in range(DD)]
def rho_S():   # Bruinier convention: phase e((b- - b+)/8) = e^{-2 pi i/8}
    ph=cmath.exp(-2j*pi/8)/sqrt(DD)
    return [[ph*cmath.exp(-2j*pi*(25*j*k)/112) for k in range(DD)] for j in range(DD)]

# ---------- 6. REAL ROOTS & WEYL ----------
R1,R2=(4,-3,1),(5,-2,1)                      # the only norm-2 lines
CARTAN=[[2,-6],[-6,2]]                       # det -32: rank-2 hyperbolic KM
def reflect(r,v): 
    c=B(v,r)  # (r,r)=2 so coefficient = c
    return tuple(v[i]-c*r[i] for i in range(3))

# ---------- VERIFICATION SUITE ----------
def verify():
    ok=True
    def chk(name,cond):
        nonlocal ok; ok&=cond; print(f"  [{'PASS' if cond else 'FAIL'}] {name}")
    print("DAFNE lattice verification")
    # det & even
    det=( GRAM[0][0]*(GRAM[1][1]*GRAM[2][2]-GRAM[1][2]*GRAM[2][1])
         -GRAM[0][1]*(GRAM[1][0]*GRAM[2][2]-GRAM[1][2]*GRAM[2][0])
         +GRAM[0][2]*(GRAM[1][0]*GRAM[2][1]-GRAM[1][1]*GRAM[2][0]))
    chk("det = -112", det==DET)
    chk("even (all Q(v) even, spot 20 vecs)", all(Q((x,y,z))%2==0 for x in range(-1,2) for y in range(-1,2) for z in range(-1,2)))
    # dual: M * M^-1 = I
    I=[[sum(GRAM[i][k]*GRAM_INV[k][j] for k in range(3)) for j in range(3)] for i in range(3)]
    chk("GRAM * GRAM_INV = I (exact)", all(I[i][j]==(1 if i==j else 0) for i in range(3) for j in range(3)))
    # U(7) + complement
    chk("Q(e1)=0, Q(e3)=0, (e1,e3)=7  [U(7)]", Q(E1)==0 and Q(E3)==0 and B(E1,E3)==7)
    chk("w=(5,-7,4): Q(w)=112, w ⊥ e1,e3", Q(W)==112 and B(W,E1)==0 and B(W,E3)==0)
    chk("glue: 7*e2 = 5e1+4e3-w", all(7*E2[i]==5*E1[i]+4*E3[i]-W[i] for i in range(3)))
    # discriminant generator gamma = e1*: order 112, q = 25/112
    g=[GRAM_INV[i][0] for i in range(3)]
    from math import lcm
    o=1
    for x in g: o=lcm(o,x.denominator)
    qg=sum(g[i]*GRAM[i][j]*g[j] for i in range(3) for j in range(3))
    chk("ord(e1*)=112 in L*/L", o==112)
    chk("q(e1*) = 25/112", qg-2*(qg.numerator//(2*qg.denominator))==Fraction(25,112))
    # MILGRAM: sum e^{pi i q(x)} = sqrt|D| e^{2 pi i sig/8}, sig=b+-b-=1
    s=sum(cmath.exp(1j*pi*float(q_disc(k))) for k in range(DD))
    tgt=sqrt(DD)*cmath.exp(2j*pi/8)
    chk(f"Milgram: Gauss sum = sqrt(112)e^(2πi/8)  [sig≡1 mod 8]",
        isclose(s.real,tgt.real,abs_tol=1e-9) and isclose(s.imag,tgt.imag,abs_tol=1e-9))
    # roots
    chk("Q(r1)=Q(r2)=2, (r1,r2)=-6", Q(R1)==2 and Q(R2)==2 and B(R1,R2)==-6)
    v=E1
    for _ in range(3): v=reflect(R1,reflect(R2,v))
    chk("Weyl (s1 s2) preserves Q, infinite order (null orbit grows)", Q(v)==0 and abs(v[0])>1000)
    # Weil rep: (ST)^3 = S^2  (i.e., rho respects Mp2 relation) — numeric
    import numpy as _np
    _k=_np.arange(DD)
    _T=_np.exp(2j*_np.pi*25*_k*_k/224)
    _S=(_np.exp(-2j*_np.pi/8)/_np.sqrt(DD))*_np.exp(-2j*_np.pi*25*_np.outer(_k,_k)/112)
    _ST=_S*_T[None,:]; _lhs=_ST@_ST@_ST; _rhs=_S@_S
    _Z=_np.exp(-2j*_np.pi/4)*_np.eye(DD)[:,(-_k)%DD]
    e1_=_np.abs(_lhs-_rhs).max(); e2_=_np.abs(_rhs-_Z).max()
    chk(f"Weil rep: (ST)^3=S^2=Z (err {e1_:.1e},{e2_:.1e})", e1_<1e-9 and e2_<1e-9)
    print("ALL PASS" if ok else "FAILURES PRESENT")
    return ok

if __name__=="__main__": verify()

The DAFNE square

The canonical Atom i.e. a DAFNE doorway is L-Zimbu contextual.

CLASS D

  CONST A="ROTASPEN"; CONST B="DAFNEBR0";

  FUNC m(c CHAR) CHAR
    VAR i=A.indexOf(c);
    RETURN i>=0?B[(3*i+5)%8]:c;
  END

  FUNC main()
    VAR W="SATOR AREPO TENET OPERA ROTAS".split(" ");
    VAR D LIST<STRING>=[];
    FOR i IN 0..4
      VAR s=W[4-i],o="";
      FOR j IN 0..s.len()-1 o+=m(s[j]); OD
      D.append(o);
    OD

    Out.println("¿ĐAFNE?");
    WHILE TRUE
      VAR s=In.readLine().trim();
      VAR ok=TRUE;
      FOR i IN 0..s.len()-1 IF A.indexOf(s[i])<0 ok=FALSE; FI OD
      IF ok
        VAR t="";
        FOR i IN 0..s.len()-1 t+=m(s[i]); OD
        IF t==D[0]
          FOR r IN D Out.println(r); OD
        FI
      FI
    OD
  END

END
DAFNE
ABRDN
FR0RF
NDRBA
ENFAD

0D theta conversion operator

SATOR
    O
    T
    A
    S

Triadic expansion

(python)

#!SELF-MODIFYING
import re,sys

# ===============
# AXIOM
# ROTAS
# OPERA
# TENET
# AREPO
# SATOR
# ===============

A="ROTASPEN";B="DAFNEBR0"
f=lambda c:B[(3*A.index(c)+5)%8]if c in A else c
g=lambda t:"\n".join("".join(f(c)for c in l)for l in t.split("\n"))

def r():
 s=open(__file__,encoding="utf-8").read()
 m=re.search(r"AXIOM\n((?:# [A-Z0-9]{5}\n){5})",s)
 b=[ln[2:] for ln in m.group(1).splitlines()]
 return "\n".join(b),s

def w(b,s):
 x="\n".join("# "+l for l in b.split("\n"))+"\n"
 s=re.sub(r"(AXIOM\n)(?:# [A-Z0-9]{5}\n){5}",r"\1"+x,s)
 open(__file__,"w",encoding="utf-8").write(s)

b,s=r()

if b=="DAFNE\nABRDN\nFR0RF\nNDRBA\nENFAD":
 print(b)
else:
 nb=g(b)
 w(nb,s)
 print(nb)
Dafne L-system
# Axioms expansion rule
# ROTAS
# OPERA
# TENET
# AREPO
# SATOR
DAFNE
ABRDN
FR0RF
NDRBA
ENFAD
BDFBR
D00BB
F0F0F
BB00D
RBFDB
BDNRA
DE0BR
N0F0N
RB0ED
ARNDB

1D expansion

ROTASPEN DAFNEBR0

DAFNE
ABRDN
FR0RF
NDRBA
ENFAD
expansion rules
[4,4,4,4,4,4,4,5,6]
[4,2,6,8,4,7,4,2,3]
[4,6,4,4,2,8,7,2,4]
[4,8,7,4,8,7,4,8,7]
[4,4,3,8,2,6,4,2,7]
[4,7,2,6,2,8,3,4,7]
[4,4,4,4,4,4,4,4,4]
[5,2,7,8,2,3,4,4,6]
[6,3,2,4,7,4,8,6,2]
[1,4,4,4,4,4,4,4,4]
NNNNABNBNN0RNNF
NNN0NRNAONOROAB
NEBNAFRANN0RNAR
NABNRANNNNNNN0R
0NRBAONNNNNNNOR
NAFFNRNNNNEBN0R
NBNNNNBFANNNNBN
NAONNNNRNNNNNAO
RANNNN0BANNNRAN
N0RNNNNNNNRANAB
NORNNNNNNBAO0NR
N0RNEBNNNFNRNAF
NNFN0RNBNNABNNN
OABNORNAO0NRNNN
NARN0RRANNAFNEB

i.e

s=[list("DAFNE"),list("ABRDN"),list("FR0RF"),list("NDRBA"),list("ENFAD")]
r=[[4,4,4,4,4,4,4,5,6],[4,2,6,8,4,7,4,2,3],[4,6,4,4,2,8,7,2,4],[4,8,7,4,8,7,4,8,7],
   [4,4,3,8,2,6,4,2,7],[4,7,2,6,2,8,3,4,7],[4,4,4,4,4,4,4,4,4],[5,2,7,8,2,3,4,4,6],
   [6,3,2,4,7,4,8,6,2],[1,4,4,4,4,4,4,4,4]]

expansion rule

u=[]
for row in s:
    for c in row:
        if c not in u:u.append(c)
while len(u)<9:u.append(u[-1])
m={i+1:u[i] for i in range(9)}
sr={u[i]:i for i in range(len(u))}

alternating 0/O

C=[0]
def z(x):
    if x!=8:return m[x]
    C[0]^=1
    return "0" if C[0] else "O"

Linear (X)

def X(g):
    o=[]
    for row in g:
        a=[[],[],[]]
        for c in row:
            t=r[sr[c]] if c in sr else [4]*9
            b=[z(x) for x in t]
            a[0]+=b[:3];a[1]+=b[3:6];a[2]+=b[6:]
        o+=a
    return o

for L in X(s):print("".join(L))

2D expansion

Via selfmodifying code, the first iteration yields the BDFBR block. The table describes the matrix multiplication on BDFBR for 2 dimensional expansion.

2D Dafne
Block Mul
BDFBR
D00BB
F0F0F
BB00D
RBFDB
04837
48345
83753
34531
75310

3D expansion

After two iterations of the selfmodifying code Dafne yields the BDNRA block

BDNRA
DE0BR
N0F0N
RB0ED
ARNDB

the same matmul is applied

04837
48345
83753
34531
75310

4D expansion

Contextual L (Atomic)
LZ Mod 3 Mod 27
CLASS DafneCycle
#Z(ABCDEFGHIJKLMNOPQRSTUVWXYZ0)
  CONST A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0"

  CONST M = [
    [0,4,8,3,7],
    [4,8,3,4,5],
    [8,3,7,5,3],
    [3,4,5,3,1],
    [7,5,3,1,0],
  ]

  CONST DAFNE = [
    "DAFNE",
    "ABRDN",
    "FR0RF",
    "NDRBA",
    "ENFAD",
  ]

  FUNC mul5x5(block : String[]) -> String[]
    VAR out : String[] = []
    FOR i IN 0 .. 4
      VAR row : String = ""
      FOR j IN 0 .. 4
        VAR c   : Char   = block[i][j]
        VAR idx : Int    = A.indexOf(c)
        VAR off : Int    = M[i][j]
        row += A[(idx + off) % A.len()]
      END
      out.append(row)
    END
    RETURN out
  END

  FUNC main()
    VAR b : String[] = DAFNE
    FOR k IN 0 .. 26
      IO.print("state " + k + "\n")
      FOR r IN b
        IO.print(r + "\n")
      END
      IO.print("\n")
      b = mul5x5(b)
    END
  END

END
DAFNE
ABRDN
FR0RF
NDRBA
ENFAD
BDFBR
D00BB
F0F0F
BB00D
RBFDB
BDNRA
DE0BR
N0F0N
RB0ED
ARNDB


Yields a 27-state contextual (to L-Zimbu) subset of Dafne. As a Vedic-square it represents a 25-dimensional torus.

n-Dimensional

Dafne's L-system.
Key 1D 2D 3D 8D 8D+ L-system 34D
P5
#ROTASPE0
4 11
255
#0:(
#1:N
#2:`
#3:q
#4:…
#5:—
#6:¦
#7:¹
#8:É
#9:Þ
#/:)
P5
#DAFNEBR0
8 1
7
ROTASPEN
P5
#DB0B
5 5
90
DAFNE
ABRDN
FR0RF
NDRBA
ENFAD
P5
5 5
9
04837
48345
83753
34531
75310
P5
10 9
255
N`q…—¦¹ÉÞ
`…¦¹Nq—¹Þ
q¦Þq¦Þq¦Þ
…Éq¹`¦N—Þ
—N¦`¹qÉ…Þ
¦qÞ¦qÞ¦qÞ
¹—qNɦ…`Þ
ɹ¦—…q`NÞ
ÞÞÞÞÞÞÞÞÞ
P5
11 10
255
(((((((\„©
(N`q…—¦¹ÉÚ
(`…¦¹Nq—¹Ú
(q¦Úq¦Úq¦Ú
(…Éq¹`¦N—Ú
(—N¦`¹qÉ…Ú
(¦qÚ¦qÚ¦qÚ
\¹—qNɦ…`Ú
„ɹ¦—…q`NÚ
©ÚÚÚÚÚÚÚÚÚ
P5
15 15
255
NNNNABNBNN0RNNF
NNN0NRNAONOROAB
NEBNAFRANN0RNAR
NABNRANNNNNNN0R
0NRBAONNNNNNNOR
NAFFNRNNNNEBN0R
NBNNNNBFANNNNBN
NAONNNNRNNNNNAO
RANNNN0BANNNRAN
N0RNNNNNNNRANAB
NORNNNNNNBAO0NR
N0RNEBNNNFNRNAF
NNFN0RNBNNABNNN
OABNORNAO0NRNNN
NARN0RRANNAFNEB
P5
64 117
255
333343343333333333333333333333333B
333344344333333333333333333333333B
333343443433333333333333333333333B
333344434443333333333333333333333B
333343344334333333333333333333333B
333344343434433333333333333333333B
333343444444343333333333333333333B
333344433333444333333333333333333B
333343343333433433333333333333333B
333344344333443443333333333333333B
333343443433434434333333333333333B
333344434443444344433333333333333B
333343344334433443343333333333333B
333344343434343434344333333333333B
333343444444444444443433333333333B
333344433333333333334443333333333B
333343343333333333334334333333333B
333344344333333333334434433333333B
333343443433333333334344343333333B
333344434443333333334443444333333B
333343344334333333334334433433333B
333344343434433333334434343443333B
333343444444343333334344444434333B
333344433333444333334443333344433B
333343343333433433334334333343343B
333344344333443443334434433344344B
4143333333333333333333333333333334
;4143333333333333333333333333333334B
9894143333333333333333333333333333334B
864774143333333333333333333333333333334B
76379:54143333333333333333333333333333334B
67;9:;7734143333333333333333333333333333334B
5;5758697;4143333333333333333333333333333334B
55;:9:578794143333333333333333333333333333334B
4;863534;;;84;74143333333333333333333333333333334B
4833796859454143333333333333333333333333333334B
4548:998783895;;34143333333333333333333333333333334B
;7::3354;6944565;;4143333333333333333333333333333334
::997763:9;:583;96694143333333333333333333333333333334
97943;4;;5599:65;65574143333333333333333333333333333334
85667:96635:69386:546844854143333333333333333333333333333334
756448;5:854953684757766534143333333333333333333333333333334
67669;6;53558457;798:;73;5;4143333333333333333333333333333334
5:;45;6;7769684458:5;8::9564:94143333333333333333333333333333334

Escape-time

Utilizing Jos-Kleinian escape time (pdf link) Dafne can expand in escape-time.

ROTAS
←        ←        ←        ←        ←        ←        ←
      ← nnf    ←        ←        ←        ←        ←        ←
   ←       ¦¦        ←        ←        ←        ←        ←
←        ←  aa    ←        ←        ←        ←        ←
      ←     aa ←        ←        ←        ←        ←        ←
   ←        NNN      ←        ←        ←        ←        ←
←        ←  NNNa  ←        ←        ←        ←        ←
      ←      N ←        ←        ←        ←        ←        ←
   ←        ĐĐĐĐĐ    ←        ←        ←        ←        ←
←        ←  ĐĐĐĐĐ ←        ←        ←        ←        ←
      ←     ĐĐĐĐĐN      ←        ←        ←        ←        ←
   ←       ¦ĐĐĐĐĐ    ←        ←        ←        ←        ←
←        ←   ĐĐĐ  N        ←        ←        ←        ←
      ←   ¦ …………………     ←        ←        ←        ←        ←
   ←      ………………………… ←        ←        ←        ←        ←
←        ………………………………      ←        ←        ←        ←
      ←  …………………………………  ←        ←        ←        ←        ←
   ←    ……………………………………N       ←        ←        ←        ←
←      N…………………………………… N   ←        ←        ←        ←
      ← ………………………………………ĐĐ        ←        ←        ←        ←
   ← nĐĐ………………………………………ĐĐN¦   ←        ←        ←        ←
←    N  ……………………………………N    ←        ←        ←        ←
  a   ← ……………………………………  ←        ←        ←        ←       a←
 NN←     …………………………………      N¦←        ←        ←        ← N
ĐĐ       ………………………………Đ     ←ĐĐĐN    ←        ←        ← aĐĐĐ
ĐĐĐ   ←   …………………………    ←   ĐĐĐ  ←        ←        ←    ĐĐĐĐ←
ĐĐ ←        …………………  ←Đ     ĐĐĐ  NN aĐ ←        ←   NN  NĐĐĐ
←        ←        ←        ←        ←        ←        ←
SATOR
←        ←        ←        ←        ←        ←        ←
      ← nnf    ←        ←        ←        ←        ←        ←
   ←       ¦¦        ←        ←        ←        ←        ←
←        ←  aa    ←        ←        ←        ←        ←
      ←     aa ←        ←        ←        ←        ←        ←
   ←        NNN      ←        ←        ←        ←        ←
←        ←  NNNa  ←        ←        ←        ←        ←
      ←      N ←        ←        ←        ←        ←        ←
   ←        ĐĐĐĐĐ    ←        ←        ←        ←        ←
←        ←  ĐĐĐĐĐ ←        ←        ←        ←        ←
      ←     ĐĐĐĐĐN      ←        ←        ←        ←        ←
   ←       ¦ĐĐĐĐĐ    ←        ←        ←        ←        ←
←        ←   ĐĐĐ  N        ←        ←        ←        ←
      ←   ¦ …………………     ←        ←        ←        ←        ←
   ←      ………………………… ←        ←        ←        ←        ←
←        ………………………………      ←        ←        ←        ←
      ←  …………………………………  ←        ←        ←        ←        ←
   ←    ……………………………………N       ←        ←        ←        ←
←      N…………………………………… N   ←        ←        ←        ←
      ← ………………………………………ĐĐ        ←        ←        ←        ←
   ← nĐĐ………………………………………ĐĐN¦   ←        ←        ←        ←
←    N  ……………………………………N    ←        ←        ←        ←
  a   ← ……………………………………  ←        ←        ←        ←       a←
 NN←     …………………………………      N¦←        ←        ←        ← N
ĐĐ       ………………………………Đ     ←ĐĐĐN    ←        ←        ← aĐĐĐ
ĐĐĐ   ←   …………………………    ←   ĐĐĐ  ←        ←        ←    ĐĐĐĐ←
ĐĐ ←        …………………  ←Đ     ĐĐĐ  NN aĐ ←        ←   NN  NĐĐĐ
←        ←        ←        ←        ←        ←        ←
DAFn
←        ←   N  ……N  a     ←        ←        ←        ←
      ←        ←ĐĐĐĐ    ←        ←        ←        ←        ←
   ←        ←  ĐĐĐĐĐ ←        ←        ←        ←        ←
←        ←     ĐĐĐĐĐĐ      ←        ←        ←        ←
      ←        ←ĐĐĐĐ    ←        ←        ←        ←        ←
   ←        ←   aĐĐ  ←        ←        ←        ←        ←
←        ←       NNN       ←        ←        ←        ←
      ←        ← NNN    ←        ←        ←        ←        ←
   ←        ←     Na ←        ←        ←        ←        ←
←        ←        ←aa      ←        ←        ←        ←
      ←        ←    ¦   Đ        ←        ←        ←        ←
   ←        ←       ¦fnn…     ←        ←        ←        ←
←        ←        ←        ←        ←        ←        ←
      ←        ←        ←        ←        ←        ←        ←
   ←        ←        ←        ←        ←        ←        ←
←       nnf       ←        ←        ←        ←        ←
      ←   f¦¦  ←        ←        ←        ←        ←        ←
   ←        aa       ←        ←        ←        ←        ←
←        ←  aa    ←        ←        ←        ←        ←
      ←      NN←        ←        ←        ←        ←        ←
   ←        NNN      ←        ←        ←        ←        ←
←        ←  aNN   ←        ←        ←        ←        ←
      ←     aĐĐĐ        ←        ←        ←        ←        ←
   ←        ĐĐĐĐĐ    ←        ←        ←        ←        ←
←        ←  ĐĐĐĐЦ←        ←        ←        ←        ←
      ←     ĐĐĐĐĐ n     ←        ←        ←        ←        ←
   ←       n←ĐĐĐa a  ←        ←        ←        ←        ←
←        ←   ……………N        ←        ←        ←        ←
DAFna
←        ←        ←        ←        ←        ←        ←
      ←        ←      nnf        ←        ←        ←        ←
   ←        ←        …   ¦    ←        ←        ←        ←
←        ←        ←  N    a←        ←        ←        ←
      ←        ←        ← a      ←        ←        ←        ←
   ←        ←        ←    NNN ←        ←        ←        ←
←        ←        ←       NNN       ←        ←        ←
      ←        ←        ←  N a   ←        ←        ←        ←
   ←        ←        ←    ĐĐĐĐ←        ←        ←        ←
←        ←        ←       ĐĐĐĐĐ     ←        ←        ←
      ←        ←        ←aĐĐĐĐĐ  ←        ←        ←        ←
   ←        ←        ←   NĐĐĐĐ←        ←        ←        ←
←        ←        ←        ĐĐ       ←        ←        ←
      ←        ←        N¦……………… ←        ←        ←        ←
   ←        ←        ←  …………………………     ←        ←        ←
←        ←        ←    ……………………………… ←        ←        ←
      ←        ←      ¦………………………………       ←        ←        ←
   ←        ←        ←……………………………………   ←        ←        ←
←        ←        ←  N……………………………………←        ←        ←
      ←        ←    ĐN……………………………………ĐĐa   ←        ←        ←
   ←        ←       ĐĐ……………………………………ĐĐaaf       ←        ←
←        ←      f ← Đ ……………………………………←        ←        ←
      ←        ←  n   ……………………………………    f ←        ←        ←
   ←        ← aN     ←…………………………………    ← N      ←        ←
←        ←   ĐĐĐ  ←    ……………………………… ←    aĐĐĐ←        ←
      ←   a  ĐĐĐa     a …………………………       ĐĐĐĐ      ←        ←
   ←   a NN ←ĐĐĐ     ←   …………………       ←  ĐĐĐ  NNaa      ←
←        ←        ←        ←        ←        ←        ←
Deff
………………   ←        ←        ←        ←        ←       ………………………
…………………        ←        ←        ←        ←        ←…………………………
…………………     ←        ←        ←        ←        ←  n…………………………
……………………N←        ←        ←        ←        ←     ……………………………
……………………       ←        ←        ←        ←        ……………………………
……………………ĐĐ  ←        ←        ←        ←        ←Đ ……………………………
……………………NĐ        ←        ←        ←        ←  NĐĐ……………………………
……………………       ←        ←        ←        ←  ¦     ……………………………
……………………    ←a       ←        ←        ←    N¦  ←  ……………………………
…………………  ←   N Đ  ←        ←        ←      ĐN←      …………………………
…………………       ĐĐĐN      ←        ←       NĐĐĐ      ←…………………………
……………       ←ĐĐĐĐ  a ←        ←        a  ĐĐĐĐ  ←    N……………………
…………    Đ←  a ĐĐĐ ←NN af   ←       fa NN  ĐĐĐ←a   Đ   ←………………
      ←        ←        ←        ←        ←        ←        ←
   ←        ←        ←        ←        ←        ←        ←
←        ←        ←        ←        ←        ←        ←
      ←        ←        ←        ←        ←        ←        ←
   ←        ←        ←        ←        ←        ←        ←
←        ←        ←        ←        ←        ←        ←
      ←        ←        ←        ←        ←        ←        ←
   ←        ←        ←        ←        ←        ←        ←
←        ←        ←        ←        ←        ←        ←
      ←        ←        ←        ←        ←        ←        ←
   ←        ←        ←        ←        ←        ←        ←
←        ←        ←        ←        ←        ←        ←
      ←        ←        ←        ←        ←        ←        ←
   ←        ←        ←        ←        ←        ←        ←
←        ←        ←        ←        ←        ←        ←
 Deffne
←        ←   N  ……N  a     ←        ←        ←        ←
      ←        ←ĐĐĐĐ    ←        ←        ←        ←        ←
   ←        ←  ĐĐĐĐĐ ←        ←        ←        ←        ←
←        ←     ĐĐĐĐĐĐ      ←        ←        ←        ←
      ←        ←ĐĐĐĐ    ←        ←        ←        ←        ←
   ←        ←   aĐĐ  ←        ←        ←        ←        ←
←        ←       NNN       ←        ←        ←        ←
      ←        ← NNN    ←        ←        ←        ←        ←
   ←        ←     Na ←        ←        ←        ←        ←
←        ←        ←aa      ←        ←        ←        ←
      ←        ←    ¦   Đ        ←        ←        ←        ←
   ←        ←       ¦fnn…     ←        ←        ←        ←
←        ←        ←        ←        ←        ←        ←
      ←        ←        ←        ←        ←        ←        ←
   ←        ←        ←        ←        ←        ←        ←
←       nnf       ←        ←        ←        ←        ←
      ←   f¦¦  ←        ←        ←        ←        ←        ←
   ←        aa       ←        ←        ←        ←        ←
←        ←  aa    ←        ←        ←        ←        ←
      ←      NN←        ←        ←        ←        ←        ←
   ←        NNN      ←        ←        ←        ←        ←
←        ←  aNN   ←        ←        ←        ←        ←
      ←     aĐĐĐ        ←        ←        ←        ←        ←
   ←        ĐĐĐĐĐ    ←        ←        ←        ←        ←
←        ←  ĐĐĐĐЦ←        ←        ←        ←        ←
      ←     ĐĐĐĐĐ n     ←        ←        ←        ←        ←
   ←       n←ĐĐĐa a  ←        ←        ←        ←        ←
←        ←   ……………N        ←        ←        ←        ←

via

T="…ĐNa¦fnn—e`brr(0"
I="�                    �"
W,H,F=62,28,243
A,B="ROTASPEN","DAFNEBR0"

You can expand in escape-time here (github pages.)

Vedic square

The ROTASPEN dictionary creates a "Dafne square" which is a condensed Vedic square. The vedic square can be observed via Vedic_square.pgm beloq

Rotor

as well as a DAFNE rotor

Dafne rotor

Interpreter

Currently there is just a 1 dimensional interpreter for the Dafne square basis: basis interpreter

#imp/ort sys¿ĐAFNE
#Đeffne = "SATOR AREPO TENET OPERA ROTAS".split()
#Đict = dict(zip("ROTASPEN", "DAFNEBR0"))
#D = ["".join(Đict[c] for c in Đeffne[4 - i]) for i in range(5)]
#print("¿ĐAFNE?")
#for line in sys.stdin:
     s = line.strip()
     if all(c in Đict for c in s) and "".join(Đictz[c] for c in s) == D[0]:
         print(*D, sep="\n")

Below is a cocktail-napkin sketch of what a 2D Dafne-based program might look like. (Conceptualized via the netpbm magic number sets) "primitive+1Dimensional PATERNOS xcross"

Dafne.pgm

P5
#DAFNE dial across
13 18
255
object seed
PATER DAFNE
NOSON ABRDN
RE1TA FR0RF
PATEN NDRBA
OSTRA ENFAD
expand rule
[4,4,4,4,4,4,4,5,6]
[4,2,6,8,4,7,4,2,3]
[4,6,4,4,2,8,7,2,4]
[4,8,7,4,8,7,4,8,7]
[4,4,3,8,2,6,4,2,7]
[4,7,2,6,2,8,3,4,7]
[4,4,4,4,4,4,4,4,4]
[5,2,7,8,2,3,4,4,6]
[6,3,2,4,7,4,8,6,2]
[1,4,4,4,4,4,4,4,4]

Dafne turtles

A Dafne turtle can run the mod27 vedic ring. there is a working version of the .gif in turtle canvas Project Dafneturtles depo

Magic square

Dafne is also a magic square.

Dafne L-system mod-27 stable block Math recap

----------
Alphabet : A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0"  (indices 0..26)
Seed     : 5x5 matrix DAFNE / ABDRN / FR0RF / NDRBA / ENFAD
Mixing M : 5x5 integer matrix (see below)

Closed-form for the stable block (verified against the reference block):
  block[R*5+r, C*5+p] = (seed[r,p] + (C + 7*R + t) * M[r,p]) % 27
where
  R = row // 5,  r = row % 5
  C = col // 5,  p = col % 5
  t = animation frame (0-indexed); t=0 gives the static stable block.

The scalar k = (C + 7R) mod 27 is the "phase" — it hits all 27 values
exactly once across the 4x7 grid of 5x5 sub-blocks (with one repeat at
the wrap point, confirming the toroidal period of 27).
"""

# ---------------------------------------------------------------------------
# Constants
# ---------------------------------------------------------------------------

ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0"   # 27 characters, indices 0..26

SEED_ROWS = [
    "DAFNE",
    "ABRDN",
    "FR0RF",
    "NDRBA",
    "ENFAD",
]
SEED = [[ALPHABET.index(c) for c in row] for row in SEED_ROWS]

M = [
    [0, 4, 8, 3, 7],
    [4, 8, 3, 4, 5],
    [8, 3, 7, 5, 3],
    [3, 4, 5, 3, 1],
    [7, 5, 3, 1, 0],
]

# 27 perceptually distinct colors, one per alphabet character
PALETTE = [
    (70,  130, 180),  # A - steel blue
    (60,  179, 113),  # B - medium sea green
    (255, 165,   0),  # C - orange
    (220,  20,  60),  # D - crimson
    (147, 112, 219),  # E - medium purple
    (255, 105, 180),  # F - hot pink
    (210, 105,  30),  # G - chocolate
    (0,   128,   0),  # H - green
    (100, 149, 237),  # I - cornflower blue
    (255, 215,   0),  # J - gold
    (64,  224, 208),  # K - turquoise
    (255,  69,   0),  # L - orange red
    (138,  43, 226),  # M - blue violet
    (0,   206, 209),  # N - dark turquoise
    (154, 205,  50),  # O - yellow green
    (255,  20, 147),  # P - deep pink
    (0,   191, 255),  # Q - deep sky blue
    (205, 133,  63),  # R - peru
    (50,  205,  50),  # S - lime green
    (255, 140,   0),  # T - dark orange
    (123, 104, 238),  # U - medium slate blue
    (46,  139,  87),  # V - sea green
    (176,  48,  96),  # W - maroon
    (0,   139, 139),  # X - dark cyan
    (189, 183, 107),  # Y - dark khaki
    (178,  34,  34),  # Z - firebrick
    (40,   40,  40),  # 0 - near black
]

Post canonical system tag

In a tag system q r w

WHILE q.len() > w
  IF r[0] == '0'
    q = q[1 .. q.len()]
  ELSE
    r = r[1 .. r.len()] + r[0]
    IF q[0] == '1'
      q += r[0]
    FI
  FI

  r = r[1 .. r.len()] + r[0]
  Out.println(q)
OD

where q is derived from this calculator. q = atoma = "0010111101100110111100101000101" r = atomb = "00101011000110000111101000110101110101000101011101"

and the axiomatic system

FUNC dafneSquare() LIST<STRING>
  VAR axioms = ["SATOR", "AREPO", "TENET", "OPERA", "ROTAS"]
  VAR A = "ROTASPEN"
  VAR B = "DAFNEBR0"
  VAR m MAP<CHAR,CHAR> = {}
  FOR i IN 0 .. A.len()-1
    m[A[i]] = B[i]
  OD

  VAR out LIST<STRING> = []
  FOR i IN 0 .. 4
    VAR row = ""
    VAR w = words[4 - i]
    FOR j IN 0 .. w.len()-1
      row += m[w[j]]
    OD
    out.append(row)
  OD
  RETURN out
END


FUNC scalarToBits(n INT) STRING
  RETURN n.toString(2)
END


FUNC deriveQR(bits STRING) TUPLE<STRING,STRING>
  VAR q = bits[0 .. 31]
  VAR r = bits[31 .. 84]
  RETURN (q, r)
END

where w is a tuple describes the system

¿Đeffne:
ROTAS
DAFNE
ABRDN
FR0RF
NDRBA
ENFAD
::Đafne?


[canonical]
010111101100110111100101000101
10111101100110111100101000101
101111011001101111001010001010
1011110110011011110010100010100
10111101100110111100101000101001
0111101100110111100101000101001
111101100110111100101000101001
11101100110111100101000101001
111011001101111001010001010011
11011001101111001010001010011
1011001101111001010001010011
011001101111001010001010011
11001101111001010001010011
110011011110010100010100111
1100110111100101000101001111
100110111100101000101001111
1001101111001010001010011110
001101111001010001010011110
01101111001010001010011110
01101111001010001010011110
1101111001010001010011110
11011110010100010100111100
110111100101000101001111001
1101111001010001010011110010
11011110010100010100111100100
110111100101000101001111001000
10111100101000101001111001000
0111100101000101001111001000
0111100101000101001111001000
0111100101000101001111001000
0111100101000101001111001000
0111100101000101001111001000
0111100101000101001111001000
111100101000101001111001000
1111001010001010011110010000
11110010100010100111100100000
111100101000101001111001000001
11100101000101001111001000001
1100101000101001111001000001
100101000101001111001000001
1001010001010011110010000011
001010001010011110010000011
01010001010011110010000011
1010001010011110010000011
010001010011110010000011
010001010011110010000011
010001010011110010000011
10001010011110010000011
100010100111100100000110
00010100111100100000110
0010100111100100000110
0010100111100100000110
010100111100100000110
010100111100100000110
010100111100100000110
010100111100100000110
010100111100100000110
010100111100100000110
10100111100100000110
0100111100100000110
0100111100100000110
0100111100100000110
0100111100100000110
0100111100100000110
0100111100100000110
100111100100000110
1001111001000001100
10011110010000011000
100111100100000110001
00111100100000110001
0111100100000110001
111100100000110001
1111001000001100011
111001000001100011
11001000001100011
1001000001100011
001000001100011
001000001100011
001000001100011
01000001100011
01000001100011
1000001100011
000001100011
000001100011
00001100011
00001100011
00001100011
00001100011
00001100011
00001100011
0001100011
001100011
001100011
001100011
001100011
001100011
001100011
01100011
01100011
01100011
01100011
1100011
100011
00011
00011
0011
011

[axiomatic]
10000111111110010101010111010110
100001111111100101010101110101100
1000011111111001010101011101011000
000011111111001010101011101011000
00011111111001010101011101011000
00011111111001010101011101011000
0011111111001010101011101011000
011111111001010101011101011000
011111111001010101011101011000
011111111001010101011101011000
011111111001010101011101011000
11111111001010101011101011000
1111111001010101011101011000
11111110010101010111010110001
1111110010101010111010110001
111110010101010111010110001
1111100101010101110101100010
11111001010101011101011000100
111110010101010111010110001000
11110010101010111010110001000
1110010101010111010110001000
11100101010101110101100010001
1100101010101110101100010001
100101010101110101100010001
1001010101011101011000100010
10010101010111010110001000100
100101010101110101100010001000
00101010101110101100010001000
0101010101110101100010001000
0101010101110101100010001000
101010101110101100010001000
01010101110101100010001000
01010101110101100010001000
01010101110101100010001000
01010101110101100010001000
1010101110101100010001000
010101110101100010001000
010101110101100010001000
10101110101100010001000
0101110101100010001000
0101110101100010001000
0101110101100010001000
0101110101100010001000
101110101100010001000
01110101100010001000
01110101100010001000
1110101100010001000
110101100010001000
1101011000100010000
11010110001000100000
110101100010001000000
10101100010001000000
0101100010001000000
0101100010001000000
101100010001000000
01100010001000000
01100010001000000
01100010001000000
01100010001000000
1100010001000000
100010001000000
1000100010000001
000100010000001
00100010000001
00100010000001
00100010000001
00100010000001
0100010000001
100010000001
1000100000011
000100000011
00100000011
00100000011
00100000011
00100000011
0100000011
100000011
1000000111
000000111
00000111
00000111
00000111
00000111
0000111
000111
000111
00111
0111
0111
0111
0111
111

Definitions

ROTAS ROTASPE0
ROTASPEN DAFNEBR0
ABDEFGHIJKLMNOPQRSTUVWXYZ0

divide by null

  • abs(MN0)
  • or
    LIM15(MNO)

Bounds

Cell 1 = 17
D = 34
Fp = 243
G = 714
Lim = 729
K = 1736
x = 62, y = 28

Truth machines

There are different type of truth machines that are validly interpreted by Dafne's L-system.

  1. StegFuck program. ROTAS returns \Y^K] else undefined behavior.

Dafne's completeness theorem

L-system Dafne can paramterize any Brainloller program so it is Turing-complete, in addition it is able to Copy (duplicate and add) a prime encoded 'virtual' register (Counterfish). It is also trivial to bootstrap Dafne into it's own modulo27 context via Emmental. Luigi can also be embedded into a self-contextualized Dafne matrix.

More interestingly is that Dafne can be used construct a proof that "Murray-e" traversal to be Turing Complete.

See also