// Boolean isIdeal is true if A and B are on γ, otherwise false