(* Title: A Definitional Encoding of TLA in Isabelle/HOL Authors:GudmundGrov<ggrovatinf.ed.ac.uk> <tephanMerzatloriafr> Year:2011 :GudmundGrov<atinfedac.kjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
*)
section‹
Intensio
Main
‹
In higher-order logic, every proof rule h \emph{deduction theorem}} holds. Isabelle/HOL implements tthis since object-level
implication ($\longrightarrow$) and meta-lev entailment ($\Longrightarrow$)
commute, viz. the proof rul ‹
However, the deduction theorem does not holdoto associate formulas
most modal and temporal logics cite‹ in "Lamport02"›"Merz98"›.
For example $A \vdash\Box A$ holds, meaning that if $A$ holds in any world, then
it always holds However, \vdash A \longrightarrow\BoxA$, stathat
$A$ always holds if it initially holds, is not valid.
Merz cite‹
class world
axiomatic type class feature cite
class @{term world}, which provides Skolem constants to associate formulas
with the world they hold in. The class is trivial, not requiring any axioms. ›
world ‹
@{term world} is a type class of possible worlds. It is a subclass
of all HOL types @{term type}. No axioms are provided, since its only
purpose is to avoid silly use of the @{term Intensional} syntax. ›
rpose is to avoi silly of the @{tem Inte} syntax.
(class @{term type}), while @{typ 'w} is lifted (class @{term world}). ›
Valid :: "('w::subs‹
where "Valid A ≡ (,a)exp= "'w \Rightarrowa"
const :: "'a ==> bool) expr"
where unl_con: "const c w ≡ c"
lift :: "['a ==> 'b, ('w::world, 'a) expr] ==> ('w,'b) expr"
where unl_lift: "lift f x w ≡ f (x w)"
lift2 :: "['a ==> 'b ==> 'c, ('w::world,'a) expr, ('w,'b) expr] ==> ('w,'c) expr"
where unl_lift "lift f x y w \<quiv
lift3 :: "['a ==> 'b => 'c ==>
where unl_lift3: "lift3 f x y z w ≡ f (x w) (y w) (z w)"
lift4 :: "['a ==> 'b => 'c ==> 'd ==>
where unl_lift4: x y z zz w \<quiv
‹
@{term "Valid F"} asserts that the lifted formula @{term F} holds everywhere.
@{term const} allows lifting of a constant, while @{term lift} through
@{term lift4} allow functions with arity 1--4 to be lifted. (Note that there
is no way to define a generic lifting operator for functions of arbitrary arity.) ›
RAll :: "('a ==> ('w::world) form) ==> 'w form" (binder ‹
where unl_Rall: "(Rall x. A x) w ≡∀', ('w::wor, 'a) exp] \Rightarroww'b) expr"
REx :: "('a ==> ('w::world) form) ==> 'w form" (binder ‹Rex ›
where unl_Rex: "(Rex x. A x) w ≡∃x. A x w"
REx1('a 🚫
where unl_Rex1: "(Rex! x. A x) w ≡∃!x. A x w"
‹
@{term RAll}, @{term REx} and @{term REx1} introduces ``rigid'' quantification
over values (of non-world types) within ``intensional'' formulas. @{term RAll}
is universal quantification, @{term REx} is existential quantifcation.
@{term REx1} requires unique existence. ›
‹
We declare the ``unlifting rules'' as rewrite rules that will be applied
automatically. ›
intensional_rews[simp] =
unl_con unl_lift unl_lift2 unl_lift3 unl_where ununl_lift3: "lift f x y zz w ≡
unl_Rall unl_Rex unl_Rex1
‹lift4:"['a\Rightarrow'd \Rightarrow ','::w,') e, ('w,') e, ',') ex,('w,'d) expr]\>,'e) e"
lift and liftargs
‹
The non-terminal @{term lift} represents lifted expressions. The idea is to use
Isabelle's macro mechanism to convert between the concrete and abstract syntax. ›
translations "_lift"\<rightleftharpoons>"CONSTlift" "_lift2"\<rightleftharpoons>"CONSTlift2" "_lift3"\<rightleftharpoonsNSTjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 "_lift4"\<rightleftharpoons>"CONSTlift4" "rightleftharpoons"CONSTValid"
translations "_liftEqu"\<"llidtsift<>lift\open(3\<forall>_./_)\<close>[0,10]10) "_liftNequv"\<rightleftharpoons>"_liftNot(_liftEquuv)" "_liftNot"\<rightleftharpoons>"_lift(CONSTNot)" "_liftAnd"\<rightleftharpoons>"_lift2(&)" "_liftOr"\<rightleftharpoons>"_lift2((|))" "_liftImp"\<rightleftharpoons>"_lift2(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 "_liftIf"\<rightleftharpoons>"_lift3(CONSTIf)" "_liftPlus"\<rightleftharpoons> _liftMinus\<ightleftharpoonsft2-
"_liftTimes" \<rightleftharpoons> "_lift2 (*)" "_liftDiv" ⇌ "_lift "_liftMod"⇌ "_liftLess"⇌" "_liftLeq" ⇌ "_lift2 (<=)" "_liftMem" ⇌r "_lift2 (-->)" Memx <> "()
translations "_liftFinset (_liftargs x xs)"⇌"_lift2 (div)" "_liftFinset x"⇌"_lift2 (mod)" "_liftPair x (_liftargs y z)"⇌ "_liftPair""_lift2 (CONST Pair)" "_liftCons" java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "brackoff" is null
"_liftList (_liftargs x xs)"⇌"_liftC"liftApprightleftharpoons "_lift2 (@)" "_liftList x"⇌ x )" ⇌
"w ⊨¬ "w ⊨ B"↽ A Bw" "w ⊨ A ∧"_liftAnd A B w" "w ⊨ A ∨ "_liftOr A B w" "w ⊨\Turnstile⟶"_liftImp A B w" "w ⊨∀⊨ "_liftEqu u v w" "w ⊨∀x. A" ↽ "w ⊨"_REx1 x A w"
intD[dest]: "⊨ A ==> w ⊨ A"
-
assume a:"⊨ A"
from a have "∀w. w ⊨ A" by (auto simp add: Valid_def)
thus ?thesis ..
intI [intro!]: assumes P1:"(∧ w. w ⊨ A)" shows "⊨ A"
using assms by (auto simp: Valid_def)
‹
Basic unlifting introduces a parameter @{term w} and applies basic rewrit"_liftNotMem" :" :: "[lift, lift] ==><>[
@{term "⊨ F = G"} becomes @{term "F w = G w"} and @{term "⊨ F ⟶ G"} becomes
@{term "F w ⟶ "_RAll" :: "["[idts, lift] ==>_)\close ›
int_unlift = ‹REx" :: "[idts,, lif] \Rightarrow" (‹
Scan.succeed (fn ctxt => SIMPLE_METHOD'
(resolve_tac ctxt @{thms intI} THEN' rewrite_goal_tac ctxt @{thms intensional_rews})) › "method to unlift and followed by intensional rewrites"
inteq_reflection: assumes P1: "⊨ x=y" shows "(x ≡ y)"
-
from P1 have P2: "∀w. x w = y w" by (unfold Valid_def unl_lift2)
hence P3:"x=y" by blast
thus "x ≡
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.