blob: 7b368cb16092cf5ecb130b8dcfb336a748398d95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
Require Import Coq.ZArith.ZArith.
Require Import Crypto.Language.
Require Import Crypto.LanguageWf.
Require Import Crypto.RewriterAllTactics.
Require Import Crypto.RewriterRulesProofs.
Module Compilers.
Import Language.Compilers.
Import Language.Compilers.defaults.
Import LanguageWf.Compilers.
Import RewriterAllTactics.Compilers.RewriteRules.GoalType.
Import RewriterAllTactics.Compilers.RewriteRules.Tactic.
Module Import RewriteRules.
Section __.
Context (max_const_val : Z).
Definition VerifiedRewriterArith : VerifiedRewriter.
Proof using All. make_rewriter false (arith_rewrite_rules_proofs max_const_val). Defined.
Definition RewriteArith {t} := Eval hnf in @Rewrite VerifiedRewriterArith t.
Lemma Wf_RewriteArith {t} e (Hwf : Wf e) : Wf (@RewriteArith t e).
Proof. now apply VerifiedRewriterArith. Qed.
Lemma Interp_gen_RewriteArith {cast_outside_of_range t} e (Hwf : Wf e)
: expr.Interp (@ident.gen_interp cast_outside_of_range) (@RewriteArith t e)
== expr.Interp (@ident.gen_interp cast_outside_of_range) e.
Proof. now apply VerifiedRewriterArith. Qed.
Lemma Interp_RewriteArith {t} e (Hwf : Wf e) : Interp (@RewriteArith t e) == Interp e.
Proof. apply Interp_gen_RewriteArith; assumption. Qed.
End __.
End RewriteRules.
Module Export Hints.
Hint Resolve Wf_RewriteArith : wf.
Hint Rewrite @Interp_gen_RewriteArith @Interp_RewriteArith : interp.
End Hints.
End Compilers.
|