archive-fr.com » FR » N » NICOLASPOUILLARD.FR

Total: 307

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • pf pf addSubtractTm k 0 pf pf shiftTm α β s k α k β Tm s α Tm s k β shiftTm k shiftTm k refl addTm α s k Tm s α Tm s k α k addTm k shiftTm k refl shiftøTm α k Tm 0 ø Tm k α shiftøTm k shiftTm k 0 id k ø k subtractTm α s k Tm s k α k Tm s α subtractTm k addSubtractTm 0 k refl refl coerceTm s α β α β Tm s α Tm s β coerceTm shiftTm 0 coerceTmø s α Tm s ø Tm s α coerceTmø coerceTm ø rerootTm α k k Tm k ø Tm k α rerootTm k k addSubtractTm k k comm k k ø k renameTm α β s s s β α β Tm s α Tm s β renameTm s β trName TraverseNameTm trTm renameKit trName s β protectedAddTm α s s k s α k Tm s α Tm s α k protectedAddTm k pf renameTm pf add k This function behave like addTm but protectedAddTm track separatedely the bound and the free variables This gives more flexibilty since one can choose to move only the bound or only the free variables However addTm is faster and does not require a s α protectedAddTm α s k s α Tm s α Tm s k α k protectedAddTm k pf protectedAddTm k k protectedSubtractTm α s s k s α Tm s α k Tm s α protectedSubtractTm k pf renameTm pf subtract k renameTm A E E app Applicative E α β s s s β Name α E Name β Tm s α E Tm s β renameTm A E app s β trName TraverseANameTm trTm E app renameAKit E app trName s β renameTm α β s s s β α β Tm s α Tm s β renameTm renameTm A Maybe applicative closeTm s α Tm s α Tm s ø closeTm renameTm ø const nothing dist n n ø 1 n n ø dist zero ø 1 dist suc n trans dist 1 dist n shiftTm 1 α s n s n α n ø Tm s α Tm suc s s α shiftTm 1 n refl refl shiftTm 1 refl dist n importTm s α s α Tm s α Tm suc s s α importTm s α renameTm suc s α coerce s α substTm α β s s s β Name α Tm s β Tm s α Tm s β substTm s β f TraverseTm trTm substKit V importTm f s β substTm 0 α s Name α Tm 0 ø Tm s α Tm 0 ø substTm 0 substTm 0 ø substTm α s n Name α Tm n n ø Tm s α Tm n n ø substTm n substTm ø n 0 Tm 1 0 ø Tm 0 ø Tm 0 ø t 0 u substTm 0 exportWith u V t

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.LC.DbLevels.html (2015-10-11)
    Open archived version from archive



  • k α k mix n k ø n ø n k mix n k cong trans cong ø n exch k n coerce mix n k ø n ø n k coerce mix n k coerce mix n k module TraverseTm E E app Applicative E α β trName Su Name E Tm α β where open Applicative E app Su Tm E Tm α β V x trName x t u t u t suc t Let t u Let t suc u n pure n open TraverseAFGGGen Tm Tm V TraverseTm public renaming renameA to renameATm rename to renameTm shift to shiftTm coerceø to coerceTmø coerce to coerceTm subtract to subtractTm close to closeTm open SubstGen Tm V shiftTm TraverseTm id app public renaming substVarG to substVarTm subst to substTm β red α Tm α Tm α β red fct arg substTm subtractWith 1 arg V fct β red t t 0 α Tm α 1 Tm α Tm α t 0 u substTm subtractWith 1 u V t focus Path World World focus id focus p focus p 1 focus Let p focus p 1 focus p focus p focus p Path α Tm α Tm focus p α focus t just t focus p t focus p t focus p t focus p t focus p t focus p t focus Let p Let t focus p t focus Let p Let t focus p t focus nothing defocus p Path α Tm α Tm focus p α Tm α defocus id defocus p t defocus p t defocus p t u flip u defocus p t defocus p t u t defocus p u defocus Let p Let t u flip Let u defocus p t defocus Let p Let t u Let t defocus p u defocus t const t module Parser where module Tm Tm where Env World Set Env α String Name α extEnv α String Env α Env α 1 extEnv b Δ s if b s then 0 else suc Δ s α Env α Tm Tm α Δ V x V Δ x Δ b t extEnv b Δ t Δ t u Δ t Δ u conv Tm α Tm α conv map coerceTmø closeTm Tm Tm const zero ø open ParseConv conv public renaming parseConv to parseTm parseConv to parseTm TmOk to Tm Ok open Parser public using parseTm parseTm Tm Ok fv α Tm α List Name α fv fv V x x fv fct arg fv fct fv arg fv t rm fv t fv Let t u fv t rm fv u module Tm Tm where open import Data Nat Show open import Data Fin as Fin using to binder String binder n x show n name Name ø String name x binder suc Fin to toFin x Tm ø Tm V x V name x t binder 1 t t u t u Let t u binder 1 u t u t n

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.NaPa.LC.html (2015-10-11)
    Open archived version from archive


  • b b α Tm α 1 Tm b α openTm b ren exportWith name coerce b pred openTmS α s Supply α Tm α 1 Tm Supply seed s α openTmS b openTm b nomview α Supply α Tm α Tm α nomview s t openTmS s t nomview t t module NomDbIxOpenClose where data Tm α Set where V Name α Tm α b Tm b α Tm α Tm α 1 Tm α t u Tm α Tm α Let b t Tm α u Tm b α Tm α Close β eq α β 1 b t Tm b β Tm α Open β b eq α b β b b β t Tm β 1 Tm α rm α List Name α 1 List Name α rm map pred rm 0 maps b to 0 and any other name x to x 1 to b α Name b α Name α 1 to exportWith 0 suc maps 0 to b and any other name x 1 to x to b α b α Name α 1 Name b α to b α exportWith name coerce b α pred fv α Tm α List Name α fv V x x fv fct arg fv fct fv arg fv b t rm b fv t fv t rm fv t fv Let b t u fv t rm fv u fv Close refl b t map to fv t fv Open refl b t map to b fv t shiftTm Shift Tm Tm shiftTm open import Data Product closeTm α b Binder Tm b α Tm α 1 closeTm b t 0 name b shiftTm 1 1 t where α Name α Name α Tm α Tm α y V x if x a then V y else

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.LC.Combined.html (2015-10-11)
    Open archived version from archive


  • α Trm α b t Trm b α Trm α Let b t Trm α u Trm b α Trm α Cst τ κ Constant τ Trm α fs LabelAssoc Trm α Trm α get Label Trm α set Label Trm α update fs LabelAssoc Trm α Trm α α Trm α Trm α Trm ø generalize me with importTrm f x f V x where x 0 set Label Trm ø generalize me with importTrm set λ x update x module CBVBigStepEval where open Pa open Pa Workaround sequencePa A Set List A P List A P sequencePa now sequencePa x xs x λ y sequencePa xs λ ys now y ys mapPa A Set B A B P List A List B P mapPa f sequencePa List map f data Val Set where α Γ CEnv Val α b t Trm b α Val Cst τ Ty Constant τ Val fs LabelAssoc Val Val get Label Val set Label Val update fs LabelAssoc Val Val diverge A Set A P diverge later diverge Fix A Set A A A A Fix zero id Fix suc n f f Fix n f λ f x f f f f x Fixø Val Fixø n Γ f x Fix n V f V x where f 0 x 1 f name 1 f Γ CEnv Val ø Γ Nameø elim evalCst τ Constant τ Val Val P evalCst suc Cst Number n now Cst Number suc n evalCst NatFix τ Cst Number n now Fixø n evalCst Number diverge evalCst suc diverge evalCst NatFix τ diverge mutual eval α t Trm α Γ CEnv Val α Val P eval t u Γ eval u Γ λ v eval t Γ λ w app w v where app Val Val Val

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Examples.Records.html (2015-10-11)
    Open archived version from archive


  • open import Data Maybe NP record Laws nomPa NomPa Set where open NomPa nomPa field export coerce success b α pf α b α x Name α export coerce pf x just x coerce coerce α β γ pf α

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Laws.html (2015-10-11)
    Open archived version from archive


  • next y importFun x y f module LC link Link flink FreshLink link where data Tm α Set where V x Name α Tm α t u Tm α Tm α β α β t Tm β Tm α Let β α β t Tm α u Tm β Tm α open FreshLink flink open Traverse flink rm α β α β List Name β List Name α rm rm x xs with strengthen x nothing rm xs just x x rm xs fv α Tm α List Name α fv V x x fv t u fv t fv u fv t rm fv t fv Let t u fv t rm fv u extendCmpName α β α β Cmp Name α β α α β β Cmp Name α β extendCmpName f x x with strengthen x strengthen x just x just x f x x nothing nothing true false cmpTm α β Cmp Name α β Cmp Tm α β cmpTm f V x V x f x x cmpTm f t u t u cmpTm f t t cmpTm f u u cmpTm f t t cmpTm extendCmpName f t t cmpTm f Let t u Let t u cmpTm f t t cmpTm extendCmpName f u u cmpTm false Tm α Cmp Tm α α Tm cmpTm idTm Tm ø idTm x V x where x proj init x nameOf x apTm Tm ø apTm x y V x V y where x proj init y proj next init x weaken y nameOf x y nameOf y module Tr Env α β World Set trKit TrKit Env Tm where open TrKit trKit Res World Set Res α β Env α β Tm β V Name Res V x Γ trName Γ x α t u Res α Res α t u λ Γ t Γ u Γ α β α β t Res β Res α t Γ with commEnv Γ Γ t Γ Let α β α β t Res α u Res β Res α Let t u Γ with commEnv Γ Γ Let t Γ u Γ tr Tm Res tr V x V x tr t u tr t tr u tr t tr t tr Let t u Let tr t tr u tr α β Env α β Tm α Tm β tr Γ V x trName Γ x tr Γ t u tr Γ t tr Γ u tr Γ t with commEnv Γ Γ tr Γ t tr Γ Let t u with commEnv Γ Γ Let tr Γ t tr Γ u kitVar Env TrKit Env Name TrKit Env Tm kitVar mk trName commEnv mk λ Γ V trName Γ commEnv renameTm α β Fresh β Name α Name β Tm α Tm β renameTm fr f Tr tr kitVar renameKit fr f coerceTm α β Fresh β α β Tm α Tm β coerceTm fr renameTm fr coerce weakenTm α β α β Tm α

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.Link.html (2015-10-11)
    Open archived version from archive


  • anon α β Name α Name β Name α Name β map anon protect 1 or equally map anon f known anon known f name α b Name b α name b known name b no Name ø since anon Name ø Name ø anon x Name ø x anon Name ø anon x known Nameø elim x exportWith b a α A Set a A Name α A Name b α A exportWith v f known v exportWith v f known export b α Name b α Name α export exportWith anon id add α k Name α Name α k add map anon add suc α Name α Name α 1 suc add 1 suc α Name α Name α 1 suc coerce 1 1 suc Without the Name abstraction we could defined it as simply suc this would be wrong since anon should stay anon add α Name α Name α add coerce add subtract α k Name α k Name α subtract map anon subtract pred α Name α 1 Name α pred subtract 1 data Cmp α k Set where anon Cmp α k bound Name ø k Cmp α k free Name α k Cmp α k cmp α k Name α k Cmp α k cmp k known anon bound known free known cmp k α n Name n α n name n infixl 6 add subtract infix 4 cmp syntax subtract k x x k syntax add k x x k syntax cmp k x x k Handy name eliminator subtractWith a α A Set a A Name α A Name α A subtractWith v f x const v f subtract x subtract α Name α Name α subtract subtractWith nothing just subtract x with x anon anon bound anon free x

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.NomT.html (2015-10-11)
    Open archived version from archive


  • Name ø since anon Name ø Name ø anon x Name ø x anon Name ø anon nothing refl Name ø anon just x elim Nameø x export b α Name b α Name α export x export x data Cmp α k Set where nothing Cmp α k bound Name ø k Cmp α k free Name α k Cmp α k cmp α k Name α k Cmp α k cmp k nothing nothing cmp k just x bound just free just cmp k x add α k Name α Name α k add k x add k x subtract α k Name α k Name α subtract k x subtract k x coerce α β α β Name α Name β coerce pf x coerce pf x α n Name n α n name n infixl 6 add subtract infix 4 cmp syntax subtract k x x k syntax add k x x k syntax cmp k x x k suc α Name α Name α 1 suc add 1 suc α Name α Name α 1 suc coerce 1 1 suc add α Name α Name α add coerce add pred α Name α 1 Name α pred subtract 1 Handy name eliminator subtractWith a α A Set a A Name α A Name α A subtractWith v f x const v f subtract x subtract α Name α Name α subtract subtractWith nothing just subtract x with x nothing nothing bound nothing free x subtract x pred α Name α 1 Name α pred subtract 1 exportWith b a α A Set a A Name α A Name b α A exportWith v f maybe f just v export protect 1 α β Name α Name β Name α 1 Name β 1 protect 1

    Original URL path: https://nicolaspouillard.fr/publis/NomPa.agda/NomPa.NomT.Maybe.html (2015-10-11)
    Open archived version from archive