-
Notifications
You must be signed in to change notification settings - Fork 230
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
1 parent
f3c37d2
commit eed5da6
Showing
6 changed files
with
106 additions
and
6 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
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
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
45 changes: 45 additions & 0 deletions
45
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,45 @@ | ||
--- status: DRAFT | ||
--- author(s): PZJ | ||
--- notes: | ||
|
||
undocumented {(setupLift,Function,Ring,Ring,Function), (setupLift,RingMap,Ring,Ring)} | ||
|
||
doc /// | ||
Key | ||
setupLift | ||
(setupLift,Function,Ring,Ring) | ||
(setupLift,RingMap) | ||
Headline | ||
set up 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"@ using @TT "setupLift"@. 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 | ||
/// |
32 changes: 32 additions & 0 deletions
32
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,32 @@ | ||
--- status: DRAFT | ||
--- author(s): PZJ | ||
--- notes: | ||
|
||
undocumented {(setupPromote,RingMap,Ring,Ring,Function), (setupPromote,Function,Ring,Ring,Function), (setupPromote,Function,Ring,Ring), (setupPromote,RingMap,Ring,Ring), (setupPromote,Ring,Ring)} | ||
|
||
|
||
doc /// | ||
Key | ||
setupPromote | ||
(setupPromote,RingMap) | ||
Headline | ||
set up promote from one ring to another | ||
Usage | ||
setupPromote f | ||
Inputs | ||
f: RingMap | ||
Description | ||
Text | ||
This defines promotion from one ring to another as the application of a ring map. | ||
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