Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  Eventuallize.thy

  Sprache: Isabelle
 

section Lifting theorems onto filters
theory Eventuallize
  imports Complex_Main
begin

text 
  The following attribute and ML function lift a given theorem of the form
  🍋x. A x B x C x
  to
  🍋eventually A F ==> eventually B F ==> eventually C F .
 

ML 
 signature EVENTUALLIZE =
 sig
 val eventuallize : Proof.context -> thm -> int option -> thm
 end
 
 structure Eventuallize : EVENTUALLIZE =
 struct
 
 fun dest_All (Const (🍋HOL.All, _) $ Abs (x, T, t)) = (x, T, t)
  | dest_All (Const (🍋HOL.All, T) $ f) =
  ("x", T |> dest_funT |> fst |> dest_funT |> fst, f $ Bound 0)
  | dest_All t = raise TERM ("dest_All", [t])
 
 fun strip_imp (🍋() $ a $ b) = apfst (cons a) (strip_imp b)
  | strip_imp t = ([], t)
 
 fun eventuallize ctxt thm n =
  let
  fun err n = raise THM ("Invalid index in eventuallize: " ^ Int.toString n, 0, [thm])
  val n_max =
  thm |> Thm.concl_of |> HOLogic.dest_Trueprop |> dest_All |> #3 |> strip_imp |> fst |> length
  val _ = case n of NONE => () | SOME n =>
  if n >= 0 andalso n 🚫n_max then () else err n
  val n = case n of SOME n => n | NONE => n_max
  fun conv n =
  if n 🚫 then Conv.all_conv else Conv.arg_conv (conv (n - 1)) then_conv
  Conv.rewr_conv @{thm eq_reflection[OF imp_conjL [symmetric]]}
  val conv = Conv.arg_conv (Conv.binder_conv (K (conv n)) ctxt)
  val thm' = Conv.fconv_rule conv thm
  fun go n = if n 🚫 then @{thm _} else @{thm eventually_conj} OF [@{thm _}, go (n - 1)]
  in
  @{thm eventually_rev_mp[OF _ always_eventually]} OF [go n, thm']
  end
 
 end
 

attribute_setup eventuallized = 
  Scan.lift (Scan.option Parse.nat) >>
  (fn n => fn (ctxt, thm) =>
  (NONE, SOME (Eventuallize.eventuallize (Context.proof_of ctxt) thm n)))
 

end

Messung V0.5 in Prozent
C=88 H=82 G=84

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-05-03) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge