aboutsummaryrefslogtreecommitdiff
path: root/src/Encoding
diff options
context:
space:
mode:
authorGravatar Jade Philipoom <jadep@mit.edu>2016-02-16 18:18:59 -0500
committerGravatar Jade Philipoom <jadep@mit.edu>2016-02-16 18:18:59 -0500
commit45a6a17c06f45e81cadf18ef984ec7cdd94c11c1 (patch)
treeae821710c13ecd9f07bf8dd4de93adb381691037 /src/Encoding
parent7f5205a9133bce6f458d63da4d414a4dfbff7f3b (diff)
proved most of point encoding admits, fixed some build system issues (dead imports of PointFormats and Galois things)
Diffstat (limited to 'src/Encoding')
-rw-r--r--src/Encoding/EncodingTheorems.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Encoding/EncodingTheorems.v b/src/Encoding/EncodingTheorems.v
new file mode 100644
index 000000000..f53ad0319
--- /dev/null
+++ b/src/Encoding/EncodingTheorems.v
@@ -0,0 +1,14 @@
+Require Import Crypto.Spec.Encoding.
+
+Section EncodingTheorems.
+ Context {A B : Type} {E : encoding of A as B}.
+
+ Lemma encoding_inj : forall x y, enc x = enc y -> x = y.
+ Proof.
+ intros.
+ assert (dec (enc x) = dec (enc y)) as dec_enc_eq by (f_equal; auto).
+ do 2 rewrite encoding_valid in dec_enc_eq.
+ inversion dec_enc_eq; auto.
+ Qed.
+
+End EncodingTheorems.