aboutsummaryrefslogtreecommitdiff
path: root/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-04-02 01:21:29 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-04-02 01:21:29 -0400
commitc62e5d63240e6d291d1e68cb1408df22f55b42f9 (patch)
tree7bfbf5428974c3612875aad4ec573c37ccbdd545 /src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
parent6211f14a1283c359944a3dd44699ba2a1b53ddc2 (diff)
Add inversion_ProcessedReflectivePackage
Diffstat (limited to 'src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v')
-rw-r--r--src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v b/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
index beca8e9d5..ab04a82ee 100644
--- a/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
+++ b/src/Reflection/Z/Bounds/Pipeline/PreDefinitions.v
@@ -31,3 +31,19 @@ Definition Build_ProcessedReflectivePackage_from_option_sigma
=> let 'existT b e' := be in
{| InputType := t ; input_expr := e ; input_bounds := input_bounds ; output_bounds := b ; output_expr := e' |})
result.
+
+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)) } } } }
+ := let (a, b, c, d, e) := x in
+ existT _ a (existT _ b (existT _ c (existT _ 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.