Fix: Explain why hypothetical syllogism is not applicable

Explain to the user why the hypothetical syllogism rule is not applicable in the current context of the Rules of Inference Playground.
This commit is contained in:
gpt-engineer-app[bot] 2025-08-11 12:07:41 +00:00
parent 970f503da5
commit cb2c983c28

View file

@ -127,6 +127,7 @@ const EXAMPLES: ExampleDef[] = [
"¬q → ¬p",
"¬q → r",
"¬q → s", // target
"¬p → s", // intermediate step
// distractors
"p",
"q",
@ -301,6 +302,10 @@ export default function RulesOfInferencePlayground({ onComplete }: { onComplete?
if (selected.includes("¬q → r") && selected.includes("r → s") && selected.length === 2) {
return ["¬q → s"];
}
// From ¬p → r and r → s derive ¬p → s
if (selected.includes("¬p → r") && selected.includes("r → s") && selected.length === 2) {
return ["¬p → s"];
}
break;
}
}