Theory UML_Tools
theory UML_Tools
imports UML_Logic
begin
lemmas substs1 = StrongEq_L_subst2_rev
foundation15[THEN iffD2, THEN StrongEq_L_subst2_rev]
foundation7'[THEN iffD2, THEN foundation15[THEN iffD2,
THEN StrongEq_L_subst2_rev]]
foundation14[THEN iffD2, THEN StrongEq_L_subst2_rev]
foundation13[THEN iffD2, THEN StrongEq_L_subst2_rev]
lemmas substs2 = StrongEq_L_subst3_rev
foundation15[THEN iffD2, THEN StrongEq_L_subst3_rev]
foundation7'[THEN iffD2, THEN foundation15[THEN iffD2,
THEN StrongEq_L_subst3_rev]]
foundation14[THEN iffD2, THEN StrongEq_L_subst3_rev]
foundation13[THEN iffD2, THEN StrongEq_L_subst3_rev]
lemmas substs4 = StrongEq_L_subst4_rev
foundation15[THEN iffD2, THEN StrongEq_L_subst4_rev]
foundation7'[THEN iffD2, THEN foundation15[THEN iffD2,
THEN StrongEq_L_subst4_rev]]
foundation14[THEN iffD2, THEN StrongEq_L_subst4_rev]
foundation13[THEN iffD2, THEN StrongEq_L_subst4_rev]
lemmas substs = substs1 substs2 substs4 [THEN iffD2] substs4
thm substs
ML‹
fun ocl_subst_asm_tac ctxt = FIRST'(map (fn C => (eresolve0_tac [C]) THEN' (simp_tac ctxt))
@{thms "substs"})
val ocl_subst_asm = fn ctxt => SIMPLE_METHOD (ocl_subst_asm_tac ctxt 1);
val _ = Theory.setup
(Method.setup (Binding.name "ocl_subst_asm")
(Scan.succeed (ocl_subst_asm))
"ocl substition step")
›
lemma test1 : "τ ⊨ A ⟹ τ ⊨ (A and B ≜ B)"
apply(tactic "ocl_subst_asm_tac @{context} 1")
apply(simp)
done
lemma test2 : "τ ⊨ A ⟹ τ ⊨ (A and B ≜ B)"
by(ocl_subst_asm, simp)
lemma test3 : "τ ⊨ A ⟹ τ ⊨ (A and A)"
by(ocl_subst_asm, simp)
lemma test4 : "τ ⊨ not A ⟹ τ ⊨ (A and B ≜ false)"
by(ocl_subst_asm, simp)
lemma test5 : "τ ⊨ (A ≜ null) ⟹ τ ⊨ (B ≜ null) ⟹ ¬ (τ ⊨ (A and B))"
by(ocl_subst_asm,ocl_subst_asm,simp)
lemma test6 : "τ ⊨ not A ⟹ ¬ (τ ⊨ (A and B))"
by(ocl_subst_asm, simp)
lemma test7 : "¬ (τ ⊨ (υ A)) ⟹ τ ⊨ (not B) ⟹ ¬ (τ ⊨ (A and B))"
by(ocl_subst_asm,ocl_subst_asm,simp)
lemma X: "¬ (τ ⊨ (invalid and B))"
apply(insert foundation8[of "τ" "B"], elim disjE,
simp add:defined_bool_split, elim disjE)
apply(ocl_subst_asm, simp)
apply(ocl_subst_asm, simp)
apply(ocl_subst_asm, simp)
apply(ocl_subst_asm, simp)
done
lemma X': "¬ (τ ⊨ (invalid and B))"
by(simp add:foundation10')
lemma Y: "¬ (τ ⊨ (null and B))"
by(simp add: foundation10')
lemma Z: "¬ (τ ⊨ (false and B))"
by(simp add: foundation10')
lemma Z': "(τ ⊨ (true and B)) = (τ ⊨ B)"
by(simp)
end