From 3988a7cc318364585f9f36b1f776ce341f2f6caa Mon Sep 17 00:00:00 2001 From: Jade Philipoom Date: Fri, 16 Feb 2018 10:53:46 +0100 Subject: add equivalence proof for Montgomery reduce_via_partial_alt --- src/Arithmetic/MontgomeryReduction/Proofs.v | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Arithmetic') diff --git a/src/Arithmetic/MontgomeryReduction/Proofs.v b/src/Arithmetic/MontgomeryReduction/Proofs.v index d5de00213..5f459e52d 100644 --- a/src/Arithmetic/MontgomeryReduction/Proofs.v +++ b/src/Arithmetic/MontgomeryReduction/Proofs.v @@ -242,6 +242,12 @@ Section montgomery. autorewrite with zsimplify; push_Zmod; autorewrite with zsimplify; pull_Zmod. break_match; Z.ltb_to_lt; autorewrite with zsimplify; try reflexivity; lia. Qed. + + Lemma reduce_via_partial_alt_eq : reduce_via_partial_alt N R N' T = reduce_via_partial N R N' T. + Proof. + cbv [reduce_via_partial_alt reduce_via_partial]. + rewrite partial_reduce_alt_eq by omega. reflexivity. + Qed. End alt. End redc. -- cgit v1.2.3