Very roughly, P = "easy to solve", and NP = "easy to check whether a proposed solution is correct". All problems in P are also in NP. The P =? NP question is whether the reverse is also true. A problem is "NP-hard" if it's at least as hard (in some very particular sense) as every problem in NP, and it's "NP-complete" if it's NP-hard and also itself in NP. It's these NP-complete problems which are in some sense all equivalent to each other.
There are still a lot of technical details omitted here. To scratch the surface:
"Problem" aka "Language" = "yes-no questions about strings", so for example "is this string the base-10 representation of a square integer?" (in P, and therefore also in NP) or "does this string represent a square grid of numbers that's a Sudoku (generalized to allow larger grids than 9x9) with at least one solution?" (in NP, and in fact NP-complete). "Easy" = "there exists a deterministic Turing machine which correctly answers the question on every input, and always runs in a number of steps which is less than some particular polynomial in the length of the input string". (In the real world, though, "polynomial-time" is not the same thing as "easy".) A language L being NP-hard means that for any NP language M, there's a polynomial-time deterministic Turing machine which maps M-inputs to L-inputs, where yes-instances map to yes-instances and no to no. Swapping yes and no is not allowed. For NP problems you only have to be able to check solutions in poly-time if the solution indicates that the answer is "yes". The corresponding family where you can check "no" quickly is called co-NP, and it is believed that NP != co-NP. Etc etc etc.
Right, but to the extent that Lean is correct (both the semantics of the language and the implementation(s) used to check) and the proof checks with the expected axioms, then the length of the proof doesn't much matter since Lean has checked it.
You'd still have to check the theorem statement, which is not going to be nearly as easy as with FLT (Riemann uses analytic continuations etc) but it's much easier than checking a 250,000 page proof.
I'm not a lawyer. But IIUC, they probably care because of issues like contributory or vicarious copyright infringement, at least in the US.
If they are providing you a service through which you infringe someone's copyright (by playing a video game in violation of its licensing agreement) in exchange for giving them money, then they are risking a lawsuit. If they knowingly enable infringement (e.g. by rolling out a gaming service that lists and can automatically install games where they know, or could easily have checked, that the terms do not allow you to install on such a service), then they probably run a higher risk than if they don't knowingly enable it (e.g. by letting you rent cloud machines with GPUs, completely blind to what you're running on them), but in both cases they run a risk.
I'm sure there's a lot of law, and case law, that sets boundaries for this, but I could easily imagine cloud gaming falling on the wrong side of the boundaries.
I don't think there is a lot of case law here as it is a rocksolid, proven, business model. I've been renting dedicated and virtual servers for more than 25 years, and never has any provider told me what software I can install or run on those servers.
There's, unfortunately, another meaning for "validation" that's used in the adjacent context. All those form fields are validated, the tool that validates them is called, unsurprisingly, "validator"... To generalize this notion: "validation" can also mean compliance with an arbitrary set of rules, not necessarily the rules imposed by the product design.
I.e. a field in a government form for residence permit might validate if the date entered is between the applicant's arrival date and three months later. And screw the applicant who wanted to apply for the permit before they landed in the country (this is a not invented example).
Also, since I worked in "software validation", I feel like it's important to note that the dictionary definition is different from practice. For the most part, the task of validation is the one that should culminate in the testers OK'ing the shipment of the product. Typically, testers, as well as the rest of the company involved in the shipping, are painfully aware that the product doesn't meet the customer's requirements (or any formal or informal requirements). It is simply declared "valid" because the potential damage is assessed to be manageable. I.e. a product may as well be declared "valid" while having a list of "known defects".
Yeah. And e.g. NIST's glossary for IV&V is also the opposite of what I said:
> independent verification & validation (IV&V)
> A comprehensive review, analysis, and testing, (software and/or hardware) performed by an objective third party to confirm (i.e., verify) that the requirements are correctly defined, and to confirm (i.e., validate) that the system correctly implements the required functionality and security requirements.
In my experience it's more common to use "verify" for the lower-level "conforms to specs" and "validate" for the higher level "are the specs right" but in other areas it might be different.
Yeah. In general, I feel like programming is missing a glossary. Having this much freedom has its perks, but being unable to agree on basic terminology used in the industry seems like a price too steep to pay for the freedom.
In other fields (I'm more familiar with medicine), there are "bibles" that serve as a medium or the source of common language between professionals. If you are talking about radiology, then you open Basic Radiology by Chen, Pope and Ott on the designated page, and read the definition. And you know that another radiologist will do the same, and so you both have the same reference point.
In programming, even the basic stuff like variables, functions, types etc. aren't defined universally. Plenty of local environments will offer conflicting definitions (and often the definitions themselves are internally inconsistent).
Unfortunately, bodies like Wikipedia cannot serve as an authoritative source on such questions because instead they record the current state of events. They can't choose which definition to follow if there's no authority respected by the vast majority of programmers.
> where with formal verification, the specifications are lower-level, so validation is extra-important.
Specifications don't need to be lower-level. They also compose nicely. Ie you can figure out how to formally specify a 'this doesn't crash' requirement once, and then re-use it on all your projects.
I've seen similar ads. For the ones I've seen the device isn't necessarily fake: it's just a swamp cooler. They're cheap and efficient if you're suffering in a dry heat.
ETA: the ads I've seen are still deceptive because they're claiming this is revolutionary new technology, which of course it isn't.
> My belly says the naive formula is summing the triangle pyramid volumes to the origin with sign in orientation.
Yeah, that would also work but it's a slightly slower formula, sum(det(v1,v2,v3))/6. This one is summing sort of prism+pyramid shapes made by projecting each triangle to the yz plane.
Power draw is a side channel, yeah. It's not as easy to exploit in software as timing (including memory timing), but there are software exploits in some cases if it affects the CPU's frequency (HertzBleed) or if it can be read through channels like a sound card or radio receivers. For attackers who have physical access it's very much in scope.
For software like seL4 it would generally be out-of-scope, because it depends too much on the specific hardware and specific application, not just on the kernel, and protection usually requires extensive countermeasures in those places.
I agree to some extent with your thesis. But also you don't have to encode all the properties of the program in dependent types everywhere. You can have the implementation contain either no proofs or fairly few (e.g., termination and no UB, which can often be automatically discharged), and then separately prove things about it. E.g.
or whatever. That way the function's spec and implementation remain separate and readable. In my limited experience, Lean code usually works more this way rather than having the whole function and its spec in a giant dependently-typed object. For imperative code you can also use Hoare triples and vcgen, but that's currently only partly baked (i.e. proving things is a giant pain).
Maintenance is still a headache. If you change a small piece of your code, you would then need to change all the proofs that refer to it, and then if the specs also changed then you need to change all proofs that refer to those specs, etc.
In my view, a major selling point of dependent types when it comes to reasoning, is that by bundling logical properties with a runtime value, they require no separate effort to prove the propagation of the logical properties as the value is moved around. That is why I mentioned them in the context of opaque types. This is especially useful with generics: when a type parameter is instantiated with a dependent type, all its occurrences instantly benefit from the strong typing.
They can also be used to enforce just enough constraints on the inputs of a function to make it total, but this comes down to the tradeoff between either leaving an error path in the program and proving its unreachability later, or not having this error path but immediately requiring the proof. In any case, as you mention, further properties can be proved later without altering the dependent type.
I do not intend to come off as overly negative about dependent types. They have their uses, but they can also bring a maintenance nightmare.
The model usually measures in terms of fixed-size operations, e.g. 2-input binary gates. There's some variation in how to count memory lookups, but even in models where accessing a large memory counts as only one step, any tables present in the code still have to be fixed-size (except in models like P/poly, but even then they can't be exponential size).
Very roughly, P = "easy to solve", and NP = "easy to check whether a proposed solution is correct". All problems in P are also in NP. The P =? NP question is whether the reverse is also true. A problem is "NP-hard" if it's at least as hard (in some very particular sense) as every problem in NP, and it's "NP-complete" if it's NP-hard and also itself in NP. It's these NP-complete problems which are in some sense all equivalent to each other.
There are still a lot of technical details omitted here. To scratch the surface:
"Problem" aka "Language" = "yes-no questions about strings", so for example "is this string the base-10 representation of a square integer?" (in P, and therefore also in NP) or "does this string represent a square grid of numbers that's a Sudoku (generalized to allow larger grids than 9x9) with at least one solution?" (in NP, and in fact NP-complete). "Easy" = "there exists a deterministic Turing machine which correctly answers the question on every input, and always runs in a number of steps which is less than some particular polynomial in the length of the input string". (In the real world, though, "polynomial-time" is not the same thing as "easy".) A language L being NP-hard means that for any NP language M, there's a polynomial-time deterministic Turing machine which maps M-inputs to L-inputs, where yes-instances map to yes-instances and no to no. Swapping yes and no is not allowed. For NP problems you only have to be able to check solutions in poly-time if the solution indicates that the answer is "yes". The corresponding family where you can check "no" quickly is called co-NP, and it is believed that NP != co-NP. Etc etc etc.
reply