src/Provers/Arith/abel_cancel.ML
changeset 15570 8d8c70b41bab
parent 15531 08c8dad8e399
child 15796 348ce23d2fc2
equal deleted inserted replaced
15569:1b3115d1a8df 15570:8d8c70b41bab
   158        val common = (*inter_term miscounts repetitions, so squash them*)
   158        val common = (*inter_term miscounts repetitions, so squash them*)
   159                     gen_distinct (op aconv) (inter_term (ltms, rtms))
   159                     gen_distinct (op aconv) (inter_term (ltms, rtms))
   160        val _ = if null common then raise Cancel  (*nothing to do*)
   160        val _ = if null common then raise Cancel  (*nothing to do*)
   161                                    else ()
   161                                    else ()
   162 
   162 
   163        fun cancelled tms = mk_sum ty (foldl cancel1 (tms, common))
   163        fun cancelled tms = mk_sum ty (Library.foldl cancel1 (tms, common))
   164 
   164 
   165        val lt' = cancelled ltms
   165        val lt' = cancelled ltms
   166        and rt' = cancelled rtms
   166        and rt' = cancelled rtms
   167 
   167 
   168        val rhs = rel$lt'$rt'
   168        val rhs = rel$lt'$rt'