protected boolean sameForm(RBTerm other, Frame lr, Frame rl) { if (!(other.getClass() == this.getClass())) return false; else { RBVariable binding = (RBVariable) lr.get(this); if (binding == null) { lr.put(this, other); } else if (!binding.equals(other)) { return false; } binding = (RBVariable) rl.get(other); if (binding == null) { rl.put(other, this); return true; } else { return this.equals(binding); } } }