Skip to content

Commit dc2881b

Browse files
committed
add
1 parent cef7ff1 commit dc2881b

File tree

2 files changed

+13
-31
lines changed

2 files changed

+13
-31
lines changed

theories/Core/Syntactic/System/Definitions.v

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ with wf_exp_eq : gctx -> ctx -> typ -> exp -> exp -> Prop :=
456456
`( {{ ⊢ Δ ;; Γ }} ->
457457
{{ `#x := [ ^None ] :: A ∈ Δ }} ->
458458
{{ Δ ;; Γ ⊢ `#x ≈ `#x : A }} )
459+
| wf_exp_eq_gvar_sub :
460+
`( {{ Δ ;; Γ ⊢s σ : Γ' }} ->
461+
{{ `#x := [ M ] :: A ∈ Δ }} ->
462+
(* in principle, A ≡ A[σ] for global defs *)
463+
{{ Δ ;; Γ ⊢ `#x[σ] ≈ `#x : A }} )
459464

460465
| wf_exp_eq_subtyp :
461466
`( {{ Δ ;; Γ ⊢ M ≈ M' : A }} ->

theories/Core/Syntactic/System/Lemmas.v

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,38 +1480,15 @@ Qed.
14801480

14811481
(* the weakening of gctx seems to need a mutual proof with multiple judgements *)
14821482

1483-
Lemma wf_ctx_weakening_gctx : forall {Δ Δ' Γ},
1484-
{{ ⊢ Δ ;; Γ }} ->
1485-
{{ ⊢ Δ ,++ Δ' }} ->
1486-
{{ ⊢ Δ ,++ Δ' ;; Γ }}.
1487-
Proof.
1488-
Admitted.
1489-
1490-
#[export]
1491-
Hint Resolve wf_ctx_weakening_gctx : mctt.
1492-
1493-
Lemma wf_sub_weakening_gctx : forall {Δ Δ' σ Γ Γ'},
1494-
{{ Δ;; Γ ⊢s σ : Γ' }} ->
1495-
{{ ⊢ Δ ,++ Δ' }} ->
1496-
{{ Δ ,++ Δ' ;; Γ ⊢s σ : Γ' }}.
1497-
Admitted.
1498-
1499-
Lemma wf_subtyp_weakening_gctx : forall {Δ Δ' Γ A A'},
1500-
{{ Δ ;; Γ ⊢ A ⊆ A' }} ->
1501-
{{ ⊢ Δ ,++ Δ' }} ->
1502-
{{ Δ ,++ Δ' ;; Γ ⊢ A ⊆ A' }}.
1503-
Proof.
1504-
Admitted.
1505-
1506-
Lemma gctx_presup_weakening : forall {Δ Δ' Γ A M},
1507-
{{ Δ ;; Γ ⊢ M : A }} ->
1508-
{{ ⊢ Δ ,++ Δ' }} ->
1509-
{{ Δ ,++ Δ' ;; Γ ⊢ M : A }}.
1483+
Lemma wf_weakening_gctx :
1484+
(forall Γ Δ, {{ ⊢ Δ ;; Γ }} -> forall Δ', {{ ⊢ Δ ,++ Δ' }} -> {{ ⊢ Δ ,++ Δ' ;; Γ }}) /\
1485+
(forall Δ Γ Γ', {{ Δ ⊢ Γ ⊆ Γ' }} -> forall Δ', {{ ⊢ Δ ,++ Δ' }} -> {{ Δ ,++ Δ' ⊢ Γ ⊆ Γ' }}) /\
1486+
(forall Δ Γ A M, {{ Δ ;; Γ ⊢ M : A }} -> forall Δ', {{ ⊢ Δ ,++ Δ' }} -> {{ Δ ,++ Δ' ;; Γ ⊢ M : A }}) /\
1487+
(forall Δ Γ M M' A, {{ Δ ;; Γ ⊢ M ≈ M' : A }} -> forall Δ', {{ ⊢ Δ ,++ Δ' }} -> {{ Δ ,++ Δ' ;; Γ ⊢ M ≈ M' : A }}) /\
1488+
(forall Δ σ Γ Γ', {{ Δ;; Γ ⊢s σ : Γ' }} -> forall Δ', {{ ⊢ Δ ,++ Δ' }} -> {{ Δ ,++ Δ' ;; Γ ⊢s σ : Γ' }}) /\
1489+
(forall Δ σ σ' Γ Γ', {{ Δ;; Γ ⊢s σ ≈ σ' : Γ' }} -> forall Δ', {{ ⊢ Δ ,++ Δ' }} -> {{ Δ ,++ Δ' ;; Γ ⊢s σ ≈ σ' : Γ' }}) /\
1490+
(forall Δ Γ A A', {{ Δ ;; Γ ⊢ A ⊆ A' }} -> forall Δ', {{ ⊢ Δ ,++ Δ' }} -> {{ Δ ,++ Δ' ;; Γ ⊢ A ⊆ A' }}).
15101491
Proof.
1511-
intros. dependent induction H; try solve [econstructor; mauto 4].
1512-
- econstructor; mauto 3. admit.
1513-
- econstructor; mauto 3. admit.
1514-
- econstructor; mauto 3. admit.
15151492
Admitted.
15161493

15171494
(* this cannot be proved by induction in this form *)

0 commit comments

Comments
 (0)