From dcb2e13624c83b11d0294c143aac4a1916425b1f Mon Sep 17 00:00:00 2001 From: Aravindh Krishnamoorthy Date: Thu, 14 Aug 2025 22:25:34 +0100 Subject: [PATCH 1/4] Remove DownValues hack for Mathics/WMA return value compatibility. --- IntegrationUtilityFunctions.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/IntegrationUtilityFunctions.m b/IntegrationUtilityFunctions.m index 9fcd0c3..9cf49df 100644 --- a/IntegrationUtilityFunctions.m +++ b/IntegrationUtilityFunctions.m @@ -7734,11 +7734,8 @@ If u is an expression of the form f (Sqrt[a+b*x+c*x^2],x), f (x,x) is a rational ClearAll[FixIntRules,FixIntRule,FixRhsIntRule] -dvMathicsToMath = RuleDelayed[Verbatim[HoldPattern][Verbatim[Condition][lhs_,cond_]],rhs_] :> RuleDelayed[HoldPattern[lhs],Condition[rhs,cond]]; -dvMathToMathics = RuleDelayed[Verbatim[HoldPattern][lhs_], Verbatim[Condition][rhs_,cond_]] :> RuleDelayed[HoldPattern[Condition[lhs,cond]],rhs]; - FixIntRules[] := - (DownValues[Int]=FixIntRules[DownValues[Int] /. dvMathicsToMath] /. dvMathToMathics; Null) + (DownValues[Int]=FixIntRules[DownValues[Int]]; Null) FixIntRules[rulelist_] := Block[{Int, Subst, Simp, Star}, From 548ab412eabf2ffa22d90f1bd09b7e600f2de25c Mon Sep 17 00:00:00 2001 From: Aravindh Krishnamoorthy Date: Sat, 1 Nov 2025 19:38:23 +0000 Subject: [PATCH 2/4] Fixes to get TestRubi["SanityCheck.m"] started. --- IntegrationUtilityFunctions.m | 4 ++-- Test.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IntegrationUtilityFunctions.m b/IntegrationUtilityFunctions.m index 9cf49df..a43aa30 100644 --- a/IntegrationUtilityFunctions.m +++ b/IntegrationUtilityFunctions.m @@ -4103,13 +4103,13 @@ DownValues[Star]={}; - +(* Star::error = "Inert multiplication by zero!"; Star[u_,v_] := ( Message[Star::error]; 0 ) /; EqQ[u,0] - +*) Star[u_,v_] := Map[Function[Star[u,#]],v] /; diff --git a/Test.m b/Test.m index ab59221..02df994 100644 --- a/Test.m +++ b/Test.m @@ -37,7 +37,7 @@ (* ::Section::Closed:: *) (*Mathematica Test Functions*) -If[Not[ValueQ[$ItegrationTestProgramDir], $IntegrationTestProgramDir = Directory[]]]; +If[Not[ValueQ[$ItegrationTestProgramDir]], $IntegrationTestProgramDir = Directory[]]; Begin["`Private`"]; From ad5d44fc737951f6fdc068eb0c4c640056e16ffc Mon Sep 17 00:00:00 2001 From: Aravindh Krishnamoorthy Date: Sat, 1 Nov 2025 21:28:14 +0000 Subject: [PATCH 3/4] Dummy CheckArguments function --- Rubi.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Rubi.m b/Rubi.m index 975ac6b..0a439a0 100644 --- a/Rubi.m +++ b/Rubi.m @@ -217,6 +217,10 @@ TraceBuiltins[DownValues[Int] = DownValues[Int] /. dvFixWith /. dvFixWithNoCond, SortBy->"count"]; Print[""]; +(* Dummy CheckArguments *) +CheckArguments[a_, n_] := n == 1; +CheckArguments[f_[args___], n_] := Length[{args}] == n; + If[$LoadShowSteps === True, StatusBarPrint["Modifying " <> ToString[$RuleCount] <> " integration rules to display steps..."]; StepFunction[Int]; From 02a8d9f91a1b6b86d37ed879733c69971b0e6d66 Mon Sep 17 00:00:00 2001 From: Aravindh Krishnamoorthy Date: Sun, 2 Nov 2025 12:35:00 +0000 Subject: [PATCH 4/4] Fix CheckArguments attributes. --- Rubi.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Rubi.m b/Rubi.m index 0a439a0..cc74598 100644 --- a/Rubi.m +++ b/Rubi.m @@ -220,6 +220,7 @@ (* Dummy CheckArguments *) CheckArguments[a_, n_] := n == 1; CheckArguments[f_[args___], n_] := Length[{args}] == n; +SetAttributes[CheckArguments, HoldFirst]; If[$LoadShowSteps === True, StatusBarPrint["Modifying " <> ToString[$RuleCount] <> " integration rules to display steps..."];