I never thought of mod X as a unary operator which RETURNED a value: i.e. 9 mod 5 is 4.
I mean, of course, I think that way all the time in MATH,
but did not expect that in Maple.
I had thought of the mod X as only TESTING equivalence.

Thanks for checking it out.
I made an even simpler version of this routine.
I asked for help in my newest thread titled
"What is wrong with my program?"
I know that this is what programming is:
stop, ask for help, get help, add another line or
1 change or 1 added level of complexity, get stuck,
waste time experimenting, stop, ask for help.
It just seems that there should be some more "automatic"
way of detecting programming logic errors, analogous
to XML editors which point out syntax errors, such as
non-closed brackets.
In fact, that reminds me of a question on the subject of XML
editors which I will ask in another thread.

I want to add 1 to t if and only if t is a
certain value mod 4, as shown. But, my program
thinks none of these values show up.
The final answer should be t = 3 (I think
- just did that in my head).
Please replace this text with the link to your file.
The link can be found in the

File Manager
View 5348_Mod4SumTest.mw on MapleNet or

Download 5348_Mod4SumTest.mwView file details
Also, why would it be impractical? The conference I had in
mind was the International Symposium of Symbolic &
Algebraic Computation (ISSAC) 2003 held at Drexel University,
Philadelphia, PA, USA. Actually, a subconference of ISSAC2003
called Internet Accessible Mathematical Computation (IAMC),
held 2003 August 7. I got the impression that many
mathematicians were already seriously working on a unified bank of math theorems at that time. I am curious to see how
far they have gotten.
After all, if Theorem A + Theorem B lead to Theorem C,
then there is no reason why a web-like resource for
tracking down these theorems AND there proofs could not
be created.

I see nothing on the screen which tells me whether
I am in Worksheet or Document mode.
I just open with the default, which I believe
is Worksheet mode.
Also, I have just used the default math mode,
which is 2-D.
This is how things were set up when I first
opened Maple when I first bought it. These
are the modes I've stuck to ever since.
I've tried playing with the dropdown menu
with all the different types of math modes:
2-D, Warning, 2-D Output, Text Output, Error,
Diagnostic. I have no idea what those things mean.
However, I HAVE noticed that my file always tends
to "jump" back into the default 2-D Math mode.
Correct: I did NOT have those comments in the file
before I uploaded it. I experimented with adding
comments afterwards.

I see nothing on the screen which tells me whether
I am in Worksheet or Document mode.
I just open with the default, which I believe
is Worksheet mode.
Also, I have just used the default math mode,
which is 2-D.
This is how things were set up when I first
opened Maple when I first bought it. These
are the modes I've stuck to ever since.
I've tried playing with the dropdown menu
with all the different types of math modes:
2-D, Warning, 2-D Output, Text Output, Error,
Diagnostic. I have no idea what those things mean.
However, I HAVE noticed that my file always tends
to "jump" back into the default 2-D Math mode.
Correct: I did NOT have those comments in the file
before I uploaded it. I experimented with adding
comments afterwards.

What needless complications by Maple!
I OUGHT to be able to put
as many comment lines
into my Worksheet in Math Mode as I want.
I just checked.
If I have
# comment
Block of Maple math code
it executes properly.
But if I have
# comment 1
# comment 2
Block of Maple math code
I get the delimiting error message.

What needless complications by Maple!
I OUGHT to be able to put
as many comment lines
into my Worksheet in Math Mode as I want.
I just checked.
If I have
# comment
Block of Maple math code
it executes properly.
But if I have
# comment 1
# comment 2
Block of Maple math code
I get the delimiting error message.

Thanks!
printlevel:=2:
worked
printlevel=2:
failed. Just yielded 1=2 as output.
(1 being the default value for printlevel, as you said.)

Thanks!
printlevel:=2:
worked
printlevel=2:
failed. Just yielded 1=2 as output.
(1 being the default value for printlevel, as you said.)

I did not catch the extra ) I needed.
The following routine
L := [4, 5]:
for n to 2
do
if (isprime(L[n])) then 7;
else 9;
end if;
end do;
executes with no error messages. But it
outputs nothing.
My output should be
9 # because L[1] = 4 is not prime
7 # because L[2] = 5 is prime
Also, I notice that when I cut and paste
my program from Maple into this textbox,
the line breaks disappear -
I had to put them back in above manually
- and the parentheses around
isprime(L[n])
disappear. I had to put those back in manually
just now, too. Why?

I did not catch the extra ) I needed.
The following routine
L := [4, 5]:
for n to 2
do
if (isprime(L[n])) then 7;
else 9;
end if;
end do;
executes with no error messages. But it
outputs nothing.
My output should be
9 # because L[1] = 4 is not prime
7 # because L[2] = 5 is prime
Also, I notice that when I cut and paste
my program from Maple into this textbox,
the line breaks disappear -
I had to put them back in above manually
- and the parentheses around
isprime(L[n])
disappear. I had to put those back in manually
just now, too. Why?

I kept searching "line break" in the Help menu,
but all I got back was No Matches found.
I knew a search for keyword "break"
would yield references only to the
flow-control statement "break",
not a "line break".
Also, under
Basic Features > Mathematics > 2-D Math
> Hints and Shortcut Keys
I do not see reference to a soft line break
or the Shift Enter keystroke you mentioned.
I tried it and it works. But, everything that
works, I need to see referenced in the Help
Menu.
Again, thank you to all who responded!

I should have typed, if I didn't,
det(M) = a*b or det(M)= r*s
using only small letters, {a,b,r,s},
to denote elements in the ring, R
and only capital letters, A, B, etc.
to denote matrices. Hope I didn't
waste anyone's time!

Thank you for both your non-Maple and your Maple proof.
Your Maple proof taught me how to use some new commands.
I hate to ask: when you show Adj(A)x = 0,
meaning, [[d -b][-c a]]*[[x 0][0 x]]=[[0 0][0 0]]
you are saying ax=0, bx=0, cx=0, dx=0.
So, R has a lot of zero-divisors, and nilpotent x^2=0.
But, how does this make the entries, {a,b,c,d}, of A
be x-multiples of elements in the ring, R?
I need this theorem to be true in order for me to factor
a certain huge matrix, M, filled with lots of indeterminantes.
I didn't think of this conjecture as just a fun exercise.
In my ring, R, there are no zero-divisors and no nilpotents.
To answer one of the other responders' questions
(I thank them for responding): the size of M is pre-determined.
In my smallest application, M is a 12 by 12 matrix.
Specifically, in my smallest example,
e1, e2, e3 are indeterminate functions of x,
differentially independent over Q(x).
R=Z[e1,e2,e3,De1, De2, De3, D^2e1, D^2e2, D^2e3,
D^3e1, D^3e2, D^3e3]
Also, HOW do I make a line break in Maple without
setting off execution?
I need to be able to write my flow control statements
on multiple lines, such as
if (isprime(n))
then n+1
else n+2

I did mean also to add: my ring R has an identity.
Let char(R)=0, too. Feel free to do the
char(R)=p>0 case for me, too :).
Correct me if I did not set up my conjecture
properly, but, your example:
M factors as M = A*B
where A =[[x,0],[0,1]] and B =[[1,0],[0,x^2]]
det M = x^3
det A = x
det B = x^2
so det M factors over R into two non-units,
and M factors over GL2(R) into two matrices with these
factors as determinants.
So, at the moment, I still don't see a counterexample.
Oh, also, the matrices must be size N by N where N > 1.
The result is trivially true for N=1.
I started a sketch of a proof in the N=2 case,
but I realized it was wrong as I began to fill in the details.