Attic/programs/Says.thy
author cu
Fri, 27 Oct 2017 23:57:21 +0100
changeset 558 86334134abe5
parent 198 2ce98ee39990
permissions -rw-r--r--
updated cw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
198
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
theory Says
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
imports Main
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
begin
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
typedecl principal
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
consts Admin :: principal
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
consts Alice :: principal
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
consts Says :: "principal \<Rightarrow> bool \<Rightarrow> bool" ("_ says _")
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
consts del_file :: "bool"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
axiomatization where
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
  saysI[intro]: "F \<Longrightarrow> P says F" and
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
  saysE[elim]:  "\<lbrakk>P says (F1 \<longrightarrow> F2); P says F1\<rbrakk> \<Longrightarrow> P says F2"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
lemma
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
  assumes a1: "(Admin says del_file) \<longrightarrow> del_file"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
  and     a2: "Admin says ((Alice says del_file) \<longrightarrow> del_file)"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
  and     a3: "Alice says del_file"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
  shows "del_file"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
proof -
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
  from a3 have "Admin says (Alice says del_file)" by (rule saysI)
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
  with a2 have "Admin says del_file" by (rule saysE)
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
  with a1 show "del_file" by (rule mp)
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
qed
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
lemma
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
  assumes a1: "(Admin says del_file) \<longrightarrow> del_file"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
  and     a2: "Admin says ((Alice says del_file) \<longrightarrow> del_file)"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
  and     a3: "Alice says del_file"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
  shows "del_file"
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
using a1 a2 a3 by auto
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
2ce98ee39990 reorganised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
end