"Simple Change" Follow-Up

In this example situation, "the cost" is the initial request, and "the price is 12.99" is the initial assumption:

> Find the cost when the price is 12.99.

   Let 'C' stand for "COST"

   (Find C)

   Let 'P' stand for "PRICE"

               P = 12.99

       P = 12.99

In "Simple Change" follow-up questions, information is requested based on new assumptions.  The new assumptions come from changing existing variable assignment(s).  The requested information could be the same as initially asked for...

e.g.   What would the cost be if the price were 24.50 instead?

e.g.   What would the cost be if the tax is 2.25?

... or different information altogether:

e.g.   What's the tax when the price is 24.50?

e.g.   If the tip was 3.50, what was the price?

The simplest Simple Change is changing a single quantity.  Here, the same information is requested but using a different value for the price:

e.g.   What would the cost be if the price were 15.99?

That kind of Simple Change is really the same as introducing a contradiction involving a single variable.  Related variables would automatically be undefined and redefined if necessary and wherever possible.  As long as everything needed to answer the follow-up question can be derived, there is no need to specify anything more than the changed quantity.

Consistency

However, if answering the follow-up question requires defining values related to (but not dependent on) the change, those independent quantities may have to be redefined...

> Area is length times width.

Let 'A' stand for "AREA"

Let 'L' stand for "LENGTH"

Let 'W' stand for "WIDTH"

So...
A = L W


Anything else?

> Find the area when the length is 7, and the width is 3.

(Find A)

L = 7

L = 7

W = 3

W = 3

A = L W

A = 21

21 is THE AREA.

Anything else?

> If the length were 10, what would the area be?

L = 10

L = 10

Undefining 'A' ...

Undefining 'W' ...

(Find A)

Anything else?
To prevent an inconsistency, both "area" and "width" get undefined automatically when the "length" is redefined...  Since the "area" depends on the definition of both "length" and "width", there is not enough information to determine the new "area".

The follow-up dialogue needs to provide more information about the new situation for the answer to be determined:

e.g.   If the length were 10, what would the area be?  The width is still 3.

e.g.   What would the area be if the length were 10, and the width were 3?

Given the free-form nature of input, the program can not predetermine which (if any) variables should retain their values when one or more quantities are changed.  This actually allows follow-up questions to impose different conditions than the original question:

e.g.   What would the length be if the area were 15, but the width were now 4?

Although the program can not predetermine which variables should retain their values, the user could use the "lock" command to turn one or more variables into symbolic constants, preventing them from being automatically undefined:

e.g.   !lock W
       If the length were 10, what would the area be?
(Note that the "lock" command operates on assigned variable names, not nouns)

Regardless of how many quantities get changed, these are still "simple" changes since the relationships between quantities (i.e. the stored equations) are unchanged.  Only changes to the stored equations are considered "complex changes".