diff options
author | Andres Erbsen <andreser@mit.edu> | 2016-06-21 15:46:28 -0400 |
---|---|---|
committer | Andres Erbsen <andreser@mit.edu> | 2016-06-21 15:46:28 -0400 |
commit | 475eb51406c5bf9620199a8af2afddf37e7f5eb0 (patch) | |
tree | a7c13bc42d4226f05dd1420b0679dc8382dacd08 /src/Spec | |
parent | 0ae5f6871b29d20f48b5df6dab663b5a44162d01 (diff) |
use Local Obligation Tactic (8.5-compat)
Diffstat (limited to 'src/Spec')
-rw-r--r-- | src/Spec/CompleteEdwardsCurve.v | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Spec/CompleteEdwardsCurve.v b/src/Spec/CompleteEdwardsCurve.v index 88388ee0a..06c3f8fdb 100644 --- a/src/Spec/CompleteEdwardsCurve.v +++ b/src/Spec/CompleteEdwardsCurve.v @@ -28,6 +28,11 @@ Module E. Definition point := { P | let '(x,y) := P in a*x^2 + y^2 = 1 + d*x^2*y^2 }. Definition coordinates (P:point) : (F*F) := proj1_sig P. + (** The following points are indeed on the curve -- see [CompleteEdwardsCurve.Pre] for proof *) + Local Obligation Tactic := intros; apply Pre.zeroOnCurve + || apply (Pre.unifiedAdd'_onCurve (char_gt_2:=char_gt_2) (d_nonsquare:=nonsquare_d) + (a_nonzero:=nonzero_a) (a_square:=square_a) _ _ (proj2_sig _) (proj2_sig _)). + Program Definition zero : point := (0, 1). Program Definition add (P1 P2:point) : point := exist _ ( @@ -35,11 +40,6 @@ Module E. let (x2, y2) := coordinates P2 in (((x1*y2 + y1*x2)/(1 + d*x1*x2*y1*y2)) , ((y1*y2 - a*x1*x2)/(1 - d*x1*x2*y1*y2)))) _. - (** The described points are indeed on the curve -- see [CompleteEdwardsCurve.Pre] for proof *) - Solve All Obligations using intros; exact Pre.zeroOnCurve - || exact (Pre.unifiedAdd'_onCurve (char_gt_2:=char_gt_2) (d_nonsquare:=nonsquare_d) - (a_nonzero:=nonzero_a) (a_square:=square_a) _ _ (proj2_sig _) (proj2_sig _)). - Fixpoint mul (n:nat) (P : point) : point := match n with | O => zero |