Debian Codegraph @

src/PushButtonSynthesis/FancyMontgomeryReductionReificationCache.v

raw
1 (** * Push-Button Synthesis of fancy mongomery reduction : Reification Cache *)
2 From Coq Require Import ZArith.
3 From Coq Require Import Derive.
4 Require Import Crypto.Arithmetic.Core.
5 Require Import Crypto.Arithmetic.FancyMontgomeryReduction.
6 Require Import Crypto.PushButtonSynthesis.ReificationCache.
7 Local Open Scope Z_scope.
8
9 Import Associational Positional.
10 Import FancyMontgomeryReduction.MontgomeryReduction.
11
12 Local Set Keyed Unification. (* needed for making [autorewrite] fast, c.f. COQBUG(https://github.com/coq/coq/issues/9283) *)
13
14 Module Export MontgomeryReduction.
15 Derive reified_montred_gen
16 SuchThat (is_reification_of reified_montred_gen montred')
17 As reified_montred_gen_correct.
18 Proof. Time cache_reify (). Time Qed.
19 Local Definition reified_montred_gen_correct_proj1 := proj1 reified_montred_gen_correct.
20 Local Definition reified_montred_gen_correct_proj2 := proj2 reified_montred_gen_correct.
21 Module Export ReifyHints.
22 #[global]
23 Hint Extern 1 (_ = _) => apply_cached_reification montred' reified_montred_gen_correct_proj1 : reify_cache_gen.
24 #[global]
25 Hint Immediate reified_montred_gen_correct_proj2 : wf_gen_cache.
26 #[global]
27 Hint Rewrite reified_montred_gen_correct_proj1 : interp_gen_cache.
28 End ReifyHints.
29 Local Opaque reified_montred_gen. (* needed for making [autorewrite] not take a very long time *)
30 End MontgomeryReduction.