Skip to content
Snippets Groups Projects
Commit 062b0dec authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Document how to use normal operations as logical operations.

parent 427135c5
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ To replace all `nounand` (etc) operators and replace them with the Maxima equiva
Notes
* There is no support for symbolic logic symbol input currently and students cannot type `&`, `*` for `and`, and similarly students cannot type `+` for `or`.
* If you would like to accept `*` for `and` and `+` for `or` then you can use the feedback variables to replace operators. E.g. by using `sa:subst(["*"="nounand", "+"="nounor","!"="nounnot"], ans1);`. Note that students cannot type `&` or an apostrophe as part of their input. In the above example we use the post-fix factorial operator `!` is used for logical negation.
* There is no existential operator (not that this is propositional logic, but for the record) or an interpretation of '?' as there exits, and there is no universal operator (which some people type in as `!`).
* To change between language or symbols for logic, use the Logic symbols [option](../Authoring/Tables.md). The default behaviour is to use language.
......
......
......@@ -26,7 +26,7 @@ class stack_cas_castext2_debug extends stack_cas_castext2_block {
if (is_array($options) && isset($options['bound-vars'])) {
$bounds = $options['bound-vars'];
}
//print_r($options);die();
// We are lazy and are not going to write this logic ourselves,
// instead fall back to CASText and let other parts do the task.
if (count($bounds) == 0) {
......
......
......@@ -852,6 +852,10 @@ class stack_answertest_test_data {
array('EqualComAss', '', 'rationalized(1/(1+i))', '[i]', 1, '', ''),
array('EqualComAss', '', 'rationalized(1/(1+1/root(3,2)))', '[root(3,2)]', 1, '', ''),
array('EqualComAss', '', 'B nounand A', 'A nounand B', 1, '', 'Logic'),
array('EqualComAss', '', 'A nounand A', 'A', 0, 'ATEqualComAss ATAlgEquiv_SA_not_expression.', ''),
array('EqualComAss', '', 'subst(["*"="nounand", "+"="nounor","!"="nounnot"], A*B)', 'A nounand B', 1, '', ''),
// Differential equations.
// Functions are evaluated with simp:false.
array('EqualComAss', '', 'diff(y,x)', '0', 1, '', 'Differential Equations'),
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment