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


Quelle  If.thy

  Sprache: Isabelle
 

(*  Title:      Doc/Logics_ZF/If.thy
  Author: Lawrence C Paulson, Cambridge University Computer Laboratory
  Copyright 1991 University of Cambridge
 
 First-Order Logic: the 'if' example.
*)

theory If imports FOL begin

definition "if" :: "[o,o,o]=>o" where
  "if(P,Q,R) == P&Q | ~P&R"

lemma ifI:
    "[| P ==> Q; ~P ==> R |] ==> if(P,Q,R)"
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (simp add: if_def)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply blast
done

lemma ifE:
   "[| if(P,Q,R); [| P; Q |] ==> S; [| ~P; R |] ==> S |] ==> S"
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (simp add: if_def)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply blast
done

lemma if_commute: "if(P, if(Q,A,B), if(Q,C,D)) <-> if(Q, if(P,A,C), if(P,B,D))"
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (rule iffI)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (erule ifE)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (erule ifE)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (rule ifI)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (rule ifI)
  🍋 @{subgoals[display,indent=0,margin=65]}
oops

textTrying again from the beginning in order to use blast\
declare ifI [intro!]
declare ifE [elim!]

lemma if_commute: "if(P, if(Q,A,B), if(Q,C,D)) <-> if(Q, if(P,A,C), if(P,B,D))"
by blast


lemma "if(if(P,Q,R), A, B) <-> if(P, if(Q,A,B), if(R,A,B))"
  🍋 @{subgoals[display,indent=0,margin=65]}
by blast

textTrying again from the beginning in order to prove from the definitions
lemma "if(if(P,Q,R), A, B) <-> if(P, if(Q,A,B), if(R,A,B))"
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (simp add: if_def)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply blast
done


textAn invalid formula. High-level rules permit a simpler diagnosis
lemma "if(if(P,Q,R), A, B) <-> if(P, if(Q,A,B), if(R,B,A))"
  🍋 @{subgoals[display,indent=0,margin=65]}
apply auto
  🍋 @{subgoals[display,indent=0,margin=65]}
(*The next step will fail unless subgoals remain*)
apply (tactic all_tac)
oops

textTrying again from the beginning in order to prove from the definitions
lemma "if(if(P,Q,R), A, B) <-> if(P, if(Q,A,B), if(R,B,A))"
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (simp add: if_def)
  🍋 @{subgoals[display,indent=0,margin=65]}
apply (auto) 
  🍋 @{subgoals[display,indent=0,margin=65]}
(*The next step will fail unless subgoals remain*)
apply (tactic all_tac)
oops


end

Messung V0.5 in Prozent
C=66 H=20 G=48

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-04-28) ¤

*© 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