Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting ConCert to Metacoq v1.0+8.14 #187

Merged
merged 23 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9183a44
Updating extraction. WIP.
annenkov Apr 28, 2022
43db37b
WIP updating MetaCoq, done with utils, almost done with embedding
annenkov Apr 6, 2022
df56c9b
WIP update metacoq: done with embedding
annenkov Apr 6, 2022
210a211
WIP metacoq update: fix embedding examples and extraction utils
annenkov Apr 6, 2022
9c5c0e8
Some progress on erasure
annenkov May 30, 2022
e6b4fa3
Updating embedding after fetching the last chnages from metacoq
annenkov Jun 3, 2022
5a8f1f7
Ported pretty-printing, optimisations; WIP optimisation correctness
annenkov Jun 24, 2022
b8403ff
Done with dearg_correct
annenkov Jul 26, 2022
88eeba0
Done with most of the MetaCoq porting
annenkov Aug 9, 2022
c36c443
Ported examples, fixes in embedding
annenkov Aug 9, 2022
9a6bd12
Fixes after rebase; update ligo compiler; changes in Tezos environmen…
annenkov Aug 9, 2022
accf5db
Fix github actions config
annenkov Aug 10, 2022
cada5bd
Tweaking build.yml
annenkov Aug 10, 2022
35a34f8
Removed redundant files from plugin _CoqProject
annenkov Aug 10, 2022
2c497e8
Put back -j2 for extraction
annenkov Aug 10, 2022
41b82db
Update installation instructions
annenkov Aug 10, 2022
eb0414a
Closed some admits
annenkov Aug 12, 2022
1eba73b
Update dependencies (#1)
annenkov Aug 16, 2022
889a558
Port to work with metacoq-1.0
annenkov Aug 16, 2022
b4c149b
Update Docker configs, misc fixes
annenkov Aug 16, 2022
f5c254a
Fix boardroom voting; fix chainbase specialisation; remove some admits
annenkov Aug 18, 2022
c0fde1b
Close admit in Erasure
annenkov Aug 18, 2022
8c232ce
Removed old comments
annenkov Aug 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Close admit in Erasure
  • Loading branch information
annenkov committed Aug 18, 2022
commit c0fde1ba12ce4d9d2ec8fb96403f7a5bd2f943a5
35 changes: 9 additions & 26 deletions extraction/theories/Erasure.v
Original file line number Diff line number Diff line change
Expand Up @@ -706,39 +706,22 @@ Next Obligation.
reduce_term_sound.
destruct r.
specialize (princK rΣ wfrΣ) as HH.
assert (∥ wf rΣ ∥) by now apply HΣ.
assert (∥ wf_ext rΣ ∥) by now apply heΣ.
assert (tyT : ∥ isType rΣ Γ T ∥) by eauto.
assert (tyNf : ∥ isType rΣ Γ nf ∥).
{ sq. eapply isType_red;eauto. }
{ sq. eapply isType_red;eauto. }
sq.
destruct tyT as [u tyT].
destruct tyNf as [v tyNf].
apply typing_wf_local in tyT.
assert (∥ wf rΣ ∥) by now apply HΣ.
assert (∥ wf_ext rΣ ∥) by now apply heΣ.
sq.
apply BDToPCUIC.infering_typing in HH;sq;eauto.
specialize (PCUICPrincipality.common_typing _ _ HH tyNf) as [?[?[??]]].
(* eapply PCUICCumulProp.cumul_sort_confluence in tyNf as w1;eauto. *)
specialize (ws_cumul_pb_Sort_r_inv _ w0) as (? & ? & ?).
eapply validity in HH as [uK tyK].
(* TODO: we should be able to show that [K ⇝* tSort u] for some u,
then we can instantiate a hypothesis to prove the contradiction *)
(* specialize (ws_cumul_pb_Sort_r_inv _ w) as (? & ? & ?). *)
(* destruct b. *)
(* assert (arity_v : isArity (tSort v)) by easy. *)

(* inversion tyNf. *)
(* assert (Σ;;; Γ |- T : K). *)
(* { eapply type_reduction;eauto. } *)
(* red_cumul *)
(* Search ( _ -> _ ;;; _ |- _ ⇝* _). *)
(* reduce_validity *)
(* cumul_Sort *)
(* destruct princK as [(typK & princK)]. *)
(* specialize (princK _ typ). *)
(* eapply invert_cumul_sort_r in princK as (? & ? & ?). *)
(* eauto. *)
Admitted.
specialize (PCUICPrincipality.common_typing _ _ HH tyNf) as [x[x_le_K[x_le_sort?]]].
apply ws_cumul_pb_Sort_r_inv in x_le_sort as (? & x_red & ?).
specialize (ws_cumul_pb_red_l_inv _ x_le_K x_red) as K_ge_sort.
apply ws_cumul_pb_Sort_l_inv in K_ge_sort as (? & K_red & ?).
exact (H _ K_red).
Qed.

Equations erase_type_discr (t : term) : Prop := {
| tRel _ := False;
Expand Down
4 changes: 2 additions & 2 deletions extraction/theories/TypeAnnotations.v
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ Proof.
(* alpha_eq_inst_case_context *)
(* inst_case_branch_context *)
split;[|now auto].
apply (todo "todo").
apply (todo "todo").
(* admit. *) apply (todo "todo").
(* admit. *) apply (todo "todo").
(* compare_decls_conv *)
(* PCUICContextConversionTyp.context_conversion *)
(* econstructor; eauto. *)
Expand Down