Nominal/activities/Minimal.thy
author Christian Urban <christian.urban@kcl.ac.uk>
Tue, 07 Jan 2025 12:42:42 +0000
changeset 653 2807ec31d144
parent 415 f1be8028a4a9
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
415
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
theory Minimal
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
imports "Nominal"
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
begin
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
atom_decl name
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
nominal_datatype lam =
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
  Var "name"
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
| App "lam" "lam" 
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
| Lam "\<guillemotleft>name\<guillemotright>lam" ("Lam [_]._")
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
lemma alpha_test:
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
  shows "Lam [x].Var x = Lam [y].Var y"
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
  by (simp add: lam.inject alpha swap_simps fresh_atm)
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
thm lam.inject[no_vars]
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
thm alpha[no_vars]
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
thm swap_simps[no_vars]
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
thm fresh_atm[no_vars]
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
f1be8028a4a9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
end