text:
Start a new discussion

Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Site Tag Cloud

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentRowNumber1.
• CommentAuthorMike Shulman
• CommentTimeOct 28th 2009

I incorporated some of my spiel from the blog into the page type theory.

• CommentRowNumber2.
• CommentAuthorTobyBartels
• CommentTimeOct 28th 2009

I don't like JA's propositions as types page either, but I don't think that we should let it destroy the links in the Lab. He's already written that he expects it to be replaced, so it would be nice if wiki magic makes links automatically work when we do that.

• CommentRowNumber3.
• CommentAuthorJonAwbrey
• CommentTimeOct 28th 2009
Sorry, did I miss some discussion somewhere?
• CommentRowNumber4.
• CommentAuthorTobyBartels
• CommentTimeOct 28th 2009

You probably just missed Mike's removing the link to propositions as types from type theory.

And I shouldn't really say that I ‘don't like’ your page, only that I don't like having it as the page on propositions as types —which I think you anticipated when you wrote ‘if it’s necessary to adjust the title after a while, that’s okay, but this name will do for the time being’ there. So someday I'll at least add some introductory material explaining what I think the propositions as types paradigm is about (or maybe Mike will), and then maybe we'll agree to move your stuff to a subsidiary page. But I'm not trying to start a discussion about that early; I'm just trying to save the link.

• CommentRowNumber5.
• CommentAuthorJonAwbrey
• CommentTimeOct 28th 2009

I'm thinking that propositions as types done right might be just the thing.

I started doing this ambidextrous thing back in the days when I had group theory profs with opposing prefs — later on I was encouraged to see that a small but valiant band of catgorevores like Ernie Manes made of point of applying operators on the right.

So now you know who to blame …

• CommentRowNumber6.
• CommentAuthorMike Shulman
• CommentTimeOct 28th 2009

I don't want type theory to link to "propositions as types" for as long as doing so will take people to Jon's page, or, to be honest, any page with Jon's stuff on it. Especially since type theory has been linked from the ncafe and there has recently been discussion about "propositions as types," and I think Jon's page will do nothing more than confuse people and turn them off to the nlab. The idea of propositions as types is confusing enough already. But I didn't feel competent to guess a better name for Jon's page myself, since it doesn't make any sense to me, so instead I removed the link. Would it have been better to rename that page to, say, "Jon Awbrey's propositions as types" and let him rename it again if he has a better name in mind?

• CommentRowNumber7.
• CommentAuthorDavid_Corfield
• CommentTimeOct 28th 2009
It never ceases to amaze me how nice you guys are. Where many very able thinkers are placing great ideas in their personal webs as they fear they are yet too tentative for nLab, Jon is happy to fill endless nLab pages with his theories that nobody else understands, and which have never been shown to have anything to do with n-categories. It's just squatting.

No doubt I will be accused of wanting to create a self-congratulatory country club.
• CommentRowNumber8.
• CommentAuthorTobyBartels
• CommentTimeOct 28th 2009

Well, Jon just moved his page, so the danger is passed.

• CommentRowNumber9.
• CommentAuthorUrs
• CommentTimeOct 28th 2009
• (edited Oct 28th 2009)

I said this before: if a page makes no sense to sombody who feels like he should be in position to follow it, he should at least leave a brief query box indicating this.

This is in the interest of all parties involved:

• the author of a page wants to be alerted if people who should be able to follow the page, don't. So that it can be improved on if possible.

• the non-expert reader wants to be alerted to material that is regarded as controversial even among the experts. That's only fair.

I mean, that's the point of us putting material here instead of on our private hard-disk. To get the feedback. And critical feedback.

• CommentRowNumber10.
• CommentAuthorTodd_Trimble
• CommentTimeOct 28th 2009

Urs, it's increasingly difficult to believe that Jon Awbrey as author of a page wants to be alerted if people who should be able to follow his page, don't. Regardless, I agree query boxes should be applied where skepticism is warranted. Applied perhaps liberally.

Having Jon Awbrey retitle the page in this way is completely inappropriate and antisocial and against the collaborative spirit of this enterprise, and my patience with him is now right at the breaking point.

• CommentRowNumber11.
• CommentAuthorTobyBartels
• CommentTimeOct 28th 2009
• (edited Oct 28th 2009)

Regarding Urs's two listed reasons above:

• I ignored the first, since I knew that Jon knew that already.
• I should have done it for the second.

Todd wrote:

Having Jon Awbrey retitle the page in this way is completely inappropriate and antisocial

I completely disagree. He wrote all of that, none of it is what Mike or I is likely to want to see on that page, and he even wrote in his first draft that he expected that the name would need to be changed. He changed it now to please us! He was trying to be nice.

Although, it would probably be better if he put all of this stuff on a personal web in the first place, since it is idiosyncratic and doesn't particularly mesh with the idiosyncracies of the rest of us.

• CommentRowNumber12.
• CommentAuthorTodd_Trimble
• CommentTimeOct 28th 2009

Look at the title. It's Jon thumbing his nose at his critics. I find it puerile and antisocial. It just doesn't belong on the nLab IMO.

I agree with you strongly that it would definitely be better relegated to his personal web.

• CommentRowNumber13.
• CommentAuthorTobyBartels
• CommentTimeOct 28th 2009
• (edited Oct 29th 2009)

I think that the title is another of his silly puns, referring to his usage of reverse Polish notation; see the end of the middle line of his comment #5 here.

• CommentRowNumber14.
• CommentAuthorTodd_Trimble
• CommentTimeOct 29th 2009
• (edited Oct 29th 2009)

Maybe. That's a generous interpretation. If that is really the explanation, then at a minimum the explanation belongs right at the top of the page. But at this point, I am in no mood to play games.

• CommentRowNumber15.
• CommentAuthorMike Shulman
• CommentTimeOct 29th 2009

It never ceases to amaze me how nice you guys are.

For me it is more a combination of laziness and cowardice, a desire to avoid unnecessary confrontation. However, I'm getting more fed up and I think I'm now with David and Todd. Whether or not the title is a pun, it is inappropriate. Jon has provided no evidence that his theories are related to the collaborative enterprise the rest of us are engaged in, and so they don't belong on the main nlab web.

Jon, if you were given a private web, would you accept to have all of your pages moved there?

• CommentRowNumber16.
• CommentAuthorDavid_Corfield
• CommentTimeOct 30th 2009
What the hell is going on here! Why does the 'proposition as types' link from type theory point to Jon's page. I thought this had been changed. Has the change been reversed?
• CommentRowNumber17.
• CommentAuthorTobyBartels
• CommentTimeOct 30th 2009

It looks like Jon moved it back. I put some stuff up top to orient the reader, and I think that it would be perfectly reasonable for anybody to move Jon's stuff to another page as I suggested there.

• CommentRowNumber18.
• CommentAuthorDavid_Corfield
• CommentTimeOct 30th 2009
'Move' you mean 'delete' surely!
• CommentRowNumber19.
• CommentAuthorTobyBartels
• CommentTimeOct 30th 2009

Some other movements of these pages were obscured for a while by the cache bug; all should be clear now.

• CommentRowNumber20.
• CommentAuthorUrs
• CommentTimeSep 17th 2013

Maybe somebody can help me with sorting out reference data concerning the following:

I know of this citationn

• Per Martin-Löf, An intuitionistic theory of types: predicative part, In Logic Colloquium (1973), ed. H. E. Rose and J. C. Shepherdson (North-Holland, 1974), 73-118.

and I know of this online available pdf of Martin-Löf of essentially, but not quite, the same title.

I have trouble seeing if the reference data corresponds to that pdf. Can anyone help?

• CommentRowNumber21.
• CommentAuthorUlrik
• CommentTimeSep 17th 2013

The pdf you found looks like an early version, compared to the one available at the doi 10.1016/S0049-237X(08)71945-1 – which at least has a longer introduction (there may be other changes as well). Many passages are word-for-word the same, though.

• CommentRowNumber22.
• CommentAuthorUrs
• CommentTimeSep 17th 2013

Okay, thanks for checking!!

• CommentRowNumber23.
• CommentAuthorUrs
• CommentTimeJan 9th 2015
• (edited Jan 9th 2015)

Some trivia:

Added at type theory a pointer to data type. There I added a pointer to Sale 77, “Primitive Data Types” (and nothing else yet).

That article shows up when one searches for the phrase “A type is a concept”. I happened to wonder which other sources might explicitly introduce types under the name “concept”, “notion” (maybe pre-fixed with “mathematical”).

• CommentRowNumber24.
• CommentAuthorUrs
• CommentTimeFeb 27th 2015

Thomas Holder kindly points out further relevant articles on the pre-history of type theory, have added them to the References there (right at the beginning of the list).

• CommentRowNumber25.
• CommentAuthorDavidRoberts
• CommentTimeFeb 28th 2015

I added a link to an online version of Appendix B ’The doctrine of types’ by Russell

• CommentRowNumber26.
• CommentAuthorMike Shulman
• CommentTimeMar 17th 2016

Responding to a question by email, I added to type theory a remark that when we construct a “term model” by arbitrarily choosing truth values for the undecided statements, we no longer get a model that proves the completeness theorem.

1. fixed a tiny typo: represeting -> representing

anqurvanillapy

2. fixed a tiny typo: dangling right parenthesis after f(x) in B(x)

anqurvanillapy

3. Thanks for these fixes!

• CommentRowNumber30.
• CommentAuthorDavid_Corfield
• CommentTimeNov 10th 2019

Added Mike’s recent paper to the references

• CommentRowNumber31.
• CommentAuthorDavid_Corfield
• CommentTimeNov 10th 2019

Mike has chosen to allow composition along multiple types at once rather than only along one type at a time, corresponding to a prop rather than a polycategory. To the extent that this type theory is aimed at noncartesian monoidal categories and so perhaps of interest in quantum physics, what difference does the prop/polycategory choice represent there?

• CommentRowNumber32.
• CommentAuthorDavid_Corfield
• CommentTimeNov 10th 2019

We should add it to the table at relation between type theory and category theory, but what to call it?

• CommentRowNumber33.
• CommentAuthorMike Shulman
• CommentTimeNov 11th 2019

Despite the temptation to speculate that the funny disjunction $\parr$ has something to do with entanglement, as far as I know there is no known application of polycategories to quantum physics. So this new type theory seems more likely to be applicable therein than standard classical linear logic. But I’d be ecstatic to be proven wrong…

• CommentRowNumber34.
• CommentAuthoratmacen
• CommentTimeNov 11th 2019

I’m reading Mike’s paper and having some fun with the examples, but I don’t actually understand what’s so bad about using MILL for symmetric monoidal categories.

• CommentRowNumber35.
• CommentAuthorMike Shulman
• CommentTimeNov 12th 2019

Re QM and CLL, a bit of googling turns up this and this.

Matt, try writing the examples in MILL and compare them.

• CommentRowNumber36.
• CommentAuthorTodd_Trimble
• CommentTimeNov 12th 2019

I thought MILL stood for a fragment of linear logic involving both $\otimes$ and $\multimap$, or at least I feel certain I’ve seen the phrase/acronym used this way in the past.

• CommentRowNumber37.
• CommentAuthorMike Shulman
• CommentTimeNov 12th 2019

@Todd: yes, that’s what the page linear logic says too. I didn’t realize multiplicative conjunction disagreed; I agree MILL should be $\otimes,\mathbf{1},\multimap$ since those are all the multiplicative and intuitionistic operations.

• CommentRowNumber38.
• CommentAuthoratmacen
• CommentTimeNov 12th 2019

My bad, regarding MILL. I just forgot about $\multimap$.

Some typos:

In the step of tr(fg) = tr(gf) that has two “redexes”, it look like g is applied to the wrong label.

In self-duality of a Frobenius monoid, I think you swapped the components of the definition of eta, based on how you unfold it later.

• CommentRowNumber39.
• CommentAuthoratmacen
• CommentTimeNov 12th 2019
• (edited Nov 12th 2019)

Re #35:

So far I’ve redone the Frobenius monoids section with unit and tensor types. I also did a version of the “centered” Frobenius axiom proof using unit (of the monoid) rather than counit. I see that the destructuring let bindings are verbose. Is there any other problem I’m supposed to be seeing?

• CommentRowNumber40.
• CommentAuthorMike Shulman
• CommentTimeNov 13th 2019

Thanks for the typos, I’m impressed you read it carefully enough to see that! Yes, the verbosity of matching is what this syntax avoids, staying closer to the intuition of types as having “elements” and the elements of a (tensor) product being tuples with “components”.

• CommentRowNumber41.
• CommentAuthoratmacen
• CommentTimeNov 13th 2019

Is the matching syntax not also based on the intuition of elements? It just gives temporary names to the components.

I don’t have a problem with having projections; I have two minor problems with this type system, that I don’t have with linear logic. One is that without let binding, terms tend to grow exponentially. Maybe you already know about this sort of thing. For example, to express this term in your system, given generators f : (X,X) -> X and g : X -> (X,X):

x:X
|-
let (x1,x2) = g(x) in
let (x3,x4) = g(f(x1,x2)) in
let (x5,x6) = g(f(x3,x4)) in
f(x5,x6) : X

This is, in some sense, not serious, since it’s straightforward to fix with simple metalanguage. But then for performance reasons, you really want to typecheck the metalanguage, so you don’t need to do the exponential expansion. It seems pretty typical to leave this sort of performance issue in papers though. So my problem is just that punting performance issues to a metalanguage is unlike programming language design.

The other problem is just that I personally find the typing rules very unfamiliar, and I don’t know how to extend the system with type constructors. (Without totally changing at least the derivations.) (Actually, I bet you broke the world record for most complicated individual typing rule!)

• CommentRowNumber42.
• CommentAuthorMike Shulman
• CommentTimeNov 13th 2019

It sounds like my goals are different from yours. I’m not designing a programming language; I’m designing a syntax for reasoning about monoidal categories. If desired one could certainly add a let-binding syntax, but in all the actual examples I’ve looked at so far it is unnecessary. The fact is that, in my experience, MILL isn’t used much in practice by people actually working with monoidal categories, as compared to say string diagrams, and I think it’s at least worth exploring whether a different kind of type theory would be more useful. If we never try things that seem unfamiliar at first, we’ll stay stuck in a rut forever.

• CommentRowNumber43.
• CommentAuthoratmacen
• CommentTimeNov 13th 2019
I don’t currently have goals involving linear logic. My problems were about implementing (for a proof assistant) and extending your system, respectively. I guess I don’t understand your goals.
• CommentRowNumber44.
• CommentAuthorMike Shulman
• CommentTimeNov 14th 2019

If you’re interested in implementing it, adding let-bindings, or adding more type constructors, I think that would be awesome! I can certainly see that the distinctive features of this system make all of those things more difficult, or at least more interesting, than in many existing type theories. But those distinctive features are the whole point, so if you get rid of them then you wouldn’t be implementing or extending this system.

• CommentRowNumber45.
• CommentAuthoratmacen
• CommentTimeNov 15th 2019

I can certainly see that the distinctive features of this system make all of those things more difficult… But those distinctive features are the whole point,

What exactly is the point?

As long as you get projections, do you actually care if it’s based on props or polycategories? Like, what if the projections worked on elements of tensors instead?

How attached are you to unique derivtions for the projections rather than translating to a matching representation, which would be the subject of derivations? Relatedly, are you OK with needing equations to commute nested matches?

Probably the weirdest thing about your system is that you need to compare terms to do type checking, although there’s no type dependency on terms. This really seems like something to avoid. What if all function calls are labeled, and the arguments are only on one of the appearances? This would also avoid the exponential blowup.

Would fixing anything I don’t like defeat the point for you? This sounds like complaining but it’s not. Serious questions here.

• CommentRowNumber46.
• CommentAuthoratmacen
• CommentTimeNov 15th 2019

Also, in the introduction, you have a problem with “covariables”. I haven’t read any of those papers. How similar are C#’s out parameters to this idea of covariable? (And what if out parameters were single-assignment?)

So you say the problem with covariables is essentially that set theory doesn’t have them. But programming languages do (maybe/potentially). Type theory is not all a set theory imitation club, ya know.

• CommentRowNumber47.
• CommentAuthorMike Shulman
• CommentTimeNov 15th 2019

If you’d like to write up a specific alternative theory, then we could write out some examples in it and compare. It’s hard for me to tell what the theories you’re envisioning would look like.

• CommentRowNumber48.
• CommentAuthorMike Shulman
• CommentTimeNov 15th 2019

Also, can’t type theory be a big tent? If you want to use a type theory with covariables and matches, but I don’t, can’t we both respect each other’s preferences, and even see that each choice has its own objective advantages and disadvantages? I tried to make that point relating to string diagrams in the paper, but maybe I should explicitly say the same thing about other type theories too.

• CommentRowNumber49.
• CommentAuthoratmacen
• CommentTimeNov 15th 2019

Re #47: I would rather write down examples first, if they aren’t clear, before I bother to work out rules. #45 was actually multiple different proposals, and I’m asking which you like. I guess I should expand on #45.

Re #48: I’m trying to find out if the advantage(s) you see with your new system can be retained while removing some of the aspects I see as disadvantages. Of course the tent gets bigger whenever people can’t agree. But then newcomers face a tougher decision.

(For reference, to me, any disagreement about how to use type theory for monoidal categories is much less concerning than disagreement about intensional vs extensional dependent type theory. (That is, whether the judgmental equality is extensional.))

Anyway, what about out parameters?

• CommentRowNumber50.
• CommentAuthoratmacen
• CommentTimeNov 16th 2019

First of all, notice that instead of $(M1,M2\,|\,N1,N2)$, you could write N1; N2; (M1,M2). The semicolon forms could be considered alternative formatting for your result tuple. But it can also be considered the unit elimination form.

Re #45:

As long as you get projections, do you actually care if it’s based on props or polycategories? Like, what if the projections worked on elements of tensors instead?

This is about whether to consider the (M1,M2) returned as a special result tuple, or the introduction form of tensor. I propose allowing (M1,M2,M3) as sugar for ((M1,M2),M3), because we will consistently treat tensor as left associative. (Or, of course, we could consistently treat it as right associative.)

Instead of $M_{(1)}$ and $M_{(2)}$, I will write the more keyboard-friendly M.1 and M.2. These are a permitted form (possibly in addition to matching) of elimination for tensor. Of course, if you use M.1, you have to use M.2, and you cannot otherwise use M.

For conceptual symmetry with the sugar (M1,M2,M3), if M has type $A1 \otimes A2 \otimes A3$ ($\equiv (A1 \otimes A2) \otimes A3$), then M.1 is sugar for M.1.1, M.2 for M.1.2, and M.3 for M.2.

Of course, I’m not proposing that the sugar for left nested tensors actually be limited to two levels. I’m just showing the representative example.

Note that this use of projections renders your implicit use of comultiplication ambiguous.

…translating to a matching representation, which would be the subject of derivations? Relatedly, are you OK with needing equations to commute nested matches?

The idea here is that projections are sugar entirely. So

p:A * B |- (p.2,p.1) : B * A

would get desugared to

p:A * B |- let (p1,p2) = p in (p2,p1) : B * A

. Consequently, there would be extra terms that don’t have sugared forms, but are equal to sugared forms by commuting matches. Like in the cyclicity proof:

eps(eta{u}.2,f(g(eta{u}.1)))
=
let (u1,u2) = eta{u} in
eps(eta{v}.2,g(u1));
eps(u2,f(eta{v}.1))
=
eps(eta{u}.2,f(eta{v}.1));
eps(eta{v}.2,g(eta{u}.1))
=
let (v1,v2) = eta{v} in
eps(eta{u}.2,f(v1));
eps(v2,g(eta{u}.1))
=
eps(eta{v}.2,g(f(eta{v}.1)))

You know? I don’t think I like that idea anymore.

…you need to compare terms to do type checking, although there’s no type dependency on terms. This really seems like something to avoid. What if all function calls are labeled, and the arguments are only on one of the appearances?

This would keep projections primitive, but change the rules to avoid repeating argument tuples. The statement of the Frobenius axiom (with center) would be:

x:M,y:M |-
(cp{u}(x).1,cp{u}.2 * y) =
(cp{v}(x * y).1,cp{v}.2) =
(x * cp{w}(y).1,cp{w}.2) : M * M

It seems relatively easy to add sugar allowing a “default” label, so that none of the labels would be needed in that example. So just (cp(x * y).1,cp.2).

Alternatively, we could think of labels more like variables and say ((v=cp(x * y)).1,v.2).

• CommentRowNumber51.
• CommentAuthorMike Shulman
• CommentTimeNov 17th 2019

Did you read my discussion of tensor product types with projections on p11? It looks like your first suggestion is just syntactic sugar for that. I’m not sure exactly what it buys you to write f(M).1 and f(M).2 instead of $f_{(1)}(M)$ and $f_{(2)}(M)$. (This has nothing to do with polycategories, as far as I can see.)

With your permission, I’ll ignore the idea that you don’t like any more either.

• CommentRowNumber52.
• CommentAuthorMike Shulman
• CommentTimeNov 17th 2019

Oh, and yes of course I could write N1; N2; (M1,M2), but I don’t want to, because part of the problem of many other syntaxes for linear logic that I’ve seen is that they “sequentialize” things that should really be regarded as simultaneous. If you’re thinking of in terms of “unit elimination” then N1; N2; (M1,M2) sounds like “first eliminate N1, then N2, then do (M1,M2)” which requires a commuting conversion to identify with “first eliminate N2, then N1, then do (M1,M2)”, whereas simply permuting the scalar terms is a directly definable and intuitive equivalence relation.

• CommentRowNumber53.
• CommentAuthoratmacen
• CommentTimeNov 17th 2019

Re #51:

Did you read… It looks like your first suggestion is just syntactic sugar for that.

Yes. They are different. Never mind polycategories for now, since everything in #50 works in multicategories.

Morphisms have a single output; you can’t literally project a function call in the proposals of #50. f(M).1 projects from f(M), which should have a type formed with $\otimes$. You might want to write it as $f(M)_{(1)}$. The point is that this convention is very similar to what you do, but doesn’t need props. In particular, it can conceivably be made compatible with polycategory-based features.

$f_{(1)}(M)$ seems very misleading for this. OTOH mathematicians are apparently quirky enough to write $sin^2(x)$ for $(sin(x))^2$. :)

Granted!

Re #52:

It doesn’t have to be a semicolon, if that seems misleading.

Are commuting conversions a big problem? I admit I don’t know much about them. Random point: I think ((N1; M1),(N2; M2)) would be allowed too, in my proposals, and that commuting conversions handle that too. It might seem like excessive notational flexibility, and maybe it is.

• CommentRowNumber54.
• CommentAuthoratmacen
• CommentTimeNov 17th 2019
• (edited Nov 17th 2019)

Re #51:

Frobenius axiom with center:

$x:M,y:M \vdash (\Delta^{u}(x)_{(1)},\Delta^{u}_{(2)} y) = (\Delta^{v}(x y)_{(1)},\Delta^{v}_{(2)}) = (x \Delta^{w}(y)_{(1)},\Delta^{w}_{(2)})\;:\;M \otimes M$

Using “default” label:

$x:M,y:M \vdash (\Delta(x)_{(1)},\Delta_{(2)} y) = (\Delta(x y)_{(1)},\Delta_{(2)}) = (x \Delta(y)_{(1)},\Delta_{(2)})\;:\;M \otimes M$

Variable-like labels:

$x:M,y:M \vdash ((u \coloneqq \Delta(x))_{(1)},u_{(2)} y) = ((v \coloneqq \Delta(x y))_{(1)},v_{(2)}) = (x (w \coloneqq \Delta(y))_{(1)},w_{(2)})\;:\;M \otimes M$

Hrm, TeX changes things, huh? The variable-like labels looked really good in fixed-width ASCII.

• CommentRowNumber55.
• CommentAuthorMike Shulman
• CommentTimeNov 17th 2019

Of course nothing in my type theory needs props either; it could be done with symmetric monoidal categories directly, just as ordinary cartesian type theory can be (and often is) done with finite-product categories rather than cartesian multicategories. The props are just a technical convenience, a semantic notion that’s closer to the syntax and provides a bridge between it and the “real” semantics in symmetric monoidal categories. I’m not sure why you want to write $f(M)_{(1)}$ instead of $f_{(1)}(M)$ or $\pi_{(1)}(f(M))$, and I’m still failing to see how this proposal differs substantively from mine at the level of syntax.

I don’t like commuting conversions, and I think they’re somewhat icky type-theoretically too, but I’m probably not the best person to explain why. Ask another type theorist. (-:

And I have to say I find all the options in #54 to be pretty ugly and unintuitive compared to my $(x_{(1)}, x_{(2)}y) = ((x y)_{(1)},(x y)_{(2)}) = (x y_{(1)},y_{(2)})$. (And the fixed-width ASCII was even uglier.)

• CommentRowNumber56.
• CommentAuthoratmacen
• CommentTimeNov 18th 2019

I was using “prop”, “multicategory”, and “polycateogry” as names for the judgment structure, not the semantics. My proposals deliberately did not add any truly new semantics.

Yeah the implicit comultiplication really helps with a lot of your examples.

I guess I’m not successfully communicating my concerns. Perhaps they’re unfounded.

Your paper mentioned an $Int$ embedding of traced monoidal categories into compact closed categories. Is there an embedding of symmetric closed monoidal categories into compact closed categories? Maybe it somehow turns out your system doesn’t need extensions. Otherwise adding $\multimap$ seems like a good test.

• CommentRowNumber57.
• CommentAuthoratmacen
• CommentTimeNov 18th 2019

I was using “prop”, “multicategory”, and “polycateogry” as names for the judgment structure,

In other words, I have in mind a type system where either there’s only one consequent or multiple consequents are disjunctive.

• CommentRowNumber58.
• CommentAuthoratmacen
• CommentTimeNov 18th 2019

OK here’s a thought:

What if $x y = y x$? Then you might expect $((x y)_{(1)},(y x)_{(2)})$ to be well-typed. But it’s not, according to your rules. So in particular, you can’t use $((x y)_{(1)},(x y)_{(2)}) = ((x y)_{(1)},(y x)_{(2)})$ because it’s nonsense. I know this is not a real problem, but it seems unintuitive.

Do you know any way of avoiding the syntactic equality constraints that you’d accept?

• CommentRowNumber59.
• CommentAuthorMike Shulman
• CommentTimeNov 18th 2019

If what you want is to write $x:A, y:B \vdash (f(x,y)_{(1)},f(x,y)_{(2)}) : C\otimes D$ instead of $x:A, y:B \vdash (f_{(1)}(x,y),f_{(2)}(x,y)) : (C,D)$, with an $\otimes$ on the right instead of a comma and a variation in syntax, then I don’t really see the point, and it seems offhand as though it would be harder to set up the rules formally. But maybe not; if you want to give it a try I’d be happy to see what you come up with.

Any full monoidal subcategory of a compact closed category is traced, and not every closed symmetric monoidal category is traced, so not every closed symmetric monoidal category can be monoidally embedded in a compact closed one (related). I did think a bit about adding $\multimap$, but it’s tricky. If you can think of a good way to make that easier while not sacrificing the advantages of the current system, I’d love to hear it!

I wouldn’t expect $((x y)_{(1)},(y x)_{(2)})$ to be well-typed; if you duplicate $x y$ you’ll get $(x y)_{(1)}$ and $(x y)_{(2)}$, and if you then substitute along the equality $x y = y x$ you have to do it everywhere, getting $(y x)_{(1)}$ and $(y x)_{(2)}$. You just have to think of the entire list of terms as a unit.

• CommentRowNumber60.
• CommentAuthoratmacen
• CommentTimeNov 18th 2019

If what you want is to write… then I don’t really see the point,

Well, the point is that I expect it to tolerate extensions better…

I did think a bit about adding $\multimap$, but it’s tricky.

…Like that one. Of course I don’t know yet. It just seems kind of like you lucked out because generators are the only non-base-case term former. With your rules, you derive mutiple terms at once, in some sense. So I figure you get an all-base-cases rule, and an everything-else rule. When you add connectives, I figure the complexity will get crazy without some reorganization.

$\multimap$ seems particularly tricky, assuming the intro form is a binder, but the switch to $A \otimes B$ instead of your $(A,B)$ judgment structure is based on my tentative conclusion that the mileage you get out of props doesn’t scale.

so not every closed symmetric monoidal category can be monoidally embedded in a compact closed one

Cool. How resourceful of you to already know that! Maybe you already knew: I asked because I guess such an embedding would let you handle $\multimap$ without adding it as primitive, like you did for traces.

If you can think of a good way to make that easier while not sacrificing the advantages of the current system, I’d love to hear it!

That’s why I’m asking what you think are the important advantages. I’m still trying to find out if you’ll let go of repeated argument tuples. From a type checking perspective, those equality constraints seem really silly. I don’t think they’re a source of deep difficulty, but they shouldn’t be there at all. They make the terms larger (asymptotically, at least, even if your use cases are OK) and give the type checker a lot of extra work.

I’m probably going to think about rules, but I’d really rather think about labels than argument tuples.

if you then substitute along the equality $x y = y x$ you have to do it everywhere,

I understand. But in the cartesian case, that isn’t so. That includes set theory, so this is not in accordance with the set theoretic intuition. My thought was that the intuitive mismatch is minimized by forbidding this repetition. (So substituting everywhere means substituting in one place.)

• CommentRowNumber61.
• CommentAuthorMike Shulman
• CommentTimeNov 18th 2019

If by “let go of repeated argument tuples” you mean moving to a syntax like those in #54, then no, I don’t want to do that. I don’t think it would be a good idea to allow writing $((x y)_{(1)},(y x)_{(2)})$, because it’d be hard to figure out (even for a human reader) which terms “match”. I guess your point is that you don’t want to have to write $x y$ twice at all, but to me it’s an important aspect of the syntax that it’s the same thing $x y$ that’s appearing (“duplicated”) in both places.

• CommentRowNumber62.
• CommentAuthorMike Shulman
• CommentTimeNov 18th 2019
• (edited Nov 18th 2019)

From a type checking perspective, those equality constraints seem really silly. I don’t think they’re a source of deep difficulty, but they shouldn’t be there at all. They make the terms larger (asymptotically, at least, even if your use cases are OK) and give the type checker a lot of extra work.

To me this betrays a fundamental misunderstanding. The goal of a type theory is not to make things easier for the type checker! The goal of a type theory is to make things easier for the human!

I can agree that there are probably cases where a human would appreciate having a match/let syntax as an option. In principle I wouldn’t object to using a theory with only match/let as an intermediate language and compiling the nice syntax down to it (maybe this is the idea that got discarded in #50?) — although that seems like it would only matter when implementing it in a proof assistant, since mathematically the process of compiling the nice syntax down to the intermediate language would, I expect, already be doing the same work as interpreting it directly into the desired semantics (you’d essentially be interpreting it into the syntactic monoidal category generated by MILL).

• CommentRowNumber63.
• CommentAuthorMike Shulman
• CommentTimeNov 18th 2019

I guess one way to handle $\multimap$ would be to just apply the ordinary MILL rule for abstractions when the codomain is unary, and rely on $\otimes$ to tuple up non-unary codomains if necessary.

• CommentRowNumber64.
• CommentAuthoratmacen
• CommentTimeNov 19th 2019

Re #61: Oh all right. I wasn’t proposing to support $((x y)_{(1)},(y x)_{(2)})$, by the way.

Re #62: If the terms are larger, that gives the human and the type checker extra work. But I can see that you want to keep it as an option.

(maybe this is the idea that got discarded in #50?)

The discarded idea allowed the user to use either matching or projections. The translation between them did not seem intuitive enough to expose to the user.

Re #63: Are you saying you were thinking of having $\multimap$ types with multiple codomains?

• CommentRowNumber65.
• CommentAuthorMike Shulman
• CommentTimeNov 19th 2019

Are you saying you were thinking of having $\multimap$ types with multiple codomains?

No, that’s not what I was saying, but that’s another option one might consider.

• CommentRowNumber66.
• CommentAuthoratmacen
• CommentTimeNov 19th 2019
Well then I don’t know what #63 is saying.
• CommentRowNumber67.
• CommentAuthorMike Shulman
• CommentTimeNov 19th 2019

I just mean have a rule

$\frac{\Gamma, x:A \vdash (M) : (B)}{\Gamma \vdash (\lambda x.M) : (A\multimap B)}$

that only applies when the codomain is unary.

• CommentRowNumber68.
• CommentAuthoratmacen
• CommentTimeNov 20th 2019
But doesn’t that mess up tensoring?
• CommentRowNumber69.
• CommentAuthorMike Shulman
• CommentTimeNov 20th 2019

How so?

• CommentRowNumber70.
• CommentAuthoratmacen
• CommentTimeNov 20th 2019
Well how would you derive a pair of lambdas?
• CommentRowNumber71.
• CommentAuthorMike Shulman
• CommentTimeNov 20th 2019

Hmmm… I suppose you would want to do that. Well, I guess you could try to incorporate it in the generator rule somehow… but probably that rule is about as overextended as possible already and the best thing to do would be to retreat from terms-have-unique derivations. Maybe it would work…

• CommentRowNumber72.
• CommentAuthoratmacen
• CommentTimeNov 21st 2019

I think unique derivations could be regained with a different style of rules motivated by type checking. That’s what I’m planning. There’s a nice way to do linear type checking by passing a state that keeps track of which variables were used. I think it can be modified to handle tensor projections too.

• CommentRowNumber73.
• CommentAuthorMike Shulman
• CommentTimeNov 30th 2019

I just read Hasegawa’s thesis, in which among other things he gives a multiple-conclusion type theory where both commas represent the same tensor product. (Actually he writes the right-hand commas as $\otimes$, but he considers them to be definitionally associative, so they act like a comma.) His setup allows contraction and weakening, but not naturally: semantically it’s like a linear/nonlinear adjunction but without the right adjoint. He also has a sort of multiple-domain multiple-codomain internal-hom too, although it’s somewhat different because it always lands in the nonlinear world.

• CommentRowNumber74.
• CommentAuthoratmacen
• CommentTimeDec 1st 2019

It doesn’t have tensor projections, like your system does. The non-natural contraction seems different from implicit comultiplication because the copies aren’t distinguished. So I guess there’s not really much to learn for extending your system?

I suppose it’s a thought to have completely implicit, non-natural weakening, instead of your counit notation. Does that really work? What do you think of that style? Oh wait, that seems ambiguous with your sugar for multiple comultiplications. Or maybe not, because of the counital and coassiciative axioms!

I got distracted from extending your system. I tried looking up a ready-made solution but didn’t find it. I think I could sit down and work out something probably right, but I haven’t. I’m not that excited about it; I can’t tell if you are.

• CommentRowNumber75.
• CommentAuthorMike Shulman
• CommentTimeDec 1st 2019

I think that semantically, having unnatural contraction and weakening is equivalent to saying that every type is equipped with a specified cocommutative comultiplication. So there’s some overlap in the intended semantics, but my system is more flexible because it doesn’t require any or all types to have comultiplications, let alone cocommutative ones.

I can’t imagine how implicit weakening could be unnatural. How do you distinguish implicitly between weakening a variable $x$ and weakening the value $f(x)$?

I’d be rather interested if you can think of a good way to add internal-homs to my system, but I’m not planning to spend any time on such an extension myself. (I am, however, planning to run a group at the ACT 2020 summer school aiming to extend this system to monoidal bicategories.)

• CommentRowNumber76.
• CommentAuthoratmacen
• CommentTimeDec 2nd 2019

How do you distinguish implicitly between weakening a variable $x$ and weakening the value $f(x)$?

Good point. I guess by not implicitly doing anything else, like call $f$. So you’d still need explicit counit.

In other words $x:C \vdash () = (| \epsilon(x)) \neq (| \epsilon(f(x)))\;:\;()$.

• CommentRowNumber77.
• CommentAuthorMike Shulman
• CommentTimeDec 2nd 2019

Then that’s not stable under substitution.

• CommentRowNumber78.
• CommentAuthoratmacen
• CommentTimeDec 2nd 2019
I see.
• CommentRowNumber79.
• CommentAuthoratmacen
• CommentTimeDec 4th 2019

To handle lollipop (internal-hom), do you want unidirectional inference with annotations on lambdas, or bidirectional typing with an optional annotation/cut rule. Do you want to require eta-long terms?

• CommentRowNumber80.
• CommentAuthorMike Shulman
• CommentTimeDec 5th 2019

Well, in principle both would be nice to have – one for simplicity of exposition, the other for convenience of practical use. I would say start with whichever is easier for you.

• CommentRowNumber81.
• CommentAuthoratmacen
• CommentTimeDec 5th 2019

For your entertainment, I’ll tell you about a tricky situation I ran into involving your tensor projections and generators, combined with $\&$-intro.

For both examples,

$x:A \qquad f:A \to (B_1,B_2)$

Example 1:

$g_1:B_1 \to C \qquad g_2:B_1 \to D \qquad h:B_2 \to E$

$([g_1(f_{(1)}(x)),g_2(f_{(1)}(x))],h(f_{(2)}(x)))\;:\;(C \& D) \otimes E$

Example 2:

$g:(B_1,B_2) \to C \qquad h:A \to D$

$[g(f_{(1)}(x),f_{(2)}(x)),h(x)]\;:\;C \& D$

The problem is whether you use the generator rule on $f$ inside or outside the $\&$-intro. In example 1, you have to use it outside; in example 2, you have to use it inside the left component. But processing both examples left to right, the $f$ is first encountered in the left component, because the $\otimes$-elim is implicit.

I’m not sure if I’m going to handle this.

I guess there’s basically the same problem with $\oplus$-elim.

• CommentRowNumber82.
• CommentAuthoratmacen
• CommentTimeDec 5th 2019

Actually, I’m not sure about the semantics of a similar example, where the generator can be inside or outside the pair:

$g_1:(B_1,B_2) \to C \qquad g_2:(B_1,B_2) \to D$

$[g_1(f_{(1)}(x),f_{(2)}(x)),g_2(f_{(1)}(x),f_{(2)}(x))]\;:\;C \& D$

Dispensing with tensor projections, this could be written in two ways:

$let\;(b_1,b_2) = f(x)\;in\;[g_1(b_1,b_2),g_2(b_1,b_2)]$

$[let\;(b_1,b_2) = f(x)\;in g_1(b_1,b_2),let\;(b_1,b_2) = f(x)\;in g_2(b_1,b_2)]$

Are these actually equal? Maybe sometimes implicit $\otimes$-elim is just plain wrong, not tricky.

• CommentRowNumber83.
• CommentAuthorMike Shulman
• CommentTimeDec 5th 2019

Maybe I’m misunderstanding your notation, but doesn’t that equality simply follow from the naturality of the universal property of the cartesian product?

• CommentRowNumber84.
• CommentAuthoratmacen
• CommentTimeDec 6th 2019

Probably? If I knew I wouldn’t have to ask. This is $[g_1,g_2] \circ f$ versus $[g_1 \circ f,g_2 \circ f]$. Where brackets are pairing for $\&$, $f:A \to B_1 \otimes B_2$, yada yada. I know they’re the same in a cartesian category where $\otimes = \& = \times$, but I don’t know why, in categorical terms.

So you’re saying they should be equal. OK.

• CommentRowNumber85.
• CommentAuthorMike Shulman
• CommentTimeDec 6th 2019

By definition, $[g_1\circ f, g_2\circ f]$ is the unique morphism that produces $g_1\circ f$ and $g_2\circ f$ when composed with the two projections $\pi_1$ and $\pi_2$ respectively. But $[g_1,g_2]\circ f$ also has this property, since $[g_1,g_2]$ produces (by definition) $g_1$ and $g_2$ when composed with $\pi_1$ and $\pi_2$ respectively, and composition is associative. Therefore, they are equal.

• CommentRowNumber86.
• CommentAuthoratmacen
• CommentTimeDec 6th 2019

I see it clearly now. I was guessing they were equal, I just wasn’t sure. You see? This is why I don’t like category theory much. I’m bad at it. :)

I’m going to put off the additive connectives at first. I have a plan, but the bookkeeping is more complicated, so I should work out the details of MILL first.

• CommentRowNumber87.
• CommentAuthorMike Shulman
• CommentTimeDec 6th 2019

As I always say to my calculus students, the more you practice it, the better you’ll get at it, and the more you’ll like it.

• CommentRowNumber88.
• CommentAuthoratmacen
• CommentTimeDec 8th 2019

Odd: if $C$ is a comonoid, in the context $x:C$, you’d allow $(x_{(1)},x_{(2)})$ and $(x_{(1)},x_{(2)},x_{(3)})$ but not $(x_{(1)},x_{(3)})$, right? Makes type checking yet more complicated. I’m not going to handle that.

• CommentRowNumber89.
• CommentAuthorMike Shulman
• CommentTimeDec 9th 2019

Yes, but the latter is just sugar for $(x_{(1)(1)},x_{(1)(2)},x_{(2)})$ or $(x_{(1)},x_{(2)(1)},x_{(2)(2)})$, and I also didn’t try to make that desugaring precise.

• CommentRowNumber90.
• CommentAuthoratmacen
• CommentTimeDec 9th 2019

Right. I was thinking about whether it’d be convenient to make it not sugar. Not convenient enough for me.

The $(x_{(1)},x_{(3)})$ could be sugar for (the same thing as) $(x_{(1)},x_{(3)} | \epsilon(x_{(2)}))$. Sugar doesn’t need to have good metatheoretical properties.

• CommentRowNumber91.
• CommentAuthoratmacen
• CommentTimeDec 11th 2019

Good news: I finished a drafty set of rules for $\otimes$, $1$, and $\multimap$ with tensor projections. Don’t set your hopes too high; it’s kind of a mess. Now I just have to figure out how to typeset this on a new page…

• CommentRowNumber92.
• CommentAuthoratmacen
• CommentTimeDec 12th 2019

OK, I put it up at tensor projection. Please take a look and tell me what you think.

• CommentRowNumber93.
• CommentAuthorUrs
• CommentTimeMay 12th 2021


text:
cancel
Showing results for
Did you mean:

Solution 601/106

Builder

Hello,

I am struggling  with the following problem:

I am trying to model, using sol 601/106 the flattening of a pipe (see the attached file pipe.jpg ). The problem is that although I am increassing the time interval of the applied displacement, I always get practically the same results (see file pipe2.jpg). It is like NX stops in the same place. I also mention that I do not receive any message about errors!

Many thnaks

IL

Re: Solution 601/106

Phenom

This operation works somewhat differently between SOL106 and 601, but two simple checks...

1).  I assume you have set your displacement scale for postprocessing to "actual" rather than the automatic scale based on model size.

2) SOL601 requires specific control of loads, so you should have a Time Function (value vs time) to control your displacement.  Typically this would be a straight line ramp for what you are doing.  The ramp function must extend to the full amount of time that you wish to analyse, and you must make sure your force load "calls up" (= is attached to) the ramp time function.

You appear to be using NX, not Femap, so the specifcs of making sure you are properly connecting the load to the time function needs to be asked elsewhere.

format: plain


text:
## Thinks

If you have been using Microsoft SharePoint technologies for a while, you are wise to the ways of the magical “12 hive” a.k.a. “12 folder” a.k.a. “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”. With some magic of the registry, you can now add a right click and be right at the path you so desire.


text:
Gyration tensor

(Redirected from Relative shape anisotropy)

In physics, the gyration tensor is a tensor that describes the second moments of position of a collection of particles

${\displaystyle S_{mn}\ {\stackrel {\mathrm {def} }{=}}\ {\frac {1}{N}}\sum _{i=1}^{N}r_{m}^{(i)}r_{n}^{(i)}}$

where ${\displaystyle r_{m}^{(i)}}$ is the ${\displaystyle \mathrm {m^{th}} }$ Cartesian coordinate of the position vector ${\displaystyle \mathbf {r} ^{(i)}}$ of the ${\displaystyle \mathrm {i^{th}} }$ particle. The origin of the coordinate system has been chosen such that

${\displaystyle \sum _{i=1}^{N}\mathbf {r} ^{(i)}=0}$

i.e. in the system of the center of mass ${\displaystyle r_{CM}}$. Where

${\displaystyle r_{CM}={\frac {1}{N}}\sum _{i=1}^{N}\mathbf {r} ^{(i)}}$

Another definition, which is mathematically identical but gives an alternative calculation method, is:

${\displaystyle S_{mn}\ {\stackrel {\mathrm {def} }{=}}\ {\frac {1}{2N^{2}}}\sum _{i=1}^{N}\sum _{j=1}^{N}(r_{m}^{(i)}-r_{m}^{(j)})(r_{n}^{(i)}-r_{n}^{(j)})}$

Therefore, the x-y component of the gyration tensor for particles in Cartesian coordinates would be:

${\displaystyle S_{xy}={\frac {1}{2N^{2}}}\sum _{i=1}^{N}\sum _{j=1}^{N}(x_{i}-x_{j})(y_{i}-y_{j})}$

In the continuum limit,

${\displaystyle S_{mn}\ {\stackrel {\mathrm {def} }{=}}\ {\dfrac {\int d\mathbf {r} \ \rho (\mathbf {r} )\ r_{m}r_{n}}{\int d\mathbf {r} \ \rho (\mathbf {r} )}}}$

where ${\displaystyle \rho (\mathbf {r} )}$ represents the number density of particles at position ${\displaystyle \mathbf {r} }$.

Although they have different units, the gyration tensor is related to the moment of inertia tensor. The key difference is that the particle positions are weighted by mass in the inertia tensor, whereas the gyration tensor depends only on the particle positions; mass plays no role in defining the gyration tensor.

Diagonalization

Since the gyration tensor is a symmetric 3x3 matrix, a Cartesian coordinate system can be found in which it is diagonal

${\displaystyle \mathbf {S} ={\begin{bmatrix}\lambda _{x}^{2}&0&0\\0&\lambda _{y}^{2}&0\\0&0&\lambda _{z}^{2}\end{bmatrix}}}$

where the axes are chosen such that the diagonal elements are ordered ${\displaystyle \lambda _{x}^{2}\leq \lambda _{y}^{2}\leq \lambda _{z}^{2}}$. These diagonal elements are called the principal moments of the gyration tensor.

Shape descriptors

The principal moments can be combined to give several parameters that describe the distribution of particles. The squared radius of gyration is the sum of the principal moments

${\displaystyle R_{g}^{2}=\lambda _{x}^{2}+\lambda _{y}^{2}+\lambda _{z}^{2}}$

The asphericity ${\displaystyle b}$ is defined by

${\displaystyle b\ {\stackrel {\mathrm {def} }{=}}\ \lambda _{z}^{2}-{\frac {1}{2}}\left(\lambda _{x}^{2}+\lambda _{y}^{2}\right)={\frac {3}{2}}\lambda _{z}^{2}-{\frac {R_{g}^{2}}{2}}}$

which is always non-negative and zero only when the three principal moments are equal, λx = λy = λz. This zero condition is met when the distribution of particles is spherically symmetric (hence the name asphericity) but also whenever the particle distribution is symmetric with respect to the three coordinate axes, e.g., when the particles are distributed uniformly on a cube, tetrahedron or other Platonic solid.

Similarly, the acylindricity ${\displaystyle c}$ is defined by

${\displaystyle c\ {\stackrel {\mathrm {def} }{=}}\ \lambda _{y}^{2}-\lambda _{x}^{2}}$

which is always non-negative and zero only when the two principal moments are equal, λx = λy. This zero condition is met when the distribution of particles is cylindrically symmetric (hence the name, acylindricity), but also whenever the particle distribution is symmetric with respect to the two coordinate axes, e.g., when the particles are distributed uniformly on a regular prism.

Finally, the relative shape anisotropy ${\displaystyle \kappa ^{2}}$ is defined

${\displaystyle \kappa ^{2}\ {\stackrel {\mathrm {def} }{=}}\ {\frac {b^{2}+(3/4)c^{2}}{R_{g}^{4}}}={\frac {3}{2}}{\frac {\lambda _{x}^{4}+\lambda _{y}^{4}+\lambda _{z}^{4}}{(\lambda _{x}^{2}+\lambda _{y}^{2}+\lambda _{z}^{2})^{2}}}-{\frac {1}{2}}}$

which is bounded between zero and one. ${\displaystyle \kappa ^{2}}$ = 0 only occurs if all points are spherically symmetric, and ${\displaystyle \kappa ^{2}}$ = 1 only occurs if all points lie on a line.


text:
# Mathematician:Anders Celsius

## Mathematician

Swedish astronomer, physicist and mathematician whose best known contribution to science was his $1742$ proposal of what is now known as the Celsius temperature scale.

Swedish

## History

• Born: 27 November 1701 in Uppsala, Sweden
• Died: 25 April 1744 in Uppsala, Sweden

## Theorems and Definitions

Definitions of concepts named for Anders Celsius can be found here.

## Publications

• 1730: Nova Methodus distantiam solis a terra determinandi (New Method for Determining the Distance from the Earth to the Sun)
• 1738: De observationibus pro figura telluris determinanda (Observations on Determining the Shape of the Earth)


text:
It is currently 19 Jun 2019, 22:57

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# QOTD#17 Which of the following is closest to

Author Message
TAGS:
GRE Prep Club Legend
Joined: 07 Jun 2014
Posts: 4810
GRE 1: Q167 V156
WE: Business Development (Energy and Utilities)
Followers: 118

Kudos [?]: 1899 [0], given: 397

QOTD#17 Which of the following is closest to [#permalink]  12 Sep 2016, 11:58
Expert's post
00:00

Question Stats:

48% (01:15) correct 52% (00:39) wrong based on 25 sessions
Which of the following is closest to $$\sqrt{(2.3)(10^9)}$$?

A. 50,000
B. 150,000
C. 500,000
D. 1,500,000
E. 5,000,000

Practice Questions
Question: 16
Page: 206
[Reveal] Spoiler: OA

_________________

Sandy
If you found this post useful, please let me know by pressing the Kudos Button

Try our free Online GRE Test

GRE Instructor
Joined: 10 Apr 2015
Posts: 1991
Followers: 60

Kudos [?]: 1806 [1] , given: 9

Re: QOTD#17 Which of the following is closest to [#permalink]  19 Sep 2016, 17:11
1
KUDOS
Expert's post
Explanation

Always scan the answer choices BEFORE performing any calculations.
Since the answer choice are very spread apart, we can be very aggressive with our estimation.

We're going to use a nice rule that says √(ab) = (√a)(√b)

We have √(2.3 x 10⁹)
Since 2.3 isn't an easy number to find the square root of, the above rule doesn't help us much.
However, what if we do the following:
√(2.3 x 10⁹) = √(2.3 x 10¹ x 10⁸)
= √(23 x 10⁸)

How does this help?
Well, 23 is pretty close to 25 and we know that √25 = 5.
Can we do this? You bet. Remember that since the answer choice are very spread apart, we can be very aggressive with our estimation

We get:
√(23 x 10⁸) = (√23)(√10⁸)
≈ 5(10⁴)
≈ 5(10,000)
≈ 50,000

Cheers,
Brent
_________________

Brent Hanneson – Creator of greenlighttestprep.com

Intern
Joined: 26 Jul 2017
Posts: 1
Followers: 0

Kudos [?]: 0 [0], given: 0

Re: QOTD#17 Which of the following is closest to [#permalink]  11 Aug 2017, 10:38
well i did it differently,
i checked the answers and i squared the first and divided it by 2.3 and fount out that it's the closest to 10^9, all the other are just way off
though i guess it may not work as well
Manager
Joined: 26 Jun 2017
Posts: 104
Followers: 0

Kudos [?]: 41 [0], given: 38

Re: QOTD#17 Which of the following is closest to [#permalink]  21 Aug 2017, 09:29
If we have a problem 10^4, is not the solution 100,000? Since the decimal point is in the end of 10. so we carry the point 4 step right.
_________________

What you think, you become.

Re: QOTD#17 Which of the following is closest to   [#permalink] 21 Aug 2017, 09:29
Display posts from previous: Sort by


text:
2014
03-23

Locate Mining Center

As part of a peace treaty with the Navi, the humans are allowed mine for Unobtainium in a remote, deserted area of Pandora. The scientists have identified many possible excavation sites, and are now trying to figure out where to place the Mining Center. The placement of the mining center is further constrained by the fact that the robots that will carry the Unobtainium from the excavation sites to the mining center can only walk along prespecified Grid lines (see figure). The goal is now to find the location of the mining center so that the maximum distance to the excavation sites is minimized. You are to write a program for finding that location.

Specifically, you are given the x- and y-coordinates of the excavations sites, (x1, y1), (x2, y2), …(xn, yn) (n denotes the number of excavation sites). You are to find the coordinates for the Mining Center, (x0, y0), so that the maximum of the distances between the mining center and the excavation sites is minimized. All coordinates must be integers. The distance metric to be used is the rectilinear distance (also called Manhattan distance). Specifically, the rectilinear distance between (x0, y0) and (xi, yi) is:

|xi – x0| + |yi – y0|

Further, if there are multiple locations which qualify, then you must find the location that is closest to the origin by Euclidean distance q metric. Since origin is at (0, 0), this corresponds to minimizing .

In other words, given the input (x1, y1), …, (xn, yn), your goal is to find (x0, y0) such that:

is minimized, and if there are multiple answers, then is the smallest among all such answers.

The first line in the test data file contains the number of test cases, n. After that, each line contains one test case. The test case begins with the number of mines, followed by the x and y coordinates of each mine. All coordinates must be integers. Very large coordinate values may be used (million+), so brute force methods will not work.

The first line in the test data file contains the number of test cases, n. After that, each line contains one test case. The test case begins with the number of mines, followed by the x and y coordinates of each mine. All coordinates must be integers. Very large coordinate values may be used (million+), so brute force methods will not work.

2
4 100 0 40 0 -10 0 20 0
3 245 692 -772 -647 330 526

LOCATION 45 0
LOCATION -121 -120


text:
# Federal taxation problems

## Related Questions in Accounting Concepts and Principles

• ### Question

(Solved) October 30, 2011

Weston acquires a used office machine (7 year class asset ) on November 2,2011 , for 75,000 . this is the only asset acquired by Weston during the year . He does not elect immediate expensing under section 179. On September 15,2012 Weston sell the machine. a) determine Weston's cost recovery for...

a. In 2011, he acquired the asset in the last quarter. If more than 40% of assets are acquired in the last asset, you need to use the mid-quarter convention. THis applies in this case...

(Solved) May 07, 2009

MACRS Depreciation Rates Recovery 5- Year 200% DB 1 20 2 32 3 19.2 4 11.52 5 11.52 MACRS Depreciation Recovery for the year 2011 $150,000 x 0.20 =$30,000 Recovery for the year 2012 $150,000... • ### Federal Taxation.. Please Help (Solved) May 07, 2009 Blue Corporation acquired new office furniture on August 15 , 2008, for$150,000. Blue did not elect immediate expensingunder 179. Determine Blue’s cost recovery for2008.

150000 is the basis and office furniture is 7 yearproperty:elect the mid quarter convention for 3rd quarter:percentage
• ### Section 1. Economics of Financial Accounting Information REQUIRED Refer to the supplementary reading

(Solved) November 16, 2015

suppliers of products and services. 2 . Costs of Disclosure Define each of the following disclosure costs associated with financial accounting information, and provide an example of each cost (Pick one): a. Information collection, processing, dissemination costs . b. Competitive disadvantage costs...


text:
# New PDF release: Borel Liftings of Borel Sets: Some Decidable and Undecidable

By Gabriel Debs

ISBN-10: 0821839713

ISBN-13: 9780821839713

One of many goals of this paintings is to enquire a few traditional homes of Borel units that are undecidable in $ZFC$. The authors' place to begin is the subsequent straightforward, even though non-trivial consequence: examine $X \subset 2omega\times2omega$, set $Y=\pi(X)$, the place $\pi$ denotes the canonical projection of $2omega\times2omega$ onto the 1st issue, and believe that $(\star)$ : ""Any compact subset of $Y$ is the projection of a few compact subset of $X$"". If additionally $X$ is $\mathbf{\Pi zero 2$ then $(\star\star)$: ""The restrict of $\pi$ to a few rather closed subset of $X$ is ideal onto $Y$"" it follows that during the current case $Y$ can be $\mathbf{\Pi zero 2$. detect that the opposite implication $(\star\star)\Rightarrow(\star)$ holds trivially for any $X$ and $Y$. however the implication $(\star)\Rightarrow (\star\star)$ for an arbitrary Borel set $X \subset 2omega\times2omega$ is reminiscent of the assertion ""$\forall \alpha\in \omegaomega, \,\aleph 1$ is inaccessible in $L(\alpha)$"". extra exactly the authors turn out that the validity of $(\star)\Rightarrow(\star\star)$ for all $X \in \varSigma0 {1 \xi 1$, is similar to ""$\aleph \xi \aleph 1$"". besides the fact that we will convey independently, that after $X$ is Borel one could, in $ZFC$, derive from $(\star)$ the weaker end that $Y$ can also be Borel and of an analogous Baire type as $X$. This final end result solves an outdated challenge approximately compact masking mappings. in reality those effects are heavily regarding the subsequent common boundedness precept Lift$(X, Y)$: ""If any compact subset of $Y$ admits a continuing lifting in $X$, then $Y$ admits a continual lifting in $X$"", the place by way of a lifting of $Z\subset \pi(X)$ in $X$ we suggest a mapping on $Z$ whose graph is contained in $X$. the most results of this paintings will supply the precise set theoretical energy of this precept looking on the descriptive complexity of $X$ and $Y$. The authors additionally end up an analogous outcome for a edition of Lift$(X, Y)$ within which ""continuous liftings"" are changed by way of ""Borel liftings"", and which solutions a question of H. Friedman. between different purposes the authors receive a whole technique to an issue which fits again to Lusin about the lifestyles of $\mathbf{\Pi 1 1$ units with all ingredients in a few given type $\mathbf{\Gamma$ of Borel units, bettering past effects by way of J. Stern and R. Sami. The evidence of the most outcome will depend upon a nontrivial illustration of Borel units (in $ZFC$) of a brand new style, regarding a large number of ""abstract algebra"". This illustration was once at the beginning built for the needs of this evidence, yet has numerous different purposes.

Best topology books

Knots and Surfaces by N. D. Gilbert, T. Porter PDF

This hugely readable textual content information the interplay among the mathematical conception of knots and the theories of surfaces and team shows. It expertly introduces a number of issues severe to the advance of natural arithmetic whereas offering an account of math "in action" in an strange context.

Erica Flapan's When topology meets chemistry: A topological look at PDF

During this extraordinary topology textual content, the readers not just know about knot concept, three-d manifolds, and the topology of embedded graphs, but additionally their function in realizing molecular buildings. such a lot effects defined within the textual content are influenced through the questions of chemists or molecular biologists, although they generally transcend answering the unique query requested.

Read e-book online Beyond Perturbation: Introduction to the Homotopy Analysis PDF

Fixing nonlinear difficulties is inherently tough, and the superior the nonlinearity, the extra intractable recommendations develop into. Analytic approximations usually holiday down as nonlinearity turns into robust, or even perturbation approximations are legitimate just for issues of susceptible nonlinearity. This booklet introduces a robust new analytic strategy for nonlinear problems-homotopy analysis-that continues to be legitimate inspite of powerful nonlinearity.

Additional resources for Borel Liftings of Borel Sets: Some Decidable and Undecidable Statements

Sample text

Then X(s/ u # ) = x(j / ) + x(@) - x (s/ n = Z ( ^ ) + x(7») ~ X(T(^ n Jf)) = xfJXst u #)) as desired. Apparently the definition for the Euler characteristic is internally consistent. 3 Evaluations for the Euler Characteristic The axiomatic approach provides a powerful scheme by which to determine values for Euler characteristics, as may be seen from some examples for some representative topological manifolds. AB] from point A at —1 on the x-axis to point B at 0 (on the x-axis) and the second [BC] from point B to point C at +1.

62, 219 (1989). 50. W. Thompson, Phil. , 34, 15 (1867). 51. E. G. , Kluwer, Dordrecht, 1991, p. 119. J. 1 Introduction......................................................................................... 3 Stoichiometry and Euler’s R elation.............................................. 4 Curvatures and G raph Em beddings.............................................. 5 Curvature Strain in M olecules....................................................... 6 O utlook.................................................................................................

Dugundji, Topology, Allyn and Bacon, Boston, 1966. 9. R. M unkres, Topology, Prentice-Hall, Englewood Cliffs, NJ, 1975. 10. M. Behzad and G. C hartrand, Introduction to the Theory o f Graphs, Allyn and Bacon, Boston, 1971. II. C. Berge, Graphs and Hypergraphs, North-Holland, Amsterdam, 1973. 12. B. Griinbaum , Convex Polytopes, Interscience Publishers, New York, 1967. 13. D. Hilbert and S. Cohn-Vossen, Geometry and the Imagination, Chelsea, New York, 1952. Topology in Chemistry 37 14. L. Pasteur, Legons de Chimie Professees en 1860, Chemical Society, Paris, 1861.


text:
# Metaprogramming

What do we mean by “metaprogramming”? Well, it was the best collective term we could come up with for the set of things that are more about process than they are about writing code or working more efficiently. In this lecture, we will look at systems for building and testing your code, and for managing dependencies. These may seem like they are of limited importance in your day-to-day as a student, but the moment you interact with a larger code base through an internship or once you enter the “real world”, you will see this everywhere. We should note that “metaprogramming” can also mean “programs that operate on programs”, whereas that is not quite the definition we are using for the purposes of this lecture.

# Build systems

If you write a paper in LaTeX, what are the commands you need to run to produce your paper? What about the ones used to run your benchmarks, plot them, and then insert that plot into your paper? Or to compile the code provided in the class you’re taking and then running the tests?

For most projects, whether they contain code or not, there is a “build process”. Some sequence of operations you need to do to go from your inputs to your outputs. Often, that process might have many steps, and many branches. Run this to generate this plot, that to generate those results, and something else to produce the final paper. As with so many of the things we have seen in this class, you are not the first to encounter this annoyance, and luckily there exist many tools to help you!

These are usually called “build systems”, and there are many of them. Which one you use depends on the task at hand, your language of preference, and the size of the project. At their core, they are all very similar though. You define a number of dependencies, a number of targets, and rules for going from one to the other. You tell the build system that you want a particular target, and its job is to find all the transitive dependencies of that target, and then apply the rules to produce intermediate targets all the way until the final target has been produced. Ideally, the build system does this without unnecessarily executing rules for targets whose dependencies haven’t changed and where the result is available from a previous build.

make is one of the most common build systems out there, and you will usually find it installed on pretty much any UNIX-based computer. It has its warts, but works quite well for simple-to-moderate projects. When you run make, it consults a file called Makefile in the current directory. All the targets, their dependencies, and the rules are defined in that file. Let’s take a look at one:

paper.pdf: paper.tex plot-data.png
pdflatex paper.tex

plot-%.png: %.dat plot.py
./plot.py -i $*.dat -o$@

Each directive in this file is a rule for how to produce the left-hand side using the right-hand side. Or, phrased differently, the things named on the right-hand side are dependencies, and the left-hand side is the target. The indented block is a sequence of programs to produce the target from those dependencies. In make, the first directive also defines the default goal. If you run make with no arguments, this is the target it will build. Alternatively, you can run something like make plot-data.png, and it will build that target instead.

The % in a rule is a “pattern”, and will match the same string on the left and on the right. For example, if the target plot-foo.png is requested, make will look for the dependencies foo.dat and plot.py. Now let’s look at what happens if we run make with an empty source directory.

$make make: *** No rule to make target 'paper.tex', needed by 'paper.pdf'. Stop.  make is helpfully telling us that in order to build paper.pdf, it needs paper.tex, and it has no rule telling it how to make that file. Let’s try making it! $ touch paper.tex
$make make: *** No rule to make target 'plot-data.png', needed by 'paper.pdf'. Stop.  Hmm, interesting, there is a rule to make plot-data.png, but it is a pattern rule. Since the source files do not exist (foo.dat), make simply states that it cannot make that file. Let’s try creating all the files: $ cat paper.tex
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[scale=0.65]{plot-data.png}
\end{document}
$cat plot.py #!/usr/bin/env python import matplotlib import matplotlib.pyplot as plt import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('-i', type=argparse.FileType('r')) parser.add_argument('-o') args = parser.parse_args() data = np.loadtxt(args.i) plt.plot(data[:, 0], data[:, 1]) plt.savefig(args.o)$ cat data.dat
1 1
2 2
3 3
4 4
5 8

Now what happens if we run make?

$make ./plot.py -i data.dat -o plot-data.png pdflatex paper.tex ... lots of output ...  And look, it made a PDF for us! What if we run make again? $ make
make: 'paper.pdf' is up to date.

It didn’t do anything! Why not? Well, because it didn’t need to. It checked that all of the previously-built targets were still up to date with respect to their listed dependencies. We can test this by modifying paper.tex and then re-running make:

$vim paper.tex$ make
pdflatex paper.tex
...

Notice that make did not re-run plot.py because that was not necessary; none of plot-data.png’s dependencies changed!

# Dependency management

At a more macro level, your software projects are likely to have dependencies that are themselves projects. You might depend on installed programs (like python), system packages (like openssl), or libraries within your programming language (like matplotlib). These days, most dependencies will be available through a repository that hosts a large number of such dependencies in a single place, and provides a convenient mechanism for installing them. Some examples include the Ubuntu package repositories for Ubuntu system packages, which you access through the apt tool, RubyGems for Ruby libraries, PyPi for Python libraries, or the Arch User Repository for Arch Linux user-contributed packages.

Since the exact mechanisms for interacting with these repositories vary a lot from repository to repository and from tool to tool, we won’t go too much into the details of any specific one in this lecture. What we will cover is some of the common terminology they all use. The first among these is versioning. Most projects that other projects depend on issue a version number with every release. Usually something like 8.1.3 or 64.1.20192004. They are often, but not always, numerical. Version numbers serve many purposes, and one of the most important of them is to ensure that software keeps working. Imagine, for example, that I release a new version of my library where I have renamed a particular function. If someone tried to build some software that depends on my library after I release that update, the build might fail because it calls a function that no longer exists! Versioning attempts to solve this problem by letting a project say that it depends on a particular version, or range of versions, of some other project. That way, even if the underlying library changes, dependent software continues building by using an older version of my library.

That also isn’t ideal though! What if I issue a security update which does not change the public interface of my library (its “API”), and which any project that depended on the old version should immediately start using? This is where the different groups of numbers in a version come in. The exact meaning of each one varies between projects, but one relatively common standard is semantic versioning. With semantic versioning, every version number is of the form: major.minor.patch. The rules are:

• If a new release does not change the API, increase the patch version.
• If you add to your API in a backwards-compatible way, increase the minor version.
• If you change the API in a non-backwards-compatible way, increase the major version.

This already provides some major advantages. Now, if my project depends on your project, it should be safe to use the latest release with the same major version as the one I built against when I developed it, as long as its minor version is at least what it was back then. In other words, if I depend on your library at version 1.3.7, then it should be fine to build it with 1.3.8, 1.6.1, or even 1.3.0. Version 2.2.4 would probably not be okay, because the major version was increased. We can see an example of semantic versioning in Python’s version numbers. Many of you are probably aware that Python 2 and Python 3 code do not mix very well, which is why that was a major version bump. Similarly, code written for Python 3.5 might run fine on Python 3.7, but possibly not on 3.4.

When working with dependency management systems, you may also come across the notion of lock files. A lock file is simply a file that lists the exact version you are currently depending on of each dependency. Usually, you need to explicitly run an update program to upgrade to newer versions of your dependencies. There are many reasons for this, such as avoiding unnecessary recompiles, having reproducible builds, or not automatically updating to the latest version (which may be broken). An extreme version of this kind of dependency locking is vendoring, which is where you copy all the code of your dependencies into your own project. That gives you total control over any changes to it, and lets you introduce your own changes to it, but also means you have to explicitly pull in any updates from the upstream maintainers over time.

# Continuous integration systems

As you work on larger and larger projects, you’ll find that there are often additional tasks you have to do whenever you make a change to it. You might have to upload a new version of the documentation, upload a compiled version somewhere, release the code to pypi, run your test suite, and all sort of other things. Maybe every time someone sends you a pull request on GitHub, you want their code to be style checked and you want some benchmarks to run? When these kinds of needs arise, it’s time to take a look at continuous integration.

Continuous integration, or CI, is an umbrella term for “stuff that runs whenever your code changes”, and there are many companies out there that provide various types of CI, often for free for open-source projects. Some of the big ones are Travis CI, Azure Pipelines, and GitHub Actions. They all work in roughly the same way: you add a file to your repository that describes what should happen when various things happen to that repository. By far the most common one is a rule like “when someone pushes code, run the test suite”. When the event triggers, the CI provider spins up a virtual machines (or more), runs the commands in your “recipe”, and then usually notes down the results somewhere. You might set it up so that you are notified if the test suite stops passing, or so that a little badge appears on your repository as long as the tests pass.

As an example of a CI system, the class website is set up using GitHub Pages. Pages is a CI action that runs the Jekyll blog software on every push to master and makes the built site available on a particular GitHub domain. This makes it trivial for us to update the website! We just make our changes locally, commit them with git, and then push. CI takes care of the rest.

## A brief aside on testing

Most large software projects come with a “test suite”. You may already be familiar with the general concept of testing, but we thought we’d quickly mention some approaches to testing and testing terminology that you may encounter in the wild:

• Test suite: a collective term for all the tests
• Unit test: a “micro-test” that tests a specific feature in isolation
• Integration test: a “macro-test” that runs a larger part of the system to check that different feature or components work together.
• Regression test: a test that implements a particular pattern that previously caused a bug to ensure that the bug does not resurface.
• Mocking: to replace a function, module, or type with a fake implementation to avoid testing unrelated functionality. For example, you might “mock the network” or “mock the disk”.

# Exercises

1. Most makefiles provide a target called clean. This isn’t intended to produce a file called clean, but instead to clean up any files that can be re-built by make. Think of it as a way to “undo” all of the build steps. Implement a clean target for the paper.pdf Makefile above. You will have to make the target phony. You may find the git ls-files subcommand useful. A number of other very common make targets are listed here.
2. Take a look at the various ways to specify version requirements for dependencies in Rust’s build system. Most package repositories support similar syntax. For each one (caret, tilde, wildcard, comparison, and multiple), try to come up with a use-case in which that particular kind of requirement makes sense.
3. Git can act as a simple CI system all by itself. In .git/hooks inside any git repository, you will find (currently inactive) files that are run as scripts when a particular action happens. Write a pre-commit hook that runs make paper.pdf and refuses the commit if the make command fails. This should prevent any commit from having an unbuildable version of the paper.
4. Set up a simple auto-published page using GitHub Pages. Add a GitHub Action to the repository to run shellcheck on any shell files in that repository (here is one way to do it). Check that it works!
5. Build your own GitHub action to run proselint or write-good on all the .md files in the repository. Enable it in your repository, and check that it works by filing a pull request with a typo in it.


text:
# fix nvk command

## Syntax

fix ID group-ID nvk

• ID, group-ID are documented in fix command
• nvk = style name of this fix command

## Examples

fix 1 all nvk

## Description

Perform constant kinetic energy integration using the Gaussian thermostat to update position and velocity for atoms in the group each timestep. V is volume; K is kinetic energy. This creates a system trajectory consistent with the isokinetic ensemble.

The equations of motion used are those of Minary et al in (Minary), a variant of those initially given by Zhang in (Zhang).

The kinetic energy will be held constant at its value given when fix nvk is initiated. If a different kinetic energy is desired, the velocity command should be used to change the kinetic energy prior to this fix.

Restart, fix_modify, output, run start/stop, minimize info:

No information about this fix is written to binary restart files. None of the fix_modify options are relevant to this fix. No global or per-atom quantities are stored by this fix for access by various output commands. No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization.

## Restrictions

The Gaussian thermostat only works when it is applied to all atoms in the simulation box. Therefore, the group must be set to all.

This fix has not yet been implemented to work with the RESPA integrator.

This fix is part of the USER-MISC package. It is only enabled if LAMMPS was built with that package. See the Build package doc page for more info.

Related commands: none

Default: none

(Minary) Minary, Martyna, and Tuckerman, J Chem Phys, 18, 2510 (2003).

(Zhang) Zhang, J Chem Phys, 106, 6102 (1997).


text:
# Text Mining the Human Behavioral Ecology Bibliography

Thanks to Kermyt Anderson, the Human Behavioral Ecology Bibliography (HBEB) has recently gone online. Eleanor Power has taken this text file and parsed it into a bibtex file, and from there it can be turned into an Endnote library or other bibliographic database format.

{{ tweet 874664941076328448 }}

{{ tweet 875261184114442240 }}

I’m curious to know more about HBEB’s use as a dataset in its own right, and since I’ve been doing similar work with our field data here at MPI-EVA’s new Department of Human Behavior, Ecology and Culture, I figured I could turn the lens on us at the same time as showcase the methods to interested parties.

Since this dataset will likely grow over time, having everything in one R script also means it can be re-used automatically as HBEB grows. So here goes:

# Initial Processing

First, we need a tool that can parse *.bib files and load them into an R environment in a format we can manipulate. A Google search reveals a solution: the ReadBib function in package RefManageR.

    hbeb_data <- ReadBib("./data/Human Behavioral Ecology Bibliography.bib",
check=FALSE)

## Unrecognized macro in Reyes-Garc{\'\i}a, Victoria

## Unrecognized macro in Manuel J. Mac{\'\i}a

## Unrecognized macro in Mart{\'\i} Orta-Mart{\'\i}nez

## Unrecognized macro in V. Reyes-Garc{\'\i}a

## Unrecognized macro in Victoria Reyes-Garc{\'\i}a

## Unrecognized macro in Martha Fr{\'\i}as-Armenta

As ReadBib loads the file into R, it displays some messages about inconsistencies in the bib syntax. We can reroute those messages to write to a file by using sink calls to inspect later at our leisure.

    zz <- file("./data/messages.txt", open = "wt")
sink(file=zz, type="message")
hbeb_data <- ReadBib("./data/Human Behavioral Ecology Bibliography.bib", check=FALSE)
sink()

Having loaded the data, I need to turn it into one or more data frames to be able to do anything with it. I’m not familar with the BibEntry class the data is now in, but it inherits the same behavior as basic R lists. I’m going to apply some list methods I use in my [YAML to JSON to CSV pipeline]({% post_url 2017-02-12-hierarchical-data-in-plain-text %}) for processing field interviews.

    nullToNA <- function(x) {
x[sapply(x, is.null)] <- NA
return(x)
}

hbeb_df <- data.frame(
key=unlist(hbeb_data$key), year=unlist(hbeb_data$year),
pages=unlist(nullToNA(hbeb_data$pages)), volume=unlist(nullToNA(hbeb_data$volume)),
journal=unlist(nullToNA(hbeb_data$journal)), title=unlist(nullToNA(hbeb_data$title)),
type=unlist(nullToNA(hbeb_data$bibtype)), publisher=unlist(nullToNA(hbeb_data$publisher)),
doi=unlist(nullToNA(hbeb_data$doi)), url=unlist(nullToNA(hbeb_data$url)),
booktitle=unlist(nullToNA(hbeb_data$booktitle)) ) for(i in 1:ncol(hbeb_df)) hbeb_df[,i] <- as.character(hbeb_df[,i])  To describe what the code block above is doing, the unlist function corrals the variables into simple vectors and the data.frame function column-binds them into a data frame. I wrote a new function, nullToNA so missing values are not dropped during this operation. The result is a data frame with 1255 rows (the same length as the hbeb_data list) and the 11 columns we defined above. Each entry contains data associated with that citation: the year, the title, the DOI, etc., with the exception of the authors. That part is complicated because it lends itself to a [hierarchical data model]({% post_url 2017-02-12-hierarchical-data-in-plain-text %}), so I will save it for last.  barplot(table(hbeb_df$year), main="count by year of publication",
border=NA, col=barplot_color)

abline(h=seq(0, 100, by=20), lty=2, col=col_alpha("gray", 0.6))

    type_tab <- prop.table(table(hbeb_df$type)) type_tab <- floor(100*type_tab)  Of the 1255 publications in HBEB, 82 percent are articles, 15 percent are chapters in edited volumes, and 1 percent are books. Looking at the number of entries in HBEB through time, there’s clearly fewer pubs since 2005, steadily declining up to the present. Such questions are feasible, now that the data are in a usable (for me) format. # What journals most commonly publish human behavioral ecology articles? If we count up the number of unique journals mentioned in the database, e.g. length(unique(hbeb_df$journal)), we initially see 184 names. But this is misleading: we can see from this list that there’s a lot of alternative spellings which will make it difficult to accurately count up appearances1. For example:

• “Proceedings of the Royal Society B”
• “Proceedings of the Royal Society B: Biological Science”
• “Proceedings of the Royal Society B: Biological Sciences”
• “Proceedings of the Royal Society Biology”
• “Proceedings of the Royal Society of London: Biological Sciences”
• “Proceedings of the Royal Society, Series B” and even
• “roceedings of the Royal Society, Series B”

There’s probably a more elegant approach to data cleaning, but in situations like this, I just renaming the entries like so:

Let’s make a backup copy, then apply the gsub command to eliminate strange characters.

    hbeb_df$journal_og <- hbeb_df$journal
hbeb_df$journal <- iconv(hbeb_df$journal, to = "utf-8")
hbeb_df$journal <- gsub("\\{", "", hbeb_df$journal)
hbeb_df$journal <- gsub("\\}", "", hbeb_df$journal)
hbeb_df$journal <- gsub("\"", "", hbeb_df$journal)
hbeb_df$journal <- gsub("\\\\", "", hbeb_df$journal)
hbeb_df$journal <- gsub("/'", "", hbeb_df$journal)

Now for the renaming:

    old_names <- c("Proceedings of the Royal Society B: Biological Science",
"Proceedings of the Royal Society B: Biological Sciences",
"Proceedings of the Royal Society Biology",
"Proceedings of the Royal Society of London: Biological Sciences",
"Proceedings of the Royal Society, Series B",
"roceedings of the Royal Society, Series B")

hbeb_df$journal[hbeb_df$journal %in%
old_names] <- "Proceedings of the Royal Society B"

I’ll do a similar operation for PNAS and a few other journals in the Rmarkdown code, but for clarity, it will not be not printed here.

This one is actually funny:

• “Plos ONE”
• “PLoS One”
• “PLoS ONE”
• “PLOS One”
• “PLOS ONE”

We fix this one by standardizing capitalization. I’ll use a function called cw which I got here.

With the journal names at least somewhat cleaned of duplicates, we can count 165 unique journals listed. We can see the most popular ten as a horizontal barplot:

    par(mar=c(5.1, 20, 4.1, 2.1))

top_ten_journals <- rev(sort(table(as.character(hbeb_df$journal[hbeb_df$type=="Article"]))))[1:10]

barplot( rev(top_ten_journals), horiz=TRUE,
las=1, xlab="pub count", border=NA, col=barplot_color)

abline(v=seq(0, 150, by=50), lty=2, col=col_alpha("gray", 0.6))

The most popular journal in the database is Human Nature (165 publications), followed by Evolution And Human Behavior (160 publications) and Current Anthropology (76 publications). In total, these ten journals account for 63 percent of all articles in HBEB.

# Identifying keywords in titles

I’ve always wanted to make a word cloud, and the title of each citation can be mined for common words. I’m going to use the packages and methods outlined here.

    # load needed libraries
library(tm)
library(SnowballC)

# remove strange characters from the title input
title_strings <- iconv(hbeb_df$title, to = "utf-8") title_strings <- gsub("\\{", "", title_strings) title_strings <- gsub("\\}", "", title_strings) title_strings <- gsub("\"", "", title_strings) title_strings <- gsub("\\\\", "", title_strings) title_strings <- gsub("/'", "", title_strings) # use tm's corpus class to process the text d_cor <- Corpus(VectorSource(title_strings)) d_cor <- tm_map(d_cor, PlainTextDocument) d_cor <- tm_map(d_cor, removePunctuation) d_cor <- tm_map(d_cor, tolower) d_cor <- tm_map(d_cor, content_transformer(gsub), pattern = "evolutionary", replacement = "evolution") d_cor <- tm_map(d_cor, removeWords, c('the', 'among', 'human', 'evolution', stopwords('english'))) d_cor <- Corpus(VectorSource(d_cor))  Note that I took out the words “the”, “evolution”, “evolutionary” and “human”, since those are the most common and least informative. Now we make a wordcloud with the wordcloud function in the wordcloud library. Wordcloud.  # plot library(wordcloud) library(RColorBrewer) cloud_cols <- brewer.pal(8, "Dark2") wordcloud(d_cor, max.words=100, random.order=FALSE, colors=cloud_cols)  # Identifying authors through relational tables The author data introduces a common complication in behavioral databases. That is, the author data are not easy to fit in a flat file configuration, because each citation has a variable number of authors. You might be tempted to simply glom them onto the hbeb_df table as author_given_name_1, author_family_name_1, author_given_name_2, author_family_name_2, etc., but this is a terrible idea and you should stop doing it. Comes from a tradition of manipulating data tables by hand, wanting to be able to see the entries in a wide format. We will see there is one citation with 23 authors; creating dozens or hundreds of mostly-empty columns is madness. Rather, we make the data relational, by creating an authors subtable linked to the main table by the citation key. Most importantly this is how we actually want to use the data in analyses. By inspection:  str(hbeb_data[[1]]$author)

## Class 'person'  hidden list of 1
##  $:List of 5 ## ..$ given  : chr [1:2] "Kermyt" "G."
##   ..$family : chr "Anderson" ## ..$ role   : NULL
##   ..$email : NULL ## ..$ comment: NULL

The person class in RefManageR is essentially a list with five fixed slots. The following extraction code is quick and dirty but should serve. I begin by initializing a new data frame, which will grow vertically, one row added for each author in each citation. To keep things sane, I’ll add the citation key of the paper in the rows of each author of that paper.

    authors <- data.frame( citation_key = character(0),
given_name = character(0), family_name = character(0) )

for(i in 1:length(hbeb_data)){
if(!is.null(hbeb_data[[i]]$author)){ # skip if citation has no author for(j in 1:length(hbeb_data[[i]]$author)){
citation_key = hbeb_data[[i]]$key, given_name = paste(hbeb_data[[i]]$author[j]$given, collapse=" "), family_name = hbeb_data[[i]]$author[j]$family, author_number = j ) authors <- rbind(add, authors) } } } for(i in 1:ncol(authors)) authors[,i] <- as.character(authors[,i])  Now we have a long-oriented table with 2942 author-citation entries, and (unlike a wide table) we can elegantly calculate useful statistics from this relational data structure. First, a let’s count up how many coauthors on each citation:  hbeb_df$author_count <- table(authors$citation_key)[hbeb_df$key]

par(mar=c(5.1, 4.1, 4.1, 2.1))
par(mfrow=c(2,2))
barplot(prop.table(table(hbeb_df$author_count)), las=1, xlab="number of coauthors", ylab="frequency", main="all publications", border=NA, col=barplot_color, xlim=c(0, 7.5), ylim=c(0, 0.45)) barplot( prop.table(table(hbeb_df$author_count[hbeb_df$type=="Article"])), las=1, xlab="number of coauthors", ylab="frequency", main="articles", border=NA, col=barplot_color, xlim=c(0, 7.5), ylim=c(0, 0.45)) barplot( prop.table(table(hbeb_df$author_count[hbeb_df$type=="Book"])), las=1, xlab="number of coauthors", ylab="frequency", main="books", border=NA, col=barplot_color, ylim=c(0, 0.45)) barplot(prop.table(table(hbeb_df$author_count[hbeb_df$type=="InCollection"])), las=1, xlab="number of coauthors", ylab="frequency", main="chapters", border=NA, col=barplot_color, xlim=c(0, 7.5), ylim=c(0, 0.45))  Can we also count the number of unique authors, and count up how many times they each appear? Currently no; we have two tables, one-row-per-pub and one-row-per-pub-author. What we really want is a third table, one-row-per-author. Before that, though, we must solve a common problem. Consider the following entry for Peter J. Richerson:  unique(authors[authors$family_name=="Richerson", c("given_name", "family_name")])

##      given_name family_name
## 39     Peter J.   Richerson
## 603       Peter   Richerson
## 2099      P. J.   Richerson
## 2468         P.   Richerson

The given names are non-standardized! So people appear under multiple versions of their names.

I’m going to try a quick match using the first letter of given_name. This can be dangerous, since it will collide two people with the same last name and the same first initial, but (hopefully) it works for now.

    authors$author_key <- paste( substr(authors$given_name, 1, 1), authors$family_name )  The author_key variable will allow us to create a unique table of authors, and count up how many times each appears.  author_pk <- unique(authors$author_key)
count <- as.numeric(table(authors$author_key)[author_pk]) given_name <- authors$given_name[match(author_pk, authors$author_key)] family_name <- authors$family_name[match(author_pk, authors$author_key)] author_register <- data.frame( author_pk, given_name, family_name, count ) author_register$count_firstauthor <- NA
for(i in 1:nrow(author_register)){
author_register$count_firstauthor[i] <- sum( authors$author_key == author_register$author_pk[i] & authors$author_number==1
)
}

And we have our answer: there are (approximately) 1137 unique authors in the HBEB. Like with the journals, we can calculate how many times each author appears in the database. Below I display a sorted count of the top forty authors in HBEB, by the number of publications listed.

    par(mar=c(5.1, 10, 4.1, 2.1))

o <- rev(order(author_register$count)) author_register <- author_register[o,] barplot( author_register$count[1:40], horiz=TRUE,
las=1, xlab="pub count", border=NA,
col=barplot_color, names.arg=author_register\$author_pk[1:40])
abline(v=seq(0, 50, by=10), lty=2, col=col_alpha("gray", 0.6))

So there you go. If you have suggestions, write to me and I can incorporate them into this analysis, if you are interested in doing it yourself, the Rmarkdown file that produced this page is available on my Github page.

## Footnotes

1. We can also spot errors, e.g. the same book appears twice under CronkLeech2013 and CronkLeech2012. ↩


text:
# Simple wireless power transfer circuit question

Above circuit is the very simple wireless power transfer circuit, but I could not find any explanation online about how the circuit actually works. How does the circuit on the left work as an oscillator? What is the purpose of the center tap, and how does it convert DC source into an oscillating current? Please help understand the circuit operation!

Also, how could this circuit be extended to a three phase one?

• Precisely what do you mean by 3 phase? The present circuit runs from a 1.5 volt battery and is pretty low quality and inefficient. If you might be thinking about powering from 3 phase then you will need a fire extinguisher handy. – Andy aka Sep 2 at 19:06
• The link you posted explains it. Read the entire page. – David Sep 2 at 19:29
• @David What I'm looking for is a more detailed explanation. Of course I read the entire page. – user207787 Sep 2 at 19:39
• I don't think that circuit works as the article describes either. Like you said, I don't understand how that circuit would oscillate. – David Sep 2 at 19:45
• FYI, I found out that this circuit configuration is called Joule Thief. – user207787 Sep 3 at 13:20

It seems to work just fine (with some guessed values):

Note the polarity of the inductances. When power is turned on, there's no current through L1, but there is through L2+R2 due to the BE junction being directly polarized. The transistor opens and allows current to flow through L1. When the transistor is saturated, there is no more variation in the current, so the induced L1 is now transferring back to L2, and the cycle continues. Since the transistor can work with relatively high dI/dt, the values of the voltage can get very high, so some protection might be needed (or limit dI/dt). This schematic is a simple way of having a self-oscillating circuit.

• Thank you so much for this! – user207787 Sep 3 at 11:59
• @user207787 You should know two things: 1) the NPN needs an anti-parallel diode, to avoid damaging the transistor during reverse operation, and 2) as noted in the comments and in my conclusion, this circuit is very crude and inefficient; at best it has an educational value, to prove a concept, rather than to prove the schematic works. If you intend to use it, choose another. Not lastly, if any of the answers solve your problem, mark one of them (the check mark) so that future searches will show an accepted answer for this question. – a concerned citizen Sep 3 at 12:08
• Done! Also, I was asked to extend this to a three phase one, and I have no idea what that means. Can you give me some suggestion? – user207787 Sep 3 at 13:21
• @user207787 That makes no sense to me. Can't you ask for clarifications from whomever asked you this in ther first place? Was it your teacher? It would great if you could add that clarification to your question, I am always glad to learn something new. – a concerned citizen Sep 3 at 13:48
• @Giga-Byte Yes, that came out weird. I meant that, since L1 and L2 are in anti-phase, they behave like a transformer, so the induced voltage appears in L2 after the cycle in L1 finishes -- when the transistor is saturated there is no more variation in the current through L1. Did my translating neuron made it this time? – a concerned citizen Sep 4 at 13:00

Firstly the coil wounds are same, each with 17 turns. So the induced EMF is neither decreasing nor increasing but I don't think it's possible for it to convert DC as low as 1.5V into an oscillating current.

• The number of turns is not the key here, it's the polarity of the inductances, an effect of the center tap, which causes the two inductances to work alternatively, and which makes the whole circuit a self-oscillating one. I may have exaggerated with the coupling factor in my answer, but it works, even at k=0.3, even at 1.5 V. – a concerned citizen Sep 3 at 7:17