src/FOLP/IFOLP.thy
changeset 60754 02924903a6fd
parent 60555 51a6997b1384
child 60770 240563fbf41d
equal deleted inserted replaced
60753:80ca4a065a48 60754:02924903a6fd
   502 (** Congruence rules for predicate letters **)
   502 (** Congruence rules for predicate letters **)
   503 
   503 
   504 schematic_lemma pred1_cong: "p:a=a' ==> ?p:P(a) <-> P(a')"
   504 schematic_lemma pred1_cong: "p:a=a' ==> ?p:P(a) <-> P(a')"
   505   apply (rule iffI)
   505   apply (rule iffI)
   506    apply (tactic {*
   506    apply (tactic {*
   507      DEPTH_SOLVE (atac 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1) *})
   507      DEPTH_SOLVE (assume_tac @{context} 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1) *})
   508   done
   508   done
   509 
   509 
   510 schematic_lemma pred2_cong: "[| p:a=a';  q:b=b' |] ==> ?p:P(a,b) <-> P(a',b')"
   510 schematic_lemma pred2_cong: "[| p:a=a';  q:b=b' |] ==> ?p:P(a,b) <-> P(a',b')"
   511   apply (rule iffI)
   511   apply (rule iffI)
   512    apply (tactic {*
   512    apply (tactic {*
   513      DEPTH_SOLVE (atac 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1) *})
   513      DEPTH_SOLVE (assume_tac @{context} 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1) *})
   514   done
   514   done
   515 
   515 
   516 schematic_lemma pred3_cong: "[| p:a=a';  q:b=b';  r:c=c' |] ==> ?p:P(a,b,c) <-> P(a',b',c')"
   516 schematic_lemma pred3_cong: "[| p:a=a';  q:b=b';  r:c=c' |] ==> ?p:P(a,b,c) <-> P(a',b',c')"
   517   apply (rule iffI)
   517   apply (rule iffI)
   518    apply (tactic {*
   518    apply (tactic {*
   519      DEPTH_SOLVE (atac 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1) *})
   519      DEPTH_SOLVE (assume_tac @{context} 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1) *})
   520   done
   520   done
   521 
   521 
   522 lemmas pred_congs = pred1_cong pred2_cong pred3_cong
   522 lemmas pred_congs = pred1_cong pred2_cong pred3_cong
   523 
   523 
   524 (*special case for the equality predicate!*)
   524 (*special case for the equality predicate!*)
   541 
   541 
   542 schematic_lemma disj_impE:
   542 schematic_lemma disj_impE:
   543   assumes major: "p:(P|Q)-->S"
   543   assumes major: "p:(P|Q)-->S"
   544     and minor: "!!x y.[| x:P-->S; y:Q-->S |] ==> q(x,y):R"
   544     and minor: "!!x y.[| x:P-->S; y:Q-->S |] ==> q(x,y):R"
   545   shows "?p:R"
   545   shows "?p:R"
   546   apply (tactic {* DEPTH_SOLVE (atac 1 ORELSE
   546   apply (tactic {* DEPTH_SOLVE (assume_tac @{context} 1 ORELSE
   547       resolve_tac @{context} [@{thm disjI1}, @{thm disjI2}, @{thm impI},
   547       resolve_tac @{context} [@{thm disjI1}, @{thm disjI2}, @{thm impI},
   548         @{thm major} RS @{thm mp}, @{thm minor}] 1) *})
   548         @{thm major} RS @{thm mp}, @{thm minor}] 1) *})
   549   done
   549   done
   550 
   550 
   551 (*Simplifies the implication.  Classical version is stronger.
   551 (*Simplifies the implication.  Classical version is stronger.