let rec exp_to_string (#a:Type) (a_to_string:a->string) (e:exp a) =
  match e with
  | Unit -> "Unit"
  | Var x -> "Var " ^ a_to_string x
  | Mult e1 e2 -> "Mult (" ^ exp_to_string a_to_string e1
                   ^ ") (" ^ exp_to_string a_to_string e2 ^ ")"
let rec exp_to_string (#a: Type) (a_to_string: (a -> string)) (e: exp a) =
match e with
| Unit -> "Unit"
| Var x -> "Var " ^ a_to_string x
| Mult e1 e2 -> "Mult (" ^ exp_to_string a_to_string e1 ^ ") (" ^ exp_to_string a_to_string e2 ^ ")"
FStar.Tactics.CanonMonoid.fst.checked
prims.fst.checked FStar.Tactics.V2.fst.checked FStar.Reflection.V2.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.fst.checked FStar.List.fst.checked FStar.Algebra.Monoid.fst.checked
FStar.Tactics.CanonMonoid.fst
Prims.string FStar.Tactics.CanonMonoid.exp Prims.op_Hat FStar.Tactics.CanonMonoid.exp_to_string
(*
   Copyright 2008-2018 Microsoft Research

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*)
module FStar.Tactics.CanonMonoid

open FStar.Algebra.Monoid
open FStar.List
open FStar.Reflection.V2
open FStar.Tactics.V2

(* Only dump when debugging is on *)
let dump m = if debugging () then dump m

(* "A Monoid Expression Simplifier" ported from
   http://adam.chlipala.net/cpdt/html/Cpdt.Reflection.html *)

type exp (a:Type) : Type =
  | Unit : exp a
  | Var : a -> exp a
  | Mult : exp a -> exp a -> exp a
val exp_to_string : a_to_string: (_: a -> Prims.string) -> e: FStar.Tactics.CanonMonoid.exp a -> Prims.string
a_to_string: (_: a -> Prims.string) -> e: FStar.Tactics.CanonMonoid.exp a -> Prims.string