972 |
972 |
973 fun isar_dependencies_of name_tabs th = |
973 fun isar_dependencies_of name_tabs th = |
974 thms_in_proof max_dependencies (SOME name_tabs) th |
974 thms_in_proof max_dependencies (SOME name_tabs) th |
975 |> Option.map (fn deps => |
975 |> Option.map (fn deps => |
976 if deps = [typedef_dep] orelse deps = [class_some_dep] orelse |
976 if deps = [typedef_dep] orelse deps = [class_some_dep] orelse |
977 exists (member (op =) fundef_ths) deps orelse exists (member (op =) typedef_ths) deps orelse |
977 exists (member (op =) fundef_ths) deps orelse exists (member (op =) typedef_ths) deps orelse |
978 is_size_def deps th then |
978 is_size_def deps th then |
979 [] |
979 [] |
980 else |
980 else |
981 deps) |
981 deps) |
982 |
982 |
983 fun prover_dependencies_of ctxt (params as {verbose, max_facts, ...}) prover auto_level facts |
983 fun prover_dependencies_of ctxt (params as {verbose, max_facts, ...}) prover auto_level facts |
1376 | learn_new_fact (parents, ((_, stature as (_, status)), th)) |
1376 | learn_new_fact (parents, ((_, stature as (_, status)), th)) |
1377 (learns, (num_nontrivial, next_commit, _)) = |
1377 (learns, (num_nontrivial, next_commit, _)) = |
1378 let |
1378 let |
1379 val name = nickname_of_thm th |
1379 val name = nickname_of_thm th |
1380 val feats = features_of ctxt (theory_of_thm th) stature [prop_of th] |
1380 val feats = features_of ctxt (theory_of_thm th) stature [prop_of th] |
1381 val deps = deps_of status th |> these |
1381 val deps = these (deps_of status th) |
1382 val num_nontrivial = num_nontrivial |> not (null deps) ? Integer.add 1 |
1382 val num_nontrivial = num_nontrivial |> not (null deps) ? Integer.add 1 |
1383 val learns = (name, parents, feats, deps) :: learns |
1383 val learns = (name, parents, feats, deps) :: learns |
1384 val (learns, next_commit) = |
1384 val (learns, next_commit) = |
1385 if Time.> (Timer.checkRealTimer timer, next_commit) then |
1385 if Time.> (Timer.checkRealTimer timer, next_commit) then |
1386 (commit false learns [] []; ([], next_commit_time ())) |
1386 (commit false learns [] []; ([], next_commit_time ())) |