954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 1
theory Test
1335
+ − 2
imports "Parser" "../Attic/Prove"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 3
begin
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 4
1320
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 5
text {* weirdo example from Peter Sewell's bestiary *}
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 6
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 7
nominal_datatype weird =
1320
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 8
WBind x::"name" y::"name" p1::"weird" p2::"weird" p3::"weird"
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 9
bind x in p1, bind x in p2, bind y in p2, bind y in p3
1321
+ − 10
| WV "name"
+ − 11
| WP "weird" "weird"
1320
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 12
1321
+ − 13
thm permute_weird_raw.simps[no_vars]
1320
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 14
thm alpha_weird_raw.intros[no_vars]
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 15
thm fv_weird_raw.simps[no_vars]
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 16
1335
+ − 17
thm eqvts
+ − 18
+ − 19
local_setup {* (fn ctxt => snd (Local_Theory.note ((@{binding weird_inj}, []), (build_alpha_inj @{thms alpha_weird_raw.intros} @{thms weird_raw.distinct weird_raw.inject} @{thms alpha_weird_raw.cases} ctxt)) ctxt)) *}
+ − 20
thm weird_inj
+ − 21
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 22
(*local_setup {*
1335
+ − 23
(fn ctxt => snd (Local_Theory.note ((@{binding alpha_eqvt}, []),
+ − 24
build_alpha_eqvts [@{term alpha_weird_raw}] [@{term "permute :: perm \<Rightarrow> weird_raw \<Rightarrow> weird_raw"}] @{thms permute_weird_raw.simps weird_inj} @{thm alpha_weird_raw.induct} ctxt) ctxt)) *}
+ − 25
1340
+ − 26
(*prove {* (snd o snd) (build_alpha_refl_gl [@{term alpha_weird_raw}] ("x","y","z")) *}
1335
+ − 27
1340
+ − 28
apply (tactic {* transp_tac @{context} @{thm alpha_weird_raw.induct} @{thms weird_inj} @{thms weird_raw.inject} @{thms weird_raw.distinct} @{thms alpha_weird_raw.cases} @{thms alpha_eqvt} 1 *})
+ − 29
*)
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 30
lemma "alpha_weird_raw x y \<longrightarrow> (\<forall>z. alpha_weird_raw y z \<longrightarrow> alpha_weird_raw x z)"
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 31
apply (rule impI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 32
apply (erule alpha_weird_raw.induct)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 33
apply (simp_all add: weird_inj)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 34
defer
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 35
apply (rule allI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 36
apply (rule impI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 37
apply (erule alpha_weird_raw.cases)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 38
apply (simp_all add: weird_inj)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 39
apply (rule allI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 40
apply (rule impI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 41
apply (erule alpha_weird_raw.cases)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 42
apply (simp_all add: weird_inj)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 43
apply (erule conjE)+
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 44
apply (erule exE)+
1338
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 45
apply (erule conjE)+
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 46
apply (erule exE)+
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 47
apply (rule conjI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 48
apply (rule_tac x="pica + pic" in exI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 49
apply (erule alpha_gen_compose_trans)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 50
apply assumption
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 51
apply (simp add: alpha_eqvt)
1338
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 52
apply (rule_tac x="pia + pib" in exI)
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 53
apply (rule_tac x="piaa + piba" in exI)
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 54
apply (rule conjI)
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 55
apply (erule alpha_gen_compose_trans)
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 56
apply assumption
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 57
apply (simp add: alpha_eqvt)
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 58
apply (rule conjI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 59
defer
1338
95fb422bbb2b
A version that just leaves the supp/\supp goal. Obviously not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 60
apply (rule_tac x="pid + pi" in exI)
1335
+ − 61
apply (erule alpha_gen_compose_trans)
+ − 62
apply assumption
+ − 63
apply (simp add: alpha_eqvt)
1340
+ − 64
sorry
1335
+ − 65
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 66
lemma "alpha_weird_raw x y \<Longrightarrow> alpha_weird_raw y x"
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 67
apply (erule alpha_weird_raw.induct)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 68
apply (simp_all add: weird_inj)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 69
apply (erule conjE)+
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 70
apply (erule exE)+
1340
+ − 71
apply (erule conjE)+
+ − 72
apply (erule exE)+
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 73
apply (rule conjI)
1340
+ − 74
apply (rule_tac x="- pic" in exI)
+ − 75
apply (erule alpha_gen_compose_sym)
+ − 76
apply (simp_all add: alpha_eqvt)
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 77
apply (rule_tac x="- pia" in exI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 78
apply (rule_tac x="- pib" in exI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 79
apply (simp add: minus_add[symmetric])
1340
+ − 80
apply (rule conjI)
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 81
apply (erule alpha_gen_compose_sym)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 82
apply (simp_all add: alpha_eqvt)
1340
+ − 83
apply (rule conjI)
+ − 84
apply (simp add: supp_minus_perm Int_commute)
1337
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 85
apply (rule_tac x="- pi" in exI)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 86
apply (erule alpha_gen_compose_sym)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 87
apply (simp_all add: alpha_eqvt)
7ae031bd5d2f
Prove symp and transp of weird without the supp /\ supp = {} assumption.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 88
done
1335
+ − 89
1332
+ − 90
1321
+ − 91
abbreviation "WBind \<equiv> WBind_raw"
+ − 92
abbreviation "WP \<equiv> WP_raw"
+ − 93
abbreviation "WV \<equiv> WV_raw"
+ − 94
+ − 95
lemma test:
+ − 96
assumes a: "distinct [x, y, z]"
1332
+ − 97
shows "alpha_weird_raw (WBind x y (WP (WV x) (WV z)) (WP (WV x) (WV y)) (WP (WV z) (WV y)))
+ − 98
(WBind y x (WP (WV y) (WV z)) (WP (WV y) (WV x)) (WP (WV z) (WV x)))"
+ − 99
apply(rule_tac alpha_weird_raw.intros)
1321
+ − 100
unfolding alpha_gen
+ − 101
using a
1332
+ − 102
apply(auto)
1321
+ − 103
apply(rule_tac x="(x \<leftrightarrow> y)" in exI)
1332
+ − 104
apply(auto)
+ − 105
apply(simp add: fresh_star_def flip_def fresh_def supp_swap)
+ − 106
apply(rule alpha_weird_raw.intros)
+ − 107
apply(simp add: alpha_weird_raw.intros(2))
+ − 108
apply(rule_tac x="(x \<leftrightarrow> y)" in exI)
+ − 109
apply(rule_tac x="0" in exI)
1321
+ − 110
apply(simp add: fresh_star_def)
+ − 111
apply(auto)
1332
+ − 112
apply(rule alpha_weird_raw.intros)
+ − 113
apply(simp add: alpha_weird_raw.intros(2))
+ − 114
apply(simp add: flip_def supp_swap supp_perm)
+ − 115
apply(rule_tac x="(x \<leftrightarrow> y)" in exI)
1321
+ − 116
apply(simp)
1332
+ − 117
apply(auto)
+ − 118
apply(simp add: flip_def fresh_def supp_swap)
+ − 119
apply(rule alpha_weird_raw.intros)
+ − 120
apply(simp add: alpha_weird_raw.intros(2))
1340
+ − 121
done*)
1321
+ − 122
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 123
text {* example 1 *}
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 124
1316
0577afdb1732
Porting from Lift to Parser; until defining the Quotient type.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 125
(* ML {* set show_hyps *} *)
0577afdb1732
Porting from Lift to Parser; until defining the Quotient type.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 126
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 127
nominal_datatype lam =
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 128
VAR "name"
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 129
| APP "lam" "lam"
1287
+ − 130
| LET bp::"bp" t::"lam" bind "bi bp" in t
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 131
and bp =
1287
+ − 132
BP "name" "lam"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 133
binder
1295
0ecc775e5fce
Link calls to Raw permutations, FV definition and alpha_definition into the parser.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 134
bi::"bp \<Rightarrow> atom set"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 135
where
1295
0ecc775e5fce
Link calls to Raw permutations, FV definition and alpha_definition into the parser.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 136
"bi (BP x t) = {atom x}"
1228
c179ad9d2446
declarartion of the raw datatype already works; raw binding functions throw an exception about mutual recursive types
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 137
c179ad9d2446
declarartion of the raw datatype already works; raw binding functions throw an exception about mutual recursive types
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 138
typ lam_raw
c179ad9d2446
declarartion of the raw datatype already works; raw binding functions throw an exception about mutual recursive types
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 139
term VAR_raw
1283
6a133abb7633
generated the "binding list" from the input; at the moment it is only printed out as tracing; does not yet include the "bind itself binders"
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 140
term APP_raw
6a133abb7633
generated the "binding list" from the input; at the moment it is only printed out as tracing; does not yet include the "bind itself binders"
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 141
term LET_raw
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 142
term Test.BP_raw
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 143
thm bi_raw.simps
1295
0ecc775e5fce
Link calls to Raw permutations, FV definition and alpha_definition into the parser.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 144
thm permute_lam_raw_permute_bp_raw.simps
1319
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 145
thm alpha_lam_raw_alpha_bp_raw.intros[no_vars]
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 146
thm fv_lam_raw_fv_bp_raw.simps[no_vars]
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 147
(*thm lam_bp_induct
1340
+ − 148
thm lam_bp_perm
+ − 149
thm lam_bp_fv
+ − 150
thm lam_bp_bn
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 151
thm lam_bp_inject*)
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 152
1261
853abc14c5c6
added IsaMakefile...but so far included only a test for the parser
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 153
text {* example 2 *}
853abc14c5c6
added IsaMakefile...but so far included only a test for the parser
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 154
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 155
nominal_datatype trm' =
961
+ − 156
Var "name"
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 157
| App "trm'" "trm'"
1272
+ − 158
| Lam x::"name" t::"trm'" bind x in t
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 159
| Let p::"pat'" "trm'" t::"trm'" bind "f p" in t
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 160
and pat' =
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 161
PN
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 162
| PS "name"
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 163
| PD "name" "name"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 164
binder
1299
+ − 165
f::"pat' \<Rightarrow> atom set"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 166
where
978
b44592adf235
Improper interface for datatype and function packages and proper interface lateron.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 167
"f PN = {}"
1299
+ − 168
| "f (PS x) = {atom x}"
+ − 169
| "f (PD x y) = {atom x, atom y}"
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 170
1320
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 171
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 172
thm alpha_trm'_raw_alpha_pat'_raw.intros[no_vars]
447666754176
Another problem with permutations in alpha and possibly also in fv
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 173
thm fv_trm'_raw_fv_pat'_raw.simps[no_vars]
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 174
thm f_raw.simps
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 175
(*thm trm'_pat'_induct
1340
+ − 176
thm trm'_pat'_perm
+ − 177
thm trm'_pat'_fv
+ − 178
thm trm'_pat'_bn
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 179
thm trm'_pat'_inject*)
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 180
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 181
nominal_datatype trm0 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 182
Var0 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 183
| App0 "trm0" "trm0"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 184
| Lam0 x::"name" t::"trm0" bind x in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 185
| Let0 p::"pat0" "trm0" t::"trm0" bind "f0 p" in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 186
and pat0 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 187
PN0
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 188
| PS0 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 189
| PD0 "pat0" "pat0"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 190
binder
1299
+ − 191
f0::"pat0 \<Rightarrow> atom set"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 192
where
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 193
"f0 PN0 = {}"
1299
+ − 194
| "f0 (PS0 x) = {atom x}"
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 195
| "f0 (PD0 p1 p2) = (f0 p1) \<union> (f0 p2)"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 196
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 197
thm f0_raw.simps
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 198
(*thm trm0_pat0_induct
1340
+ − 199
thm trm0_pat0_perm
+ − 200
thm trm0_pat0_fv
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 201
thm trm0_pat0_bn*)
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 202
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 203
text {* example type schemes *}
1285
+ − 204
1304
+ − 205
(* does not work yet
1302
+ − 206
nominal_datatype t =
+ − 207
Var "name"
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 208
| Fun "t" "t"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 209
1302
+ − 210
nominal_datatype tyS =
1299
+ − 211
All xs::"name list" ty::"t_raw" bind xs in ty
+ − 212
*)
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 213
1316
0577afdb1732
Porting from Lift to Parser; until defining the Quotient type.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 214
1299
+ − 215
nominal_datatype t =
+ − 216
Var "name"
+ − 217
| Fun "t" "t"
+ − 218
and tyS =
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 219
All xs::"name set" ty::"t" bind xs in ty
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 220
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 221
(* example 1 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 222
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 223
nominal_datatype trm1 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 224
Vr1 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 225
| Ap1 "trm1" "trm1"
1290
+ − 226
| Lm1 x::"name" t::"trm1" bind x in t
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 227
| Lt1 p::"bp1" "trm1" t::"trm1" bind "bv1 p" in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 228
and bp1 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 229
BUnit1
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 230
| BV1 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 231
| BP1 "bp1" "bp1"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 232
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 233
bv1
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 234
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 235
"bv1 (BUnit1) = {}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 236
| "bv1 (BV1 x) = {atom x}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 237
| "bv1 (BP1 bp1 bp2) = (bv1 bp1) \<union> (bv1 bp2)"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 238
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 239
thm bv1_raw.simps
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 240
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 241
(* example 2 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 242
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 243
nominal_datatype trm2 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 244
Vr2 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 245
| Ap2 "trm2" "trm2"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 246
| Lm2 x::"name" t::"trm2" bind x in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 247
| Lt2 r::"rassign" t::"trm2" bind "bv2 r" in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 248
and rassign =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 249
As "name" "trm2"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 250
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 251
bv2
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 252
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 253
"bv2 (As x t) = {atom x}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 254
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 255
(* example 3 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 256
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 257
nominal_datatype trm3 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 258
Vr3 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 259
| Ap3 "trm3" "trm3"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 260
| Lm3 x::"name" t::"trm3" bind x in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 261
| Lt3 r::"rassigns3" t::"trm3" bind "bv3 r" in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 262
and rassigns3 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 263
ANil
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 264
| ACons "name" "trm3" "rassigns3"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 265
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 266
bv3
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 267
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 268
"bv3 ANil = {}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 269
| "bv3 (ACons x t as) = {atom x} \<union> (bv3 as)"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 270
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 271
(* example 4 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 272
1326
+ − 273
(* fv_eqvt does not work, we need to repaire defined permute functions
+ − 274
defined fv and defined alpha... *)
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 275
nominal_datatype trm4 =
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 276
Vr4 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 277
| Ap4 "trm4" "trm4 list"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 278
| Lm4 x::"name" t::"trm4" bind x in t
1302
+ − 279
1319
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 280
thm alpha_trm4_raw_alpha_trm4_raw_list.intros[no_vars]
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 281
thm fv_trm4_raw_fv_trm4_raw_list.simps[no_vars]
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 282
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 283
(* example 5 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 284
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 285
nominal_datatype trm5 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 286
Vr5 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 287
| Ap5 "trm5" "trm5"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 288
| Lt5 l::"lts" t::"trm5" bind "bv5 l" in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 289
and lts =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 290
Lnil
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 291
| Lcons "name" "trm5" "lts"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 292
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 293
bv5
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 294
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 295
"bv5 Lnil = {}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 296
| "bv5 (Lcons n t ltl) = {atom n} \<union> (bv5 ltl)"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 297
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 298
(* example 6 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 299
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 300
(* BV is not respectful, needs to fail*)
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 301
nominal_datatype trm6 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 302
Vr6 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 303
| Lm6 x::"name" t::"trm6" bind x in t
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 304
| Lt6 left::"trm6" right::"trm6" bind "bv6 left" in right
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 305
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 306
bv6
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 307
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 308
"bv6 (Vr6 n) = {}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 309
| "bv6 (Lm6 n t) = {atom n} \<union> bv6 t"
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 310
| "bv6 (Lt6 l r) = bv6 l \<union> bv6 r"
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 311
(* example 7 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 312
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 313
(* BV is not respectful, needs to fail*)
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 314
nominal_datatype trm7 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 315
Vr7 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 316
| Lm7 l::"name" r::"trm7" bind l in r
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 317
| Lt7 l::"trm7" r::"trm7" bind "bv7 l" in r
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 318
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 319
bv7
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 320
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 321
"bv7 (Vr7 n) = {atom n}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 322
| "bv7 (Lm7 n t) = bv7 t - {atom n}"
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 323
| "bv7 (Lt7 l r) = bv7 l \<union> bv7 r"
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 324
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 325
(* example 8 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 326
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 327
nominal_datatype foo8 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 328
Foo0 "name"
1283
6a133abb7633
generated the "binding list" from the input; at the moment it is only printed out as tracing; does not yet include the "bind itself binders"
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 329
| Foo1 b::"bar8" f::"foo8" bind "bv8 b" in f --"check fo error if this is called foo"
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 330
and bar8 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 331
Bar0 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 332
| Bar1 "name" s::"name" b::"bar8" bind s in b
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 333
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 334
bv8
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 335
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 336
"bv8 (Bar0 x) = {}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 337
| "bv8 (Bar1 v x b) = {atom v}"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 338
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 339
(* example 9 from Terms.thy *)
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 340
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 341
(* BV is not respectful, needs to fail*)
1251
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 342
nominal_datatype lam9 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 343
Var9 "name"
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 344
| Lam9 n::"name" l::"lam9" bind n in l
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 345
and bla9 =
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 346
Bla9 f::"lam9" s::"lam9" bind "bv9 f" in s
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 347
binder
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 348
bv9
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 349
where
11b8798dea5d
parsing and definition of raw datatype and bv-function work (not very beautiful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 350
"bv9 (Var9 x) = {}"
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 351
| "bv9 (Lam9 x b) = {atom x}"
954
c009d2535896
very rough example file for how nominal2 specification can be parsed
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 352
1285
+ − 353
(* example from my PHD *)
+ − 354
+ − 355
atom_decl coname
1272
+ − 356
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 357
nominal_datatype phd =
1290
+ − 358
Ax "name" "coname"
+ − 359
| Cut n::"coname" t1::"phd" c::"coname" t2::"phd" bind n in t1, bind c in t2
+ − 360
| AndR c1::"coname" t1::"phd" c2::"coname" t2::"phd" "coname" bind c1 in t1, bind c2 in t2
+ − 361
| AndL1 n::"name" t::"phd" "name" bind n in t
+ − 362
| AndL2 n::"name" t::"phd" "name" bind n in t
+ − 363
| ImpL c::"coname" t1::"phd" n::"name" t2::"phd" "name" bind c in t1, bind n in t2
1319
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 364
| ImpR c::"coname" n::"name" t::"phd" "coname" bind n in t, bind c in t
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 365
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 366
thm alpha_phd_raw.intros[no_vars]
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 367
thm fv_phd_raw.simps[no_vars]
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 368
1285
+ − 369
+ − 370
(* example form Leroy 96 about modules; OTT *)
1284
+ − 371
1272
+ − 372
nominal_datatype mexp =
1296
+ − 373
Acc "path"
+ − 374
| Stru "body"
+ − 375
| Funct x::"name" "sexp" m::"mexp" bind x in m
+ − 376
| FApp "mexp" "path"
+ − 377
| Ascr "mexp" "sexp"
1272
+ − 378
and body =
+ − 379
Empty
1296
+ − 380
| Seq c::defn d::"body" bind "cbinders c" in d
1272
+ − 381
and defn =
1296
+ − 382
Type "name" "tyty"
+ − 383
| Dty "name"
+ − 384
| DStru "name" "mexp"
+ − 385
| Val "name" "trmtrm"
1272
+ − 386
and sexp =
+ − 387
Sig sbody
1296
+ − 388
| SFunc "name" "sexp" "sexp"
1272
+ − 389
and sbody =
+ − 390
SEmpty
1296
+ − 391
| SSeq C::spec D::sbody bind "Cbinders C" in D
1272
+ − 392
and spec =
1296
+ − 393
Type1 "name"
+ − 394
| Type2 "name" "tyty"
+ − 395
| SStru "name" "sexp"
+ − 396
| SVal "name" "tyty"
1272
+ − 397
and tyty =
1296
+ − 398
Tyref1 "name"
+ − 399
| Tyref2 "path" "tyty"
+ − 400
| Fun "tyty" "tyty"
1272
+ − 401
and path =
1296
+ − 402
Sref1 "name"
+ − 403
| Sref2 "path" "name"
1272
+ − 404
and trmtrm =
1296
+ − 405
Tref1 "name"
+ − 406
| Tref2 "path" "name"
1340
+ − 407
| Lam' v::"name" "tyty" M::"trmtrm" bind v in M
+ − 408
| App' "trmtrm" "trmtrm"
+ − 409
| Let' "body" "trmtrm"
1272
+ − 410
binder
+ − 411
cbinders :: "defn \<Rightarrow> atom set"
+ − 412
and Cbinders :: "spec \<Rightarrow> atom set"
+ − 413
where
+ − 414
"cbinders (Type t T) = {atom t}"
+ − 415
| "cbinders (Dty t) = {atom t}"
+ − 416
| "cbinders (DStru x s) = {atom x}"
+ − 417
| "cbinders (Val v M) = {atom v}"
+ − 418
| "Cbinders (Type1 t) = {atom t}"
+ − 419
| "Cbinders (Type2 t T) = {atom t}"
+ − 420
| "Cbinders (SStru x S) = {atom x}"
+ − 421
| "Cbinders (SVal v T) = {atom v}"
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 422
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 423
(* core haskell *)
1340
+ − 424
print_theorems
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 425
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 426
atom_decl var
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 427
atom_decl tvar
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 428
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 429
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 430
(* there are types, coercion types and regular types *)
1351
+ − 431
nominal_datatype tkind =
+ − 432
KStar
+ − 433
| KFun "tkind" "tkind"
+ − 434
and ckind =
+ − 435
CKEq "ty" "ty"
+ − 436
and ty =
+ − 437
TVar "tvar"
+ − 438
| TC "string"
+ − 439
| TApp "ty" "ty"
+ − 440
| TFun "string" "ty list"
+ − 441
| TAll tv::"tvar" "tkind" T::"ty" bind tv in T
+ − 442
| TEq "ty" "ty" "ty"
+ − 443
and co =
+ − 444
CC "string"
+ − 445
| CApp "co" "co"
+ − 446
| CFun "string" "co list"
+ − 447
| CAll tv::"tvar" "ckind" C::"co" bind tv in C
+ − 448
| CEq "co" "co" "co"
+ − 449
| CSym "co"
+ − 450
| CCir "co" "co"
+ − 451
| CLeft "co"
+ − 452
| CRight "co"
+ − 453
| CSim "co"
+ − 454
| CRightc "co"
+ − 455
| CLeftc "co"
+ − 456
| CCoe "co" "co"
+ − 457
+ − 458
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 459
typedecl ty --"hack since ty is not yet defined"
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 460
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 461
abbreviation
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 462
"atoms A \<equiv> atom ` A"
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 463
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 464
nominal_datatype trm =
1351
+ − 465
Var "var"
+ − 466
| C "string"
+ − 467
| LAM tv::"tvar" "kind" t::"trm" bind tv in t
+ − 468
| APP "trm" "ty"
+ − 469
| Lam v::"var" "ty" t::"trm" bind v in t
+ − 470
| App "trm" "trm"
+ − 471
| Let x::"var" "ty" "trm" t::"trm" bind x in t
+ − 472
| Case "trm" "assoc list"
+ − 473
| Cast "trm" "ty" --"ty is supposed to be a coercion type only"
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 474
and assoc =
1351
+ − 475
A p::"pat" t::"trm" bind "bv p" in t
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 476
and pat =
1351
+ − 477
K "string" "(tvar \<times> kind) list" "(var \<times> ty) list"
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 478
binder
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 479
bv :: "pat \<Rightarrow> atom set"
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 480
where
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 481
"bv (K s ts vs) = (atoms (set (map fst ts))) \<union> (atoms (set (map fst vs)))"
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 482
1312
+ − 483
(*thm bv_raw.simps*)
+ − 484
+ − 485
(* example 3 from Peter Sewell's bestiary *)
+ − 486
nominal_datatype exp =
1340
+ − 487
VarP "name"
+ − 488
| AppP "exp" "exp"
+ − 489
| LamP x::"name" e::"exp" bind x in e
+ − 490
| LetP x::"name" p::"pat" e1::"exp" e2::"exp" bind x in e2, bind "bp p" in e1
1312
+ − 491
and pat =
1319
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 492
PVar "name"
1312
+ − 493
| PUnit
1319
d793ce9cd06f
potential problem with the phd-example, where two permutations are generated, but only one is used
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 494
| PPair "pat" "pat"
1312
+ − 495
binder
+ − 496
bp :: "pat \<Rightarrow> atom set"
+ − 497
where
+ − 498
"bp (PVar x) = {atom x}"
+ − 499
| "bp (PUnit) = {}"
+ − 500
| "bp (PPair p1 p2) = bp p1 \<union> bp p2"
+ − 501
1340
+ − 502
thm quot_respect
1312
+ − 503
(* example 6 from Peter Sewell's bestiary *)
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 504
nominal_datatype exp6 =
1312
+ − 505
EVar name
+ − 506
| EPair exp6 exp6
+ − 507
| ELetRec x::name p::pat6 e1::exp6 e2::exp6 bind x in e1, bind x in e2, bind "bp6 p" in e1
+ − 508
and pat6 =
1340
+ − 509
PVar' name
+ − 510
| PUnit'
+ − 511
| PPair' pat6 pat6
1312
+ − 512
binder
+ − 513
bp6 :: "pat6 \<Rightarrow> atom set"
+ − 514
where
1340
+ − 515
"bp6 (PVar' x) = {atom x}"
+ − 516
| "bp6 (PUnit') = {}"
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 517
| "bp6 (PPair' p1 p2) = bp6 p1 \<union> bp6 p2"
1312
+ − 518
+ − 519
(* example 7 from Peter Sewell's bestiary *)
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 520
nominal_datatype exp7 =
1312
+ − 521
EVar name
+ − 522
| EUnit
+ − 523
| EPair exp7 exp7
+ − 524
| ELetRec l::lrbs e::exp7 bind "b7s l" in e, bind "b7s l" in l
+ − 525
and lrb =
+ − 526
Assign name exp7
+ − 527
and lrbs =
+ − 528
Single lrb
+ − 529
| More lrb lrbs
+ − 530
binder
+ − 531
b7 :: "lrb \<Rightarrow> atom set" and
+ − 532
b7s :: "lrbs \<Rightarrow> atom set"
+ − 533
where
+ − 534
"b7 (Assign x e) = {atom x}"
+ − 535
| "b7s (Single a) = b7 a"
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 536
| "b7s (More a as) = (b7 a) \<union> (b7s as)"
1312
+ − 537
+ − 538
(* example 8 from Peter Sewell's bestiary *)
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 539
nominal_datatype exp8 =
1312
+ − 540
EVar name
+ − 541
| EUnit
+ − 542
| EPair exp8 exp8
+ − 543
| ELetRec l::lrbs8 e::exp8 bind "b_lrbs8 l" in e, bind "b_lrbs8 l" in l
+ − 544
and fnclause =
+ − 545
K x::name p::pat8 e::exp8 bind "b_pat p" in e
+ − 546
and fnclauses =
+ − 547
S fnclause
+ − 548
| ORs fnclause fnclauses
+ − 549
and lrb8 =
+ − 550
Clause fnclauses
+ − 551
and lrbs8 =
+ − 552
Single lrb8
+ − 553
| More lrb8 lrbs8
+ − 554
and pat8 =
+ − 555
PVar name
+ − 556
| PUnit
+ − 557
| PPair pat8 pat8
+ − 558
binder
+ − 559
b_lrbs8 :: "lrbs8 \<Rightarrow> atom set" and
+ − 560
b_pat :: "pat8 \<Rightarrow> atom set" and
+ − 561
b_fnclauses :: "fnclauses \<Rightarrow> atom set" and
+ − 562
b_fnclause :: "fnclause \<Rightarrow> atom set" and
+ − 563
b_lrb8 :: "lrb8 \<Rightarrow> atom set"
+ − 564
where
+ − 565
"b_lrbs8 (Single l) = b_lrb8 l"
+ − 566
| "b_lrbs8 (More l ls) = b_lrb8 l \<union> b_lrbs8 ls"
+ − 567
| "b_pat (PVar x) = {atom x}"
+ − 568
| "b_pat (PUnit) = {}"
+ − 569
| "b_pat (PPair p1 p2) = b_pat p1 \<union> b_pat p2"
+ − 570
| "b_fnclauses (S fc) = (b_fnclause fc)"
+ − 571
| "b_fnclauses (ORs fc fcs) = (b_fnclause fc) \<union> (b_fnclauses fcs)"
+ − 572
| "b_lrb8 (Clause fcs) = (b_fnclauses fcs)"
1341
c25f797c7e6e
Added lifting of pseudo-injectivity, commented out the code again and enabled the weird examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 573
| "b_fnclause (K x pat exp8) = {atom x}"
1312
+ − 574
+ − 575
+ − 576
+ − 577
+ − 578
(* example 9 from Peter Sewell's bestiary *)
+ − 579
(* run out of steam at the moment *)
1265
fc8f5897b00a
first attempt to make sense out of the core-haskell definition
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 580
961
+ − 581
end
1223
160343d86a6f
"raw"-ified the term-constructors and types given in the specification
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 582
160343d86a6f
"raw"-ified the term-constructors and types given in the specification
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 583
1228
c179ad9d2446
declarartion of the raw datatype already works; raw binding functions throw an exception about mutual recursive types
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 584