From e9f41377ee2fc23e2a0f05cc9b0ff425a2513b18 Mon Sep 17 00:00:00 2001 From: Cotton Seed Date: Thu, 16 Aug 2012 13:42:44 -0400 Subject: [PATCH] Compare twisted U^2 = 0 theory and untwisted theory to compile a list of small examples where U differentials appear. --- Makefile | 8 ++--- knot_tables.cpp | 2 +- main.cpp | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0aabbf9..5ac2999 100644 --- a/Makefile +++ b/Makefile @@ -3,14 +3,14 @@ BISON = /opt/local/bin/bison FLEX = /opt/local/bin/flex # CXX = g++ -CXX = OMPI_CXX=clang++ mpic++ -fno-color-diagnostics --stdlib=libc++ --std=c++11 -I/u/cseed/llvm-3.1/lib/c++/v1 -# CXX = clang++ -fno-color-diagnostics --stdlib=libc++ --std=c++11 +# CXX = OMPI_CXX=clang++ mpic++ -fno-color-diagnostics --stdlib=libc++ --std=c++11 -I/u/cseed/llvm-3.1/lib/c++/v1 +CXX = clang++ -fno-color-diagnostics --stdlib=libc++ --std=c++11 INCLUDES = -I/opt/local/include -I. # OPTFLAGS = -g -# OPTFLAGS = -O2 -g -OPTFLAGS = -O2 -DNDEBUG +OPTFLAGS = -O2 -g +# OPTFLAGS = -O2 -DNDEBUG LDFLAGS = -L/opt/local/lib -L/u/cseed/llvm-3.1/lib # LDFLAGS = -pg -L/opt/local/lib diff --git a/knot_tables.cpp b/knot_tables.cpp index f63b170..3445ed7 100644 --- a/knot_tables.cpp +++ b/knot_tables.cpp @@ -1,7 +1,7 @@ #include -#define HOME "/u/cseed/src/knotkit/" +#define HOME "/Users/cotton/src/knotkit/" bool verbose = 0; diff --git a/main.cpp b/main.cpp index 14238d3..e35381e 100644 --- a/main.cpp +++ b/main.cpp @@ -695,11 +695,93 @@ test_knot_sq () pair, mod_map > compute_kh_sq (const knot_desc &desc) { + abort (); +} + +template pair >, mod_map > +FU_complex (ptr > CF, + mod_map dF, + mod_map dU) +{ + unsigned n = CF->dim (); + + basedvector hq (n * 2); + for (unsigned i = 1; i <= n; i ++) + hq[i] = hq[n + i] = CF->generator_grading (i); + + ptr > CFU = new explicit_module (2 * n, + basedvector (), + hq); + map_builder b (CFU); + for (unsigned i = 1; i <= n; i ++) + { + for (linear_combination_const_iter j = dF[i]; j; j ++) + { + b[i].muladd (j.val (), j.key ()); + b[n + i].muladd (j.val (), n + j.key ()); + } + for (linear_combination_const_iter j = dU[i]; j; j ++) + { + b[i].muladd (j.val (), n + j.key ()); + } + } + mod_map dFU (b); + // assert (dFU.compose (dFU) == 0); + // dFU.check_sseq_graded (); + return pair >, mod_map > (CFU, dFU); +} + +void +compute_twistedU () +{ +#if 0 + for (unsigned i = 1; i <= 11; i ++) + for (unsigned j = 1; j <= htw_knots (i, 0); j ++) + { + knot_diagram kd (htw_knot (i, 0, j)); + ...} +#endif + for (unsigned i = 1; i <= 10; i ++) + for (unsigned j = 1; j <= mt_links (i, 0); j ++) + { + knot_diagram kd (mt_link (i, 0, j)); + + kd.marked_edge = 1; + show (kd); newline (); + + typedef spanning_tree_complex::R R; + + spanning_tree_complex c (kd); + ptr > C = c.C; + + mod_map d2 = c.twisted_d2 (); + assert (d2.compose (d2) == 0); + + mod_map d2U = c.twisted_d2Un (1); + assert (d2.compose (d2U) == d2U.compose (d2)); + + chain_complex_simplifier s (C, d2, 2); + assert (s.new_d == 0); + printf ("|s.new_C| = %d\n", s.new_C->dim ()); + + pair >, mod_map > p = FU_complex (C, d2, d2U); + ptr > CFU = p.first; + mod_map dFU = p.second; + + chain_complex_simplifier s2 (CFU, dFU, 2); + assert (s2.new_d == 0); + printf ("|s2.new_C| = %d\n", s2.new_C->dim ()); + + if (s2.new_C->dim () < 2 * s.new_C->dim ()) + printf (" > EXAMPLE\n"); + } } int main () { + compute_twistedU (); + #if 1 knot_desc desc; desc.t = knot_desc::HTW;