<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://drorbn.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=74.99.178.225</id>
	<title>Drorbn - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://drorbn.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=74.99.178.225"/>
	<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=Special:Contributions/74.99.178.225"/>
	<updated>2026-04-23T12:08:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://drorbn.net/index.php?title=06-1350/Syzygies_in_Asymptote&amp;diff=3048</id>
		<title>06-1350/Syzygies in Asymptote</title>
		<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=06-1350/Syzygies_in_Asymptote&amp;diff=3048"/>
		<updated>2006-12-05T16:22:51Z</updated>

		<summary type="html">&lt;p&gt;74.99.178.225: Added helpful hints.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{06-1350/Navigation}}&lt;br /&gt;
&lt;br /&gt;
For a condensed version of this page, check [[06-1350/Syzygies in Asymptote in Brief]].&lt;br /&gt;
&lt;br /&gt;
===Disclaimer===&lt;br /&gt;
These instructions (and the program they describe) are a work in progress and should be considered highly unreliable.&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
To use the syzygy script, first install [http://asymptote.sourceforge.net Asymptote].  Instructions for installing the program on several OSes is given in the documentation at the Asymptote website.  The documentation also gives helpful instructions on how to run a script in Asymptote to produce a picture.  Once installed, download [http://www.math.utoronto.ca/~andy/syzygy.asy syzygy.asy] and put it in a directory where Asymptote can find it.  You should also have (or install) a variant of TeX on your system, such as MiKTeX, so that Asymptote can typeset labels.&lt;br /&gt;
&lt;br /&gt;
===Braids===&lt;br /&gt;
Once installed, we can draw a braid in Asymptote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;  // Accesses the syzygy module.&lt;br /&gt;
Braid b;        // Start a new braid.&lt;br /&gt;
b.n=3;          // The braid has three strands.&lt;br /&gt;
                // The strands are numbered left to right starting at 0.&lt;br /&gt;
b.add(bp,0);    // Add a overcrossing component starting at strand 0,&lt;br /&gt;
                // the leftmost strand.&lt;br /&gt;
b.add(bm,1);    // Add an undercrossing starting at strand 1.&lt;br /&gt;
b.add(phi,0);   // Add a trivalent vertex that merges strands 0 and 1.&lt;br /&gt;
                // Strand 2 is now renumbered as strand 1.&lt;br /&gt;
b.draw();       // Draw the resulting braid.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When saved into an asy file, say &amp;lt;code&amp;gt;mybraid.asy&amp;lt;/code&amp;gt; and run with Asymptote, the result is a picture:&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-mybraid.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relations===&lt;br /&gt;
====Drawing====&lt;br /&gt;
To define a relation, we first define two braids, and then stick them into a &amp;lt;code&amp;gt;Relation&amp;lt;/code&amp;gt; structure.  The below script generates an R3 relation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;      // Access the syzygy module.&lt;br /&gt;
Braid l;            // Define the left hand side of the relation.&lt;br /&gt;
l.n=3;  l.add(bp,0);  l.add(bp,1);  l.add(bp,0);&lt;br /&gt;
Braid r;            // Define the right hand side of the relation.&lt;br /&gt;
r.n=3;  r.add(bp,1);  r.add(bp,0);  r.add(bp,1);&lt;br /&gt;
&lt;br /&gt;
Relation r3;        // Define a relation.&lt;br /&gt;
r3.lsym=&amp;quot;\rho_3&amp;quot;;   // Give the relation a name for when it is written in functional form.&lt;br /&gt;
r3.codename=&amp;quot;rho3&amp;quot;; // Give the relation a name to be used by Mathematica.&lt;br /&gt;
r3.lhs=l;  r3.rhs=r;&lt;br /&gt;
r3.draw();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When saved into an asy file and run, this draws the two sides of the relation.  If TeX is installed, Asymptote will also put a lovely equals sign, typeset by TeX, between the two figures.&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-R3-asy.png|center]]&lt;br /&gt;
&lt;br /&gt;
====Outputting Equations====&lt;br /&gt;
We can also get useful equations out of the relation.  The method &amp;lt;code&amp;gt;r3.toFormula()&amp;lt;/code&amp;gt; will produce a string that is the formula for the relation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(1230)^\star B^+ (1213)^\star B^+ (1023)^\star B^+ = &lt;br /&gt;
(1123)^\star B^+ (1203)^\star B^+ (1231)^\star B^+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This string can be written out to the standard output by &amp;lt;code&amp;gt;write(r3.toFormula())&amp;lt;/code&amp;gt;.  It can be written to a file by &amp;lt;code&amp;gt;file f=output(&amp;quot;filename.txt&amp;quot;); write(f, r3.toFormula())&amp;lt;/code&amp;gt;. The string is formatted so it can be put into TeX or a wiki page using math mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(1230)^\star B^+ (1213)^\star B^+ (1023)^\star B^+ = &lt;br /&gt;
(1123)^\star B^+ (1203)^\star B^+ (1231)^\star B^+&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;lt;code&amp;gt;r3.toLinear()&amp;lt;/code&amp;gt; produces the formula in linear form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\rho_3(x_1,x_2,x_3,x_4) = b^+(x_1,x_2,x_3) + b^+(x_1+x_3,x_2,x_4) + b^+(x_1,x_3,x_4) - b^+(x_1+x_2,x_3,x_4) - b^+(x_1,x_2,x_4) - b^+(x_1+x_4,x_2,x_3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;r3.toCode()&amp;lt;/code&amp;gt; produces a version of the relation that can be used in Mathematica:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rho3[x1_, x2_, x3_, x4_] :&amp;gt; bp[x1, x2, x3] + bp[x1 + x3, x2, x4] + bp[x1, x3, x4]&lt;br /&gt;
                            - bp[x1 + x2, x3, x4] - bp[x1, x2, x4] - bp[x1 + x4, x2, x3]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few relations, such as &amp;lt;code&amp;gt;r3&amp;lt;/code&amp;gt;, are already defined in &amp;lt;code&amp;gt;syzygy.asy&amp;lt;/code&amp;gt; but more should be added.&lt;br /&gt;
&lt;br /&gt;
====Applying====&lt;br /&gt;
Now that we have relations, we can apply them to bigger braids.  Let&#039;s start with the braid in the &amp;lt;math&amp;gt;\Phi&amp;lt;/math&amp;gt; around B syzygy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;&lt;br /&gt;
Braid b;&lt;br /&gt;
b.n=4;&lt;br /&gt;
b.add(bp,2);&lt;br /&gt;
b.add(bp,0);&lt;br /&gt;
b.add(bp,1);&lt;br /&gt;
b.add(bp,0);&lt;br /&gt;
b.add(bp,2);&lt;br /&gt;
b.add(phi,1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-pbstart.png|center]]&lt;br /&gt;
&lt;br /&gt;
After skipping the lowest knot, we can apply R3 to the next three knots:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Braid bb=apply(r3, b, 1, 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here &amp;lt;code&amp;gt;apply(r, b, k, n)&amp;lt;/code&amp;gt; means we are applying the relation &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; to the braid &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; at the place in the braid found by counting &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt; components up from the bottom component and &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; strands in from the leftmost strand.  &amp;lt;code&amp;gt;apply&amp;lt;/code&amp;gt; does not modify the original braid, but returns the result of applying the relation (stored here as &amp;lt;code&amp;gt;bb&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-pbnext.png|center]]&lt;br /&gt;
&lt;br /&gt;
This went from the left hand side of the relation to the right hand side.  To apply a relation in reverse, simply prefix it by a minus sign.  For example &amp;lt;code&amp;gt;apply(-r3, bb, 1, 0)&amp;lt;/code&amp;gt; will yield a braid equivalent to our original.  When applying a relation, the script first checks that the one side of the relation matches that portion of the braid, and will give a (somewhat cryptic) error if the relation cannot be applied.&lt;br /&gt;
&lt;br /&gt;
In our braids, the components are placed from bottom to top in a fixed order.  Sometimes when building syzygies, it is neccessary to swap the order that these components occur.  This is done by the &amp;lt;code&amp;gt;swap&amp;lt;/code&amp;gt; method.  For instance, starting from &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt;, we can swap the two bottom crossings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Braid swapped=b.swap(0,1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-pbswap.png|center]]&lt;br /&gt;
&lt;br /&gt;
Remember that components are ordered from bottom to top, starting at 0.  Again, the script checks to make sure the swap is valid (ie. changing the order of the two components, doesn&#039;t actually change the knot) and will issue an error if it isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
===Syzygies===&lt;br /&gt;
One could manually apply relations and swaps, and make a whole bunch of braids, but it would be annoying to keep track of them all.  Thankfully, the &amp;lt;code&amp;gt;Syzygy&amp;lt;/code&amp;gt; structure does that for us.  For example, here is the complete code for the &amp;lt;math&amp;gt;\Phi&amp;lt;/math&amp;gt; around B syzygy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;&lt;br /&gt;
&lt;br /&gt;
// Phi around B&lt;br /&gt;
Braid initial;&lt;br /&gt;
initial.n=4;&lt;br /&gt;
initial.add(bp,2);&lt;br /&gt;
initial.add(bp,0);&lt;br /&gt;
initial.add(bp,1);&lt;br /&gt;
initial.add(bp,0);&lt;br /&gt;
initial.add(bp,2);&lt;br /&gt;
initial.add(phi,1);&lt;br /&gt;
&lt;br /&gt;
Syzygy pb;&lt;br /&gt;
pb.lsym=&amp;quot;\Phi B&amp;quot;;&lt;br /&gt;
pb.codename=&amp;quot;PhiAroundB&amp;quot;;&lt;br /&gt;
pb.initial=initial;&lt;br /&gt;
pb.apply(r3,1,0);&lt;br /&gt;
pb.apply(r4a,3,1);&lt;br /&gt;
pb.swap(2,3);&lt;br /&gt;
pb.apply(r4b,0,1);&lt;br /&gt;
pb.apply(-r3,1,0);&lt;br /&gt;
pb.apply(-r4a,0,0);&lt;br /&gt;
pb.swap(2,3);&lt;br /&gt;
pb.apply(-r4b,3,0);&lt;br /&gt;
pb.apply(r3,1,1);&lt;br /&gt;
&lt;br /&gt;
pb.draw();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the result&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-PhiAroundB.png|center]]&lt;br /&gt;
&lt;br /&gt;
Again, like relations, we can use &amp;lt;code&amp;gt;pb.toLinear()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| align=center&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;\Phi B(x_1,x_2,x_3,x_4,x_5) = &amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\rho_3(x_1,x_2,x_3,x_5) + \rho_{4a}(x_1+x_5,x_2,x_3,x_4) + \rho_{4b}(x_1+x_2,x_3,x_4,x_5)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;- \rho_3(x_1,x_2,x_3+x_4,x_5) - \rho_{4a}(x_1,x_2,x_3,x_4)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;- \rho_{4b}(x_1,x_3,x_4,x_5) + \rho_3(x_1+x_3,x_2,x_4,x_5).&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;pb.toCode()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PhiAroundB[x1_, x2_, x3_, x4_, x5_] :&amp;gt; rho3[x1, x2, x3, x5] + rho4a[x1 + x5, x2, x3, x4]&lt;br /&gt;
 + rho4b[x1 + x2, x3, x4, x5] - rho3[x1, x2, x3 + x4, x5] - rho4a[x1, x2, x3, x4]&lt;br /&gt;
 - rho4b[x1, x3, x4, x5] + rho3[x1 + x3, x2, x4, x5]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to give the formulas for the syzygies.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Syzygy&amp;lt;/code&amp;gt; structure assumes that after the last application of a relation, the braid is in the same form as the start, so it won&#039;t draw the last braid.  This is annoying when building a syzygy, so it can be turned off by  &amp;lt;code&amp;gt;pb.cyclic=false;&amp;lt;/code&amp;gt;  If you set &amp;lt;code&amp;gt;bp.showall=true;&amp;lt;/code&amp;gt; the syzygy will draw all changes to the braid, including swaps.  Finally, setting &amp;lt;code&amp;gt;bp.number=true;&amp;lt;/code&amp;gt; will print numbers on the diagrams so you can follow them around.&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Example syzygyies can be found at my [[http://www.math.utoronto.ca/andy/ lame homepage]].  Please contact me if you have any questions or suggestions.  Good luck and happy syzyging!&lt;/div&gt;</summary>
		<author><name>74.99.178.225</name></author>
	</entry>
	<entry>
		<id>https://drorbn.net/index.php?title=06-1350/Syzygies_in_Asymptote_in_Brief&amp;diff=3037</id>
		<title>06-1350/Syzygies in Asymptote in Brief</title>
		<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=06-1350/Syzygies_in_Asymptote_in_Brief&amp;diff=3037"/>
		<updated>2006-12-05T01:47:16Z</updated>

		<summary type="html">&lt;p&gt;74.99.178.225: Formatting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Installation===&lt;br /&gt;
See [[06-1350/Syzygies in Asymptote]] for more detailed information.&lt;br /&gt;
&lt;br /&gt;
First install [http://asymptote.sourceforge.net Asymptote].  Once installed, download [http://www.math.utoronto.ca/~andy/syzygy.asy syzygy.asy].&lt;br /&gt;
&lt;br /&gt;
===Braids===&lt;br /&gt;
{|align=center&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;  // Accesses the syzygy module.&lt;br /&gt;
Braid b;        // Start a new braid.&lt;br /&gt;
b.n=3;          // The braid has three strands.&lt;br /&gt;
                // The strands are numbered left to right starting at 0.&lt;br /&gt;
b.add(bp,0);    // Add a overcrossing component starting at strand 0,&lt;br /&gt;
                // the leftmost strand.&lt;br /&gt;
b.add(bm,1);    // Add an undercrossing starting at strand 1.&lt;br /&gt;
b.add(phi,0);   // Add a trivalent vertex that merges strands 0 and 1.&lt;br /&gt;
                // Strand 2 is now renumbered as strand 1.&lt;br /&gt;
b.draw();       // Draw the resulting braid.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|width=&amp;quot;40pt&amp;quot;|&lt;br /&gt;
|[[Image:06-1350-mybraid.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Relations===&lt;br /&gt;
{|align=center&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;      // Access the syzygy module.&lt;br /&gt;
Braid l;            // Define the left hand side of the relation.&lt;br /&gt;
l.n=3;  l.add(bp,0);  l.add(bp,1);  l.add(bp,0);&lt;br /&gt;
Braid r;            // Define the right hand side of the relation.&lt;br /&gt;
r.n=3;  r.add(bp,1);  r.add(bp,0);  r.add(bp,1);&lt;br /&gt;
&lt;br /&gt;
Relation r3;        // Define a relation.&lt;br /&gt;
r3.lsym=&amp;quot;\rho_3&amp;quot;;   // Give the relation a formula name.&lt;br /&gt;
r3.codename=&amp;quot;rho3&amp;quot;; // Give the relation a name to be used by Mathematica.&lt;br /&gt;
r3.lhs=l;  r3.rhs=r;&lt;br /&gt;
r3.draw();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|width=&amp;quot;40pt&amp;quot;|&lt;br /&gt;
|[[Image:06-1350-R3-asy.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r3.toFormula()&amp;lt;/code&amp;gt; produces the formula:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
(1230)^\star B^+ (1213)^\star B^+ (1023)^\star B^+ = &lt;br /&gt;
(1123)^\star B^+ (1203)^\star B^+ (1231)^\star B^+&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;r3.toLinear()&amp;lt;/code&amp;gt; produces the formula in linear form:&lt;br /&gt;
&lt;br /&gt;
{|align=center&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;\rho_3(x_1,x_2,x_3,x_4) = &amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;b^+(x_1,x_2,x_3) + b^+(x_1+x_3,x_2,x_4) + b^+(x_1,x_3,x_4)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;- b^+(x_1+x_2,x_3,x_4) - b^+(x_1,x_2,x_4) - b^+(x_1+x_4,x_2,x_3)&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;r3.toCode()&amp;lt;/code&amp;gt; produces a version usable in Mathematica:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rho3[x1_, x2_, x3_, x4_] :&amp;gt; bp[x1, x2, x3] + bp[x1 + x3, x2, x4] + bp[x1, x3, x4]&lt;br /&gt;
                            - bp[x1 + x2, x3, x4] - bp[x1, x2, x4] - bp[x1 + x4, x2, x3]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Syzygies===&lt;br /&gt;
&lt;br /&gt;
{|align=center&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;&lt;br /&gt;
&lt;br /&gt;
// Phi around B&lt;br /&gt;
Braid initial;&lt;br /&gt;
initial.n=4;&lt;br /&gt;
initial.add(bp,2);&lt;br /&gt;
initial.add(bp,0);&lt;br /&gt;
initial.add(bp,1);&lt;br /&gt;
initial.add(bp,0);&lt;br /&gt;
initial.add(bp,2);&lt;br /&gt;
initial.add(phi,1);&lt;br /&gt;
&lt;br /&gt;
Syzygy pb;&lt;br /&gt;
pb.lsym=&amp;quot;\Phi B&amp;quot;;&lt;br /&gt;
pb.codename=&amp;quot;PhiAroundB&amp;quot;;&lt;br /&gt;
pb.initial=initial;&lt;br /&gt;
pb.apply(r3,1,0);&lt;br /&gt;
pb.apply(r4a,3,1);&lt;br /&gt;
pb.swap(2,3);&lt;br /&gt;
pb.apply(r4b,0,1);&lt;br /&gt;
pb.apply(-r3,1,0);&lt;br /&gt;
pb.apply(-r4a,0,0);&lt;br /&gt;
pb.swap(2,3);&lt;br /&gt;
pb.apply(-r4b,3,0);&lt;br /&gt;
pb.apply(r3,1,1);&lt;br /&gt;
&lt;br /&gt;
pb.draw();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|width=&amp;quot;60pt&amp;quot;|&lt;br /&gt;
|[[Image:06-1350-bpsmall.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Again, like relations, we can use &amp;lt;code&amp;gt;pb.toLinear()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| align=center&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;\Phi B(x_1,x_2,x_3,x_4,x_5) = &amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\rho_3(x_1,x_2,x_3,x_5) + \rho_{4a}(x_1+x_5,x_2,x_3,x_4) + \rho_{4b}(x_1+x_2,x_3,x_4,x_5)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;- \rho_3(x_1,x_2,x_3+x_4,x_5) - \rho_{4a}(x_1,x_2,x_3,x_4)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;- \rho_{4b}(x_1,x_3,x_4,x_5) + \rho_3(x_1+x_3,x_2,x_4,x_5).&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;pb.toCode()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PhiAroundB[x1_, x2_, x3_, x4_, x5_] :&amp;gt; rho3[x1, x2, x3, x5] + rho4a[x1 + x5, x2, x3, x4]&lt;br /&gt;
 + rho4b[x1 + x2, x3, x4, x5] - rho3[x1, x2, x3 + x4, x5] - rho4a[x1, x2, x3, x4]&lt;br /&gt;
 - rho4b[x1, x3, x4, x5] + rho3[x1 + x3, x2, x4, x5]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to produce formulas.&lt;/div&gt;</summary>
		<author><name>74.99.178.225</name></author>
	</entry>
	<entry>
		<id>https://drorbn.net/index.php?title=06-1350/Syzygies_in_Asymptote&amp;diff=3019</id>
		<title>06-1350/Syzygies in Asymptote</title>
		<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=06-1350/Syzygies_in_Asymptote&amp;diff=3019"/>
		<updated>2006-12-04T22:56:33Z</updated>

		<summary type="html">&lt;p&gt;74.99.178.225: Added equations and corrected code.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WARNING: These instructions are a work in progress and should be considered highly unreliable.&lt;br /&gt;
&lt;br /&gt;
To use the syzygy script, first install [http://asymptote.sourceforge.net Asymptote].  Instructions for installing the program on several OSes is given in the documentation at the Asymptote website.  The documentation also gives helpful instructions on how to run a script in Asymptote to produce a picture.  Once installed, download [http://www.math.utoronto.ca/~andy/syzygy.asy syzygy.asy] and put it in a directory where Asymptote can find it.  You should also have (or install) a variant of TeX on your system, such as MiKTeX, so that Asymptote can typeset labels.&lt;br /&gt;
&lt;br /&gt;
Once installed, we can draw a braid in Asymptote:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;  // Accesses the syzygy module.&lt;br /&gt;
Braid b;        // Start a new braid.&lt;br /&gt;
b.n=3;          // The braid has three strands.&lt;br /&gt;
                // The strands are numbered left to right starting at 0.&lt;br /&gt;
b.add(bp,0);    // Add a overcrossing component starting at strand 0,&lt;br /&gt;
                // the leftmost strand.&lt;br /&gt;
b.add(bm,1);    // Add an undercrossing starting at strand 1.&lt;br /&gt;
b.add(phi,0);   // Add a trivalent vertex that merges strands 0 and 1.&lt;br /&gt;
                // Strand 2 is now renumbered as strand 1.&lt;br /&gt;
b.draw();       // Draw the resulting braid.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When saved into an asy file, say &amp;lt;code&amp;gt;mybraid.asy&amp;lt;/code&amp;gt; and run with Asymptote, the result is a picture:&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-mybraid.png|center]]&lt;br /&gt;
&lt;br /&gt;
To define a relation, we first define two braids, and then stick them into a &amp;lt;code&amp;gt;Relation&amp;lt;/code&amp;gt; structure.  The below script generates an R3 relation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;      // Access the syzygy module.&lt;br /&gt;
Braid l;            // Define the left hand side of the relation.&lt;br /&gt;
l.n=3;  l.add(bp,0);  l.add(bp,1);  l.add(bp,0);&lt;br /&gt;
Braid r;            // Define the right hand side of the relation.&lt;br /&gt;
r.n=3;  r.add(bp,1);  r.add(bp,0);  r.add(bp,1);&lt;br /&gt;
&lt;br /&gt;
Relation r3;        // Define a relation.&lt;br /&gt;
r3.lsym=&amp;quot;\rho_3&amp;quot;;   // Give the relation a name for when it is written in functional form.&lt;br /&gt;
r3.codename=&amp;quot;rho3&amp;quot;; // Give the relation a name to used by Mathematica.&lt;br /&gt;
r3.lhs=l;  r3.rhs=r;&lt;br /&gt;
r3.draw();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When saved into an asy file and run, this draws the two sides of the relation.  If TeX is installed, Asymptote will also put a lovely equals sign, typeset by TeX, between the two figures.&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-R3-asy.png|center]]&lt;br /&gt;
&lt;br /&gt;
We can also get useful equations out of the relation.  The method &amp;lt;code&amp;gt;r3.toFormula()&amp;lt;/code&amp;gt; will produce a string that is the formula for the relation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(1230)^\star B^+ (1213)^\star B^+ (1023)^\star B^+ = &lt;br /&gt;
(1123)^\star B^+ (1203)^\star B^+ (1231)^\star B^+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This string can be written out to the standard output by &amp;lt;code&amp;gt;write(r3.toFormula())&amp;lt;/code&amp;gt;.  It can be written to a file by &amp;lt;code&amp;gt;file f=output(&amp;quot;filename.txt&amp;quot;); write(f, r3.toFormula())&amp;lt;/code&amp;gt;. The string is formatted so it can be put into TeX or a wiki page using math mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(1230)^\star B^+ (1213)^\star B^+ (1023)^\star B^+ = &lt;br /&gt;
(1123)^\star B^+ (1203)^\star B^+ (1231)^\star B^+&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;lt;code&amp;gt;r3.toLinear()&amp;lt;/code&amp;gt; produces the formula in linear form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\rho_3(x_1,x_2,x_3,x_4) = b^+(x_1,x_2,x_3) + b^+(x_1+x_3,x_2,x_4) + b^+(x_1,x_3,x_4) - b^+(x_1+x_2,x_3,x_4) - b^+(x_1,x_2,x_4) - b^+(x_1+x_4,x_2,x_3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;r3.toCode()&amp;lt;/code&amp;gt; produces a version of the relation that can be used in Mathematica:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rho3[x1_, x2_, x3_, x4_] :&amp;gt; bp[x1, x2, x3] + bp[x1 + x3, x2, x4] + bp[x1, x3, x4]&lt;br /&gt;
                            - bp[x1 + x2, x3, x4] - bp[x1, x2, x4] - bp[x1 + x4, x2, x3]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few relations, such as &amp;lt;code&amp;gt;r3&amp;lt;/code&amp;gt;, are already defined in &amp;lt;code&amp;gt;syzygy.asy&amp;lt;/code&amp;gt; but more should be added.&lt;br /&gt;
&lt;br /&gt;
Now that we have relations, we can apply them to bigger braids.  Let&#039;s start with the braid in the &amp;lt;math&amp;gt;\Phi&amp;lt;/math&amp;gt; around B syzygy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;&lt;br /&gt;
Braid b;&lt;br /&gt;
b.n=4;&lt;br /&gt;
b.add(bp,2);&lt;br /&gt;
b.add(bp,0);&lt;br /&gt;
b.add(bp,1);&lt;br /&gt;
b.add(bp,0);&lt;br /&gt;
b.add(bp,2);&lt;br /&gt;
b.add(phi,1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-bbstart.png|center]]&lt;br /&gt;
&lt;br /&gt;
After skipping the lowest knot, we can apply R3 to the next three knots:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Braid bb=apply(r3, b, 1, 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here &amp;lt;code&amp;gt;apply(r, b, k, n)&amp;lt;/code&amp;gt; means we are applying the relation &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; to the braid &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; at the place in the braid found by counting &amp;lt;code&amp;gt;k&amp;lt;/code&amp;gt; components up from the bottom component and &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; strands in from the leftmost strand.  &amp;lt;code&amp;gt;apply&amp;lt;/code&amp;gt; does not modify the original braid, but returns the result of applying the relation (stored here as &amp;lt;code&amp;gt;bb&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-bbnext.png|center]]&lt;br /&gt;
&lt;br /&gt;
This went from the left hand side of the relation to the right hand side.  To apply a relation in reverse, simply prefix it by a minus sign.  For example &amp;lt;code&amp;gt;apply(-r3, bb, 1, 0)&amp;lt;/code&amp;gt; will yield a braid equivalent to our original.  When applying a relation, the script first checks that the one side of the relation matches that portion of the braid, and will give a (somewhat cryptic) error if the relation cannot be applied.&lt;br /&gt;
&lt;br /&gt;
In our braids, the components are placed from bottom to top in a fixed order.  Sometimes when building syzygies, it is neccessary to swap the order that these components occur.  This is done by the &amp;lt;code&amp;gt;swap&amp;lt;/code&amp;gt; method.  For instance, starting from &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt;, we can swap the two bottom crossings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Braid swapped=b.swap(0,1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-bbswap.png|center]]&lt;br /&gt;
&lt;br /&gt;
Remember that components are ordered from bottom to top, starting at 0.  Again, the script checks to make sure the swap is valid (ie. changing the order of the two components, doesn&#039;t actually change the knot) and will issue an error if it isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
One could manually apply relations and swaps, and make a whole bunch of braids, but it would be annoying to keep track of them all.  Thankfully, the &amp;lt;code&amp;gt;Syzygy&amp;lt;/code&amp;gt; structure does that for us.  For example, here is the complete code for the &amp;lt;math&amp;gt;\Phi&amp;lt;/math&amp;gt; around B syzygy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import syzygy;&lt;br /&gt;
&lt;br /&gt;
// Phi around B&lt;br /&gt;
Braid initial;&lt;br /&gt;
initial.n=4;&lt;br /&gt;
initial.add(bp,2);&lt;br /&gt;
initial.add(bp,0);&lt;br /&gt;
initial.add(bp,1);&lt;br /&gt;
initial.add(bp,0);&lt;br /&gt;
initial.add(bp,2);&lt;br /&gt;
initial.add(phi,1);&lt;br /&gt;
&lt;br /&gt;
Syzygy pb;&lt;br /&gt;
pb.lsym=&amp;quot;\Phi B&amp;quot;;&lt;br /&gt;
pb.codename=&amp;quot;PhiAroundB&amp;quot;;&lt;br /&gt;
pb.initial=initial;&lt;br /&gt;
pb.apply(r3,1,0);&lt;br /&gt;
pb.apply(r4a,3,1);&lt;br /&gt;
pb.swap(2,3);&lt;br /&gt;
pb.apply(r4b,0,1);&lt;br /&gt;
pb.apply(-r3,1,0);&lt;br /&gt;
pb.apply(-r4a,0,0);&lt;br /&gt;
pb.swap(2,3);&lt;br /&gt;
pb.apply(-r4b,3,0);&lt;br /&gt;
pb.apply(r3,1,1);&lt;br /&gt;
&lt;br /&gt;
pb.draw();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the result&lt;br /&gt;
&lt;br /&gt;
[[Image:06-1350-PhiAroundB.png|center]]&lt;br /&gt;
&lt;br /&gt;
Again, like relations, we can use &amp;lt;code&amp;gt;pb.toLinear()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| align=center&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;\Phi B(x_1,x_2,x_3,x_4,x_5) = &amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\rho_3(x_1,x_2,x_3,x_5) + \rho_{4a}(x_1+x_5,x_2,x_3,x_4) + \rho_{4b}(x_1+x_2,x_3,x_4,x_5)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;- \rho_3(x_1,x_2,x_3+x_4,x_5) - \rho_{4a}(x_1,x_2,x_3,x_4)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;math&amp;gt;- \rho_{4b}(x_1,x_3,x_4,x_5) + \rho_3(x_1+x_3,x_2,x_4,x_5).&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;pb.toCode()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PhiAroundB[x1_, x2_, x3_, x4_, x5_] :&amp;gt; rho3[x1, x2, x3, x5] + rho4a[x1 + x5, x2, x3, x4]&lt;br /&gt;
 + rho4b[x1 + x2, x3, x4, x5] - rho3[x1, x2, x3 + x4, x5] - rho4a[x1, x2, x3, x4]&lt;br /&gt;
 - rho4b[x1, x3, x4, x5] + rho3[x1 + x3, x2, x4, x5]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to give the formulas for the syzygies.&lt;/div&gt;</summary>
		<author><name>74.99.178.225</name></author>
	</entry>
	<entry>
		<id>https://drorbn.net/index.php?title=06-1350/Homework_Assignment_4&amp;diff=2974</id>
		<title>06-1350/Homework Assignment 4</title>
		<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=06-1350/Homework_Assignment_4&amp;diff=2974"/>
		<updated>2006-12-03T19:31:03Z</updated>

		<summary type="html">&lt;p&gt;74.99.178.225: Added link to my HW4.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{06-1350/Navigation}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This assignment is due on Tuesday, December 5 2006.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is an unusual assignment; the task at hand is to do some real research, stuff that to the best of my knowledge had never been done before and most definitely was never written up. Thus the rules will also be a bit different - your work (or at least the accumulation of work on this topic by everyone in class) is meant to be used and useful. So it must be presented in a very readable form (i.e., typed up and with figures) and it must be reliable; in fact, it will be computer verifiable. But some rules will be relaxed, as well.&lt;br /&gt;
&lt;br /&gt;
The task is a bit technical. But hey, it is a homework assignment, after all!&lt;br /&gt;
&lt;br /&gt;
==The Task==&lt;br /&gt;
&lt;br /&gt;
Write all the relations between &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\Phi&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B^{\pm}&amp;lt;/math&amp;gt; in a completely explicit way, both as formulas and as illuminating figures, and then do the same to all the syzygies between these relations. Finally, enter everything you have written into a Mathemmatica script that will verify that for the complex you have created, &amp;lt;math&amp;gt;d^2=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that when I write &amp;quot;all relations&amp;quot; or &amp;quot;all syzygies&amp;quot; above I really mean &amp;quot;a complete independent set of relations/syzygies&amp;quot;. And while this cannot be formalized, &#039;&#039;the prettier your representatives are, the better!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==The Rules==&lt;br /&gt;
&lt;br /&gt;
The first relation and the first syzygy were written by {{Dror}} (see below or visit [[User:Drorbn/06-1350-HW4]]). You are to copy his work into your user space and complete it there.&lt;br /&gt;
* On this wiki create a page named &amp;quot;User:YourUsernameHere/06-1350-HW4&amp;quot; (or simply &amp;quot;User:YourUsernameHere/HW4&amp;quot;). If necessary, go to [[Help:Contents]] to see how this is done.&lt;br /&gt;
* Copy [[User:Drorbn/06-1350-HW4]] into your page. The easiest way to do that is to edit [[User:Drorbn/06-1350-HW4]] and copy the source code into your page using copy-paste on your windowing system. Then &amp;quot;preview&amp;quot; or &amp;quot;save&amp;quot; your copy but &amp;quot;cancel&amp;quot; the edit to [[User:Drorbn/06-1350-HW4]].&lt;br /&gt;
* Now work on your page...&lt;br /&gt;
* Copying is legal! You are allowed, indeed encouraged, to collaborate with others or to simply copy results from other people&#039;s pages into yours. The goal is to get something complete. If one of you will start with something incomplete and somebody else will do some other incomplete thing and yet another person will merge the two, we may achieve the goal.&lt;br /&gt;
* If you copy, always credit the original source! Likewise, if I will ever use any of the material that will be first produced here, I am committed to crediting the source(s). &lt;br /&gt;
* You will get a good though not perfect grade on this assignment for doing anything at all, or even for doing nothing at all but copying on the understanding that by submitting your work you are testifying that you understand it. Perfect grades will go to the people who will make substantial contributions.&lt;br /&gt;
* Elegance counts! Beauty counts! A systematic approach counts!&lt;br /&gt;
&lt;br /&gt;
==A Bonus Question==&lt;br /&gt;
&lt;br /&gt;
Find the definitive completion of the silliest proof for the existence of exponentials. In other words, find the definitive proof that if &amp;lt;math&amp;gt;M(u,v)&amp;lt;/math&amp;gt; is a two-variable power series for which &amp;lt;math&amp;gt;M(y,z)-M(x+y,z)+M(x,y+z)-M(x,y)=0&amp;lt;/math&amp;gt;, the there exists a single-variable power series &amp;lt;math&amp;gt;\epsilon(t)&amp;lt;/math&amp;gt; for which &amp;lt;math&amp;gt;M(u,v)=\epsilon(v)-\epsilon(u+v)+\epsilon(u)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==User:Drorbn/06-1350-HW4==&lt;br /&gt;
&lt;br /&gt;
{{User:Drorbn/06-1350-HW4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
In order to make it easier for us to see each others work, and not all work on the same parts of the assignment I suggest that you can link here to your assignment page.  You can also say what you have worked out there and what you are planing on working on.&lt;br /&gt;
&lt;br /&gt;
My page is [[User:Jana/06-1350-HW4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Shawkm/06-1350-HW4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Andy/06-1350-HW4]]&lt;/div&gt;</summary>
		<author><name>74.99.178.225</name></author>
	</entry>
</feed>