scala/ex.scala
changeset 198 d93cc4295306
parent 195 f06aa4e1c25b
child 200 8dde2e46c69d
equal deleted inserted replaced
197:0eef61c56891 198:d93cc4295306
   110 println("Conj 6 4:  " + Conj.eval(List(6, 4)))
   110 println("Conj 6 4:  " + Conj.eval(List(6, 4)))
   111 println("Conj 0 0:  " + Conj.eval(List(0, 0)))
   111 println("Conj 0 0:  " + Conj.eval(List(0, 0)))
   112 println("Disj 0 6:  " + Disj.eval(List(0, 6)))
   112 println("Disj 0 6:  " + Disj.eval(List(0, 6)))
   113 println("Disj 6 4:  " + Disj.eval(List(6, 4)))
   113 println("Disj 6 4:  " + Disj.eval(List(6, 4)))
   114 println("Disj 0 0:  " + Disj.eval(List(0, 0)))
   114 println("Disj 0 0:  " + Disj.eval(List(0, 0)))
   115 //println("Sigma:     " + Sigma(S).eval(List(0,1,2)))
   115 println("Sigma:     " + Sigma(Add).eval(List(2,3)))
   116 //println("Sigma:     " + Sigma(S).eval(List(0,1,2,3,4,5)))
   116 
   117 
   117 
   118 
   118 
   119 val ABCZero = Abacus(List(Goto(1)))
   119 val ABCZero = Abacus(List(Goto(1)))
   120 val ABCSucc = Plus(0, 1, 2, 7) ++ Abacus(List(Inc(1))).shift(Plus(0, 1, 2, 7).p.length, -1)
   120 val ABCSucc = Plus(0, 1, 2, 7) ++ Abacus(List(Inc(1))).shift(Plus(0, 1, 2, 7).p.length, -1)
   121 def ABCId(n: Int, m: Int) = Plus(m, n, n + 1, 7)
   121 def ABCId(n: Int, m: Int) = Plus(m, n, n + 1, 7)