Is a specific mixed model within the class of models generated by lme4? Given $i = 1, ..., n$ people, we measure a continuous response $y$, a group $g = 1, ..., G$ and a class $c = 1,2$. All members of a group $g$ are in the same class. There is dependence within each group, and the amount of dependence is determined by the class. 
For example, the factors could be taken when there are 8 observations as 
class <- as.factor(c(1,1, 1,1, 2,2, 2,2))
group <- as.factor(c(1,1, 2,2, 3,3, 4,4))

These specifications would produce the design matrices
Z1 <- rbind(c(1,0),
            c(1,0),
            c(0,1),
            c(0,1),
            c(0,0),
            c(0,0),
            c(0,0),
            c(0,0))

Z2 <- rbind(c(0,0),
            c(0,0),
            c(0,0),
            c(0,0),
            c(1,0),
            c(1,0),
            c(0,1),
            c(0,1))

and the response
y <- Z1 %*% rnorm(2, 0, s) + Z2 %*% rnorm(2, 0, t) + rnorm(8, 0, e)

where s^2 is the variance of the random effect for the first class, t^2 is the variance of the random effect for the second class, and e^2 is the variance of the error term.
Assuming the variables satisfy these assumptions, is it possible to fit this random effect structure in lme4? An interpretation of this model is that there's a different random effect for different subsets of the data, which doesn't seem to be supported. Is there a mathematical maneuver to express this "different subsets have different random effects" condition as an equivalent condition which is expressible within the class of models lme4 considers? 
 A: It seems that you want to consider the interaction between class and group as your grouping factor for which you assume only random intercepts. Hence, you could try something along these lines:
lmer(y ~ 1 + (1 | class:group), data = <your_data>)

A: I think you might want
dd <- data.frame(y,class,group)
library(lme4)
ff <- y ~ (0+dummy(class,"1")|group) + (0+dummy(class,"2")|group)
lFormula(ff, data=dd)$reTrms$Ztlist

This produces:
$`0 + dummy(class, "1") | group`
4 x 8 sparse Matrix of class "dgCMatrix"
  1 2 3 4 5 6 7 8
1 1 1 . . . . . .
2 . . 1 1 . . . .
3 . . . . . . . .
4 . . . . . . . .

$`0 + dummy(class, "2") | group`
4 x 8 sparse Matrix of class "dgCMatrix"
  1 2 3 4 5 6 7 8
1 . . . . . . . .
2 . . . . . . . .
3 . . . . 1 1 . .
4 . . . . . . 1 1

There are empty columns in each individual element (for the groups that aren't represented within a class), but I think this is harmless ... I would try simulating some larger examples to see if they return the expected/true values. 
The nested structure (1|class) + (1|class|group) (= (1|class/group)) might be equivalent ...
A: Since you say 

All members of a group g are in the same class

it appears that you have a nested structure, so you could fit
lmer(y ~ 1 +  (1 | class) + (1 | class:group), data = mydata)

