aboutsummaryrefslogtreecommitdiff
path: root/src/Reflection
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-04-02 01:25:54 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-04-02 01:25:54 -0400
commit936448fae9b8787bd0e5cac7f1b3307985a1bd05 (patch)
tree7a8c7d5f5bc4131e36a30310a3b8536111a76225 /src/Reflection
parentc62e5d63240e6d291d1e68cb1408df22f55b42f9 (diff)
Better version of inversion_ProcessedReflectivePackage
Now it doesn't introduce needless dependencies
Diffstat (limited to 'src/Reflection')
-rw-r--r--src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v b/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
index ab04a82ee..8102fe2ee 100644
--- a/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
+++ b/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
@@ -6,6 +6,8 @@ Require Import Crypto.Reflection.Syntax.
Require Import Crypto.Reflection.SmartMap.
Require Import Crypto.Reflection.Z.Syntax.
Require Import Crypto.Reflection.Z.Bounds.Interpretation.
+Require Import Crypto.Util.Sigma.
+Require Import Crypto.Util.Prod.
Local Notation pick_typeb := Bounds.bounds_to_base_type (only parsing).
Local Notation pick_type v := (SmartFlatTypeMap (fun _ => pick_typeb) v).
@@ -34,16 +36,17 @@ Definition Build_ProcessedReflectivePackage_from_option_sigma
Definition ProcessedReflectivePackage_to_sigT (x : ProcessedReflectivePackage)
: { InputType : _
- & { input_expr : Expr base_type op InputType
- & { input_bounds : interp_flat_type Bounds.interp_base_type (domain InputType)
- & { output_bounds : interp_flat_type Bounds.interp_base_type (codomain InputType)
- & Expr base_type op (Arrow (pick_type input_bounds) (pick_type output_bounds)) } } } }
+ & Expr base_type op InputType
+ * { bounds : interp_flat_type Bounds.interp_base_type (domain InputType)
+ * interp_flat_type Bounds.interp_base_type (codomain InputType)
+ & Expr base_type op (Arrow (pick_type (fst bounds)) (pick_type (snd bounds))) } }%type
:= let (a, b, c, d, e) := x in
- existT _ a (existT _ b (existT _ c (existT _ d e))).
+ existT _ a (b, (existT _ (c, d) e)).
Ltac inversion_ProcessedReflectivePackage :=
repeat match goal with
| [ H : _ = _ :> ProcessedReflectivePackage |- _ ]
=> apply (f_equal ProcessedReflectivePackage_to_sigT) in H;
cbv [ProcessedReflectivePackage_to_sigT] in H
- end.
+ end;
+ inversion_sigma; inversion_prod.