text:
# Chapter 4 A List of Heatmaps

The main feature of ComplexHeatmap package is it supports to concatenate a list of heatmaps and annotations horizontally or vertically so that it makes it possible to visualize the associations from various sources of information. In this chapter, we mainly introduce the horizontal concatenation because this is the major case we will use in the analysis. In the end we show some examples of vertical concatenation. The concept behind for horizontal and vertical concatenation basically is similar.

For the horizontal concatenation, the number of rows for all heatmaps and annotations should be the same. In following we first introduce the concatenation of heatmaps and later we will show how to concatenate heatmaps with annotations.

In following example, there are three matrices where the third heatmap is a vector and it will be transformed as a one-column matrix. The one-column heatmap is sometimes useful when you concatenate a list of heatmaps that it can show e.g. annotations for each row or some scores of each row. E.g. if rows are genes, the type of the genes (i.e. protein coding or not) can be represented as a one-column character matrix, and the p-value or the fold change from differential expression analysis can be represented as a one-column numeric matrix, and be concatenated to the main expression heatmap.

set.seed(123)
mat1 = matrix(rnorm(80, 2), 8, 10)
mat1 = rbind(mat1, matrix(rnorm(40, -2), 4, 10))
rownames(mat1) = paste0("R", 1:12)
colnames(mat1) = paste0("C", 1:10)

mat2 = matrix(runif(60, max = 3, min = 1), 6, 10)
mat2 = rbind(mat2, matrix(runif(60, max = 2, min = 0), 6, 10))
rownames(mat2) = paste0("R", 1:12)
colnames(mat2) = paste0("C", 1:10)

le = sample(letters[1:3], 12, replace = TRUE)
names(le) = paste0("R", 1:12)

ind = sample(12, 12)
mat1 = mat1[ind, ]
mat2 = mat2[ind, ]
le = le[ind]

To concatenate heatmaps, simply use + operator.

ht1 = Heatmap(mat1, name = "rnorm")
ht2 = Heatmap(mat2, name = "runif")
ht3 = Heatmap(le, name = "letters")

ht1 + ht2 + ht3

Under default mode, dendrograms from the second heatmap will be removed and row orders will be the same as the first one. Also row names for the first two heatmaps are removed as well.

The returned value of the concatenation is a HeatmapList object. Similar as explained in Section 2.11, directly printing ht_list will call draw() method with default settings. With explicitly calling draw() method, you can have more controls on the heatmap list.

ht_list = ht1 + ht2 + ht3
class(ht_list)
## [1] "HeatmapList"
## attr(,"package")
## [1] "ComplexHeatmap"

You can append any number of heatmaps to the heatmap list. Also you can append a heatmap list to a heatmap list.

# code only for demonstration
ht1 + ht_list
ht_list + ht1
ht_list + ht_list

NULL can be added to the heatmap list. It would be convinient when users want to construct a heatmap list through a for loop.

# code only for demonstration
ht_list = NULL  ## Heatmap(...) + NULL gives you a HeatmapList object
for(s in sth) {
ht_list = ht_list + Heatmap(...)
}

You can also add heatmap annotations to the heatmap list, see more details in Section 4.7.

## 4.1 Titles

A heatmap list also has title which is like a global title covering all heatmaps. row_title and column_title should be set in the draw() function.

From following example, we set different colors for each heatmap to make them distinguishable.

col_rnorm = colorRamp2(c(-3, 0, 3), c("green", "white", "red"))
col_runif = colorRamp2(c(0, 3), c("white", "orange"))
col_letters = c("a" = "pink", "b" = "purple", "c" = "blue")
ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm,
row_title = "Heatmap 1", column_title = "Heatmap 1")
ht2 = Heatmap(mat2, name = "runif", col = col_runif,
row_title = "Heatmap 2", column_title = "Heatmap 2")
ht3 = Heatmap(le, name = "letters", col = col_letters)
ht_list = ht1 + ht2 + ht3

draw(ht_list, row_title = "Three heatmaps, row title", row_title_gp = gpar(col = "red"),
column_title = "Three heatmaps, column title", column_title_gp = gpar(fontsize = 16))

## 4.2 Size of heatmaps

The width for some heatmaps can be set to absolute units. Note width controls the width of the heatmap body.

ht2 = Heatmap(mat2, name = "runif", col = col_runif, width = unit(4, "cm"))
ht3 = Heatmap(le, name = "letters", col = col_letters, width = unit(5, "mm"))
ht1 + ht2 + ht3

The width of all heatmaps can be set as absolute units.

ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, width = unit(4, "cm"))
ht2 = Heatmap(mat2, name = "runif", col = col_runif, width = unit(6, "cm"))
ht3 = Heatmap(le, name = "letters", col = col_letters, width = unit(1, "cm"))
ht1 + ht2 + ht3

If width is numeric, it is converted as a null unit.

ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, width = 6)
ht2 = Heatmap(mat2, name = "runif", col = col_runif, width = 4)
ht3 = Heatmap(le, name = "letters", col = col_letters, width = 1)
ht1 + ht2 + ht3

heatmap_width also can control the width of the heatmap, but it is the total width of the heatmap body plus the heatmap components.

## 4.3 Gap between heatmaps

ht_gap controls the space between heatmaps. The value can be a single unit or a vector of units.

ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm)
ht2 = Heatmap(mat2, name = "runif", col = col_runif)
ht3 = Heatmap(le, name = "letters", col = col_letters)
ht_list = ht1 + ht2 + ht3
draw(ht_list, ht_gap = unit(1, "cm"))

draw(ht_list, ht_gap = unit(c(3, 10), "mm"))

## 4.4 Automatic adjustment to the main heatmap

There is always a main heatmap in the heatmap list that controls the global row ordering. All the other heatmaps are automatically adjusted according to the settings in the main heatmap. For these non-main heatmaps, the adjustments are:

• No row clustering is performed and they all take the row ordering of the main heatmap.
• Row titles are removed.
• If the main heatmap is split by rows, all other heatmaps will also be split by same levels as the main heatmap.
• The height of the main heatmap are taken as the height of all heatmaps.

By default, the first heatmap is taken as the main heatmap.

ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, row_km = 2)
ht2 = Heatmap(mat2, name = "runif", col = col_runif)
ht3 = Heatmap(le, name = "letters", col = col_letters)
ht2 + ht1 + ht3 # ht2 is the main heatmap and row_km in ht1 is ignored

The main heatmap can be specified by main_heatmap argument. The value can be a numeric index or the name of the heatmap (of course, you need to set the heatmap name when you create the Heatmap object). In following example, although ht1 is the second heatmap, we can set it as the main heatmap.

ht_list = ht2 + ht1 + ht3
draw(ht_list, main_heatmap = "rnorm")

By default, the dendrogram and the row title are plotted just beside the main heatmap, just to emphasize the clustering or the splitting is calculated from the main heatmap while not other heatmaps. However, the position of the dendrogram and row title of the main heatmap can be controlled by row_dend_side and row_sub_title_side in draw() function.

ht_list = ht2 + ht1 + ht3
draw(ht_list, main_heatmap = "rnorm", row_dend_side = "right", row_sub_title_side = "left")

Similarly, if there is no row clustering in the main heatmap, all other heatmaps are not clustered neither.

ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, cluster_rows = FALSE)
ht2 = Heatmap(mat2, name = "runif", col = col_runif)
ht3 = Heatmap(le, name = "letters", col = col_letters)
ht1 + ht2 + ht3

As you may have observed, all the row names between heatmaps are removed from the plot. You can show them by setting auto_adjust = FALSE.

ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm)
ht2 = Heatmap(mat2, name = "runif", col = col_runif)
ht3 = Heatmap(le, name = "letters", col = col_letters)
ht_list = ht1 + ht2 + ht3
draw(ht_list, auto_adjust = FALSE)

## 4.5 Control main heatmap in draw() function

Settings of the main heatmap can be controlled in the main Heatmap() function. To make it convinient, settings that affect heatmap rows can also be directly set in draw(). If some of these settings are set, corresponding settings in the main Heatmap() will be overwritten.

In draw() function, following main heatmap settings control row orders of all heatmaps.

• cluster_rows
• clustering_distance_rows
• clustering_method_rows
• row_dend_width
• show_row_dend
• row_dend_reorder
• row_dend_gp
• row_order

Following settings control the row slices.

• row_gap
• row_km
• row_km_repeats
• row_split

Following settings control the heatmap height.

• height
• heatmap_height

In following example, row_km = 2, cluster_rows = FALSE for ht1 is overwritten in draw().

ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, row_km = 2, cluster_rows = FALSE)
ht2 = Heatmap(mat2, name = "runif", col = col_runif)
ht3 = Heatmap(le, name = "letters", col = col_letters)
ht_list = ht1 + ht2 + ht3
draw(ht_list, row_km = 1, row_split = le, cluster_rows = TRUE)

## 4.6 Annotations as components are adjusted

If some of the heatmaps in the heatmap list have annotations, in most of the cases, the heights of the heatmap annotations are different for different heatmaps. There are automatic adjustment for heatmap annotations, and this adjustment will also involve adjustment of dendrograms.

Normally, the size of simple annotations will not change in the adjustment. In following example, the dendrogram for the second heatmap is adjusted. Note you still can change the size of simple annotation by setting anno_simple_size in HeatmapAnnotation() or globally set ht_opt$anno_simple_size. ha1 = HeatmapAnnotation(foo1 = 1:10, annotation_name_side = "left") ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, top_annotation = ha1) ht2 = Heatmap(mat2, name = "runif", col = col_runif) ht3 = Heatmap(le, name = "letters", col = col_letters) ht1 + ht2 + ht3 If the first two heatmaps all have annotations, since the size of simple annotations keep unchanged, the size of complex annotations will be adjusted to make the total heights of the two heatmap annotations the same. ha1 = HeatmapAnnotation(foo1 = 1:10, bar1 = anno_points(1:10), annotation_name_side = "left") ha2 = HeatmapAnnotation(bar2 = anno_barplot(1:10)) ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, top_annotation = ha1) ht2 = Heatmap(mat2, name = "runif", col = col_runif, top_annotation = ha2) ht3 = Heatmap(le, name = "letters", col = col_letters) ht_list = ht1 + ht2 + ht3 draw(ht_list, ht_gap = unit(c(6, 2), "mm")) Similarly, if the first heatmap only contains simple annotatins, dendrogram will be adjusted. ha1 = HeatmapAnnotation(foo1 = 1:10, annotation_name_side = "left") ha2 = HeatmapAnnotation(bar2 = anno_barplot(1:10, height = unit(2, "cm"))) ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, top_annotation = ha1) ht2 = Heatmap(mat2, name = "runif", col = col_runif, top_annotation = ha2) ht3 = Heatmap(le, name = "letters", col = col_letters) ht_list = ht1 + ht2 + ht3 draw(ht_list, ht_gap = unit(c(6, 2), "mm")) If the both heatmaps only contain simple annotations but with unequal number, dendrogram will be adjusted. ha1 = HeatmapAnnotation(foo1 = 1:10, annotation_name_side = "left") ha2 = HeatmapAnnotation(bar2 = cbind(b1 = 1:10, b2 = 11:20, b3 = 21:30)) ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, top_annotation = ha1) ht2 = Heatmap(mat2, name = "runif", col = col_runif, top_annotation = ha2) ht3 = Heatmap(le, name = "letters", col = col_letters) ht_list = ht1 + ht2 + ht3 draw(ht_list) If you also want to automatically adjust the size of simple annotations, set simple_anno_size_adjust = TRUE in every HeatmapAnnotation() calls. If the second heatmap has no bottom annotation, column names for the second heatmap are adjusted to be put directly below the heatmap body. ha1 = HeatmapAnnotation(foo1 = 1:10, bar1 = anno_points(1:10), annotation_name_side = "left") ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, bottom_annotation = ha1) ht2 = Heatmap(mat2, name = "runif", col = col_runif) ht3 = Heatmap(le, name = "letters", col = col_letters) ht_list = ht1 + ht2 + ht3 draw(ht_list) ## 4.7 Concatenate with annotations Row annotations can be concatenated to the horizontal heatmap list, while not only a component of the heatmap. See following examples which are very straightforward. ha1 = rowAnnotation(foo = 1:12, bar = anno_barplot(1:12, width = unit(4, "cm"))) ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, row_km = 2) ht1 + ha1 The foo and bar annotations can be defined in two separated rowAnnotation() calls. Heatmap(mat1, name = "rnorm", col = col_rnorm, row_km = 2) + rowAnnotation(foo = 1:12) + rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm"))) Basically heatmaps and row annotations can be concatenated arbitarily. rowAnnotation(foo = 1:12) + Heatmap(mat1, name = "rnorm", col = col_rnorm, row_km = 2) + rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm"))) + Heatmap(mat2, name = "runif", col = col_runif) As mentioned in previous chapters, row annotations can also be heatmap components as left annotations or right annotations. The difference of row annotations as independent ones and as heatmap components is discussed in Section 4.9. ## 4.8 Concatenate only the annotations The concatenation can be done without any heatmap. rowAnnotation(foo = 1:12) + rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm"))) If there is only one HeatmapAnnotation object, you must concatenated with NULL. rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm"))) + NULL The annotation list is actually also a HeatmapList object. anno_list = rowAnnotation(foo = 1:12) + rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm"))) class(anno_list) ## [1] "HeatmapList" ## attr(,"package") ## [1] "ComplexHeatmap" Thus, you can use some functionalities of the draw() function for the annotation list, such as row splitting. draw(anno_list, row_split = rep(c("A", "B"), each = 6)) In Section 10.2, we will show how to use a list of annotations to visualize multiple summary statistics. ## 4.9 Vertical concatenation Heatmaps and annotations (now it is column annotation) can be concatenated vertically by the %v% operator. All the relatated settings and adjustments are very similar as the horizontal concatenation. Please check following examples. mat1t = t(mat1) mat2t = t(mat2) ht1 = Heatmap(mat1t, name = "rnorm", col = col_rnorm, row_title = "rnorm") ht2 = Heatmap(mat2t, name = "runif", col = col_runif, row_title = "runif") ht3 = Heatmap(rbind(letters = le), name = "letters", col = col_letters) ht_list = ht1 %v% ht2 %v% ht3 draw(ht_list) draw(ht_list, column_km = 2) ha = HeatmapAnnotation(foo = anno_barplot(1:12, height = unit(2, "cm"))) ht_list = ht1 %v% ha %v% ht2 %v% ht3 draw(ht_list, column_km = 2) ht1 = Heatmap(mat1t, name = "rnorm", col = col_rnorm, row_km = 2) ht2 = Heatmap(mat2t, name = "runif", col = col_runif, row_km = 2) ht3 = Heatmap(rbind(letters = le), name = "letters", col = col_letters) ha = HeatmapAnnotation(foo = anno_barplot(1:12, height = unit(2, "cm"))) ht_list = ht1 %v% ha %v% ht2 %v% ht3 draw(ht_list, column_km = 2) For the vertical heatmap list, now row annotations should be the heatmap components (by right_annotation and left_annotation) and they are adjusted just like column annotations for the horizontal heatmap list. ht1 = Heatmap(mat1t, name = "rnorm", col = col_rnorm, row_km = 2, left_annotation = rowAnnotation(foo1 = 1:10, bar1 = anno_barplot(1:10))) ha = HeatmapAnnotation(foo = anno_barplot(1:12, height = unit(2, "cm"), axis_param = list(side = "right"))) ht2 = Heatmap(mat2t, name = "runif", col = col_runif, row_km = 2, left_annotation = rowAnnotation(foo2 = 1:10)) ht3 = Heatmap(rbind(letters = le), name = "letters", col = col_letters) ht_list = ht1 %v% ha %v% ht2 %v% ht3 draw(ht_list, column_km = 2) Since rowAnnotation() allows arbitary number of annotations, the way showed above is the only way to expand the heatmap list horizontally and vertically at the same time. ## 4.10 Subset the heatmap list Similar as subsetting the Heatmap object (Section 2.13), the heatmap list can also be subsetted by providing row index and column index. For horizontal heatmap list, row index correspond to rows in all heatmaps and annotations, while column index only corresponds to a subset of heatmaps and annotations. For vertical heatmap list, it’s the other way around. In following we use horizontal heatmap list as example. ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, left_annotation = rowAnnotation(foo1 = 1:12, bar1 = anno_points(1:12))) ht2 = Heatmap(mat2, name = "runif", col = col_runif) ha = rowAnnotation(foo2 = anno_barplot(1:12), bar2 = 12:1) ht_list = ht1 + ht2 + ha names(ht_list) ## [1] "rnorm" "runif" "foo2" "bar2" ht_list[1:6, c("rnorm", "bar2")] foo1 and bar are components of heatmap rnorm, so they can not be selected in the subset function, while foo2 and bar2 are independent row annotations and they can selected to take subset of them. ## 4.11 Plot the heatmap list Similar as described in Section 2.11, directly entering the HeatmapList object in interactive R session calls the show() method which calls the draw() method internally. When there is no plot after you entering the object, you should use draw() explicitly: # code only for demonstration draw(ht_list, ...) ## 4.12 Get orders and dendrograms row_order(), column_order(), row_dend() and column_dend() can be used to retrieve corresponding information from the heatmap list. The usage is straightforward by following examples. But remember you need to apply these functions on the object returned by draw(). ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm) ht2 = Heatmap(mat2, name = "runif", col = col_runif) ht_list = ht1 + ht2 ht_list = draw(ht_list) row_order(ht_list) ## [1] 9 2 10 8 6 11 5 7 12 4 1 3 column_order(ht_list) ##$rnorm
##  [1]  5  2  7  6 10  1  9  8  4  3
##
## $runif ## [1] 4 10 2 5 7 6 1 3 8 9 If rows or columns are split, the returned values will also be a list. ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm) ht2 = Heatmap(mat2, name = "runif", col = col_runif, column_km = 2) ht_list = ht1 + ht2 ht_list = draw(ht_list, row_km = 2) row_order(ht_list) ##$1
## [1] 12  4  1  3
##
## $2 ## [1] 9 2 10 8 6 11 5 7 column_order(ht_list) ##$rnorm
## $rnorm[[1]] ## [1] 5 2 7 6 10 1 9 8 4 3 ## ## ##$runif
## $runif$1
## [1] 7 6 1 3 8 9
##
## $runif$2
## [1]  4 10  2  5

You can specify a certain heatmap for the column order.

column_order(ht_list, name = "runif")
## $1 ## [1] 7 6 1 3 8 9 ## ##$2
## [1]  4 10  2  5

The logic is the same for extracting dendrograms and also the same for vertical heatmap list, so we don’t show more examples here.

## 4.13 Change parameters globally

ht_opt() is an option function which controls some parameters globally. You can set some parameters for all heatmaps/annotations simultaneously by this global function. Please note you should put it before your heatmap code and reset all option values after drawing the heatmaps to get rid of affecting next heatmap.

ht_opt
##                   Option Value
##     heatmap_row_names_gp  NULL
##  heatmap_column_names_gp  NULL
##     heatmap_row_title_gp  NULL
##  heatmap_column_title_gp  NULL
##          legend_title_gp  NULL
##    legend_title_position  NULL
##         legend_labels_gp  NULL
##       legend_grid_height  NULL
##        legend_grid_width  NULL
##            legend_border  NULL
##           heatmap_border  NULL
##        annotation_border  NULL
##              fast_hclust FALSE
##    show_parent_dend_line  TRUE
##                  verbose FALSE
##                  show_vp FALSE
##         simple_anno_size   5mm
##         ROW_ANNO_PADDING   1mm

There are following parameters to control all heatmaps:

• heatmap_row_names_gp: set row_names_gp in all Heatmap().
• heatmap_column_names_gp: set column_names_gp in all Heatmap().
• heatmap_row_title_gp: set row_title_gp in all Heatmap().
• heatmap_column_title_gp: set column_title_gp in all Heatmap().
• heatmap_border: set border in all Heatmap().

Following parameters control the legends:

• legend_title_gp: set title_gp in all heatmap legends and annotation legends.
• legend_title_position: set title_position in all heatmap legends and annotation legends.
• legend_labels_gp: set labels_gp in all heatmap legends and annotation legends.
• legend_grid_width: set grid_width in all heatmap legends and annotation legends.
• legend_grid_height: set grid_height in all heatmap legends and annotation legends.
• legend_border: set border in all heatmap legends and annotation legends.

Following parameters control heatmap annotations:

• annotation_border: set border in all HeatmapAnnotation().
• anno_simple_size: set size for the simple annotation.

Following parameters control the space between heatmap components:

• DENDROGRAM_PADDING: space bewteen dendrograms and heatmap body.
• DIMNAME_PADDING: space between row/column names and heatmap body.
• TITLE_PADDING: space between row/column titles and heatmap body.
• COLUMN_ANNO_PADDING: space between column annotations and heatmap body.
• ROW_ANNO_PADDING: space between row annotations and heatmap body.

Other parameters:

• fast_hclust: whether use fastcluster::hclust() to speed up clustering?
• show_parent_dend_line: when heatmap is split, whether to add a dashed line to mark parent dendrogram and children dendrograms?

You can get or set option values by the traditional way (like base::options()) or by $ operator: ht_opt("heatmap_row_names_gp") ht_opt$heatmap_row_names_gp

# to set option values
ht_opt("heatmap_row_names_gp" = gpar(fontsize = 8))
ht_opt\$heatmap_row_names_gp = gpar(fontsize = 8)

Reset to the default values by:

ht_opt(RESET = TRUE)

Following example shows to control some graphic parameters globally.

ht_opt(heatmap_column_names_gp = gpar(fontface = "italic"),
heatmap_column_title_gp = gpar(fontsize = 10),
legend_border = "black",
heatmap_border = TRUE,
annotation_border = TRUE
)
ht1 = Heatmap(mat1, name = "ht1", column_title = "Heatmap 1",
top_annotation = HeatmapAnnotation(foo = 1:10))
ht2 = Heatmap(mat2, name = "ht2", column_title = "Heatmap 2",
top_annotation = HeatmapAnnotation(bar = 1:10))
ht1 + ht2

ht_opt(RESET = TRUE)

These global parameters can also be set in the draw() function to temporarily change the global parameters, and they are reset back after the plot is made. Please check the help page of draw,HeatmapList-method.

## 4.14 Adjust blank space caused by annotations

Heatmap annotations may have annotation names and axes, for which the spaces are also taken into account when arranging heatmap components in the final layout. Sometimes, this adjustment is not smart that you may see blank areas in the plot that are not necessary.

One scenario is for a matrix with no row names, the space to the right of the heatmap is determined by the size of annotation name, which results in blank space between the heatmap and the legend. Also the heatmap list level row title is plotted to the left of the annotation axis, which gives blank area if there is no row dendrogram.

adjust_annotation_extension controls whether to take account of the space of annotation names and axes for the layout. Compare following two plots.

m = matrix(rnorm(100), 10)
ht = Heatmap(m, name = "mat",
top_annotation = HeatmapAnnotation(foo = anno_points(1:10)),
show_row_dend = FALSE)
draw(ht, row_title = "fooooooooooo", adjust_annotation_extension = TRUE,  # default
draw(ht, row_title = "fooooooooooo", adjust_annotation_extension = FALSE,
column_title = "adjust_annotation_extension = FALSE")

Another way to partially solve the space problem is to move the annotation name to the left and use heamtap-level row title.

Heatmap(m, name = "mat",
top_annotation = HeatmapAnnotation(foo = anno_points(1:10),
annotation_name_side = "left"),
row_title = "fooooooooooo",
show_row_dend = FALSE)

However, this adjustment for annotations sometimes is also necessary, e.g. when the heatmap is very short:

ht = Heatmap(m, name = "mat",
top_annotation = HeatmapAnnotation(foo = anno_points(1:10)),
show_row_dend = FALSE)
draw(ht, row_title = "fooooooooooo", adjust_annotation_extension = TRUE,
column_title = "adjust_annotation_extension = TRUE")

Therefore, we set TRUE as the default of adjust_annotation_extension and users can configure it based on specific scenarios.

## 4.15 Manually increase space around the plot

The layout of the ComplexHeatmap is not perfect that it is still possible some of the text are drawn out of the plotting region. In this case, you can manually set the padding argument in draw() function to increase the blank areas around the final plot.

The value of padding should be a unit vector with length of four. The four values correspond to the space at the bottom, left, top and right sides.

The following example is not a perfect example because the maximal width for row names can be controlled by max_row_name_width argument, but we can still use it to demonstrate the use of padding.

m2 = m
rownames(m2) = paste0("R", 1:10)
rownames(m2)[1] = "a long long long long long row name"
ht = Heatmap(m2, name = "mat", row_names_side = "left", show_row_dend = FALSE)
draw(ht, padding = unit(c(2, 20, 2, 2), "mm")) ## see right heatmap in following


text:
# Given two adjacent sides of a rectangle are equivalent, prove that the quadrilateral is a square.

In Geometry class today, we were talking about quadrilaterals and the types of them. I was wondering that if, given a rectangle with two adjacent equal congruent sides, if that was enough to prove it was a square. I thought surely, it MUST be a square, because of... And there I was lost for a while. I flipped through my notes looking for some theorem that proved this in a step or two, and, finding none, I tried my own way of proving it. Did I prove it correctly? If not, how do I correct it? Finally, is there a shorter, more elegant way to execute it? (The below is the proof I have.)

A               B
┌─┬────┼────┬─┐
├─┘         └─┤
│             │
│             ┼
│             │
├─┐         ┌─┤
└─┴─────────┴─┘
D               C

Conjecture: If $\overline{AB}\cong\overline{BC}$ and $ABCD$ is a rectangle, then $ABCD$ is a square.

Proof.

$$\begin{array}{cc|cc} \text{Statements}&&\text{Reasons}\\\hline \overline{DB}\cong\overline{DB}&&\text{Reflexive property of Congruency}\\\hline \angle ABD\cong\angle BDC&&\text{AIA* Theorem}\\ \angle DBC\cong\angle ADB\\\hline \triangle ABD\cong \triangle CBD&&\text{SAS** Theorem}\\\hline \overline{AD}\cong\overline{CB}&&\text{CPCTC***}\\ \overline{AB}\cong\overline{CD}\\\hline ABCD\text{ is a square}&&\text{Definition of Square}&\blacksquare \end{array}$$

*Alternate Interior Angle

**Side angle side

***Congruent Parts of a Triangle are Congruent

• The opposite sides of a rectangle are always congruent. If two adjacent sides are congruent, then their opposite sides are also congruent to each other and to them. Therefore all 4 sides are congruent, therefore square. QED – Mego Feb 24 '16 at 23:39
• Oh, hm, I forgot about the definition of rectangle >_> – Conor O'Brien Feb 24 '16 at 23:41

Given: ABCD is a rectangle, AB = BC

Prove: ABCD is a square

Step 1: AB = CD, BC = AD (property of rectangle: opposite sides are congruent)

Step 2: AB = AD, BC = CD (transitive property from Step 1 and Given)

Step 3: ABCD is a square (definition of square: rectangle where all sides are congruent)

QED

• I wouldn't say that Step 1 follows from the definition of rectangle ... at least not the definition I use. A rectangle is, simply, a quadrilateral with four right angles (hence the name); thus, it happens to be a parallelogram (each pair of opposite sides are parallel, because they make a supplementary pair of adjacent interior angles). Now, the opposite-sides-are-congruent thing is a property of parallelograms (which is proven more-or-less the way OP did it, but in a bit more generality), which makes it a property of rectangles, but it's not part of the definition. – Blue Feb 24 '16 at 23:53
• @Blue Good point; I edited it to say "property" rather than "definition". – Mego Feb 24 '16 at 23:59

format: plain


text:
# Totally convex, convex and locally convex sets

Consider the following definitions :

$C\subset M$ is convex if any $p,\ q\in C$ all minimizing geodesic between $p$ and $q$ are in $C$

$C$ is totally convex if for $p,\ q\in C$, every geodesic between $p$ and $q$ are in $C$

$C$ is locally convex if for $p\in C$ there is open set $U$ around $p$ s.t. $U\cap C$ is convex

So on $S^2(1)$ closed hemisphere $C$ is locally convex but not convex And $C$ is not totally geodesic

And on a suitable sphere which has no constant curvature there is a convex set which is not totally geodesic

Hence these are distinct

But are there connected locally convex set $C$ s.t. in $C\subset C_1\subset C_2$ where $C_1$ is smallest convex set containing $C$ and $C_2$ is smallest totally geodesic set containing $C_1$, inclusions are strict?

If $C$ is not connected, then we have an example

Let $M$ be the cylinder $\{x^2+y^2=1,\ |z| < 2\}$ plus hemispherical caps on both ends.
Let $C$ be the set $\{x < \frac{1}{2},\ x^2+y^2=1,\ |z| < 1\}$. $C$ is locally convex.
Then $C_1$ is the cylinder $\{x^2+y^2=1,\ |z| < 1\}$, with all shortest geodesics between points in $C$.
And $C_2$, with all geodesics between points in $C$, is all of $M$.


text:
Misnegation of the week

From a letter to the editor in the Nov. 8 New Yorker:

Such rhetoric then [by left-wing critics of George W. Bush] was hardly less corrosive, or less supported by scholarly reasoning, than the crackpot vitriol now spewed by Beck and his ilk.

As we've noted many times, combinations of negation and scalar predicates are hard for our poor monkey brains to process.

If you're curious about the context, the whole letter is here.

In other semantic news, today's Tank McNamara offers a new twist on a joke first told by Bertrand Russell in 1905:

Russell's version, from On Denoting:

When we say: George IV wished to know whether so-and-so', or when we say So-and-so is surprising' or So-and-so is true', etc., the so-and-so' must be a proposition. Suppose now that so-and-so' contains a denoting phrase. We may either eliminate this denoting phrase from the subordinate proposition so-and-so', or from the whole proposition in which so-and-so' is a mere constituent. Different propositions result according to which we do. I have heard of a touchy owner of a yacht to whom a guest, on first seeing it, remarked, I thought your yacht was larger than it is'; and the owner replied, No, my yacht is not larger than it is'. What the guest meant was, The size that I thought your yacht was is greater than the size your yacht is'; the meaning attributed to him is, `I thought the size of your yacht was greater than the size of your yacht'.

If you find the BCS context puzzling, some background is here and here.

[And if you're having some trouble with the New Yorker letter, consider these other examples of the pattern "hardly less X or less Y":

As a principle of criminal justice it is hardly less familiar or less important than the principle that only the guilty ought to be punished.
It should be regarded as hardly less valuable or less sacred than a provision of the Constitution itself.
Lavoisiers work in Paris as treasurer was hardly less onerous or less hazardous.
Its companion, No.6 is hardly less expansive or less splendid.
The issue could hardly be less confusing or less controversial.

Note that the pairings of X's and Y's are congruent in evaluative valence:  familiar/important, valuable/sacred, onerous/hazardous, expansive/splendid, confusing/controversial.

Now compare the quote we started with, which pairs corrosive with supported by scholarly reasoning. ]

1. The Ridger said,

November 13, 2010 @ 6:53 pm

I should probably just keep quiet but … "such rhetoric was hardly less corrosive than this" seems straightforward to me. X was hardly less corrosive than Y = X was no more corrosive than Y = Y is just as corrosive as X …

What am I missing?

[(myl) The problem is in the second disjunct. Try it by itself: "…was no less supported by scholarly reasoning than …"]

2. Stephen said,

November 13, 2010 @ 7:09 pm

@The Ridger: You're missing the second part of the phrase. The writer of the letter meant to say "hardly … more supported by scholarly reasoning…"

3. Stephen said,

November 13, 2010 @ 7:11 pm

Oops, I see my response was barely less slow than MYL's.

4. The Ridger said,

November 13, 2010 @ 7:40 pm

Ah, yes. I see now.

5. Ray Dillinger said,

November 13, 2010 @ 8:28 pm

Are there any languages where this kind of construction is easily understandable? If so, how do they do it?

Are there languages with separate positive and negative quantifiers and a grammatical rule against negating them? Hmm, probably not. Now that I consider it I think a grammatical rule against a semantic operation violates one of the hundreds of linguistic universals research has uncovered. Languages with such a rule regarding surface syntax would more-or-less instantly acquire some periphrastic or other means of performing the semantic operation.

6. Faldone said,

November 13, 2010 @ 11:04 pm

I would plug the "less supported …" in the place of "less corrosive" giving me "hardly … less supported …"

7. Chris said,

November 14, 2010 @ 11:18 am

I absolutely cannot understand the second speech bubble in the comic.
If I delete the word "does" then everything makes perfect sense.
Can someone either expand that sentence to a fuller form, or patronizingly explain that the incomprehensibility is in fact the joke please?

8. Terry Collmann said,

November 14, 2010 @ 11:20 am

It took me a couple of goes to get it the right way round, Faldone, but part (1) means "Beck vitriol = corrosive, anti-Bush vitriol = not less corrosive than Beck vitriol", while part (2) means, or was intended to have the meaning, "Beck vitriol = not much supported by scholarly reasoning, anti-Bush vitriol = not more supported by scholarly reasoning than Beck vitriol". Hope that's clear – a less and a more, not two lesses.

9. Nelida said,

November 14, 2010 @ 11:42 am

I also believe that the crux of the matter lies, as it has been pointed out in several of the preceding comments, in the mistaken use of the second "less", which should have been "more":, i.e.: "hardly less corrosive and hardly more supported by scholarly reasoning". Perhaps a different construction would have prevented the error, as, for instance: "was hardly less corrosive, nor more supported by scholarly reasoning, than etc etc". Or, maybe, to keep the autor's "hardly less" construction, and achieve a correct pairing: "was hardly less corrosive, or less unsupported by scholarly reasoning, than etc etc".

10. ignoramus said,

November 14, 2010 @ 2:19 pm

On the scale of zero to 14,one was 0.0 and tother was 0.1 or was is 13.9 and 14 or just a simple 10.

11. Jerry Friedman said,

November 14, 2010 @ 10:15 pm

@Chris: I think the idea is "If Boise State doesn't play teams that are better than the ones it's been playing" or "Given that Boise State plays teams as weak as it does". The way it's expressed suggests the paradox that Boise State's opponents could be better than themselves.

None of this, including the strip as a whole, strikes me as all that funny.

Patronizing enough?

12. groki said,

November 14, 2010 @ 10:39 pm

or, putting the letter together with the comic: "if the nation doesn't elect anyone better than it does, then winning should have no reflection on its world standing."

13. Private Zydeco said,

November 17, 2010 @ 10:54 pm

"[…] was neither less corrosive nor better supported by scholarly research than [etc.]"


text:
### Counting Factors

Is there an efficient way to work out how many factors a large number has?

### Repeaters

Choose any 3 digits and make a 6 digit number by repeating the 3 digits in the same order (e.g. 594594). Explain why whatever digits you choose the number will always be divisible by 7, 11 and 13.

### Oh! Hidden Inside?

Find the number which has 8 divisors, such that the product of the divisors is 331776.

# Indivisible

##### Stage: 3 Short Challenge Level:
See all short problems arranged by curriculum topic in the short problems collection

Some students (fewer than $100$) are having trouble lining up  for a school production.

When they line up in $3$s, two people are left over.
When they line up in $4$s, three people are left over.
When they line up in $5$s, four people are left over.
When they line up in $6$s, five people are left over.

How many students are there in the group?

If you liked this problem, here is an NRICH task which challenges you to use similar mathematical ideas.

This problem is taken from the UKMT Mathematical Challenges.


text:
# The Stacks Project

## Tag 03UY

### 53.104. Cohomological interpretation

This is how Grothendieck interpreted the $L$-function.

Theorem 53.104.1 (Finite Coefficients). Let $X$ be a scheme of finite type over a finite field $k$. Let $\Lambda$ be a finite ring of order prime to the characteristic of $k$ and $\mathcal{F}$ a constructible flat $\Lambda$-module on $X_{\acute{e}tale}$. Then $$L(X, \mathcal{F}) = \det(1 - \pi_X^*~T |_{R\Gamma_c(X_{\bar k}, \mathcal{F})})^{-1} \in \Lambda[[T]].$$

Proof. Omitted. $\square$

Thus far, we don't even know whether each cohomology group $H^i_c(X_{\bar k}, \mathcal{F})$ is free.

Theorem 53.104.2 (Adic sheaves). Let $X$ be a scheme of finite type over a finite field $k$, and $\mathcal{F}$ a $\mathbf{Q}_\ell$-sheaf on $X$. Then $$L(X, \mathcal{F}) = \prod\nolimits_i \det(1 - \pi_X^*T |_{H_c^i(X_{\bar k} , \mathcal{F})})^{(-1)^{i + 1}} \in \mathbf{Q}_\ell[[T]].$$

Proof. This is sketched below. $\square$

Remark 53.104.3. Since we have only developed some theory of traces and not of determinants, Theorem 53.104.1 is harder to prove than Theorem 53.104.2. We will only prove the latter, for the former see [SGA4.5]. Observe also that there is no version of this theorem more general for $\mathbf{Z}_\ell$ coefficients since there is no $\ell$-torsion.

We reduce the proof of Theorem 53.104.2 to a trace formula. Since $\mathbf{Q}_\ell$ has characteristic 0, it suffices to prove the equality after taking logarithmic derivatives. More precisely, we apply $T\frac{d}{dT} \log$ to both sides. We have on the one hand \begin{align*} T \frac{d}{dT} \log L(X, \mathcal{F}) & = T\frac{d}{dT} \log \prod_{x \in |X|} \det(1 - \pi_x^* T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1} \\ & = \sum_{x \in |X|} T \frac{d}{dT} \log ( \det(1 - \pi_x^* T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1}) \\ & = \sum_{x \in |X|} \deg x \sum_{n \geq 1} \text{Tr}((\pi_x^n)^* |_{\mathcal{F}_{\bar x}}) T^{n\deg x} \end{align*} where the last equality results from the formula $$T\frac{d}{dT}\log\left(\det\left(1-fT|_M\right)^{-1}\right) = \sum_{n\geq 1} \text{Tr}(f^n|_M)T^n$$ which holds for any commutative ring $\Lambda$ and any endomorphism $f$ of a finite projective $\Lambda$-module $M$. On the other hand, we have \begin{align*} & T\frac{d}{dT} \log\left( \prod\nolimits_i \det(1-\pi_X^*T |_{H_c^i\left(X_{\bar k} , \mathcal{F}\right)})^{(-1)^{i+1}} \right) \\ & = \sum\nolimits_i (-1)^i \sum\nolimits_{n \geq 1} \text{Tr}\left((\pi_X^n)^* |_{H_c^i(X_{\bar k},\mathcal{F})}\right) T^n \end{align*} by the same formula again. Now, comparing powers of $T$ and using the Mobius inversion formula, we see that Theorem 53.104.2 is a consequence of the following equality $$\sum_{d | n} d \sum_{x \in |X| \atop \deg x = d} \text{Tr}((\pi_X^{n/d})^* |_{\mathcal{F}_{\bar x}}) = \sum_i (-1)^i \text{Tr}((\pi^n_X)^* |_{H^i_c(X_{\bar k}, \mathcal{F})}).$$ Writing $k_n$ for the degree $n$ extension of $k$, $X_n = X \times_{\mathop{\mathrm{Spec}} k} \mathop{\mathrm{Spec}}(k_n)$ and $_n\mathcal{F} = \mathcal{F}|_{X_n}$, this boils down to $$\sum_{x \in X_n(k_n)} \text{Tr}(\pi_X^* |_{_n\mathcal{F}_{\bar x}}) = \sum_i (-1)^i \text{Tr}((\pi^n_X)^* |_{H^i_c({(X_n)}_{\bar k}, _n\mathcal{F})})$$ which is a consequence of Theorem 53.104.5.

Theorem 53.104.4. Let $X/k$ be as above, let $\Lambda$ be a finite ring with $\#\Lambda \in k^*$ and $K\in D_{ctf}(X, \Lambda)$. Then $R\Gamma_c(X_{\bar k}, K)\in D_{perf}(\Lambda)$ and $$\sum_{x\in X(k)}\text{Tr}\left(\pi_x |_{K_{\bar x}}\right) = \text{Tr}\left(\pi_X^* |_{R\Gamma_c(X_{\bar k}, K )}\right).$$

Proof. Note that we have already proved this (REFERENCE) when $\dim X \leq 1$. The general case follows easily from that case together with the proper base change theorem. $\square$

Theorem 53.104.5. Let $X$ be a separated scheme of finite type over a finite field $k$ and $\mathcal{F}$ be a $\mathbf{Q}_\ell$-sheaf on $X$. Then $\dim_{\mathbf{Q}_\ell}H_c^i(X_{\bar k}, \mathcal{F})$ is finite for all $i$, and is nonzero for $0\leq i \leq 2 \dim X$ only. Furthermore, we have $$\sum_{x\in X(k)} \text{Tr}\left(\pi_x |_{\mathcal{F}_{\bar x}}\right) = \sum_i (-1)^i\text{Tr}\left(\pi_X^* |_{H_c^i(X_{\bar k}, \mathcal{F})}\right).$$

Proof. We explain how to deduce this from Theorem 53.104.4. We first use some étale cohomology arguments to reduce the proof to an algebraic statement which we subsequently prove.

Let $\mathcal{F}$ be as in the theorem. We can write $\mathcal{F}$ as $\mathcal{F}'\otimes \mathbf{Q}_\ell$ where $\mathcal{F}' = \left\{\mathcal{F}'_n\right\}$ is a $\mathbf{Z}_\ell$-sheaf without torsion, i.e., $\ell : \mathcal{F}'\to \mathcal{F}'$ has trivial kernel in the category of $\mathbf{Z}_\ell$-sheaves. Then each $\mathcal{F}_n'$ is a flat constructible $\mathbf{Z}/\ell^n\mathbf{Z}$-module on $X_{\acute{e}tale}$, so $\mathcal{F}'_n \in D_{ctf}(X, \mathbf{Z}/\ell^n\mathbf{Z})$ and $\mathcal{F}_{n+1}' \otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} = \mathcal{F}_n'$. Note that the last equality holds also for standard (non-derived) tensor product, since $\mathcal{F}'_n$ is flat (it is the same equality). Therefore,

1. the complex $K_n = R\Gamma_c\left(X_{\bar k}, \mathcal{F}_n'\right)$ is perfect, and it is endowed with an endomorphism $\pi_n : K_n\to K_n$ in $D(\mathbf{Z}/\ell^n\mathbf{Z})$,
2. there are identifications $$K_{n+1} \otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} = K_n$$ in $D_{perf}(\mathbf{Z}/\ell^n\mathbf{Z})$, compatible with the endomorphisms $\pi_{n+1}$ and $\pi_n$ (see \cite[Rapport 4.12]{SGA4.5}),
3. the equality $\text{Tr}\left(\pi_X^* |_{K_n}\right) = \sum_{x\in X(k)} \text{Tr}\left(\pi_x |_{(\mathcal{F}'_n)_{\bar x}}\right)$ holds, and
4. for each $x\in X(k)$, the elements $\text{Tr}(\pi_x |_{\mathcal{F}'_{n, \bar x}}) \in \mathbf{Z}/\ell^n\mathbf{Z}$ form an element of $\mathbf{Z}_\ell$ which is equal to $\text{Tr}(\pi_x |_{\mathcal{F}_{\bar x}}) \in \mathbf{Q}_\ell$.

It thus suffices to prove the following algebra lemma. $\square$

Lemma 53.104.6. Suppose we have $K_n\in D_{perf}(\mathbf{Z}/\ell^n\mathbf{Z})$, $\pi_n : K_n\to K_n$ and isomorphisms $\varphi_n : K_{n+1} \otimes^\mathbf{L}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} \to K_n$ compatible with $\pi_{n+1}$ and $\pi_n$. Then

1. the elements $t_n = \text{Tr}(\pi_n |_{K_n})\in \mathbf{Z}/\ell^n\mathbf{Z}$ form an element $t_\infty = \{t_n\}$ of $\mathbf{Z}_\ell$,
2. the $\mathbf{Z}_\ell$-module $H_\infty^i = \mathop{\mathrm{lim}}\nolimits_n H^i(k_n)$ is finite and is nonzero for finitely many $i$ only, and
3. the operators $H^i(\pi_n): H^i(K_n)\to H^i(K_n)$ are compatible and define $\pi_\infty^i : H_\infty^i\to H_\infty^i$ satisfying $$\sum (-1)^i \text{Tr}( \pi_\infty^i |_{H_\infty^i \otimes_{\mathbf{Z}_\ell}\mathbf{Q}_\ell}) = t_\infty.$$

Proof. Since $\mathbf{Z}/\ell^n\mathbf{Z}$ is a local ring and $K_n$ is perfect, each $K_n$ can be represented by a finite complex $K_n^\bullet$ of finite free $\mathbf{Z}/\ell^n \mathbf{Z}$-modules such that the map $K_n^p \to K_n^{p+1}$ has image contained in $\ell K_n^{p+1}$. It is a fact that such a complex is unique up to isomorphism. Moreover $\pi_n$ can be represented by a morphism of complexes $\pi_n^\bullet : K_n^\bullet\to K_n^\bullet$ (which is unique up to homotopy). By the same token the isomorphism $\varphi_n : K_{n+1} \otimes_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}^{\mathbf{L}} \mathbf{Z}/\ell^n\mathbf{Z}\to K_n$ is represented by a map of complexes $$\varphi_n^\bullet : K_{n+1}^\bullet \otimes_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} \to K_n^\bullet.$$ In fact, $\varphi_n^\bullet$ is an isomorphism of complexes, thus we see that

• there exist $a, b\in \mathbf{Z}$ independent of $n$ such that $K_n^i = 0$ for all $i\notin[a, b]$, and
• the rank of $K_n^i$ is independent of $n$.

Therefore, the module $K_\infty^i = \mathop{\mathrm{lim}}\nolimits_n \{K_n^i, \varphi_n^i\}$ is a finite free $\mathbf{Z}_\ell$-module and $K_\infty^\bullet$ is a finite complex of finite free $\mathbf{Z}_\ell$-modules. By induction on the number of nonzero terms, one can prove that $H^i\left(K_\infty^\bullet\right) = \mathop{\mathrm{lim}}\nolimits_n H^i\left(K_n^\bullet\right)$ (this is not true for unbounded complexes). We conclude that $H_\infty^i = H^i\left(K_\infty^\bullet\right)$ is a finite $\mathbf{Z}_\ell$-module. This proves ii. To prove the remainder of the lemma, we need to overcome the possible noncommutativity of the diagrams $$\xymatrix{ {K_{n+1}^\bullet} \ar[d]_{\pi_{n+1}^\bullet} \ar[r]^{\varphi_n^\bullet} & {K_n^\bullet} \ar[d]^{\pi_n^\bullet} \\ {K_{n+1}^\bullet} \ar[r]_{\varphi_n^\bullet} & {K_n^\bullet.} }$$ However, this diagram does commute in the derived category, hence it commutes up to homotopy. We inductively replace $\pi_n^\bullet$ for $n\geq 2$ by homotopic maps of complexes making these diagrams commute. Namely, if $h^i : K_{n+1}^i \to K_n^{i-1}$ is a homotopy, i.e., $$\pi_n^\bullet \circ \varphi_n^\bullet - \varphi_n^\bullet \circ \pi_{n + 1}^\bullet = dh + hd,$$ then we choose $\tilde h^i : K_{n+1}^i\to K_{n+1}^{i-1}$ lifting $h^i$. This is possible because $K_{n+1}^i$ free and $K_{n+1}^{i-1}\to K_n^{i-1}$ is surjective. Then replace $\pi_n^\bullet$ by $\tilde\pi_n^\bullet$ defined by $$\tilde\pi_{n+1}^\bullet = \pi_{n+1}^\bullet + d\tilde h+\tilde hd.$$ With this choice of $\{\pi_n^\bullet\}$, the above diagrams commute, and the maps fit together to define an endomorphism $\pi_\infty^\bullet = \mathop{\mathrm{lim}}\nolimits_n\pi_n^\bullet$ of $K_\infty^\bullet$. Then part i is clear: the elements $t_n = \sum(-1)^i \text{Tr}\left(\pi_n^i |_{K_n^i}\right)$ fit into an element $t_\infty$ of $\mathbf{Z}_\ell$. Moreover \begin{align*} t_\infty & = \sum (-1)^i \text{Tr}_{\mathbf{Z}_\ell}(\pi_\infty^i |_{K_\infty^i}) \\ & = \sum (-1)^i \text{Tr}_{\mathbf{Q}_\ell}( \pi_\infty^i |_{K_\infty^i \otimes_{\mathbf{Z}_\ell}\mathbf{Q}_\ell}) \\ & = \sum (-1)^i \text{Tr}( \pi_\infty |_{H^i(K_\infty^\bullet \otimes \mathbf{Q}_\ell)}) \end{align*} where the last equality follows from the fact that $\mathbf{Q}_\ell$ is a field, so the complex $K_\infty^\bullet \otimes \mathbf{Q}_\ell$ is quasi-isomorphic to its cohomology $H^i(K_\infty^\bullet \otimes \mathbf{Q}_\ell)$. The latter is also equal to $H^i(K_\infty^\bullet)\otimes_{\mathbf{Z}}\mathbf{Q}_\ell = H_\infty^i \otimes \mathbf{Q}_\ell$, which finishes the proof of the lemma, and also that of Theorem 53.104.5. $\square$

The code snippet corresponding to this tag is a part of the file etale-cohomology.tex and is located in lines 18117–18412 (see updates for more information).

\section{Cohomological interpretation}
\label{section-L-cohomological}

\noindent
This is how Grothendieck interpreted the $L$-function.

\begin{theorem}[Finite Coefficients]
\label{theorem-A}
Let $X$ be a scheme of finite type over a finite field $k$. Let $\Lambda$ be a
finite ring of order prime to the characteristic of $k$ and $\mathcal{F}$ a
constructible flat $\Lambda$-module on $X_\etale$. Then
$$L(X, \mathcal{F}) = \det(1 - \pi_X^*\ T |_{R\Gamma_c(X_{\bar k}, \mathcal{F})})^{-1} \in \Lambda[[T]].$$
\end{theorem}

\begin{proof}
Omitted.
\end{proof}

\noindent
Thus far, we don't even know whether each cohomology group
$H^i_c(X_{\bar k}, \mathcal{F})$ is free.

\label{theorem-B}
Let $X$ be a scheme of finite type over a finite field $k$, and $\mathcal{F}$ a
$\mathbf{Q}_\ell$-sheaf on $X$. Then
$$L(X, \mathcal{F}) = \prod\nolimits_i \det(1 - \pi_X^*T |_{H_c^i(X_{\bar k} , \mathcal{F})})^{(-1)^{i + 1}} \in \mathbf{Q}_\ell[[T]].$$
\end{theorem}

\begin{proof}
This is sketched below.
\end{proof}

\begin{remark}
\label{remark-which-is-harder}
Since we have only developed some theory of traces and not of determinants,
Theorem \ref{theorem-A}
is harder to prove than
Theorem \ref{theorem-B}.
We will only prove the latter, for the former see \cite{SGA4.5}.
Observe also that there is no version of this theorem more general for
$\mathbf{Z}_\ell$ coefficients since there is no $\ell$-torsion.
\end{remark}

\noindent
We reduce the proof of Theorem \ref{theorem-B} to a trace formula. Since
$\mathbf{Q}_\ell$ has characteristic 0, it suffices to prove the equality after
taking logarithmic derivatives. More precisely, we apply $T\frac{d}{dT} \log$
to both sides. We have on the one hand
\begin{align*}
T \frac{d}{dT} \log L(X, \mathcal{F})
& =
T\frac{d}{dT} \log
\prod_{x \in |X|} \det(1 - \pi_x^* T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1} \\
& =
\sum_{x \in |X|} T \frac{d}{dT} \log
( \det(1 - \pi_x^* T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1}) \\
& =
\sum_{x \in |X|} \deg x
\sum_{n \geq 1} \text{Tr}((\pi_x^n)^* |_{\mathcal{F}_{\bar x}}) T^{n\deg x}
\end{align*}
where the last equality results from the formula
$$T\frac{d}{dT}\log\left(\det\left(1-fT|_M\right)^{-1}\right) = \sum_{n\geq 1} \text{Tr}(f^n|_M)T^n$$
which holds for any commutative ring $\Lambda$ and any endomorphism $f$ of a
finite projective $\Lambda$-module $M$. On the other hand, we have
\begin{align*}
& T\frac{d}{dT} \log\left(
\prod\nolimits_i
\det(1-\pi_X^*T |_{H_c^i\left(X_{\bar k} , \mathcal{F}\right)})^{(-1)^{i+1}}
\right) \\
& =
\sum\nolimits_i (-1)^i \sum\nolimits_{n \geq 1}
\text{Tr}\left((\pi_X^n)^* |_{H_c^i(X_{\bar k},\mathcal{F})}\right) T^n
\end{align*}
by the same formula again. Now, comparing powers of $T$ and using the Mobius
inversion formula, we see that Theorem \ref{theorem-B} is a consequence of the
following equality
$$\sum_{d | n} d \sum_{x \in |X| \atop \deg x = d} \text{Tr}((\pi_X^{n/d})^* |_{\mathcal{F}_{\bar x}}) = \sum_i (-1)^i \text{Tr}((\pi^n_X)^* |_{H^i_c(X_{\bar k}, \mathcal{F})}).$$
Writing $k_n$ for the degree $n$ extension of $k$,
$X_n = X \times_{\Spec k} \Spec(k_n)$ and
$_n\mathcal{F} = \mathcal{F}|_{X_n}$, this boils down
to
$$\sum_{x \in X_n(k_n)} \text{Tr}(\pi_X^* |_{_n\mathcal{F}_{\bar x}}) = \sum_i (-1)^i \text{Tr}((\pi^n_X)^* |_{H^i_c({(X_n)}_{\bar k}, _n\mathcal{F})})$$
which is a consequence of Theorem \ref{theorem-C}.

%11.19.09

\begin{theorem}
\label{theorem-D}
Let $X/k$ be as above, let $\Lambda$ be a finite ring with $\#\Lambda \in k^*$
and $K\in D_{ctf}(X, \Lambda)$. Then $R\Gamma_c(X_{\bar k}, K)\in D_{perf}(\Lambda)$ and
$$\sum_{x\in X(k)}\text{Tr}\left(\pi_x |_{K_{\bar x}}\right) = \text{Tr}\left(\pi_X^* |_{R\Gamma_c(X_{\bar k}, K )}\right).$$
\end{theorem}

\begin{proof}
Note that we have already proved this (REFERENCE) when $\dim X \leq 1$. The
general case follows easily from that case together with the proper base change
theorem.
\end{proof}

\begin{theorem}
\label{theorem-C}
Let $X$ be a separated scheme of finite type over a finite field $k$ and
$\mathcal{F}$ be a $\mathbf{Q}_\ell$-sheaf on $X$. Then
$\dim_{\mathbf{Q}_\ell}H_c^i(X_{\bar k}, \mathcal{F})$ is finite for all $i$,
and is nonzero for $0\leq i \leq 2 \dim X$ only. Furthermore, we have
$$\sum_{x\in X(k)} \text{Tr}\left(\pi_x |_{\mathcal{F}_{\bar x}}\right) = \sum_i (-1)^i\text{Tr}\left(\pi_X^* |_{H_c^i(X_{\bar k}, \mathcal{F})}\right).$$
\end{theorem}

\begin{proof}
We explain how to deduce this from Theorem \ref{theorem-D}.
We first use some \'etale cohomology arguments to reduce the proof
to an algebraic statement which we subsequently prove.

\medskip\noindent
Let $\mathcal{F}$ be as in the theorem. We can write
$\mathcal{F}$ as
$\mathcal{F}'\otimes \mathbf{Q}_\ell$ where $\mathcal{F}' = \left\{\mathcal{F}'_n\right\}$ is a $\mathbf{Z}_\ell$-sheaf without torsion,
i.e., $\ell : \mathcal{F}'\to \mathcal{F}'$ has trivial kernel in the
category of $\mathbf{Z}_\ell$-sheaves. Then each $\mathcal{F}_n'$ is a flat
constructible $\mathbf{Z}/\ell^n\mathbf{Z}$-module on $X_\etale$, so
$\mathcal{F}'_n \in D_{ctf}(X, \mathbf{Z}/\ell^n\mathbf{Z})$ and
$\mathcal{F}_{n+1}' \otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} = \mathcal{F}_n'$.
Note that the last equality holds also
for standard (non-derived) tensor product, since $\mathcal{F}'_n$ is flat
(it is the same equality). Therefore,
\begin{enumerate}
\item
the complex $K_n = R\Gamma_c\left(X_{\bar k}, \mathcal{F}_n'\right)$ is perfect,
and it is endowed with an endomorphism $\pi_n : K_n\to K_n$ in
$D(\mathbf{Z}/\ell^n\mathbf{Z})$,
\item
there are identifications
$$K_{n+1} \otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} = K_n$$
in $D_{perf}(\mathbf{Z}/\ell^n\mathbf{Z})$, compatible with the endomorphisms
$\pi_{n+1}$ and $\pi_n$ (see \cite[Rapport 4.12]{SGA4.5}),
\item
the equality $\text{Tr}\left(\pi_X^* |_{K_n}\right) = \sum_{x\in X(k)} \text{Tr}\left(\pi_x |_{(\mathcal{F}'_n)_{\bar x}}\right)$
holds, and
\item
for each $x\in X(k)$, the elements
$\text{Tr}(\pi_x |_{\mathcal{F}'_{n, \bar x}}) \in \mathbf{Z}/\ell^n\mathbf{Z}$
form an element of
$\mathbf{Z}_\ell$ which is equal to
$\text{Tr}(\pi_x |_{\mathcal{F}_{\bar x}}) \in \mathbf{Q}_\ell$.
\end{enumerate}
It thus suffices to prove the following algebra lemma.
\end{proof}

\begin{lemma}
\label{lemma-piece-together}
Suppose we have
$K_n\in D_{perf}(\mathbf{Z}/\ell^n\mathbf{Z})$, $\pi_n : K_n\to K_n$
and isomorphisms
$\varphi_n : K_{n+1} \otimes^\mathbf{L}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} \to K_n$
compatible with $\pi_{n+1}$ and $\pi_n$. Then
\begin{enumerate}
\item
the elements $t_n = \text{Tr}(\pi_n |_{K_n})\in \mathbf{Z}/\ell^n\mathbf{Z}$
form an element $t_\infty = \{t_n\}$ of $\mathbf{Z}_\ell$,
\item
the $\mathbf{Z}_\ell$-module $H_\infty^i = \lim_n H^i(k_n)$ is finite and
is nonzero for finitely many $i$ only, and
\item
the operators $H^i(\pi_n): H^i(K_n)\to H^i(K_n)$ are compatible and define
$\pi_\infty^i : H_\infty^i\to H_\infty^i$ satisfying
$$\sum (-1)^i \text{Tr}( \pi_\infty^i |_{H_\infty^i \otimes_{\mathbf{Z}_\ell}\mathbf{Q}_\ell}) = t_\infty.$$
\end{enumerate}
\end{lemma}

\begin{proof}
Since $\mathbf{Z}/\ell^n\mathbf{Z}$ is a local ring and $K_n$ is perfect, each
$K_n$ can be represented by a finite complex $K_n^\bullet$ of finite free
$\mathbf{Z}/\ell^n \mathbf{Z}$-modules such that the map $K_n^p \to K_n^{p+1}$
has image contained in $\ell K_n^{p+1}$. It is a fact that such a complex is
unique up to isomorphism. Moreover $\pi_n$ can be represented by a morphism of
complexes $\pi_n^\bullet : K_n^\bullet\to K_n^\bullet$ (which is unique up to
homotopy). By the same token the isomorphism
$\varphi_n : K_{n+1} \otimes_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}^{\mathbf{L}} \mathbf{Z}/\ell^n\mathbf{Z}\to K_n$ is represented by a map of complexes
$$\varphi_n^\bullet : K_{n+1}^\bullet \otimes_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} \to K_n^\bullet.$$
In fact, $\varphi_n^\bullet$ is an isomorphism of complexes, thus we see that
\begin{itemize}
\item
there exist $a, b\in \mathbf{Z}$ independent of $n$ such that $K_n^i = 0$ for
all $i\notin[a, b]$, and
\item
the rank of $K_n^i$ is independent of $n$.
\end{itemize}
Therefore, the module $K_\infty^i = \lim_n \{K_n^i, \varphi_n^i\}$ is a
finite free $\mathbf{Z}_\ell$-module and $K_\infty^\bullet$ is a finite complex
of finite free $\mathbf{Z}_\ell$-modules. By induction on the number of nonzero
terms, one can prove that $H^i\left(K_\infty^\bullet\right) = \lim_n H^i\left(K_n^\bullet\right)$ (this is not true for unbounded complexes). We
conclude that $H_\infty^i = H^i\left(K_\infty^\bullet\right)$ is a finite
$\mathbf{Z}_\ell$-module. This proves {\it ii}. To prove the remainder of the
lemma, we need to overcome the possible noncommutativity of the diagrams
$$\xymatrix{ {K_{n+1}^\bullet} \ar[d]_{\pi_{n+1}^\bullet} \ar[r]^{\varphi_n^\bullet} & {K_n^\bullet} \ar[d]^{\pi_n^\bullet} \\ {K_{n+1}^\bullet} \ar[r]_{\varphi_n^\bullet} & {K_n^\bullet.} }$$
However, this diagram does commute in the derived category, hence it commutes
up to homotopy. We inductively replace $\pi_n^\bullet$ for $n\geq 2$ by
homotopic maps of complexes making these diagrams commute. Namely, if $h^i : K_{n+1}^i \to K_n^{i-1}$ is a homotopy, i.e.,
$$\pi_n^\bullet \circ \varphi_n^\bullet - \varphi_n^\bullet \circ \pi_{n + 1}^\bullet = dh + hd,$$
then we choose $\tilde h^i : K_{n+1}^i\to K_{n+1}^{i-1}$ lifting $h^i$. This is
possible because $K_{n+1}^i$ free and $K_{n+1}^{i-1}\to K_n^{i-1}$ is
surjective. Then replace $\pi_n^\bullet$ by $\tilde\pi_n^\bullet$ defined by
$$\tilde\pi_{n+1}^\bullet = \pi_{n+1}^\bullet + d\tilde h+\tilde hd.$$
With this choice of $\{\pi_n^\bullet\}$, the above diagrams commute, and the
maps fit together to define an endomorphism $\pi_\infty^\bullet = \lim_n\pi_n^\bullet$ of $K_\infty^\bullet$. Then part {\it i} is clear:
the elements $t_n = \sum(-1)^i \text{Tr}\left(\pi_n^i |_{K_n^i}\right)$
fit into an element $t_\infty$ of $\mathbf{Z}_\ell$. Moreover
\begin{align*}
t_\infty
& =
\sum (-1)^i \text{Tr}_{\mathbf{Z}_\ell}(\pi_\infty^i |_{K_\infty^i}) \\
& =
\sum (-1)^i \text{Tr}_{\mathbf{Q}_\ell}(
\pi_\infty^i |_{K_\infty^i \otimes_{\mathbf{Z}_\ell}\mathbf{Q}_\ell}) \\
& =
\sum (-1)^i \text{Tr}(
\pi_\infty |_{H^i(K_\infty^\bullet \otimes \mathbf{Q}_\ell)})
\end{align*}
where the last equality follows from the fact that $\mathbf{Q}_\ell$ is a
field, so the complex $K_\infty^\bullet \otimes \mathbf{Q}_\ell$ is
quasi-isomorphic to its cohomology
$H^i(K_\infty^\bullet \otimes \mathbf{Q}_\ell)$. The latter is also equal to
$H^i(K_\infty^\bullet)\otimes_{\mathbf{Z}}\mathbf{Q}_\ell = H_\infty^i \otimes \mathbf{Q}_\ell$, which finishes the proof of the lemma, and also that of
Theorem \ref{theorem-C}.
\end{proof}

Comment #2441 by sdf on March 1, 2017 a 1:14 pm UTC

The reference has not been filled in in Definition 50.97.4 but I am not sure what it should point to. The reference in (2) of the numbered list in the proof of Theorem 50.98.5 is broken.

Comment #2484 by Johan (site) on April 13, 2017 a 10:36 pm UTC

OK, I am very sorry, but this has to be fixed by very carefully rewriting all the material leading up to this section. I do think it still gives you an idea of the steps one has to do to prove the thing...

## Add a comment on tag 03UY

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the lower-right corner).


text:
Create the Leontief inverse from the technology coefficient matrix.

## Usage

leontief_inverse_create(technology_coefficients_matrix, digits = NULL)

leontieff_inverse_create(technology_coefficients_matrix, digits = NULL)

## Arguments

technology_coefficients_matrix

A technology coefficient matrix created by the input_coefficient_matrix_create.

digits

An integer showing the precision of the technology matrix in digits. Default is NULL when no rounding is applied.

## Details

The Leontief-inverse is $$L = (I-A)^-1$$ where B is the input coefficient matrix created by input_coefficient_matrix_create. For the similar inverse created from output coefficients, see the ghosh_inverse_create function.

Other analytic object functions: ghosh_inverse_create(), input_flow_get(), leontief_matrix_create()
tm <- input_flow_get (


text:
On $C(K)$ spaces embeddable into the Banach space $c_0$

Problem 1. Characterize compact Hausdorff spaces $$K$$ for which the Banach space $$C(K)$$ of continuous real-valued functions embeds into the Banach space $$c_0$$.

Since $$c_0$$ has separable dual, such $$K$$ must me countable. So, we can make Problem 1 more precise:

Problem 2. Is it true that for every compact countable space $$K$$ the Banach space $$C(K)$$ is isomorphic to a subspace of $$c_0$$?

Another possible option:

Problem 3. Let $$K$$ be a compact Hausdorff space. Is it true that the Banach space $$C(K)$$ is isomorphic to $$c_0$$ if $$C(K)$$ is isomorphic to a subspace of $$c_0$$?

• Problem 3: $K$ finite makes trivial counterexamples. Surprisingly (?) the answer is yes for $K$ infinite according to Tomek Kania's answer. – YCor Jun 3 '19 at 6:32

1 Answer

The Szlenk index is the answer.

A space $$C(K)$$, where $$K$$ is infinite compact Hausdorff space, is embeddable into $$c_0$$ if and only if $$K$$ is homeomorphic to an ordinal below $$\omega^\omega$$ and if this is the case (and $$K$$ is infinite) the space itself is isomorphic to $$c_0$$.

So the answer to problem 2 is no however the answer to problem 3 is yes.

For details see Rosenthal's chapter in the Handbook of Banach spaces.

• Thank you very much for the answer. This is exactly what I need! – Taras Banakh Jun 3 '19 at 5:27
• Rosenthal, Haskell P. The Banach spaces C(K). Handbook of the geometry of Banach spaces, Vol. 2, 1547-1602, North-Holland, Amsterdam, 2003. – YCor Jun 3 '19 at 6:23


text:
# Evaluating $\lim_{x\to0}\left(\frac{\sin x}x\right)^\frac{1}{1-\cos x}$

I was trying to evaluate $$\lim_{x\to0}\left(\frac{\sin x}x\right)^\frac{1}{1-\cos x}$$

I have tried taking natural logarithm first:

$$\lim_{x\to0}\frac{\ln(\sin x)-\ln x}{1-\cos x}=\lim_{x\to0}\frac{\frac{\cos x}{\sin x}-\frac{1}x}{\sin x}\quad\quad\text{(L'Hopital Rule)}\\ =\lim_{x\to0}\frac{\cos x}{x\sin x}-\frac{1}{x^2}\quad\quad(\lim_{x\to0}\frac{\sin x}x=1)\\ =\lim_{x\to0}\frac{\cos x-1}{x^2}\quad\quad\quad(\lim_{x\to0}\frac{\sin x}x=1)$$

and after this I eventually have the limit equaling $$-\frac{1}2$$, which means that the original limit should be $$\frac{1}{\sqrt{e}}$$.

However, I graphed $$f(x)=\left(\frac{\sin x}x\right)^\frac{1}{1-\cos x}$$ on Desmos, and it turned out that the limit is approximately $$0.7165313$$, or $$\frac{1}{\sqrt[3]{e}}$$.

Therefore I think there's something wrong in my approach, but I couldn't find it. Any suggestions?

• I buy your usage of LHR and the equation immediately after it, but jumping to $\lim_{x\to 0}\frac{\cos(x)-1}{x^2}$ is incorrect – Integrand Oct 19 '20 at 2:06
• @ Intergrand I see. So I can't apply $\lim_{x\to0}\frac{\sin x}x=1$ in that way? Any suggestions on what I should do instead? – Student1058 Oct 19 '20 at 2:08
• Get a common denominator and use LHR twice more; it works nice and good – Integrand Oct 19 '20 at 2:10
• Got it. Thank you! – Student1058 Oct 19 '20 at 2:17

Using the first terms of the Taylor series: $$\lim_{x\to 0}\left(\frac{\sin(x)}{x}\right)^{1/(1-\cos(x))}=\lim_{x\to 0}\left(1-\frac{x^2}{6}\right)^{1/(x^2/2)}$$Substitute $$z=2/x^2$$: $$=\lim_{z\to\infty} \left(1+\frac{-1/3}{z}\right)^{z}$$This is $$e^{-1/3}$$ by the limit definition of $$e^z$$, as shown here.

$$\lim_{x\to0}\frac{\frac{\cos x}{\sin x}-\frac{1}x}{\sin x}=\lim_{x\to0}\frac{(x-\frac{x^3}{2!}+\frac{x^5}{4!}+\cdots)-(x-\frac{x^3}{3!}+\frac{x^5}{5!}+\cdots)}{x^3}=\frac{1}{6}-\frac{1}{2}=-\frac{1}{3}$$

Let me try an approach without Taylor series, starting with your step

$$\lim_{x \to 0} \frac{\frac{\cos x}{\sin x}-\frac{1}{x}}{\sin x}=\lim_{x \to 0}\frac{x\cos x - \sin x}{x \sin^2 x}$$

We continue from here: \begin{align} \lim_{x \to 0}\frac{x\cos x - \sin x}{x \sin^2 x} &\overset{\mathrm{H}}{=} \lim_{x \to 0} \ \frac{-x \sin x}{\sin^2x + 2x\sin x \cos x} \\ &= \lim_{x \to 0} \ \frac{-x}{\sin x + 2x \cos x} \overset{\mathrm{H}}{=} \lim_{x \to 0} \ \frac{-1}{3\cos x-2\sin x}=\frac{-1}{3} \end{align}

and the result follows from there.

Starting from this line of your answer: $$\ln L=\lim_{x\to0}\frac{\ln(\sin x /x)}{1-\cos x}$$ Apply l'Hospital's rule: $$\ln L=\lim_{x\to0}\frac{x(x\cos x -\sin x)}{x^2\sin^ 2x}=\lim_{x\to0}\frac{x^2(x\cos x -\sin x)}{x^3\sin^ 2x}$$ Now we have: $$\lim_{x\to0}\frac{(x\cos x -\sin x)}{x^3}$$ $$=\lim_{x\to0}\frac{-\sin x}{3x}=-\dfrac 13$$ Finally: $$\ln L=1 \times -\dfrac 13 \implies L=\dfrac 1 {\sqrt[3]e}$$


text:
## Taiwanese Journal of Mathematics

### Quasi-periodic Waves and Solitary Waves to a Generalized KdV-Caudrey-Dodd-Gibbon Equation from Fluid Dynamics

#### Abstract

In this paper, a generalized KdV-Caudrey-Dodd-Gibbon (KdV-CDG) equation is investigated, which describes certain situations in the fluid mechanics, ocean dynamics and plasma physics. By using Bell polynomials, a lucid and systematic approach is proposed to systematically study its Hirota's bilinear form and $N$-soliton solution, respectively. Furthermore, based on the Riemann theta function, the one-quasi- and two-quasi-periodic wave solutions are also constructed. Finally, an asymptotic relation of the quasi-periodic wave solutions are strictly analyzed to reveal the relations between quasi-periodic wave solutions and soliton solutions.

#### Article information

Source
Taiwanese J. Math., Volume 20, Number 4 (2016), 823-848.

Dates
First available in Project Euclid: 1 July 2017

Permanent link to this document
https://projecteuclid.org/euclid.twjm/1498874493

Digital Object Identifier
doi:10.11650/tjm.20.2016.6850

Mathematical Reviews number (MathSciNet)
MR3535676

Zentralblatt MATH identifier
1357.35256

#### Citation

Tu, Jian-Min; Tian, Shou-Fu; Xu, Mei-Juan; Zhang, Tian-Tian. Quasi-periodic Waves and Solitary Waves to a Generalized KdV-Caudrey-Dodd-Gibbon Equation from Fluid Dynamics. Taiwanese J. Math. 20 (2016), no. 4, 823--848. doi:10.11650/tjm.20.2016.6850. https://projecteuclid.org/euclid.twjm/1498874493

#### References

• M. J. Ablowitz and P. A. Clarkson, Solitons, Nonlinear Evolution Equations and Inverse Scattering, London Mathematical Society Lecture Notes Series 149, Cambridge University Press, Cambridge, 1991.
• E. T. Bell, Exponential polynomials, Ann. of Math. (2) 35 (1934), no. 2, 258–277.
• E. Belokolos, A. Bobenko, V. Enol'skij, A. Its and V. Matveev, Algebro-Geometrical Approach to Nonlinear Integrable Equations, Springer 1994.
• G. W. Bluman and S. Kumei, Symmetries and Differential Equations, Applied Mathematical Sciences 81, Springer-Verlag, New York, 1989.
• K. W. Chow, A class of exact, periodic solutions of nonlinear envelope equations, J. Math. Phys. 36 (1995), no. 8, 4125–4137.
• E. Fan, Quasi-periodic waves and an asymptotic property for the asymmetrical Nizhnik-Novikov-Veselov equation, J. Phys. A 42 (2009), no. 9, 095206, 11 pp.
• E. Fan and Y. C. Hon, Quasiperiodic waves and asymptotic behavior for Bogoyavlenskii's breaking soliton equation in $(2+1)$-dimensions, Phys. Rev. E (3) 78 (2008), no. 3, 036607, 13 pp.
• H. M. Farkas and I. Kra, Riemann Surfaces, Second edition, Graduate Texts in Mathematics 71, Springer-Verlag, New York, 1992.
• C. Gilson, F. Lambert, J. Nimmo and R. Willox, On the combinatorics of the Hirota $D$-operators, Proc. Roy. Soc. London Ser. A 452 (1996), no. 1945, 223–234.
• R. Hirota, The Direct Method in Soliton Theory, Cambridge Tracts in Mathematics 155, Cambridge University Press, Cambridge, 2004.
• X.-B. Hu, C.-X. Li, J. J. C. Nimmo and G.-F. Yu, An integrable symmetric $(2+1)$-dimensional Lotka-Volterra equation and a family of its solutions, J. Phys. A 38 (2005), no. 1, 195–204.
• F. Lambert, I. Loris and J. Springael, Classical Darboux transformations and the KP hierarchy, Inverse Problems 17 (2001), no. 4, 1067–1074.
• T.-C. Lin and J. Wei, Symbiotic bright solitary wave solutions of coupled nonlinear Schrödinger equations, Nonlinearity 19 (2006), no. 12, 2755–2773.
• ––––, Solitary and self-similar solutions of two-component system of nonlinear Schrödinger equations, Phys. D 220 (2006), no. 2, 99–115.
• T.-C. Lin and P. Zhang, Incompressible and compressible limits of coupled systems of nonlinear Schrödinger equations, Comm. Math. Phys. 266 (2006), no. 2, 547–569.
• C. Liu and Z. Dai, Exact soliton solutions for the fifth-order Sawada-Kotera equation, Appl. Math. Comput. 206 (2008), no. 1, 272–275.
• S.-Y. Lou, Extended painlevé expansion, nonstandard truncation and special reductions of nonlinear evolution equations, Z. Naturforsch. A 53 (1998), no. 5, 251–258.
• W.-X. Ma, Bilinear equations and resonant solutions characterized by Bell polynomials, Rep. Math. Phys. 72 (2013), no. 1, 41–56.
• W.-X. Ma and Y. You, Solving the Korteweg-de Vries equation by its bilinear form: Wronskian solutions, Trans. Amer. Math. Soc. 357 (2005), no. 5, 1753–1778.
• W.-X. Ma, R. Zhou and L. Gao, Exact one-periodic and two-periodic wave solutions to Hirota bilinear equations in $(2+1)$ dimensions, Modern Phys. Lett. A 24 (2009), no. 21, 1677–1688.
• V. B. Matveev and M. A. Salle, Darboux Transformation and Solitons, Springer Seriers in Nonlinear Dynamics, Springer-Verlag, Berlin, 1991.
• Q. Miao, Y. Wang, Y. Chen and Y. Yang, PDEBellII: A Maple package for finding bilinear forms, bilinear Bäcklund transformations, Lax pairs and conservation laws of the KdV-type equations, Comput. Phys. Commun. 185 (2014), no. 1, 357–367.
• D. Mumford, Tata Lectures on Theta II: Jacobian theta functions and differential equations, Progress in Mathematics 43, Birkhäuser, Boston, Boston, MA, 1984.
• A. Nakamura, A direct method of calculating periodic wave solutions to nonlinear evolution equations II: Exact one- and two-periodic wave solution of the coupled bilinear equations, J. Phys. Soc. Japan 48 (1980), no. 4, 1365–1370.
• Ameina S. Nuseir, New exact solutions to the modified Fornberg-Whitham equation, Taiwanese J. Math. 16 (2012), no. 6, 2083–2091.
• C. Rogers and S. Carillo, On reciprocal properties of the Caudrey-Dodd-Gibbon and Kaup-Kupershmidt hierarchies, Phys. Scripta 36 (1987), no. 6, 865–869.
• K. Sawada and T. Kotera, A method for finding $N$-soliton solutions of the K.d.V. equation and K.d.V.-like equation, Progr. Theoret. Phys. 51 (1974), no. 5, 1355–1367.
• S.-F. Tian and H.-Q. Zhang, Riemann theta functions periodic wave solutions and rational characteristics for the nonlinear equations, J. Math. Anal. Appl. 371 (2010), no. 2, 585–608.
• S. F. Tian and H. Q. Zhang, A kind of explicit Riemann theta functions periodic waves solutions for discrete soliton equations, Commun. Nonlinear Sci. Numer. Simulat. 16 (2011), 173–186.
• ––––, On the integrability of a generalized variable-coefficient Kadomtsev-Petviashvili equation, J. Phys. A 45 (2012), no. 5, 055203, 29 pp.
• ––––, Riemann theta functions periodic wave solutions and rational characteristics for the $(1+1)$-dimensional and $(2+1)$-dimensional Ito equation, Chaos Solitons Fractals 47 (2013), 27–41.
• ––––, On the integrability of a generalized variable-coefficient forced Korteweg-de Vries equation in fluids, Stud. Appl. Math. 132 (2014), no. 3, 212–246.
• S. Tian, Y. Zhang, B. Feng and H. Zhang, On the Lie algebras, generalized symmetries and Darboux transformations of the fifth-order evolution equations in shallow water, Chin. Ann. Math. Ser. B 36 (2015), no. 4, 543–560.
• S.-F. Tian, T.-T. Zhang, P.-L. Ma and X.-Y. Zhang, Lie symmetries and nonlocally related systems of the continuous and discrete dispersive long waves system by geometric approach, J. Nonlinear Math. Phys. 22 (2015), no. 2, 180–193.
• M. Wadati, H. Sanuki and K. Konno, Relationships among inverse method, Bäcklund transformation and an infinite number of conservation laws, Progr. Theoret. Phys. 53 (1975), no. 2, 419–436.
• Y.-H. Wang and Y. Chen, Binary Bell polynomials, bilinear approach to exact periodic wave solutions of $(2+1)$-dimensional nonlinear evolution equations, Commun. Theor. Phys. (Beijing) 56 (2011), no. 4, 672–678.
• A. M. Wazwaz, Multiple soliton solutions for the $(2+1)$-dimensional Sawada-Kotera and Caudrey-Dodd-Gibbon (CDG) equations, Math. Methods Appl. Sci. 34 (2011), no. 13, 1580–1586.
• J. Weiss, M. Tabor and G. Carnevale, The Painlevé property for partial differential equations, J. Math. Phys. 24 (1983), no. 3, 522–526.
• D.-J. Zhang, J. Ji and S.-L. Zhao, Soliton scattering with amplitude changes of a negative order AKNS equation, Phys. D 238 (2009), no. 23-24, 2361–2367.


text:
• 13
• 27
• 9
• 9
• 20

# Torque 3d! is it worth the time and money for an MMO?

This topic is 2025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
This is one area where Hero Engine just makes so much sense.

Not saying that two developers can pull off an MMO, but in terms of normalizing costs for an MMO.

It used to be you had to buy massive amounts of physical hardware and bandwidth to run an MMO, you had to purchase for you peak, and frankly, that would generally be launch, when you can least afford it. Virtualization ( like Amazon EC2 or Google App Engine ), changed the game quite a bit and changed things to a more pay as you go structure ( although at certain points *actually* owning the hardware is cheaper ), that is very friendly to new developers.

Now Hero Engine brings hosting into the equation... they provide an engine, hosting services, billing, etc... and take a fixed cut. It's kinda hard to argue with that as a green behind the ears startup. Hero Engine starts from 99$a year and goes up to 75K + 7% royalty for a source license. If I was aiming to make an MMO and I only had two guys and 100$, I think I would go Hero Engine in a heart beat over Torque. If you've never heard of it, Hero Engine is the engine that powers Star Wars: The Old Republic. Edited by Serapth

##### Share on other sites
You make no mention of if you've developed games before or not which leads me to think you haven't. In which case your doing things wrong. MMO's are some of the hardest games to make and ARE NOT for newbies. There is a reason for people saying that you should learn how to program before even thinking about making games and even then starting in 2d games rather than 3d (and this is all way before thinking about multiplayer let alone massively multiplayer).

I don't think torque has the sufficient networking libraries included for making an mmo, of course you can use some of your own in it (sourced elsewhere) but then thats more cost ontop of the servers etc that you'll need. Edited by 6677

##### Share on other sites
just for an addition i have not made any real games before for i dont really program which my pal is going to be doing. but ive done visualizations and such using mainly udk and i recently worked in unity 3d for a few months going at android dev which i quit because of the piracy rates soaring more than ever....and the intentions arent to have a full scale massive guild wars 2 mmo hah sweet game but no were just simply trying to accomplish something of this area he enjoys managing the server and logic side of things and me the art so were trying to combine those two and see what we can produce its been one day and i made a decent transition the engine is pretty good soo far so it seams like my new dev environment and but another thing guys, lets say i were to recruit people how many do you think i need to pull off a mid sized mmo in lets say a school environment ?

##### Share on other sites

just for an addition i have not made any real games before for i dont really program which my pal is going to be doing. but ive done visualizations and such using mainly udk and i recently worked in unity 3d for a few months going at android dev which i quit because of the piracy rates soaring more than ever....and the intentions arent to have a full scale massive guild wars 2 mmo hah sweet game but no were just simply trying to accomplish something of this area he enjoys managing the server and logic side of things and me the art so were trying to combine those two and see what we can produce its been one day and i made a decent transition the engine is pretty good soo far so it seams like my new dev environment and but another thing guys, lets say i were to recruit people how many do you think i need to pull off a mid sized mmo in lets say a school environment ?

Hmm, mid sized MMO is what ? 2000 concurrent users per world ? I wouldn't count guildwars as an MMO since its so heavily instanced that it plays more like a normal multiplayer game (Not sure about GW2 since i havn't played it but i'm guessing it is similar to the first one)

As for the number of people you need. it really depends on alot of things, if you use Hero Engine its not that extremely difficult from a technical point of view, the challenge then really is to make enough content to fill a world that is large enough to hold 2000 users without things getting crowded and to create interesting gameplay that works with the constraints you get by sticking a massive number of players in a single world, 2 people might be enough, 30 people might not be enough, it all depends on how much content you need and the complexity of the gameplay itself. Edited by SimonForsman

##### Share on other sites
hah thx aside from my own 2 maned project id like to introduce the game engine into my school i already have all the engineering classes doing stuff in 3ds max but now i think its time that i leave an engine not too sure if id like to leave torque with absolute beginners soo i gess ill have to find a workaround the thing is id love to use hero engine but i cant find a trail or test anywhere and im not about to buy a package if i cant even test it ofcourse if anyone knows where i could get a download by all means please link me hero seems like the perfect engine but i need to be in it myself to see if i like it and ill probally even bring it into my highschool im leaving in januarary soo thats enough time for them to get a good base im going to set things up with the teacher to have around 40 juniors and seniors or soo to do it hopefully we can even find that number but as of now for this post can you guys tell me how i can obtain a copy of hero as in trail before buy.

##### Share on other sites
can you guys tell me how i can obtain a copy of hero as in trail before buy.[/quote]

you cant.

##### Share on other sites
so im curious why should i just wop out 300 for an engine i cant test "hero engine" im not sure if ill get anywhere with it so yea what am i suppose to do i guess ill go with torque

##### Share on other sites
chris3d165,

Just a word of advise. If you want to be taken seriously, even on a Game Dev forum, please, you'll get much better response if use proper sentence structure with punctuation and capital letters, as well as breaking the structure into paragraphs.

As for 2 beginners making an MMO, I'm going to tell you to not expect anything for many years. Making an MMO (even a "mid-size" one) is VERY HARD. For game programmers with a decade of experience, it's a difficult task. For beginners, there's much to be learned before tackling MMO's. Good luck going forward, whatever happens.