equal
deleted
inserted
replaced
4 Tactic to prove equivalence of permutations of conjunctions and disjunctions. |
4 Tactic to prove equivalence of permutations of conjunctions and disjunctions. |
5 *) |
5 *) |
6 |
6 |
7 signature CONJ_DISJ_PERM = |
7 signature CONJ_DISJ_PERM = |
8 sig |
8 sig |
9 val conj_disj_perm_tac: int -> tactic |
9 val conj_disj_perm_tac: Proof.context -> int -> tactic |
10 end |
10 end |
11 |
11 |
12 structure Conj_Disj_Perm: CONJ_DISJ_PERM = |
12 structure Conj_Disj_Perm: CONJ_DISJ_PERM = |
13 struct |
13 struct |
14 |
14 |
116 | (False, Conj) => prove_contradiction_eq false cp |
116 | (False, Conj) => prove_contradiction_eq false cp |
117 | (Disj, True) => contrapos (prove_contradiction_eq true) cp |
117 | (Disj, True) => contrapos (prove_contradiction_eq true) cp |
118 | (True, Disj) => contrapos (prove_contradiction_eq false) cp |
118 | (True, Disj) => contrapos (prove_contradiction_eq false) cp |
119 | _ => raise CTERM ("prove_conj_disj_perm", [ct])) |
119 | _ => raise CTERM ("prove_conj_disj_perm", [ct])) |
120 |
120 |
121 val conj_disj_perm_tac = CSUBGOAL (fn (ct, i) => |
121 fun conj_disj_perm_tac ctxt = CSUBGOAL (fn (ct, i) => |
122 (case Thm.term_of ct of |
122 (case Thm.term_of ct of |
123 @{const HOL.Trueprop} $ (@{const HOL.eq(bool)} $ _ $ _) => |
123 @{const HOL.Trueprop} $ (@{const HOL.eq(bool)} $ _ $ _) => |
124 rtac (prove_conj_disj_perm ct (Thm.dest_binop (Thm.dest_arg ct))) i |
124 resolve_tac ctxt [prove_conj_disj_perm ct (Thm.dest_binop (Thm.dest_arg ct))] i |
125 | _ => no_tac)) |
125 | _ => no_tac)) |
126 |
126 |
127 end |
127 end |