private BDD restrict(BDDFactory f, BDD rule, int[] trues, int[] falses) {
		BDD restrictions = null;
		for(int n: trues) {
			if(restrictions == null) {
				restrictions = f.ithVar(n);
			} else {
				restrictions = restrictions.and(f.ithVar(n));
			}
		}
		
		for(int n: falses) {
			if(restrictions == null) {
				restrictions = f.nithVar(n);
			} else {
				restrictions = restrictions.and(f.nithVar(n));
			}
		}
		
		return rule.restrict(restrictions);
	}