-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the statement for soundness cases
- Loading branch information
Showing
11 changed files
with
264 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From Coq Require Import Morphisms Morphisms_Prop Morphisms_Relations Relation_Definitions RelationClasses. | ||
|
||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core.Completeness Require Import FundamentalTheorem. | ||
From Mcltt.Core.Semantic Require Import Realizability. | ||
From Mcltt.Core.Soundness Require Import LogicalRelation Realizability. | ||
From Mcltt.Core.Syntactic Require Import Corollaries. | ||
Import Domain_Notations. | ||
|
||
Lemma glu_rel_ctx_empty : {{ ⊩ ⋅ }}. | ||
Proof. | ||
do 2 econstructor; reflexivity. | ||
Qed. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_ctx_empty : mcltt. | ||
|
||
Lemma glu_rel_ctx_extend : forall {Γ A i}, | ||
{{ ⊩ Γ }} -> | ||
{{ Γ ⊩ A : Type@i }} -> | ||
{{ ⊩ Γ , A }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_ctx_extend : mcltt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From Coq Require Import Morphisms Morphisms_Prop Morphisms_Relations Relation_Definitions RelationClasses. | ||
|
||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core.Completeness Require Import FundamentalTheorem. | ||
From Mcltt.Core.Semantic Require Import Realizability. | ||
From Mcltt.Core.Soundness Require Import LogicalRelation Realizability. | ||
From Mcltt.Core.Syntactic Require Import Corollaries. | ||
Import Domain_Notations. | ||
|
||
Lemma glu_rel_exp_pi : forall {Γ A B i}, | ||
{{ Γ ⊩ A : Type@i }} -> | ||
{{ Γ, A ⊩ B : Type@i }} -> | ||
{{ Γ ⊩ Π A B : Type@i }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_pi : mcltt. | ||
|
||
Lemma glu_rel_exp_fn : forall {Γ M A B i}, | ||
{{ Γ ⊩ A : Type@i }} -> | ||
{{ Γ, A ⊩ M : B }} -> | ||
{{ Γ ⊩ λ A M : Π A B }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_fn : mcltt. | ||
|
||
Lemma glu_rel_exp_app : forall {Γ M N A B i}, | ||
{{ Γ ⊩ A : Type@i }} -> | ||
{{ Γ, A ⊩ B : Type@i }} -> | ||
{{ Γ ⊩ M : Π A B }} -> | ||
{{ Γ ⊩ N : A }} -> | ||
{{ Γ ⊩ M N : B[Id,,N] }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_app : mcltt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From Coq Require Import Morphisms Morphisms_Prop Morphisms_Relations Relation_Definitions RelationClasses. | ||
|
||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core.Soundness Require Import | ||
ContextCases | ||
FunctionCases | ||
NatCases | ||
SubstitutionCases | ||
SubtypingCases | ||
TermStructureCases | ||
UniverseCases. | ||
From Mcltt.Core.Soundness Require Export LogicalRelation. | ||
From Mcltt.Core.Syntactic Require Export SystemOpt. | ||
Import Domain_Notations. | ||
|
||
Section soundness_fundamental. | ||
|
||
Theorem soundness_fundamental : | ||
(forall Γ, {{ ⊢ Γ }} -> {{ ⊩ Γ }}) /\ | ||
(forall Γ A M, {{ Γ ⊢ M : A }} -> {{ Γ ⊩ M : A }}) /\ | ||
(forall Γ Δ σ, {{ Γ ⊢s σ : Δ }} -> {{ Γ ⊩s σ : Δ }}). | ||
Proof. | ||
apply syntactic_wf_mut_ind'; mauto 3. | ||
|
||
- intros. | ||
assert (exists i, {{ Γ ⊩ A' : Type@i }}) as [] by admit. (* this should be added to the syntactic judgement *) | ||
mauto. | ||
- intros. | ||
assert {{ ⊩ Δ' }} by admit. (* this should be added to the syntactic judgement *) | ||
mauto. | ||
Admitted. | ||
|
||
#[local] | ||
Ltac solve_it := pose proof soundness_fundamental; firstorder. | ||
|
||
Theorem soundness_fundamental_ctx : forall Γ, {{ ⊢ Γ }} -> {{ ⊩ Γ }}. | ||
Proof. solve_it. Qed. | ||
|
||
Theorem soundness_fundamental_exp : forall Γ M A, {{ Γ ⊢ M : A }} -> {{ Γ ⊩ M : A }}. | ||
Proof. solve_it. Qed. | ||
|
||
Theorem soundness_fundamental_sub : forall Γ σ Δ, {{ Γ ⊢s σ : Δ }} -> {{ Γ ⊩s σ : Δ }}. | ||
Proof. solve_it. Qed. | ||
|
||
End soundness_fundamental. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From Coq Require Import Morphisms Morphisms_Prop Morphisms_Relations Relation_Definitions RelationClasses. | ||
|
||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core.Completeness Require Import FundamentalTheorem. | ||
From Mcltt.Core.Semantic Require Import Realizability. | ||
From Mcltt.Core.Soundness Require Import LogicalRelation Realizability. | ||
From Mcltt.Core.Syntactic Require Import Corollaries. | ||
Import Domain_Notations. | ||
|
||
Lemma glu_rel_exp_nat : forall {Γ i}, | ||
{{ ⊩ Γ }} -> | ||
{{ Γ ⊩ ℕ : Type@i }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_nat : mcltt. | ||
|
||
Lemma glu_rel_exp_zero : forall {Γ}, | ||
{{ ⊩ Γ }} -> | ||
{{ Γ ⊩ zero : ℕ }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_zero : mcltt. | ||
|
||
Lemma glu_rel_exp_succ : forall {Γ M}, | ||
{{ Γ ⊩ M : ℕ }} -> | ||
{{ Γ ⊩ succ M : ℕ }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_succ : mcltt. | ||
|
||
Lemma glu_rel_exp_natrec : forall {Γ A i MZ MS M}, | ||
{{ Γ , ℕ ⊩ A : Type@i }} -> | ||
{{ Γ ⊩ MZ : A[Id,,zero] }} -> | ||
{{ Γ , ℕ , A ⊩ MS : A[Wk∘Wk,,succ(#1)] }} -> | ||
{{ Γ ⊩ M : ℕ }} -> | ||
{{ Γ ⊩ rec M return A | zero -> MZ | succ -> MS end : A[Id,,M] }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_natrec : mcltt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From Coq Require Import Morphisms Morphisms_Prop Morphisms_Relations Relation_Definitions RelationClasses. | ||
|
||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core.Completeness Require Import FundamentalTheorem. | ||
From Mcltt.Core.Semantic Require Import Realizability. | ||
From Mcltt.Core.Soundness Require Import LogicalRelation Realizability. | ||
From Mcltt.Core.Syntactic Require Import Corollaries. | ||
Import Domain_Notations. | ||
|
||
Lemma glu_rel_sub_id : forall {Γ}, | ||
{{ ⊩ Γ }} -> | ||
{{ Γ ⊩s Id : Γ }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_sub_id : mcltt. | ||
|
||
Lemma glu_rel_sub_weaken : forall {Γ A}, | ||
{{ ⊩ Γ, A }} -> | ||
{{ Γ, A ⊩s Wk : Γ }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_sub_weaken : mcltt. | ||
|
||
Lemma glu_rel_sub_compose : forall {Γ1 σ2 Γ2 σ1 Γ3}, | ||
{{ Γ1 ⊩s σ2 : Γ2 }} -> | ||
{{ Γ2 ⊩s σ1 : Γ3 }} -> | ||
{{ Γ1 ⊩s σ1 ∘ σ2 : Γ3 }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_sub_compose : mcltt. | ||
|
||
Lemma glu_rel_sub_extend : forall {Γ σ Δ M A i}, | ||
{{ Γ ⊩s σ : Δ }} -> | ||
{{ Δ ⊩ A : Type@i }} -> | ||
{{ Γ ⊩ M : A[σ] }} -> | ||
{{ Γ ⊩s (σ ,, M) : Δ , A }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_sub_extend : mcltt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From Coq Require Import Morphisms Morphisms_Prop Morphisms_Relations Relation_Definitions RelationClasses. | ||
|
||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core.Completeness Require Import FundamentalTheorem. | ||
From Mcltt.Core.Semantic Require Import Realizability. | ||
From Mcltt.Core.Soundness Require Import LogicalRelation Realizability. | ||
From Mcltt.Core.Syntactic Require Import Corollaries. | ||
Import Domain_Notations. | ||
|
||
Lemma glu_rel_exp_vlookup : forall {Γ x A}, | ||
{{ ⊩ Γ }} -> | ||
{{ #x : A ∈ Γ }} -> | ||
{{ Γ ⊩ #x : A }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_vlookup : mcltt. | ||
|
||
Lemma glu_rel_exp_sub : forall {Γ σ Δ M A}, | ||
{{ Γ ⊩s σ : Δ }} -> | ||
{{ Δ ⊩ M : A }} -> | ||
{{ Γ ⊩ M[σ] : A[σ] }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_sub : mcltt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
From Coq Require Import Morphisms Morphisms_Prop Morphisms_Relations Relation_Definitions RelationClasses. | ||
|
||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core.Completeness Require Import FundamentalTheorem. | ||
From Mcltt.Core.Semantic Require Import Realizability. | ||
From Mcltt.Core.Soundness Require Import LogicalRelation Realizability. | ||
From Mcltt.Core.Syntactic Require Import Corollaries. | ||
Import Domain_Notations. | ||
|
||
Lemma glu_rel_exp_typ : forall {Γ i}, | ||
{{ ⊩ Γ }} -> | ||
{{ Γ ⊩ Type@i : Type@(S i) }}. | ||
Admitted. | ||
|
||
#[export] | ||
Hint Resolve glu_rel_exp_typ : mcltt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters