Skip to content

Commit 5ebf6d3

Browse files
committed
finished reproving the vars case
1 parent b386a67 commit 5ebf6d3

File tree

6 files changed

+380
-180
lines changed

6 files changed

+380
-180
lines changed

01-propositional.mm1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ do {
5858
[_ (error "not a theorem")])
5959
(def (pp-proof x) (display @ pp @ get-proof x))
6060

61+
(def (get-def exp) @ match (get-decl exp)
62+
[('def _ _ _ _ _ val) val]
63+
[_ (error "not a definition")])
64+
6165
--| This utility will take a verbatim proof and "unelaborate" it into a refine script
6266
--| using ! on every step. This is useful to get `refine` to re-typecheck a term when
6367
--| testing tactics which produce verbatim proofs.
@@ -761,5 +765,11 @@ theorem absurd_an_r: $aa /\ ~aa <-> bot$ = '(ibii (curry mpcom) absurdum);
761765
theorem imp_or_split: $ (aa -> bb \/ c) -> (aa -> bb) \/ (aa -> c) $ =
762766
'(rsyl (anr impexp) @ orim (imim2 dne) prop_1);
763767

768+
theorem iand3 (h1: $ aa -> bb $) (h2: $ aa -> c $) (h3: $ aa -> d $): $ aa -> bb /\ c /\ d $ =
769+
'(iand (iand h1 h2) h3);
770+
764771
theorem iand4 (h1: $ aa -> bb $) (h2: $ aa -> c $) (h3: $ aa -> d $) (h4: $ aa -> e $): $ aa -> bb /\ c /\ d /\ e $ =
765772
'(iand (iand (iand h1 h2) h3) h4);
773+
774+
theorem iand5 (h1: $ aa -> bb $) (h2: $ aa -> c $) (h3: $ aa -> d $) (h4: $ aa -> e $) (h5: $ aa -> f $): $ aa -> bb /\ c /\ d /\ e /\ f $ =
775+
'(iand (iand (iand (iand h1 h2) h3) h4) h5);

02-ml-normalization.mm1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ theorem or_exists_disjoint {x: EVar} (phi1: Pattern) (phi2: Pattern x):
201201
$ (phi1 \/ exists x phi2) <-> exists x (phi1 \/ phi2) $ =
202202
'(or_exists_fresh eFresh_disjoint);
203203

204+
theorem exists_irrelevance: $ (exists x phi) -> phi $ = '(exists_generalization_disjoint id);
205+
204206
theorem imp_exists_fresh {x: EVar} (phi1 phi2: Pattern x) (freshness_phi1: $ _eFresh x phi1 $):
205207
$ (phi1 -> exists x phi2) <-> exists x (phi1 -> phi2) $ =
206208
'(ibii
@@ -291,6 +293,7 @@ do {
291293
[$and ,phi1 ,phi2$ '(_eSubst_and ,(propag_e_subst_adv x phi1 wo_x) ,(propag_e_subst_adv x phi2 wo_x))]
292294
[$_ceil ,phi$ '(_eSubst_ceil ,(propag_e_subst_adv x phi wo_x))]
293295
[$_floor ,phi$ '(_eSubst_floor ,(propag_e_subst_adv x phi wo_x))]
296+
[$_in ,y ,phi$ (if (== x y) '(_eSubst_mem_same_var ,(propag_e_subst_adv x phi wo_x)) '(_eSubst_mem ,(propag_e_subst_adv x phi wo_x)))]
294297
[$_subset ,phi1 ,phi2$ '(_eSubst_subset ,(propag_e_subst_adv x phi1 wo_x) ,(propag_e_subst_adv x phi2 wo_x))]
295298
[$equiv ,phi1 ,phi2$ '(_eSubst_equiv ,(propag_e_subst_adv x phi1 wo_x) ,(propag_e_subst_adv x phi2 wo_x))]
296299
[$_eq ,phi1 ,phi2$ '(_eSubst_eq ,(propag_e_subst_adv x phi1 wo_x) ,(propag_e_subst_adv x phi2 wo_x))]

12-proof-system-p.mm1

Lines changed: 106 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ theorem _eSubst_floor {x: EVar} (phi psi rho: Pattern x)
4848
(h: $ Norm (e[ phi / x ] psi) rho $):
4949
$ Norm (e[ phi / x ] (|_ psi _|)) (|_ rho _|) $ =
5050
'(_eSubst_not @ _eSubst_ceil @ _eSubst_not h);
51+
theorem _eSubst_mem {x y: EVar} (phi phi2 psi2: Pattern x y)
52+
(h: $ Norm (e[ phi / x ] phi2) psi2 $):
53+
$ Norm (e[ phi / x ] (y in phi2)) (y in psi2) $ =
54+
'(_eSubst_ceil @ _eSubst_and eSubstitution_disjoint h);
5155
theorem _eSubst_mem_same_var {x: EVar} (phi phi2 psi2: Pattern x)
5256
(h: $ Norm (e[ phi / x ] phi2) psi2 $):
5357
$ Norm (e[ phi / x ] (x in phi2)) (|^ phi /\ psi2 ^|) $ =
@@ -130,6 +134,10 @@ theorem prop_43_exists {box: SVar} {x: EVar} (ctx: Pattern box) (phi: Pattern bo
130134
$ (exists x (app[ phi / box ] ctx)) -> app[ exists x phi / box ] ctx $ =
131135
'(exists_generalization (eFresh_appCtx eFresh_disjoint eFresh_exists_same_var) (framing exists_intro_same_var));
132136

137+
theorem prop_43_exists_var_in_ctx {box: SVar} {x: EVar} (ctx phi: Pattern box x):
138+
$ (exists x (app[ phi / box ] ctx)) -> exists x (app[ exists x phi / box ] ctx) $ =
139+
'(exists_framing @ framing exists_intro_same_var);
140+
133141
theorem prop_43_exists_fresh {box: SVar} {x: EVar} (ctx phi: Pattern box x)
134142
(ctx_fresh: $ _eFresh x ctx $):
135143
$ (exists x (app[ phi / box ] ctx)) -> app[ exists x phi / box ] ctx $ =
@@ -171,6 +179,10 @@ do {
171179
(def (framing_subst hyp subst) '(norm (norm_imp ,subst ,subst) @ framing ,hyp))
172180
};
173181

182+
do {
183+
(def (exists_intro_subst subst) '(norm (norm_imp_l ,subst) exists_intro))
184+
};
185+
174186
theorem exists_intro_l_bi_disjoint {x: EVar} (phi: Pattern x) (psi: Pattern)
175187
(h: $ phi <-> psi $):
176188
$ (exists x phi) <-> psi $ =
@@ -282,17 +294,37 @@ theorem imp_forall_fresh {x: EVar} (phi1 phi2: Pattern x) (freshness_phi1: $ _eF
282294
$ (phi1 -> forall x phi2) <-> forall x (phi1 -> phi2) $ =
283295
'(con2b @ bitr (cong_of_equiv_exists @ con3b @ imeq2i notnot) @ and_exists_fresh freshness_phi1);
284296

285-
theorem imp_forall {x: EVar} (phi1: Pattern) (phi2: Pattern x):
297+
theorem imp_r_forall_disjoint {x: EVar} (phi1: Pattern) (phi2: Pattern x):
286298
$ (phi1 -> forall x phi2) <-> forall x (phi1 -> phi2) $ =
287299
'(imp_forall_fresh eFresh_disjoint);
288300

289-
theorem or_forall {x: EVar} (phi1: Pattern) (phi2: Pattern x):
290-
$ (phi1 \/ forall x phi2) <-> forall x (phi1 \/ phi2) $ = 'imp_forall;
301+
theorem or_r_forall_disjoint {x: EVar} (phi1: Pattern) (phi2: Pattern x):
302+
$ (phi1 \/ forall x phi2) <-> forall x (phi1 \/ phi2) $ = 'imp_r_forall_disjoint;
291303

292-
theorem and_forall {x: EVar} (phi1: Pattern) (phi2: Pattern x):
304+
theorem and_r_forall_disjoint {x: EVar} (phi1: Pattern) (phi2: Pattern x):
293305
$ (phi1 /\ forall x phi2) <-> forall x (phi1 /\ phi2) $ =
294306
'(con3b @ bitr (cong_of_equiv_imp_r @ bicom notnot) @ bitr imp_exists_disjoint @ cong_of_equiv_exists notnot);
295307

308+
theorem forall_ceil {x: EVar} (phi: Pattern x):
309+
$ |^ forall x phi ^| -> forall x (|^ phi ^|) $ =
310+
'(anr (imp_forall_fresh @ eFresh_ceil eFresh_forall_same_var) @ univ_gene @ framing_def var_subst_same_var);
311+
312+
313+
theorem and_forall {x: EVar} (phi psi: Pattern x):
314+
$ (forall x (phi /\ psi)) <-> (forall x phi) /\ (forall x psi) $ =
315+
'(ibii
316+
(iand (forall_framing anl) (forall_framing anr)) @
317+
anr (imp_forall_fresh @ eFresh_and eFresh_forall_same_var eFresh_forall_same_var) @
318+
univ_gene @
319+
anim var_subst_same_var var_subst_same_var);
320+
321+
theorem forall_imp_distr {x: EVar} (phi psi: Pattern x):
322+
$ (forall x (phi -> psi)) -> (forall x phi) -> (forall x psi) $ =
323+
'(exp @ rsyl (anr and_forall) (forall_framing (rsyl ancom appl)));
324+
325+
theorem s_forall_imp_distr {x: EVar} (phi psi rho: Pattern x):
326+
$ (forall x (rho -> (phi -> psi))) -> (forall x (rho -> phi)) -> (forall x (rho -> psi)) $ =
327+
'(rsyl (forall_framing prop_2) forall_imp_distr);
296328

297329
theorem lemma_46 (phi: Pattern) {box: SVar} (ctx: Pattern box)
298330
(p : $ phi $):
@@ -342,16 +374,6 @@ theorem taut_is_top (h: $ phi $): $ phi == top $ =
342374
theorem absurd_and_equiv_bot (h: $ ~ phi $): $ phi /\ psi <-> bot $ =
343375
'(ibii (syl h anl) absurdum);
344376

345-
theorem membership_intro_implicit {x: EVar} (phi: Pattern x)
346-
(h: $ phi $):
347-
$ x in phi $ =
348-
'(framing_def (iand id (a1i h)) definedness);
349-
350-
theorem membership_intro {x: EVar} (phi: Pattern x)
351-
(h: $ phi $):
352-
$ forall x (x in phi) $ =
353-
'(univ_gene @ membership_intro_implicit h);
354-
355377
theorem membership_elim {x: EVar} (phi: Pattern)
356378
(h: $ forall x (x in phi) $):
357379
$ phi $ =
@@ -479,6 +501,20 @@ theorem eVars_subset_eq {x y: EVar}:
479501
$ (eVar x C= eVar y) <-> (eVar x == eVar y) $ =
480502
'(ibii eVars_subset_eq_forward eVars_subset_eq_reverse);
481503

504+
theorem membership_intro_implicit_imp {x: EVar} (phi: Pattern x):
505+
$ |_ phi _| -> x in phi $ =
506+
'(syl eVar_in_subset_reverse @ framing_floor prop_1);
507+
508+
theorem membership_intro_implicit {x: EVar} (phi: Pattern x)
509+
(h: $ phi $):
510+
$ x in phi $ =
511+
'(membership_intro_implicit_imp @ lemma_46_floor h);
512+
513+
theorem membership_intro {x: EVar} (phi: Pattern x)
514+
(h: $ phi $):
515+
$ forall x (x in phi) $ =
516+
'(univ_gene @ membership_intro_implicit h);
517+
482518
theorem lemma_exists_and: $ phi <-> exists x (eVar x /\ phi) $ =
483519
'(ibii
484520
(rsyl notnot1 @ anr or_exists_disjoint @ exists_framing
@@ -1111,6 +1147,9 @@ do {
11111147
-- C[phi] -> x = phi -> C[x]
11121148
(def (func_subst_imp_to_var x ctx) '(com12 @ syl anr ,(func_subst_explicit_helper x ctx)))
11131149

1150+
-- x = phi /\ C[phi] -> C[x]
1151+
(def (func_subst_imp_to_var_variant x ctx) '(curry @ syl anr ,(func_subst_explicit_helper x ctx)))
1152+
11141153
-- forall x . phi1[x]
11151154
-- exists y . y = phi2
11161155
----------------------
@@ -1164,6 +1203,7 @@ do {
11641203
exists_generalization ,fre (mp (com12 @ syl anl ,(func_subst_explicit_helper x phi1)) ,phi1_pf) ,func_phi2
11651204
))
11661205

1206+
-- x in (...) <-> ...
11671207
(def (propag_mem_w_fun x ctx fun_patterns) @ if (not (== (lookup fun_patterns ctx) #undef)) (func_subst_thm (lookup fun_patterns ctx) 'y 'membership_var_bi) @ match ctx
11681208
-- special case for top and bottom?
11691209
[$eVar ,y$ (if (== x y) '(taut_equiv_top membership_same_var) 'membership_var_bi)]
@@ -1180,6 +1220,7 @@ do {
11801220
[$_floor ,psi$ 'mem_floor]
11811221
[$_subset ,phi1 ,phi2$ 'mem_floor]
11821222
[$_eq ,phi1 ,phi2$ 'mem_floor]
1223+
[$_neq ,phi1 ,phi2$ '(bitr membership_not_bi @ cong_of_equiv_not mem_floor)]
11831224

11841225
-- [$nnimp ,phi1 ,phi2$ '(membership_nnimp ,(propag_mem_w_fun x phi1 fun_patterns) ,(propag_mem_w_fun X phi2 fun_patterns))]
11851226
[$epsilon$ (func_subst_thm 'functional_epsilon 'y 'membership_var_bi)]
@@ -1287,7 +1328,7 @@ theorem domain_func_sorting {x: EVar} (phi psi: Pattern):
12871328
rsyl (anim2 @ rsyl eq_sym eq_imp_subset) @
12881329
impcom subset_trans);
12891330

1290-
theorem forall_exists_lemma (phi psi: Pattern):
1331+
theorem forall_exists_lemma {x: EVar} (phi: Pattern x) (psi: Pattern):
12911332
$ ( forall x (phi C= psi)) ->
12921333
((exists x phi) C= psi ) $ =
12931334
'(con3 @
@@ -1300,7 +1341,7 @@ theorem forall_exists_lemma (phi psi: Pattern):
13001341
con3 @
13011342
imim2 notnot1);
13021343

1303-
theorem forall_exists_lemma_rev (phi psi: Pattern):
1344+
theorem forall_exists_lemma_rev {x: EVar} (phi: Pattern x) (psi: Pattern):
13041345
$ ((exists x phi) C= psi ) ->
13051346
( forall x (phi C= psi)) $ =
13061347
'(con3 @
@@ -1329,6 +1370,17 @@ theorem forall_exists_lemma_domain {x: EVar} (phi rho: Pattern x) (psi: Pattern)
13291370
con3 @
13301371
imim2 notnot1);
13311372

1373+
theorem forall_imp_to_imp_exists {x: EVar} (phi psi: Pattern x):
1374+
$ (forall x (phi -> psi)) -> (exists x phi) -> (exists x psi) $ =
1375+
'(exp @ rsyl (and_exists_fresh_reverse eFresh_forall_same_var) @ exists_framing @ curry var_subst_same_var);
1376+
1377+
theorem forall_eq_to_eq_exists {x: EVar} (phi psi: Pattern x):
1378+
$ (forall x (phi == psi)) -> ((exists x phi) == (exists x psi)) $ =
1379+
'(rsyl (forall_framing @ iand eq_imp_subset @ rsyl eq_sym eq_imp_subset) @
1380+
rsyl (iand (forall_framing anl) (forall_framing anr)) @
1381+
rsyl (anim (anr forall_floor) (anr forall_floor)) @
1382+
rsyl (anim (framing_floor forall_imp_to_imp_exists) (framing_floor forall_imp_to_imp_exists)) @
1383+
curry subset_to_eq);
13321384

13331385
theorem pointwise_decomposition {box: SVar} {x: EVar} (ctx: Pattern box) (phi psi: Pattern)
13341386
(hyp: $ (x in phi) -> (app[ eVar x / box ] ctx C= psi) $):
@@ -1362,16 +1414,16 @@ theorem subset_mem_lemma {x: EVar} (phi psi: Pattern):
13621414
'(subset_mem_lemma_fresh eFresh_disjoint);
13631415

13641416
do {
1365-
(def (forall_imp_climb n) (iterate n (fn (pf) '(syl (anl imp_forall) @ imim2 ,pf)) 'id))
1417+
(def (forall_imp_climb n) (iterate n (fn (pf) '(syl (anl imp_r_forall_disjoint) @ imim2 ,pf)) 'id))
13661418

1367-
(def (forall_imp_push n) (iterate n (fn (pf) '(rsyl (anr imp_forall) @ imim2 ,pf)) 'id))
1419+
(def (forall_imp_push n) (iterate n (fn (pf) '(rsyl (anr imp_r_forall_disjoint) @ imim2 ,pf)) 'id))
13681420

13691421
(def (inst_foralls n) (if {n = 0} 'id
13701422
'(rsyl (rsyl ,(inst_foralls {n - 1}) ,(forall_imp_climb {n - 1})) var_subst_same_var)
13711423
))
13721424
};
13731425

1374-
theorem imp_eq_to_conj_in_eq:
1426+
theorem imp_eq_to_conj_ceil_in_eq:
13751427
$ (|^ phi1 ^| -> (phi2 == phi3)) -> ((phi2 /\ |^ phi1 ^|) == (phi3 /\ |^ phi1 ^|)) $ =
13761428
'(rsyl (imim1 dne) @ eori
13771429
(rsyl (anl not_ceil_floor_bi) @ rsyl (anr floor_idem) @
@@ -1381,14 +1433,34 @@ theorem imp_eq_to_conj_in_eq:
13811433
) @
13821434
eq_equiv_to_eq_eq @ eq_to_and_l_bi eq_to_intro_bi);
13831435

1436+
theorem s_forall_eq_lemma {x: EVar} {box: SVar} (phi1 phi2: Pattern box) (S: Pattern):
1437+
$ (forall x (((eVar x) C= S) -> ((app[ eVar x / box ] phi1) == (app[ eVar x / box ] phi2)))) -> ((app[ S / box ] phi1) == (app[ S / box ] phi2)) $ =
1438+
'(rsyl (forall_framing (rsyl (imim1 eVar_in_subset_forward) imp_eq_to_conj_ceil_in_eq)) @
1439+
rsyl forall_eq_to_eq_exists @
1440+
anl @ cong_of_equiv_eq (bicom appCtx_pointwise) (bicom appCtx_pointwise));
1441+
1442+
do {
1443+
(def (s_forall_eq_lemma_subst subst1 subst2) '(norm (norm_imp (norm_forall @ norm_imp_r @ norm_eq ,subst1 ,subst2) @ norm_eq ,subst1 ,subst2) s_forall_eq_lemma))
1444+
};
1445+
1446+
theorem imp_var_nin_lemma:
1447+
$ (forall x (((eVar x) C= S) -> ~ ((eVar y) C= (app[ eVar x / box ] ctx)))) -> ~ ((eVar y) C= (app[ S / box ] ctx)) $ =
1448+
'(con2 @ syl notnot1 @ rsyl eVar_in_subset_reverse @ syl (exists_framing @ anim2 eVar_in_subset_forward) @
1449+
anl ,(propag_mem 'y $_ -> exists x ((_ C= _) /\ _)$) @ membership_intro_implicit @
1450+
rsyl (anl appCtx_pointwise) @ exists_framing @ rsyl ancom @ anim1 eVar_in_subset_forward);
1451+
1452+
do {
1453+
(def (imp_var_nin_lemma_subst subst) '(norm (norm_imp (norm_forall @ norm_imp_r @ norm_not @ norm_subset norm_refl ,subst) @ norm_not @ norm_subset norm_refl ,subst) imp_var_nin_lemma))
1454+
};
1455+
13841456
theorem swap_sorted_forall {x y: EVar} (phi: Pattern x y) (phi_x: Pattern x) (phi_y: Pattern y):
13851457
$ forall x (phi_x -> (forall y (phi_y -> phi))) -> forall y (phi_y -> (forall x (phi_x -> phi))) $ =
13861458
'(
1387-
rsyl (forall_framing @ anl imp_forall) @
1459+
rsyl (forall_framing @ anl imp_r_forall_disjoint) @
13881460
rsyl swap_forall @
13891461
forall_framing @
13901462
rsyl (forall_framing @ anl com12b) @
1391-
anr imp_forall);
1463+
anr imp_r_forall_disjoint);
13921464

13931465
theorem ceil_imp_lemma:
13941466
$ (|^ phi ^| -> |_ psi _|) -> |_ |^ phi ^| -> psi _| $ =
@@ -1458,3 +1530,16 @@ do {
14581530

14591531
(def (extract_pred_from_appCtx_r pred subst) '(norm (norm_imp ,subst @ norm_and_l ,subst) @ rsyl (anl @ cong_of_equiv_appCtx @ cong_of_equiv_and_r ,(floor_wrap_equiv pred)) @ rsyl appCtx_floor_commute @ anr @ cong_of_equiv_and_r ,(floor_wrap_equiv pred)))
14601532
};
1533+
1534+
do {
1535+
(def (forall_extract ctx) @ match ctx
1536+
[$imp _ ,phi$ '(bitr (imeq2i ,(forall_extract phi)) imp_r_forall_disjoint)]
1537+
[$or _ ,phi$ '(bitr (oreq2i ,(forall_extract phi)) or_r_forall_disjoint)]
1538+
[$and _ ,phi$ '(bitr (aneq2i ,(forall_extract phi)) and_r_forall_disjoint)]
1539+
[$forall _ ,phi$ '(bitr (cong_of_equiv_forall ,(forall_extract phi)) swap_forall_bi)]
1540+
[$_in _ ,phi$ '(bitr (cong_of_equiv_mem ,(forall_extract phi)) membership_forall_bi)]
1541+
[$_floor ,phi$ '(bitr (cong_of_equiv_floor ,(forall_extract phi)) forall_floor)]
1542+
1543+
[_ 'biid]
1544+
)
1545+
};

nominal/core.mm1

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def is_atom_sort (alpha: Pattern): Pattern = $ (is_func alpha) /\ (alpha C= dom
2020
def is_nominal_sort (tau: Pattern): Pattern = $ (is_func tau) /\ (tau C= dom nominal_sorts) $;
2121
def is_atom (a alpha: Pattern): Pattern = $ is_sorted_func alpha a $;
2222

23+
axiom nominal_sorts_are_sorts: $ (is_nominal_sort phi) -> (is_sort phi) $;
24+
2325
term swap_sym: Symbol;
2426
def swap (a b phi: Pattern): Pattern = $ (sym swap_sym) @@ a @@ b @@ phi $;
2527
term abstraction_sym: Symbol;
@@ -84,49 +86,42 @@ axiom S3 {a b: EVar} (alpha: Pattern a b):
8486
$ s_forall alpha a (
8587
s_forall alpha b (
8688
((swap (eVar a) (eVar b) (eVar a)) == (eVar b)))) $;
87-
axiom S4 (alpha tau a b phi: Pattern):
88-
$ is_atom_sort alpha $ >
89-
$ is_nominal_sort tau $ >
90-
$ (is_atom a alpha) ->
91-
(is_atom b alpha) ->
92-
(is_of_sort phi tau) ->
93-
((swap a b phi) == (swap b a phi)) $;
94-
axiom F1 (alpha tau a b phi: Pattern):
89+
axiom F1 {a b: EVar} (alpha tau phi: Pattern a b):
9590
$ is_atom_sort alpha $ >
9691
$ is_nominal_sort tau $ >
97-
$ (is_atom a alpha) ->
98-
(is_atom b alpha) ->
92+
$ s_forall alpha a (
93+
s_forall alpha b (
9994
(is_of_sort phi tau) ->
100-
((fresh_for a phi) /\ (fresh_for b phi) -> ((swap a b phi) == phi)) $;
101-
axiom F2 (alpha a b: Pattern):
95+
((fresh_for (eVar a) phi) /\ (fresh_for (eVar b) phi) ->
96+
((swap (eVar a) (eVar b) phi) == phi)))) $;
97+
axiom F2 {a b: EVar} (alpha: Pattern a b):
10298
$ is_atom_sort alpha $ >
103-
$ (is_atom a alpha) ->
104-
(is_atom b alpha) ->
105-
((a != b) <-> (fresh_for a b)) $;
106-
axiom F3 (alpha1 alpha2 a b: Pattern):
99+
$ s_forall alpha a (
100+
s_forall alpha b (
101+
(((eVar a) != (eVar b)) <-> (fresh_for (eVar a) (eVar b))))) $;
102+
axiom F3 {a b: EVar} (alpha1 alpha2: Pattern a b):
107103
$ is_atom_sort alpha1 $ >
108104
$ is_atom_sort alpha2 $ >
109-
$ (is_atom a alpha1) ->
110-
(is_atom b alpha2) ->
111-
(alpha1 != alpha2) ->
112-
(a != b) $;
105+
$ s_forall alpha a (
106+
s_forall alpha b (
107+
(alpha1 != alpha2) -> ((eVar a) != (eVar b)))) $;
113108
-- We restrict F4 to only accept singleton phi's to avoid inconsistencies
114109
-- caused by using the full set of atoms in place of phi
115110
axiom F4 {a: EVar} (alpha tau phi: Pattern):
116111
$ is_atom_sort alpha $ >
117112
$ is_nominal_sort tau $ >
118113
$ (is_sorted_func tau phi) ->
119114
(s_exists alpha a (fresh_for (eVar a) phi)) $;
120-
axiom A1 (alpha tau a b phi rho: Pattern):
115+
axiom A1 {a b: EVar} (alpha tau phi rho: Pattern a b):
121116
$ is_atom_sort alpha $ >
122117
$ is_nominal_sort tau $ >
123-
$ (is_atom a alpha) ->
124-
(is_atom b alpha) ->
118+
$ s_forall alpha a (
119+
s_forall alpha b (
125120
(is_of_sort phi tau) ->
126121
(is_of_sort rho tau) ->
127-
(((abstraction a phi) == (abstraction b rho)) <->
128-
((a == b) /\ (phi == rho)) \/
129-
((fresh_for a rho) /\ ((swap a b phi) == rho))) $;
122+
(((abstraction (eVar a) phi) == (abstraction (eVar b) rho)) <->
123+
(((eVar a) == (eVar b)) /\ (phi == rho)) \/
124+
((fresh_for (eVar a) rho) /\ ((swap (eVar a) (eVar b) phi) == rho))))) $;
130125
axiom A2 (alpha tau: Pattern) {x a y: EVar}:
131126
$ is_atom_sort alpha $ >
132127
$ is_nominal_sort tau $ >

0 commit comments

Comments
 (0)