text:
There are two parsers into a sys-time, sys_time_parse() and sys_time_parse_RFC_3339().

### sys_time_parse()

sys_time_parse() is useful when you have date-time strings like "2020-01-01T01:04:30" that you know should be interpreted as UTC, or like "2020-01-01T01:04:30-04:00" with a UTC offset but no zone name. If you find yourself in the latter situation, then parsing this string as a sys-time using the %Ez command to capture the offset is probably your best option. If you know that this string should be interpreted in a specific time zone, parse as a sys-time to get the UTC equivalent, then use as_zoned_time().

The default options assume that x should be parsed at second precision, using a format string of "%Y-%m-%dT%H:%M:%S". This matches the default result from calling format() on a sys-time.

sys_time_parse() is nearly equivalent to naive_time_parse(), except for the fact that the %z command is actually used. Using %z assumes that the rest of the date-time string should be interpreted as a naive-time, which is then shifted by the UTC offset found in %z. The returned time can then be validly interpreted as UTC.

sys_time_parse() ignores the %Z command.

### sys_time_parse_RFC_3339()

sys_time_parse_RFC_3339() is a wrapper around sys_time_parse() that is intended to parse the extremely common date-time format outlined by RFC 3339. This document outlines a profile of the ISO 8601 format that is even more restrictive.

In particular, this function is intended to parse the following three formats:

2019-01-01T00:00:00Z
2019-01-01T00:00:00+0430
2019-01-01T00:00:00+04:30

This function defaults to parsing the first of these formats by using a format string of "%Y-%m-%dT%H:%M:%SZ".

If your date-time strings use offsets from UTC rather than "Z", then set offset to one of the following:

• "%z" if the offset is of the form "+0430".

• "%Ez" if the offset is of the form "+04:30".

The RFC 3339 standard allows for replacing the "T" with a "t" or a space (" "). Set separator to adjust this as needed.

For this function, the precision must be at least "second".

## Usage

sys_time_parse(
x,
...,
format = NULL,
precision = "second",
locale = clock_locale()
)

sys_time_parse_RFC_3339(
x,
...,
separator = "T",
offset = "Z",
precision = "second"
)

## Arguments

x

[character]

A character vector to parse.

...

These dots are for future extensions and must be empty.

format

[character / NULL]

A format string. A combination of the following commands, or NULL, in which case a default format string is used.

A vector of multiple format strings can be supplied. They will be tried in the order they are provided.

Year

• %C: The century as a decimal number. The modified command %NC where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %y: The last two decimal digits of the year. If the century is not otherwise specified (e.g. with %C), values in the range [69 - 99] are presumed to refer to the years [1969 - 1999], and values in the range [00 - 68] are presumed to refer to the years [2000 - 2068]. The modified command %Ny, where N is a positive decimal integer, specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %Y: The year as a decimal number. The modified command %NY where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 4. Leading zeroes are permitted but not required.

Month

• %b, %B, %h: The locale's full or abbreviated case-insensitive month name.

• %m: The month as a decimal number. January is 1. The modified command %Nm where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

Day

• %d, %e: The day of the month as a decimal number. The modified command %Nd where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

Day of the week

• %a, %A: The locale's full or abbreviated case-insensitive weekday name.

• %w: The weekday as a decimal number (0-6), where Sunday is 0. The modified command %Nw where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 1. Leading zeroes are permitted but not required.

ISO 8601 week-based year

• %g: The last two decimal digits of the ISO week-based year. The modified command %Ng where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %G: The ISO week-based year as a decimal number. The modified command %NG where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 4. Leading zeroes are permitted but not required.

• %V: The ISO week-based week number as a decimal number. The modified command %NV where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %u: The ISO weekday as a decimal number (1-7), where Monday is 1. The modified command %Nu where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 1. Leading zeroes are permitted but not required.

Week of the year

• %U: The week number of the year as a decimal number. The first Sunday of the year is the first day of week 01. Days of the same year prior to that are in week 00. The modified command %NU where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %W: The week number of the year as a decimal number. The first Monday of the year is the first day of week 01. Days of the same year prior to that are in week 00. The modified command %NW where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

Day of the year

• %j: The day of the year as a decimal number. January 1 is 1. The modified command %Nj where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 3. Leading zeroes are permitted but not required.

Date

• %D, %x: Equivalent to %m/%d/%y.

• %F: Equivalent to %Y-%m-%d. If modified with a width (like %NF), the width is applied to only %Y.

Time of day

• %H: The hour (24-hour clock) as a decimal number. The modified command %NH where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %I: The hour (12-hour clock) as a decimal number. The modified command %NI where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %M: The minutes as a decimal number. The modified command %NM where N is a positive decimal integer specifies the maximum number of characters to read. If not specified, the default is 2. Leading zeroes are permitted but not required.

• %S: The seconds as a decimal number. Leading zeroes are permitted but not required. If encountered, the locale determines the decimal point character. Generally, the maximum number of characters to read is determined by the precision that you are parsing at. For example, a precision of "second" would read a maximum of 2 characters, while a precision of "millisecond" would read a maximum of 6 (2 for the values before the decimal point, 1 for the decimal point, and 3 for the values after it). The modified command %NS, where N is a positive decimal integer, can be used to exactly specify the maximum number of characters to read. This is only useful if you happen to have seconds with more than 1 leading zero.

• %p: The locale's equivalent of the AM/PM designations associated with a 12-hour clock. The command %I must precede %p in the format string.

• %R: Equivalent to %H:%M.

• %T, %X: Equivalent to %H:%M:%S.

• %r: Equivalent to %I:%M:%S %p.

Time zone

• %z: The offset from UTC in the format [+|-]hh[mm]. For example -0430 refers to 4 hours 30 minutes behind UTC. And 04 refers to 4 hours ahead of UTC. The modified command %Ez parses a : between the hours and minutes and leading zeroes on the hour field are optional: [+|-]h[h][:mm]. For example -04:30 refers to 4 hours 30 minutes behind UTC. And 4 refers to 4 hours ahead of UTC.

• %Z: The full time zone name or the time zone abbreviation, depending on the function being used. A single word is parsed. This word can only contain characters that are alphanumeric, or one of '_', '/', '-' or '+'.

Miscellaneous

• %c: A date and time representation. Equivalent to %a %b %d %H:%M:%S %Y.

• %%: A % character.

• %n: Matches one white space character. %n, %t, and a space can be combined to match a wide range of white-space patterns. For example "%n " matches one or more white space characters, and "%n%t%t" matches one to three white space characters.

• %t: Matches zero or one white space characters.

precision

[character(1)]

A precision for the resulting time point. One of:

• "day"

• "hour"

• "minute"

• "second"

• "millisecond"

• "microsecond"

• "nanosecond"

Setting the precision determines how much information %S attempts to parse.

locale

[clock_locale]

A locale object created from clock_locale().

separator

[character(1)]

The separator between the date and time components of the string. One of:

• "T"

• "t"

• " "

offset

[character(1)]

The format of the offset from UTC contained in the string. One of:

• "Z"

• "z"

• "%z" to parse a numeric offset of the form "+0430"

• "%Ez" to parse a numeric offset of the form "+04:30"

A sys-time.

## Details

If your date-time strings contain a full time zone name and a UTC offset, use zoned_time_parse_complete(). If they contain a time zone abbreviation, use zoned_time_parse_abbrev().

If your date-time strings don't contain an offset from UTC and you aren't sure if they should be treated as UTC or not, you might consider using naive_time_parse(), since the resulting naive-time doesn't come with an assumption of a UTC time zone.

## Full Precision Parsing

It is highly recommended to parse all of the information in the date-time string into a type at least as precise as the string. For example, if your string has fractional seconds, but you only require seconds, specify a sub-second precision, then round to seconds manually using whatever convention is appropriate for your use case. Parsing such a string directly into a second precision result is ambiguous and undefined, and is unlikely to work as you might expect.

## Examples

sys_time_parse("2020-01-01T05:06:07")
#> <time_point<sys><second>[1]>
#> [1] "2020-01-01T05:06:07"

# Day precision
sys_time_parse("2020-01-01", precision = "day")
#> <time_point<sys><day>[1]>
#> [1] "2020-01-01"

# Nanosecond precision, but using a day based format
sys_time_parse("2020-01-01", format = "%Y-%m-%d", precision = "nanosecond")
#> <time_point<sys><nanosecond>[1]>
#> [1] "2020-01-01T00:00:00.000000000"

# Multiple format strings are allowed for heterogeneous times
sys_time_parse(
c("2019-01-01", "2019/1/1"),
format = c("%Y/%m/%d", "%Y-%m-%d"),
precision = "day"
)
#> <time_point<sys><day>[2]>
#> [1] "2019-01-01" "2019-01-01"

# The %z command shifts the date-time by subtracting the UTC offset so
# that the returned sys-time can be interpreted as UTC
sys_time_parse(
"2020-01-01 02:00:00 -0400",
format = "%Y-%m-%d %H:%M:%S %z"
)
#> <time_point<sys><second>[1]>
#> [1] "2020-01-01T06:00:00"

# Remember that the %Z command is ignored entirely!
sys_time_parse("2020-01-01 America/New_York", format = "%Y-%m-%d %Z")
#> <time_point<sys><second>[1]>
#> [1] "2020-01-01T00:00:00"

# ---------------------------------------------------------------------------
# RFC 3339

# Typical UTC format
x <- "2019-01-01T00:01:02Z"
sys_time_parse_RFC_3339(x)
#> <time_point<sys><second>[1]>
#> [1] "2019-01-01T00:01:02"

# With a UTC offset containing a :
x <- "2019-01-01T00:01:02+02:30"
sys_time_parse_RFC_3339(x, offset = "%Ez")
#> <time_point<sys><second>[1]>
#> [1] "2018-12-31T21:31:02"

# With a space between the date and time and no : in the offset
x <- "2019-01-01 00:01:02+0230"
sys_time_parse_RFC_3339(x, separator = " ", offset = "%z")
#> <time_point<sys><second>[1]>
#> [1] "2018-12-31T21:31:02"


text:
# Simple Diversification Rate Estimation

## Estimating Constant Speciation & Extinction Rates

This tutorial describes how to specify basic birth-death models in RevBayes. Specifically, we will use the pure-birth (Yule) process and the constant-rate birth-death process (Yule 1925; Kendall 1948; Thompson 1975; Nee et al. 1994; Rannala and Yang 1996; Yang and Rannala 1997; Höhna 2015). The probabilistic graphical model is given for each component of this tutorial. After each model is specified, you will estimate speciation and extinction rates using Markov chain Monte Carlo (MCMC). Finally, you will estimate the marginal likelihood of the model and evaluate the relative support using Bayes factors.

You should read first the Introduction to Diversification Rate Estimation tutorial, which explains the theory and gives some general overview of diversification rate estimation.

## Pure-Birth (Yule) Model

In this section, we will walk through specifying a pure-birth process model and estimating the speciation rate. Then, we will continue by estimating the marginal likelihood of the model so that we can perform model comparison. The section about the birth-death process will be less detailed because it will build up on this section.

The simplest branching model is the pure-birth process described by Yule (1925). Under this model, we assume at any instant in time, every lineage has the same speciation rate, $\lambda$. In its simplest form, the speciation rate remains constant over time. As a result, the waiting time between speciation events is exponential, where the rate of the exponential distribution is the product of the number of extant lineages ($n$) at that time and the speciation rate: $n\lambda$ (Yule 1925; Aldous 2001; Höhna 2014). The pure-birth branching model does not allow for lineage extinction (i.e., the extinction rate $\mu=0$). However, the model depends on a second parameter, $\rho$, which is the probability of sampling a species in the present time. It also depends on the time of the start of the process, whether that is the origin time or root age. Therefore, the probabilistic graphical model of the pure-birth process is quite simple, where the observed time tree topology and node ages are conditional on the speciation rate, sampling probability, and root age ().

We can add hierarchical structure to this model and account for uncertainty in the value of the speciation rate by placing a hyperprior on $\lambda$ (). The graphical models in and demonstrate the simplicity of the Yule model. Ultimately, the pure birth model is just a special case of the birth-death process, where the extinction rate (typically denoted $\mu$) is a constant node with the value 0.

For this exercise, we will specify a Yule model, such that the speciation rate is a stochastic node, drawn from a lognormal distribution as in . In a Bayesian framework, we are interested in estimating the posterior probability of $\lambda$ given that we observe a time tree.

$$$\mathbb{P}(\lambda \mid \Psi) = \frac{\mathbb{P}(\Psi \mid \lambda)\mathbb{P}(\lambda \mid \nu)}{\mathbb{P}(\Psi)} \tag{Bayes Theorem}\label{eq:bayes_thereom}$$$

In this example, we have a phylogeny of 233 primates. We are treating the time tree $\Psi$ as an observation, thus clamping the model with an observed value. The time tree we are conditioning the process on is taken from the analysis by Magnuson-Ford and Otto (2012). Furthermore, there are approximately 367 described primates species, so we will fix the parameter $\rho$ to $233/367$.

⇨ The full Yule-model specification is in the file called mcmc_Yule.Rev.

### Read the tree

Begin by reading in the observed tree and get some useful variables. We will need these later on.

T <- readTrees("data/primates_tree.nex")[1]

# Get some useful variables from the data. We need these later on.
taxa <- T.taxa()

Additionally, we can initialize a variable for our vector of moves and monitors:

moves    = VectorMoves()
monitors = VectorMonitors()

### Specifying the model

#### Birth rate

The model we are specifying only has three nodes (). We can specify the birth rate $\lambda$, the mean and standard deviation of the lognormal hyperprior on $\lambda$, and the conditional dependency of the two parameters all in one line of Rev code.

birth_rate_mean <- ln( ln(367.0/2.0) / T.rootAge() )
birth_rate_sd <- 0.587405
birth_rate ~ dnLognormal(mean=birth_rate_mean,sd=birth_rate_sd)

Here, the stochastic node called birth_rate represents the speciation rate $\lambda$. birth_rate_mean and birth_rate_sd are the prior mean and prior standard deviation, respectively. We chose the prior mean so that it is centered around observed number of species (i.e., the expected number of species under a Yule process will thus be equal to the observed number of species) and a prior standard deviation of 0.587405 which creates a lognormal distribution with 95% prior probability spanning exactly one order of magnitude. If you want to represent more prior uncertainty by, e.g., allowing for two orders of magnitude in the 95% prior probability then you can simply multiply birth_rate_sd by a factor of 2.

To estimate the value of $\lambda$, we assign a proposal mechanism to operate on this node. In RevBayes these MCMC sampling algorithms are called moves. We need to create a vector of moves and we can do this by using vector indexing and our pre-initialized iterator mi. We will use a scaling move on $\lambda$ called mvScale.

moves.append( mvScale(birth_rate,lambda=1.0,tune=true,weight=3.0) )

#### Sampling probability

Our prior belief is that we have sampled 233 out of 367 living primate species. To account for this we can set the sampling parameter as a constant node with a value of 233/367

rho <- T.ntips()/367

#### Root age

Any stochastic branching process must be conditioned on a time that represents the start of the process. Typically, this parameter is the origin time and it is assumed that the process started with one lineage. Thus, the origin of a birth-death process is the node that is ancestral to the root node of the tree. For macroevolutionary data, particularly without any sampled fossils, it is difficult to use the origin time. To accommodate this, we can condition on the age of the root by assuming the process started with two lineages that both originate at the time of the root.

We can get the value for the root from the Magnuson-Ford and Otto (2012) tree.

root_time <- T.rootAge()

#### The time tree

Now we have all of the parameters we need to specify the full pure-birth model. We can initialize the stochastic node representing the time tree. Note that we set the mu parameter to the constant value 0.0.

timetree ~ dnBDP(lambda=birth_rate, mu=0.0, rho=rho, rootAge=root_time, samplingStrategy="uniform", condition="survival", taxa=taxa)

If you refer back to Equation \eqref{eq:bayes_thereom} and , the time tree $\Psi$ is the variable we observe, i.e., the data. We can set this in Rev by using the clamp() function.

timetree.clamp(T)

Here we are fixing the value of the time tree to our observed tree from Magnuson-Ford and Otto (2012).

Finally, we can create a workspace object of our whole model using the model() function. Workspace objects are initialized using the = operator. This distinguishes the objects used by the program to run the MCMC analysis from the distinct nodes of our graphical model. The model workspace objects makes it easy to work with the model in Rev and creates a wrapper around our model DAG. Because our model is a directed, acyclic graph (DAG), we only need to give the model wrapper function a single node and it does the work to find all the other nodes through their connections.

mymodel = model(birth_rate)

The model() function traverses all of the connections and finds all of the nodes we specified.

### Running an MCMC analysis

#### Specifying Monitors

For our MCMC analysis, we need to set up a vector of monitors to record the states of our Markov chain. The monitor functions are all called mn*, where * is the wildcard representing the monitor type. First, we will initialize the model monitor using the mnModel function. This creates a new monitor variable that will output the states for all model parameters when passed into a MCMC function.

monitors.append( mnModel(filename="output/primates_Yule.log",printgen=10, separator = TAB) )

Additionally, create a screen monitor that will report the states of specified variables to the screen with mnScreen:

monitors.append( mnScreen(printgen=1000, birth_rate) )

#### Initializing and Running the MCMC Simulation

With a fully specified model, a set of monitors, and a set of moves, we can now set up the MCMC algorithm that will sample parameter values in proportion to their posterior probability. The mcmc() function will create our MCMC object:

mymcmc = mcmc(mymodel, monitors, moves, nruns=2, combine="mixed")

Now, run the MCMC:

mymcmc.run(generations=50000, tuningInterval=200)

When the analysis is complete, you will have the monitored files in your output directory.

⇨ The Rev file for performing this analysis: mcmc_Yule.Rev

### Exercise 1

• Run an MCMC simulation to estimate the posterior distribution of the speciation rate (birth_rate).
• Load the generated output file into Tracer: What is the mean posterior estimate of the birth_rate and what is the estimated HPD?
• Compare the prior mean with the posterior mean. (Hint: Use the optional argument underPrior=TRUE in the function mymcmc.run()) Are they different (e.g., )? Is the posterior mean outside the prior 95% probability interval?
• Repeat the analysis and allow for two orders of magnitude of prior uncertainty.

## Estimating the marginal likelihood of the model

With a fully specified model, we can set up the powerPosterior() analysis to create a file of ‘powers’ and likelihoods from which we can estimate the marginal likelihood using stepping-stone or path sampling. This method computes a vector of powers from a beta distribution, then executes an MCMC run for each power step while raising the likelihood to that power. In this implementation, the vector of powers starts with 1, sampling the likelihood close to the posterior and incrementally sampling closer and closer to the prior as the power decreases. For more information on marginal likelihood estimation please read the Bayesian Model Selection Tutorial

First, we create the variable containing the power posterior. This requires us to provide a model and vector of moves, as well as an output file name. The cats argument sets the number of power steps.

pow_p = powerPosterior(mymodel, moves, monitors, "output/Yule_powp.out", cats=127, sampleFreq=10)

We can start the power posterior by first burning in the chain and and discarding the first 10000 states.

pow_p.burnin(generations=10000,tuningInterval=200)

Now execute the run with the .run() function:

pow_p.run(generations=10000)

Once the power posteriors have been saved to file, create a stepping-stone sampler. This function can read any file of power posteriors and compute the marginal likelihood using stepping-stone sampling.

ss = steppingStoneSampler(file="output/Yule_powp.out", powerColumnName="power", likelihoodColumnName="likelihood")

Compute the marginal likelihood under stepping-stone sampling using the member function marginal() of the ss variable and record the value in .

write("Stepping stone marginal likelihood:\t", ss.marginal() )

Path sampling is an alternative to stepping-stone sampling and also takes the same power posteriors as input.

ps = pathSampler(file="output/Yule_powp.out", powerColumnName="power", likelihoodColumnName="likelihood")

Compute the marginal likelihood under stepping-stone sampling using the member function marginal() of the ps variable and record the value in .

write("Path-sampling marginal likelihood:\t", ps.marginal() )

⇨ The Rev file for performing this analysis: ml_Yule.Rev.

### Exercise 2

• Compute the marginal likelihood under the Yule model.
• Enter the estimate in the table below.

## Birth-Death Process

The pure-birth model does not account for extinction, thus it assumes that every lineage at the start of the process will have sampled descendants at time 0. This assumption is fairly unrealistic for most phylogenetic datasets on a macroevolutionary time scale since the fossil record provides evidence of extinct lineages. Kendall (1948) described a more general branching process model to account for lineage extinction called the birth-death process. Under this model, at any instant in time, every lineage has the same rate of speciation $\lambda$ and the same rate of extinction $\mu$. This is the constant-rate birth-death process, which considers the rates constant over time and over the tree (Nee et al. 1994; Höhna 2015).

Yang and Rannala (1997) derived the probability of time trees under an extension of the birth-death model that accounts for incomplete sampling of the tips () (see also Stadler (2009) and Höhna (2014)). Under this model, the parameter $\rho$ accounts for the probability of sampling in the present time, and because it is a probability, this parameter can only take values between 0 and 1.

In principle, we can specify a model with prior distributions on speciation and extinction rates directly. One possibility is to specify an exponential, lognormal, or gamma distribution as the prior on either rate parameter. However, it is more common to specify prior distributions on a transformation of the speciation and extinction rate because, for example, we want to enforce that the speciation rate is always larger than the extinction rate.

In the following subsections we will only provide the key command that are different for the constant-rate birth-death process. All other commands will be the same as in the previous exercise. You should copy the mcmc_Yule.Rev script and modify it accordingly. Don’t forget to rename the filenames of the monitors to avoid overwriting of your previous results!

### Diversification and turnover

We have some good prior information about the magnitude of the diversification. The diversification rate represent the rate at which the species diversity increases. Thus, we just use the same prior for the diversification rate as we used before for the birth rate.

diversification_mean <- ln( ln(367.0/2.0) / T.rootAge() )
diversification_sd <- 0.587405
diversification ~ dnLognormal(mean=diversification_mean,sd=diversification_sd)
moves.append( mvScale(diversification,lambda=1.0,tune=true,weight=3.0) )

Unfortunately, we have less prior information about the turnover rate. The turnover rate is the rate at which one species is replaced by another species due to a birth plus death event. Hence, the turnover rate represent the longevity of a species. For simplicity we use the same prior on the turnover rate but with two orders of magnitude prior uncertainty.

turnover_mean <- ln( ln(367.0/2.0) / T.rootAge() )
turnover_sd <- 0.587405*2
turnover ~ dnLognormal(mean=turnover_mean,sd=turnover_sd)
moves.append( mvScale(turnover,lambda=1.0,tune=true,weight=3.0) )

### Birth rate and death rate

The birth and death rates are both deterministic nodes. We compute them by simple parameter transformation. Note that the death rate is in fact equal to the turnover rate.

birth_rate := diversification + turnover
death_rate := turnover

All other parameters, such as the sampling probability and the root age are kept the same as in the analysis above.

### The time tree

Initialize the stochastic node representing the time tree. The main difference now is that we provide a stochastic parameter for the extinction rate $\mu$.

timetree ~ dnBDP(lambda=birth_rate, mu=death_rate, rho=rho, rootAge=root_time, samplingStrategy="uniform", condition="survival", taxa=taxa)

⇨ The Rev file for performing this analysis: mcmc_BD.Rev

### Exercise 3

• Run an MCMC simulation to compute the posterior distribution of the diversification and turnover rate.
• Look at the parameter estimates in Tracer. What can you say about the diversification, turnover, speciation and extinction rates? How high is the extinction rate compared with the speciation rate?
• Compute the marginal likelihood under the BD model. Which model is supported by the data?
• Enter the estimate in the table above.
• Can you modify the script to use a prior on the birth drawn from a lognormal distribution and relative death rate drawn from a beta distribution so that the extinction rate is equal to the birth rate times the relative death rate?
1. Do the parameter estimates change?
2. What about the marginal likelihood estimates?
1. Aldous D.J. 2001. Stochastic models and descriptive statistics for phylogenetic trees, from Yule to today. Statistical Science.:23–34.
2. Höhna S. 2014. Likelihood Inference of Non-Constant Diversification Rates with Incomplete Taxon Sampling. PLoS One. 9:e84184. 10.1371/journal.pone.0084184
3. Höhna S. 2015. The time-dependent reconstructed evolutionary process with a key-role for mass-extinction events. Journal of Theoretical Biology. 380:321–331. http://dx.doi.org/10.1016/j.jtbi.2015.06.005
4. Höhna S., Heath T.A., Boussau B., Landis M.J., Ronquist F., Huelsenbeck J.P. 2014. Probabilistic Graphical Model Representation in Phylogenetics. Systematic Biology. 63:753–771. 10.1093/sysbio/syu039
5. Kendall D.G. 1948. On the Generalized "Birth-and-Death" Process. The Annals of Mathematical Statistics. 19:1–15. 10.1214/aoms/1177730285
6. Magnuson-Ford K., Otto S.P. 2012. Linking the Investigations of Character Evolution and Species Diversification. The American Naturalist. 180:225–245. 10.1086/666649
7. Nee S., May R.M., Harvey P.H. 1994. The Reconstructed Evolutionary Process. Philosophical Transactions: Biological Sciences. 344:305–311. 10.1098/rstb.1994.0068
8. Rannala B., Yang Z. 1996. Probability distribution of molecular evolutionary trees: A new method of phylogenetic inference. Journal of Molecular Evolution. 43:304–311. 10.1007/BF02338839
9. Stadler T. 2009. On incomplete sampling under birth-death models and connections to the sampling-based coalescent. Journal of Theoretical Biology. 261:58–66. 10.1016/j.jtbi.2009.07.018
10. Thompson E.A. 1975. Human evolutionary trees. Cambridge University Press Cambridge.
11. Yang Z., Rannala B. 1997. Bayesian phylogenetic inference using DNA sequences: a Markov Chain Monte Carlo Method. Molecular Biology and Evolution. 14:717–724. 10.1093/oxfordjournals.molbev.a025811
12. Yule G.U. 1925. A mathematical theory of evolution, based on the conclusions of Dr. JC Willis, FRS. Philosophical Transactions of the Royal Society of London. Series B, Containing Papers of a Biological Character. 213:21–87.

format: plain


text:
# American Institute of Mathematical Sciences

2019, 26: 54-71. doi: 10.3934/era.2019.26.005

## Finite difference scheme for 2D parabolic problem modelling electrostatic Micro-Electromechanical Systems

 1 Lebanese University, Khawarizmi Laboratory for Mathematics and Applications, Hadath, Mont Liban, Beirut, Lebanon 2 Université de Poitiers, Laboratoire de Mathématiques et Applications, UMR CNRS 7348 - SP2MI, Boulevard Marie et Pierre Curie - Téléport 2, F-86962 Chasseneuil Futuroscope Cedex, France 3 Lebanese International University, Department of Mathematics and Physics, Lebanon 4 Xiamen University, School of Mathematical Sciences, Fujian Provincial Key Laboratory of Mathematical Modeling and High Performance Scientific Computing, Xiamen, Fujian, China

Received  May 2019 Revised  July 2019 Published  July 2019

This paper is dedicated to study the fully discretized semi implicit and implicit schemes of a 2D parabolic semi linear problem modeling MEMS devices. Starting with the analysis of the semi-implicit scheme, we proved the existence of the discrete solution which converges under certain conditions on the voltage $\lambda$. On the other hand, we consider a fully implicit scheme, we proved the existence of the discrete solution, which also converges to the stationary solution under certain conditions on the voltage $\lambda$ and on the time step. Finally, we did some numerical simulations which show the behavior of the solution.

Citation: Hawraa Alsayed, Hussein Fakih, Alain Miranville, Ali Wehbe. Finite difference scheme for 2D parabolic problem modelling electrostatic Micro-Electromechanical Systems. Electronic Research Announcements, 2019, 26: 54-71. doi: 10.3934/era.2019.26.005
##### References:
 [1] E. L. Allgower and K. Georg, Continuation and path following, Acta Numerica, 2 (1993), 1–64. doi: 10.1017/s0962492900002336.  Google Scholar [2] N. D. Brubaker and J. A. Pelesko, Non-linear effects on canonical MEMS models, European Journal of Applied Mathematics, 22 (2011), 455–470. doi: 10.1017/S0956792511000180.  Google Scholar [3] L. Cherfils, A. Miranville, S. Peng and C. Xu, Analysis of discretized parabolic problems modelling Electrostatic Micro-Electromechanical systems, AIMS Journals, 2018. Google Scholar [4] P. Esposito, N. Ghoussoub and Y. Guo, Mathematical Analysis of Partial Differential Equations Modelling Electrostatic MEMS, Courant Lecture Notes in Mathematics, 20. Courant Institute of Mathematical Sciences, New York; American Mathematical Society, Providence, RI, 2010. doi: 10.1090/cln/020.  Google Scholar [5] L. C. Evans, Partial Differential Equations , Graduate Studies in Mathematics, 19. American Mathematical Society, Providence, RI, 1998.  Google Scholar [6] G. Flores, G. Mercado, J. A. Pelesko and N. Smyth, Analysis of the dynamics and touch down model of electrostatic MEMS, SIAM Jpournal on Applied Mathematics, 67 (2006/07), 434–446. doi: 10.1137/060648866.  Google Scholar [7] N. Ghoussoub and Y. Guo, On the partial differential equations of electrostatic MEMS devices: Stationary case, SIAM Journal on Applied Mathematics, 38 (2006/07), 1423–1449. doi: 10.1137/050647803.  Google Scholar [8] N. Ghoussoub and Y. Guo, On the partial differential equations of electrostatic MEMS devices Ⅱ: Dynamic case, NoDEA Nonlinear Differential Equations and Applications, 15 (2008), 115–145. doi: 10.1007/s00030-007-6004-1.  Google Scholar [9] Y. Guo, On the partial differential equations of electrostatic MEMS devices Ⅲ: Refined touchdown behavior, J. Differential Equations, 244 (2008), 2277–2309. doi: 10.1016/j.jde.2008.02.005.  Google Scholar [10] Y. Guo, Z. Pan and M. J. Ward, Touchdown and pull-in voltage behavior of a MEMS device with varying dielectric properties, SIAM Journal on Applied Mathematics, 66 (2005), 309–338. doi: 10.1137/040613391.  Google Scholar [11] S. H. Lui, Numerical Analysis of Partial Differential Equations, John Wiley & Sons, Inc., Hoboken, NJ, 2011. doi: 10.1002/9781118111130.  Google Scholar [12] I. Stakgold, Green's Functions and Boundary Value Problems, A Wiley-Interscience Publication. John Wiley & Sons, Inc., New York, 1998.  Google Scholar [13] J. A. Pelesko, Mathematical modeling of electrostatic MEMS with tailored dielectric properties, SIAM Journal on Applied Mathematics, 62 (2002), 888–908. doi: 10.1137/S0036139900381079.  Google Scholar [14] J. A. Pelesko and D. H. Bernstein, Modeling MEMS and NEMS, Chapman & Hall/CRC, Boca Raton, FL, 2003.  Google Scholar [15] J. A. Pelesko, D. H. Bernstein and J. McCuan, Symmetry and Symmetry Breaking in Electrostatic MEMS, Proceedings of MSM, (2003), 304–307. Google Scholar [16] J. A. Pelesko and A. A. Triolo, Nonlocal problems in MEMS device control, Journal of Engineering Mathematics, 41 (2001), 345–366. doi: 10.1023/A:1012292311304.  Google Scholar [17] A. Henrot, Extremum Problems for Eigenvalues of Elliptic Operators, Frontiers in Mathematics. Birkhäuser Verlag, Basel, 2006.  Google Scholar [18] Q. Wang, Quenching phenomenon for a parabolic MEMS equation, Chinese Annals of Mathematics, 39 (2018), 129–144. doi: 10.1007/s11401-018-1056-6.  Google Scholar

show all references

##### References:
 [1] E. L. Allgower and K. Georg, Continuation and path following, Acta Numerica, 2 (1993), 1–64. doi: 10.1017/s0962492900002336.  Google Scholar [2] N. D. Brubaker and J. A. Pelesko, Non-linear effects on canonical MEMS models, European Journal of Applied Mathematics, 22 (2011), 455–470. doi: 10.1017/S0956792511000180.  Google Scholar [3] L. Cherfils, A. Miranville, S. Peng and C. Xu, Analysis of discretized parabolic problems modelling Electrostatic Micro-Electromechanical systems, AIMS Journals, 2018. Google Scholar [4] P. Esposito, N. Ghoussoub and Y. Guo, Mathematical Analysis of Partial Differential Equations Modelling Electrostatic MEMS, Courant Lecture Notes in Mathematics, 20. Courant Institute of Mathematical Sciences, New York; American Mathematical Society, Providence, RI, 2010. doi: 10.1090/cln/020.  Google Scholar [5] L. C. Evans, Partial Differential Equations , Graduate Studies in Mathematics, 19. American Mathematical Society, Providence, RI, 1998.  Google Scholar [6] G. Flores, G. Mercado, J. A. Pelesko and N. Smyth, Analysis of the dynamics and touch down model of electrostatic MEMS, SIAM Jpournal on Applied Mathematics, 67 (2006/07), 434–446. doi: 10.1137/060648866.  Google Scholar [7] N. Ghoussoub and Y. Guo, On the partial differential equations of electrostatic MEMS devices: Stationary case, SIAM Journal on Applied Mathematics, 38 (2006/07), 1423–1449. doi: 10.1137/050647803.  Google Scholar [8] N. Ghoussoub and Y. Guo, On the partial differential equations of electrostatic MEMS devices Ⅱ: Dynamic case, NoDEA Nonlinear Differential Equations and Applications, 15 (2008), 115–145. doi: 10.1007/s00030-007-6004-1.  Google Scholar [9] Y. Guo, On the partial differential equations of electrostatic MEMS devices Ⅲ: Refined touchdown behavior, J. Differential Equations, 244 (2008), 2277–2309. doi: 10.1016/j.jde.2008.02.005.  Google Scholar [10] Y. Guo, Z. Pan and M. J. Ward, Touchdown and pull-in voltage behavior of a MEMS device with varying dielectric properties, SIAM Journal on Applied Mathematics, 66 (2005), 309–338. doi: 10.1137/040613391.  Google Scholar [11] S. H. Lui, Numerical Analysis of Partial Differential Equations, John Wiley & Sons, Inc., Hoboken, NJ, 2011. doi: 10.1002/9781118111130.  Google Scholar [12] I. Stakgold, Green's Functions and Boundary Value Problems, A Wiley-Interscience Publication. John Wiley & Sons, Inc., New York, 1998.  Google Scholar [13] J. A. Pelesko, Mathematical modeling of electrostatic MEMS with tailored dielectric properties, SIAM Journal on Applied Mathematics, 62 (2002), 888–908. doi: 10.1137/S0036139900381079.  Google Scholar [14] J. A. Pelesko and D. H. Bernstein, Modeling MEMS and NEMS, Chapman & Hall/CRC, Boca Raton, FL, 2003.  Google Scholar [15] J. A. Pelesko, D. H. Bernstein and J. McCuan, Symmetry and Symmetry Breaking in Electrostatic MEMS, Proceedings of MSM, (2003), 304–307. Google Scholar [16] J. A. Pelesko and A. A. Triolo, Nonlocal problems in MEMS device control, Journal of Engineering Mathematics, 41 (2001), 345–366. doi: 10.1023/A:1012292311304.  Google Scholar [17] A. Henrot, Extremum Problems for Eigenvalues of Elliptic Operators, Frontiers in Mathematics. Birkhäuser Verlag, Basel, 2006.  Google Scholar [18] Q. Wang, Quenching phenomenon for a parabolic MEMS equation, Chinese Annals of Mathematics, 39 (2018), 129–144. doi: 10.1007/s11401-018-1056-6.  Google Scholar
$\lambda = 10,\; f(x,y) = \sqrt{x^2 +y^2},\; \tau = 0.01,\; M = 29$
$\lambda = 10,\; f(x,y) = \sqrt{x^2 +y^2},\; \tau = 20,\; M = 29$
$\lambda = 11.5, \; f(x, y) = \sqrt{x^2 +y^2}, \; \tau = 0.001, \; M = 35$, in 3(a) touchdown is observed at $t = 682\tau$ however in 3(b) it is observed at $t = 1.3339\tau$
 [1] Joshua Hudson, Michael Jolly. Numerical efficacy study of data assimilation for the 2D magnetohydrodynamic equations. Journal of Computational Dynamics, 2019, 6 (1) : 131-145. doi: 10.3934/jcd.2019006 [2] Gianluca Crippa, Elizaveta Semenova, Stefano Spirito. Strong continuity for the 2D Euler equations. Kinetic & Related Models, 2015, 8 (4) : 685-689. doi: 10.3934/krm.2015.8.685 [3] Bernd Kawohl, Guido Sweers. On a formula for sets of constant width in 2d. Communications on Pure & Applied Analysis, 2019, 18 (4) : 2117-2131. doi: 10.3934/cpaa.2019095 [4] Ka Kit Tung, Wendell Welch Orlando. On the differences between 2D and QG turbulence. Discrete & Continuous Dynamical Systems - B, 2003, 3 (2) : 145-162. doi: 10.3934/dcdsb.2003.3.145 [5] Julien Cividini. Pattern formation in 2D traffic flows. Discrete & Continuous Dynamical Systems - S, 2014, 7 (3) : 395-409. doi: 10.3934/dcdss.2014.7.395 [6] Géry de Saxcé, Claude Vallée. Structure of the space of 2D elasticity tensors. Discrete & Continuous Dynamical Systems - S, 2013, 6 (6) : 1525-1537. doi: 10.3934/dcdss.2013.6.1525 [7] Igor Kukavica, Amjad Tuffaha. On the 2D free boundary Euler equation. Evolution Equations & Control Theory, 2012, 1 (2) : 297-314. doi: 10.3934/eect.2012.1.297 [8] Igor Chueshov, Alexey Shcherbina. Semi-weak well-posedness and attractors for 2D Schrödinger-Boussinesq equations. Evolution Equations & Control Theory, 2012, 1 (1) : 57-80. doi: 10.3934/eect.2012.1.57 [9] Laurence Cherfils, Alain Miranville, Shuiran Peng, Chuanju Xu. Analysis of discretized parabolic problems modeling electrostatic micro-electromechanical systems. Discrete & Continuous Dynamical Systems - S, 2019, 12 (6) : 1601-1621. doi: 10.3934/dcdss.2019109 [10] Mehdi Badra, Takéo Takahashi. Feedback boundary stabilization of 2d fluid-structure interaction systems. Discrete & Continuous Dynamical Systems - A, 2017, 37 (5) : 2315-2373. doi: 10.3934/dcds.2017102 [11] Brian Ryals, Robert J. Sacker. Global stability in the 2D Ricker equation revisited. Discrete & Continuous Dynamical Systems - B, 2017, 22 (2) : 585-604. doi: 10.3934/dcdsb.2017028 [12] Boling Guo, Yongqian Han, Guoli Zhou. Random attractor for the 2D stochastic nematic liquid crystals flows. Communications on Pure & Applied Analysis, 2019, 18 (5) : 2349-2376. doi: 10.3934/cpaa.2019106 [13] Leonardo Kosloff, Tomas Schonbek. Existence and decay of solutions of the 2D QG equation in the presence of an obstacle. Discrete & Continuous Dynamical Systems - S, 2014, 7 (5) : 1025-1043. doi: 10.3934/dcdss.2014.7.1025 [14] María J. Martín, Jukka Tuomela. 2D incompressible Euler equations: New explicit solutions. Discrete & Continuous Dynamical Systems - A, 2019, 39 (8) : 4547-4563. doi: 10.3934/dcds.2019187 [15] Theodore Kolokolnikov, Juncheng Wei. Hexagonal spike clusters for some PDE's in 2D. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020039 [16] Yuri N. Fedorov, Luis C. García-Naranjo, Joris Vankerschaver. The motion of the 2D hydrodynamic Chaplygin sleigh in the presence of circulation. Discrete & Continuous Dynamical Systems - A, 2013, 33 (9) : 4017-4040. doi: 10.3934/dcds.2013.33.4017 [17] Makram Hamouda, Chang-Yeol Jung, Roger Temam. Boundary layers for the 2D linearized primitive equations. Communications on Pure & Applied Analysis, 2009, 8 (1) : 335-359. doi: 10.3934/cpaa.2009.8.335 [18] A. Rousseau, Roger Temam, J. Tribbia. Boundary conditions for the 2D linearized PEs of the ocean in the absence of viscosity. Discrete & Continuous Dynamical Systems - A, 2005, 13 (5) : 1257-1276. doi: 10.3934/dcds.2005.13.1257 [19] Tetsu Mizumachi. Instability of bound states for 2D nonlinear Schrödinger equations. Discrete & Continuous Dynamical Systems - A, 2005, 13 (2) : 413-428. doi: 10.3934/dcds.2005.13.413 [20] Holger Dullin, Yuri Latushkin, Robert Marangell, Shibi Vasudevan, Joachim Worthington. Instability of unidirectional flows for the 2D α-Euler equations. Communications on Pure & Applied Analysis, 2020, 19 (4) : 2051-2079. doi: 10.3934/cpaa.2020091

2019 Impact Factor: 0.5

## Tools

Article outline

Figures and Tables


text:
# Gδ set

(Redirected from G-delta)

In the mathematical field of topology, a Gδ set is a subset of a topological space that is a countable intersection of open sets. The notation originated in Germany with G for Gebiet (German: area, or neighborhood) meaning open set in this case and δ for Durchschnitt (German: intersection). The term inner limiting set is also used. Gδ sets, and their dual Fσ sets, are the second level of the Borel hierarchy.

## Definition

In a topological space a Gδ set is a countable intersection of open sets. The Gδ sets are exactly the level $\mathbf{\Pi}^0_2$ sets of the Borel hierarchy.

## Examples

• Any open set is trivially a Gδ set
• The set of rational numbers Q is not a Gδ set in R. If we were able to write Q as the intersection of open sets An, each An would have to be dense in R since Q is dense in R. However, the construction above gave the irrational numbers as a countable intersection of open dense subsets. Taking the intersection of both of these sets gives the empty set as a countable intersection of open dense sets in R, a violation of the Baire category theorem.
• The zero-set of a derivative of an everywhere differentiable real-valued function on R is a Gδ set; it can be a dense set with empty interior, as shown by Pompeiu's construction.

A more elaborate example of a Gδ set is given by the following theorem:

Theorem: The set $D=\left\{f \in C([0,1]) : f \text{ is not differentiable at any point of } [0,1] \right\}$ contains a dense Gδ subset of the metric space $C([0,1])$[1]

## Properties

The notion of Gδ sets in metric (and topological) spaces is strongly related to the notion of completeness of the metric space as well as to the Baire category theorem. This is described by the Mazurkiewicz theorem:

Theorem (Mazurkiewicz): Let $(\mathcal{X},\rho)$ be a complete metric space and $A\subset\mathcal{X}$. Then the following are equivalent:

1. $A$ is a Gδ subset of $\mathcal{X}$
2. There is a metric $\sigma$ on $A$ which is equivalent to $\rho | A$ such that $(A,\sigma)$ is a complete metric space.

A key property of $G_\delta$ sets is that they are the possible sets at which a function from a topological space to a metric space is continuous. Formally: The set of points where a function $f$ is continuous is a $G_\delta$ set. This is because continuity at a point $p$ can be defined by a $\Pi^0_2$ formula, namely: For all positive integers $n$, there is an open set $U$ containing $p$ such that $d(f(x),f(y)) < 1/n$ for all $x, y$ in $U$. If a value of $n$ is fixed, the set of $p$ for which there is such a corresponding open $U$ is itself an open set (being a union of open sets), and the universal quantifier on $n$ corresponds to the (countable) intersection of these sets. In the real line, the converse holds as well; for any Gδ subset A of the real line, there is a function f: RR which is continuous exactly at the points in A. As a consequence, while it is possible for the irrationals to be the set of continuity points of a function (see the popcorn function), it is impossible to construct a function which is continuous only on the rational numbers.

### Basic properties

• The intersection of countably many Gδ sets is a Gδ set, and the union of finitely many Gδ sets is a Gδ set; a countable union of Gδ sets is called a Gδσ set.
• A set that contains the intersection of a countable collection of dense open sets is called comeagre or residual. These sets are used to define generic properties of topological spaces of functions.

The following results regard Polish spaces:[2]

• Let $(\mathcal{X},\mathcal{T})$ be a Polish topological space and let $G\subset\mathcal{X}$ be a Gδ set (with respect to $\mathcal{T}$). Then $G$ is a Polish space with respect to the subspace topology on it.

## Gδ space

A Gδ space is a topological space in which every closed set is a Gδ set (Johnson 1970). A normal space which is also a Gδ space is perfectly normal. Every metrizable space is perfectly normal, and every perfectly normal space is completely normal: neither implication is reversible.


text:
## JenniferSmart1 Group Title $cos^{-1}\left(cos\frac{4\pi}{5}\right)$ since it's within the limits $0 \le \theta\le \pi$ $\frac{4\pi}{5}$ one year ago one year ago

1. JenniferSmart1

@satellite73

2. satellite73

yes

3. JenniferSmart1

cool! Thanks!

4. satellite73

yw, you did it not me


text:
# Tag Info

If you know the stock will finish above the strike, then the call option becomes a forward contract since it will always be exercised. We therefore price it as a forward. Its value at maturity is $$S_T - 60.$$ We can synthesize $S_T$ with one unit of stock costing $70.$ We can synthesize $60$ with $60$ ZC bonds which costs $60/1.055$ since the yield is ...


text:
# Tag Archives: Digital natives

## The MATLAB class at midterm: Comfort level

To end the first half of the semester in the MATLAB course, I gave students a lengthier-than-usual survey about the course — a sort of mid-semester course evaluation. I have a load of interesting data to sift through and analyze, relating to various aspects of the course and tagged with metadata about gender, GPA, major, whether they live on or off campus, and so on. I hope to finish analyzing the data before the semester is over. (Ba-dum-ching.)

One of the questions I asked was a mirror of a question I asked in the beginning: On a scale of 0 (lowest) to 10 (highest), rate your personal comfort level with using computers to do the kinds of things we do in this class. I’m thinking that there are affective issues about working with computers, and especially MATLAB, that are never discussed but which play a huge factor in student learning. (We seem to just tell engineers to suck it up and get to work, and assume that all MATLAB learners are engineers.) Here are the data, such as they are, for this question during the first week and at mid-term:

For some reason there were three students who didn’t respond to the midterm survey at all (it was worth 5 out of 15 points on week 7’s homework). I don’t know if the “4” and the two “8”‘s from week 1 that are missing from week 7 are the ones who didn’t respond to the survey; or if the “4” is now a “6” and one of the previous “6” people didn’t respond; or what.

Of course the striking thing here is that nothing has changed. I consider this a win on two levels.

1. The course has, at the very least, not made students generally less comfortable with using computers, which I think is pretty positive considering the subject matter and audience here.
2. The kinds of things we are doing with MATLAB have gotten progressively more complicated through the semester, so holding steady on comfort level while progressing in complexity is pretty much the same as progressing in comfort level. If you report the same comfort level after learning how to drive on the interstate as you did when first learning how to drive, period, it means that you’re more comfortable with driving in general than you used to be.

Comments Off on The MATLAB class at midterm: Comfort level

Filed under MATLAB, Teaching, Technology

## And so it begins: Lab #1 in the MATLAB course

The MATLAB course began in earnest on Monday this week with our first full-length lab activity session. This was the second overall meeting, the first one being some organizational stuff and a lengthy fly-through of the main features of MATLAB. What follows is a breakdown of what we did and how it went, which also serves as an invitation for critique and suggestions in the comments.

First, some context. I intend for this course to be heavily hands-on with an emphasis on self-teaching within reasonable bounds. I laid a ground rule in the first class meeting that any question of the form “How do you do ____ in MATLAB?” was going to be met with the responses “What have you found in the MATLAB help documentation? What have you found via a Google search? What have you found out from your lab partner?” I’m not above giving hints to students in the class, but I insist that they exhaust all efforts of their own first before I come swooping in to the rescue, thereby creating a dependency upon me that makes their future, independent use of MATLAB problematic. So students have to do a considerable amount of individual work to learn basic commands and concepts before they come in to lab. Maybe I’ll blog more about that idea later, but now I want to get on to the activity itself.

First of all, students did this homework assignment in the week before the lab. The main item is to produce a graph of $y = \sin(1/x)$ from x = -1 to x = 12. The theme of the lab this week was plotting, as you’ll see. This homework item forces them to figure out the basic usage of the PLOT command in MATLAB. It also forces them to figure out that you can’t just type 1/x in MATLAB if x is a vector.

The first 10 minutes of class are spent taking a quiz over the basic elements of the homework. Then, the lab activity itself. Here it is: CMP150-Lab1 (PDF, 201Kb). The summary:

1. Reproduce a graph of a somewhat complicated function (related to the one from the homework set) with a bunch of extras added in the graph. Create a JPG and submit it.
2. Create a data set by hand and plot it, and add some extras, including a text annotation. But this time, no pointy-clicky stuff using the Plot Tools window — you have to do it all by hand from the command line and put the commands into an M-file and submit that. (The moral: You need to know how to create a plot both ways, using the pointy-clicky stuff and without using it.)
3. Create a two-item data set by hand and plot it, and make it look pretty. Create a PNG and submit it.
4. Create single plot with 6 subplots arranged in a 2×3 grid. Create a PDF and submit it.

The philosophy here is that plotting stuff is fun, and there is a kind of immediate gratification when you create something visual that will hopefully serve as a source of low-hanging fruit for beginning MATLAB users. So students learning MATLAB should be introduced to the ins and outs of basic function and data visualization before they see much of anything else. And plotting also provides a convenient inroads to talking about M-files and other important MATLAB components.

So, how did it all go? I have to admit it didn’t start well. The homework set was due at 10:30 AM on Monday, and a good portion of the submissions had a timestamp in the neighborhood of 1:30AM Monday. There were several instances of students not reviewing their notes or watching the assigned tutorial videos before starting on the homework, which they did after midnight on the day it was due. So several teams took around 30-40 minutes just to get a basic plot of $A = e^{-0.2t} \sin(2t)$ up on the screen — simply because they didn’t know how to create a vector, use the exp( ) command, or use the plot command, all of which we covered last week and in the homework.

I don’t say this to shame my students. Rather, I think it illustrates some important psychological points that play into teaching MATLAB, or any kind of technical computing topic, at this level:

• Students who are at the entry level of using technical computing software believe that the software will adapt itself to what they are thinking, rather than the harsh reality of the other way around. When students want to plot $e^x$, they should just type it the way they write it. That may be the ideal case, but MATLAB just doesn’t work that way, and that’s a big problem for some people.
• Most people who do any amount of computing will vouch for the importance of being able to surf the help files of a program to figure out what you need to do if you have something to get done. But freshmen in college have mostly never heard of such a thing. They are still making that transition from high school, where (typically) the teacher tells you what you need to know. Asking students to look up a command in a help system and then play around with it before coming into a lab session where they’ll be asked to do more of the same, is asking students to make a HUGE developmental leap. Or at least to begin to make it.
• I’ve said it before, but the notion that today’s students are digitally native is both unfounded and dangerous. My students are not unintelligent, but many of them had no idea what a PNG was or how it was different from a JPG or PDF (this week’s homework asks them to do some research on that topic); many have never seen anything like a command line; a few of them didn’t even know how to attach something to an email to submit it. The so-called and self-appointed ed tech illuminati pushing this digital native idea have simply got to come back to reality so we can teach these ideas and skills rather than assume them.

Anyway, despite the rocky start, we ended well. I softened my stance, just this once, on giving out hints and how-to advice for a couple of things, and the infusion of progress begat more progress, this time by the students themselves. Most people didn’t make it past the second problem but everybody turned in reasonably good work by the deadline this morning. And by the end, teams were getting excited that they had figured some MATLAB out.

I think we can now move forward into next week, which is about working with data files and doing basic statistics, with confidence and with a little more understanding of what this class is all about. Here’s the homework!

Filed under Education, Educational technology, MATLAB, Teaching, Technology

## True library story

I don’t make it out of my building very often at work, but I needed to go over to our library this morning to reserve a computer lab and to look for a particular book. I didn’t know the call number for the book, so I went to the nearest available kiosk computer to look it up in the online catalog.

I should have known it was going to be trouble when the nearest computer was an ancient, beige tower PC with a sticker on the side proclaiming it to be “Designed for Windows 98 and Windows NT“. And it was turned off, which is unusual for a public kiosk. So I turned it on, and it proceeded to literally rattle and whine while it booted. After entering in my login information, I was able to access the web browser — after 15 minutes had passed. 15 minutes from login to usability! I couldn’t even walk away and get on with the stuff I had to do today, because once the interminable login procedure passed, I’d be logged on.

After trying to use Internet Explorer to get to the library’s catalog — which resulted in a stuck browser — I finally just gave up and shut the thing down. Or at least, I initiated the shutdown procedure and walked off. For all I know, the thing may still be trying to shut down.

It occurred to me that university libraries are in a state of transition, and they could look like a lot of different things in the future, but one of the things that library must be is  a repository of  both information and the technology to access and connect that information. And increasingly, that dual role is shifting from books to computers and networks. If the public kiosk computer, to be used by any person randomly needing information about something, takes 15 minutes to boot and an unknown amount of time to actually use a web browser to get to the library’s internal web site, then something’s not right. And if there’s any truth at all to the digital natives idea, I think most students would have gotten a negative impression after the first 90 seconds had passed and they weren’t online.

[Disclaimer: There are other computers that work much faster in our library; but they aren’t prominently positioned to be used by the general public. And I mean no disrespect to our library staff, who really are smart when it comes to technology and are probably just as appalled by a 15-minute startup time as I am.]

Filed under Life in academia, Technology

## enVisionMATH

Here’s a promotional video for a new math curriculum from Pearson called enVisionMATH. (It must be a sign of the times that grade school math curricula have promotional videos.) Watch carefully.

1. Should it be a requirement of parenthood that you must remember enough 5th grade math to teach it halfway decently to your kids?
2. Does the smartboard come included with the textbooks?
3. Did anybody else have the overwhelming urge to yell “Bingo!” after about 2 minutes in?
4. When will textbook companies stop drawing the conclusion that because kids today like to play video games, talk on cell phones, and listen to MP3 players, that they are therefore learning in a fundamentally different way than anybody else in history?

The last question is all about the research-free digital nativist assumption that is the source of many lucrative curriculum deals these days. Data, please?

Filed under Early education, High school, Math, Teaching, Technology, Textbooks

## Retrospective: A proposal about digital natives (4.12.2007)

Editorial: We’re getting near the end of this week’s look back at articles from the past here at CO9s. I’ll have two more tomorrow and one more Saturday. Why twelve? Why, because 12 is an integer of the form $3 \times 2^n$, of course. Didn’t you know those are the best kinds of numbers?

One of the things I want to accomplish on this blog is question assumptions, especially where those assumptions have an impact on students and how we teach them. For me, there’s no bigger source of unquestioned assumptions than the current movement built around the digital native hypothesis — the notion that children today are native to the digital world and come pre-loaded with technological skills that we “digital immigrants” have to acquire. These assumptions simply don’t square in any way with what I’ve experienced as a teacher, and the extent to which these assumptions are driving pedagogical programs in this country is alarming and dangerous.

In this article, I lay out a sort of research program to delineate and open up for questioning just exactly what it is these people are assuming. Now all that’s needed is for somebody to come along and start collecting data — and see where the truth is.

A proposal about digital natives

Originally posted: April 12, 2007

The video below, via Wes Fryer, gives a pretty good synopsis of the entire notion of “digital natives” and how they should be taught — if you drink the kool-aid believe the arguments of people who believe in digital natives. It’s 7:40 long, so take a deep breath and make some popcorn:

Filed under Education, Educational technology, Teaching, Technology

## What’s the best electronic medium for professor/student interaction?

The comments at my last post are suggesting that email has been surpassed by IM, Facebook, and text messaging among the younger generation as the preferred means of electronic communication. (Maybe of any kind of communication.) That really gives me, as a professor, some pause as to my assumption that if I need to get information out to students in a timely way (say, about a change in an assignment or a last-minute announcement for class) or create a space for out-of-classroom discussion of ideas or assignments, email isn’t nearly as reliable as I think it is.

I’m OK with that if it’s true, but then there are two questions that come to mind as being pretty important from my perspective:

• If I have information that I need to get out to my students quickly and be reasonably assured that they’ll get it in time for it to be useful, what is the best way to do this? Is there no one best way, meaning that I need a plan to send the info out in multiple formats? (That would be time consuming = bad.)
• Whatever medium/media is the answer to the first question, where is the functionality for it in the major course management software packages like Angel? If it’s there, does it make sense to use the CMS proprietary version of the softwar or some third party app? (E.g. Angel’s chat feature versus plain old AIM?)

Also, would students appreciate professors using IM, texting, Facebook, etc. for class purposes, or do they really want to keep “their” means of communication for social purposes only? I tried using Facebook last year in relatively close contact with my precalculus class, and far from the students appreciating my efforts, they really felt resentful and creeped-out by the fact that their professors were on Facebook, which is “theirs”.

## These digital natives don’t email

If you read enough edublogs, you begin to encounter the factions that believe that students today are digital natives and have all sorts of rich information experiences all the time in their everyday lives. This is usually taken to mean that they use all kinds of electronic means of sending and receiving information, such as email. I’m already skeptical of that claim, and after the following experience from today I am even less sure about it.

We had some high school students visiting the math department at my college, and part of the program was a discussion panel with current math majors. One of the math majors was asked about some of the main differences between high school and college, and he mentioned the quantity of email that one has to keep up with as a major difference. He asked the high school students how often they checked their emails now. They all looked at each other sheepishly. The math major then asked how many students have email accounts at all. Less than half indicated that they did.

Less than half. How can that be, if they are digital natives? I think have at least half a dozen email addresses just for myself!

So now I am wondering: Do most of the students not have email accounts because they simply aren’t as technologically immersed as some people think they are? Or do they have some other electronic medium for communicating, like text messaging, that they use more frequently than email — so much more frequently that they don’t even have email accounts? I know texting is big among the 18-22 year old set right now, but it’s hard to imagine texting simply usurping the role of email, when you can get email accounts for free all over the place.


text:
In the last chapter we built authentication into our wiki. We also went one step further and used the request.user object to perform some explicit authorization checks. This is fine for a lot of applications, but Pyramid provides some facilities for cleaning this up and decoupling the constraints from the view function itself.

We will implement access control with the following steps:

• Update the authentication policy to break down the userid into a list of principals (security.py).
• Define an authorization policy for mapping users, resources and permissions (security.py).
• Add new resource definitions that will be used as the context for the wiki pages (routes.py).
• Add an ACL to each resource (routes.py).
• Replace the inline checks on the views with permission declarations (views/default.py).

A principal is a level of abstraction on top of the raw userid that describes the user in terms of its capabilities, roles, or other identifiers that are easier to generalize. The permissions are then written against the principals without focusing on the exact user involved.

Pyramid defines two builtin principals used in every application: pyramid.security.Everyone and pyramid.security.Authenticated. On top of these we have already mentioned the required principals for this application in the original design. The user has two possible roles: editor or basic. These will be prefixed by the string role: to avoid clashing with any other types of principals.

Open the file tutorial/security.py and edit it as follows:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from pyramid.security import ( Authenticated, Everyone, ) from . import models class MyAuthenticationPolicy(AuthTktAuthenticationPolicy): def authenticated_userid(self, request): user = request.user if user is not None: return user.id def effective_principals(self, request): principals = [Everyone] user = request.user if user is not None: principals.append(Authenticated) principals.append(str(user.id)) principals.append('role:' + user.role) return principals def get_user(request): user_id = request.unauthenticated_userid if user_id is not None: user = request.dbsession.query(models.User).get(user_id) return user def includeme(config): settings = config.get_settings() authn_policy = MyAuthenticationPolicy( settings['auth.secret'], hashalg='sha512', ) config.set_authentication_policy(authn_policy) config.set_authorization_policy(ACLAuthorizationPolicy()) config.add_request_method(get_user, 'user', reify=True)

Only the highlighted lines need to be added.

Note that the role comes from the User object. We also add the user.id as a principal for when we want to allow that exact user to edit pages which they have created.

We already added the authorization policy in the previous chapter because Pyramid requires one when adding an authentication policy. However, it was not used anywhere, so we'll mention it now.

In the file tutorial/security.py, notice the following lines:

 38 39 40  config.set_authentication_policy(authn_policy) config.set_authorization_policy(ACLAuthorizationPolicy()) config.add_request_method(get_user, 'user', reify=True)

We're using the pyramid.authorization.ACLAuthorizationPolicy, which will suffice for most applications. It uses the context to define the mapping between a principal and permission for the current request via the __acl__.

Resources are the hidden gem of Pyramid. You've made it!

Every URL in a web application represents a resource (the "R" in Uniform Resource Locator). Often the resource is something in your data model, but it could also be an abstraction over many models.

Our wiki has two resources:

1. A NewPage. Represents a potential Page that does not exist. Any logged-in user, having either role of basic or editor, can create pages.
2. A PageResource. Represents a Page that is to be viewed or edited. editor users, as well as the original creator of the Page, may edit the PageResource. Anyone may view it.

Note

The wiki data model is simple enough that the PageResource is mostly redundant with our models.Page SQLAlchemy class. It is completely valid to combine these into one class. However, for this tutorial, they are explicitly separated to make clear the distinction between the parts about which Pyramid cares versus application-defined objects.

There are many ways to define these resources, and they can even be grouped into collections with a hierarchy. However, we're keeping it simple here!

Open the file tutorial/routes.py and edit the following lines:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 from pyramid.httpexceptions import ( HTTPNotFound, HTTPFound, ) from pyramid.security import ( Allow, Everyone, ) from . import models def includeme(config): config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('view_wiki', '/') config.add_route('login', '/login') config.add_route('logout', '/logout') config.add_route('view_page', '/{pagename}', factory=page_factory) config.add_route('add_page', '/add_page/{pagename}', factory=new_page_factory) config.add_route('edit_page', '/{pagename}/edit_page', factory=page_factory) def new_page_factory(request): pagename = request.matchdict['pagename'] if request.dbsession.query(models.Page).filter_by(name=pagename).count() > 0: next_url = request.route_url('edit_page', pagename=pagename) raise HTTPFound(location=next_url) return NewPage(pagename) class NewPage(object): def __init__(self, pagename): self.pagename = pagename def __acl__(self): return [ (Allow, 'role:editor', 'create'), (Allow, 'role:basic', 'create'), ] def page_factory(request): pagename = request.matchdict['pagename'] page = request.dbsession.query(models.Page).filter_by(name=pagename).first() if page is None: raise HTTPNotFound return PageResource(page) class PageResource(object): def __init__(self, page): self.page = page def __acl__(self): return [ (Allow, Everyone, 'view'), (Allow, 'role:editor', 'edit'), (Allow, str(self.page.creator_id), 'edit'), ]

The highlighted lines need to be edited or added.

The NewPage class has an __acl__ on it that returns a list of mappings from principal to permission. This defines who can do what with that resource. In our case we want to allow only those users with the principals of either role:editor or role:basic to have the create permission:

 30 31 32 33 34 35 36 37 38 class NewPage(object): def __init__(self, pagename): self.pagename = pagename def __acl__(self): return [ (Allow, 'role:editor', 'create'), (Allow, 'role:basic', 'create'), ]

The NewPage is loaded as the context of the add_page route by declaring a factory on the route:

 18 19  config.add_route('add_page', '/add_page/{pagename}', factory=new_page_factory)

The PageResource class defines the ACL for a Page. It uses an actual Page object to determine who can do what to the page.

 47 48 49 50 51 52 53 54 55 56 class PageResource(object): def __init__(self, page): self.page = page def __acl__(self): return [ (Allow, Everyone, 'view'), (Allow, 'role:editor', 'edit'), (Allow, str(self.page.creator_id), 'edit'), ]

The PageResource is loaded as the context of the view_page and edit_page routes by declaring a factory on the routes:

 17 18 19 20 21  config.add_route('view_page', '/{pagename}', factory=page_factory) config.add_route('add_page', '/add_page/{pagename}', factory=new_page_factory) config.add_route('edit_page', '/{pagename}/edit_page', factory=page_factory)

At this point we've modified our application to load the PageResource, including the actual Page model in the page_factory. The PageResource is now the context for all view_page and edit_page views. Similarly the NewPage will be the context for the add_page view.

Open the file tutorial/views/default.py.

First, you can drop a few imports that are no longer necessary:

 5 6 7 from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config

Edit the view_page view to declare the view permission, and remove the explicit checks within the view:

 18 19 20 21 22 23 @view_config(route_name='view_page', renderer='../templates/view.jinja2', permission='view') def view_page(request): page = request.context.page def add_link(match):

The work of loading the page has already been done in the factory, so we can just pull the page object out of the PageResource, loaded as request.context. Our factory also guarantees we will have a Page, as it raises the HTTPNotFound exception if no Page exists, again simplifying the view logic.

Edit the edit_page view to declare the edit permission:

 38 39 40 41 42 @view_config(route_name='edit_page', renderer='../templates/edit.jinja2', permission='edit') def edit_page(request): page = request.context.page if 'form.submitted' in request.params:

Edit the add_page view to declare the create permission:

 52 53 54 55 56 @view_config(route_name='add_page', renderer='../templates/edit.jinja2', permission='create') def add_page(request): pagename = request.context.pagename if 'form.submitted' in request.params:

Note the pagename here is pulled off of the context instead of request.matchdict. The factory has done a lot of work for us to hide the actual route pattern.

The ACLs defined on each resource are used by the authorization policy to determine if any principal is allowed to have some permission. If this check fails (for example, the user is not logged in) then an HTTPForbidden exception will be raised automatically. Thus we're able to drop those exceptions and checks from the views themselves. Rather we've defined them in terms of operations on a resource.

The final tutorial/views/default.py should look like the following:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 from pyramid.compat import escape import re from docutils.core import publish_parts from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config from .. import models # regular expression used to find WikiWords wikiwords = re.compile(r"\b([A-Z]\w+[A-Z]+\w+)") @view_config(route_name='view_wiki') def view_wiki(request): next_url = request.route_url('view_page', pagename='FrontPage') return HTTPFound(location=next_url) @view_config(route_name='view_page', renderer='../templates/view.jinja2', permission='view') def view_page(request): page = request.context.page def add_link(match): word = match.group(1) exists = request.dbsession.query(models.Page).filter_by(name=word).all() if exists: view_url = request.route_url('view_page', pagename=word) return '%s' % (view_url, escape(word)) else: add_url = request.route_url('add_page', pagename=word) return '%s' % (add_url, escape(word)) content = publish_parts(page.data, writer_name='html')['html_body'] content = wikiwords.sub(add_link, content) edit_url = request.route_url('edit_page', pagename=page.name) return dict(page=page, content=content, edit_url=edit_url) @view_config(route_name='edit_page', renderer='../templates/edit.jinja2', permission='edit') def edit_page(request): page = request.context.page if 'form.submitted' in request.params: page.data = request.params['body'] next_url = request.route_url('view_page', pagename=page.name) return HTTPFound(location=next_url) return dict( pagename=page.name, pagedata=page.data, save_url=request.route_url('edit_page', pagename=page.name), ) @view_config(route_name='add_page', renderer='../templates/edit.jinja2', permission='create') def add_page(request): pagename = request.context.pagename if 'form.submitted' in request.params: body = request.params['body'] page = models.Page(name=pagename, data=body) page.creator = request.user request.dbsession.add(page) next_url = request.route_url('view_page', pagename=pagename) return HTTPFound(location=next_url) save_url = request.route_url('add_page', pagename=pagename) return dict(pagename=pagename, pagedata='', save_url=save_url)

## Viewing the application in a browser¶

We can finally examine our application in a browser (See Start the application). Launch a browser and visit each of the following URLs, checking that the result is as expected:

• http://localhost:6543/ invokes the view_wiki view. This always redirects to the view_page view of the FrontPage page object. It is executable by any user.
• http://localhost:6543/FrontPage invokes the view_page view of the FrontPage page object. There is a "Login" link in the upper right corner while the user is not authenticated, else it is a "Logout" link when the user is authenticated.
• http://localhost:6543/FrontPage/edit_page invokes the edit_page view for the FrontPage page object. It is executable by only the editor user. If a different user (or the anonymous user) invokes it, then a login form will be displayed. Supplying the credentials with the username editor and password editor will display the edit page form.
• http://localhost:6543/add_page/SomePageName invokes the add_page view for a page. If the page already exists, then it redirects the user to the edit_page view for the page object. It is executable by either the editor or basic user. If a different user (or the anonymous user) invokes it, then a login form will be displayed. Supplying the credentials with either the username editor and password editor, or username basic and password basic, will display the edit page form.
• http://localhost:6543/SomePageName/edit_page invokes the edit_page view for an existing page, or generates an error if the page does not exist. It is editable by the basic user if the page was created by that user in the previous step. If, instead, the page was created by the editor user, then the login page should be shown for the basic user.
• After logging in (as a result of hitting an edit or add page and submitting the login form with the editor credentials), we'll see a "Logout" link in the upper right hand corner. When we click it, we're logged out, redirected back to the front page, and a "Login" link is shown in the upper right hand corner.


text:
# nLab Michael Rios

## Selected writings

On 12-dimensional supergravity et al. and further indications that M-theory in 10+1 dimensions may be understood as the KK-compactification on Cayley-plane fibers of some kind of bosonic M-theory in 26+1 dimensions:

Relation to the Monster group, Moonshine and the Monster vertex operator algebra:

category: people


text:
a questions about the sums of intersections of maximal ideals - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-21T12:47:25Z http://mathoverflow.net/feeds/question/109981 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/109981/a-questions-about-the-sums-of-intersections-of-maximal-ideals a questions about the sums of intersections of maximal ideals sh gh 2012-10-18T06:40:57Z 2012-10-18T17:31:26Z
why the z-ideals in C(X) are basically the sums of intersections of maximal ideals?
 http://mathoverflow.net/questions/109981/a-questions-about-the-sums-of-intersections-of-maximal-ideals/110026#110026 Answer by AliReza Olfati for a questions about the sums of intersections of maximal ideals AliReza Olfati 2012-10-18T17:31:26Z 2012-10-18T17:31:26Z
Let $\mathcal{M}_f$ be the intersection of all maximal ideals in $C(X)$ which contains $f$. it is easy to show that $$\mathcal{M} _f=\Big(g \in C(X): Z(f) \subseteq Z(g)\Big)$$

Now Let $I$ be a $z-$ideal of $C(X)$. It means if $f \in I$ and $Z(f)\subseteq Z(g)$, then $g \in I$.

It suffices to show that for all $f \in I$, $\mathcal{M}_f \subseteq I$.

let $g \in \mathcal{M}_f$, by the above characterization of $\mathcal{M}_f$ we have $Z(f) \subseteq Z(g)$ and this implies that $g \in I$.

So we have shown that for all $f \in I$, $\mathcal{M} _f \subseteq I$. this yields: $$I=\sum _{f \in I} \mathcal{M} _f$$. And this is the case which you wanted.

At the end let me show the sketch of the characterization of $\mathcal{M} _f$ .

Suppose $g$ is in all maximal ideals which contains $f$. Fix $x \in Z(f)$, then $f \in M_x$. but $M_x$ is a maximal ideal which contains $f$ .so $g \in M_x$ and this implies that $x \in Z(g)$. then we show that $Z(f) \subseteq Z(g)$.

For the converse let $Z(f) \subseteq Z(g)$. suppose on the cotrary that there exists a maximal ideal $M$ such that $f \in M$ but $g \notin M$.

So we have $M+(g)=C(X)$. this shows that there exists $k \in M$ and $h \in C(X)$ so that $$k+h.g=1$$

This implies that $Z(k) \cap Z(g)= \varnothing$. But we Know that $f, k \in M$. this obviously shows that $Z(f) \cap Z(g) \neq \varnothing$. We came into a contradiction, because we supposed that $Z(f) \subseteq Z(g)$.


text:
# Just count 3

Find the number of distinct terms in the expansion of $$(x+y-z)^{16}$$

Second part here

×


text:
Lemma 20.24.1. Let $X$ be a ringed space. Let $\mathcal{U} : X = \bigcup _{i \in I} U_ i$ be an open covering of $X$. Let $\mathcal{F}$ be an $\mathcal{O}_ X$-module. Denote $\mathcal{F}_{i_0 \ldots i_ p}$ the restriction of $\mathcal{F}$ to $U_{i_0 \ldots i_ p}$. There exists a complex ${\mathfrak C}^\bullet (\mathcal{U}, \mathcal{F})$ of $\mathcal{O}_ X$-modules with

${\mathfrak C}^ p(\mathcal{U}, \mathcal{F}) = \prod \nolimits _{i_0 \ldots i_ p} (j_{i_0 \ldots i_ p})_* \mathcal{F}_{i_0 \ldots i_ p}$

and differential $d : {\mathfrak C}^ p(\mathcal{U}, \mathcal{F}) \to {\mathfrak C}^{p + 1}(\mathcal{U}, \mathcal{F})$ as in Equation (20.9.0.1). Moreover, there exists a canonical map

$\mathcal{F} \to {\mathfrak C}^\bullet (\mathcal{U}, \mathcal{F})$

which is a quasi-isomorphism, i.e., ${\mathfrak C}^\bullet (\mathcal{U}, \mathcal{F})$ is a resolution of $\mathcal{F}$.

Proof. We check

$0 \to \mathcal{F} \to \mathfrak {C}^0(\mathcal{U}, \mathcal{F}) \to \mathfrak {C}^1(\mathcal{U}, \mathcal{F}) \to \ldots$

is exact on stalks. Let $x \in X$ and choose $i_{\text{fix}} \in I$ such that $x \in U_{i_{\text{fix}}}$. Then define

$h : \mathfrak {C}^ p(\mathcal{U}, \mathcal{F})_ x \to \mathfrak {C}^{p - 1}(\mathcal{U}, \mathcal{F})_ x$

as follows: If $s \in \mathfrak {C}^ p(\mathcal{U}, \mathcal{F})_ x$, take a representative

$\widetilde{s} \in \mathfrak {C}^ p(\mathcal{U}, \mathcal{F})(V) = \prod \nolimits _{i_0 \ldots i_ p} \mathcal{F}(V \cap U_{i_0} \cap \ldots \cap U_{i_ p})$

defined on some neighborhood $V$ of $x$, and set

$h(s)_{i_0 \ldots i_{p - 1}} = \widetilde{s}_{i_{\text{fix}} i_0 \ldots i_{p - 1}, x}.$

By the same formula (for $p = 0$) we get a map $\mathfrak {C}^{0}(\mathcal{U},\mathcal{F})_ x \to \mathcal{F}_ x$. We compute formally as follows:

\begin{align*} (dh + hd)(s)_{i_0 \ldots i_ p} & = \sum \nolimits _{j = 0}^ p (-1)^ j h(s)_{i_0 \ldots \hat i_ j \ldots i_ p} + d(s)_{i_{\text{fix}} i_0 \ldots i_ p}\\ & = \sum \nolimits _{j = 0}^ p (-1)^ j s_{i_{\text{fix}} i_0 \ldots \hat i_ j \ldots i_ p} + s_{i_0 \ldots i_ p} + \sum \nolimits _{j = 0}^ p (-1)^{j + 1} s_{i_{\text{fix}} i_0 \ldots \hat i_ j \ldots i_ p} \\ & = s_{i_0 \ldots i_ p} \end{align*}

This shows $h$ is a homotopy from the identity map of the extended complex

$0 \to \mathcal{F}_ x \to \mathfrak {C}^0(\mathcal{U}, \mathcal{F})_ x \to \mathfrak {C}^1(\mathcal{U}, \mathcal{F})_ x \to \ldots$

to zero and we conclude. $\square$

Comment #937 by correction_bot on

Replace direct sum with product in the definition of $\mathfrak{C}^{\bullet}(\mathcal{U},\mathcal{F})$; then it looks like following works without any local finiteness assumption on the cover. We check is exact on stalks. Let $x \in X$ and fix $i$ such that $x \in U_i$. Then define as follows: If $s \in \mathfrak{C}^{p}(\mathcal{U},\mathcal{F})_x$, take a representative defined on some neighborhood $V$ of $x$, and set (By the same formula we get a map $\mathfrak{C}^{0}(\mathcal{U},\mathcal{F})_x \to \mathcal{F}_x$.) A computation shows $h$ is a homotopy from the identity map of the complex in question to zero. (This proof is the same as Tag 01X9.)

Comment #958 by on

Thanks very much. The original idea for this lemma was to write the stalk as a product of stalks, which only works in the locally finite case (because taking stalks does not commute with products). But of course what you say is much better and now it works in general. Thanks! The changes can be found here.

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 toolbar).

Unfortunately JavaScript is disabled in your browser, so the comment preview function will not work.

All contributions are licensed under the GNU Free Documentation License.

In order to prevent bots from posting comments, we would like you to prove that you are human. You can do this by filling in the name of the current tag in the following input field. As a reminder, this is tag 02FU. Beware of the difference between the letter 'O' and the digit '0'.