From 0833cb76d984cd6f5f9fa79f9704898a79a20c25 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 09:38:08 +0000 Subject: [PATCH] Refactor inference playground Update the Rules of Inference Playground to allow users to build proofs step-by-step. Users can now add premises, select subsets of premises, and apply inference rules. The system provides feedback if a rule is not applicable and prompts the user to try again. --- src/components/RulesOfInferencePlayground.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/RulesOfInferencePlayground.tsx b/src/components/RulesOfInferencePlayground.tsx index 78c0f39..37dd187 100644 --- a/src/components/RulesOfInferencePlayground.tsx +++ b/src/components/RulesOfInferencePlayground.tsx @@ -197,8 +197,8 @@ export default function RulesOfInferencePlayground() { const valid = deriveCandidates(activeRule, activePremises).includes(result); if (!valid) { toast({ - title: "Not quite", - description: "That rule doesn’t apply to the selected premises.", + title: "Rule not applicable", + description: `The rule "${activeRule}" cannot be applied to the selected premises. Try a different rule or different premises.`, variant: "destructive", }); return; @@ -209,7 +209,9 @@ export default function RulesOfInferencePlayground() { setActiveRule(undefined); if (result === example.conclusion) { - toast({ title: "Nice!", description: "You derived the target conclusion." }); + toast({ title: "Proof complete!", description: "You successfully derived the target conclusion!" }); + } else { + toast({ title: "Step added", description: "Continue building your proof with the new statement." }); } } @@ -388,4 +390,4 @@ export default function RulesOfInferencePlayground() { ); -} +} \ No newline at end of file