Skip to content

Commit cf15694

Browse files
committed
not sure how to gen to subst
1 parent 1ac28dd commit cf15694

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

theories/Core/Syntactic/Presup.v

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ Qed.
14271427
#[local]
14281428
Hint Resolve presup_exp_eq_sub_compose_right : mctt.
14291429

1430-
(* Fixpoint iter_subst_sigma_wk (Γ : ctx) (σ : sub) :=
1430+
Fixpoint iter_subst_sigma_wk (Γ : ctx) (σ : sub) :=
14311431
match Γ with
14321432
| nil => nil
14331433
| {{{ Γ , A }}} => {{{ ^(iter_subst_sigma_wk Γ σ) , A[ ^(iter (length Γ) (fun τ => {{{ q τ }}}) σ) ] }}}
@@ -1443,7 +1443,13 @@ Proof.
14431443
assert {{ Δ ⊢ Γ',++^ (iter_subst_sigma_wk Γ σ), a[^ (iter (length Γ) (fun τ : sub => {{{ τ∘Wk,,#0 }}}) σ)] }} by (econstructor; mauto 3).
14441444
assert {{ Δ ;; Γ',++^ (iter_subst_sigma_wk Γ σ), a[^ (iter (length Γ) (fun τ : sub => {{{ τ∘Wk,,#0 }}}) σ)] ⊢s Wk : Γ',++^ (iter_subst_sigma_wk Γ σ) }} by mauto 3.
14451445
econstructor; mauto 4.
1446-
Qed. *)
1446+
Qed.
1447+
1448+
(* Given {{ Δ ;; Γ' ⊢s σ : Γ'' }}, are following properties true? *)
1449+
(* {{ Δ ;; Γ' ,++ Γ ⊢s ^(iter (length Γ) (fun τ => {{{ q τ }}}) σ) : Γ'' ,++ Γ }}. *)
1450+
(* {{ Δ ;; Γ' ,++ Γ ⊢s ^(iter (length Γ) (fun τ => {{{ q τ }}}) σ) : Γ' ,++ Γ }}. *)
1451+
(* {{ Δ ;; Γ' ,++ Γ ⊢s ^(iter (length Γ) (fun τ => {{{ q τ }}}) σ) ≈ ^(iter (length Γ) (fun τ => {{{ q τ }}}) Id) : Γ' ,++ Γ }}. *)
1452+
14471453

14481454
Lemma wf_subst_eq_id_wk : forall {Δ Γ Γ'},
14491455
{{ Δ ⊢ Γ' }} ->
@@ -1480,6 +1486,24 @@ Admitted.
14801486
#[local]
14811487
Hint Resolve wf_subst_id_wk : mctt.
14821488

1489+
Lemma subst_wk_wf_exp_subst_eq :
1490+
(forall {Δ Γ M A},
1491+
{{ Δ ;; Γ ⊢ M : A }} ->
1492+
forall {σ Γ1 Γ2},
1493+
{{ Δ ;; Γ1 ⊢s σ : Γ2 }} ->
1494+
{{ Δ ;; Γ1 ,++ Γ ⊢ M[ ^(iter (length Γ) (fun τ => {{{ q τ }}}) {{{ Id }}}) ]
1495+
≈ M[ ^(iter (length Γ) (fun τ => {{{ q τ }}}) σ) ] : A }}) /\
1496+
(forall {Δ Γ τ Γ'},
1497+
{{ Δ ;; Γ ⊢s τ : Γ' }} ->
1498+
forall {σ Γ1 Γ2},
1499+
{{ Δ ;; Γ1 ⊢s σ : Γ2 }} ->
1500+
(* this cannot be correct, as the Id part won't change Γ2 to Γ1, but make Γ1 and Γ2 the same
1501+
also looks weird to me *)
1502+
{{ Δ ;; Γ1 ,++ Γ ⊢s τ ∘ ^(iter (length Γ) (fun σ' => {{{ q τ }}}) {{{ Id }}}) ≈
1503+
τ ∘ ^(iter (length Γ) (fun τ => {{{ q τ }}}) σ) : Γ2 ,++ Γ' }}).
1504+
Proof.
1505+
Abort.
1506+
14831507
Lemma subst_wk_wf_exp_eq : forall {Δ Γ M A Γ' Γ''},
14841508
{{ Δ ;; Γ ⊢ M : A }} ->
14851509
forall {σ},
@@ -1495,8 +1519,27 @@ Proof.
14951519
- admit.
14961520
- admit.
14971521
- admit.
1498-
- admit.
1499-
- admit.
1522+
- etransitivity; [|symmetry].
1523+
+ eapply wf_exp_eq_conv; [eapply wf_exp_eq_app_sub with (Γ':={{{ Γ',++Γ }}})| | ].
1524+
admit.
1525+
eapply wf_weakening_ctx; mauto 3.
1526+
replace {{{ Γ',++Γ, A }}} with {{{ Γ',++(Γ, A) }}} by mauto 3.
1527+
eapply wf_weakening_ctx; mauto 3.
1528+
eapply wf_weakening_ctx; mauto 3.
1529+
eapply wf_weakening_ctx; mauto 3. admit. admit.
1530+
+ assert {{ Δ ⊢ Γ'',++Γ }} by admit.
1531+
etransitivity. eapply wf_exp_eq_conv; [eapply wf_exp_eq_app_sub with (Γ':={{{ Γ'',++Γ }}}) (A:=A) | | ]; mauto 3.
1532+
admit.
1533+
eapply wf_weakening_ctx; mauto 3.
1534+
replace {{{ Γ'',++Γ, A }}} with {{{ Γ'',++(Γ, A) }}} by mauto 3.
1535+
eapply wf_weakening_ctx; mauto 3.
1536+
admit.
1537+
eapply wf_weakening_ctx; mauto 3. eapply wf_weakening_ctx; mauto 3.
1538+
admit. admit. admit. admit.
1539+
eapply wf_exp_eq_conv; [eapply wf_exp_eq_app_cong | |]; mauto 3.
1540+
eapply wf_weakening_ctx; mauto 3.
1541+
replace {{{ Γ',++Γ, A }}} with {{{ Γ',++(Γ, A) }}} by mauto 3.
1542+
eapply wf_weakening_ctx; mauto 3.
15001543
- admit.
15011544
- admit.
15021545
- admit.

0 commit comments

Comments
 (0)