Changes between Version 35 and Version 62 of Ticket #8800
 Timestamp:
 12/08/10 09:01:10 (10 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #8800

Property
Work issues
changed from
to
change 32bit test; remove forgetful coercion

Property
Work issues
changed from

Ticket #8800 – Description
v35 v62 370 370 371 371 __Coercion__ 372 373 Important for the discussion is: What will we do with embeddings? 374 375 Currently, the embedding of two number fields is used to construct a coercion (compatible with the embedding). Of course, the given embedding is also used as a coerce map. 376 377 It was discussed to additionally have a "forgetful" coercion from an embedded to a nonembedded number field. 378 379 It turned out that with bidirectional and forgetful coercions together, one can construct examples in which the coercions do not form a commutative diagram. Hence, we do ''not'' introduce forgetful coercions here. 380 381 However, some improvement of the existing implementation was needed. 372 382 373 383 Was: … … 456 466 __Comparison of fractional ideals / identity of Residue Fields__ 457 467 458 Fractional ideals have a `__cmp__` method that only took into account the Hermite normal form. In addition with coercion, we obtain: 468 Fractional ideals have a `__cmp__` method that only took into account the Hermite normal form. Originally, the comparison of fractional ideals by "==" and by "cmp" yields different results. Since "==" of fractional ideals is used for caching residue fields, but "cmp" was used for comparing residue fields, the residue fields did not provide unique parents. 469 470 Was: 459 471 {{{ 460 472 sage: L.<b> = NumberField(x^8x^4+1) … … 467 479 sage: FK = K.fractional_ideal(K.0) 468 480 sage: FL = L.fractional_ideal(L.0) 469 sage: FK == FL 470 True 471 }}} 472 473 Since the residue fields of two equal fractional fields are the same (caching), we obtain: 474 {{{ 481 sage: FK != FL 482 True 475 483 sage: RL = ResidueField(FL) 476 484 sage: RK = ResidueField(FK) 477 485 sage: RK is RL 478 True 479 }}} 480 481 Thus, `RK` is in fact defined with the embedded field `L`, not with the unembedded `K`. Hence, there is no coercion from the order of `K` to `RK`. However, ''conversion'' works (this used to fail!): 486 False 487 sage: RK == RL 488 True 489 }}} 490 491 Now: 492 {{{ 493 sage: L.<b> = NumberField(x^8x^4+1) 494 sage: F_2 = L.fractional_ideal(b^21) 495 sage: F_4 = L.fractional_ideal(b^41) 496 sage: F_2==F_4 497 True 498 sage: K.<r4> = NumberField(x^42) 499 sage: L.<r4> = NumberField(x^42, embedding=CDF.0) 500 sage: FK = K.fractional_ideal(K.0) 501 sage: FL = L.fractional_ideal(L.0) 502 sage: FK != FL 503 True 504 sage: RL = ResidueField(FL) 505 sage: RK = ResidueField(FK) 506 sage: RK is RL 507 False 508 sage: RK == RL 509 False 510 }}} 511 512 Since `RL` is defined with the embedded field `L`, not with the unembedded `K`, there is no coercion from the order of `K` to `RL`. However, ''conversion'' works (this used to fail!): 482 513 483 514 {{{ 484 515 sage: OK = K.maximal_order() 485 sage: R K.has_coerce_map_from(OK)486 False 487 sage: R K(OK.1)516 sage: RL.has_coerce_map_from(OK) 517 False 518 sage: RL(OK.1) 488 519 0 489 520 }}} 490 521 491 Note that I also had to change some arithmetic stuff in the `_tate` method of elliptic curves: The old implementation relied on the assumption that fractional ideals in an embedded field and in a nonembedded field can't be equal. 522 Note that I also had to change some arithmetic stuff in the `_tate` method of elliptic curves: The old implementation relied on the assumption that fractional ideals in an embedded field and in a nonembedded field can't be equal. This assumption should still hold (since we do not introduce forgetful coercion), but I think it is OK to keep the change in _tate.