Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View spolu's full-sized avatar

Stanislas Polu spolu

View GitHub Profile
+++++++++++++++++++++++++++++++
[system]
-------------------------------
<Instructions>
Find a solution to the provided mathematical problem. The answer is a unique mathematical expression presented in LaTeX `\boxed{}` directive. (example: `\boxed{4}` or `\boxed{3\pi}`). Formatting instructions: fractions should be represented in the LaTeX form `\frac{a}{b}` (not `\frac12`), units should not be included, square roots should be presented in the LaTeX form `\sqrt{c}` (not `\sqrt2`), all spaces and non critical parentheses or formatting should be stripped, rational numbers should be presented with a leading `0`.
Provide a reasoning consisting in multiple steps, using one line per step. A reasoning step is one coherent step of mathematical reasoning. It should hold in one line of at most 500 characters. If an answer is reached as part of the reasoning, it should be included in the reasoning step using the `\boxed{}` directive. Don't use the `\boxed{}` directive for anything else than the answer.
---
You are an
@spolu
spolu / gpt-4-electric-current-musing.txt
Last active May 4, 2023 11:33
Musing with GPT-4 on questions about electric current, all the way to string theory
>> How come electricity signal goes to speed of light? What makes the electrons' wave transmit so
fast along a cable?
It's a common misconception that electricity or an electrical signal travels at the speed of light.
While it's true that electrical signals can travel very fast, they do not reach the speed of light.
The speed at which an electrical signal propagates through a conductor like a copper wire or an
optical fiber cable is influenced by various factors, such as the material's properties and the
surrounding medium.
When a voltage is applied to a conductor, the electric field created causes the electrons in the
@spolu
spolu / aime_1984_p1.lean
Created January 4, 2022 14:05
AIME 1984 P1 (Human formalization)
/-
Copyright (c) 2021 OpenAI. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kunhao Zheng, Kudzo Ahegbebu, Stanislas Polu, David Renshaw, OpenAI GPT-f
-/
import minif2f_import
open_locale big_operators
open_locale nat
open_locale real
@spolu
spolu / proof.log
Last active February 6, 2020 16:18
Holist RegisterTheorem/ApplyTactic sequence that proves `|- p => q`
# Register `p=T |- p=T`
> RegisterTheoremRequest {
theorem {
hypotheses: "(a (a (c (fun (bool) (fun (bool) (bool))) =) (v (bool) p)) (c (bool) T))"
conclusion: "(a (a (c (fun (bool) (fun (bool) (bool))) =) (v (bool) p)) (c (bool) T))"
tag: THEOREM
fingerprint: 4307889383570985746
}
}
< RegisterTheoremResponse {
package main
import (
"flag"
"fmt"
"log"
"github.com/stellar/go-stellar-base/build"
"github.com/stellar/go-stellar-base/horizon"
"github.com/stellar/go-stellar-base/keypair"
@spolu
spolu / .notesrc
Last active December 22, 2021 16:57
Productivity note-taking in the terminal
n() {
if [ $1="today" ];
then
$EDITOR ~/notes/`date +%y%m%d`
else
$EDITOR ~/notes/"$*"
fi
}
nls() {
ls -c ~/notes/ | grep "$*"
2014-12-16 22:43:52,812 INFO [default] HTTP PORT: 39132
16/12/14 22:43:52 INFO Testing stellard-hayashi 8689a3c-dirty
16/12/14 22:43:52 INFO Logging to stellard-test-1418766232-9416.log
16/12/14 22:43:52 INFO Start listening for http requests
16/12/14 22:43:52 INFO Application constructing
16/12/14 22:43:52 INFO Worker threads: 4
16/12/14 22:43:52 INFO Application constructed
16/12/14 22:43:52 INFO Start listening for http requests
16/12/14 22:43:52 INFO Application constructing
16/12/14 22:43:52 INFO Worker threads: 4
//usr/local/lib/libxdrpp.a(marshal.o): In function `xdr::marshal_base::get_bytes(unsigned int const*&, void*, unsigned long)':
/home/spolu/src/stellar/xdrpp/xdrpp/marshal.cc:30: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/home/spolu/src/stellar/xdrpp/xdrpp/marshal.cc:30: undefined reference to `std::runtime_error::runtime_error(std::string const&)'
//usr/local/lib/libxdrpp.a(marshal.o): In function `std::string::_M_rep() const':
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/basic_string.h:240: undefined reference to `std::string::_Rep::_S_empty_rep_storage'
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/basic_string.h:249: undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@spolu
spolu / protocol_c.md
Last active August 29, 2015 14:10
Candidate Set Protocol C

Notations:

  • Hash function H(.): hash function that may include signature as security requires
  • Transaction t: a value submitted by a client of the FBA network that can be independently validated by each node.
  • Transaction Set s^v: a set of transactions submitted by clients to node v.
  • Node block b^v: of the form <s^v, H(b^v_prev)> a transaction set and a reference to a previous node block
  • Master block B: of the form <s^0, s^1, s^3, ..., s^n> a set of node blocks (at most one per node)

We define B1 < B2 by a total lexicographic order on:

  • the number of node-block in each master-block
@spolu
spolu / protocol_b.md
Last active August 29, 2015 14:10
Candidate Set Protocol B

Notations:

  • Hash function H(.): hash function that may include signature as security requires
  • Transaction t: a value submitted by a client of the FBA network that can be independently validated by each node.
  • Transaction Set s^v: a set of transactions submitted by clients to node v.
  • Node block b^v: of the form <s^v, H(b^v_prev)> a transaction set and a reference to a previous node block
  • Master block B: of the form <s^0, s^1, s^3, ..., s^n> a set of node blocks (at most one per node)

State: