On Nov 21, 5:15 am, Dima Pasechnik <
dimp...@gmail.com> wrote:
> hmm, I don't think this example will fly. If you happen to have a
> divisior of p in the denominator then you get a point with every
> nonzero coordinate divisible by p. So the reduction of it is
> (0:0..:0) -- oeps --- a runtime error sowieso...
Not quite... the thing is, over Q, (1:p) and (1/p:1) represent the
same projective point. If we were to use coercion to reduce such
points modulo p, then (1:p) would nicely map to (1:0) in P^1(GF(p)),
but (1/p:1) would lead to an error.
I'm pretty sure sage enforces the normalization or the points {(1:p),
(p:1)} to either {(1:p),(1:1/p)} or {(1/p:1),(p:1)}, so you would
always run into the problem somewhere.
The real solution is (as sage does): There is no immediate natural
reduction concept for varieties defined over Q. You should first
choose a suitable model over Z. There is real mathematical content in
Sage not having such a coercion by default. It's not *just*
inconvenience.
Taking the inconvenience saves you from rather surprising and hard to
predict behaviour later on. If you put the coercion in here and then
fix "reduction" higher up the chain, you'll just keep stacking kludge
upon kludge.
---
GF(7)(4)*2/3 vs 2/3*GF(7)(4)
They may look the same, but thanks to "/" on ZZ changing parents, they
are not:
(GF(7)(4)*2)/3 vs (2/3)*GF(7)(4)
One is a multiplication between QQ and GF(7); the other a division
between GF(7) and ZZ. By extending "/" on ZZ we've ruined
associativity! We should probably revert that then :-). We already
have "//" anyway. This example also shows how insidious a change in
behaviour for a basic operator can be. I definitely didn't think about
this one when "/" on ZZ was extended to produce elements in QQ.
That or we modify the python parses of expressions and let it do a
tree search to find which evaluation order produces an answer and
which one raises an error and go with the value... every time the
expression gets evaluated. But then we should probably rewrite sage in
Prolog to begin with.