src/HOL/FixedPoint.thy
author haftmann
Sun, 06 May 2007 21:49:24 +0200
changeset 22839 ede26eb5e549
parent 22744 5cbe966d67a2
child 22845 5f9138bcb3d7
permissions -rw-r--r--
dropped HOL.ML
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
     1
(*  Title:      HOL/FixedPoint.thy
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
     2
    ID:         $Id$
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
     4
    Author:     Stefan Berghofer, TU Muenchen
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
     5
    Copyright   1992  University of Cambridge
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
     6
*)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
     7
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
     8
header {* Fixed Points and the Knaster-Tarski Theorem*}
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
     9
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
    10
theory FixedPoint
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    11
imports Product_Type
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
    12
begin
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
    13
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    14
subsection {* Complete lattices *}
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
    15
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    16
class complete_lattice = lattice +
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    17
  fixes Inf :: "'a set \<Rightarrow> 'a"
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
    18
  assumes Inf_lower: "x \<in> A \<Longrightarrow> Inf A \<sqsubseteq> x"
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
    19
  assumes Inf_greatest: "(\<And>x. x \<in> A \<Longrightarrow> z \<sqsubseteq> x) \<Longrightarrow> z \<sqsubseteq> Inf A"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    20
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    21
definition
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    22
  Sup :: "'a\<Colon>complete_lattice set \<Rightarrow> 'a" where
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    23
  "Sup A = Inf {b. \<forall>a \<in> A. a \<le> b}"
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    24
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    25
theorem Sup_upper: "(x::'a::complete_lattice) \<in> A \<Longrightarrow> x <= Sup A"
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
    26
  by (auto simp: Sup_def intro: Inf_greatest)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    27
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    28
theorem Sup_least: "(\<And>x::'a::complete_lattice. x \<in> A \<Longrightarrow> x <= z) \<Longrightarrow> Sup A <= z"
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
    29
  by (auto simp: Sup_def intro: Inf_lower)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    30
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    31
definition
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    32
  SUPR :: "'a set \<Rightarrow> ('a \<Rightarrow> 'b::complete_lattice) \<Rightarrow> 'b" where
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    33
  "SUPR A f == Sup (f ` A)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    34
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    35
definition
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    36
  INFI :: "'a set \<Rightarrow> ('a \<Rightarrow> 'b::complete_lattice) \<Rightarrow> 'b" where
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    37
  "INFI A f == Inf (f ` A)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    38
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    39
syntax
22439
b709739c69e6 syntax: proper body priorty for derived binders;
wenzelm
parents: 22430
diff changeset
    40
  "_SUP1"     :: "pttrns => 'b => 'b"           ("(3SUP _./ _)" [0, 10] 10)
b709739c69e6 syntax: proper body priorty for derived binders;
wenzelm
parents: 22430
diff changeset
    41
  "_SUP"      :: "pttrn => 'a set => 'b => 'b"  ("(3SUP _:_./ _)" [0, 10] 10)
b709739c69e6 syntax: proper body priorty for derived binders;
wenzelm
parents: 22430
diff changeset
    42
  "_INF1"     :: "pttrns => 'b => 'b"           ("(3INF _./ _)" [0, 10] 10)
b709739c69e6 syntax: proper body priorty for derived binders;
wenzelm
parents: 22430
diff changeset
    43
  "_INF"      :: "pttrn => 'a set => 'b => 'b"  ("(3INF _:_./ _)" [0, 10] 10)
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    44
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    45
translations
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    46
  "SUP x y. B"   == "SUP x. SUP y. B"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    47
  "SUP x. B"     == "CONST SUPR UNIV (%x. B)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    48
  "SUP x. B"     == "SUP x:UNIV. B"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    49
  "SUP x:A. B"   == "CONST SUPR A (%x. B)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    50
  "INF x y. B"   == "INF x. INF y. B"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    51
  "INF x. B"     == "CONST INFI UNIV (%x. B)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    52
  "INF x. B"     == "INF x:UNIV. B"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    53
  "INF x:A. B"   == "CONST INFI A (%x. B)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    54
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    55
(* To avoid eta-contraction of body: *)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    56
print_translation {*
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    57
let
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    58
  fun btr' syn (A :: Abs abs :: ts) =
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    59
    let val (x,t) = atomic_abs_tr' abs
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    60
    in list_comb (Syntax.const syn $ x $ A $ t, ts) end
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    61
  val const_syntax_name = Sign.const_syntax_name @{theory} o fst o dest_Const
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    62
in
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    63
[(const_syntax_name @{term SUPR}, btr' "_SUP"),(const_syntax_name @{term "INFI"}, btr' "_INF")]
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    64
end
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    65
*}
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    66
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    67
lemma le_SUPI: "i : A \<Longrightarrow> M i \<le> (SUP i:A. M i)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    68
  by (auto simp add: SUPR_def intro: Sup_upper)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    69
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    70
lemma SUP_leI: "(\<And>i. i : A \<Longrightarrow> M i \<le> u) \<Longrightarrow> (SUP i:A. M i) \<le> u"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    71
  by (auto simp add: SUPR_def intro: Sup_least)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    72
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    73
lemma INF_leI: "i : A \<Longrightarrow> (INF i:A. M i) \<le> M i"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    74
  by (auto simp add: INFI_def intro: Inf_lower)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    75
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    76
lemma le_INFI: "(\<And>i. i : A \<Longrightarrow> u \<le> M i) \<Longrightarrow> u \<le> (INF i:A. M i)"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    77
  by (auto simp add: INFI_def intro: Inf_greatest)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    78
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    79
text {* A complete lattice is a lattice *}
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    80
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    81
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
    82
subsubsection {* Properties *}
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
    83
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
    84
lemma mono_inf: "mono f \<Longrightarrow> f (inf A B) <= inf (f A) (f B)"
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
    85
  by (auto simp add: mono_def)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
    86
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
    87
lemma mono_sup: "mono f \<Longrightarrow> sup (f A) (f B) <= f (sup A B)"
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
    88
  by (auto simp add: mono_def)
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
    89
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
    90
lemma Sup_insert[simp]: "Sup (insert (a::'a::complete_lattice) A) = sup a (Sup A)"
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    91
  apply (rule order_antisym)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    92
  apply (rule Sup_least)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    93
  apply (erule insertE)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    94
  apply (rule le_supI1)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    95
  apply simp
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    96
  apply (rule le_supI2)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    97
  apply (erule Sup_upper)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    98
  apply (rule le_supI)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
    99
  apply (rule Sup_upper)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   100
  apply simp
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   101
  apply (rule Sup_least)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   102
  apply (rule Sup_upper)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   103
  apply simp
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   104
  done
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   105
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   106
lemma Inf_insert[simp]: "Inf (insert (a::'a::complete_lattice) A) = inf a (Inf A)"
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   107
  apply (rule order_antisym)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   108
  apply (rule le_infI)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   109
  apply (rule Inf_lower)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   110
  apply simp
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   111
  apply (rule Inf_greatest)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   112
  apply (rule Inf_lower)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   113
  apply simp
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   114
  apply (rule Inf_greatest)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   115
  apply (erule insertE)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   116
  apply (rule le_infI1)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   117
  apply simp
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   118
  apply (rule le_infI2)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   119
  apply (erule Inf_lower)
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   120
  done
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   121
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   122
lemma bot_least[simp]: "Sup{} \<le> (x::'a::complete_lattice)"
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   123
  by (rule Sup_least) simp
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   124
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   125
lemma top_greatest[simp]: "(x::'a::complete_lattice) \<le> Inf{}"
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   126
  by (rule Inf_greatest) simp
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   127
22477
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   128
lemma inf_Inf_empty:
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   129
  "inf a (Inf {}) = a"
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   130
proof -
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   131
  have "a \<le> Inf {}" by (rule top_greatest)
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   132
  then show ?thesis by (rule inf_absorb1)
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   133
qed
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   134
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   135
lemma inf_binary:
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   136
  "Inf {a, b} = inf a b"
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   137
unfolding Inf_insert inf_Inf_empty ..
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   138
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   139
lemma sup_Sup_empty:
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   140
  "sup a (Sup {}) = a"
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   141
proof -
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   142
  have "Sup {} \<le> a" by (rule bot_least)
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   143
  then show ?thesis by (rule sup_absorb1)
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   144
qed
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   145
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   146
lemma sup_binary:
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   147
  "Sup {a, b} = sup a b"
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   148
unfolding Sup_insert sup_Sup_empty ..
be9ae8b19271 new lemmas
haftmann
parents: 22452
diff changeset
   149
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   150
lemma SUP_const[simp]: "A \<noteq> {} \<Longrightarrow> (SUP i:A. M) = M"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   151
  by (auto intro: order_antisym SUP_leI le_SUPI)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   152
22430
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   153
lemma INF_const[simp]: "A \<noteq> {} \<Longrightarrow> (INF i:A. M) = M"
6a56bf1b3a64 Generalized version of SUP and INF (with index set).
berghofe
parents: 22422
diff changeset
   154
  by (auto intro: order_antisym INF_leI le_INFI)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   155
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   156
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   157
subsection {* Some instances of the type class of complete lattices *}
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   158
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   159
subsubsection {* Booleans *}
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   160
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   161
instance bool :: complete_lattice
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   162
  Inf_bool_def: "Inf A \<equiv> \<forall>x\<in>A. x"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   163
  apply intro_classes
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   164
  apply (unfold Inf_bool_def)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   165
  apply (iprover intro!: le_boolI elim: ballE)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   166
  apply (iprover intro!: ballI le_boolI elim: ballE le_boolE)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   167
  done
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   168
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   169
theorem Sup_bool_eq: "Sup A \<longleftrightarrow> (\<exists>x\<in>A. x)"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   170
  apply (rule order_antisym)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   171
  apply (rule Sup_least)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   172
  apply (rule le_boolI)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   173
  apply (erule bexI, assumption)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   174
  apply (rule le_boolI)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   175
  apply (erule bexE)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   176
  apply (rule le_boolE)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   177
  apply (rule Sup_upper)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   178
  apply assumption+
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   179
  done
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   180
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   181
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   182
subsubsection {* Functions *}
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   183
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   184
instance "fun" :: (type, complete_lattice) complete_lattice
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   185
  Inf_fun_def: "Inf A \<equiv> (\<lambda>x. Inf {y. \<exists>f\<in>A. y = f x})"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   186
  apply intro_classes
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   187
  apply (unfold Inf_fun_def)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   188
  apply (rule le_funI)
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   189
  apply (rule Inf_lower)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   190
  apply (rule CollectI)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   191
  apply (rule bexI)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   192
  apply (rule refl)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   193
  apply assumption
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   194
  apply (rule le_funI)
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   195
  apply (rule Inf_greatest)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   196
  apply (erule CollectE)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   197
  apply (erule bexE)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   198
  apply (iprover elim: le_funE)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   199
  done
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   200
22744
5cbe966d67a2 Isar definitions are now added explicitly to code theorem table
haftmann
parents: 22477
diff changeset
   201
lemmas [code nofunc] = Inf_fun_def
5cbe966d67a2 Isar definitions are now added explicitly to code theorem table
haftmann
parents: 22477
diff changeset
   202
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   203
theorem Sup_fun_eq: "Sup A = (\<lambda>x. Sup {y. \<exists>f\<in>A. y = f x})"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   204
  apply (rule order_antisym)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   205
  apply (rule Sup_least)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   206
  apply (rule le_funI)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   207
  apply (rule Sup_upper)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   208
  apply fast
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   209
  apply (rule le_funI)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   210
  apply (rule Sup_least)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   211
  apply (erule CollectE)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   212
  apply (erule bexE)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   213
  apply (drule le_funD [OF Sup_upper])
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   214
  apply simp
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   215
  done
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   216
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   217
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   218
subsubsection {* Sets *}
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   219
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   220
instance set :: (type) complete_lattice
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   221
  Inf_set_def: "Inf S \<equiv> \<Inter>S"
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   222
  by intro_classes (auto simp add: Inf_set_def)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   223
22744
5cbe966d67a2 Isar definitions are now added explicitly to code theorem table
haftmann
parents: 22477
diff changeset
   224
lemmas [code nofunc] = Inf_set_def
5cbe966d67a2 Isar definitions are now added explicitly to code theorem table
haftmann
parents: 22477
diff changeset
   225
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   226
theorem Sup_set_eq: "Sup S = \<Union>S"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   227
  apply (rule subset_antisym)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   228
  apply (rule Sup_least)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   229
  apply (erule Union_upper)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   230
  apply (rule Union_least)
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   231
  apply (erule Sup_upper)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   232
  done
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   233
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   234
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   235
subsection {* Least and greatest fixed points *}
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   236
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   237
definition
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   238
  lfp :: "('a\<Colon>complete_lattice \<Rightarrow> 'a) \<Rightarrow> 'a" where
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   239
  "lfp f = Inf {u. f u \<le> u}"    --{*least fixed point*}
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   240
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   241
definition
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   242
  gfp :: "('a\<Colon>complete_lattice \<Rightarrow> 'a) \<Rightarrow> 'a" where
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   243
  "gfp f = Sup {u. u \<le> f u}"    --{*greatest fixed point*}
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   244
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   245
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   246
subsection{*Proof of Knaster-Tarski Theorem using @{term lfp}*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   247
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   248
text{*@{term "lfp f"} is the least upper bound of 
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   249
      the set @{term "{u. f(u) \<le> u}"} *}
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   250
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   251
lemma lfp_lowerbound: "f A \<le> A ==> lfp f \<le> A"
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   252
  by (auto simp add: lfp_def intro: Inf_lower)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   253
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   254
lemma lfp_greatest: "(!!u. f u \<le> u ==> A \<le> u) ==> A \<le> lfp f"
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   255
  by (auto simp add: lfp_def intro: Inf_greatest)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   256
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   257
lemma lfp_lemma2: "mono f ==> f (lfp f) \<le> lfp f"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   258
  by (iprover intro: lfp_greatest order_trans monoD lfp_lowerbound)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   259
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   260
lemma lfp_lemma3: "mono f ==> lfp f \<le> f (lfp f)"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   261
  by (iprover intro: lfp_lemma2 monoD lfp_lowerbound)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   262
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   263
lemma lfp_unfold: "mono f ==> lfp f = f (lfp f)"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   264
  by (iprover intro: order_antisym lfp_lemma2 lfp_lemma3)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   265
22356
fe054a72d9ce Added lemma lfp_const: "lfp (%x. t) = t
krauss
parents: 22276
diff changeset
   266
lemma lfp_const: "lfp (\<lambda>x. t) = t"
fe054a72d9ce Added lemma lfp_const: "lfp (%x. t) = t
krauss
parents: 22276
diff changeset
   267
  by (rule lfp_unfold) (simp add:mono_def)
fe054a72d9ce Added lemma lfp_const: "lfp (%x. t) = t
krauss
parents: 22276
diff changeset
   268
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   269
subsection{*General induction rules for least fixed points*}
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   270
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   271
theorem lfp_induct:
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   272
  assumes mono: "mono f" and ind: "f (inf (lfp f) P) <= P"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   273
  shows "lfp f <= P"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   274
proof -
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   275
  have "inf (lfp f) P <= lfp f" by (rule inf_le1)
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   276
  with mono have "f (inf (lfp f) P) <= f (lfp f)" ..
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   277
  also from mono have "f (lfp f) = lfp f" by (rule lfp_unfold [symmetric])
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   278
  finally have "f (inf (lfp f) P) <= lfp f" .
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   279
  from this and ind have "f (inf (lfp f) P) <= inf (lfp f) P" by (rule le_infI)
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   280
  hence "lfp f <= inf (lfp f) P" by (rule lfp_lowerbound)
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   281
  also have "inf (lfp f) P <= P" by (rule inf_le2)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   282
  finally show ?thesis .
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   283
qed
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   284
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   285
lemma lfp_induct_set:
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   286
  assumes lfp: "a: lfp(f)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   287
      and mono: "mono(f)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   288
      and indhyp: "!!x. [| x: f(lfp(f) Int {x. P(x)}) |] ==> P(x)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   289
  shows "P(a)"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   290
  by (rule lfp_induct [THEN subsetD, THEN CollectD, OF mono _ lfp])
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   291
    (auto simp: inf_set_eq intro: indhyp)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   292
22452
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   293
text {* Version of induction for binary relations *}
8a86fd2a1bf0 adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents: 22439
diff changeset
   294
lemmas lfp_induct2 =  lfp_induct_set [of "(a, b)", split_format (complete)]
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   295
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   296
lemma lfp_ordinal_induct: 
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   297
  assumes mono: "mono f"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   298
  shows "[| !!S. P S ==> P(f S); !!M. !S:M. P S ==> P(Union M) |] 
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   299
         ==> P(lfp f)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   300
apply(subgoal_tac "lfp f = Union{S. S \<subseteq> lfp f & P S}")
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   301
 apply (erule ssubst, simp) 
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   302
apply(subgoal_tac "Union{S. S \<subseteq> lfp f & P S} \<subseteq> lfp f")
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   303
 prefer 2 apply blast
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   304
apply(rule equalityI)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   305
 prefer 2 apply assumption
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   306
apply(drule mono [THEN monoD])
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   307
apply (cut_tac mono [THEN lfp_unfold], simp)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   308
apply (rule lfp_lowerbound, auto) 
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   309
done
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   310
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   311
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   312
text{*Definition forms of @{text lfp_unfold} and @{text lfp_induct}, 
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   313
    to control unfolding*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   314
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   315
lemma def_lfp_unfold: "[| h==lfp(f);  mono(f) |] ==> h = f(h)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   316
by (auto intro!: lfp_unfold)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   317
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   318
lemma def_lfp_induct: 
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   319
    "[| A == lfp(f); mono(f);
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   320
        f (inf A P) \<le> P
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   321
     |] ==> A \<le> P"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   322
  by (blast intro: lfp_induct)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   323
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   324
lemma def_lfp_induct_set: 
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   325
    "[| A == lfp(f);  mono(f);   a:A;                    
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   326
        !!x. [| x: f(A Int {x. P(x)}) |] ==> P(x)         
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   327
     |] ==> P(a)"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   328
  by (blast intro: lfp_induct_set)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   329
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   330
(*Monotonicity of lfp!*)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   331
lemma lfp_mono: "(!!Z. f Z \<le> g Z) ==> lfp f \<le> lfp g"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   332
  by (rule lfp_lowerbound [THEN lfp_greatest], blast intro: order_trans)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   333
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   334
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   335
subsection{*Proof of Knaster-Tarski Theorem using @{term gfp}*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   336
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   337
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   338
text{*@{term "gfp f"} is the greatest lower bound of 
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   339
      the set @{term "{u. u \<le> f(u)}"} *}
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   340
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   341
lemma gfp_upperbound: "X \<le> f X ==> X \<le> gfp f"
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   342
  by (auto simp add: gfp_def intro: Sup_upper)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   343
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   344
lemma gfp_least: "(!!u. u \<le> f u ==> u \<le> X) ==> gfp f \<le> X"
21312
1d39091a3208 started reorgnization of lattice theories
nipkow
parents: 21017
diff changeset
   345
  by (auto simp add: gfp_def intro: Sup_least)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   346
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   347
lemma gfp_lemma2: "mono f ==> gfp f \<le> f (gfp f)"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   348
  by (iprover intro: gfp_least order_trans monoD gfp_upperbound)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   349
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   350
lemma gfp_lemma3: "mono f ==> f (gfp f) \<le> gfp f"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   351
  by (iprover intro: gfp_lemma2 monoD gfp_upperbound)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   352
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   353
lemma gfp_unfold: "mono f ==> gfp f = f (gfp f)"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   354
  by (iprover intro: order_antisym gfp_lemma2 gfp_lemma3)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   355
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   356
subsection{*Coinduction rules for greatest fixed points*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   357
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   358
text{*weak version*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   359
lemma weak_coinduct: "[| a: X;  X \<subseteq> f(X) |] ==> a : gfp(f)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   360
by (rule gfp_upperbound [THEN subsetD], auto)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   361
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   362
lemma weak_coinduct_image: "!!X. [| a : X; g`X \<subseteq> f (g`X) |] ==> g a : gfp f"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   363
apply (erule gfp_upperbound [THEN subsetD])
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   364
apply (erule imageI)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   365
done
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   366
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   367
lemma coinduct_lemma:
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   368
     "[| X \<le> f (sup X (gfp f));  mono f |] ==> sup X (gfp f) \<le> f (sup X (gfp f))"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   369
  apply (frule gfp_lemma2)
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   370
  apply (drule mono_sup)
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   371
  apply (rule le_supI)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   372
  apply assumption
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   373
  apply (rule order_trans)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   374
  apply (rule order_trans)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   375
  apply assumption
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   376
  apply (rule sup_ge2)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   377
  apply assumption
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   378
  done
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   379
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   380
text{*strong version, thanks to Coen and Frost*}
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   381
lemma coinduct_set: "[| mono(f);  a: X;  X \<subseteq> f(X Un gfp(f)) |] ==> a : gfp(f)"
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   382
by (blast intro: weak_coinduct [OF _ coinduct_lemma, simplified sup_set_eq])
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   383
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   384
lemma coinduct: "[| mono(f); X \<le> f (sup X (gfp f)) |] ==> X \<le> gfp(f)"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   385
  apply (rule order_trans)
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   386
  apply (rule sup_ge1)
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   387
  apply (erule gfp_upperbound [OF coinduct_lemma])
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   388
  apply assumption
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   389
  done
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   390
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   391
lemma gfp_fun_UnI2: "[| mono(f);  a: gfp(f) |] ==> a: f(X Un gfp(f))"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   392
by (blast dest: gfp_lemma2 mono_Un)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   393
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   394
subsection{*Even Stronger Coinduction Rule, by Martin Coen*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   395
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   396
text{* Weakens the condition @{term "X \<subseteq> f(X)"} to one expressed using both
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   397
  @{term lfp} and @{term gfp}*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   398
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   399
lemma coinduct3_mono_lemma: "mono(f) ==> mono(%x. f(x) Un X Un B)"
17589
58eeffd73be1 renamed rules to iprover
nipkow
parents: 17006
diff changeset
   400
by (iprover intro: subset_refl monoI Un_mono monoD)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   401
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   402
lemma coinduct3_lemma:
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   403
     "[| X \<subseteq> f(lfp(%x. f(x) Un X Un gfp(f)));  mono(f) |]
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   404
      ==> lfp(%x. f(x) Un X Un gfp(f)) \<subseteq> f(lfp(%x. f(x) Un X Un gfp(f)))"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   405
apply (rule subset_trans)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   406
apply (erule coinduct3_mono_lemma [THEN lfp_lemma3])
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   407
apply (rule Un_least [THEN Un_least])
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   408
apply (rule subset_refl, assumption)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   409
apply (rule gfp_unfold [THEN equalityD1, THEN subset_trans], assumption)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   410
apply (rule monoD, assumption)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   411
apply (subst coinduct3_mono_lemma [THEN lfp_unfold], auto)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   412
done
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   413
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   414
lemma coinduct3: 
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   415
  "[| mono(f);  a:X;  X \<subseteq> f(lfp(%x. f(x) Un X Un gfp(f))) |] ==> a : gfp(f)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   416
apply (rule coinduct3_lemma [THEN [2] weak_coinduct])
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   417
apply (rule coinduct3_mono_lemma [THEN lfp_unfold, THEN ssubst], auto)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   418
done
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   419
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   420
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   421
text{*Definition forms of @{text gfp_unfold} and @{text coinduct}, 
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   422
    to control unfolding*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   423
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   424
lemma def_gfp_unfold: "[| A==gfp(f);  mono(f) |] ==> A = f(A)"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   425
by (auto intro!: gfp_unfold)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   426
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   427
lemma def_coinduct:
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   428
     "[| A==gfp(f);  mono(f);  X \<le> f(sup X A) |] ==> X \<le> A"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   429
by (iprover intro!: coinduct)
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   430
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   431
lemma def_coinduct_set:
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   432
     "[| A==gfp(f);  mono(f);  a:X;  X \<subseteq> f(X Un A) |] ==> a: A"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   433
by (auto intro!: coinduct_set)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   434
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   435
(*The version used in the induction/coinduction package*)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   436
lemma def_Collect_coinduct:
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   437
    "[| A == gfp(%w. Collect(P(w)));  mono(%w. Collect(P(w)));   
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   438
        a: X;  !!z. z: X ==> P (X Un A) z |] ==>  
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   439
     a : A"
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   440
apply (erule def_coinduct_set, auto) 
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   441
done
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   442
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   443
lemma def_coinduct3:
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   444
    "[| A==gfp(f); mono(f);  a:X;  X \<subseteq> f(lfp(%x. f(x) Un X Un A)) |] ==> a: A"
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   445
by (auto intro!: coinduct3)
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   446
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   447
text{*Monotonicity of @{term gfp}!*}
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   448
lemma gfp_mono: "(!!Z. f Z \<le> g Z) ==> gfp f \<le> gfp g"
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   449
  by (rule gfp_upperbound [THEN gfp_least], blast intro: order_trans)
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   450
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   451
ML
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   452
{*
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   453
val lfp_def = thm "lfp_def";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   454
val lfp_lowerbound = thm "lfp_lowerbound";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   455
val lfp_greatest = thm "lfp_greatest";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   456
val lfp_unfold = thm "lfp_unfold";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   457
val lfp_induct = thm "lfp_induct";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   458
val lfp_induct2 = thm "lfp_induct2";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   459
val lfp_ordinal_induct = thm "lfp_ordinal_induct";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   460
val def_lfp_unfold = thm "def_lfp_unfold";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   461
val def_lfp_induct = thm "def_lfp_induct";
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   462
val def_lfp_induct_set = thm "def_lfp_induct_set";
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   463
val lfp_mono = thm "lfp_mono";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   464
val gfp_def = thm "gfp_def";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   465
val gfp_upperbound = thm "gfp_upperbound";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   466
val gfp_least = thm "gfp_least";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   467
val gfp_unfold = thm "gfp_unfold";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   468
val weak_coinduct = thm "weak_coinduct";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   469
val weak_coinduct_image = thm "weak_coinduct_image";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   470
val coinduct = thm "coinduct";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   471
val gfp_fun_UnI2 = thm "gfp_fun_UnI2";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   472
val coinduct3 = thm "coinduct3";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   473
val def_gfp_unfold = thm "def_gfp_unfold";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   474
val def_coinduct = thm "def_coinduct";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   475
val def_Collect_coinduct = thm "def_Collect_coinduct";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   476
val def_coinduct3 = thm "def_coinduct3";
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   477
val gfp_mono = thm "gfp_mono";
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   478
val le_funI = thm "le_funI";
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   479
val le_boolI = thm "le_boolI";
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   480
val le_boolI' = thm "le_boolI'";
22422
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   481
val inf_fun_eq = thm "inf_fun_eq";
ee19cdb07528 stepping towards uniform lattice theory development in HOL
haftmann
parents: 22390
diff changeset
   482
val inf_bool_eq = thm "inf_bool_eq";
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   483
val le_funE = thm "le_funE";
22276
96a4db55a0b3 Introduction and elimination rules for <= on predicates
berghofe
parents: 21547
diff changeset
   484
val le_funD = thm "le_funD";
21017
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   485
val le_boolE = thm "le_boolE";
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   486
val le_boolD = thm "le_boolD";
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   487
val le_bool_def = thm "le_bool_def";
5693e4471c2b Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents: 17589
diff changeset
   488
val le_fun_def = thm "le_fun_def";
17006
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   489
*}
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   490
cffca870816a combined Lfp and Gfp to FixedPoint
avigad
parents:
diff changeset
   491
end