# HG changeset patch # User wenzelm # Date 1157970450 -7200 # Node ID 825a8d2335ced14d13aa4a9128fa6e92468b6cbd # Parent 16f867ed6118be27996d1b31935b439016a47c19 more rules; diff -r 16f867ed6118 -r 825a8d2335ce doc-src/IsarImplementation/Thy/logic.thy --- a/doc-src/IsarImplementation/Thy/logic.thy Mon Sep 11 12:27:21 2006 +0200 +++ b/doc-src/IsarImplementation/Thy/logic.thy Mon Sep 11 12:27:30 2006 +0200 @@ -203,6 +203,14 @@ Terms of type @{text "prop"} are called propositions. Logical statements are composed via @{text "\x :: \. B(x)"} and @{text "A \ B"}. + + + \[ + \infer{@{text "(\x\<^sub>\. t): \ \ \"}}{@{text "t: \"}} + \qquad + \infer{@{text "(t u): \"}}{@{text "t: \ \ \"} & @{text "u: \"}} + \] + *} @@ -273,13 +281,56 @@ \seeglossary{type variable}. The distinguishing feature of different variables is their binding scope.} -*} + + \[ + \infer[@{text "(axiom)"}]{@{text "\ A"}}{@{text "A \ \"}} + \qquad + \infer[@{text "(assume)"}]{@{text "A \ A"}}{} + \] + \[ + \infer[@{text "(\_intro)"}]{@{text "\ \ \x. b x"}}{@{text "\ \ b x"} & @{text "x \ \"}} + \qquad + \infer[@{text "(\_elim)"}]{@{text "\ \ b a"}}{@{text "\ \ \x. b x"}} + \] + \[ + \infer[@{text "(\_intro)"}]{@{text "\ - A \ A \ B"}}{@{text "\ \ B"}} + \qquad + \infer[@{text "(\_elim)"}]{@{text "\\<^sub>1 \ \\<^sub>2 \ B"}}{@{text "\\<^sub>1 \ A \ B"} & @{text "\\<^sub>2 \ A"}} + \] -section {* Proof terms *} + Admissible rules: + \[ + \infer[@{text "(generalize_type)"}]{@{text "\ \ B[?\]"}}{@{text "\ \ B[\]"} & @{text "\ \ \"}} + \qquad + \infer[@{text "(generalize_term)"}]{@{text "\ \ B[?x]"}}{@{text "\ \ B[x]"} & @{text "x \ \"}} + \] + \[ + \infer[@{text "(instantiate_type)"}]{@{text "\ \ B[\]"}}{@{text "\ \ B[?\]"}} + \qquad + \infer[@{text "(instantiate_term)"}]{@{text "\ \ B[t]"}}{@{text "\ \ B[?x]"}} + \] -text {* - FIXME !? + Note that @{text "instantiate_term"} could be derived using @{text + "\_intro/elim"}, but this is not how it is implemented. The type + instantiation rule is a genuine admissible one, due to the lack of true + polymorphism in the logic. + + + Equality and logical equivalence: + + \smallskip + \begin{tabular}{ll} + @{text "\ :: \ \ \ \ prop"} & equality relation (infix) \\ + @{text "\ x \ x"} & reflexivity law \\ + @{text "\ x \ y \ P x \ P y"} & substitution law \\ + @{text "\ (\x. f x \ g x) \ f \ g"} & extensionality \\ + @{text "\ (A \ B) \ (B \ A) \ A \ B"} & coincidence with equivalence \\ + \end{tabular} + \smallskip + + + *} @@ -334,6 +385,42 @@ \glossary{HHF}{See \seeglossary{Hereditary Harrop Formula}.} + + \[ + \infer[@{text "(assumption)"}]{@{text "C\"}} + {@{text "(\\<^vec>x. \<^vec>H \<^vec>x \ A \<^vec>x) \ C"} & @{text "A\ = H\<^sub>i\"}~~\text{(for some~@{text i})}} + \] + + + \[ + \infer[@{text "(compose)"}]{@{text "\<^vec>A\ \ C\"}} + {@{text "\<^vec>A \ B"} & @{text "B' \ C"} & @{text "B\ = B'\"}} + \] + + + \[ + \infer[@{text "(\_lift)"}]{@{text "(\\<^vec>x. \<^vec>A (?\<^vec>a \<^vec>x)) \ (\\<^vec>x. B (?\<^vec>a \<^vec>x))"}}{@{text "\<^vec>A ?\<^vec>a \ B ?\<^vec>a"}} + \] + \[ + \infer[@{text "(\_lift)"}]{@{text "(\<^vec>H \ \<^vec>A) \ (\<^vec>H \ B)"}}{@{text "\<^vec>A \ B"}} + \] + + The @{text resolve} scheme is now acquired from @{text "\_lift"}, + @{text "\_lift"}, and @{text compose}. + + \[ + \infer[@{text "(resolution)"}] + {@{text "(\\<^vec>x. \<^vec>H \<^vec>x \ \<^vec>A (?\<^vec>a \<^vec>x))\ \ C\"}} + {\begin{tabular}{l} + @{text "\<^vec>A ?\<^vec>a \ B ?\<^vec>a"} \\ + @{text "(\\<^vec>x. \<^vec>H \<^vec>x \ B' \<^vec>x) \ C"} \\ + @{text "(\\<^vec>x. B (?\<^vec>a \<^vec>x))\ = B'\"} \\ + \end{tabular}} + \] + + + FIXME @{text "elim_resolution"}, @{text "dest_resolution"} *} + end