add(metaterm): free variable laws for lifting opening and closing on metaterms (M5 binding)
This commit is contained in:
5 files changed
+561
-331
No files matched your search
@@ -32,6 +32,14 @@ digraph theorem_deps {
|
|||||||
enumerate_check [label="enumerate_check", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_check theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
enumerate_check [label="enumerate_check", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_check theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
enumerate_sound [label="enumerate_sound", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_sound theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
enumerate_sound [label="enumerate_sound", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_sound theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
enumerate_complete [label="enumerate_complete", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_complete theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
enumerate_complete [label="enumerate_complete", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_complete theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
of_trm_fvs [label="of_trm_fvs", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_fvs theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
of_trm_lift [label="of_trm_lift", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_lift theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
of_trm_open [label="of_trm_open", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_open theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
of_trm_close [label="of_trm_close", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_close theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
of_trm_injective [label="of_trm_injective", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_injective theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
mfvs_lift_m [label="mfvs_lift_m", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mfvs_lift_m theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
mfvs_close_m [label="mfvs_close_m", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mfvs_close_m theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
|
mfvs_open_m [label="mfvs_open_m", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mfvs_open_m theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
Plus_red1_context [label="Plus_red1_context", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Plus_red1_context theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
Plus_red1_context [label="Plus_red1_context", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Plus_red1_context theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
occurs_count_zero [label="occurs_count_zero", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="occurs_count_zero theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
occurs_count_zero [label="occurs_count_zero", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="occurs_count_zero theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
occurs_count_false [label="occurs_count_false", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="occurs_count_false theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
occurs_count_false [label="occurs_count_false", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="occurs_count_false theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||||
@@ -128,6 +136,8 @@ digraph theorem_deps {
|
|||||||
check_all_true -> enumerate_check;
|
check_all_true -> enumerate_check;
|
||||||
steps_sound -> enumerate_sound;
|
steps_sound -> enumerate_sound;
|
||||||
steps_complete -> enumerate_complete;
|
steps_complete -> enumerate_complete;
|
||||||
|
of_trm_lift -> of_trm_open;
|
||||||
|
mfvs_lift_m -> mfvs_open_m;
|
||||||
occurs_count_zero -> occurs_count_pos;
|
occurs_count_zero -> occurs_count_pos;
|
||||||
occurs_count_false -> occurs_count_zfill_plug;
|
occurs_count_false -> occurs_count_zfill_plug;
|
||||||
occurs_lift_self -> occurs_count_zfill_plug;
|
occurs_lift_self -> occurs_count_zfill_plug;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 563 KiB After Width: | Height: | Size: 598 KiB |
+415
-331
File diff suppressed because it is too large.
Load diff
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 84 KiB |
@@ -9,6 +9,7 @@
|
|||||||
"html": "https://arxiv.org/html/2312.13270v1"
|
"html": "https://arxiv.org/html/2312.13270v1"
|
||||||
},
|
},
|
||||||
"milestones": [
|
"milestones": [
|
||||||
|
"M0",
|
||||||
"M1",
|
"M1",
|
||||||
"M2",
|
"M2",
|
||||||
"M3",
|
"M3",
|
||||||
@@ -288,6 +289,90 @@
|
|||||||
"steps_complete"
|
"steps_complete"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "of_trm_fvs",
|
||||||
|
"label": "of_trm_fvs",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "of_trm_lift",
|
||||||
|
"label": "of_trm_lift",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "of_trm_open",
|
||||||
|
"label": "of_trm_open",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": [
|
||||||
|
"of_trm_lift"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "of_trm_close",
|
||||||
|
"label": "of_trm_close",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "of_trm_injective",
|
||||||
|
"label": "of_trm_injective",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "mfvs_lift_m",
|
||||||
|
"label": "mfvs_lift_m",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "mfvs_close_m",
|
||||||
|
"label": "mfvs_close_m",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "mfvs_open_m",
|
||||||
|
"label": "mfvs_open_m",
|
||||||
|
"kind": "infra",
|
||||||
|
"status": "proved",
|
||||||
|
"milestone": "M0",
|
||||||
|
"section": "",
|
||||||
|
"file": "theory/Metaterm.v",
|
||||||
|
"depends": [
|
||||||
|
"mfvs_lift_m"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "Plus_red1_context",
|
"id": "Plus_red1_context",
|
||||||
"label": "Plus_red1_context",
|
"label": "Plus_red1_context",
|
||||||
|
|||||||
@@ -110,3 +110,54 @@ Print Assumptions of_trm_lift.
|
|||||||
Print Assumptions of_trm_open.
|
Print Assumptions of_trm_open.
|
||||||
Print Assumptions of_trm_close.
|
Print Assumptions of_trm_close.
|
||||||
Print Assumptions of_trm_injective.
|
Print Assumptions of_trm_injective.
|
||||||
|
|
||||||
|
Lemma mfvs_lift_m : forall t k, mfvs (lift_m k t) = mfvs t.
|
||||||
|
Proof.
|
||||||
|
induction t; intros k; simpl.
|
||||||
|
- destruct (Nat.ltb n k); reflexivity.
|
||||||
|
- reflexivity.
|
||||||
|
- reflexivity.
|
||||||
|
- rewrite IHt1, IHt2. reflexivity.
|
||||||
|
- rewrite IHt. reflexivity.
|
||||||
|
- rewrite IHt1, IHt2. reflexivity.
|
||||||
|
Qed.
|
||||||
|
|
||||||
|
Lemma mfvs_close_m : forall t x k y, In y (mfvs (close_rec_m x k t)) -> In y (mfvs t).
|
||||||
|
Proof.
|
||||||
|
induction t; intros x k y H; simpl in *.
|
||||||
|
- destruct H.
|
||||||
|
- destruct (Nat.eqb a x) eqn:E.
|
||||||
|
+ destruct H.
|
||||||
|
+ destruct H as [Hy | Hf]. subst y. simpl. left. reflexivity. destruct Hf.
|
||||||
|
- exact H.
|
||||||
|
- apply in_app_iff in H as [H|H]; apply in_app_iff.
|
||||||
|
+ left. apply (IHt1 x k y). exact H.
|
||||||
|
+ right. apply (IHt2 x k y). exact H.
|
||||||
|
- apply (IHt x (S k) y). exact H.
|
||||||
|
- apply in_app_iff in H as [H|H]; apply in_app_iff.
|
||||||
|
+ left. apply (IHt1 x (S k) y). exact H.
|
||||||
|
+ right. apply (IHt2 x k y). exact H.
|
||||||
|
Qed.
|
||||||
|
|
||||||
|
Lemma mfvs_open_m : forall t k u y,
|
||||||
|
In y (mfvs (open_rec_m k u t)) -> In y (mfvs u) \/ In y (mfvs t).
|
||||||
|
Proof.
|
||||||
|
induction t; intros k u y H; simpl in *.
|
||||||
|
- destruct (Nat.eqb n k) eqn:E.
|
||||||
|
+ apply Nat.eqb_eq in E. subst n. simpl in H.
|
||||||
|
left. rewrite <- (mfvs_lift_m u k). exact H.
|
||||||
|
+ simpl in H. destruct H.
|
||||||
|
- right. exact H.
|
||||||
|
- right. exact H.
|
||||||
|
- apply in_app_iff in H as [H|H].
|
||||||
|
+ destruct (IHt1 k u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; left; exact Hr.
|
||||||
|
+ destruct (IHt2 k u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; right; exact Hr.
|
||||||
|
- destruct (IHt (S k) u y H) as [Hl|Hr]. left; exact Hl. right; exact Hr.
|
||||||
|
- apply in_app_iff in H as [H|H].
|
||||||
|
+ destruct (IHt1 (S k) u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; left; exact Hr.
|
||||||
|
+ destruct (IHt2 k u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; right; exact Hr.
|
||||||
|
Qed.
|
||||||
|
|
||||||
|
Print Assumptions mfvs_lift_m.
|
||||||
|
Print Assumptions mfvs_close_m.
|
||||||
|
Print Assumptions mfvs_open_m.
|
||||||
Reference in new issue
Block a user