text:
# 2018年3月USACO美国计算机奥赛Open Contest公开赛白金级题3

## USACO 2018 US Open Contest, Platinum Problem 3. Disruption

### 2018年3月USACO美国计算机奥赛公开赛白金级题3

Farmer John prides himself on running a well-connected farm. The farm is a collection of NN pastures (2N50,0002≤N≤50,000), pairs of which are connected with N1N−1 bi-directional pathways, each having unit length. Farmer John notices that using an appropriate series of these pathways, it is possible to travel from any pasture to any other pasture.

Although FJ’s farm is connected, he worries what might happen if one of the pathways gets blocked, as this would effectively partition his farm into two disjoint sets of pastures, where the cows could travel within each set but not between the sets. FJ therefore builds a set of MM additional bi-directional pathways (1M50,0001≤M≤50,000), each with a positive integer length at most 109109. The cows still only use the original pathways for transit, unless one of these becomes blocked.

If one of the original pathways becomes blocked, the farm becomes partitioned into two disjoint pieces, and FJ will select from among his extra pathways a single replacement pathway that re-establishes connectivity between these two pieces, so the cows can once again travel from any pasture to any other pasture.

For each of the original pathways on the farm, help FJ select the shortest suitable replacement pathway.

#### INPUT FORMAT (file disrupt.in):

The first line of input contains NN and MM. Each of the next N1N−1 lines describes an original pathway using integers ppqq, where pqp≠q are the pastures connected by the pathway (in the range 1N1…N). The remaining MM lines each describe an extra pathway in terms of three integers: ppqq, and rr, where rr is the length of the pathway. At most one pathway runs between any pair of pastures.

#### OUTPUT FORMAT (file disrupt.out):

For each of the N1N−1 original pathways in the order they appear in the input, output the length of the shortest suitable replacement pathway which would re-connect the farm if that original pathway were to be blocked. If no suitable replacement exists, output -1.

#### SAMPLE INPUT:

6 3
1 2
1 3
4 1
4 5
6 5
2 3 7
3 6 8
6 4 5

#### SAMPLE OUTPUT:

7
7
8
5
5


text:
## On sovereign financial reconciliation

When Necker published his Compte rendu in 1781, many have credited him with causing the French Revolution. Before the Compte rendu, no one in France had understood anything about Bourbon finance—possibly not even the Bourbons. As La Wik puts it, in charming Wikipedese:

Before, the people had never considered governmental income and expenditure to be their concern, but now armed with the Compte rendu, they became more proactive.

Indeed. Of course, in the subsequent decades, many thought twice about becoming more proactive! But governmental income and expenditure had indeed become the people’s concern—then and forever. Alas, it remains our own.

According to modern historians, Necker’s accounts were not entirely honest. I will go with the modern historians on this one—sight unseen. I have not personally inspected the Compte rendu, but my guess would be that Bourbon finance included a lot of strange French holes in which strange amphibians things could hide. The Bourbon administration, while great at many times and in many ways, is seldom celebrated for either simplicity or transparency.

One of the most fundamental patterns of history is that good government is responsible government. A corollary is easily deduced: good government is financially responsible government. Since good government is indeed our concern, we should become concerned indeed when our government does not appear to be financially responsible.

An easy way to be financially irresponsible is to be financially opaque. If an institution is responsible, it must be responsible to someone; to observe it, that someone must be able to form a clear picture of its financial operations. There are many ways to be financially opaque, while superficially appearing transparent. Suffice it to say that I am not sure anyone has a really sound understanding of America’s sovereign balance sheet.

But regardless of the cause, if an institution is not financially responsible, it must be reconciled. Reconciliation is simply a polite word for bankruptcy. What are we reconciling with? Reality!

As Carlyle writes:

Great is Bankruptcy: the great bottomless gulf into which all Falsehoods, public and private, do sink, disappearing; whither, from the first origin of them, they were all doomed. For Nature is true and not a lie. No lie you can speak or act but it will come, after longer or shorter circulation, like a Bill drawn on Nature’s Reality, and be presented there for payment,—with the answer, No effects.

Pity only that it often had so long a circulation: that the original forger were so seldom he who bore the final smart of it! Lies, and the burden of evil they bring, are passed on; shifted from back to back, and from rank to rank; and so land ultimately on the dumb lowest rank, who with spade and mattock, with sore heart and empty wallet, daily come in contact with reality, and can pass the cheat no further. […] But with a Fortunatus’ Purse in his pocket, through what length of time might not almost any Falsehood last! Your Society, your Household, practical or spiritual Arrangement, is untrue, unjust, offensive to the eye of God and man. Nevertheless its hearth is warm, its larder well replenished: the innumerable Swiss of Heaven, with a kind of Natural loyalty, gather round it; will prove, by pamphleteering, musketeering, that it is a truth; or if not an unmixed (unearthly, impossible) Truth, then better, a wholesomely attempered one, (as wind is to the shorn lamb), and works well.

Changed outlook, however, when purse and larder grow empty! Was your Arrangement so true, so accordant to Nature’s ways, then how, in the name of wonder, has Nature, with her infinite bounty, come to leave it famishing there? To all men, to all women and all children, it is now indubitable that your Arrangement was false. Honour to Bankruptcy; ever righteous on the great scale, though in detail it is so cruel! Under all Falsehoods it works, unweariedly mining. No Falsehood, did it rise heaven-high and cover the world, but Bankruptcy, one day, will sweep it down, and make us free of it.

There are many ways to define a sovereign bankruptcy, most of which convert one falsehood into another. A true sovereign reconciliation produces a financially sound and transparent sovereign balance sheet in one step, fair to all creditors. If your plan matches this definition, whatever it is, it cannot possibly be wrong.

As I see it, any sovereign bankruptcy which is “true and not a lie” must recognize three facts:

First, any real bankruptcy demands a change of management. What follows is certainly not a plan that can be executed by the present management. What restructuring plan is? But this is outside our scope today.

Second, precious metals are the only currencies to which a sovereign can be accountable. Therefore, reconciliation must produce a sovereign whose books are done in direct gold. A direct gold standard is 100% blue agave. A basket of gold and gold loans is not gold. (Ie, the 19th-century Bank of England “gold standard” was not a PGS.) The exact technical term is allocated gold.

Third, fiat currency is sovereign equity. Let me repeat that: fiat currency is sovereign equity. Perhaps I could say it a little louder: FIAT CURRENCY IS SOVEREIGN EQUITY. If the right twelve people ever understand this, the world as we know it will come to an end.

Fiat currency has to be equity. It is (a) a financial security, and (b) not a debt. I.e., it is not a promise of anything. If it was a promise of anything—regardless of the quality of that promise—it would not be fiat currency! D’oh.

Therefore, we know exactly what a dollar is: a share of stock in USG. It is just one class of stock, of course, conveying no voting rights. The dollar has never paid any dividends, though perhaps this will change. In sufficient quantity it does convey one very important benefit: the right not to be arrested by the IRS. It also conveys an important right: the right to be treated equitably with all other dollars. My dollar is worth just as much as your dollar or China’s dollar.

If you disagree with these facts, you can stop reading this essay now. We are going to reason as if they were true. If they are not true, all that follows is nonsense.

First, we see instantly why we cannot get a clear picture of the financial condition of USG. It calculates its accounts in its own stock! Can you imagine a company which paid all its vendors in its own corporate shares?

Any corporation can, of course, issue new shares to itself any time it likes. (This is called dilution.) But how on earth can anyone assess whether this company is profitable? How do you value a share? Actual companies which do crazy things like this are generally not profitable, because otherwise they would not need to do crazy things like this.

And that’s not all. Not only does USG calculate its own accounts in terms of its own shares—it compels its citizens to do likewise. It operates an entire economy in which the medium of exchange is this scrip. Of course, we all know this and think of it as normal, so it takes some effort to see how insane it is from an accounting perspective.

One metaphorical crutch that can help us with this is the new invention of virtual worlds. Virtual worlds tend to have virtual currencies, whose economics differ not at all from the economics of real currencies—except, of course, that they are virtual. But virtual worlds are operated by real companies, which exist in the real world and do their books in it.

The virtual world Second Life, operated by Linden Lab, is one such. Linden Lab is not a publicly traded company, and perhaps it will never be. Suppose it was. We’ll call its stock ticker LLX.

Second Life has a currency called the Linden dollar. The Linden dollar is an irredeemable fiat currency, though LL keeps it roughly pegged. But suppose it was backed and redeemable—making it debt, not equity. What should it be backed by? US dollars? Gold? Or…

Let’s suppose Bernie Madoff, or some other unscrupulous person, were appointed the CEO of Linden Lab. As CEO, he is responsible to his board. His board will love him—everyone will love him—if he can only get the price of LLX up. Hm…

I know! Bernie will back Linden dollars with LLX shares. That way, when you buy Linden dollars to play Second Life, you are actually investing in Linden Lab. Share prices are set by supply and demand, of course—to issue a new wodge of L$, LL goes to Nasdaq to buy an LLX share. Naturally, this drives the stock price up. Which is what Bernie wants! Problem solved. What Bernie has done is to redirect the monetary demand of Second Life residents into the market for LLX shares. Since as long as Second Life exists and thrives, this monetary demand will remain high and stable, what goes up need never come down. By using his own shares as a fiat currency, Bernie has performed a rare successful act of market manipulation. The result is that LLX, as a stock on the Nasdaq, will not be priced like other Nasdaq stocks as a function of its theoretical earnings. LLX may have no earnings whatsoever, ever. A Linden dollar now certainly conveys no rights to any distribution. The shares of an ordinary company would be worthless under this condition, but not LLX. Were it not that Linden Lab’s churlish, ungrateful vendors demand payment in US dollars rather than Linden dollars, Linden could operate forever under these conditions, however inefficient its operations. Needless to say, Linden Lab’s financial operations under this system would be entirely impenetrable—probably even to Linden Lab itself, but certainly to any external examination. But this is exactly the model under which USG operates: it directs the monetary demand of its own subjects into its own equity, in which it also does its own books. Small wonder no genuine Compte can be Rendu. There is nothing in the books but madness. Madness! So let’s reconcile this madness. Let us not only render accounts—but pay them. The ends of any design: (a) create a sound and viable financial structure; (b) treat all creditors fairly. These goals are just as appropriate and essential at the sovereign level as in any private bankruptcy. No sovereign balance sheet can be reconciled without admitting and employing the full set of sovereign powers. Frankly, the days when it made sense to talk about property rights in the United States are over. Any such talk is babble—like talk of restoring the Bourbons. God may once have granted France to the Bourbon family, but he appears to have changed his mind. If property rights must be preserved, USG’s balance sheet cannot be reconciled. You either do this thing or you don’t. We are all creditors of USG, and none of us has any special rights. After the reconciliation, of course, property rights can and should be as rigorous as anything. During the reconciliation, they are all just pieces of paper—signed by USG. USG is bankrupt. The pieces of paper remain important; the bankruptcy process will treat them fairly. During the reconciliation, the essential criterion is fairness. A bankruptcy process creates no winners and no losers. At least, it creates no winners and losers among those in the building. If you got out before the bankruptcy, there is no way you will not be thanking yourself. Since USG is sovereign, to a limited extent it can perform such clawbacks, but a sovereign must be careful not to test the physical limits of its sovereignty. What I’m trying to say here is that in any scenario in which any sovereign undergoes this process, and converts its balance sheet back to gold, there will be one set of big winners. These will be people who sold the sovereign shares, or assets denominated in those shares, for gold—before the bankruptcy. A sovereign, to a limited extent, can and should tax these moguls—just as it taxes people who bought Google at the IPO price. If it taxes them too much, however, it must either create a large gap between the price of natural gold and the price of monetary gold, or apply a tax rate which creates a black market in old gold. Either is dangerous. There are always rich people. A marginal dollar in the hands of the rich is much less likely to be competing in any market with your dollar, than a marginal dollar in the hands of the poor. In other words: it is less “inflationary.” Therefore, enriching the goldbugs is not a serious concern for policymakers. They were right; therefore, they should profit. In a word, that’s capitalism. The brutal truth about USG’s shares is that, due to the above (and other) manipulations, they are overvalued in gold. If a dollar is a USG share, and USG shares are repriced in gold, a dollar cannot be worth anywhere near 30mg. It might be worth 1, or 2, or 3. For the dollar holder, the main pain is still to be felt. If 2008 and 2009 felt financially stormy, your barometer is overcalibrated. The market has barely come under pressure. Because even its currency is tied up in the strange machinations of its bizarre 18th-century government, USG, America must experience bankruptcy as a whole. USG was never designed to be a total state, but it is one now. If you would like it not to be a total state, the only way to start is by acknowledging that it is a total state. Capisce? Is this for some reason difficult? The task of the new financial managers of this total state is to set a new price level across the entire American economy. That price level must be one at which the economy is (a) stable and (b) can generally pay its debts. At present, the economy is artificially depressed by deflation; thus, the new price level should be set at a low, stimulative point. Devaluation is always and everywhere an economic stimulus. It rewards the poor at the expense of the rich. This is bad policy on a continuing basis, but excellent policy as part of any one-time event. Any reconciliation should include a strong dose of stimulative inflation. Because the endpoint is a direct gold standard, this stimulus will not last; in the long run, the economy must rearrange itself to a profitable equilibrium with no fiscal, trade or monetary deficit. However, through devaluation the transition can be made almost arbitrarily gentle. This transition plan has six steps. First, we identify all of USG’s liabilities—simple or contingent, formal or informal—and securitize them, converting them to debt in dollars. Second, we nationalize all financial assets at the present market price, converting them all to dollars. Third, we cut each dollar in half: the left half is a share in USG without its gold reserve, the right half an allocated claim to that gold reserve. Fourth, we run a Dutch auction to set the price of left dollars in right dollars—an IPO for USG, now highly profitable, owning the entire country, and debt-free. Fifth, we convert all payment and accounting systems to right-dollars, treating left-dollars as ordinary portfolio securities, and normalizing right-dollars into units of weight—i.e., grams Au. Sixth, we privatize all the nationalized assets The first and second steps are the hard ones. The fifth is a lot of work, but it’s a small matter of programming. The first and second actually require thinking. Let’s do that thinking. First: boys and girls, let’s play a fun game—“find the liabilities!” USG has many conventional debts; it also has many strange liabilities of an unconventional form. We need to find and liquidate all of them, converting them into dollar securities. In the second step, we convert all these liabilities to present dollars. We already did this in the first step for financial securities: if you held T-bills or Agency bonds, USG bought them at the present market price. However, many of USG’s liabilities are (a) contingent; (b) actuarial; or (c) informal. All of these must be discovered and replaced with mere dollars. First, USG has contingent liabilities. These are promises USG has made which may force it to be liable for a debt. A good example is a loan guarantee. USG has made a lot of loan guarantees. Most of them were made to institutions acquired in the first step, and obviously a guarantee to oneself is void. But in case any are still floating around, they need to be cleaned up. To clean up a loan guarantee, assume the loan and pay it off. If A has loaned$X to B and USG has guaranteed this loan, USG pays $X to A and is owed$X by B. Poof! Reality is revealed. A loan guarantee is in reality a government loan. Better living through bankruptcy.

Next, USG has actuarial liabilities. For instance, suppose you have been paying into Social Security. You have therefore earned Social Security benefits. The payout will vary depending on your age. The present actuarial value at present interest rates of your benefits, however, is easily calculated. This sum is deposited into your Fed account. Social Security can be entirely closed out in this way.

So can all entitlement programs, even those paid in benefits rather than cash. For instance, what are your Medicare benefits worth? What would it cost you, in present dollars, to buy your Medicare benefits from a profit-making insurance company? That sum is deposited into your Fed account. In fact—why not give everyone Medicare coverage while we’re at it? If the people want national health care, this is a perfect way to give them exactly that.

Essentially, we are cutting the strings of dependency that bind voters to Washington, not by eliminating their benefits but by cashing them out. Once said voters understand this model, it strikes me as unlikely that they will oppose it. If there is some problem with this, just increase the allocations by 20 or 30 percent. The yelps will rapidly subside.

These political buyouts should already be calculated in a generous and giving spirit. Since the old management spent 75 years buying political power with USG’s printing press, surely the new management cannot be excused for doing so on a one-time basis.

(Progressives are attracted to national health care because of the enormous number of strings it will attach. Voters are attracted to national health care because they want national health care. If you have a plan that provides national health care without any strings attached, do not expect it to attract progressives.)

All recurring payments made by Washington should be investigated for conversion to debt. They probably are debts—just informal debts. For instance, welfare payments proper obviously cannot be monetized and transferred to the recipients. This budgetary stream, however, can be monetized and converted into an endowment, which endows a charity that looks after the recipients. Washington, which is a very caring place, can get all its caring good works out of its hair and off its books in this way. Even national defense can be endowed—a proposition that would certainly tend to minimize unmotivated adventurism.

Even the most basic expenses can in fact conceal debts. For instance: consider a government employee who cannot be fired. Well, new management is what it is! It turns out: he can be fired. (In fact, I would be quite surprised if new management keeps many of the old employees.)

But the old employees have a right: the right not to be fired. This is an entitlement. Being sovereign, the new management cannot be compelled to employ them. Being fair, and anxious to prove its fairness, it is compelled to respect this entitlement, as it respects others. Thus it should compensate fired government employees with a mammoth dollar severance, which repays them for their loss of tenure.

So there is a simple explanation for the first step. Formalizing and securitizing entitlements is always and in every case a Pareto optimization—except in one case, the case in which the entitlement is a mechanism of dependency through which the provider asserts paternal guidance.

USG is particularly noted for the high quality of its paternal guidance. Not. Moreover, since this objective (debatable in the first case) cannot be observed in polite company, it cannot be the actual motivation for these policies. Otherwise, you would be making the same argument for welfare that George Fitzhugh made for slavery. I’m sure you wouldn’t want to do that.

Second: nationalize all financial assets, at their present market price.

This is not hard to define. But why? What is the rationale for this unprecedented act? The word “nationalize” is needlessly provocative. Rather, we are consolidating the sovereign balance sheet. This is both righteous and essential for more reasons than I can count. But let me just enumerate a few.

The basic moral reason is that since the dollar financial markets are so fundamentally and thoroughly manipulated, the prices of financial assets cannot in any way be regarded as market prices. The new management will create free markets. The old management ran the book at a rigged casino. The new management is closing that book—with its present entries. If you have a balance at the casino, you get the balance back in cash. (Ideally at a premium, for your trouble.)

Perhaps you doubt that all securities prices are set by the government. Actually, this can be trivially deduced from basic investment theory. The price of a loan is set by the interest rate of that loan, the probability of default, and the risk-free market interest rate. If the USG fixes or manipulates the last—as of course it does—in what sense is this price a market price? Duh.

We can still compute the probability of default from the price of the loan; this market information is still visible. We can compare relative prices of securities. The number that appears next to the loan in the owner’s portfolio window, however, is entirely determined by USG. The absolute price, in dollars, is an administrative decision of the government.

For instance, if the Fed ceased to lend or buy loans tomorrow, interest rates might well go to 87%. I pick this number arbitrarily. It might also be 187%. Or 287%. Question: if interest rates go to 87%, what is a 30-year zero-coupon T-bill paying 5% worth? Can you even sell it? Or do you just recycle it? You do the math.

Moreover, this principle extends not just to financial instruments, but also to financed assets. Consider a house. The house’s owner is in the quaint habit of talking about what her dwelling was “worth,” as though this was some objective quality of the physical object, like being brown. Between 2000 and 2006, her house “went up”—before it was “worth” $300K, after it was “worth” 550K. The house, in fact, deteriorated. It did not spontaneously remodel its kitchen. Perhaps its neighborhood became more attractive—or perhaps the dollar market was being pumped full of government loans. The economic planner thus faces a dilemma. Any return to free-market economics will have an extremely chaotic, and generally negative, effect on the price of financed assets. This is because any return to free-market economics is likely to result in higher interest rates, since there will be no government lending or loan guarantees. This is why no realistic reconciliation plan can maintain property rights—at least, not in the market for securities and securitized assets. It is essential to fall back on the less rigorous, but more important, standard of fairness. What is fair in dealing with this problem? What’s fair is that whatever you own, be it stocks or bonds or houses, you bought in dollars; if it “went up,” you earned those dollars too; when it “went down,” you suffered with it; whatever you are “worth” is yours. All results of the financial ancien-regime are permanent. The present prices are not free-market prices. But they are market prices. They represent genuine results of real life. A fair system would maintain these results. Therefore, the only way to revert to market pricing, while preserving fairness, is for USG to buy these assets at their present price, which USG itself has set; and sell them again at market prices. Which will generally be lower, since any liquidation is bound to be deflationary. What is the difference? Who takes the loss? The “loss” is a liability that USG assumed, when it decided to manipulate the freakin’ market. It cannot just cancel this debt. Rather, the debt must be paid. But the debt cannot even be calculated without returning the asset to the market. Thus, temporary nationalization is essential. Nationalization can be quite involuntary. Financial assets are not, in general, of sentimental value. Houses are an exception. There is no sense in kicking people out of their houses. However, there is such a thing as a long-term lease. If the government nationalizes your house, you will obviously get a long-term lease. Therefore, we have our plan for the asset side of USG’s balance sheet. Since USG is sovereign, it is the final and ultimate owner of everything. It exercises that right. It buys all market-traded securities at the market price. It grants all holders of all financed assets, right down to cars, the right to sell the collateral to USG at the present market or assessed price, whichever is higher. Cars and houses are leased back to their owners. For financed assets, this is an option and you don’t have to take it—but if you don’t take it, USG is not responsible for any pain you may taste. Where does USG get the money for this? Remember, no one has any money. Fiat currency is sovereign equity. Instead, we have shares of USG. The correct question is: where does USG get the dollars? The answer is: it issues them. Any financial reconciliation will see the creation of enormous numbers of shares. That’s why they call it a debt-to-equity conversion. As for gold, USG demands that all citizens turn in half their gold. It’s called a “tax,” doofus. The new management is hardly about to abandon their right to tax! And the tax includes jewelry—to keep it, pay the gold tax. More than this, and people will cheat. Less, and USG would get more by asking for more. 50% should be somewhere near the top of the Laffer curve. Moreover, no such tax is a rational reason for present gold holders to oppose this plan. Again, they will profit massively by it—as they should. What have we done to USG’s balance sheet? On the liability side, we have added 10 or 20 trillion dollars—at least. Almost all American debts are now owed to USG; almost all American assets are now owned by USG. This is the nation-state as giant totalitarian corporation. It is not a sustainable state of affairs, but we do not intend to sustain it. On the asset side, we have added a large number of valuable assets—debts, homes, corporations, etc. We also must consider personal balance sheets. As a result of this operation, your net worth in dollars is unchanged. Your net worth, however, consists entirely of dollars. If you had$200K in home equity, you now have $200K in dollars. If you were in debt, you are still in debt. (Except that underwater nonrecourse mortgages are wiped out.) All that changes is that you now send your checks to Washington, instead of “The Lakes, Nevada.” Moreover, since the Fed has acquired all banks, you don’t have$200K “in the bank.” You have your own account at the Fed, a privilege previously reserved for actual banks. This layer of indirection is entirely artificial and unnecessary—in short, a historical legacy. In a world of electronic dollars, the Fed’s state is simply a big spreadsheet in which each row is a pair: your SSN, and the number of dollars you own. Your number indicates how many brownie points Uncle Sam has assigned you, so to speak. And if you prefer your brownie points on paper, all ATMs now have a new logo: the Fed’s.

Liquidation is the conversion of debt into equity. But when we find all the spending that is actually debt, and convert it into actual debt, we don’t just liquidate the debt.

What we are doing here is destroying USG’s chronic deficit. All of its regular expenditures which are not related to the production of revenue—revenue in gold—are in fact debts of the old regime. Since the old regime was bankrupt, all its debts are converted into equity—i.e., present dollars. The result is a gazillion dollars—but all those dollars are shares in USG. Which is now massively profitable. Bankruptcy in a nutshell!

Financially, the continent has been converted into one immense gold farm. It costs very little to administer, the Americans being docile, and produces enormous returns. In short, it is more profitable than Jesus. This profits must be split, however, across a gazillion shares—or dollars.

The new America has the simplest possible balance sheet. On the liability side, it has no debt and a single class of equity. On the asset side, it has everything. An enormous stream of gold, from both taxes and debts, pours into Washington’s coffers. Naturally, it must be distributed to the shareholders—and thus the shares have value. Gold value.

But what, exactly, is their price? USG’s profits are not yet an enormous stream of gold. They are only an enormous stream of dollars. An entity cannot be financially responsible if it pays dividends in its own shares. This would just be bizarre.

We now face our third problem: dividing the dollar. This is our automatic dollar-gold devaluation figure.

Again, all dollars are cut in half. Quite literally—if you hold dollars as cash, you take a pair of scissors and cut them right down the middle. Electronically, of course, no scissors are required. Electronically, all dollars are in your Fed account. This will simply change from one number to two. If yesterday you held 50K dollars, today you hold 50K left-dollars and 50K right-dollars. These will not exchange at 1:1 exactly—probably nowhere near. But their sum is no more, and no less, than what you had before.

Left dollars are shares in USG’s vast pile of assets, seized in the nationalization, and of course in the future revenues of USG itself. Which are themselves vast. Right-dollars are claims to USG’s gold reserve, fully allocated and redeemable. Essentially, a left dollar is a share in the American Treuhand; a right dollar is a zilligram in BullionVault.

A crucial question is whether Fort Knox accepts bail-ins—i.e., you can deliver a right dollar’s worth of natural gold to Fort Knox, and get a right dollar for it. If so, the monetary system is a direct gold standard. If not, the price of monetary gold may float above the price of natural gold. There is no technical problem with this, but it is probably imprudent. A hybrid gold standard with restricted bail-in is an interesting design, but perhaps too experimental. After 75-plus years of New Deal economics, the people will demand only the simplest and most classical of financial designs. Floating super-gold is not in this class.

To divide the dollar, we need to (fourth) establish an exchange rate between left and right dollars; and (fifth) convert the standard of payment to right dollars. (a) is the same problem as the problem of valuing the East German Treuhand, except in gold—of assigning a stable gold value to all financial assets. Basically, a left dollar becomes an investment dollar; a right dollar a spending dollar.

In particular, all debts are converted to right-dollar debts, at the initial left-right rate. If the market does not set a good exchange rate, debtors may be unfairly penalized or rewarded. However, we cannot do better than this market.

In a single gigantic Dutch auction, a left-dollar price is set; all those who prefer left to right dollars below this price receive left for their right, and vice versa. The result is the Rate—best expressed as the price of a dollar in milligrams of gold. (My guess is: somewhere around 2.) The old dollar is split into left dollars and right dollars; the left is an investment, i.e., a stream of future returns; the right is money.

To create a new capital market, we must value our investments in terms of money. We must value the dollar in gold. We do this, in one step, by getting all the investments into one pool, and valuing that pool in gold. We can then By centralizing this decision, we ensure that its consequences are fair to everyone.

And, again, fifth: payments can then be switched to right dollars. Or rather, grams of gold. Since right dollars are no more than claims to gold, going all the way to a weight-based standard is trivial. And probably advisable. But the difference is not substantive. Once we have valued left dollars in right dollars, we can value dollars in right dollars. Or rather, grams of gold.

Let’s say we go directly to milligrams. On the flag day, therefore, all prices become milligrams Au, all payments gold payments. To set the gram price from the dollar price, multiply by the Rate. To rewrite old contracts written in dollars, multiply by the Rate. This change, like any redenomination of the currency, is mechanical.

Of course, these prices may fluctuate; all prices do. However, we have been extremely careful throughout this entire exercise to preserve relative purchasing power. Asset prices will have no choice but to change, because the entire financial market has been rebooted. Consumer prices and labor prices should remain roughly the same, because purchasing power (relative to the Rate) has remained roughly the same.

Or, for a slight stimulus, become slightly greater. At the expense, of course, of stealing from the rich and giving to the poor, the economy can be arbitrarily stimulated on a one-time basis in the course of this procedure. In the long run it will have to become more productive or more austere, hopefully the former. In the short run, the transitional management can print as many dollars as it wants. And probably should—to grease the wheels. Inflation is not a concern.

Not continuing inflation, anyway. Because, again, the result is a direct gold standard. A thing never before seen in history, at least not for the last three centuries. It will run stably and indefinitely without serious market fluctuations. It will certainly not exhibit persistent inflation, unless someone figures out how to extract gold from seawater. (There actually isn’t that much gold in seawater.)

Finally, in the sixth step, USG spins off the nationalized assets and becomes a lean, mean 21st-century corporate government—extremely small and highly profitable. When it sells (reprivatizes) the private assets it acquired in the second step, it sells them of course for gold.

It will sell them into a market that can establish true, stable market prices for them. This market will price them by measuring their expected yield in direct, 100%-reserve gold, and setting a yield curve that reflects the balance between present and future direct gold.

And this is the end state: a stable private economy on the gold standard. Moreover, unlike most plans for returning to gold, this plan does not cause a reduction in aggregate consumer demand by reducing aggregate purchasing power. Implemented properly, it should perform a one-time inflation in which the purchasing power of the rich is redistributed to the poor—stimulating demand, not contracting it. But this inflation cannot be chronic, as it is one-time. It thus cannot produce the perverse incentive structure we see under chronically-inflating economies.

So can we do it? Nah, we can’t. No way. Nothing like this will ever happen. I guarantee you.

format: plain


text:
# P-Values Are Tough and S-Values Can Help

The $$P$$-value doesn’t have many fans. There are those who don’t understand it, often treating it as a measure it’s not, whether that’s a posterior probability, the probability of getting results due to chance alone, or some other bizarre/incorrect interpretation.13 Then there are those who dislike it because they think the concept is too difficult to understand or because they see it as a noisy statistic we’re not interested in.

However, the groups of people mentioned above aren’t mutually exclusive. Many who dislike and criticize the $$P$$-value also do not understand its properties and behavior.

# What is a $$P$$-value Anyway?

## Definition

The $$P$$-value is the probability of getting a result (specifically, a test statistic) at least as extreme as what was observed if every model assumption, in addition to the targeted test hypothesis (usually a null hypothesis), used to compute it were correct.35

Key assumptions are that some sort of random process was employed (sampling, assignment, etc.), that there are no uncontrolled sources of bias (confounding, programming errors, equipment defects, sparse-data bias)6 in the results, and that the test hypothesis (often the null hypothesis) is correct. Some of these assumptions can be seen in the figure below from,7 which will be discussed more later below.

We assume all those assumptions to be correct (hence, we “condition” on them, even though they are often not correct)7 when calculating the $$P$$-value, so that any deviation of the data from what was expected under those assumptions would be purely random error. But in reality such deviations could also be the result of any assumptions being false, including but not limited to the test hypothesis.

For example, in high-energy physics, neutrinos were found in one instance to be faster than light due to the resulting small test statistic/$$P$$-value, but this result was later found to be a result of a loose fiber optic cable that introduced a delay in the timing system.8 Thus, the low $$P$$-value was due to a bias in the procedure.

So the $$P$$-value cannot be the probability of one of these assumptions, such as “the probability of getting results due to chance alone.” A statement like this is backwards because it’s quantifying one of the assumptions behind the computations of a $$P$$-value.

We assumed this condition to be true (all deviations operating by random error) with several other things, when calculating the $$P$$-value, but this does not mean it is actually correct and the calculation of the $$P$$-value cannot be the probability of one of those assumptions. It is also worth clarifying that $$P$$-values are not probabilities of data or parameter values, which many like to say to differentiate from probabilities of hypotheses. Rather, $$P$$-values are probabilities of “data features”, such as test statistics (i.e. a z-score or $$\chi^{2}$$ statistic) or can be interpreted as the percentile at which the test statistic falls within the expected distribution for the test statistic assuming all the model assumptions are true.9, 10

## Properties (Calibration)

The $$P$$-value is a random variable and it is considered to be valid if it is well calibrated and meets the validity criterion of being uniform under the null hypothesis of no effect, where every value between 0 and 1 is equally likely (see the histogram below). Many frequentist statisticians do not consider $$P$$-values to be useful if they fail to meet this validity criterion, hence they do not recognize variants such as the posterior predictive $$P$$-value (which concentrates around values such as 0.5, rather than being uniform) to be valid.

In fact, there is an entire body of work on attempting to calibrate the $$P$$-value which ranges from mathematical solutions such as taking the $$(1 + [-e*p*\log(p)]^{-1})^{-1}$$ which gives the lower bound on the conditional type I error, as proposed by Sellke et al.,11, 12 to taking the $$C_{1}(K):=\sqrt{K}-1$$ of the $$P$$-value (the square-root calibrator), which yields something known as a test martingale,13 or even approaches such as empirically attempting to recalibrate the $$P$$-value by collecting observed $$P$$-values from observational studies with negative controls (“test-hypotheses where the exposure is not believed to cause the outcome”) and using them to calculate the empirical null distribution.14

The latter is done since observational studies are prone to several more biases than controlled, randomized experiments, thus the observed $$P$$-values and estimated effect sizes are used to calculate the systematic errors within the sampling distribution and are used for recalibration of the $$P$$-value. Whether or not this approach is effective, however, is a different matter.15 In short, calibration is a very important and sought-out property of $$P$$-values.

library("ggplot2")
RNGkind(kind = "L'Ecuyer-CMRG")
set.seed <- 1031
n.sim <- 1000
t.sim <- numeric(n.sim)
n.samp <- 1000
pb <- txtProgressBar(min = 0, max = n.sim,
initial = 0, style = 3)

for (i in 1:n.sim) {
X <- rnorm(n.samp, mean = 0, sd = 1)
Y <- rnorm(n.samp, mean = 0, sd = 1)
df <- data.frame(X, Y)
t <- t.test(X, Y, data = df)
t.sim[i] <- t[[3]]
setTxtProgressBar(pb, i)
}

ggplot(NULL, aes(x = t.sim)) +
geom_histogram(bins = 30, col = "black",
fill = "#99c7c7", alpha = 0.25) +
labs(title = "Distribution of P-values Under the Null",
subtitle = "Histogram of observed P-values from 10000 t-tests",
x = "P-value") +
scale_x_continuous(breaks = seq(0, 1, 0.05)) +
theme_bw()

## The Different Interpretations

### The Neyman-Pearson Approach

Many researchers interpret the $$P$$-value in a behavioral, decision-guiding way such as being statistically significant or not depending on whether observed p from a study (the realization of the random variable) falls below a fixed cutoff level ($$\alpha$$, which is the maximum tolerable type I error rate).16

This decision-making framework (Neyman-Pearson) may be useful in certain scenarios,17 where some sort of randomization is possible, where experiments can be repeated, and where there is large control over the experimental conditions, with one of the most notable historical examples being Egon Pearson (son of Karl Pearson and coauthor of Jerzy Neyman) using it to improve quality control in industrial settings.

Contrary to popular belief, this approach does NOT require exact replications of the experiments, instead, it requires that a valid, and the same $$\alpha$$ is used.16, 18 In this approach, the exact $$P$$-value from a study is not as relevant and cannot validly be interpreted without an entire set of studies that are compared to the fixed error rate ($$\alpha$$).

### The Fisherian Approach

Others interpret the $$P$$-value in an inductive inferential/evidential (Fisherian) way,19, 20 as a continuous measure of evidence against the very test hypothesis and entire model (all assumptions) used to compute it (let’s go with this for now, even though there are some problems with this interpretation, more on that below).

This interpretation as a continuous measure of evidence against the test hypothesis and the entire model used to compute it can be seen in the figure below from7. In one framework (left panel), we may assume certain assumptions to be true (“conditioning” on them, i.e, use of random assignment), and in the other (right panel), we question all assumptions, hence the “unconditional” interpretation. Unlike the Neyman-Pearson approach, this inferential approach allows interpretation of $$P$$-values from single studies, and indeed, lower values of it are taken as more evidence against the tested null hypothesis.

### Null-Hypothesis Significance Testing

However, it is also worth pointing out that most individuals do not interpret $$P$$-values from an Neyman-Pearson or Fisherian standpoint, rather, they fuse both approaches together, which is what we commonly know today as “null-hypothesis significance testing.” This approach is regarded by most as being a horrific hybrid given that it often confuses error rates ($$\alpha$$, $$\beta$$), which are fixed before a study, with the $$P$$-value, which is not a fixed error-rate, and this fusion often has been blamed for the replication crisis in science, since many statisticians believe that the two approaches are incompatible. Though some believe these approaches can be reconciled.

Back to the Fisherian approach, the interpretation of the $$P$$-value as a continuous measure of evidence against the test model that produced it shouldn’t be confused with other statistics that serve as support measures. Likelihood ratios and Bayes factors are absolute measures of evidence for a model compared to another model, whereas the $$P$$-value is a relative measure of evidence that can be tricky to interpret.2123 Indeed, this is why the $$P$$-value is sometimes converted by some Bayesians to a lower bound of the Bayes factor by using $$-e*p*\log(p)$$ as proposed by some such as Sellke et al.11, 12

## Measure of Compatibility

The $$P$$-value is not an absolute measure of evidence for a model (such as the null/alternative model), it is a continuous measure of the compatibility of the observed data with the model used to compute it.3

If it’s high, it means the observed data are very compatible with the model used to compute it. If it’s very low, then it indicates that the data are not as compatible with the model used to calculate it, and this low compatibility may be due to random variation and/or it may be due to a violation of assumptions (such as the null model not being true, not using randomization, a programming error or equipment defect such as that seen with neutrinos, etc.).

Low compatibility of the data with the model can be implied as evidence against the test hypothesis, if we accept the rest of the model used to compute the $$P$$-value. Thus, lower $$P$$-values from a Fisherian perspective are seen as stronger evidence against the test hypothesis given the rest of the model.

# Common Criticisms Don’t Hold Up

If we treat the $$P$$-value as nothing more or less than a continuous measure of compatibility of the observed data with the model used to compute it (observed $$p$$), we won’t run into some of the common misinterpretations such as “the $$P$$-value is the probability of a hypothesis”, or the “probability of chance alone”, or “the probability of being incorrect”.3

Indeed, many of the “problems” commonly associated with the $$P$$-value are not due to the actual statistic itself, but rather researchers’ misinterpretations of what it is and what it means for a study.

The answer to these misconceptions may be compatibilism, with less compatibility (smaller $$P$$-values) indicating a poor fit between the data and the test model and hence more evidence against the test hypothesis.

A $$P$$-value of 0.04 means that assuming that all the assumptions of the model used to compute the $$P$$-value are correct, we won’t get data (a test statistic) at least as extreme as what was observed by random variation more than 4% of the time.

To many, such low compatibility between the data and the model may lead them to reject the test hypothesis (the null hypothesis).

# Some Difficulties To Think About

## Conceptual Mismatch With Direction

If you recall from above, I wrote that the $$P$$-value is seen by many as being a continuous measure of evidence against the test hypothesis and model. Technically speaking, it would be incorrect to define it this way because as the $$P$$-value goes up (with the highest value being 1 or 100%), there is less evidence against the test hypothesis since the data are more compatible with the test model. 1 = perfect compatibility of the data with the test model.

As the $$P$$-value gets lower (with the lowest value being 0), there is less compatibility between the data and the model, hence more evidence against the test hypothesis used to compute $$p$$.

Thus, saying that $$P$$-values are measures of evidence against the hypothesis used to compute them is a backward definition. This definition would be correct if higher $$P$$-values inferred more evidence against the test hypothesis and vice versa.

## Interpretation Difficulty Due to Scale

Another problem with $$P$$-values and their interpretation is scaling. Since the statistic is meant to be a continuous measure of compatibility (and relative evidence against the test model + hypothesis), we would hope that differences between $$P$$-values would be equal (on an additive scale), as this makes it easier to interpret.

For example, the difference between 0 and 10 dollars is the same as the difference between 90 and 100 dollars. This makes it easy to think about and compare across various intervals.

Unfortunately, this doesn’t apply to the $$P$$-value because it is on the inverse-exponential scale. The difference between 0.01 and 0.10 is not the same as the difference between 0.90 and 0.99.

For example, with a normal distribution (above), a z-score of 0 results in a $$P$$-value of 1 (perfect compatibility). If we now move to a z-score of 1, the $$P$$-value is 0.31. Thus, we saw a dramatic decrease from a $$P$$-value of 1 to 0.31 with one z-score. A 0.69 difference in the $$P$$-value.

Now let’s move from a z-score of 1 to a z-score of 2. We saw a difference of 0.69 with the change in one z-score before, so the new $$P$$-value must be 0.31 - 0.69 = -0.38 right? No. The $$P$$-value for a z-score of 2 is 0.045. The $$P$$-value for a z-score of 3 is 0.003. Even though we’ve only been moving by one z-score at a time, the changes in $$P$$-values don’t remain constant; they become smaller and smaller.

Thus, the difference between the $$P$$-values of 0.01 and 0.10 in terms of z-scores is substantially larger than the difference between 0.90 and 0.99. Again, this makes it difficult to interpret as a statistic across the board, especially as a continuous measure. This can further be seen in the figure from Rafi & Greenland (2020).

# Surprisal-values as Support Aids

The issues described above such as the backward definition and the problem of scaling can make it difficult to conceptualize the $$P$$-value as being an evidence measure against the test hypothesis and test model. However, these issues can be addressed by taking the negative log of the $$P$$-value $$–\log_{2}(p)$$ , which yields something known as the Shannon information value or surprisal ($$s$$) value,4, 5, 24 named after Claude Shannon, the father of information theory.25

Unlike the $$P$$-value, this value is not a probability but a continuous measure of information in bits of information against the test hypothesis and is taken from the observed test statistic computed by the test model.

It also provides a more intuitive way to think about $$P$$-values. Imagine that the variable k is always the nearest integer to the calculated value of s. Now, take for example a $$P$$-value of 0.05, the $$S$$-value for this would be s = $$–\log_{2}(0.05)$$ which equals 4.3 bits of information embedded in the test statistic, which can be implied as evidence against the test hypothesis.

How much evidence is this? k can help us think about this. The nearest integer to 4.3 is 4. Thus, the data which yield a $$P$$-value of 0.05 which results in an s value of 4.3 bits of information is no more surprising than getting all heads on 4 fair coin tosses.

Another example. Let’s say our study gives us a $$P$$-value of 0.005, which would indicate to many very low compatibility between the test model and the observed data; this would yield an s value of $$–\log_{2}(0.005) = 7.6$$ bits of information. k which is the closest integer to s would be 8. Thus, the data which yield a $$P$$-value of 0.005 are no more surprising than getting all heads on 8 fair coin tosses.

Unlike the $$P$$-value, the $$S$$-value is more intuitive as a measure that provides evidence against the test hypothesis since its value (bits of information against the test hypothesis) increases with less compatibility, whereas it is the opposite for the $$P$$-value.

## Examples

Let’s try using some data to see this in action. I’ll take a sample experimental dataset from R on the effects of different conditions on dried plant weight. We can plot the data and also run a one-way ANOVA.

pg <- force(PlantGrowth)
library("rms")
library("ggstatsplot")
library("cachem")
ggbetweenstats(
data = pg,
x = group,
y = weight,
xlab = "Grouping Condition",
ylab = "Dried Weight of Plants",
type = "parametric",
var.equal = TRUE,
plot.type = "boxviolin",
bf.message = FALSE,
grouping.var = group,
mean.ci = TRUE,
nboot = 10000,
title = "Plant Growth Results")

Looks interesting. We can see some differences from the graph. Here’s what our test output gives us,

(res <- anova(ols(weight ~ group, data = pg)))
##                 Analysis of Variance          Response: weight
##
##  Factor     d.f. Partial SS MS        F    P
##  group       2    3.76634   1.8831700 4.85 0.0159
##  REGRESSION  2    3.76634   1.8831700 4.85 0.0159
##  ERROR      27   10.49209   0.3885959
obs_p <- res[1, 5]

If we set our alpha to the traditional 0.05 level, we can reject the test hypothesis (the null hypothesis), but that is not as interesting from a continuous evidential perspective. How can I interpret this $$P$$-value of 0.0159 more intuitively?

Let’s convert it into an $$S$$-value.

-log2(obs_p)
## [1] 5.973926

$–\log_2(0.0159) = 5.97$

$S-value= 5.97$

That is 5.97 bits of information against the null hypothesis.

Remember, k is the nearest integer to the calculated value of s and in this case, would be 6. So these results (the test statistic) are as surprising as getting all heads on 6 fair coin tosses. Somewhat surprising, depending on the individual interpreting the results.

How would we interpret it within the context of a given confidence interval? The $$S$$-value tells us that values within the computed 95% CI: have at most 4.3 bits of information against them. That is because all parameter values within a 95% CI have P-values greater than 0.05.

So those parameter values that are inside the 95% interval estimate have less bits of information against them, then values that go further and further away from the center of the 95% interval estimate. The point estimate is the most compatible with the data (meaning it has the least information against it), while those values near the limits have more information against them.

In other words, as values head in the directions outside the interval, there is more refutational information against them, as depicted by the following function from Rafi & Greenland, 2020, which is known as the surprisal function.

The $$S$$-value is not meant to replace the $$P$$-value, and it isn’t superior to the $$P$$-value. It is merely a logarithmic transformation of it that rescales it on an additive scale and tells us how much information is embedded within the test statistic and can be used as evidence against the test hypothesis. It is meant to be a device to help interpret the information one obtains from a calculated $$P$$-value.

I’ve constructed a calculator that converts observed $$P$$-values into $$S$$-values and provides an intuitive way to think about them. For a more detailed discussion of $$S$$-values, see this article, in addition to the references below them.

Acknowledgments: I thank Sander Greenland for his extensive commentary and corrections on several versions of this article. My acknowledgment does not imply endorsement of my views by these colleagues, and I remain solely responsible for the views expressed herein.

# Environment

The analyses were run on:

## R version 4.0.4 (2021-02-15)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur 10.16
##
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
##
## Random number generation:
##  RNG:     L'Ecuyer-CMRG
##  Normal:  Inversion
##  Sample:  Rejection
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base
##
## other attached packages:
##  [1] cachem_1.0.4       ggstatsplot_0.7.0  rms_6.1-1          SparseM_1.81       Hmisc_4.4-2        Formula_1.2-4
##  [7] survival_3.2-7     lattice_0.20-41    TeachingDemos_2.12 ggplot2_3.3.3
##
## loaded via a namespace (and not attached):
##   [1] readxl_1.3.1              pairwiseComparisons_3.1.3 backports_1.2.1           plyr_1.8.6
##   [5] splines_4.0.4             gmp_0.6-2                 kSamples_1.2-9            ipmisc_6.0.0
##   [9] TH.data_1.0-10            digest_0.6.27             SuppDists_1.1-9.5         htmltools_0.5.1.1
##  [13] lmerTest_3.1-3            fansi_0.4.2               magrittr_2.0.1            checkmate_2.0.0
##  [17] memoise_2.0.0             paletteer_1.3.0           cluster_2.1.1             openxlsx_4.2.3
##  [21] credentials_1.3.0         matrixStats_0.58.0        sandwich_3.0-0            askpass_1.1
##  [25] jpeg_0.1-8.1              colorspace_2.0-0          ggrepel_0.9.1             haven_2.3.1
##  [29] xfun_0.21                 dplyr_1.0.4               prismatic_1.0.0           crayon_1.4.1
##  [33] jsonlite_1.7.2            lme4_1.1-26               zeallot_0.1.0             zoo_1.8-8
##  [37] glue_1.4.2                gtable_0.3.0              emmeans_1.5.4             MatrixModels_0.4-1
##  [41] statsExpressions_0.7.1    car_3.0-10                Rmpfr_0.8-2               abind_1.4-5
##  [45] scales_1.1.1              mvtnorm_1.1-1             DBI_1.1.1                 PMCMRplus_1.9.0
##  [49] miniUI_0.1.1.1            Rcpp_1.0.6                xtable_1.8-4              performance_0.7.0
##  [53] htmlTable_2.1.0           foreign_0.8-81            htmlwidgets_1.5.3         RColorBrewer_1.1-2
##  [57] ellipsis_0.3.1            pkgconfig_2.0.3           reshape_0.8.8             farver_2.0.3
##  [61] nnet_7.3-15               multcompView_0.1-8        sass_0.3.1                utf8_1.1.4
##  [65] reshape2_1.4.4            tidyselect_1.1.0          labeling_0.4.2            rlang_0.4.10
##  [69] later_1.1.0.1             ggcorrplot_0.1.3          effectsize_0.4.3          cellranger_1.1.0
##  [73] munsell_0.5.0             tools_4.0.4               generics_0.1.0            evaluate_0.14
##  [77] stringr_1.4.0             fastmap_1.1.0             BWStest_0.2.2             yaml_2.2.1
##  [81] sys_3.4                   rematch2_2.1.2            knitr_1.31                zip_2.1.1
##  [85] purrr_0.3.4               WRS2_1.1-1                pbapply_1.4-3             nlme_3.1-152
##  [89] mime_0.10                 quantreg_5.83             ggExtra_0.9               correlation_0.6.0
##  [93] debugme_1.1.0             compiler_4.0.4            rstudioapi_0.13           curl_4.3
##  [97] png_0.1-7                 ggsignif_0.6.0            statmod_1.4.35            tibble_3.0.6
## [101] afex_0.28-1               bslib_0.2.4               stringi_1.5.3             highr_0.8
## [105] blogdown_1.1              parameters_0.12.0         forcats_0.5.1             Matrix_1.3-2
## [109] nloptr_1.2.2.2            vctrs_0.3.6               pillar_1.5.0              lifecycle_1.0.0
## [113] mc2d_0.1-18               jquerylib_0.1.3           estimability_1.3          data.table_1.13.6
## [117] insight_0.13.1            conquer_1.0.2             httpuv_1.5.5              patchwork_1.1.1
## [121] R6_2.5.0                  latticeExtra_0.6-29       bookdown_0.21             promises_1.2.0.1
## [125] rio_0.5.16                gridExtra_2.3             BayesFactor_0.9.12-4.2    codetools_0.2-18
## [129] polspline_1.1.19          boot_1.3-27               MASS_7.3-53.1             gtools_3.8.2
## [133] assertthat_0.2.1          openssl_1.4.3             withr_2.4.1               multcomp_1.4-16
## [137] hms_1.0.0                 bayestestR_0.8.2          parallel_4.0.4            grid_4.0.4
## [141] rpart_4.1-15              minqa_1.2.4               tidyr_1.1.2               coda_0.19-4
## [145] rmarkdown_2.7             carData_3.0-4             numDeriv_2016.8-1.1       shiny_1.6.0
## [149] base64enc_0.1-3

# References

1. Gigerenzer G. (2018). ‘Statistical Rituals: The Replication Delusion and How We Got There.’ Advances in Methods and Practices in Psychological Science. 1:198–218. doi: 10.1177/2515245918771329.
2. Goodman S. (2008). ‘A Dirty Dozen: Twelve P-Value Misconceptions.’ Seminars in Hematology. 45:135–140. doi: 10.1053/j.seminhematol.2008.04.003.
3. Greenland S, Senn SJ, Rothman KJ, Carlin JB, Poole C, Goodman SN, et al. (2016). ‘Statistical tests, P values, confidence intervals, and power: A guide to misinterpretations.’ European Journal of Epidemiology. 31:337–350. doi: 10.1007/s10654-016-0149-3.
4. Rafi Z, Greenland S. (2020). ‘Semantic and cognitive tools to aid statistical science: Replace confidence and significance by compatibility and surprise.’ BMC Medical Research Methodology. 20:244. doi: 10.1186/s12874-020-01105-9.
5. Greenland S. (2019). ‘Valid P-values behave exactly as they should: Some misleading criticisms of P-values and their resolution with S-values.’ The American Statistician. 73:106–114. doi: 10.1080/00031305.2018.1529625.
6. Greenland S, Mansournia MA, Altman DG. (2016). ‘Sparse data bias: A problem hiding in plain sight.’ BMJ. 352:i1981. doi: 10.1136/bmj.i1981.
7. Greenland S, Rafi Z. (2020). ‘To Aid Scientific Inference, Emphasize Unconditional Descriptions of Statistics.’ arXiv:190908583 [statME]. http://arxiv.org/abs/1909.08583.
8. Moskowitz C. (2012). ‘Faster-than-light neutrinos aren’t.’ Scientific American.
9. Perezgonzalez JD. (2015). ‘P-values as percentiles. Commentary on: Null hypothesis significance tests. A mixup of two different theories: The basis for widespread confusion and numerous misinterpretations”.’ Frontiers in Psychology. 6. doi: 10.3389/fpsyg.2015.00341.
10. Fraser DAS. (2019). ‘The P-value function and statistical inference.’ The American Statistician. 73:135–147. doi: 10.1080/00031305.2018.1556735.
11. Sellke T, Bayarri MJ, Berger JO. (2001). ‘Calibration of $$\rho$$ values for testing precise null hypotheses.’ The American Statistician. 55:62–71. doi: 10.1198/000313001300339950.
12. Greenland S, Rafi Z. (2020). ‘Technical Issues in the Interpretation of S-values and Their Relation to Other Information Measures.’ arXiv:200812991 [statME]. http://arxiv.org/abs/2008.12991.
13. Shafer G, Shen A, Vereshchagin N, Vovk V. (2011). ‘Test Martingales, Bayes Factors and p-Values.’ Statistical Science. 26:84–101. doi: fkcvt5.
14. Schuemie MJ, Hripcsak G, Ryan PB, Madigan D, Suchard MA. (2016). ‘Robust empirical calibration of p-values using observational data.’ Statistics in Medicine. 35:3883–3888. doi: ghqmsb.
15. Gruber S, Tchetgen ET. (2016). ‘Limitations of empirical calibration of p-values using observational data.’ Statistics in Medicine. 35:3869–3882. doi: ghqmtn.
16. Neyman J, Pearson ES. (1933). ‘On the Problem of the Most Efficient Tests of Statistical Hypotheses.’ Philosophical Transactions of the Royal Society of London Series A, Containing Papers of a Mathematical or Physical Character. 231:289–337. doi: 10.1098/rsta.1933.0009.
17. Whitehead J. (1993). ‘The case for frequentism in clinical trials.’ Statistics in Medicine. 12:1405–1413. doi: 10.1002/sim.4780121506.
18. Lehmann EL. (2011). ‘Fisher, Neyman, and the Creation of Classical Statistics.’ Springer New York. doi: 10.1007/978-1-4419-9500-1.
19. Fisher RA. (1935). ‘The Design of Experiments.’ Oxford, England: Oliver & Boyd.
20. Fisher R. (1955). ‘Statistical Methods and Scientific Induction.’ Journal of the Royal Statistical Society Series B (Methodological). 17:69–78. doi: 10.1111/j.2517-6161.1955.tb00180.x.
21. Jeffreys H. (1935). ‘Some Tests of Significance, Treated by the Theory of Probability.’ Mathematical Proceedings of the Cambridge Philosophical Society. 31:203–222. doi: 10.1017/S030500410001330X.
22. Jeffreys H. (1998). ‘The Theory of Probability.’ OUP Oxford.
23. Royall R. (1997). ‘Statistical Evidence: A Likelihood Paradigm.’ CRC Press.
24. Cole SR, Edwards JK, Greenland S. (2020). ‘Surprise!’ American Journal of Epidemiology. doi: gg63md.
25. Shannon CE. (1948). ‘A mathematical theory of communication.’ The Bell System Technical Journal. 27:379–423. doi: 10.1002/j.1538-7305.1948.tb01338.x.

• Cite this blog post


text:
Blog

July 10, 2019: White Dwarf Planet Hunting

OK, hear me out...

White dwarfs (WDs) are the evolutionary end points of over 95% of all stars. Given the ubiquity of small exoplanets orbiting Sun-like stars, which are progenitors of white dwarfs, a lot of us seek to answer the following question: do rocky planets survive stellar death and continue orbiting their host stars into the white dwarf phase of stellar evolution?

There is clear spectroscopic evidence that rocky planetary material survives into the white dwarf (WD) phase of steller evolution. Spectroscopy reveals that nearly half of all WDs show absorption lines due to metal pollution in their atmospheres. Since metals have a finite lifetime in WD atmospheres before sinking out, the presence of metals indicates recent accretion. Careful consideration of the chemical abundances present in WD spectra have revealed that the accreted material must have been rock- and water-rich. Thus it appears that planetary material survives the stellar death into the WD phase -- but is any of it transiting?

The first photometric observations of disintegrating, likely-rocky bodies orbiting a metal-polluted white dwarf were published by Vanderburg et al. (2015). The authors identified several possible planetesimals orbiting WD 1145+017 with orbital periods between 4 and 5 hours. The transit depths measured as large as 40%, and varied from transit to transit. This system demonstrates the great potential of metal-polluted WD planetary systems -- (1) the spectroscopic detection of metal pollution enhances transit search efficiency by looking at only WDs with recent accretion histories; (2) the S/N of individual transit events can be quite high due to the small radii of white dwarfs; (3) the prototypical orbits are just within the tidal disruption radius of rocky bodies, with periods of several hours; and (4) each transit transmits unique information about the rapidly evolving system, which appears to evolve from one orbit to the next.

It's for these reasons that I created a little research group of undergraduate observers at the University of Washington when I was a graduate student. We called ourselves SPAMS: the Search for Planets Around post-Main sequence Stars. I had the privilege to work with some incredibly talented students, including Aislynn Wallach, Doug Branton, Teagan O'Reilly, Brittany Platt, Ada Beale, Andrew Yetter, and Katie Reil. Taken together, we stayed up more than 80 nights to observe WDs using the ARCSAT 0.5 m Telescope at Apache Point Observatory. We published our findings in a Research Note, where we report null detections for four bright, metal-polluted white dwarfs: G226-29, Wolf 1516, Wolf 28 and SDSS J160401.31+083109.0.

I'm hopeful that one day we'll find a transiting object orbiting a metal-polluted white dwarf, and if we do, it'll be worth the trouble. Because think about it this way: we know the interior composition of the Earth pretty well, but we don't know the interior composition of exoplanets without making loads of assumptions. But for an object transiting a metal-polluted WD, we'll have the guts of its sibling planets smeared out across the surface of the white dwarf host, signalling to us the precise abundances of the metals that make up (the siblings of) the rocky planets that we see transiting. I can't wait for that day.

July 9, 2019: Machine Learning Day 2

What's a convolutional neural network?

Yesterday I wrote that I would explain what a convolutional neural net is, and I'm realizing now that it's hard to explain without figures or animations, so maybe it's not suited well to this blog's format. But I'm going to try to explain in words what I've learned this week, in the hopes that it helps me write up the paper that I'm working on.

A neural network can be thought of as a series of neurons, where a neuron is a function which takes inputs from data or other neurons, and sends outputs to yet more neurons. Neurons are grouped into "layers", i.e. there's first the input signal (your data), then that signal passes onto a layer of neurons (functions), which produce outputs that trigger neurons in the next layer, and so on until the output layer, where the resulting vector typically estimates the ~likelihood that your input data belong to a set of labels on which the model was trained.

This is a supervised learning technique, where you pass pre-labeled data into the model, let it filter through the various layers of neurons and produce an output. Then the predicted output is compared against the true labels of the data. Through iteration and backpropagation (which is somewhat magical), you tweak the weights between each neuron until the "losses" decrease, where we can think of losses like chi-squared or other badness-of-fit metrics. Generally as the losses decrease, the accuracy of your model increases -- in other words, the model predicts the true label for each input more often.

A convolutional neural network is one where the function that's operating within some of the neurons is a convolution of the input data with a kernel. This is a smart operation to choose because convolutions will trigger a neuron when the kernel is convolved with a matching signal, no matter where the signal was detected in your data. So when you're hunting for a planet in photometry, for example, you don't really care at what time the transit occurs, you just care that some of the input signal matches the expected signal (a transit).

I'm using a CNN built with keras, a Python module built on top of lower-level ML packages like TensorFlow. Keras makes it as straightforward as possible to go from "I get what a CNN is and I want to implement one in a few lines of Python" to "oh wow it's actually working". In my experience, getting started wasn't so different from getting to know a new module in scikit-learn -- the API is familiar and Pythonic, the docs are thorough, and the code is fast.

Are you intrigued? I found the following tutorials really helpful:

I hope you find these resources as helpful as I did. Happy hacking!

July 8, 2019: Machine Learning Day 1

In which Brett tutors his laptop

I'm starting this week with a new adventure a deep dive into machine learning, by teaching myself: (a) what machine learning really is, (b) coding up a 1D convolutional neural net, and (c) trying to apply the CNN to real Kepler data.

Unsurprisingly, the goal for this project is to hunt for HAT-P-11-like objects in Kepler and TESS photometry, by hunting for starspot occultations within known transiting systems. I've developed a forward model for starspot occultations called fleck which I'm using to generate thousands of simulated transit light curves with Kepler-like noise, labeling each one as "occults spots" or "occults no spots". The resulting catalog of labelled light curves are then used as a training set for my supervised learning technique of choice for this problem, called convolutional neural networks.

When I make it further along in this project, I'll write a post explaining CNNs in more detail, but for now, suffice it to say: it is a machine learning technique that can be used to classify time-series signals quickly. I'm going to use the rest of this short post to reflect on lessons learned in day one of machine learning bootcamp:

1. 95% of my effort is likely to be spent constructing a realistic enough training set for the model to produce useful predictions.
2. I couldn't have made any progress today, or maybe ever, without keras.
3. Having a training set doesn't make it a realistic or useful one.
4. The machine learns only what you teach it.
Lots of people preach ML as the hammer to solve your big data problems, but I'm learning that it takes a lot of work to make your data ML-ready.

July 4, 2019: The unbearable whiteness of noise

Hunting for starspot occultations

It's no secret that I'm enamored with systems like HAT-P-11 and Kepler-17, two bright exoplanet host stars which happen to be covered in starspots. During a transit event when the planet passes in front of the dark starspots, less light goes missing than at times when the planet occults bright regions of the star, creating a positive "bump" in the light curves superimposed on the transit signal. These bumps encode the positions and sizes of starspots.

TESS is going to find a bunch of planets orbiting bright stars, and it's my hope that at least one of those planets orbits a star with abundant starspots. I've been periodically downloading the most recent TOI lists, and combing through the light curves for any transiting exoplanet candidates that have extra noise in their residuals. Most of the transits look like this:

Today I looked through >200 light curves of transiting exoplanet candidates from the TESS TOI list brighter than 12 mag, orbiting cool stars, with transit depths >0.5 mmag. I found some quite active exoplanet host stars judging by the apparent rotational modulation of the star out-of-transit, but didn't find any stars that had residual signals in-transit that could best be explained by spot occultations.

I'm not going to give up on this hunt -- after all, there were only two great spotted stars in the original Kepler field out of thousands of planet hosts. But I am starting to wonder about the occurrence rate of spot occultations. I'm going to spend the rest of the day thinking about statistics and generating simulated transits of ensembles of spotted stars in order to determine how many other HAT-P-11-like systems one might expect to discover with TESS. If you've already thought about this, give me a shout!

July 3, 2019: Whose line is it anyway?

Help needed!

This week I'm working on identifying magnetic activity-sensitive spectral features in HARPS spectra, inspired by the TiO molecular band modeling approach in the previous blog post. If you think about spectra of high temperature molecules, this post is for you!

The idea is that we have a wealth of high resolution, high S/N observations of the Sun recorded by HARPS, which should contain information about the magnetic activity of the Sun. While those HARPS spectra were taken, NASA's Solar Dynamics Observatory (SDO) was collecting continuum imaging of the Sun, which can serve as a sort of "answer key" for how much of the solar surface was covered in sunspots during each HARPS observation.

I've come up with a technique for identifying activity sensitive lines by searching for spectral channels whose flux correlates with the total spot coverage of the Sun, which predicts that the spectral features are activity sensitive at the red dashed lines in the following plot:

Does anyone know how to identify these anonymous lines? In the above figure I've plotted the VALD3 line list for the Sun, which identifies most of the atomic features. I've looked at HITEMP databases for water and CO and haven't found correlations with this little suspicious line list.

The lines occur at:

• 5132.53 Å
• 5132.55 Å
• 5138.0 Å
• 5141.38 Å
• 5157.01 Å
• 5174.19 Å
• 5178.0 Å
If those wavelengths mean anything to you, please let me know!

July 2, 2019: TiO Molecular Band Modeling

The enduring, elusive spectroscopic hunt for TiO molecular bands [paper]

Intro

Michael Gully-Santiago is fond of saying

Starspots emit light!
a backhanded acknowledgement that starspots are generally thought of as dark spots, but their true nature is more complicated. I've spent the better part of two years chasing a consequence of this fact, and the paper was just accepted, so I can finally talk about it!

Starspots change the apparent brightness of stars as a function of time, as thousands of Kepler light curves will show you. But a lesser studied phenomenon is the way that starspots affect the spectra of stars.

There's a great series of papers by O'Neal, Neff and Saar from the late 90's and early 00's on using this chromatic decifit of flux to our advantage. The authors studied several absorption bands of TiO, a molecule which forms at temperatures below about 4000 K, as a tracer of starspot coverage. The idea goes: a G or K star with effective temperatures >4000 K should not have any TiO absorption in their spectra, because they are too hot. However, starspots often have $$\Delta T \sim 500$$ K and therefore can be cool enough to form TiO! The goal in this series of papers was to measure slight flux deficits in the spectra of active G and K stars which are likely to have substantial starspot coverage by focusing on spectral bands of strong TiO absorption.

Lessons Learned

It has been about 20 years since those initial papers were written, so I got the itch to increment the effort with the ARCES echelle spectrograph on the ARC 3.5 m Telescope at Apache Point Observatory. I collected about 80 hours of spectra of G and K stars, and collaborated with Jason Curtis and Charli Sakari on measuring spectroscopic $$T_\text{eff}$$ and $$\log g$$s with SME and MOOG. We found that the spectroscopic temperatures agree really well with the Gaia DR2 Apsis pipeline's two-color (plus parallax) photometric temperatures.

The effort to measure TiO absorption turned out to be really tricky at our resolution $$R\sim31,500$$ and S/N. We found significant starspot coverages consistent with previous studies for around a dozen stars, but we only had convincing "by-eye" detections of TiO absorption in systems with spot coverage $$f_S \sim 0.5$$. This turns out to be a consequence of flux weighting. At 7054 Å, where there's a strong TiO absorption band, suppose the blackbody flux of a spot is equivalent to a $$T_\text{eff} = 4000$$ K source. That spot emits only 56% of the flux of a $$T_\text{eff} = 4500$$ K source, a typical temperature for the photosphere of a K star. Thus if you have a K star that is 10% covered in spots, the total contribution of the spot's spectrum to the total spectrum is only 0.1 * 0.56 = 5%, where the other 95% of the flux is coming from the warmer photospheric component. Hunting for the measly missing 5% contribution to the flux centered on TiO bands is therefore tricky business. The flux-weighting effect kills your chances of measuring solar-like spot coverages in modest S/N spectra, but gives you a chance to measure very large starspot coverages like those of RS CVn stars.

Future work

I'm looking forward to trying this technique out with higher S/N, higher resolution spectra, like those from HIRES and HARPS. It'd be especially valuable if we could find a variation on the technique that worked well in the near-infrared, so that we could use the TiO (or other molecular) band modeling to determine starspot coverage during exoplanet transit spectroscopy observations. I'm working with Steve Saar on writing up a state-of-the-field/post-mortem piece on the molecular band modeling technique, laying out the success and challenges and prospects for the future.

July 1, 2019: New Job

First day of postdoc life

Today was my first official day of work as NCCR PlanetS postdoc at the University of Bern, working with Professors Kevin Heng and Brice-Olivier Demory. I look forward to joining the vibrant community that is thriving here in Bern, and making the most of the amazing collaborators that are stuck with me for the next few years.

I submitted a paper to the arXiv last night that I'm excited to share with you tomorrow. If you like starspots, stellar effective temperatures, and Bayesian spectroscopic analysis, you'll like tomorrow's post!


text:
# Chapter 3 - Solving Inequalities - 3-1 Inequalities and Their Graphs - Practice and Problem-Solving Exercises: 48

4 is greater than q.

#### Work Step by Step

Convert the inequality symbol to words. $4\ \ \ \ \ \ \ \ \ \ \ \underbrace{\gt}\ \ \ \ \ \ \ \ \ \ \ q$ 4$\ \ \$ is greater than$\ \ \$ q

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# Regular functions vs holomorphic functions

Let $$X$$ be an affine smooth variety over the complex numbers, $$X^{an}$$ its associated smooth complex analytic space, and $$\mathcal{O}$$, resp. $$\mathcal{O}^{an}$$ the respective structure sheaves.

Is the natural map

$$\mathcal{O}(X)\to \mathcal{O}^{an}(X^{an})$$

injective?

Denoting by $$f : X^{an}\to X_{Zar}$$ the morphism of sites, this map is given as the composition

$$\Gamma(X_{Zar}, \mathcal{O})\to \Gamma(X^{an},f^{-1}\mathcal{O})\to \Gamma(X^{an},\mathcal{O}^{an})$$ and in this composition we know the last map is injective (see Serre’s GAGA paper, Prop. 10(b)).

Morally, this map should send a regular function on $$X$$ to the holomorphic function it induces on $$X^{an}$$ in an evident way, so I would expect the answer to this question to be trivially yes, but I want to make sure I’m not missing anything.
If we call $$\alpha$$ the map $$\Gamma(X_{Zar}, \mathcal{O})\to \Gamma(X^{an},f^{-1}\mathcal{O})$$, then for any closed point $$x\in X$$, $$\alpha(s)_x = \alpha_x(s_x)$$, where $$s\in \Gamma(X_{Zar}, \mathcal{O})$$, $$\alpha_x$$ is the map induced on stalks, and $$x$$ is also regarded as a point of $$X^{an}$$, since analytification identifies closed points.
It is known that $$\alpha_x$$ is an isomorphism for all $$x$$ (see the discussion before Prop. 10 in loc cit), so this should be it. Am I right?
• By the strong Nullstellensatz, the zero ideal in $\mathcal{O}_X(X)$ equals the intersection of all kernels of all evaluation $\mathbb{C}$-algebra homomorphism, $$\text{ev}_x:\mathcal{O}_X(X)\to \mathbb{C}.$$ Each of these homomorphisms factors through $\mathcal{O}_{X^\text{an}}(X^{\text{an}})$. – Jason Starr 3 hours ago


text:
## Vagrant for Fun and Testing

While Vagrant is marketed as a development environment creator, it can also be great for quick test environments

In my first experimentations for using Vagrant to create a local, standardized development environment, an idea with a larger impact began to form in my mind. Dynamic, testing environment creation.

### Why?

One of the larger problems many engineers can face is having to install and configure older versions of specific software releases they develop in order to reproduct issues, diagnose causes, and devise solutions. Sometimes other teams or departments may also need this functionality to more easily help diagnose and report issues.

The following is how I went about setting up a testing toolset using Vagrant and some bash scripting implementations.

### The Test Bed Setup

Using some dynamic configurations, an engineer can start up a vagrant virtual machine with a specific installation of the proper sub-system versions and software version that they may need.

To begin to create this tool set, I had to devise a set of ways to determine which version of the software is intended to be installed, which pre-requisite software and versions are required, and then any post installation configurations that may be necessary to get the environment up and running quickly for testing to begin.

## Step 1. Determining the Software Version

As most software follows standard Semantic Versioning schemes, a property file or the installer file name is likely to have this inforamation available.

In my case, the version of the software is included in the installer file name, so it was as simple as pulling this information out of the file name using any relevant method. I chose to call an awk command to get this out of the file name:

ls setupLinux* | awk -F '-' '{print $2}' | awk -F '.' '{print$1"."$2}'  ## Step 2. Install Pre-requisites Now that the version of the software is known, gather necessary installation files or other dependencies and begin to install these. For my uses, this required some specific yum package installations and other more trivial or easily scripted installations. However, installing the Oracle Java version and pulling the latest version from their website required some creativity. Below is my implementation to pull the correct RPM file for Linux for the latest version of Java 8 from the Oracle web site using a variety of linux commands: echo -e "VAGRANT_INSTALLER: Installing Java 8..." javaUrl=$(curl "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" | grep "linux-x64.rpm" | grep "jdk" | awk -F ',' '{print $3}' | awk -F '\":\"' '{print$2}' | sed 's/.$//' | awk -F ' ' '{print$1}' | head -1)
curl -v -j -k -L -O -H "Cookie: oraclelicense=accept-securebackup-cookie" "$javaUrl" sudo rpm -ivh jdk-* --force if [$? != "0" ]; then
echo -e \$uncleanExitMessage
exit 1
fi
echo "export JAVA_HOME=/usr/java/latest/" >> ~/.bashrc
echo -e "VAGRANT_INSTALLER: Java installed...\n"

Some pre-requisites are not based on the software version but instead may be preferential or based on a particular configuration option. I have found that the marker file paradigm, similar to how many configurations in Red Hat JBoss are made, to be an easy method to implement to have a bash script pick up if a configuration or optional pre-requisite is required to be installed based on if a particular marker file exists in the main Vagrant directory. For example:

/vagrant/
|
--> setupLinux_1.0.0.rpm
--> mysql.dodeploy
--> oracle.dodeploy

In the above example, I know that I need to install the default pre-requisites for the 1.0.0 release of my software product as well as that it will be using both a MySQL database and an Oracle database and to install and configure one instance of each database platform of the supported verstion for the 1.0.0 release.

This is done in bash via checking if a file exists or not:

#Install MySQL
sudo chmod u+x install_mysql.sh
if [ -f /vagrant/mysql.dodeploy ];then
./install_mysql.sh
fi

#Install Oracle 12c
sudo chmod u+x install_oracle.sh
if [ -f /vagrant/oracle.dodeploy ];then
./install_oracle.sh
fi

## Step 3. Install the Software

After the default and any optional pre-requisites are installed and configured, install the software version you require. Then after that, make any configuration changes required to get this working on the Vagrant VM.

Since this is a controlled, pre-configured environment, the configuration values are most likely to be static or rarely need to be changed. As such, this makes it easier to create pre-configured configuration files or edit files using Linux commands to insert any configurations.

## Step 4. Post-Installation Configurations

If any of your ancillary systems require any configuration based on your software installation, your scripting can now make those configurations.

## Step 5. Launch or Start the Software

At the end, your Vagrant VM should be started and completely configured with either the software and all services up and running for the tester to interact with or possibly ready for the tester to complete a simple initiation script or other method to start up the application for testing.


text:
# Can proper classes also have cardinality?

In some set theories such as ZF+GAC, in which GAC is global axiom of choice, the Von Neumann universe $V$ bijects to $Ord$, the class of ordinals. It suggests us that proper classes may also have cardinality，in the example is $|V|=|Ord|$. In addition, if we are in ZF+GAC+ALS, it seems $|V|$ is the only cardinality which is not a cardinal number. Moreover, it seems some properties such as Cantor–Bernstein–Schroeder theorem also holds for cardinality of proper classes, but I'm not sure if it is well-defined and won't cause any paradox...

• I think math.stackexchange.com/questions/2156812/… is very related to this question but it doesn't show as related. That question is about defining order type of well-ordered proper classes and this one is about defining cardinality of proper classes. – Timothy Jan 8 '18 at 4:22

## 2 Answers

There is absolutely no problem with extending the definition of a cardinal to classes, except that we cannot argue within the universe about cardinals of classes as we do for sets. Every argument of the form "All classes such that ..." would be a meta-argument. Of course, one can use a stronger set theory which allows classes, but that's a slightly different story.

Besides the above point, it is not very difficult to prove that Cantor-Bernstein theorem for classes (i.e. the existence of two injections implies the existence of a bijection). And so we can really ask whether or not there is a class function with such and such properties (injective, bijective, etc.)

It is important to note that just as when removing the axiom of choice it is possible that there are surjections which cannot be reversed, without global choice it is possible to have class-surjections which do not have an inverse injection. So it is important to stick to the definition by injections, because that definition works without any use of choice.

• Well, seems you are right. Besides, can the universe about cardinals of classes be argued within NBG? It seems in that proper classes can be talked easier – Popopo Mar 22 '13 at 7:55
• Well, in NBG you can write something about classes, but not about collection of classes. So you can't talk about the structure of class cardinals the same we can about cardinals in ZF. But NBG does make it somewhat easier to write something like "Every two classes have such and such property". – Asaf Karagila Mar 22 '13 at 8:20

Two sets $A$ and $B$ have the same cardinality if and only if there is a bijective function $f : A \to B$. If we identify the function $f$ with its graph $F = \{ \langle x, y \rangle \in A \times B\, :\, f(x)=y \}$ then we can reformulate this to say that $|A|=|B|$ if and only if there is a set $F$ such that

• $\forall x \forall y \forall y' (\langle x,y \rangle \in F \wedge \langle x, y' \rangle \in F \to y=y')$
• $\forall x \forall y (\langle x,y \rangle \in F \to x \in A \wedge y \in B)$
• $\forall x (x \in A \to \exists! y(\langle x,y \rangle \in F))$
• $\forall y (y \in B \to \exists! x(\langle x,y \rangle \in F))$

The first two of these tell you that $f$ is a well-defined function $A \to B$ (or, rather, that $F$ is the graph of a well-defined function $A \to B$), the third gives you injectivity and the fourth gives you surjectivity.

If $A = \{ x:\phi \}$ and $B = \{ y:\psi \}$ are classes, where $\phi,\psi$ are unary predicates, then $x \in A$ really just means $\phi(x)$ and $y \in B$ really just means $\psi(y)$. So I guess you could translate the above definitions to refer to classes instead of sets. More precisely, say $|A|=|B|$ if and only if there exists a binary predicate $F$ such that

• $\forall x \forall y \forall y' (F(x,y) \wedge F(x,y') \to y=y')$
• $\forall x \forall y (F(x,y) \to \phi(x) \wedge \psi(y))$
• $\forall x (\phi(x) \to \exists! y F(x,y))$
• $\forall y (\psi(y) \to \exists! x F(x,y))$

Notice that this notion of classes 'having the same cardinality' coincides with that of sets when we restrict to the case where $A$ and $B$ really are sets. However, unlike with sets, this is formulated by quantifying over formulae, so we have to work in the metatheory.

Also beware that this is a definition of 'having the same cardinality', not a definition of 'cardinality'; finding a good notion for the latter might be quite difficult.

Disclaimer: There's a chance that I'm going to be told that this is a load of rubbish. And indeed it might be, ZFC does weird things with classes. But it seems like one of the possible 'natural' extensions of the notion of bijection from sets to arbitrary classes.

• No, I don't think this is a load of rubbish. Classes can be seen as unary relations over the set model, so maybe we can talk about it with Higher-order language. In detail, seems we can define it by $$Ep(X,Y) \leftrightarrow \exists F(\forall x \forall y\forall y'( F(x,y) \land F(x,y') \to y=y') \land \forall x \forall y (F(x,y) \to X(x) \wedge Y(y)) \land \forall x (X(x) \to \exists! y (Y(y) \land F(x,y))) \land \forall y (Y(y) \to \exists! x(X(x) \land F(x,y))))$$ – Popopo Mar 22 '13 at 8:22
• In which $X,Y$ are unary predicate variable symbols of type (0), $F$ is a binary predicate variable symbol of type (0,0), and $Ep$ is a binary predicate symbol of type ((0),(0)). – Popopo Mar 22 '13 at 8:23
• Oh, this is only for classes of sets, so it needs to be reconsidered too. – Popopo Mar 22 '13 at 9:08