Commit Graph

2346 Commits

Author SHA1 Message Date
Rígille S. B. Menezes
d050d47dce prove Byte.to_nat is the inverse of Bytes.from_nat 2021-11-25 18:06:02 -03:00
Rígille S. B. Menezes
98d51ba9af prove important lemma 2021-11-25 16:19:29 -03:00
Rígille S. B. Menezes
6728e3b020 readd missing proof 2021-11-25 15:00:02 -03:00
Rígille S. B. Menezes
d4ea067d3d get close to prove correctness of Byte.to_nat 2021-11-24 20:53:37 -03:00
Rígille S. B. Menezes
1973287eb6 remove small hole 2021-11-24 14:13:14 -03:00
Rígille S. B. Menezes
d4e7e13ef7 prove RLP.aux.split.1 2021-11-24 13:52:14 -03:00
Rígille S. B. Menezes
6e1684a4cb prove RLP.aux.3 2021-11-24 11:16:14 -03:00
Rígille S. B. Menezes
0d9f0dc30a prove everything except two lemmas 2021-11-23 16:23:01 -03:00
Rígille S. B. Menezes
30003dd12c make holes in node case purely arithmetical 2021-11-23 09:54:57 -03:00
Rígille S. B. Menezes
e6ba12c22c remove lots of todo's from node case 2021-11-22 17:41:05 -03:00
Rígille S. B. Menezes
da36a89740 bound length of subencodings 2021-11-22 12:40:08 -03:00
Rígille S. B. Menezes
1ff9f8210b start proof about conversion from Nat to word 2021-11-21 12:38:28 -03:00
caotic123
2dd72e2424 finish split 1 2021-11-18 23:46:05 -03:00
caotic123
79a3f27947 prove split 0 lemma 2021-11-18 20:05:39 -03:00
Rígille S. B. Menezes
929b0a8a34 include definition I forgot 2021-11-18 18:40:35 -03:00
Rígille S. B. Menezes
0627885130 cover all cases except some arithmetic 2021-11-18 18:38:40 -03:00
Rígille S. B. Menezes
cd7cd28758 corret inconsistency in comparison 2021-11-18 15:26:46 -03:00
Rígille S. B. Menezes
29ab09c82c get really really close to prove the node case 2021-11-18 14:52:32 -03:00
Rígille S. B. Menezes
4e4dcfdd2a apply multiple arguments not just 1 2021-11-18 13:12:50 -03:00
Rígille S. B. Menezes
578d770c22 make progress 2021-11-18 13:02:05 -03:00
Rígille S. B. Menezes
1036ca7c30 make definitions more amenable to verification 2021-11-16 20:42:54 -03:00
Rígille S. B. Menezes
12c95ee21d first lemma is now almost proven 2021-11-16 16:37:10 -03:00
Rígille S. B. Menezes
574d42b2ae merge my work with tiago's 2021-11-16 15:56:26 -03:00
Rígille S. B. Menezes
b94f4770c6 move definition 2021-11-16 15:52:08 -03:00
caotic123
978bf75b8a add progress 2021-11-16 15:44:27 -03:00
Rígille S. B. Menezes
0ce496c71f prove theorem about list splitting 2021-11-16 14:22:03 -03:00
Rígille S. B. Menezes
f748820935 state important lemmas 2021-11-16 13:18:46 -03:00
caotic123
1e2e8abae9 rewrite base case proof 2021-11-12 20:48:57 -03:00
Rígille S. B. Menezes
4bdcd074d4 remove unused function 2021-11-12 17:46:20 -03:00
Rígille S. B. Menezes
9d869c7d00 simplify decode
it actually ended up being simpler, amazing
2021-11-12 17:41:38 -03:00
Rígille S. B. Menezes
671e0f6148 fix decoding 2021-11-12 14:30:12 -03:00
MaiaVictor
6985117cb9 RLP fix WIP
The RLP function implemented, while correct as a serialization format,
differed from Ethereum's implementation, since it encoded trees as:

encode(tree) = encode_length(length(tree.child)) | encode_many(tree.child)

While, on Ethereum, this is the actual encoding:

encode(tree) = encode_length(length(encode_many(tree.child))) | encode_many(tree.child)

IMO, this doesn't make sense since it wastes space, complicates the
decoder (since you don't know the length of the children list anymore)
and will make the proofs much more complex. But that's how it is, sadly.
This commit fixes the RLP encode/decode to behave like Ethereum, but it
breaks the associated proofs. Work is needed to fix the proofs. But,
before I commit to that, I'd think in a better way to implement
RLP.decoder.repeat. It probably needs to keep track of the index to
avoid the usage of Nat.sub and Nat.length there.

*sighs*
2021-11-10 22:17:08 -03:00
MaiaVictor
9d0ff9cf49 Revert "prove RLP.aux.0"
This reverts commit f694cb0143.
2021-11-10 20:26:18 -03:00
MaiaVictor
3525f7e0ca Merge branch 'master' of github.com:kind-lang/kind 2021-11-10 20:08:35 -03:00
MaiaVictor
5888aaa6b9 Missing file 2021-11-10 20:08:26 -03:00
Rígille S. B. Menezes
fece62574d Merge branch 'master' of github.com:uwu-tech/Kind 2021-11-10 19:39:20 -03:00
Rígille S. B. Menezes
f694cb0143 prove RLP.aux.0 2021-11-10 19:38:50 -03:00
MaiaVictor
220791f38f Switch order 2021-11-10 19:02:07 -03:00
MaiaVictor
d87ada0334 Recursive Length Prefix (RLP): encoder, decoder and identity proof 2021-11-10 18:29:53 -03:00
MaiaVictor
85cbac15c1 Merge branch 'master' of github.com:kind-lang/kind 2021-11-10 01:56:14 -03:00
MaiaVictor
12706e3a9a Replace syntax 2021-11-10 01:56:05 -03:00
caotic123
ae30389191 add cmp.equal 2021-11-09 19:18:55 -03:00
caotic123
c51fdc2d54 Add identitity proofs on bits cmp relation 2021-11-09 19:18:15 -03:00
caotic123
707041a334 Add progress on proofs 2021-11-09 19:16:22 -03:00
Rígille S. B. Menezes
91e72c9581 make Bits.hex.encode tail-recursive 2021-11-09 15:44:38 -03:00
rheidner
d7aa2c6add Merge branch 'master' of https://github.com/uwu-tech/Kind 2021-11-09 09:36:45 -03:00
MaiaVictor
03f4ed9ffd Fix update 2021-11-09 02:25:09 -03:00
MaiaVictor
046e6c809a Merge branch 'master' of github.com:kind-lang/kind 2021-11-09 01:24:57 -03:00
MaiaVictor
5fef08ca79 Bits.to_nat identity proof 2021-11-09 01:24:50 -03:00
MaisaMilena
0577c07e1a
Add RLP tests (#304)
* Add RLP tests

* Add TODO for Bits.to_string
2021-11-08 14:10:58 -03:00