06-1350/Syzygies in Asymptote in Brief: Difference between revisions

From Drorbn
Jump to navigationJump to search
No edit summary
Line 5: Line 5:


===Braids===
===Braids===
[[Image:06-1350-mybraid.png|frame]]
<pre>
<pre>
import syzygy; // Accesses the syzygy module.
import syzygy; // Accesses the syzygy module.
Line 17: Line 18:
b.draw(); // Draw the resulting braid.
b.draw(); // Draw the resulting braid.
</pre>
</pre>

[[Image:06-1350-mybraid.png|center]]


===Relations===
===Relations===
[[Image:06-1350-R3-asy.png|frame]]
<pre>
<pre>
import syzygy; // Access the syzygy module.
import syzygy; // Access the syzygy module.
Line 35: Line 35:
</pre>
</pre>



[[Image:06-1350-R3-asy.png|center]]


<code>r3.toFormula()</code> produces the formula:
<code>r3.toFormula()</code> produces the formula:
Line 58: Line 58:


===Syzygies===
===Syzygies===

[[Image:06-1350-bpsmall.png|frame]]
<pre>
<pre>
import syzygy;
import syzygy;
Line 87: Line 89:
pb.draw();
pb.draw();
</pre>
</pre>

[[Image:06-1350-PhiAroundB.png|center]]


Again, like relations, we can use <code>pb.toLinear()</code>
Again, like relations, we can use <code>pb.toLinear()</code>

Revision as of 18:48, 4 December 2006

Installation

See 06-1350/Syzygies in Asymptote for more detailed information.

First install Asymptote. Once installed, download syzygy.asy.

Braids

06-1350-mybraid.png
import syzygy;  // Accesses the syzygy module.
Braid b;        // Start a new braid.
b.n=3;          // The braid has three strands.
                // The strands are numbered left to right starting at 0.
b.add(bp,0);    // Add a overcrossing component starting at strand 0,
                // the leftmost strand.
b.add(bm,1);    // Add an undercrossing starting at strand 1.
b.add(phi,0);   // Add a trivalent vertex that merges strands 0 and 1.
                // Strand 2 is now renumbered as strand 1.
b.draw();       // Draw the resulting braid.

Relations

06-1350-R3-asy.png
import syzygy;      // Access the syzygy module.
Braid l;            // Define the left hand side of the relation.
l.n=3;  l.add(bp,0);  l.add(bp,1);  l.add(bp,0);
Braid r;            // Define the right hand side of the relation.
r.n=3;  r.add(bp,1);  r.add(bp,0);  r.add(bp,1);

Relation r3;        // Define a relation.
r3.lsym="\rho_3";   // Give the relation a name for when it is written in functional form.
r3.codename="rho3"; // Give the relation a name to be used by Mathematica.
r3.lhs=l;  r3.rhs=r;
r3.draw();


r3.toFormula() produces the formula:

r3.toLinear() produces the formula in linear form:

and r3.toCode() produces a version usable in Mathematica:

rho3[x1_, x2_, x3_, x4_] :> bp[x1, x2, x3] + bp[x1 + x3, x2, x4] + bp[x1, x3, x4]
                            - bp[x1 + x2, x3, x4] - bp[x1, x2, x4] - bp[x1 + x4, x2, x3]

Syzygies

06-1350-bpsmall.png
import syzygy;

// Phi around B
Braid initial;
initial.n=4;
initial.add(bp,2);
initial.add(bp,0);
initial.add(bp,1);
initial.add(bp,0);
initial.add(bp,2);
initial.add(phi,1);

Syzygy pb;
pb.lsym="\Phi B";
pb.codename="PhiAroundB";
pb.initial=initial;
pb.apply(r3,1,0);
pb.apply(r4a,3,1);
pb.swap(2,3);
pb.apply(r4b,0,1);
pb.apply(-r3,1,0);
pb.apply(-r4a,0,0);
pb.swap(2,3);
pb.apply(-r4b,3,0);
pb.apply(r3,1,1);

pb.draw();

Again, like relations, we can use pb.toLinear()

and pb.toCode()

PhiAroundB[x1_, x2_, x3_, x4_, x5_] :> rho3[x1, x2, x3, x5] + rho4a[x1 + x5, x2, x3, x4]
 + rho4b[x1 + x2, x3, x4, x5] - rho3[x1, x2, x3 + x4, x5] - rho4a[x1, x2, x3, x4]
 - rho4b[x1, x3, x4, x5] + rho3[x1 + x3, x2, x4, x5]

to produce formulas.