public static void write(Writer output, AuTerm term) throws IOException {
		if(term.getAnnotation() != null) {
			output.write('@');
			write(output, term.getAnnotation());
		}
		
		if(term instanceof AuMeta) {
			output.write('M');
		}else if(term instanceof AuVar) {
			AuVar var = (AuVar)term;
			output.write('V');
			output.write(Integer.toString(var.getDepth()));
			write(output, var.getType());
		}else if(term instanceof AuPi) {
			AuPi pi = (AuPi)term;
			output.write('P');
			write(output, pi.getBound());
			write(output, pi.getCodomain());
		}else if(term instanceof AuConstant) {
			AuConstant constant = (AuConstant)term;
			output.write('C');
			writeConstant(output, constant.getDescriptor());
		}else if(term instanceof AuOperator) {
			AuOperator operator = (AuOperator)term;
			output.write('O');
			writeOperator(output, operator.getDescriptor());
			for(int i = 0; i < operator.numArguments(); i++)
				write(output, operator.getArgument(i));
		}else throw new RuntimeException("Illegal term " + term);
	}