equal
deleted
inserted
replaced
10 sig |
10 sig |
11 type cases |
11 type cases |
12 type cases_state = cases * thm |
12 type cases_state = cases * thm |
13 type cases_tactic = thm -> cases_state Seq.seq |
13 type cases_tactic = thm -> cases_state Seq.seq |
14 val CASES: cases -> tactic -> cases_tactic |
14 val CASES: cases -> tactic -> cases_tactic |
15 val NO_CASES: tactic -> cases_tactic |
15 val EMPTY_CASES: tactic -> cases_tactic |
16 val SUBGOAL_CASES: ((term * int * thm) -> cases_tactic) -> int -> cases_tactic |
16 val SUBGOAL_CASES: ((term * int * thm) -> cases_tactic) -> int -> cases_tactic |
17 val THEN_ALL_NEW_CASES: (int -> cases_tactic) * (int -> tactic) -> int -> cases_tactic |
17 val THEN_ALL_NEW_CASES: (int -> cases_tactic) * (int -> tactic) -> int -> cases_tactic |
18 end |
18 end |
19 |
19 |
20 signature RULE_CASES = |
20 signature RULE_CASES = |
186 |
186 |
187 type cases_state = cases * thm; |
187 type cases_state = cases * thm; |
188 type cases_tactic = thm -> cases_state Seq.seq; |
188 type cases_tactic = thm -> cases_state Seq.seq; |
189 |
189 |
190 fun CASES cases tac st = Seq.map (pair cases) (tac st); |
190 fun CASES cases tac st = Seq.map (pair cases) (tac st); |
191 fun NO_CASES tac = CASES [] tac; |
191 fun EMPTY_CASES tac = CASES [] tac; |
192 |
192 |
193 fun SUBGOAL_CASES tac i st = |
193 fun SUBGOAL_CASES tac i st = |
194 (case try Logic.nth_prem (i, Thm.prop_of st) of |
194 (case try Logic.nth_prem (i, Thm.prop_of st) of |
195 SOME goal => tac (goal, i, st) st |
195 SOME goal => tac (goal, i, st) st |
196 | NONE => Seq.empty); |
196 | NONE => Seq.empty); |