-
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 placeholder for soundness * Update names * Add algorithm to decide conversion
- Loading branch information
Showing
6 changed files
with
68 additions
and
2 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,8 @@ | ||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core Require Import Semantic.Domain Semantic.NbE System. | ||
Import Domain_Notations. | ||
|
||
Theorem soundness : forall {Γ M A}, | ||
{{ Γ ⊢ M : A }} -> | ||
exists W, nbe Γ M A W /\ {{ Γ ⊢ M ≈ W : A }}. | ||
Admitted. |
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,35 @@ | ||
From Mcltt Require Import Base LibTactics. | ||
From Mcltt.Core Require Import Completeness NbE Soundness System. | ||
From Mcltt.Extraction Require Import NbE. | ||
From Equations Require Import Equations. | ||
Import Domain_Notations. | ||
|
||
#[local] | ||
Ltac impl_obl_tac := | ||
match goal with | ||
| |- nbe_order ?G ?M ?A => | ||
(on_all_hyp: fun H => apply soundness in H); | ||
destruct_conjs; | ||
eapply nbe_order_sound; eassumption | ||
| |- False => | ||
(on_all_hyp: fun H => apply completeness in H); | ||
destruct_conjs; | ||
functional_nbe_rewrite_clear; | ||
congruence | ||
| _ => | ||
(on_all_hyp: fun H => apply soundness in H); | ||
destruct_conjs; | ||
functional_nbe_rewrite_clear; | ||
mauto | ||
end. | ||
|
||
#[tactic="impl_obl_tac"] | ||
Equations conversion_dec G A M (HM : {{ G ⊢ M : A }}) M' (HM' : {{ G ⊢ M' : A }}) : { {{ G ⊢ M ≈ M' : A}} } + { ~ {{ G ⊢ M ≈ M' : A}} } := | ||
| G, A, M, HM, M', HM' => | ||
let (W, HW) := nbe_impl G M A _ in | ||
let (W', HW') := nbe_impl G M' A _ in | ||
match nf_eq_dec W W' with | ||
| left _ => left _ | ||
| right _ => right _ | ||
end. | ||
Next Obligation. impl_obl_tac. Qed. |
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