equal
deleted
inserted
replaced
1388 val args = args_of thm; |
1388 val args = args_of thm; |
1389 val incr_idx = Logic.incr_indexes ([], Thm.maxidx_of thm + 1); |
1389 val incr_idx = Logic.incr_indexes ([], Thm.maxidx_of thm + 1); |
1390 fun matches_args args' = |
1390 fun matches_args args' = |
1391 let |
1391 let |
1392 val k = length args' - length args |
1392 val k = length args' - length args |
1393 in if k >= 0 |
1393 in k >= 0 andalso Pattern.matchess thy (args, (map incr_idx o drop k) args') end; |
1394 then Pattern.matchess thy (args, (map incr_idx o drop k) args') |
|
1395 else false |
|
1396 end; |
|
1397 fun drop (thm', proper') = if (proper orelse not proper') |
1394 fun drop (thm', proper') = if (proper orelse not proper') |
1398 andalso matches_args (args_of thm') then |
1395 andalso matches_args (args_of thm') then |
1399 (if verbose then warning ("Code generator: dropping subsumed code equation\n" ^ |
1396 (if verbose then warning ("Code generator: dropping subsumed code equation\n" ^ |
1400 Thm.string_of_thm_global thy thm') else (); true) |
1397 Thm.string_of_thm_global thy thm') else (); true) |
1401 else false; |
1398 else false; |