527 |
527 |
528 Goalw [inj_def] "[| f: inj(A,B); B<=D |] ==> f: inj(A,D)"; |
528 Goalw [inj_def] "[| f: inj(A,B); B<=D |] ==> f: inj(A,D)"; |
529 by (blast_tac (claset() addIs [fun_weaken_type]) 1); |
529 by (blast_tac (claset() addIs [fun_weaken_type]) 1); |
530 qed "inj_weaken_type"; |
530 qed "inj_weaken_type"; |
531 |
531 |
532 val [major] = goal Perm.thy |
532 Goal "[| f: inj(succ(m), A) |] ==> restrict(f,m) : inj(m, A-{f`m})"; |
533 "[| f: inj(succ(m), A) |] ==> restrict(f,m) : inj(m, A-{f`m})"; |
533 by (rtac (restrict_bij RS bij_is_inj RS inj_weaken_type) 1); |
534 by (rtac (major RS restrict_bij RS bij_is_inj RS inj_weaken_type) 1); |
534 by (assume_tac 1); |
535 by (Blast_tac 1); |
535 by (Blast_tac 1); |
536 by (cut_facts_tac [major] 1); |
|
537 by (rewtac inj_def); |
536 by (rewtac inj_def); |
538 by (fast_tac (claset() addEs [range_type, mem_irrefl] |
537 by (fast_tac (claset() addEs [range_type, mem_irrefl] |
539 addDs [apply_equality]) 1); |
538 addDs [apply_equality]) 1); |
540 qed "inj_succ_restrict"; |
539 qed "inj_succ_restrict"; |
541 |
540 |
542 Goalw [inj_def] |
541 Goalw [inj_def] |
543 "[| f: inj(A,B); a~:A; b~:B |] \ |
542 "[| f: inj(A,B); a~:A; b~:B |] \ |
544 \ ==> cons(<a,b>,f) : inj(cons(a,A), cons(b,B))"; |
543 \ ==> cons(<a,b>,f) : inj(cons(a,A), cons(b,B))"; |