text:
## WolframAlpha

I'm not sure what WolframAlpha exactly does, but Stephen Wolfram's post about it definitely has my ears all perked up for its launch ... which should be any time soon.

## Comment viewing options

### I don't see how this is

I don't see how this is relevant for LtU.

### Probably this: "All one

Probably this:

"All one needs to be able to do is to take questions people ask in natural language, and represent them in a precise form that fits into the computations one can do."

### No?

I've so far not understood *why* Mathematica is superior to every other language around (as - at least by implication - claimed by Wolfram). This might be a chance to find out, since I think the engine is bound to use Mathematica language in some way. The fact that you can "compute" your questions via the search-like box definitely has language consequences worth watching.

### Is there any concrete

Is there any concrete argument about Mathematica as compared to other programming languages, that is new or enlightening, in this announcement?

### Not in this announcement ... at least not yet

Wolfram's claims have always been controversial to some extent (see The Man Who Cracked The Code to Everything ... about his book A New Kind of Science). So it is difficult to say that there is something enlightening there, particularly before its release, but his ideas always brought something fresh to the fields they touch (imo) and he claims Wolfram|Alpha tops Mathematica and NKS as his achievements :)

The mathematica language has been around for long, but very little attention (imo) has been given to it from the programming languages community. Fundamentally, the language itself hasn't changed much in several years, but I must say the set of concepts in it make it incredibly expressive (as in "compact, precise and readable").

### If you're still doubtful of

If you're still doubtful of the PLT relevance, it's worth checking out some of these screenshots (there are 20 or so). It gives a flavour of what the web should be one day, an interactive programming experience, like a super-duper spreadsheet on steroids.

### My issue is that there is no

My issue is that there is no technical (PLT related) information that is worth discussing. If there is, by all means let us know where to find it!

### wolfram/alpha is plt appropriate (?)

Here is an ambiguous program in an unspecified language: "Boston Red Sox hits".

The compiler is pre-programmed to link any compiled form of this ambiguous program with some libraries that contain various statistics about the Boston Red Sox.

So, what kind of programming language handles that?

The one before us for consideration (W/A) treats it as a search problem with interactive feedback from users and weak-AI-style optimization of search results based on the aggregated feedback from users. What precendent is there for that and what techniques are known? What implications are there for the future of programming?

-t

### Program?

Although the line between programmer and user can get fuzzy, I would think that "Boston Red Sox hits" would be classified as an input to a program, rather than a program itself. From a PL perspective the interest in queries as a language would lie in the syntactic and semantic rules for a query that allow abstraction and means of combination. I can ask google the same question, and it gives me some useful information as well. (Google comes up with results that are probably as useful as alpha).

If I rephrased the question to "Top forty hits", I would think Alpha would switch contexts and likely give me a totally different type of answer (popular song list). So, the question is how I would go about building a generalized notion of "X hits"? And beyond reading the 5 million lines of Mathematica that went into building the query engine, how would I go about predicting the results for any query without guess or trying to reverse engineer it from the results?

Anyhow, I would think Ehud's objection is not so much whether we can classify Alpha as a programming language, but rather discussing it as a programming language is rather futile at this point given the dirth of material that can not be classified as promotional/marketing driven.

### it's programming in the sense

It's programming in the sense that "boston red sox hits" gets translated into multiple programs run over the curated data sets. The programs are ranked in terms of estimated likelihood that the translation reflects the interests of the query maker. Future versions of W|A, if there are any, will likely let users drill down more -- as in saying "Ok, I pick this translation from the list offered but I want to refine that a bit...."

-t

p.s.: I understand and agree with Ehud's objection at least to the extent that it is as you characterize it. I'm telling you what I see and I've been saying the same thing in various forums where I'm confident the W|A crew has noticed my guess and is free to speak up if I'm wrong.

### PLs are involved at some level

Definitely Mathematica is heavily involved in Alpha itself. But I just don't see how the UI presents a PL shell. Going back to SICP, we have:

A powerful programming language is more than just a means for instructing a computer to perform tasks. The language also serves as a framework within which we organize our ideas about processes. Thus, when we describe a language, we should pay particular attention to the means that the language provides for combining simple ideas to form more complex ideas. Every powerful language has three mechanisms for accomplishing this:

• primitive expressions, which represent the simplest entities the language is concerned with,
• means of combination, by which compound elements are built from simpler ones, and
• means of abstraction, by which compound elements can be named and manipulated as units.
So, I can see how the UI presents us with a method of entering expressions, but I don't see how you get combinations and abstractions.

### at least "means of

at least "means of combinations", even if no abstraction facility is available. That would make it a not-so-powerful programming language, but at least put it in the category of RPL.

### Thanks, Chris. That's was

Thanks, Chris. That's was my point.

### since it is out ...

There are even parsing issues with the box!

I tried the query "life expectancy japan year 1990" and got 83.1 years as the answer. Now I can't compose these calculations! I tried -

1. life expectancy japan year 1990 / 1980
2. life expectancy japan year 1990 / year 1980
3. life expectancy japan year 1990 / life expectancy japan year 1980
4. ratio of life expectancy japan year 1990 to year 1980

none of them work, though the intent is fairly clear to a reader. How would one parse, say, query 2 in my list and interpret it as two calculations to be combined using division?

Somehow, this example (i.e. Wolfram|Alpha) makes me feel like one should either have a formal language or an AI-class natural language engine, but the in-between stuff doesn't cut it.

WA is awesome with math though, naturally.

### PLs and DWIM

Wolfram Alpha may or may not prove to be a particularly useful tool, but I think this demonstrates why it's not really PL. PL's are predictable and compositional.

I don't think that the intention of 1 is at all clear, though. 2 is arguable, though the 3rd and 4th examples are fine, in my opinion.

And this seems to bring us to the joys of DWIM.

### informal programming ..

A while ago, on this thread there was mention of "informal languages". I have a feeling WA needs to re-orient away from "natural language" and towards "informal programming language" - i.e. provide some composition capabilities while allowing flexible expression syntax.

### query

So, WA not surprisingly does nice plots of functions. You write "tanh x" and get the plot. Now suppose I want to say "tanh bx for b=0.1, 0.2" . Can this be done?

### yup

plot tanh(bx) from b = 0.1 to 0.2

.. gets you what you want I guess.

### Not quite?

I don't think that's quite what Ehud wanted; my interpretation was that he wanted a graph of tanh(0.1x) overlaid on top of a graph of tan(0.2x).

### Hmpf

plot tanh(bx) from b = 0.1 to 0.2 step 0.1

doesn't do it... ;-)

### Right, that's what I meant.

Right, that's what I meant.

### tanh(0.1x) | tanh(0.2x)

does it, I think.

[Sorry for the second post. Stalling UMTS connection.]

### Thanks, good to know (though

Thanks, good to know (though it is amusing that it doesn't show labels on the graph so you are left guessing which of the two graphs is which, in case you don't know already...)

The points of the exercise, of course, are (a) that WA doesn't have magical understanding, but rather conventional grammar (Mathematica) (b) composition is not a trivial matter (for example, I am still not sure how to achieve this effect when the function to be plotted is presented in parametric form tanh bx). (c) can't remember what c was supposed to be... it'll come back to me, I'm sure.

### I deleted marco's duplicate

I deleted marco's duplicate post and inadvertently deleted a reply that was attached to it. I apologize for the mistake. Please repost.

### Not so much parsing issues...

Actually, this is not a parse problem but a back-end data problem. Both of the facts that you are referencing are there, and it does know what computation you are asking for, but the result returned is "insufficient information"... not "alpha doesn't know what to do with your input" (which is the error you get on a parse problem).

The problem seems to be the years involved, as "life expectancy US divided by life expectancy japan" works just fine, but "(life expectancy US 1980) / (life expectancy japan 1990)" while well formed claims to be missing data for japan. It is clearly not missing any data, as both of the sub-queries work fine on their own.

I would not say that this is any deficiency in the language engine, but a *BUG* in the structural data which should be reported to Wolfram. So far their response time on these sorts of reports seems to be under 12 hours, judging from watching their "community" site where such problems are being reported since launch.

### Almost all informational

Almost all informational material propagated by humans is promotional/marketing driven; academic papers are a long, long way from the least offenders in this category.

### Perhaps

But the target market for Alpha is not PL enthusiasts (at least at the current time), so there is likely little of interest to us here on LtU. Perhaps more technical material will be available for our consideration (consumption) at a later stage, giving details of how PLs informed Alpha design and/or user interface. But for now, the demand for information has exceeded supply, and we are left as pure speculators in a market that may never emerge.

### Attribute Grammars (maybe on Finite Lattices)

The one before us for consideration (W/A) treats it as a search problem with interactive feedback from users and weak-AI-style optimization of search results based on the aggregated feedback from users.
What precendent is there for that and what techniques are known?

A simplified grammar of English could handle multiple syntax, the finite lattices could compute the results, or queries.

### I think it is relevant...

There is some PLT to Wolfram/Alpha. The confusion in the top post of what exactly it is is widespread. I've no insider knowledge but have been following the story. So here is how I think it can be demystified and why there are PLT items of interest:

The system appears to be a layered architecture.

At the lowest layer, data-sets of general interest are loaded into a varient of mathematica and a library is built-up to visualize and explore those data sets in obvious ways.

In the middle layer is a kind of variant of a prolog compiler: abstract propositions go in - the compiler generates a list of possible translations into mathematica code, sorted by "relevance" heuristics - when run, each mathematica translation generates a possible binding for the free variables.

On the top layer is a kind of ad hoc NLP translator from what people type into the search box to what goes into the "prolog" compiler.

So there are three programming languages central to the thing: (1) the approximation of natural language that the query box accepts (2) the langauge that translates the abstract syntax trees of that natural language into various possible mathematica programs, sorted by heuristics of relevance; (3) mathematica itself.

-t

edit:

I think the notion of taking an ambiguous program that resembles an ad hoc search query and using heuristics and a basic inference engine to translate it into multiple possible programs, ranked by a guess at "relevance" - is deep. The computer is guessing what program you meant to write and offering up its best guesses as search results - that's interesting.

### Thanks for that explanation!

Thanks for that explanation! The multiple program generation is something that is totally new to me.

### Its alive.

Wolfram|Alpha is now live btw.


text:
Main> Academic Writing> How do i write a linear equation

# How do i write a linear equation

Differential equations Khan Academy One of the points that the line passes through has got the coordinates (3, 5). How do you like me now that is what the differential equation would say in response to your shock! Linear differential equations that contain second.

How can I solve multivariable linear equation in python? - Stack. This unit is very important, because in many real life situations, you will not be given an equation to solve. How do I check whether a file exists using Python? Solving a linear equation in one variable

Linear A sur Amazon - Linear A en stock. You will be given a problem, that will require you to first write the equation and then to solve the equation. Amazon.fr/livres

IXL - Write a linear equation from a graph 8th grade math. The following links to update your printed Texas Administrative Code (TAC). Fun math practice! Improve your ss with free problems in 'Write a linear equation from a graph' and thousands of other practice lessons. Sn in Remember.

How to Write Linear Equations Given Two Points - YouTube The standard form of the linear equation can be derived from the graph or from given values. Watch More. How to Write Linear Equations Given Two Points Linear Algebra Education

How to Write Linear Equations in Algebra eHow It's possible to write an equation relating x and y using the slope formula with $$\left (x _\, ,y_ \rht )=\left ( 3,5 \rht )\: and\: \left ( x_,\, y_ \rht )=\left ( x,y \rht )$$ $$m=\frac$$ $=\frac$$\, =\frac$$$\left ( x-3 \rht )=y-5$$Since we used the coordinates of one known point and the slope to write this form of equation it is ed the point-slop form$$y-y_=m\left ( x-x_ \rht )$$Another way of writing linear equations is to use the standard form$$Ax By=C Where A, B and C are real numbers and where A and B are not both zero. How to Write Linear Equations in Algebra. Algebraic linear equations are mathematical functions that. How to Write a Linear Regression Equation.

Write linear equations from tables LearnZillion Click on the lesson below that you need help with, or follow along in order to complete the unit on Writing Equations. In this lesson you will learn how to write linear equations from tables.

Simplex algorithm - pedia It is a horizontal line: f(x) = C No matter what value of "x", f(x) is always equal to some constant value. If the b value for a constraint equation is negative, the equation is negated before adding the identity matrix. In other words, a linear program is a.

Write a linear equation from a data - YouTube This format provides the capacity to obtain printed copies from the Internet that are compatible with your printed copy of the TAC. This middle school math video demonstrates how to write a linear equation when given a table of data. Skip navation. Writing Linear Equations from.

Linear Equations - Join the thousands of educators who use My Lab and Mastering each year to improve results. Linear Equations. A linear equation is an equation. There are many ways of writing linear equations. You may like to read some of the things you can do with.

How do i write a linear equation:

Rating: 96 / 100

Overall: 98 Rates
binancebinance exchangebinance exchange website
Observation essay peer review

NEWS

format: plain


text:
GOTTLIEB SUBSETS WITH RESPECT TO A MORPHISM IN THE CATEGORY OF PAIRS

Title & Authors
GOTTLIEB SUBSETS WITH RESPECT TO A MORPHISM IN THE CATEGORY OF PAIRS
Kim, Ji-Yean; Lee, Kee-Young;

Abstract
We introduce the concept of cyclic morphisms with respect to a morphism in the category of pairs as a generalization of the concept of cyclic maps and we use the concept to obtain certain sets of homotopy classes in the category of pairs. For these sets, we get complete or partial answers to the following questions: (1) Is the concept the most general concept in the class of all concepts of generalized Gottlieb subsets introduced by many authors until now? (2) Are they homotopy invariants in the category of pairs? (3) When do they have a group structure?.
Keywords
category of pairs;cyclic map;cyclic morphism;generalized Gottlieb subset;
Language
English
Cited by
References
1.
D. H. Gottlieb, A certain subgroup of the fundamental group, Amer. J. Math. 87 (1965), 840-856.

2.
D. H. Gottlieb, Evaluation subgroups of homotopy groups, Amer. J. Math. 91 (1969), 729-756.

3.
D. H. Gottlieb, Covering transformations and universal fibrations, Illinois J. Math. 13 (1969), 432-437.

4.
P. J. Hilton, Homotopy Theory and Duality, Mimeographed Notes, Cornell Univ. Ithaca, NY, 1959.

5.
G. E. Lang, Evaluation subgroups of factor spaces, Pacific J. Math. 42 (1972), 701-709.

6.
K. Y. Lee and M. H. Woo, The G-sequence and the ${\omega}-homology$ of a CW-pair, Topology Appl. 52 (1993), no. 3, 221-236.

7.
K. Y. Lee and M. H. Woo, Cyclic morphisms in the category of pairs and generalized G-sequences, J. Math. Kyoto Univ. 38 (1998), no. 2, 271-285.

8.
K. Y. Lee, M. H. Woo, and X. Zhao, Certain generalizations of G-sequences and their exactness, Bull. Korean Math. Soc. 45 (2008), no. 1, 119-131.

9.
K. L. Lim, On cyclic maps, J. Austral. Math. Soc. Ser. A 32 (1982), no. 3, 349-357.

10.
N. Oda, The homotopy set of the axes of pairings, Canad. J. Math. 42 (1990), no. 5, 856-868.

11.
J. Pan, X. Shen, and M. Woo, The G-sequence of a map and its exactness, J. Korean Math. Soc. 35 (1998), no. 2, 281-294.

12.
J. Siegel, G-spaces, W-spaces and H-spaces, Pacific J. Math. 31 (1969), 209-214.

13.
K. Varadarajian, Generalised Gottlieb groups, J. Indian Math. Soc. (N.S.) 33 (1969), 141-164.

14.
M. Woo and J. Kim, Certain subgroups of homotopy groups, J. Korean Math. Soc. 21 (1984), no. 2, 109-120.

15.
M. H. Woo and K. Y. Lee, On the relative evaluation subgroups of a CW-pair, J. Korean Math. Soc. 25 (1988), no. 1, 149-160.


text:
# Invoking function stored in a struct using Rust

I'm new to Rust, and I'm writing a basic command line input parser as a learning exercise. Commands entered on the command line are evaluated using the Cmd struct which contains the name of the command and a function to call when invoked. Though the code works, I find the use of the get_invocation function to be a little weird.

pub struct Cmd<T: FnMut()> {
name: String,
invocation: T,
}

impl<T: FnMut()> Cmd<T> {
pub fn new(name: &str, invocation: T) -> Cmd<T> {
Cmd {
name: String::from(name),
invocation,
}
}

pub fn invoke(self) {
self.get_invocation()();
}

fn get_invocation(self) -> T {
self.invocation
}
}

I am aware that I could use (self.invocation)() to directly call my struct function in invoke(), but that would involve setting the invoke self parameter to mutable, which would require me to make each instance of Cmd mutable if I wish to use the invoke() function. This is something I would like to avoid as, conceptually, nothing in the struct is being mutated. Is there a less odd / more idiomatic way to deal with stored function invocation in Rust, while still maintaining immutability? I also would appreciate any other pointers/tips on my code.

There are two distinct applications of mutability in Rust:

1. Bindings (variables) can be mutable or immutable.
2. Borrows (references) can be mutable or immutable.

Here, you're not using any borrows, so we're only concerned with bindings.

Note that values are not intrinsically mutable or immutable. Therefore, when you move a value from one binding to another, you can change the mutability. The methods invoke and get_invocation take ownership of the Cmd, therefore they can decide to declare self as mutable, even if the original value is not declared as mutable. For example, this is valid:

impl<T: FnMut()> Cmd<T> {
pub fn invoke(mut self) {
(self.invocation)();
}
}

fn help() {
println!("not implemented yet :)");
}

fn main() {
let cmd = Cmd::new("help", help);
cmd.invoke();
}

If you were to take self by mutable reference, rather than by value, then the original variable would indeed need to be declared as mutable. You could not invoke the function with only an immutable reference, because FnMut closures can't be invoked from an immutable borrow. If that's a problem, switch to Fn instead.

impl<T: FnMut()> Cmd<T> {
pub fn new(name: &str, invocation: T) -> Cmd<T> {
Cmd {
name: String::from(name),
invocation,
}
}

pub fn invoke(&mut self) {
(self.invocation)();
}

fn get_invocation(&mut self) -> &mut T {
&mut self.invocation
}
}

fn help() {
println!("not implemented yet :)");
}

fn main() {
let mut cmd = Cmd::new("help", help);
cmd.invoke();
}


text:
# Update on mathport (Dec 2021)

mathport is the tool we're planning on using to help us port mathlib to Lean 4. It has mostly been written by Mario Carneiro and Daniel Selsam, and Gabriel Ebner and I have been making some fixes.

To provide some context, mathlib is the primary library for mathematics in Lean 3, containing over 700k lines of code and growing fast! Lean 4 now has a preliminary release, and we would really like to transition to building a mathematics library in Lean 4. While the type theory and kernel in Lean 4 are quite similar from a user point of view to Lean 3, it is certainly not the case that we can run Lean 3 code in Lean 4. Our aspiration is to achieve a "semi-automated" port.

The mathport tool first of all provides a complete binary level port of mathlib (i.e. generating a Lean 4 .olean file for every .olean file in mathlib). This means that you will be able to import all files from mathlib, as long as you don't expect to be able to look at the actual sources! We have largely rejected the idea of a dual-compilation setup, in which existing code stays in Lean 3, while new code is written in Lean 4. The binary port could make this viable, but it seems complicated and fragile, and the community is excited to take full advantage of Lean 4. (A dual-compilation setup would not allow Lean 3 files to import from Lean 4 files, so the version transition would have to be a cut across the import graph.) Thus mathport further attempts a "best-effort" port of the source files, translating Lean 3 syntax to Lean 4 syntax. Right now, that "best effort" is not quite good enough!

Our goal is that this will steadily improve, until we reach a point at which it become viable for humans to finish the migration in an incremental fashion. Notably, because of the size of mathlib, and its growth rate, we have decided it is not desirable to "freeze" mathlib3 until very late in the process. (Throughout this document, mathlib refers to the current mathlib repository, but I'll try to consistently include the 3 to disambiguate!) Thus we will be regularly running mathport on a continuously evolving mathlib3 repository, and for an initial period not depositing the output in the mathlib4 repository. Nevertheless, mathport takes as input both mathlib3 and mathlib4, and attempts to automatically make use of the parts of the library which have already been ported, by "aligning" definitions. Thus once the output quality of mathport is sufficiently good, we expect to be able to move files across to the mathlib4 repository (starting from the bottom of the import hierarchy), while continuing to re-run mathport on the still evolving mathlib repository! Eventually, however, we will declare "flag day", at which point the mathlib3 repository will stop accepting PRs for new material, and we have a (hopefully brief!) intensive period of completing the migration.

Notably, mathport makes no attempt to automatically translate the tactics that have been written in mathlib3. Metaprogramming is sufficiently different in Lean 4 that this would be impossible, and moreover there are significant stylistic differences when writing tactics in Lean 4, so a literal translation would not be desirable. This means that we have a huge amount of work remaining to re-implement all the mathlib3 tactics in Lean 4. We've already done a few important ones (notably simp is implemented in Lean 4, and we have ring in mathlib4). We would really like to preserve feature parity as we make the transition, and so are hoping to re-implement tactics, rather than "dumb-down proofs" wherever possible.

The occasion for this blog post is that we now have continuous integration set up for mathport, and a reasonably easy to use setup that lets you work with the output of mathport without having to run it yourself.

I'll describe that setup up below, but first explain what sort of efforts are probably most useful right now to help the mathlib port.

They are approximately in priority order, in terms of my guess about what will hold up the port the most.

• Porting missing tactics from mathlib3 to mathlib4. This is still a huge task, and will not be automated in any way. If you've contributed tactics to mathlib3, please consider trying to port them to Lean 4. If you're interested in learning some Lean 4 metaprogramming, what better way to do that than porting tactics? We'll write more about this in a future post, with some pointers about places to get started, and how to hook up new tactic implementations to the existing tactic parsers that Mario has already ported to mathlib4.
• Resolve outstanding issues in mathport. (On some issues there's already an indicated fix but it needs implementing/testing. Other issues still need diagnosis.)
• Open the mathlib3port repository (instructions below), look at files (probably starting with "low-level" files), and identify things that mathport should be doing better. Check there isn't already an open issue, then open an issue.
• Note: at this stage I think it would be a bad idea to actually take a file from mathlib3port, clean it up, and PR it to mathlib4. That will hopefully come later, but we need to fix many mathport issues first.
• Instead, it is fine to make changes that you think mathport should be doing already and committing these on a branch, so that you can link to diffs when opening mathport issues.
• For now, don't worry too much about the state of proofs. We'd like to get to a state where the vast majority of statements are correctly translated as soon as possible.
• There are still many alignment problems between Lean 3 / mathlib3 declarations, and Lean 4 / mathlib4 declarations. Sometimes these can be fixed by adding #align commands in mathlib4. Sometimes they may turn out to be mathport bugs. Sometimes they will reflect deeper design problems we're going to need to talk about!

## Background: what is mathport?

mathport consists of two loosely coupled components: binport (largely Daniel's work), and synport (largely Mario's work).

• binport constructs Lean 4 .olean files, from Lean 3 .olean files. It largely works, and means that you can import mathlib3 content into Lean 4 (as long as you don't expect to have source files!) This is what lets us do things like:

import Mathbin

#lookup3 algebraic_geometry.Scheme
#check AlgebraicGeometry.Scheme

Yay, Lean 4 has schemes! :-) To see this file in action, you should check out a copy of the mathlib3port repository described below, and make a new file there.

• synport constructs Lean 4 .lean files, on a "best effort" basis. (It uses both the output from binport, and Lean 3's --ast output to guide it.) We should not expect that this will ever converge to a perfect translator. Instead the hope is that it gives us something that humans can plausibly improve to a complete translation of mathlib3.

To understand how mathport (mostly talking about the synport part from here on) works, it's important to understand that it is translating mathlib3 to Lean 4 source code, "modulo" the current content of mathlib4. That is, the premise is that as we progressively construct mathlib4 (whether by translating by hand, moving content from mathport's output to mathlib4, or adding #align statements) the output from running mathport on mathlib3 will change. In particular, as mathport is translating each declaration, it checks to see if a corresponding declaration in mathlib4 already exists, and is defeq. If so, mathport will instead just use that declaration. If not, mathport will make a copy, appending a × to the name. Sometimes these misalignments are due to an unintentional non-defeq, that can be fixed in mathlib4. Other times, we genuinely want to change something in mathlib4 (e.g. to use Lean 4's multiple parent structures, which are better than old_structure_cmd). As a result, we expect that some misalignments will persist throughout the mathport-assisted stage of the port, and only afterwards will we polish these away.

A detailed account of how binport and synport are working is beyond the scope of this blog post. Hopefully we'll have one eventually, but in the meantime Mario's talk is very helpful.

## What should I look at?

Please note that mathport takes considerable resources to run on mathlib3: approximately 3.5 hours, and 32gb of RAM. So you'll probably want to look at artifacts generated by CI rather than running it yourself. There are four GitHub repositories you can look at:

• mathlib3port should be most people's first stop. This contains a copy of the .lean files produced by a recent run of synport, in the Mathbin directory. You should just be able to check out a copy of this repository, and open the folder in VS Code, to see the current state of mathport output. You can also try out the above example with #check AlgebraicGeometry.Scheme in a fresh file here.
• Remember the synported files are expected to be horribly broken; most tactics aren't implemented, and there are bugs around parenthesization of arguments, and name resolution!
• Good luck finding even a single file that compiles cleanly right now.
• lean3port is the corresponding repository containing a copy of a recent run of mathport on the Lean 3 core library. It's less interesting perhaps, but also smaller and easier to inspect.
• mathport contains the code for mathport itself, as well as the continuous integration set up that runs mathport on Lean 3 core and mathlib3 every time there is either a PR to mathport, or a commit to master. The artifacts produced by CI appear at https://github.com/leanprover-community/mathport/releases, and the two repositories listed above have a lakefile.lean that will download and unpack these artifacts.
• mathlib4 is the current preliminary port of mathlib to Lean 4. Later, when mathport begins to stabilize, we will begin moving files from the output of mathport into this repository, but not yet. For now, this repository serves several purposes:

• Primarily, it is the home for ports of tactics implemented in mathlib3 to Lean 4.
• In order to build these tactics, a certain minimal library is necessary (e.g. for the ring tactic, we need the notion of a ring!) and we are constructing this by hand.
• There is scope for experimental developments, but please don't just port parts of mathlib3 to Lean 4 for the sake of doing so. If you're investigating how some new Lean 4 feature might be used in the eventual port of mathlib, it's okay to do so in this repository.

For now, the mathlib4 repository has fairly low standards: we don't expect the full review process used in mathlib3. Notable parts of the mathlib4 repository relevant for mathport are:

• Mathlib/Mathport/SpecialNames.lean contains a sequence of #align statements, for cases where a definition in Lean 4 core has a different name from the name that would be produced automatically by changing case conventions from Lean 4 or mathlib3.
• Mathlib/Mathport/Syntax.lean contains definitions of all the syntaxes of tactics currently implemented in mathlib3. These have been written by hand by Mario, and we should take care to keep these up to date. Please be careful editing this file, and we also need to remember to update it if any further changes to tactics land in mathlib3. Because in this file we only have the syntax statements, if you try to use the tactics here you will get Tactic not implemented yet errors. If you would like to work on porting tactics, essentially this file is the TODO list! You should take the relevant syntax definitions, move them to their own file in the Mathlib/Tactic/ directory, and provide an implementation. Conversely, please do not start porting a mathlib3 tactic without faithfully reproducing the syntax, as this will then cause problems for mathport. It's completely fine to provide an interim port, that throws errors when encountering some of the bells and whistles specified by a syntax declaration.

## How do I run mathport?

The Makefile in https://github.com/leanprover-community/mathport is currently the best available documentation for running mathport. You will need to make sure you have curl, git, cmake, and elan installed on your system. Basic usage is make build source predata port.

These stages are:

• build: compile mathport (which is written in Lean 4) itself
• source: pull the relevant commits of Lean 3 and mathlib3, and do a little preparatory work in those directories
• predata: recompile the Lean 3 library and mathlib3, with lean --ast --tlean, to generate the auxiliary files mathport needs.
• port: run mathport on Lean 3 and mathlib3.

Running all of them in sequence is necessary if you're starting from scratch, but is painfully slow.

You don't really want to run make predata yourself. Typically you don't want to run make port on the entire library either: you'd prefer to download an artifact containing the results, but then re-run mathport on a single file, in order to try out a bugfix to mathport.

We provide artifacts for various stages of the build on the releases page of the mathport repository. The script ./download-release.sh nightly-YYYY-MM-DD downloads one of these, after which you can skip the make predata and/or make port steps (you will still need to run make build and make source).

If you've already got a local copy of the output of make port (either by running it yourself, or using ./download-release.sh) you can also use the make TARGET=data.nat.bitwise port-mathbin-single target (similarly for port-lean-single) to run mathport on a single file. This is useful if you are testing a change to mathport.


text:
# Math Help - Integrating factors

1. ## Integrating factors

So, some guidance would be helpful.

$ydx+(2xy-e^{-2y})dy = 0
$

$\frac{1-2y}{-y}$

$e^{^-{\int \frac{1}{y}-2}}$

$\frac{e^{2y}}{y}$ is the integrating factor.

And upon solving, the answer is: $C = xe^{2y}-ln|y|$?

2. $y\,dx + (2xy - e^{-2y})\,dy = 0$

$y\,\frac{dx}{dy} + 2xy - e^{-2y} = 0$

$\frac{dx}{dy} + 2x - \frac{e^{-2y}}{y} = 0$

$\frac{dx}{dy} + 2x = \frac{e^{-2y}}{y}$.

The integrating factor is $e^{\int{2\,dy}} = e^{2y}$

So multiplying through by the integrating factor gives

$e^{2y}\,\frac{dx}{dy} + 2e^{2y}x = \frac{1}{y}$

$\frac{d}{dy}(e^{2y}x) = \frac{1}{y}$

$e^{2y}x = \int{\frac{1}{y}\,dy}$

$e^{2y}x = \ln{|y|} + C$

$x = e^{-2y}\ln{|y|} + Ce^{-2y}$.

3. If I had solved for x at the end, I would've gotten the same answer. Is my integrating factor incorrect?

4. Originally Posted by A Beautiful Mind
If I had solved for x at the end, I would've gotten the same answer. Is my integrating factor incorrect?
I don't see how you got your Integrating Factor to be honest...

$\frac{My-Nx}{-M}$


text:
Deriving Lorentz transformations

Erland

PeterDonis, this seems quite advanced. I need to study this more to fully understand it. But isn't it much simpler in the SR case, where we have linearity and flatness?

Anyway, is it correct that in defining the Lorentz group, one assumes that the spacetime distance dx2+dy2+dz2-c2dt2 is preserved by the Lorentz transformations?
I am not willing to take this as an axiom (for physics), except when this distance is 0, since this is just another way of stating the invariance of the light speed. Otherwise, it seems in no way obvious and no simple consequence of Einstein's postulates.

PeterDonis

Mentor
isn't it much simpler in the SR case, where we have linearity and flatness?
No. The Killing vector fields I described are for the SR case, flat Minkowski spacetime.

is it correct that in defining the Lorentz group, one assumes that the spacetime distance dx2+dy2+dz2-c2dt2 is preserved by the Lorentz transformations?
It is often presented that way, but IIRC you don't actually have to make that assumption. The Lorentz group can be defined by the Killing vector fields that generate it and their commutation relations. Showing that the group of transformations on spacetime that have those commutation relations preserves the spacetime interval can then, IIRC, be derived as a theorem.

As a warmup exercise, consider the simpler case of the rotation group SO(3). This group preserves ordinary Euclidean distances in Euclidean 3-space, i.e., it preserves $ds^2 = dx^2 + dy^2 + dz^2$. But I don't think you have to assume that in defining the group; I think you can define the group by its commutation relations, and then derive as a consequence the fact that the transformations in the group preserve Euclidean distances.

I am not willing to take this as an axiom (for physics), except when this distance is 0, since this is just another way of stating the invariance of the light speed.
You can construct a basis for Minkowski spacetime using only null vectors, i.e., any vector can be expressed as a linear combination of null vectors, so invariance of null intervals is sufficient to establish invariance of all intervals.

Dale

Mentor
You can construct a basis for Minkowski spacetime using only null vectors, i.e., any vector can be expressed as a linear combination of null vectors, so invariance of null intervals is sufficient to establish invariance of all intervals.
Wow, excellent point.

How does that translate to curved spacetime where the basis vectors would only span the tangent space and not spacetime which is a manifold and not a vector space?

PeterDonis

Mentor
How does that translate to curved spacetime where the basis vectors would only span the tangent space and not spacetime which is a manifold and not a vector space?
The tangent space is still Minkowski spacetime, so as long as we are just looking at infinitesimal line elements, everything works the same way.

Once we go beyond infinitesimal line elements, there is, as you know, no such thing as a global "Lorentz transformation" in curved spacetime. Any coordinate transformation must still preserve arc lengths along curves (and other geometric invariants), but there are no global coordinate charts that have all the properties of inertial charts on Minkowski spacetime. So the viewpoint that Lorentz transformations are defined as the ones that preserve spacetime intervals doesn't really have an analogue, globally, in curved spacetime.

This, btw, is another reason to learn the definition of isotropy (and other symmetries) in terms of Killing vector fields; those definitions carry over just fine to curved spacetime. An isotropic curved spacetime is simply one which has a 3-parameter group of KVFs at every event with the commutation relations of SO(3). That's all there is to it.

Erland

No. The Killing vector fields I described are for the SR case, flat Minkowski spacetime.
OK, sorry for my misunderstanding. I know I should study differential geometry more, but I have no good book about this avaliable for the moment. I want to thank you all for trying to enlighten me. I don't mean to be difficult, but I do question things I don't find obvious.
It is often presented that way, but IIRC you don't actually have to make that assumption. The Lorentz group can be defined by the Killing vector fields that generate it and their commutation relations. Showing that the group of transformations on spacetime that have those commutation relations preserves the spacetime interval can then, IIRC, be derived as a theorem.

As a warmup exercise, consider the simpler case of the rotation group SO(3). This group preserves ordinary Euclidean distances in Euclidean 3-space, i.e., it preserves $ds^2 = dx^2 + dy^2 + dz^2$. But I don't think you have to assume that in defining the group; I think you can define the group by its commutation relations, and then derive as a consequence the fact that the transformations in the group preserve Euclidean distances.
Maybe I should know this, but what do you mean by "commutation relations"? Do you simply mean relations of the type AB=BA, or A-1B-1AB=I, where A and B are rotations (in this case)? Or do you mean the set of all commutators: A-1B-1AB, or the subgroup generated by these (the commutator subgroup) given without explicitly displaying the A:s and B:s forming the commutators, or do you mean something else?
You can construct a basis for Minkowski spacetime using only null vectors, i.e., any vector can be expressed as a linear combination of null vectors, so invariance of null intervals is sufficient to establish invariance of all intervals.
I find it in no way obvious that just because the Minkowski lengths of x and y are preserved by L, the same is true for all linear combinations of x and y. It is of course true, but I know that just because I already know what L looks like.

strangerep

Very good, but this then leads to the question: Which are the equations in the theory to which this applies?
It must apply to every equation in the theory under consideration. The question then is how to specify a "theory".

In classical dynamics, this is done by choosing a specific Lagrangian, in the context of an Action principle and the calculus of variations. The Lagrangian then determines everything (including the equations of the theory) by extremizing the action. In practice, most people therefore just concentrate on symmetries of the Lagrangian. In this sense, one says that "the Lagrangian is the theory" (with the underlying framework of Newtonian space and time being understood, together with the calculus of variations).

In the foundations of relativity, one is interested in how events perceived by one observer $O$ may be reconciled with how another observer $O'$ perceives those same events. For the specific case where the observers are unaccelerated (i.e., inertial), and in motion relative to each other (with $O'$ having relative velocity $v$ wrt $O$), and with the origins of their spatiotemporal reference frames coinciding, the equations of this "mini theory" are simply the coordinate transformations between the 2 coordinate systems. Assuming the transformations to be linear, and restricting ourselves to the 1+1D case, they are of the form $$t' ~=~ A(v) t + B(v) x ~,~~~~~~ x' = C(v)t + D(v) x ~, ~~~~~~ (1)$$where A,B,C,D are unknown functions to be determined.

One uses various physically-motivated criteria to restrict the form of A,B,C,D. One criteria is that $v=0$ corresponds to the identity transformation $t'=t, x'=x$. Another is that $$\left. \frac{dx'}{dt'}\right|_0 ~=~ -v ~~~~ \mbox{if}~~ \left. \frac{dx}{dt}\right|_0 ~=~ 0 ~.$$ Another criterion (assumption) is that the transformations form a 1-parameter Lie (semi)group, with $v$ being the parameter. This implies (among other things) that 2 successive transformations with parameters $v,v'$ must commute, and the composition of the transformations must be equivalent to a single transformation with some parameter $v'' = v''(v,v')$, to be determined.

The spatial isotropy assumption plays a role as follows. In 1+1D, it means the equations of the theory must be invariant under a reversal of all spatial vectors. Performing this reversal on (1), we get $$t' ~=~ A(-v) t - B(-v) x ~,~~~~~~ -x' = C(-v)t - D(-v) x ~. ~~~~~~ (2)$$ The equations (2) must be equivalent to (1). So, after a little algebra, we find the constraints: $$A(v) = A(-v) ~,~~~~ B(v) = B(-v) ~,~~~~ -C(-v) = C(v) ~,~~~~ D(v) = D(-v) ~.$$

Further, since $v=0$ must correspond to the identity transformation, we can (without loss of generality) substitute $B(v) = v E(v)$ and $C(v) = v F(v)$, where $E(v), F(v)$ are 2 new unknown functions.

The benefit of the above, is that we now have transformation equations where the unknown functions $A,B,E,F$ are all even in $v$. This fact can be used in subsequent steps of the derivation (but forgive me if I don't reproduce the entire thing here).

Also I wonder, how can this be used to prove that, for example, distances in directions perpendicular to the direction of motion between the frames are not changed by the transformation? (In this case, only rotations fixing the direction of motion should be used above.)
Here, you're talking about the more general 1+3D case, and what you say cannot be proven. Instead, one assumes that a rotation of the transformed axes around the boost direction has been performed (if necessary) to ensure that they're aligned with the original axes. (Strictly speaking, one might also have to perform a parity reversal as well.)

And how is it used to prove that $v_{12}=-v_{21}$?
Well, that requires a fair bit more work, applying the assumptions I outlined above to derive further constraints on the unknown functions. I'm happy to work through that detail if you wish -- provided we treat it like a homework exercise: i.e., you must do at least as much of the work as I do, and show it here on PF.

Last edited:

PeterDonis

Mentor
what do you mean by "commutation relations"?
The best way to answer that is to give an example; SO(3) will do. This is, as I said, a 3-parameter group of transformations, which means that every rotation in the group can be expressed as a linear combination of three "basis" rotations, which are called "generators". If we call the three generators $J^1$, $J^2$, $J^3$, then these three obey the following commutation relations ($[A, B]$ is the commutator of the objects $A$ and $B$, i.e., $[A, B] = AB - BA$):

$$[J^1, J^2] = i J^3$$

$$[J^2, J^3] = i J^1$$

$$[J^3, J^1] = i J^2$$

These three relations can be expressed more compactly as

$$[J^i, J^j] = i \epsilon^{ijk} J^k$$

where $\epsilon^{ijk}$ is the completely antisymmetric symbol in 3 dimensions, i.e., $e^{123} = 1$, and even permutations of the indexes have the same sign while odd ones have the opposite sign.

I find it in no way obvious that just because the Minkowski lengths of x and y are preserved by L, the same is true for all linear combinations of x and y.
A linear combination of the intervals x and y is another interval, and which interval it is is independent of the choice of coordinates. (This is just the Minkowski spacetime analogue of vector addition in ordinary Euclidean space.) So the Minkowski length of the linear combination can only depend on the lengths of x and y, and the coefficients of the linear combination. But the lengths of x and y, by hypothesis, are not changed by L, and the coefficients of the linear combination define which linear combination it is, so they can't be changed by L. Therefore, the Minkowski length of the linear combination can't be changed by L.

Erland

A linear combination of the intervals x and y is another interval, and which interval it is is independent of the choice of coordinates. (This is just the Minkowski spacetime analogue of vector addition in ordinary Euclidean space.) So the Minkowski length of the linear combination can only depend on the lengths of x and y, and the coefficients of the linear combination.
This is wrong, both in Euclidean and Minkowski space. As a counterexample in 2d Minkowski space, with $c=1$, take $x=(3,0)$ and $y=(5,4)$. Their Minkowski lengths are $l(x)=3^2-0^2=9$ and $l(y)=5^2-4^2=9$. If what you wrote is true, we would have $l(x+x)=l(x+y)$, since $x+x$ is a linear combination of $x$ and $x$ with the same coefficients as in the linear combination $x+y$ of $x$ and $y$, and $x$ and $y$ have the same Minkowski lengths. But $l(x+x)=6^2-0^2=36$ and $l(x+y)=8^2-4^2=48$.
To find a counterexample in Euclidean space is even more trivial.
You might object that we must only take linear combinations of mutually orthogonal basis vectors. But you wrote in the earlier post that we should take a basis of lightlike vectors in Minskowski space. However, in 2d Minkowski space, and I am quite sure in 3d and 4d also, we cannot find two lightlike, linearly indepent vectors which are orthogonal to each other. Two lightlike, linearly independent vectors in 2d must be two nonzero vectors $(u,u)$ and $(v,-v)$. But they are not orthogonal to each other in the Minkowski sense, since $uv-u(-v)=2uv\neq 0$.

PeterDonis

Mentor
take $x=(3,0)$ and $y=(5,4)$.
These are not null vectors. Your original hypothesis was that invariance of the interval only applied to null intervals, so $x$ and $y$ should be null intervals.

If what you wrote is true, we would have $l(x+x)=l(x+y)$
Of course this is trivially true for any pair of null intervals $x$ and $y$, since their lengths are always zero. So what my statement really amounts to is saying that, for the case under discussion ($x$ and $y$ null intervals), the length of the linear combination depends only on the coefficients of the linear combination.

$x+x$ is a linear combination of $x$ and $x$ with the same coefficients as in the linear combination $x+y$ of $x$ and $y$
Um, what? That doesn't even make sense. The coefficients of a linear combination of $x$ and $y$ are the numbers multiplying $x$ and $y$ in the linear combination, in order; i.e., for the linear combination $ax + by$, the coefficients are $a, b$. So $x + x$ has coefficients $2, 0$, while $x + y$ has coefficients $1, 1$. So these are two different linear combinations.

in 2d Minkowski space, and I am quite sure in 3d and 4d also, we cannot find two lightlike, linearly indepent vectors which are orthogonal to each other.
Basis vectors don't have to be orthogonal, they just have to be linearly independent. Finding a basis of four null vectors just means finding four null vectors that are linearly independent. (You are correct that we can't find two lightlike, linearly independent null vectors that are orthogonal; two null vectors can only be orthogonal if they are collinear.) The basis vectors in the case you're used to, an inertial frame, are all orthogonal, but that does not mean basis vectors always have to be orthogonal; they just happen to be in that particular case.

Erland

Of course this is trivially true for any pair of null intervals $x$ and $y$, since their lengths are always zero. So what my statement really amounts to is saying that, for the case under discussion ($x$ and $y$ null intervals), the length of the linear combination depends only on the coefficients of the linear combination.
$l(x)$ here means the Minkowski length of $x$. Let $x=(1,1)$ and $y=(1,-1)$. These are both null vectors. Yet, $l(x+x)=l(2,2)=0$ while $l(x+y)=l(2,0)=4\neq 0$.
Um, what? That doesn't even make sense. The coefficients of a linear combination of $x$ and $y$ are the numbers multiplying $x$ and $y$ in the linear combination, in order; i.e., for the linear combination $ax + by$, the coefficients are $a, b$. So $x + x$ has coefficients $2, 0$, while $x + y$ has coefficients $1, 1$. So these are two different linear combinations.
Linear combinations are defined for all finite sequences of vectors. It doesn't matter if some of them happens to be equal or not. So $x+x$ can be considered as a linear combination of the pair $(x,x)$, with coefficients $(1,1)$ (another possibility is $(0,2)$, and there are infinitely many more, since the pair $(x,x)$ is linearly dependent). Likewise $x+y$ can be considered as a linear combination of $(x,y)$ with coefficients $(1,1)$ (and infinitely many more possibilities, if $(x,y)$ is linearly dependent). So, the coefficients are the same in both cases.
Basis vectors don't have to be orthogonal, they just have to be linearly independent. Finding a basis of four null vectors just means finding four null vectors that are linearly independent. (You are correct that we can't find two lightlike, linearly independent null vectors that are orthogonal; two null vectors can only be orthogonal if they are collinear.) The basis vectors in the case you're used to, an inertial frame, are all orthogonal, but that does not mean basis vectors always have to be orthogonal; they just happen to be in that particular case.
It is not clear to me what you actually claim. Do you claim that every linear transformation $T$ which maps (Minkowski) null vectors to null vectors, preserve Minkowski length? If so, you are wrong.
For example, there is an invertible linear transformation $T:\Bbb R^2 \to \Bbb R^2$ such that $T(1,1)=(2,2)$ and $T(1,-1)=(1,-1)$. We see easily that it maps null vectors to null vectors: $T(x,x)=(2x,2x)$ and $T(x,-x)=(x,-x)$, and all null vectors are of these types.
Now $(2,0)=(1,1)+(1,-1)$ and $T(2,0)=T(1,1)+T(1,-1)=(2,2)+(1,-1)=(3,1)$. But $l(2,0)=4$ and $l(T(2,0))=l(3,1)=8$. Thus, $T$ does not preserve Minkowski lengths.

So, not all linear transformations which map null vectors to null vectors preserve Minkowski lengths. The question is then if you don't talk about all linear transformations, but some particular class of transformations. If so, which class and why? We cannot á priori choose the Lorentz transformations, for that would be circular.

PeterDonis

Mentor
Linear combinations are defined for all finite sequences of vectors. It doesn't matter if some of them happens to be equal or not.
You're missing my point. $x + x$ and $x + y$ are both linear combinations, sure. But they are different linear combinations. (If that fact is not obvious to you--and apparently it's not--then I strongly suggest a review of basic vector algebra, because it certainly should be obvious.) So we should expect them to result in vectors with different Minkowski lengths.

Erland

Peter, we must have misunderstood each other in some fundamental way, but I don't know in which way...

Let me recapitulate what you wrote in an earlier post:
A linear combination of the intervals x and y is another interval, and which interval it is is independent of the choice of coordinates. (This is just the Minkowski spacetime analogue of vector addition in ordinary Euclidean space.) So the Minkowski length of the linear combination can only depend on the lengths of x and y, and the coefficients of the linear combination. But the lengths of x and y, by hypothesis, are not changed by L, and the coefficients of the linear combination define which linear combination it is, so they can't be changed by L. Therefore, the Minkowski length of the linear combination can't be changed by L.
So you claim that "the Minkowski length of the linear combination can only depend on the lengths of x and y, and the coefficients of the linear combination" (my empasize).

In other words, you mean that if we have a linear combination ax+by, then its Minkowski length, l(ax+by), depends only on l(x), l(y), a, and b. So, if we have two other vectors u and v, with the same lengths as x and y, respectively, that is, l(u)=l(x) and l(v)=l(y), and take a linear combination of u and v with the same coefficients as before: au+bv, then l(au+bv)=l(ax+by).
This is simply wrong, even if we restrict ourselves to the case when l(x)=l(y)=l(u)=l(v)=0. (Counterexample: x=(1,1), y=(1, -1), u=(2,2), v=(1,-1), a=b=1.)
If you don't understand this, it's you, not me, who need to repeat linear algebra.

But if the above is a misinterpretation of what you meant, please let us know what you really meant!

PeterDonis

Mentor
In other words, you mean that if we have a linear combination ax+by, then its Minkowski length, l(ax+by), depends only on l(x), l(y), a, and b.
Yes, but I see that the word "depends" hides an ambiguity, so that the statement as I gave it can be taken in a stronger sense than I intended (and the stronger sense is false, as you say). Let me try to restate.

Suppose we pick two null vectors $x$ and $y$ as a basis for 2-D Minkowski spacetime. For concreteness, let's use $x = (1, 1)$ and $y = (1, -1)$ in ordinary inertial coordinates. Then any other vector $v$ can be expressed as a linear combination $v = ax + by$. The length of $v$ is then given by some function $f$ of $l(x)$, $l(y)$, $a$, and $b$; i.e., $l(v) = f(l(x), l(y), a, b)$; in our case, since $l(x) = l(y) = 0$, we can simplify this to $l(v) = f(a, b)$. If we then Lorentz transform, the basis vectors in the new inertial frame will have different numerical components; for example, if the Doppler factor of the transformation is 2, then in the new frame we will have $x = (2, 2)$ and $y = (0.5, -0.5)$. But the vector $v$ will still be given by $ax + by$, and the length of $v$ will still be given by $l(v) = f(a, b)$.

Now suppose we change our minds and decide to use the null vector $u = (2, 2)$ instead of $x$ as the first of our two basis vectors. Then any vector $v$ can be expressed as a linear combination $v = cu + dy$. The length of $v$ is then given by some function $l(v) = g(c, d)$, where $g$ is a different function from $f$ above. But this different formula for the length of $v$ will still be preserved by a Lorentz transformation.

Fredrik

Staff Emeritus
Gold Member
The point of a "derivation" of the Lorentz transformation is to show how, in principle, one could have used simpler ideas to guess that the Lorentz transformation would be a useful ingredient in a theory of physics. It shows that a version of SR can be found by someone who doesn't already know what the theory looks like.

If you take Minkowski spacetime as a starting point, then you're doing something very different. You are showing that Minkowski spacetime contains all the mathematics we need to state such a theory in a nice way.

Both of these things are interesting to me. The latter is an important thing to study if you want a thorough understanding of the mathematics of SR. The former is an important thing to study if you want to understand what SR has in common with, and how it differs from, pre-relativistic classical mechanics.

Minkowski spacetime can be defined as a smooth manifold, an affine space, or a vector space. These options give us equivalent theories of physics. The vector space approach is ugly in the sense that it makes one event in spacetime (the 0 vector) mathematically special, even though it's not physically special. (The theory predicts that an experiment carried out there has the same results as if it's carried out somewhere else). But the vector space approach has the advantage that it makes the mathematics much simpler.

So let's define (the vector space version of) Minkowski spacetime as the pair (M,g), where M is $\mathbb R^4$ with the usual vector space structure, and g is the map from M×M into M defined by $g(x,y)=x^T\eta y$ for all x,y in M. Now the claim that "space is isotropic" can be interpreted in the following way: The group of all vector space automorphisms of M that preserve G (i.e. the Poincaré group), has a subgroup that consists of all the linear operators on M that can be written in the form
$$\begin{pmatrix}1 & 0 & 0 & 0\\ 0 & & & \\ 0 & & R &\\ 0 & & &\end{pmatrix},$$ where $R\in\operatorname{SO}(3)$.

Of course, we can only do this if we have already defined Minkowski spacetime, so it can't be part of one of those "derivations" of the Lorentz transformation from simpler ideas. To incorporate isotropy in such a derivation, I would do the following. We're trying to find a theory of physics in which spacetime is a mathematical structure with underlying set $M=\mathbb R^4$. We want this theory to involve global inertial coordinate systems, i.e. maps $x:M\to\mathbb R^4$ that correspond to inertial (i.e. non-accelerating) observers. We want these global inertial coordinate systems to be such that if x and y are global inertial coordinate systems, then the map $x\circ y^{-1}$ is a bijection from M to M that takes straight lines to straight lines (because the motion of an inertial observer should always be a straight line in the coordinate system used by another inertial observer). It can be shown that this implies that these maps are linear. The proof is quite long. We also want this set to be a group. (This is easy to justify by physical principles). Now we can interpret the requirement of isotropy as the choice to only look for groups that have a subgroup that consists of those transformations that can be written in the form above.

It's very difficult to complete a derivation of this type. I have only seen one attempt to really carry this out, and I didn't fully understand it. The result should be that the group is either the Poincaré group or the Galilean group.

Erland

Suppose we pick two null vectors $x$ and $y$ as a basis for 2-D Minkowski spacetime. For concreteness, let's use $x = (1, 1)$ and $y = (1, -1)$ in ordinary inertial coordinates. Then any other vector $v$ can be expressed as a linear combination $v = ax + by$. The length of $v$ is then given by some function $f$ of $l(x)$, $l(y)$, $a$, and $b$; i.e., $l(v) = f(l(x), l(y), a, b)$; in our case, since $l(x) = l(y) = 0$, we can simplify this to $l(v) = f(a, b)$.
Ok, but then it is not meaningful to write $f(l(x),l(y),a,b)$, since your $f$ is a function of $x,y,a,b$, not of $l(x),l(y),a,b$, for such a function should not change its value if we change $x$ and $y$ without changing $l(x)$ and $l(y)$ (and $a$ and $b$).

But never mind. I think that much of the confusion arises from the fact that we can view an invertible linear transformation $(t,x) \mapsto (t',x')$ (in 2D) in two ways: either as a mapping of a vector to another vector, or as changing the coordinates of a vector to coordinates of the same vector in another basis.

Consider a 2D vector space $V$ and a basis $B=(\mathbf e,\mathbf f)$ of $V$. Then every vector $\mathbf v\in V$ can be uniquely written in the form $\mathbf v=t\mathbf e+x\mathbf f$.
In first case, we have an invertible linear transformation $T: V\to V$ such that $T(\mathbf v)=T(t \mathbf e + x \mathbf f)=t'\mathbf e + x'\mathbf f$, i.e. $(t',x')$ are the coordinates of the mapped vector $T(\mathbf v)$ in the same basis as before.
In the second case, we have another basis $B'=(\mathbf e',\mathbf f')$ of $V$ such that $\mathbf v=t'\mathbf e'+x'\mathbf f'$, i.e. $(t',x')$ are the coordinates of the same vector $\mathbf v$ as before, in the new basis $B'=(\mathbf e',\mathbf f')$.

Now, consider the scalar function $l: V\to \Bbb R$, defined for vectors expressed in the basis $B$ by $l(t\mathbf e +x \mathbf f)=t^2-x^2$. Our problem can then be formulated in two equivalent ways, one for each of the two viewpoints.

1. If $l(T(\mathbf v))=0$ holds for all $\mathbf v\in V$ such that $l(\mathbf v)=0$, must then $l(T(\mathbf v))=l(\mathbf v)$ hold for all $\mathbf v\in V$?

2. Let $l': V\to \Bbb R$ be be defined for vectors expressed in the basis $B'$ by $l'(t'\mathbf e'+x'\mathbf f')=(t')^2-(x')^2$.
If then $l'(\mathbf v)=0$ holds for all $\mathbf v\in V$ such that $l(\mathbf v)=0$, must then $l'(\mathbf v)=l(\mathbf v)$ hold for all $\mathbf v\in V$? (that is: is the Minkowski length given by the same formula in both bases?).

We know of course that the answers to these questions are "yes" if $T$ is a Lorentz transformation (in case 1) or if the coordinate transformation is given by Lorentz's formulas (in case 2). But the answers are easily seen to be "no" in general. It is easy to find examples of linear transformations / changes of bases for which the answers are "no". I gave some examples in earlier posts. Surely, you must agree about that, Peter?

And since the answers are "no" in general, the question is what extra conditions we must impose on the transformations /changes of bases to make the answers "yes"...

Last edited:

Erland

I'm happy to work through that detail if you wish -- provided we treat it like a homework exercise: i.e., you must do at least as much of the work as I do, and show it here on PF.
Well, I'm working on it too, despite lack of time. We'll see how it proceeds. Good post, anyway!

Erland

Fredrik, I am thinking along similar lines as you.

PeterDonis

Mentor
such a function should not change its value if we change $x$ and $y$ without changing $l(x)$ and $l(y)$ (and $a$ and $b$).
Why not? Changing the basis vectors changes the function--at least, that's how I was viewing it. Bear in mind that I'm not making any particular physical or mathematical claim here; I'm simply trying to clarify what I intended to say when I responded to your original question about whether establishing that some group of transformations maps null vectors to null vectors is sufficient to establish that it preserves the lengths of all vectors.

I also take Fredrik's point, however, that if we take Minkowski spacetime as a starting point, asking for a "derivation" of the Lorentz transformations is moot--the symmetry group of Minkowski spacetime is what it is. And if we are talking about any transformation mapping null vectors to null vectors, we must already know what a null vector is, which means we are already assuming something that probably amounts to assuming Minkowski spacetime.

I think that much of the confusion arises from the fact that we can view an invertible linear transformation $(t,x) \mapsto (t',x')$ (in 2D) in two ways: either as a mapping of a vector to another vector, or as changing the coordinates of a vector to coordinates of the same vector in another basis.
I agree that it's important to be careful about distinguishing these two views. I'll have to ponder some more to see if the intuition I was groping towards can be formulated in a way that addresses all of these concerns.

facenian

Very good, but this then leads to the question: Which are the equations in the theory to which this applies? This should be specified in a stringent exposition.
The equations to which it applies are those which represent physical laws. I think this is very important because this restrict the possible laws of physics.
And how is it used to prove that v12=−v21v_{12}=-v_{21}?
regarding this point I would ask : shouldn't it be v12=v21? I think this is an interesting question but more appropriate to be discussed in front of a blackboard

Erland

regarding this point I would ask : shouldn't it be v12=v21? I think this is an interesting question but more appropriate to be discussed in front of a blackboard
If two frames have their x-axes aligned and pointing in the same direction, and move in the x-direction, then they have opposite relative velocities: v12=-v21. If I see you go east, you see me go west.

facenian

If two frames have their x-axes aligned and pointing in the same direction, and move in the x-direction, then they have opposite relative velocities: v12=-v21. If I see you go east, you see me go west.
That's right, I withdraw my objection regarding the sign, but the original question was why symmetry or isotropy regarding both observers requires v12=-v12 and I think explaining it would be a lot easier to do it in front of a blackboard. Any way I think at this point you already got it

PeroK

Homework Helper
Gold Member
2018 Award
If two frames have their x-axes aligned and pointing in the same direction, and move in the x-direction, then they have opposite relative velocities: v12=-v21. If I see you go east, you see me go west.
This highlights my earlier point. Unless you assume symmetry how do you know two observers can align their x axes?

Erland

It turns out that PeterDonis wasn't so wrong after all. Although it is false that all linear transformations $T:\Bbb R^2\to \Bbb R^2$, which map (Minkowski) null vectors (w.r.t. the standard basis) to null vectors must preserve Minkowski length, what is true is that the Minkowski length is multiplied with a constant factor by such a transformation.
More precisely: If $l(T(\mathbf v))=0$ for all $\mathbf v\in \Bbb R^2$ such that $l(\mathbf v)=0$, then there is a constant $k\in\Bbb R$ such that $l(T(\mathbf v))=k\,l(\mathbf v)$ for all $\mathbf v \in \Bbb R^2$.

To see this, let such a transformation $T$ be given by $T(\mathbf v)=T(t,x)=(at+bx,ct+dx)$ (so $c$ is not light speed here, the latter is $1$).
Then: $l(T(\mathbf v))=(at+bx)^2-(ct+dx)^2=(a^2-c^2)t^2-(d^2-b^2)x^2+2(ab-cd)tx.$
$(1,1)$ and $(1,-1)$ are null vectors and they are mapped to null vectors. Thus:
$(a^2 -c^2) - (d^2-b^2) +2(ab-cd)=0$ and
$(a^2-c^2)-(d^2-b^2)-2(ab-cd)=0$.
Adding and subtracting these equations, we obtain $a^2-c^2=d^2-b^2$ and $ab-cd=0$. So, putting $k=a^2-c^2$ we obtain $l(T(\mathbf v))=k(t^2-x^2)=k\,l(\mathbf v)$. This holds for all $\mathbf v=(t,x)\in \Bbb R^2$.
(I suspect that there is a general property of quadratic forms lurking in the background, but I cannot figure out what it is.)

If we also assume that $T$ is invertible, then the "lines" given by $(x,t)=u(1,1)$ and $(x,t)=u(1,-1)$ must be mapped onto each other (in some combination). From this, we can show that $c=\pm b$ and $d=\pm a$ (same sign at both places).
Now, if we interprete $T$ as a coordinate transformation between inertial frames, then $v=-c/d=-b/a$ is the velocity of Frame 2 relative to Frame 1 (so $a\neq 0$). Inverting the transformation and interpreting this in the corresponding way, we obtain that the velocity of Frame 1 relative to Frame 2 is $-v$. In other words: $v_{12}=-v_{21}$!

It remains to figure out:
1. Which extra conditions do we need to ensure that $k=1$?
2. Do we need any extra conditions (e.g. spatial isotropy) to generalize this to 4D-space?

facenian

This highlights my earlier point. Unless you assume symmetry how do you know two observers can align their x axes?
doesn't this have to do to with the supposed Euclidean geometry?

facenian

It remains to figure out:
1. Which extra conditions do we need to ensure that k=1
Since $\mathbf{T^{-1}}$ share the same property we have $l(\mathbf{v})=l(\mathbf{T^{-1}}(\mathbf{T}\mathbf{(\mathbf{v}})))=kl(\mathbf{T}(\mathbf{v})=k^2l(\mathbf{v})$ whence $k^2=1$

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving


text:
# Bernoulli equation in open vs. closed systems

Can we apply Bernoulli equation to a closed system the same way we apply it to an open system? In an open system increasing the speed of the fluid implies that either the pressure or GPE should decrease as a result of conserving energy. I wounder how would this apply to a closed system?

In a closed system where there is no flow and thus velocity = 0, Bernoulli's equation is reduced to $$P_1 + \rho gz_1 = P_2 + \rho g z_2$$ $$P_2= P1 - \rho g \Delta z$$ which is really just the normal rule for pressure in liquids. In gases usually $$\rho$$ is too small so the pressure is constant throughout the gas. So basically it is reduced to the normal rules you use for fluid statics.


text:
# Monday morning quiz: Do you know your Wolfram L vocabulary?

Posted 3 years ago
4537 Views
|
2 Replies
|
3 Total Likes
|
 The Wolfram language tries to make distinctions where John Doe wouldn't see the need/distinction. The result is a wealth of similar(?) vocab items which can be confusing to beginners.Quiz question: What do the following vocab items have in common, and why do 2 of them not belong in that list? The quiz question maybe meh but I hope you find that list as intriguing as i do. Did you know all the items (aka passive vocabulary)? And which ones did you ever use in your own code (aka active vocabulary)? I am new to the language, so i am still figuring out which ones when to use in my future programs.
2 Replies
Sort By:
Posted 3 years ago
 Seems like nobody knows the answer to the quiz question? Anyway, here is a practical example when you could make use of the above listing. Say you imported experimental data in form of a matrix of numeric values, and unfortunately some of the matrix elements are either missing, corrupt, or replaced by strings ("err", "N/A"). You decide not to bin the entire matrix but to replace those annoying :D elements in such a sensible way that you could still make use of the data for further automatic mathematical processing. This step is called data cleaning.Example: The calculation of the column mean, i.e. the mean value of a column of a numeric matrix. In[1]:= col = {2, 4, 8, 6, 5}; (* 5 valid elements, clean data *) Mean[col] (* (2+4+8+6+5)/5 = 5 *) Out[2]= 5 Now let's assume that your column has a corrupt entry, a corrupt or missing element produced by the electronic device which recorded/logged the data. In[3]:= col = {2, 4, "N/A", 6, "N/A"}; (* 3 of 5 elements are valid, 2 are corrupt *) Then you must take a decision how you want to proceed with the data. If you're interested in the column mean, then replacing the "N/A" with the value zero would not be a good idea, because it would warp the data (and the column mean) too much, (2+4+0+6+0)/5 = 2.4. Instead, a common procedure would be to replace all corrupt values with the (same) mean of the remaining values which is (2+4+6)/3 = 4. In[4]:= col = {2, 4, 4, 6, 4}; Mean[col] Out[5]= 4 However, this procedure might not be desirable for any reason. Instead, you're quizzing yourself whether the "N/A" can/cannot be replaced by a symbol which Wolfram L interprets correctly as a missing numeric value and hence calculates the correct column mean directly as (2+4+6)/3 = 4.If you're unsure which vocab item could work here, the full list from the OP gives you a systematic way for testing. As a beginner, you would think that good candidates to start with are Missing, None, Invisible, Undefined, Null, Nothing, Empty, Removed, Gone, Exclusions, Absent, Blank, Placeholder, what do you think? ;-)
 Here is another real life example. Everyday our local authority publishes the updated pair of numbers (coroona infections vs deaths) on their webpage, even on weekends. Plotting the data with ListPlot[] visualizes the course of the numbers, with the x-axis representing the day number. mytown = { (*Mon,day1*){864,430},{921,464},{981,496},{1082,556},{1156,603},{1214,634},{1260,652} }; ListPlot[{ mytown[[All,1]], mytown[[All,2]] }] Day after day you collect the data from week2 but notice that for Friday and Saturday the authority didn't publish any data. You want ListPlot[] to plot an invisible data point for day12 and day13, so that the overall imaginary curve is still intact, not falsified. You don't want to substitute {0,0} for either day, because that would be amateurish. Again, as a beginner, you would think that good candidates to start with are Missing, None, Invisible, Undefined, Null, Nothing, Empty, Removed, Gone, Exclusions, Absent, Blank, Placeholder. However, the correct vocab item to substitute here in order to get the desired effect is Indeterminate. mytown = { (*Mon,day1*){864,430},{921,464},{981,496},{1082,556},{1156,603},{1214,634},{1260,652} ,(*Mon,day8*){1273,659},{1296,675},{1368,707},{1427,738},(*day12*){Indeterminate,Indeterminate},(*Sat*){Indeterminate,Indeterminate},(*Sun*){1532,777} }; ListPlot[{ mytown[[All,1]], mytown[[All,2]] }] I've been observing the #flattenthecurve of our town area, manually collecting the daily numbers everyday. When the publisher skipped some days, i was reminded of this thread to pick the appropriate Wolfram L vocab item to insert in my data set, instead of inserting {0,0}. I wasn't sure which one to pick and had to try various 2213 ones myself!


text:
It is currently 16 Dec 2017, 08: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

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# Mr. Kramer, the losing candidate in a two-candidate

Author Message
TAGS:

### Hide Tags

Intern
Joined: 16 Aug 2005
Posts: 37

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

### Show Tags

19 Feb 2006, 12:33

We look for x such as: x*0.6*N+0.4*N>0.5*N
x*0.6>(0.5-0.4)
x>1/6=16.66%

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

Director
Joined: 05 Feb 2006
Posts: 893

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

### Show Tags

20 Feb 2006, 02:15
Or...

940.000 votes he received (which we now is 40% of total) translates into 2.350.000 of total votes....

The question asks what percent of the REMAINING votes he would need, so the REMAINING votes equates to 2.350.000-940.000=1.410.000

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

Manager
Joined: 23 Jul 2008
Posts: 193

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

### Show Tags

18 Nov 2008, 12:15
bindrakaran001 wrote:
Mr. Kramer, the losing candidate in a two-candidate election, received 942,568 votes, which was exactly 40 percent of all the votes cast. Approximately what percent of the remaining votes would he need to have received in order to have won at least 50 percent of all the votes cast?
(A) 10%
(B) 12%
(C) 15%
(D) 17%
(E) 20%

It is D

Assuming he got 40 of the 100 votes. He needs 10 more==> 10/60X100=16.66

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

Manager
Joined: 14 Oct 2008
Posts: 160

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

### Show Tags

18 Nov 2008, 15:00
can this really be done by assuming 100 ? Can you pls confirm the QA bindrakaran ?

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

Director
Joined: 01 Feb 2011
Posts: 707

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

### Show Tags

11 May 2011, 17:50
you really dont have to use a lot of algebra.

given (40/100)(V) = 942568 where V is the total number of votes

=> (60V/100) is the remaining and we were asked to find what % of remaining votes does he need to win

( he needs 10% more votes to win)

=> $$(p/100)(60V/100) = 10V/100$$

=> p = 17%

if you look carefully we dont even have to use the 942568 any where in our calculation. Hope it helps.

tonebeeze wrote:
I got this problem correct using brute force algebra, but the process took to long. What is the most efficient method to solve problems like this one?

Mr. Kramer, the losing candidate in a two-candidate election, received 942,568 votes, which was exactly 40 percent of all votes cast. Approximately what percent of the remaining votes would he need to have received in order to have won at least 50 percent of all the votes cast?

a. 10%
b. 12%
c. 15%
d. 17%
e. 20%

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

VP
Status: There is always something new !!
Affiliations: PMI,QAI Global,eXampleCG
Joined: 08 May 2009
Posts: 1268

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

Re: PS: What's a Quick Way to Get This? [#permalink]

### Show Tags

11 May 2011, 20:22
Good method to solve these kinds of questions.

Equating to 10,1 and 5 respectively.
_________________

Visit -- http://www.sustainable-sphere.com/
Promote Green Business,Sustainable Living and Green Earth !!

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

TOEFL Forum Moderator
Joined: 16 Nov 2010
Posts: 1589

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

Location: United States (IN)
Concentration: Strategy, Technology
Re: PS: What's a Quick Way to Get This? [#permalink]

### Show Tags

11 May 2011, 21:58
942568 = 0.4x

942568 + y = 0.5x

y = 0.1x

=> 0.1x/0.6x * 100 = 100/6 = 50/3 = 16.66 ~ 17%

_________________

Formula of Life -> Achievement/Potential = k * Happiness (where k is a constant)

GMAT Club Premium Membership - big benefits and savings

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

Non-Human User
Joined: 09 Sep 2013
Posts: 14813

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

Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

24 Apr 2014, 23:19
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________

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

Intern
Joined: 05 Feb 2014
Posts: 26

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

Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

17 Nov 2014, 07:03
Let x = total # of votes casted
so, 0.4x + y*0.6x = 0.5x

solve for x. Ans

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

Non-Human User
Joined: 09 Sep 2013
Posts: 14813

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

Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

27 Dec 2015, 19:11
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________

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

Senior Manager
Joined: 03 Apr 2013
Posts: 291

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

Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

07 Jul 2016, 22:14
Curly05 wrote:
Mr. Kramer, the losing candidate in a two-candidate election, received 942,568 votes, which was exactly 40 percent of all votes cast. Approximately what percent of the remaining votes would he need to have received in order to have won at least 50 percent of all the votes cast?

A. 10%
B. 12%
C. 15%
D. 17%
E. 20%

No need to use the given number of votes..

The total votes are = 100%

Kramer = 40%

Kramer needs 10% of the total votes to become 50%..we will take this out from Opponent's votes

Thus,

$$\frac{10}{60}$$

_________________

Spread some love..Like = +1 Kudos

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

Current Student
Joined: 18 Oct 2014
Posts: 903

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

Location: United States
GMAT 1: 660 Q49 V31
GPA: 3.98
Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

08 Jul 2016, 05:19
Curly05 wrote:
Mr. Kramer, the losing candidate in a two-candidate election, received 942,568 votes, which was exactly 40 percent of all votes cast. Approximately what percent of the remaining votes would he need to have received in order to have won at least 50 percent of all the votes cast?

A. 10%
B. 12%
C. 15%
D. 17%
E. 20%

Given number is irrelevant here.

x= .10n (.50n-.40n)

if .60n is 100% then .10n = .10*100/.60= 17% (Approximately)

_________________

I welcome critical analysis of my post!! That will help me reach 700+

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

Non-Human User
Joined: 09 Sep 2013
Posts: 14813

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

Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

24 Jul 2017, 07:33
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________

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

Senior Manager
Joined: 28 Jun 2015
Posts: 300

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

Concentration: Finance
GPA: 3.5
Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

24 Jul 2017, 08:28
60x/100 = 10
x = 1000/60 = ~17.
_________________

I used to think the brain was the most important organ. Then I thought, look what’s telling me that.

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

Manager
Joined: 21 Jul 2017
Posts: 89

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

Location: India
GMAT 1: 650 Q47 V33
GPA: 4
Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

23 Aug 2017, 09:30
Curly05 wrote:
But how did you get six remaining parts, partner?

We have taken the total as 10. Since, he received 40% i.e., 4 this implies he didn't get 60% i.e., 6 votes.

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

Manager
Joined: 03 May 2014
Posts: 167

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

Location: India
WE: Sales (Mutual Funds and Brokerage)
Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

08 Sep 2017, 20:11
No need to get bogged down with calculations. Since it is a % problem.
40% of 100=40
Left=60(100-40)
Now we need a % of 60 so that the no obtained can be added to 40 to make it 50 or 50% of the total votes.
10% of 60=6
15% of 60=9
17% of 60=10.2-Answer(question says approx value)

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

VP
Status: Learning
Joined: 20 Dec 2015
Posts: 1087

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

Location: India
Concentration: Operations, Marketing
GMAT 1: 670 Q48 V36
GRE 1: 314 Q157 V157
GPA: 3.4
WE: Manufacturing and Production (Manufacturing)
Re: Mr. Kramer, the losing candidate in a two-candidate [#permalink]

### Show Tags

09 Sep 2017, 04:23
It is a very tricky question the number of voters seem to suggest a lot of calculation but we do not have to use that number
Kramer got 40% of the votes

Now to get 50 percent he must get 10 percent more
So so 10/60*100=16.66
or 17% hence D is the answer
_________________

We are more often frightened than hurt; and we suffer more from imagination than from reality

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

Re: Mr. Kramer, the losing candidate in a two-candidate   [#permalink] 09 Sep 2017, 04:23

Go to page   Previous    1   2   [ 37 posts ]

Display posts from previous: Sort by


text:
Biostar Beta. Not for public use.
How to extract the last 1000 nt from a group of sequences in a FASTA file?
0
Entering edit mode
23 months ago
Andrei • 10
@Andrei52325

Hi everyone!

I would like to know how I can extract the 1000 last nucleotides from sequence in a FASTA file and their headers using linux command line.

There are about 2000 sequence in this FASTA file and need to extract the last 1000 nucleotides from each sequence keeping their original headers.

I am a beginner at bioinformatics and I am still learning how to manipulate FASTA files, and I'm stuck with this problem and I can not solve it.

Thanks!

sequence • 383 views
1
Entering edit mode

See this post, which uses awk to do some similar: https://stackoverflow.com/questions/30264809/trim-first-n-bases-in-multi-fasta-file-with-awk-and-print-with-max-width-format

The command in the last code block should be somewhat easy to modify. Instead of using the left_trim argument to trim the first 1000 bases as in the example, you could modify the script to keep the last 1000 bases (something like replacing start=left_trim+1; for strat=length(rec) - left_trim + 1). Try it out and test on some examples.

1
Entering edit mode

I could do it! I'm very thankful for your help.

0
Entering edit mode

Could you please paste here the explanation that you did about sed syntax?

1
Entering edit mode

I removed it because it didn't handle sequences that spanned multiple lines, which is common for FASTA files. sed works line by line, so awk was more appropriate in that use case. But the command was cat file.txt | sed 's|^[^>].*$$.{1000}$$|\1|g, if you're intrested. Briefly, sed 's|PATTERN|REPLACEMENT|g' will match lines that have PATTERN and substitute it with REPLACEMENT. The pattern is a regular expression ^[^>].*$$.{1000}$$, which means from the a line that begins (^) with anything except a > (^[^>]) followed by anything of unlimited length .* until you can't match anything but 1000 characters of anything (.{1000}, and see greedy matching which applies here.). The last part is wrapped in parenthesis ($$.{1000}$$, or (GROUP)) where GROUP is a part of the regex you want to keep for later. The REPLACEMENT part just says "replace with group 1 " (\1). The backslashes before { } ( ) are there to say you don't want to match those characters, instead they are part of the regular expression syntax. I'd highly recommend learning more about sed and regexes for bioinformatics, they're really useful and widely used.

1
Entering edit mode

seqkit subseq supports this, if you want a fast solution.

seqkit subseq -r -1000:-1 seqs.fa > result.fa

If you want to learn programming, write some Python scripts using Biopython.

1
Entering edit mode
23 months ago
5heikki 8.4k
@5heikki9490

This requires Biopython. Save it as extractEnds.py and chmod +x extractEnds.py to make it executable and then just run it

#!/usr/bin/python

import sys
from sys import argv
from Bio import SeqIO

if (len(sys.argv) < 2):
print("Usage: extractEnds.py file.fna")
sys.exit()
else:
FNAME = argv[1]
IFILE = open(FNAME, "rU")

for record in SeqIO.parse(IFILE, "fasta"):
print(">%s\n%s" % (record.description, record.seq[-1000:]))

IFILE.close()

I'm quite a Python noob so if there's a way to make this better or there are mistakes, please let me know..

2
Entering edit mode

No need for open(FNAME, "rU") or IFILE.close(). SeqIO handles all opening and closing itself.

You can modify this simply to:

for record in SeqIO.parse(sys.argv[2], "fasta"):

1
Entering edit mode

Thanks. What's the difference between (argv[1], ..) and (sys.argv[1], ..)?

edit. nevermind, found it, it just depends on what gets imported in the start..

edit2. For years I sticked with epic GNU coreutil oneliners, but I'm starting to see the advantages of biopython. Especially if you write scripts that someone else inherits some day.. they will be much happier if you used biopython

3
Entering edit mode

If you want it to be robust, or you want the code to be used by anyone but yourself (especially if they're a novice), a dedicated parser like BioPython which covers lots and lots of edge cases is worth its weight in gold.

You could write that code in a reasonably concise one-liner too (this one also has the benefit of taking a second CLI arg for any length of sequence):

python3 -c "import sys; from Bio import SeqIO; [print(f'>{r.id}\n{r.seq[-int(sys.argv[2]):]}') for r in SeqIO.parse(sys.argv[1],'fasta')] ;" seqs.fa 1000

(Python 3 only because of a print-inside-list-comprehension and use of fstrings.

1
Entering edit mode
23 months ago
@Pierre Lindenbaum30

linearize and use a second awk to extract the last 100 characters.

awk '/^>/ {printf("%s%s\t",(N>0?"\n":""),$0);N++;next;} {printf("%s",$0);} END {printf("\n");}'  input.fasta |\
awk -F '\t' '{x=100;L=length($2);printf("%s\n%s\n",$1,(L<=x?$2:substr($2,1+L-x,x)));}'


text:
qcircuit is how you insert quantum circuits in $\LaTeX$.

Naturally, I use org-mode for notes (org-brain to be specific), and I wanted to insert qcircuit fragments inside org-mode.

Turns out, it is fairly simple. You will need to add the following in your org file:

#+LATEX_HEADER \usepackage{qcircuit}

Having this, you can simply embed your LaTeX fragments so:

* Hadamard gate:
#+BEGIN_EXPORT latex
$\Qcircuit @C=1em @R=.7em { & \gate{X} & \qw }$
#+END_EXPORT

Refer to LaTeX Export org-mode docs to look at more options.

It is very nice that the setup Just Worked with org-mode, I had set aside 2 hours for it and ended up winding up in 20min.


text:
1. ## Hyperbolic function identity

Express $4\cosh x+5\sinh x$ in the form $r\sinh (x+y)$ giving the values of $r$ and $\tanh y$.

My problem is I don't know which identities to use to change forms, I've recently started on this hyperbolic functions and am not very familiar with them yet.
Thanks!

2. Hello, arze!

We need:

. . $\sinh(A + B) \:=\:\sinh A\cosh B + \cosh A\sinh B$

. . $\tanh x \:=\:\dfrac{\sinh x}{\cosh x}$

$\text{Express }4\cosh x+5\sinh x\text{ in the form }r\sinh (x+y)$

$\text{Give the values of }r\text{ and }\tanh y$

Let: . $Z \;=\;4\cosh x + 5\sinh x$

Divide by 3: . $\dfrac{Z}{3} \;=\;\frac{4}{3}\cosh x + \frac{5}{3}\sinh x$ .[1]

Let: . $\sinh y = \frac{4}{3},\;\cosh y = \frac{5}{3}$

Substitute into [1]: . $\dfrac{Z}{3} \;=\;\cosh y \sinh x + \cosh y \sinh x$

. . . . And we have: . $\dfrac{Z}{3} \;=\;\sinh(x + y)$

Hence: . $Z \;=\;3\sinh(x + y)\;\text{ where }y \:=\:\sinh^{-1}\left(\frac{4}{3}\right)$

Therefore: . $r \:=\:3$

. . . and: . $\tanh y \:=\:\dfrac{\sinh y}{\cosh y} \:=\:\dfrac{\frac{4}{3}}{\frac{5}{3}} \:=\:\dfrac{4}{5}$


text:
# By means of fundamental identities, express each of the following in terms of sinθ only: tanθShow complete solution and explain the answer.

sciencesolve | Teacher | (Level 3) Educator Emeritus

Posted on

You need to remember what basic trigonometric identity is:

`sin^2theta + cos^2theta = 1`

You need to remember that the tangent function is rational such that: `tan theta`  = `sin theta/cos theta`

Hence, you need to form tangent function in the basic trigonometric identity by dividing identity by `cos^2 theta` . You need to divide both sides by `cos^2 theta`  to preserve the identity.

`(sin^2 theta)/(cos^2 theta) + 1 = 1/(cos^2 theta)`

`tan^2 theta + 1 = 1/(cos^2 theta)`

You need to write cos alpha in terms of sin alpha such that:

`cos^2 theta= 1 - sin^2 theta`

`tan^2 theta = 1/(1 - sin^2 theta) - 1`

Bringing the terms to a common denominator yields:

`tan^2 theta = (1 - 1 + sin^2 theta)/(1 - sin^2 theta)`

`tan^2 theta = (sin^2 theta)/(1 - sin^2 theta)`

`tan theta = +- (sin theta)/(sqrt(1 - sin^2 theta))`

Hence,writing the tangent function in terms of sin theta yields:

`tan theta = +- (sin theta)/(sqrt(1 - sin^2 theta)).`