zstrcheck(ref(name,list(expr)),expr,[]).
zstrcheck(number(number),expr,[]).
zstrcheck(apply(expr,expr),expr,[]).
zstrcheck(inop(name,expr,expr),expr,[]).
zstrcheck(ingen(name,expr,expr),expr,[]).
zstrcheck(postop(name,expr),expr,[]).
zstrcheck(pregen(name,expr),expr,[]).
zstrcheck(inrel(name,expr,expr),pred,[]).
zstrcheck(prerel(name,expr),pred,[]).
zstrcheck(equal(expr,expr),pred,[]).
zstrcheck(member(expr,expr),pred,[]).
zstrcheck(power(expr),expr,[]).
zstrcheck(cross(list(expr)),expr,[]).
zstrcheck(tuple(list(expr)),expr,[]).
zstrcheck(if(pred,expr,expr),expr,[]).
zstrcheck(ext(list(expr)),expr,[]).
zstrcheck(seq(list(expr)),expr,[]).
zstrcheck(bag(list(expr)),expr,[]).
zstrcheck(theta(token,token,list(rename)),expr,[]).
zstrcheck(sexpr(sexpr),expr,[]).
zstrcheck(select(expr,name),expr,[]).
zstrcheck(lambda(body,expr),expr,[]).
zstrcheck(comp(body,opt),expr,[]).
zstrcheck(reclet(expr,expr),expr,[]).
zstrcheck(just(expr),opt,[]).
zstrcheck(nothing,opt,[]).
zstrcheck(mu(body,opt),expr,[]).
zstrcheck(falsity,pred,[]).
zstrcheck(truth,pred,[]).
zstrcheck(forall(body,pred),pred,[]).
zstrcheck(exists(body,pred),pred,[]).
zstrcheck(exists1(body,pred),pred,[]).
zstrcheck(and(pred,pred),pred,[]).
zstrcheck(or(pred,pred),pred,[]).
zstrcheck(implies(pred,pred),pred,[]).
zstrcheck(equiv(pred,pred),pred,[]).
zstrcheck(not(pred),pred,[]).
zstrcheck(spred(sexpr),pred,[]).
zstrcheck(letexpr(list(letdef),expr),expr,[]).
zstrcheck(letpred(list(letdef),pred),pred,[]).
zstrcheck(letdef(name,expr),letdef,[]).
zstrcheck(sref(token,token,list(expr),list(rename)),sexpr,[scalc]).
zstrcheck(sand(sexpr,sexpr),sexpr,[scalc]).
zstrcheck(sor(sexpr,sexpr),sexpr,[scalc]).
zstrcheck(simplies(sexpr,sexpr),sexpr,[scalc]).
zstrcheck(sequiv(sexpr,sexpr),sexpr,[scalc]).
zstrcheck(snot(sexpr),sexpr,[scalc]).
zstrcheck(sforall(body,sexpr),sexpr,[scalc]).
zstrcheck(sexists(body,sexpr),sexpr,[scalc]).
zstrcheck(sexists1(body,sexpr),sexpr,[scalc]).
zstrcheck(hide(sexpr,list(name)),sexpr,[scalc]).
zstrcheck(fatsemi(sexpr,sexpr),sexpr,[scalc]).
zstrcheck(project(sexpr,sexpr),sexpr,[scalc]).
zstrcheck(pre(sexpr),sexpr,[scalc]).
zstrcheck(pipe(sexpr,sexpr),sexpr,[scalc]).
zstrcheck(text(body),sexpr,[scalc]).
zstrcheck(sdef(shead,body),top,[]).
zstrcheck(defeq(shead,sexpr),top,[]).
zstrcheck(eqeq(lhs,expr),top,[]).
zstrcheck(define(list(name),body),top,[]).
zstrcheck(axdef(body),top,[]).
zstrcheck(pred(pred),top,[]).
zstrcheck(given(list(name)),top,[]).
zstrcheck(data(name,list(arm)),top,[]).
zstrcheck(arm(name,opt),arm,[]).
zstrcheck(body(list(decl),list(pred)),body,[]).
zstrcheck(body(list(decl),list(pred)),sexpr,[]).
zstrcheck(decl(list(name),expr),decl,[]).
zstrcheck(sdecl(sexpr),decl,[]).
zstrcheck(rename(name,name),rename,[]).
zstrcheck(namedset(name,list(name)),top,[]).
zstrcheck(binding(list(bfield)),expr,[]).
zstrcheck(bindfield(name,expr),bfield,[]).
zstrcheck(basetype(type),expr,[]).
zstrcheck(ftconstant(name,name),expr,[]).
zstrcheck(ftconstructor(name,name,expr),expr,[]).
zstrcheck(ftdestructor(name,name,expr),expr,[]).
zstrcheck(ftcase(name,name,expr),pred,[]).