src/HOL/Filter.thy
changeset 61953 7247cb62406c
parent 61841 4d3527b94f2a
child 61955 e96292f32c3c
equal deleted inserted replaced
61952:546958347e05 61953:7247cb62406c
    37 subsubsection \<open>Eventually\<close>
    37 subsubsection \<open>Eventually\<close>
    38 
    38 
    39 definition eventually :: "('a \<Rightarrow> bool) \<Rightarrow> 'a filter \<Rightarrow> bool"
    39 definition eventually :: "('a \<Rightarrow> bool) \<Rightarrow> 'a filter \<Rightarrow> bool"
    40   where "eventually P F \<longleftrightarrow> Rep_filter F P"
    40   where "eventually P F \<longleftrightarrow> Rep_filter F P"
    41 
    41 
    42 syntax (xsymbols)
    42 syntax
    43   "_eventually"  :: "pttrn => 'a filter => bool => bool"      ("(3\<forall>\<^sub>F _ in _./ _)" [0, 0, 10] 10)
    43   "_eventually" :: "pttrn => 'a filter => bool => bool"  ("(3\<forall>\<^sub>F _ in _./ _)" [0, 0, 10] 10)
    44 
       
    45 translations
    44 translations
    46   "\<forall>\<^sub>Fx in F. P" == "CONST eventually (\<lambda>x. P) F"
    45   "\<forall>\<^sub>Fx in F. P" == "CONST eventually (\<lambda>x. P) F"
    47 
    46 
    48 lemma eventually_Abs_filter:
    47 lemma eventually_Abs_filter:
    49   assumes "is_filter F" shows "eventually P (Abs_filter F) = F P"
    48   assumes "is_filter F" shows "eventually P (Abs_filter F) = F P"
   148 subsection \<open> Frequently as dual to eventually \<close>
   147 subsection \<open> Frequently as dual to eventually \<close>
   149 
   148 
   150 definition frequently :: "('a \<Rightarrow> bool) \<Rightarrow> 'a filter \<Rightarrow> bool"
   149 definition frequently :: "('a \<Rightarrow> bool) \<Rightarrow> 'a filter \<Rightarrow> bool"
   151   where "frequently P F \<longleftrightarrow> \<not> eventually (\<lambda>x. \<not> P x) F"
   150   where "frequently P F \<longleftrightarrow> \<not> eventually (\<lambda>x. \<not> P x) F"
   152 
   151 
   153 syntax (xsymbols)
   152 syntax
   154   "_frequently"  :: "pttrn \<Rightarrow> 'a filter \<Rightarrow> bool \<Rightarrow> bool"      ("(3\<exists>\<^sub>F _ in _./ _)" [0, 0, 10] 10)
   153   "_frequently" :: "pttrn \<Rightarrow> 'a filter \<Rightarrow> bool \<Rightarrow> bool"  ("(3\<exists>\<^sub>F _ in _./ _)" [0, 0, 10] 10)
   155 
       
   156 translations
   154 translations
   157   "\<exists>\<^sub>Fx in F. P" == "CONST frequently (\<lambda>x. P) F"
   155   "\<exists>\<^sub>Fx in F. P" == "CONST frequently (\<lambda>x. P) F"
   158 
   156 
   159 lemma not_frequently_False [simp]: "\<not> (\<exists>\<^sub>Fx in F. False)"
   157 lemma not_frequently_False [simp]: "\<not> (\<exists>\<^sub>Fx in F. False)"
   160   by (simp add: frequently_def)
   158   by (simp add: frequently_def)