src/HOL/Auth/Guard/Extensions.thy
changeset 19233 77ca20b0ed77
parent 18557 60a0f9caa0a2
child 20217 25b068a99d2b
equal deleted inserted replaced
19232:1f5b5dc3f48a 19233:77ca20b0ed77
    25 by auto
    25 by auto
    26 
    26 
    27 
    27 
    28 subsection{*Extensions to Theory @{text List}*}
    28 subsection{*Extensions to Theory @{text List}*}
    29 
    29 
    30 subsubsection{*"minus l x" erase the first element of "l" equal to "x"*}
    30 subsubsection{*"remove l x" erase the first element of "l" equal to "x"*}
    31 
    31 
    32 consts minus :: "'a list => 'a => 'a list"
    32 consts remove :: "'a list => 'a => 'a list"
    33 
    33 
    34 primrec
    34 primrec
    35 "minus [] y = []"
    35 "remove [] y = []"
    36 "minus (x#xs) y = (if x=y then xs else x # minus xs y)"
    36 "remove (x#xs) y = (if x=y then xs else x # remove xs y)"
    37 
    37 
    38 lemma set_minus: "set (minus l x) <= set l"
    38 lemma set_remove: "set (remove l x) <= set l"
    39 by (induct l, auto)
    39 by (induct l, auto)
    40 
    40 
    41 subsection{*Extensions to Theory @{text Message}*}
    41 subsection{*Extensions to Theory @{text Message}*}
    42 
    42 
    43 subsubsection{*declarations for tactics*}
    43 subsubsection{*declarations for tactics*}