forked from Macaulay2/M2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc and tests for promote, lift update
- Loading branch information
Showing
4 changed files
with
99 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
M2/Macaulay2/packages/Macaulay2Doc/functions/setupLift-doc.m2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- status: DRAFT | ||
--- author(s): PZJ | ||
--- notes: | ||
|
||
undocumented methods setupLift | ||
|
||
doc /// | ||
Key | ||
setupLift | ||
Headline | ||
automatic lift from one ring to another | ||
Usage | ||
setupLift (f,R,S) | ||
setupLift g | ||
Inputs | ||
f: Function | ||
R: Ring | ||
S: Ring | ||
g: RingMap | ||
Description | ||
Text | ||
There are two possible ways of implementing @TO "lift"@. In the first one, we use a function: | ||
Example | ||
R=QQ[x] | ||
S=QQ[y] | ||
setupPromote map(R,S,{x^2}) | ||
setupLift(a->sum(listForm a, (e,c)->if odd first e then error "not liftable" else c*y^(first e//2)),R,S) | ||
promote(y^2+2,R) | ||
lift(oo,S) | ||
lift(x,S,Verify=>false) | ||
Text | ||
In the second one, we define a ring map which is a partial inverse to the promotion map: | ||
Example | ||
R=QQ[x,y] | ||
S=R[s] | ||
setupPromote map(R,S,{x+y}) | ||
setupLift map(S,R,{s,0}) | ||
promote(s^3+2*s-1,R) | ||
lift(oo,S) | ||
lift(x,S,Verify=>false) | ||
SeeAlso | ||
setupPromote | ||
/// |
29 changes: 29 additions & 0 deletions
29
M2/Macaulay2/packages/Macaulay2Doc/functions/setupPromote-doc.m2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- status: DRAFT | ||
--- author(s): PZJ | ||
--- notes: | ||
|
||
undocumented methods setupPromote | ||
|
||
doc /// | ||
Key | ||
setupPromote | ||
Headline | ||
automatic promotion from one ring to another | ||
Usage | ||
setupPromote f | ||
Inputs | ||
f: RingMap | ||
Description | ||
Text | ||
After calling @TT "setupPromote"@, any operation that is given an element of the source of @TT "f"@ but | ||
expects an element of the target of @TT "f"@ will automatically @TO "promote"@ it by applying @TT "f"@. | ||
Example | ||
R=QQ[x_1,x_2] | ||
R'=QQ[e_1,e_2,Degrees=>{1,2}] | ||
setupPromote map(R,R',{x_1+x_2,x_1*x_2}) | ||
promote(e_1^2,R) | ||
e_1*x_1 | ||
e_2==x_1*x_2 | ||
SeeAlso | ||
setupLift | ||
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters