| 1 |
(** * Push-Button Synthesis of Unsaturated Solinas: 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.BaseConversion. |
| 6 |
Require Import Crypto.PushButtonSynthesis.ReificationCache. |
| 7 |
Local Open Scope Z_scope. |
| 8 |
|
| 9 |
Local Set Keyed Unification. (* needed for making [autorewrite] fast, c.f. COQBUG(https://github.com/coq/coq/issues/9283) *) |
| 10 |
|
| 11 |
Module Export BaseConversion. |
| 12 |
Derive reified_convert_bases_gen |
| 13 |
SuchThat (is_reification_of reified_convert_bases_gen convert_basesmod) |
| 14 |
As reified_convert_bases_gen_correct. |
| 15 |
Proof. Time cache_reify (). Time Qed. |
| 16 |
Local Definition reified_convert_bases_gen_correct_proj1 := proj1 reified_convert_bases_gen_correct. |
| 17 |
Local Definition reified_convert_bases_gen_correct_proj2 := proj2 reified_convert_bases_gen_correct. |
| 18 |
#[global] |
| 19 |
Hint Extern 1 (_ = _) => apply_cached_reification convert_basesmod reified_convert_bases_gen_correct_proj1 : reify_cache_gen. |
| 20 |
#[global] |
| 21 |
Hint Immediate reified_convert_bases_gen_correct_proj2 : wf_gen_cache. |
| 22 |
#[global] |
| 23 |
Hint Rewrite reified_convert_bases_gen_correct_proj1 : interp_gen_cache. |
| 24 |
Local Opaque reified_convert_bases_gen. (* needed for making [autorewrite] not take a very long time *) |
| 25 |
End BaseConversion. |