Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Latest commit

 

History

History
425 lines (332 loc) · 14.6 KB

20826.md

File metadata and controls

425 lines (332 loc) · 14.6 KB

Issue 20826: AlgebraicExtensionFunctor should include number field structure

archive/issues_020589.json:

{
    "assignees": [],
    "body": "<div id=\"comment:0\"></div>\n\nIf a number field is equipped with structural morphisms, these are lost when applying the functorial construction of the number field (via `NumberField.construction()` and `AlgebraicExtensionFunctor`), which happens for example in the construction of push-outs:\n\n```\nsage: R.<x> = ZZ[]\nsage: K.<a> = NumberField(x^2 - 3)\nsage: L0.<b> = K.change_names()\nsage: L0.structure()\n(Isomorphism given by variable name change map:\n   From: Number Field in b with defining polynomial x^2 - 3\n   To:   Number Field in a with defining polynomial x^2 - 3,\n Isomorphism given by variable name change map:\n   From: Number Field in a with defining polynomial x^2 - 3\n   To:   Number Field in b with defining polynomial x^2 - 3)\nsage: L1 = (b*x).parent().base_ring()\nsage: L1.structure()\n(Ring Coercion endomorphism of Number Field in b with defining polynomial x^2 - 3,\n Ring Coercion endomorphism of Number Field in b with defining polynomial x^2 - 3)\n```\nThis currently does not cause too much trouble because the two fields (with and without the structural morphisms) are considered equal, although they are not identical:\n\n```\nsage: L1 is L0\nFalse\nsage: L1 == L0\nTrue\n```\nHowever, this becomes a nuisance when implementing \"equality is identity\" for number fields on ticket #20827.\n\nComponent: **number fields**\n\nAuthor: **Peter Bruin**\n\nBranch/Commit: **[`c30f1eb`](https://github.com/sagemath/sagetrac-mirror/commit/c30f1ebd35df510a699e851468625b9aff7a6364)**\n\nReviewer: **Julian R\u00fcth**\n\n_Issue created by migration from https://trac.sagemath.org/ticket/20826_\n\n",
    "closed_at": "2016-06-18T20:06:06Z",
    "created_at": "2016-06-14T14:51:30Z",
    "labels": [
        "https://github.com/sagemath/sage/labels/c%3A%20number%20fields",
        "https://github.com/sagemath/sage/labels/p%3A%20major%20/%203",
        "https://github.com/sagemath/sage/labels/bug"
    ],
    "milestone": "https://github.com/sagemath/sage/milestones/sage-7.3",
    "reactions": [],
    "repository": "https://github.com/sagemath/sage",
    "title": "AlgebraicExtensionFunctor should include number field structure",
    "type": "issue",
    "updated_at": "2016-06-18T20:06:06Z",
    "url": "https://github.com/sagemath/sage/issues/20826",
    "user": "https://github.com/pjbruin"
}

If a number field is equipped with structural morphisms, these are lost when applying the functorial construction of the number field (via NumberField.construction() and AlgebraicExtensionFunctor), which happens for example in the construction of push-outs:

sage: R.<x> = ZZ[]
sage: K.<a> = NumberField(x^2 - 3)
sage: L0.<b> = K.change_names()
sage: L0.structure()
(Isomorphism given by variable name change map:
   From: Number Field in b with defining polynomial x^2 - 3
   To:   Number Field in a with defining polynomial x^2 - 3,
 Isomorphism given by variable name change map:
   From: Number Field in a with defining polynomial x^2 - 3
   To:   Number Field in b with defining polynomial x^2 - 3)
sage: L1 = (b*x).parent().base_ring()
sage: L1.structure()
(Ring Coercion endomorphism of Number Field in b with defining polynomial x^2 - 3,
 Ring Coercion endomorphism of Number Field in b with defining polynomial x^2 - 3)

This currently does not cause too much trouble because the two fields (with and without the structural morphisms) are considered equal, although they are not identical:

sage: L1 is L0
False
sage: L1 == L0
True

However, this becomes a nuisance when implementing "equality is identity" for number fields on ticket #20827.

Component: number fields

Author: Peter Bruin

Branch/Commit: c30f1eb

Reviewer: Julian Rüth

Issue created by migration from https://trac.sagemath.org/ticket/20826


archive/issue_events_290552.json:

{
    "actor": "https://github.com/pjbruin",
    "created_at": "2016-06-14T14:51:30Z",
    "event": "milestoned",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "milestone_number": null,
    "milestone_title": "sage-7.3",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290552"
}

archive/issue_events_290553.json:

{
    "actor": "https://github.com/pjbruin",
    "created_at": "2016-06-14T14:51:30Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "label": "https://github.com/sagemath/sage/labels/c%3A%20number%20fields",
    "label_color": "0000ff",
    "label_name": "c: number fields",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290553"
}

archive/issue_events_290554.json:

{
    "actor": "https://github.com/pjbruin",
    "created_at": "2016-06-14T14:51:30Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "label": "https://github.com/sagemath/sage/labels/p%3A%20major%20/%203",
    "label_color": "ffbb00",
    "label_name": "p: major / 3",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290554"
}

archive/issue_events_290555.json:

{
    "actor": "https://github.com/pjbruin",
    "created_at": "2016-06-14T14:51:30Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "label": "https://github.com/sagemath/sage/labels/bug",
    "label_color": "d73a4a",
    "label_name": "bug",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290555"
}

archive/issue_events_290556.json:

{
    "actor": "https://github.com/pjbruin",
    "created_at": "2016-06-14T15:11:25Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "label": "https://github.com/sagemath/sage/labels/needs%20review",
    "label_color": "7fff00",
    "label_name": "needs review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290556"
}

archive/issue_comments_302042.json:

{
    "body": "Commit: **[`756f02a`](https://github.com/sagemath/sagetrac-mirror/commit/756f02a03a08b50d804cf61b3aa91533e8a8e9d8)**",
    "created_at": "2016-06-14T15:11:25Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302042",
    "user": "https://github.com/pjbruin"
}

Commit: 756f02a


archive/issue_comments_302043.json:

{
    "body": "Branch: **[u/pbruin/20826-AlgebraicExtensionFunctor_structure](https://github.com/sagemath/sagetrac-mirror/tree/u/pbruin/20826-AlgebraicExtensionFunctor_structure)**",
    "created_at": "2016-06-14T15:11:25Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302043",
    "user": "https://github.com/pjbruin"
}

Branch: u/pbruin/20826-AlgebraicExtensionFunctor_structure


archive/issue_comments_302044.json:

{
    "body": "Description changed:\n``````diff\n--- \n+++ \n@@ -24,4 +24,4 @@\n sage: L1 == L0\n True\n ```\n-However, this becomes a nuisance when trying to implement \"equality is identity\" for number fields (to be done on a future ticket).\n+However, this becomes a nuisance when implementing \"equality is identity\" for number fields on ticket #20827.\n``````\n",
    "created_at": "2016-06-14T15:26:14Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302044",
    "user": "https://github.com/pjbruin"
}

Description changed:

--- 
+++ 
@@ -24,4 +24,4 @@
 sage: L1 == L0
 True
 ```
-However, this becomes a nuisance when trying to implement "equality is identity" for number fields (to be done on a future ticket).
+However, this becomes a nuisance when implementing "equality is identity" for number fields on ticket #20827.

archive/issue_comments_302045.json:

{
    "body": "<div id=\"comment:3\" align=\"right\">comment:3</div>\n\n(seen in `AlgebraicExtensionFunctor`) For comparisons you can simplify\n\n```\nc = cmp(a1,b1)\nif c == 0:\n    c = cmp(a2,b2)\nif c == 0:\n    c = cmp(a3,b3)\n...\nreturn c\n```\nby\n\n```\nreturn cmp(a1,b1) or cmp(a2,b2) or cmp(a3,b3) or ...\n```",
    "created_at": "2016-06-14T17:52:35Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302045",
    "user": "https://github.com/videlec"
}
comment:3

(seen in AlgebraicExtensionFunctor) For comparisons you can simplify

c = cmp(a1,b1)
if c == 0:
    c = cmp(a2,b2)
if c == 0:
    c = cmp(a3,b3)
...
return c

by

return cmp(a1,b1) or cmp(a2,b2) or cmp(a3,b3) or ...

archive/issue_comments_302046.json:

{
    "body": "Changed commit from **[`756f02a`](https://github.com/sagemath/sagetrac-mirror/commit/756f02a03a08b50d804cf61b3aa91533e8a8e9d8)** to **[`c30f1eb`](https://github.com/sagemath/sagetrac-mirror/commit/c30f1ebd35df510a699e851468625b9aff7a6364)**",
    "created_at": "2016-06-15T07:53:31Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302046",
    "user": "https://github.com/sagetrac-git"
}

Changed commit from 756f02a to c30f1eb


archive/issue_comments_302047.json:

{
    "body": "<div id=\"comment:4\"></div>\n\nBranch pushed to git repo; I updated commit sha1. New commits:\n<table><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/c30f1ebd35df510a699e851468625b9aff7a6364\"><code>c30f1eb</code></a></td><td><code>Trac 20826: simplify AlgebraicExtensionFunctor.__cmp__()</code></td></tr></table>\n",
    "created_at": "2016-06-15T07:53:31Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302047",
    "user": "https://github.com/sagetrac-git"
}

Branch pushed to git repo; I updated commit sha1. New commits:

c30f1ebTrac 20826: simplify AlgebraicExtensionFunctor.__cmp__()

archive/issue_events_290557.json:

{
    "actor": "https://github.com/saraedum",
    "created_at": "2016-06-16T07:42:57Z",
    "event": "unlabeled",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "label": "https://github.com/sagemath/sage/labels/needs%20review",
    "label_color": "7fff00",
    "label_name": "needs review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290557"
}

archive/issue_events_290558.json:

{
    "actor": "https://github.com/saraedum",
    "created_at": "2016-06-16T07:42:57Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "label": "https://github.com/sagemath/sage/labels/positive%20review",
    "label_color": "dfffc0",
    "label_name": "positive review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290558"
}

archive/issue_comments_302048.json:

{
    "body": "Reviewer: **Julian R\u00fcth**",
    "created_at": "2016-06-16T07:42:57Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302048",
    "user": "https://github.com/saraedum"
}

Reviewer: Julian Rüth


archive/issue_events_290559.json:

{
    "actor": "https://github.com/vbraun",
    "created_at": "2016-06-18T20:06:06Z",
    "event": "unlabeled",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "label": "https://github.com/sagemath/sage/labels/positive%20review",
    "label_color": "dfffc0",
    "label_name": "positive review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290559"
}

archive/issue_events_290560.json:

{
    "actor": "https://github.com/vbraun",
    "commit_id": "91ed34e8f4a2c3f2201a60fa57419dfe5160abd7",
    "commit_repository": "https://github.com/sagemath/sage",
    "created_at": "2016-06-18T20:06:06Z",
    "event": "closed",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20826#event-290560"
}

archive/issue_comments_302049.json:

{
    "body": "Changed branch from **[u/pbruin/20826-AlgebraicExtensionFunctor_structure](https://github.com/sagemath/sagetrac-mirror/tree/u/pbruin/20826-AlgebraicExtensionFunctor_structure)** to **[`c30f1eb`](https://github.com/sagemath/sagetrac-mirror/commit/c30f1ebd35df510a699e851468625b9aff7a6364)**",
    "created_at": "2016-06-18T20:06:06Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20826",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20826#issuecomment-302049",
    "user": "https://github.com/vbraun"
}

Changed branch from u/pbruin/20826-AlgebraicExtensionFunctor_structure to c30f1eb