Skip to content

Commit

Permalink
intermediate commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HuStmpHrrr committed May 14, 2024
1 parent eef8e48 commit 0ed58c8
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions theories/Extraction/Evaluation.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From Mcltt Require Import Base.
From Mcltt Require Import Evaluation.Definitions.
Import Domain_Notations.

Generalizable All Variables.


Inductive eval_exp_order : exp -> env -> Prop :=
| eeo_typ :
`( eval_exp_order {{{ Type@i }}} p )
| eeo_var :
`( eval_exp_order {{{ # x }}} p )
| eeo_nat :
`( eval_exp_order {{{ ℕ }}} p )
| eeo_zero :
`( eval_exp_order {{{ zero }}} p )
| eeo_succ :
`( eval_exp_order {{{ M }}} p ->
eval_exp_order {{{ succ M }}} p )
| eeo_natrec :
`( {{ eval_exp_order M p }} ->
{{ rec m ⟦return A | zero -> MZ | succ -> MS end⟧ p ↘ r }} ->
eval_exp_order {{{ rec M return A | zero -> MZ | succ -> MS end }}} p ).

| eval_exp_natrec :
`( {{ ⟦ M ⟧ p ↘ m }} ->
{{ rec m ⟦return A | zero -> MZ | succ -> MS end⟧ p ↘ r }} ->
{{ ⟦ rec M return A | zero -> MZ | succ -> MS end ⟧ p ↘ r }} )
| eval_exp_pi :
`( {{ ⟦ A ⟧ p ↘ a }} ->
{{ ⟦ Π A B ⟧ p ↘ Π a p B }} )
| eval_exp_fn :
`( {{ ⟦ λ A M ⟧ p ↘ λ p M }} )
| eval_exp_app :
`( {{ ⟦ M ⟧ p ↘ m }} ->
{{ ⟦ N ⟧ p ↘ n }} ->
{{ $| m & n |↘ r }} ->
{{ ⟦ M N ⟧ p ↘ r }} )
| eval_exp_sub :
`( {{ ⟦ σ ⟧s p ↘ p' }} ->
{{ ⟦ M ⟧ p' ↘ m }} ->
{{ ⟦ M[σ] ⟧ p ↘ m }} )

0 comments on commit 0ed58c8

Please sign in to comment.