Skip to content

Commit

Permalink
Revert "remove contra-variant subtyping (#127)"
Browse files Browse the repository at this point in the history
This reverts commit cfe379e.
  • Loading branch information
Ailrun authored Jun 27, 2024
1 parent cfe379e commit 0a2770e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
4 changes: 2 additions & 2 deletions theories/Core/Syntactic/System/Definitions.v
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ with wf_subtyping : ctx -> typ -> typ -> Prop :=
{{ Γ ⊢ Type@i ⊆ Type@j }} )
| wf_subtyp_pi :
`( {{ Γ ⊢ A : Type@i }} ->
{{ Γ ⊢ A' : Type@i }} ->
{{ Γ ⊢ A ≈ A' : Type@i }} ->
{{ Γ , A ⊢ B : Type@i }} ->
{{ Γ ⊢ A' : Type@i }} ->
{{ Γ , A' ⊢ B' : Type@i }} ->
{{ Γ ⊢ A' ⊆ A }} ->
{{ Γ , A' ⊢ B ⊆ B' }} ->
{{ Γ ⊢ Π A B ⊆ Π A' B' }} )
where "Γ ⊢ A ⊆ A'" := (wf_subtyping Γ A A') (in custom judg) : type_scope.
Expand Down
2 changes: 1 addition & 1 deletion theories/Core/Syntactic/System/Lemmas.v
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ Proof.
induction 1; intros; mauto 4.
- transitivity {{{ Type@i}}}; [mauto |].
transitivity {{{ Type@j}}}; [| mauto].
mauto 3.
mauto.
- transitivity {{{ Π (A[σ]) (B [ q σ ]) }}}; [ mauto |].
transitivity {{{ Π (A'[σ]) (B' [ q σ ]) }}}; [ | mauto].
eapply wf_subtyp_pi with (i := i); mauto 4.
Expand Down
18 changes: 0 additions & 18 deletions theories/Core/Syntactic/SystemOpt.v
Original file line number Diff line number Diff line change
Expand Up @@ -267,21 +267,3 @@ Qed.
Hint Resolve wf_exp_eq_pi_eta' : mcltt.
#[export]
Remove Hints wf_exp_eq_pi_eta : mcltt.


Lemma wf_subtyp_pi' : forall Γ A A' B B' i,
{{ Γ ⊢ A ≈ A' : Type@i }} ->
{{ Γ , A' ⊢ B ⊆ B' }} ->
{{ Γ ⊢ Π A B ⊆ Π A' B' }}.
Proof.
intros. gen_presups.
eapply wf_subtyp_pi with (i := max i i0);
mauto 3 using lift_exp_max_left, lift_exp_max_right, lift_exp_eq_max_left.
eapply ctxeq_exp; [ | mauto 3 using lift_exp_max_right].
mauto 4.
Qed.

#[export]
Hint Resolve wf_subtyp_pi' : mcltt.
#[export]
Remove Hints wf_subtyp_pi : mcltt.

0 comments on commit 0a2770e

Please sign in to comment.