diff -r 28df61d931e2 -r a455e69c31cc src/HOL/Induct/QuoDataType.thy --- a/src/HOL/Induct/QuoDataType.thy Wed Jul 11 11:13:08 2007 +0200 +++ b/src/HOL/Induct/QuoDataType.thy Wed Jul 11 11:14:51 2007 +0200 @@ -19,31 +19,25 @@ | DECRYPT nat freemsg text{*The equivalence relation, which makes encryption and decryption inverses -provided the keys are the same.*} -consts msgrel :: "(freemsg * freemsg) set" - -abbreviation - msg_rel :: "[freemsg, freemsg] => bool" (infixl "~~" 50) where - "X ~~ Y == (X,Y) \ msgrel" +provided the keys are the same. -notation (xsymbols) - msg_rel (infixl "\" 50) -notation (HTML output) - msg_rel (infixl "\" 50) - -text{*The first two rules are the desired equations. The next four rules +The first two rules are the desired equations. The next four rules make the equations applicable to subterms. The last two rules are symmetry and transitivity.*} -inductive "msgrel" - intros - CD: "CRYPT K (DECRYPT K X) \ X" - DC: "DECRYPT K (CRYPT K X) \ X" - NONCE: "NONCE N \ NONCE N" - MPAIR: "\X \ X'; Y \ Y'\ \ MPAIR X Y \ MPAIR X' Y'" - CRYPT: "X \ X' \ CRYPT K X \ CRYPT K X'" - DECRYPT: "X \ X' \ DECRYPT K X \ DECRYPT K X'" - SYM: "X \ Y \ Y \ X" - TRANS: "\X \ Y; Y \ Z\ \ X \ Z" + +inductive_set + msgrel :: "(freemsg * freemsg) set" + and msg_rel :: "[freemsg, freemsg] => bool" (infixl "\" 50) + where + "X \ Y == (X,Y) \ msgrel" + | CD: "CRYPT K (DECRYPT K X) \ X" + | DC: "DECRYPT K (CRYPT K X) \ X" + | NONCE: "NONCE N \ NONCE N" + | MPAIR: "\X \ X'; Y \ Y'\ \ MPAIR X Y \ MPAIR X' Y'" + | CRYPT: "X \ X' \ CRYPT K X \ CRYPT K X'" + | DECRYPT: "X \ X' \ DECRYPT K X \ DECRYPT K X'" + | SYM: "X \ Y \ Y \ X" + | TRANS: "\X \ Y; Y \ Z\ \ X \ Z" text{*Proving that it is an equivalence relation*}