diff --git a/src/components/RulesOfInferencePlayground.tsx b/src/components/RulesOfInferencePlayground.tsx index 37dd187..0cf186c 100644 --- a/src/components/RulesOfInferencePlayground.tsx +++ b/src/components/RulesOfInferencePlayground.tsx @@ -163,11 +163,18 @@ export default function RulesOfInferencePlayground() { break; } case "resolution": { - // From (p ∨ r) and (¬r ∨ s) derive (p ∨ s) + // From (X ∨ r) and (¬r ∨ Y) derive (X ∨ Y) const hasPorR = selected.includes("p ∨ r"); + const hasQorR = selected.includes("q ∨ r"); const hasNotRorS = selected.includes("¬r ∨ s"); - if (hasPorR && hasNotRorS && selected.length === 2) { - return ["p ∨ s"]; // Focused on intended path for this example + + if (selected.length === 2 && hasNotRorS) { + if (hasPorR) { + return ["p ∨ s"]; + } + if (hasQorR) { + return ["q ∨ s"]; + } } break; }