1590 val skolem_consts_used_so_far = which_skolem_concs_used st |
1590 val skolem_consts_used_so_far = which_skolem_concs_used st |
1591 val consts_diff' = subtract (op =) skolem_consts_used_so_far consts_diff |
1591 val consts_diff' = subtract (op =) skolem_consts_used_so_far consts_diff |
1592 |
1592 |
1593 fun feat_to_tac feat = |
1593 fun feat_to_tac feat = |
1594 case feat of |
1594 case feat of |
1595 Close_Branch => trace_tac' "mark: closer" efq_tac |
1595 Close_Branch => trace_tac' ctxt "mark: closer" efq_tac |
1596 | ConjI => trace_tac' "mark: conjI" (rtac @{thm conjI}) |
1596 | ConjI => trace_tac' ctxt "mark: conjI" (rtac @{thm conjI}) |
1597 | King_Cong => trace_tac' "mark: expander_animal" (expander_animal ctxt) |
1597 | King_Cong => trace_tac' ctxt "mark: expander_animal" (expander_animal ctxt) |
1598 | Break_Hypotheses => trace_tac' "mark: break_hypotheses" break_hypotheses |
1598 | Break_Hypotheses => trace_tac' ctxt "mark: break_hypotheses" (break_hypotheses_tac ctxt) |
1599 | RemoveRedundantQuantifications => K all_tac |
1599 | RemoveRedundantQuantifications => K all_tac |
1600 (* |
1600 (* |
1601 FIXME Building this into the loop instead.. maybe not the ideal choice |
1601 FIXME Building this into the loop instead.. maybe not the ideal choice |
1602 | RemoveRedundantQuantifications => |
1602 | RemoveRedundantQuantifications => |
1603 trace_tac' "mark: strip_unused_variable_hyp" |
1603 trace_tac' ctxt "mark: strip_unused_variable_hyp" |
1604 (REPEAT_DETERM o remove_redundant_quantification_in_lit) |
1604 (REPEAT_DETERM o remove_redundant_quantification_in_lit) |
1605 *) |
1605 *) |
1606 |
1606 |
1607 | Assumption => atac |
1607 | Assumption => atac |
1608 (*FIXME both Existential_Free and Existential_Var run same code*) |
1608 (*FIXME both Existential_Free and Existential_Var run same code*) |
1609 | Existential_Free => trace_tac' "mark: forall_neg" (exists_tac ctxt feats consts_diff') |
1609 | Existential_Free => trace_tac' ctxt "mark: forall_neg" (exists_tac ctxt feats consts_diff') |
1610 | Existential_Var => trace_tac' "mark: forall_neg" (exists_tac ctxt feats consts_diff') |
1610 | Existential_Var => trace_tac' ctxt "mark: forall_neg" (exists_tac ctxt feats consts_diff') |
1611 | Universal => trace_tac' "mark: forall_pos" (forall_tac ctxt feats) |
1611 | Universal => trace_tac' ctxt "mark: forall_pos" (forall_tac ctxt feats) |
1612 | Not_pos => trace_tac' "mark: not_pos" (dtac @{thm leo2_rules(9)}) |
1612 | Not_pos => trace_tac' ctxt "mark: not_pos" (dtac @{thm leo2_rules(9)}) |
1613 | Not_neg => trace_tac' "mark: not_neg" (dtac @{thm leo2_rules(10)}) |
1613 | Not_neg => trace_tac' ctxt "mark: not_neg" (dtac @{thm leo2_rules(10)}) |
1614 | Or_pos => trace_tac' "mark: or_pos" (dtac @{thm leo2_rules(5)}) (*could add (6) for negated conjunction*) |
1614 | Or_pos => trace_tac' ctxt "mark: or_pos" (dtac @{thm leo2_rules(5)}) (*could add (6) for negated conjunction*) |
1615 | Or_neg => trace_tac' "mark: or_neg" (dtac @{thm leo2_rules(7)}) |
1615 | Or_neg => trace_tac' ctxt "mark: or_neg" (dtac @{thm leo2_rules(7)}) |
1616 | Equal_pos => trace_tac' "mark: equal_pos" (dresolve_tac ctxt (@{thms eq_pos_bool} @ [@{thm leo2_rules(3)}, @{thm eq_pos_func}])) |
1616 | Equal_pos => trace_tac' ctxt "mark: equal_pos" (dresolve_tac ctxt (@{thms eq_pos_bool} @ [@{thm leo2_rules(3)}, @{thm eq_pos_func}])) |
1617 | Equal_neg => trace_tac' "mark: equal_neg" (dresolve_tac ctxt [@{thm eq_neg_bool}, @{thm leo2_rules(4)}]) |
1617 | Equal_neg => trace_tac' ctxt "mark: equal_neg" (dresolve_tac ctxt [@{thm eq_neg_bool}, @{thm leo2_rules(4)}]) |
1618 | Donkey_Cong => trace_tac' "mark: donkey_cong" (simper_animal ctxt THEN' ex_expander_tac ctxt) |
1618 | Donkey_Cong => trace_tac' ctxt "mark: donkey_cong" (simper_animal ctxt THEN' ex_expander_tac ctxt) |
1619 |
1619 |
1620 | Extuni_Bool2 => trace_tac' "mark: extuni_bool2" (dtac @{thm extuni_bool2}) |
1620 | Extuni_Bool2 => trace_tac' ctxt "mark: extuni_bool2" (dtac @{thm extuni_bool2}) |
1621 | Extuni_Bool1 => trace_tac' "mark: extuni_bool1" (dtac @{thm extuni_bool1}) |
1621 | Extuni_Bool1 => trace_tac' ctxt "mark: extuni_bool1" (dtac @{thm extuni_bool1}) |
1622 | Extuni_Bind => trace_tac' "mark: extuni_triv" (etac @{thm extuni_triv}) |
1622 | Extuni_Bind => trace_tac' ctxt "mark: extuni_triv" (etac @{thm extuni_triv}) |
1623 | Extuni_Triv => trace_tac' "mark: extuni_triv" (etac @{thm extuni_triv}) |
1623 | Extuni_Triv => trace_tac' ctxt "mark: extuni_triv" (etac @{thm extuni_triv}) |
1624 | Extuni_Dec => trace_tac' "mark: extuni_dec_tac" (extuni_dec_tac ctxt) |
1624 | Extuni_Dec => trace_tac' ctxt "mark: extuni_dec_tac" (extuni_dec_tac ctxt) |
1625 | Extuni_FlexRigid => trace_tac' "mark: extuni_flex_rigid" (atac ORELSE' asm_full_simp_tac ctxt) |
1625 | Extuni_FlexRigid => trace_tac' ctxt "mark: extuni_flex_rigid" (atac ORELSE' asm_full_simp_tac ctxt) |
1626 | Extuni_Func => trace_tac' "mark: extuni_func" (dtac @{thm extuni_func}) |
1626 | Extuni_Func => trace_tac' ctxt "mark: extuni_func" (dtac @{thm extuni_func}) |
1627 | Polarity_switch => trace_tac' "mark: polarity_switch" (eresolve_tac ctxt @{thms polarity_switch}) |
1627 | Polarity_switch => trace_tac' ctxt "mark: polarity_switch" (eresolve_tac ctxt @{thms polarity_switch}) |
1628 | Forall_special_pos => trace_tac' "mark: dorall_special_pos" extcnf_forall_special_pos_tac |
1628 | Forall_special_pos => trace_tac' ctxt "mark: dorall_special_pos" extcnf_forall_special_pos_tac |
1629 |
1629 |
1630 val core_tac = |
1630 val core_tac = |
1631 get_loop_feats feats |
1631 get_loop_feats feats |
1632 |> map feat_to_tac |
1632 |> map feat_to_tac |
1633 |> FIRST' |
1633 |> FIRST' |