build (Complement r1) sigma = do
  lbfa <- build r1 sigma
  let lbfa1 = decode $ determinize $ complete $ encode lbfa
  put (lastState lbfa1 + 1)
  return $ LBFA {
    trans  = trans lbfa1,
    finalS = states lbfa1 \\ finals lbfa1,
    alpha  = sigma,
    initS  = initial lbfa1,
    lastS  = lastState lbfa1
    }
build (Complement r1) sigma = do
  lbfa <- build r1 sigma
  let lbfa1 = decode $ determinize $ complete $ encode lbfa
  put (lastState lbfa1 + 1)
  return $ LBFA {
    trans  = trans lbfa1,
    finalS = states lbfa1 \\ finals lbfa1,
    alpha  = sigma,
    initS  = initial lbfa1,
    lastS  = lastState lbfa1
    }
build (Complement r1) sigma = do
  lbfa <- build r1 sigma
  let lbfa1 = decode $ determinize $ complete $ encode lbfa
  put (lastState lbfa1 + 1)
  return $ LBFA {
    trans  = trans lbfa1,
    finalS = states lbfa1 \\ finals lbfa1,
    alpha  = sigma,
    initS  = initial lbfa1,
    lastS  = lastState lbfa1
    }