diff options
Diffstat (limited to 'modeling/prod_subtraction.py')
-rw-r--r-- | modeling/prod_subtraction.py | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/modeling/prod_subtraction.py b/modeling/prod_subtraction.py index b952dd9..dd60496 100644 --- a/modeling/prod_subtraction.py +++ b/modeling/prod_subtraction.py @@ -395,6 +395,25 @@ def subtraction(Model): """, ) + sub_hundreds_with_carry_0 = Model.productionstring( + name="sub_hundreds_with_carry_0", + string=""" + =g> + isa math_goal + op sub_hundreds + hundreds1 =num1 + hundreds2 0 + hundreds2 =num2 + tens_carry 1 + ==> + =g> + isa math_goal + op sub_done + hundreds_ans 0 + ~retrieval> + """, + ) + sub_hundreds_with_carry = Model.productionstring( name="sub_hundreds_with_carry", string=""" @@ -402,6 +421,7 @@ def subtraction(Model): isa math_goal op sub_hundreds hundreds1 =num1 + hundreds2 ~0 hundreds2 =num2 tens_carry 1 ?retrieval> @@ -563,7 +583,7 @@ def subtraction(Model): ==> =g> isa math_goal - op sub_hundreds + op sub_hundreds_done +retrieval> isa math_op op add @@ -577,7 +597,7 @@ def subtraction(Model): string=""" =g> isa math_goal - op sub_hundreds + op sub_hundreds_done hundreds1 =num1 hundreds2 =num2 =retrieval> |