diff options
author | Jason Gross <jgross@mit.edu> | 2017-10-20 18:30:50 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2017-10-20 18:30:50 -0400 |
commit | 5343266f774dbc278a957bf2f2764ac78616d71f (patch) | |
tree | 2c844630dd9c39ff41789c133cfa8eb96f39d330 /src | |
parent | d9a9bb06f83643871e991c548f39f47fa05c8724 (diff) |
Add SmartVarVarf_Pair, SmartPairfSmartVarVarf_SmartVarf
Diffstat (limited to 'src')
-rw-r--r-- | src/Compilers/SmartMap.v | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Compilers/SmartMap.v b/src/Compilers/SmartMap.v index c81c76ce1..f89566f46 100644 --- a/src/Compilers/SmartMap.v +++ b/src/Compilers/SmartMap.v @@ -247,6 +247,17 @@ Section homogenous_type. Proof using Type. destruct t; simpl; rewrite !SmartVarfMap_id; reflexivity. Qed. Definition SmartVarVarf {t} : interp_flat_type var t -> interp_flat_type exprfb t := SmartVarfMap (fun t => Var). + Definition SmartVarVarf_Pair {A B} (v : interp_flat_type _ _ * interp_flat_type _ _) + : @SmartVarVarf (Prod A B) v + = (SmartVarVarf (fst v), SmartVarVarf (snd v)) + := eq_refl. + Lemma SmartPairfSmartVarVarf_SmartVarf {t} v + : SmartPairf (SmartVarVarf v) = SmartVarf (t:=t) v. + Proof. + induction t; try reflexivity; simpl. + rewrite SmartVarf_Pair, SmartVarVarf_Pair, SmartPairf_Pair; f_equal; + auto. + Qed. End homogenous_type. Global Arguments SmartVarf {_ _ _ _} _. |