Skip to content

Commit b386a67

Browse files
committed
finished EV proof
1 parent 1f0a304 commit b386a67

File tree

5 files changed

+156
-39
lines changed

5 files changed

+156
-39
lines changed

01-propositional.mm1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,3 +760,6 @@ theorem absurd_an_r: $aa /\ ~aa <-> bot$ = '(ibii (curry mpcom) absurdum);
760760

761761
theorem imp_or_split: $ (aa -> bb \/ c) -> (aa -> bb) \/ (aa -> c) $ =
762762
'(rsyl (anr impexp) @ orim (imim2 dne) prop_1);
763+
764+
theorem iand4 (h1: $ aa -> bb $) (h2: $ aa -> c $) (h3: $ aa -> d $) (h4: $ aa -> e $): $ aa -> bb /\ c /\ d /\ e $ =
765+
'(iand (iand (iand h1 h2) h3) h4);

12-proof-system-p.mm1

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,16 +1040,16 @@ theorem alpha_exists_disjoint {x y: EVar} (phi: Pattern x):
10401040
$ (exists x phi) <-> exists y (e[ eVar y / x ] phi) $ =
10411041
'(alpha_exists eFresh_disjoint);
10421042

1043-
theorem subset_imp_subset_framing {box: SVar} (ctx phi psi: Pattern box):
1043+
theorem imp_subset_framing {box: SVar} (ctx phi psi: Pattern box):
10441044
$ (phi C= psi) -> ((app[ phi / box ] ctx) C= (app[ psi / box ] ctx)) $ =
10451045
'(rsyl (anr floor_idem) @ framing_floor @ lemma_14 subset_to_imp);
1046-
theorem eq_imp_eq_framing {box: SVar} (ctx phi psi: Pattern box):
1046+
theorem imp_eq_framing {box: SVar} (ctx phi psi: Pattern box):
10471047
$ (phi == psi) -> ((app[ phi / box ] ctx) == (app[ psi / box ] ctx)) $ =
1048-
'(rsyl (iand eq_imp_subset @ rsyl eq_sym eq_imp_subset) @ rsyl (anim subset_imp_subset_framing subset_imp_subset_framing) @ curry subset_to_eq);
1048+
'(rsyl (iand eq_imp_subset @ rsyl eq_sym eq_imp_subset) @ rsyl (anim imp_subset_framing imp_subset_framing) @ curry subset_to_eq);
10491049

10501050
do {
1051-
(def (subset_imp_subset_framing_subst subst) '(norm (norm_imp_r @ norm_subset ,subst ,subst) (!! subset_imp_subset_framing box)))
1052-
(def (eq_imp_eq_framing_subst subst) '(norm (norm_imp_r @ norm_eq ,subst ,subst) eq_imp_eq_framing))
1051+
(def (imp_subset_framing_subst subst) '(norm (norm_imp_r @ norm_subset ,subst ,subst) (!! imp_subset_framing box)))
1052+
(def (imp_eq_framing_subst subst) '(norm (norm_imp_r @ norm_eq ,subst ,subst) imp_eq_framing))
10531053
};
10541054

10551055
do {
@@ -1257,7 +1257,7 @@ theorem ceil_idempotency_for_pred (phi: Pattern): $ ((phi == bot) \/ (phi == top
12571257
(mp ,(func_subst_imp_to_var 'x $eVar x == |^ eVar x ^| $) @ lemma_46_floor @ bicom @ taut_equiv_top @ framing_def imp_top definedness))
12581258
(mp ,(func_subst_imp_to_var 'x $(eVar x == bot) \/ (eVar x == top)$) ceil_is_pred)));
12591259

1260-
theorem framing_imp {box: SVar} (ctx: Pattern box) (phi psi: Pattern):
1260+
theorem subset_framing_imp {box: SVar} (ctx: Pattern box) (phi psi: Pattern):
12611261
$ (phi C= psi) -> ((app[ phi / box ] ctx) C= (app[ psi / box ] ctx)) $ =
12621262
'(rsyl subset_imp_or_subset_r @
12631263
rsyl (com12 subset_to_eq @ subset_imp_subset_or_r subset_refl) @
@@ -1267,8 +1267,13 @@ theorem framing_imp {box: SVar} (ctx: Pattern box) (phi psi: Pattern):
12671267
imp_to_subset @
12681268
framing orl);
12691269

1270+
theorem eq_framing_imp {box: SVar} (ctx: Pattern box) (phi psi: Pattern):
1271+
$ (phi == psi) -> ((app[ phi / box ] ctx) == (app[ psi / box ] ctx)) $ =
1272+
'(syl (curry subset_to_eq) @ iand (rsyl eq_imp_subset subset_framing_imp) @ rsyl eq_sym @ rsyl eq_imp_subset subset_framing_imp);
1273+
12701274
do {
1271-
(def (framing_imp_subst subst) '(norm (norm_imp_r @ norm_subset ,subst ,subst) framing_imp))
1275+
(def (subset_framing_imp_subst subst) '(norm (norm_imp_r @ norm_subset ,subst ,subst) subset_framing_imp))
1276+
(def (eq_framing_imp_subst subst) '(norm (norm_imp_r @ norm_eq ,subst ,subst) eq_framing_imp))
12721277
};
12731278

12741279
theorem under_domain_forall {x: EVar} (phi_a phi_b phi_c phi_d: Pattern x)

nominal/core.mm1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ axiom EV_abstraction {a b: EVar} (alpha tau: Pattern) (phi psi: Pattern a b):
5555
(is_of_sort psi tau) ->
5656
((swap (eVar a) (eVar b) (abstraction phi psi)) == abstraction (swap (eVar a) (eVar b) phi) (swap (eVar a) (eVar b) psi)))) $;
5757
-- add EV axiom for swap
58-
-- add EV axiom for freshness
58+
axiom EV_supp {a b: EVar} (tau: Pattern) (phi: Pattern a b):
59+
$ is_atom_sort alpha $ >
60+
$ is_nominal_sort tau $ >
61+
$ s_forall alpha a (s_forall alpha b (
62+
(is_of_sort phi tau) ->
63+
((swap (eVar a) (eVar b) (supp phi)) == supp (swap (eVar a) (eVar b) phi)))) $;
5964

6065
axiom EV_pred (alpha tau: Pattern):
6166
$ is_atom_sort alpha $ >

0 commit comments

Comments
 (0)