385 karma · joined Apr 14, 2007 (19y ago) · 162 submissions
1.
Aristotle Formally Verifies Celeste Speedrun Optimality(harmonic.fun ↗)
44 points · by tachim · 22h ago · discuss
comment 1w ago · link · parent
comment 1w ago · link · parent
comment 1w ago · link · parent
For example, you could prompt it to prove logical equivalence of your ASIC and FPGA verilog. Or feed it your spec docs and your verilog and ask it to prove conformance. Aristotle doesn't write tests, it writes properties in Lean and then verifies your code against them.
Feel free to reach out if you have more questions: tudor@harmonic.fun
comment 1w ago · link · parent
For Verilog which is another language we support, for hardware, we compile the SVA assertions deterministically into Lean theorem statements about the compiled Lean embedding of the Verilog.
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 11mo ago · link · parent
If you also think this is the future of programming and are interested in building it, please consider joining us: https://jobs.ashbyhq.com/Harmonic. We have incredibly interesting challenges across the stack, from infra to AI to Lean.
comment 1y ago · link · parent
comment 1y ago · link · parent
Yes, the government funds research, the benefit of which accrues to all of society. There is no credible alternative to government funding for public research; the scales are not the same. Private funding of basic research (internal R&D budgets) accrues benefits to the funders directly.
Knock-on effects to cutting the government funding include a decimation of future research leadership by the US by making it unattractive to study and do basic research here. Other countries are taking advantage of this (like any private sector company would if one of its competitors makes such a drastic mistake).
> Lastly you are implying that your graduate research was something that advanced some combination of science, humanity, the country...or maybe that the current work you do is of such value that the government should have paid your way to your current status.
You're overly indexing on the benefits any specific researcher gets from research funding. Research is currently done by humans; if we want more research done, then the people doing that research will necessarily get some of the benefits.
Also, since you're commenting on a software-focused web forum -- you should be aware that the compensation for government-funded researchers is a fraction of what these folks could make in the private sector. Framing it as some greedy theft of resources from the public is foolish and disingenuous to readers who don't know about how science funding works in the US.
comment 3y ago · link · parent
comment 3y ago · link · parent
Write an efficient, not brute force, python program that solves the following problem: suppose we have two unknown quantities x and y. If three time x plus two times y is twenty, and 2 times x plus three time y is ten, what are x and y?
Output: To solve this problem efficiently, we can use linear algebra. We can represent the equations as a system of linear equations, and then use matrix operations to solve for the unknown quantities x and y.
First, we can represent the equations as follows:
3x + 2y = 20
2x + 3y = 10
Next, we can put the equations in matrix form:
| 3 2 | | x | | 20 |
| 2 3 | * | y | = | 10 |
To solve for x and y, we can use the inverse of the matrix on the left side to eliminate the coefficients. The inverse of a matrix is denoted as A^-1, and is calculated as follows:
A^-1 = (1/det(A)) * adj(A)
Where det(A) is the determinant of the matrix A, and adj(A) is the adjugate matrix of A. The determinant of a 2x2 matrix is calculated as follows:
det(A) = a * d - b * c
Where a, b, c, and d are the elements of the matrix A:
| a b |
| c d |
The adjugate matrix of a 2x2 matrix is calculated as follows:
adj(A) = | d -b |
| -c a |
We can then calculate the inverse of the matrix on the left side of the equations, and use it to solve for x and y:
| 3 2 |^-1 1 | 3 -2 |
| 2 3 | ----- * | -2 3 | = (1/5) * | 3 -2 | = | 3/5 -2/5 |
|-2 3 | |-2/5 3/5 |
| 3/5 -2/5 | | x | | 20 |
|-2/5 3/5 | * | y | = | 10 |
We can then solve for x and y by multiplying the inverse matrix with the vector on the right side of the equations:
| 3/5 -2/5 | | 20 |
|-2/5 3/5 | * | 10 | = | 6 |
| 7 |
Therefore, the values of x and y are 6 and 7, respectively.
Here is the complete Python program to solve this problem using linear algebra:
Calculate the determinant of a 2x2 matrix
def determinant(a, b, c, d):
return a * d - b * c
Calculate the adjugate matrix of a 2x2 matrix
def adjugate(a, b, c, d):
return [[d, -b], [-c, a]]
Calculate the inverse of a 2x2 matrix
def inverse(a, b, c, d):
det = determinant(a, b, c, d)
adj = adjugate(a, b, c, d)
return [[adj[0][0] / det, adj[0][1] / det], [adj[1][0] / det, adj[1][1] / det]]
Solve the system of linear equations
def solve(a, b, c, d, e, f):
inv = inverse(a, b, c, d)
return [inv[0][0] * ecomment 3y ago · link · parent
Write an efficient, not brute force, program that solves the following problem: suppose we have two unknown quantities x and y. If three time x plus two times y is twenty, and 2 times x plus three time y is ten, what are x and y?
Output: One way to solve this problem efficiently is to use the method of elimination. We can set up a system of equations as follows:
3x + 2y = 20
2x + 3y = 10
We can then multiply the first equation by 2 and the second equation by 3, to get:
6x + 4y = 40
6x + 9y = 30
We can then subtract the second equation from the first equation, to get:
-5y = 10
y = -2
We can then substitute this value of y into one of the original equations (for example, the first one), to get:
3x + 2(-2) = 20
3x - 4 = 20
3x = 24
x = 8
Therefore, the values of x and y are x = 8 and y = -2.comment 4y ago · link · parent
Mr. Brian Simms, K.C. (Lennox Paton Counsel and Attorney-at Law) was appointed as provisional liquidator. Additionally, the powers of the directors of FDM have been suspended and no assets of FDM, client assets or trust assets held by FDM, can be transferred, assigned or otherwise dealt with, without the written approval of the provisional liquidator.
comment 4y ago · link · parent