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".

  • import Relation Binary PropositionalEquality as record WorldSymantics W Set Set where field ø W 1 1 α W W 1 α W W 1 1 Abs α W W Abs 1 module WorldOps World Wsym WorldSymantics World where open WorldSymantics Wsym infixl 6 World World α 0 α α suc n α n 1 World World α 0 α α suc n α n 1 World World module ListBoolSpecialized where infixl 6 World Set World List Bool World World α k replicate k false α i k j k i j α World World α k replicate k true α i i i 0 k 1 α k module ListBoolWorlds where World Set World List Bool listBoolWorlds WorldSymantics List Bool listBoolWorlds record ø ø 1 1 1 1 where ø World ø 1 World World α 1 false α 1 World World α 1 true α World Set zero false zero true suc n xs n xs World Set x α x α infix 2 uniq x α p q x α p q uniq uniq zero false xs uniq zero true xs refl uniq suc n xs p q uniq n xs p q private module Unused where open

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.Worlds.html (2015-10-11)
    Open archived version from archive



  • ø α 1 ø λ x α ø α 1 ø x α 1 ø α ø λ f f suc where cong 1 α β α β α β α 1 β 1 cong 1 zero cong 1 α β suc x x α α β x x α cong 1 α β α β α β α 1 β 1 cong 1 zero cong 1 α β suc n x α 1 α β n x α 1 1 1 α α 1 α 1 1 1 zero 1 1 suc id α ø α 1 ø α α ø α 1 ø α ø α 1 ø α ø zero α ø α 1 ø α ø suc n x α 1 elim α ø x α 1 open Symantics symantics public hiding module Useless symantics Symantics listBoolWorlds symantics record 1 ø λ p p 0 1 1 λ p p 0 cong 1 λ g f g f suc cong 1 λ g f g f suc ctx 1 1 λ g f g f suc inj 1 λ f f cong 1 inj 1 λ f f cong 1 unctx 1 1 λ f f ctx 1 1 α ø α 1 ø λ g f g f suc α 1 ø α ø λ f f α ø α 1 ø module Complete minimalSymantics MinimalSymantics listBoolWorlds pack Pack listBoolWorlds where open WorldSymantics listBoolWorlds open MinimalSymantics minimalSymantics module B Pack pack open B using renaming to complete α β α β α β complete α β α β f α β α β where ø xs xs ø xs ø ø λ ø bottom ø true xs elim B elim B 1 ø ø false xs α ø α 1 β ø xs B α 1 ø α ø f xs ys xs ys xs ys f λ ø bottom f xs ø xs f true false elim B elim B 1 1 f true xs true ys cong 1 f xs ys B 1 inj f false xs true ys ctx 1 1 f xs ys B unctx 1 1 f false xs false ys cong 1 f xs ys B 1 inj module CompleteListBoolWorlds minimalSymantics MinimalSymantics listBoolWorlds where open Complete minimalSymantics pack module SemSyn World worldSym WorldSymantics World where open WorldSymantics worldSym open WorldOps worldSym renaming to infix 2 data α β World Set where ø bottom α ø α refl α α α cong 1 α β α β α β α 1 β 1 cong 1 α β α β α β α 1 β 1 ctx 1 1 α β α β α β α 1 β 1 α ø α 1 β α β α ø α 1 β module Sem where open WorldSymantics listBoolWorlds open SemSyn listBoolWorlds public α ø α β α α ø β α β α ø α β ø bottom ø bottom α ø α β refl ø bottom α ø α β α ø α 1 β x α ø α 1 β x symantics Symantics listBoolWorlds symantics record ø bottom ø bottom refl refl trans trans cong 1 cong 1 cong 1 cong 1 1 1 ctx 1 1 refl 1 inj 1 inj 1 inj 1 inj unctx 1 1 unctx 1 1 α ø α 1 ø α ø α 1 β α 1 ø α ø α 1 ø α ø where trans α β γ α β α β β γ β γ α γ trans ø bottom ø bottom trans refl α γ α γ trans α γ refl α γ trans cong 1 α β cong 1 β γ cong 1 trans α β β γ trans cong 1 α β cong 1 β γ cong 1 trans α β β γ trans cong 1 α β ctx 1 1 β γ ctx 1 1 trans α β β γ trans ctx 1 1 α β cong 1 β γ ctx 1 1 trans α β β γ trans cong 1 α β α ø α 1 β β ø α ø α 1 β trans α β β ø trans α ø α 1 β α ø α ø α 1 β α ø 1 inj α β α 1 β 1 α β 1 inj refl refl 1 inj cong 1 α β α β 1 inj α β α 1 β 1 α β 1 inj refl refl 1 inj cong 1 α β α β 1 inj α ø α 1 β x α ø α β x unctx 1 1 α β α 1 β 1 α 1 β 1 α β unctx 1 1 ctx 1 1 α β α β unctx 1 1 α ø α 1 β α ø trans α ø ø bottom α 1 ø α ø α α 1 ø α ø α 1 ø α ø α ø α 1 β α ø α ø open WorldOps listBoolWorlds minimalSymantics MinimalSymantics listBoolWorlds minimalSymantics record ø bottom ø bottom cong 1 cong 1 cong 1 cong 1 ctx 1 1 ctx 1 1 α ø α 1 β α ø α 1 β module Sound symantics Symantics listBoolWorlds where open Symantics symantics hiding minimalSymantics sound α β α β α β sound ø bottom ø bottom sound refl refl sound cong 1 α β cong 1 sound α β sound cong 1 α β cong 1 sound α β sound ctx 1 1 x ctx 1 1 sound x sound β β α ø α 1 β α ø α ø α 1 β β β sound α ø open Complete minimalSymantics public renaming complete to complete module Syntactic World worldSym WorldSymantics World where open WorldSymantics worldSym infix 2 data α β World Set where ø bottom α ø α refl α α α trans α β γ α β α β β γ β γ α γ cong 1 α β α β α β

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.Subtyping.html (2015-10-11)
    Open archived version from archive


  • Γ y with f x y just y lookupStar f Γ y nothing inj x Star does not support univ poly yet starEnv EnvPack zero starEnv record Env Env emptyEnv ε lookupEnv lookupEnv λ Γ x carry x Γ mapEnv mapEnv where Env A Set Rel World Env Star Carry 1 lookupEnv α γ A Env A α γ Name γ Name α A lookupEnv ε x inj x lookupEnv carry z Γ x with exportName 1 x just x lookupEnv Γ x nothing inj z mapEnv α β A B A B Env A α β Env B α β mapEnv f ε ε mapEnv f carry x xs carry f x mapEnv f xs module Env EnvPack starEnv closeEnv EnvPack zero CEnvPack zero closeEnv env record CEnv CEnv emptyCEnv emptyEnv lookupCEnv lookupCEnv mapCEnv mapEnv where open EnvPack env CEnv Set World Set CEnv A Env A ø lookupCEnv α τ CEnv τ α Name α τ lookupCEnv Γ Nameø elim id lookupEnv Γ where open NamePack module CEnv CEnvPack closeEnv starEnv funEnv EnvPack funEnv record Env Env emptyEnv inj lookupEnv id mapEnv mapEnv where Env Set World World Set Env A α β Name β Name α A α β A Env A α β A Env A α β 1 Γ v maybe Γ inj v exportName 1 mapEnv α β A B A B Env A α β Env B α β mapEnv f g x inj inj f g x funCEnv CEnvPack funCEnv record CEnv CEnv emptyCEnv λ η Nameø elim lookupCEnv id mapCEnv where open NamePack CEnv Set World Set CEnv A α Name α A α A CEnv A α A CEnv A α 1 Γ v maybe Γ v exportName 1 shiftableFunEnv ShiftableEnvPack shiftableFunEnv record envPack funEnv shiftEnv shiftEnv where open EnvPack funEnv shiftEnv α β γ A k α k β Env A α γ Env A β γ shiftEnv k α k β Γ map coe α k β add k id Γ Su F G World Set α β World Set Su F G α β k F α k G β k Tr F World Set M Set Set α β World Set Tr F M Su F M F Subst F G can be read as F G in HOAS Subst F G World Set Set Subst F G α β Name α F β G α G β SubstVar F World Set Set SubstVar F α β Name α F β Su Name F α β This module is more an example of how to write traverse for your data type module Traversable α β M M applicative Cat RawApplicative M trName Tr Name M α β where open Cat RawApplicative M applicative Traverse World Set Set Traverse F Tr F M α β traverseName Traverse Name traverseName trName traverse G H Traverse G Traverse H Traverse G H traverse traverseG traverseH k x y traverseG k x traverseH k y traverseAbs G Traverse G Traverse

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.Derived.html (2015-10-11)
    Open archived version from archive


  • x k suc k name x where open Reasoning subtract α World k Name α k Name α subtract subtract subtract zero x x subtract α α α suc k k k x x x name α name x suc k p cong λ x name α x name injective sym assoc name x 1 k name α name x 1 k r subtract α k predNm x predNm x predNm α k x x x name x 1 k e reflexive assoc name x 1 k name x suc k where open Reasoning nm bool α World k Name α k Bool nm bool nm bool nm bool α k x x x helper k x x nm x where helper k Name α k Bool nm bool nm bool helper zero refl false helper suc k zero refl true helper suc k suc x pf refl helper k x pf refl easy nm α World k Name α k Name ø k Name α k easy nm easy nm easy nm α k x x x helper k x x nm x where helper k Name α k Name ø k Name α k easy nm easy nm helper zero refl inj nm cong λ x name α x e refl helper suc k zero refl inj zero helper suc k k k suc x pf refl map suc suc helper k x pf refl nm α World k Name α k Name ø k Name α k nm nm nm α α α k k k x x x subst λ x Name ø k Name α k nm α k x x easy nm nm α k x subst λ x Name ø k Name α k x easy nm α k x easy nm nm α k x easy nm α k x x x lift 1 α World β World Name α Name β Name α 1 Name β 1 lift 1 lift 1 lift 1 α α α β β β f f f x x x helper x x nm x where helper Name α 1 Name β 1 lift 1 f lift 1 f helper zero refl zero helper suc x pf refl suc f e refl b WorldRel b α β α β α β Name α Name β coe α β coe α β data α α α World α α β β β World β β x α β y α β Set where mk b α β x y α β x y un α α α World α α β β β World β β x α β y α β α β x y b α β x y un mk x a b c x a b c refl α World α α refl refl refl mk λ x x trans α World β World γ World α β β γ α γ trans trans trans f f g mk λ x x x

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.LogicalRelation.html (2015-10-11)
    Open archived version from archive


  • record injective injective surjective to surj where open Injection α 1 from Nm α 1 Nm α 1 from Name to Nm lift 1 Bijective from α bij to left inv from to LeftInverseOf from to left inv from zero zero to left inv from suc n pfx suc Bijective right inverse of α bij n pfx to surj Surjective to to surj record from from right inverse of to

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.LogicalRelation.Bijection.html (2015-10-11)
    Open archived version from archive


  • Set where field Name World Set World World Set infix 2 record Primitives World worldSym WorldSymantics World types Types World Sym Symantics worldSym Types types Set where open Types types open WorldSymantics worldSym open WorldOps worldSym open Symantics Sym field nm α Name α Name α Bool fromFin α n Fin n Name α n add α k Name α Name α k subtract α k Name α k Name α coe α β α β Name α Name β nm α k Name α k Name ø k Name α k Name α α ø Name α infixl 6 add subtract infix 4 nm syntax subtract k x x nm k syntax add k x x nm k syntax nm k x x nm k module Derived World worldSym WorldSymantics World types Types World Sym Symantics worldSym Types types prims Primitives worldSym types Sym where open Types types open WorldSymantics worldSym open WorldOps worldSym open Symantics Sym open Primitives prims naPaKit DataKit naPaKit mkKit Name 1 ze α Name α 1 ze α fromFin α 1 zero ze 1 α k Name α 1 k ze 1 ze su α Name α Name α 1 su x x nm

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.Interface.html (2015-10-11)
    Open archived version from archive


  • Name 1 to 1 open DataKit k renaming World to World Name to Name 1 to 1 field Env World World Set α α Env α α Env α 1 α 1 lookup α α Env α α Name α Name α this should be moved elsewhere naPaKit DataKit naPaKit mkKit Name 1 naPa to fin TransKit naPa to fin mkTransKit naPaKit finKit λ α n Name α Fin n id where open import Data Fin α n Name α Fin n Name α 1 Fin suc n f maybe suc f zero exportName 1 naPa to may TransKit naPa to may mkTransKit naPaKit mayKit λ α A Name α A id where open Cat RawFunctor Maybe functor α A Name α A Name α 1 Maybe A f x f exportName 1 x naPa to raw TransKit naPa to raw mkTransKit naPaKit rawKit λ α Name α id where α Name α Name α 1 f maybe suc f zero exportName 1 raw to NaPa TransKit raw to NaPa mkTransKit rawKit naPaKit λ α Name α id where α Name α Name α 1 zero ze f suc n su f n fin to NaPa TransKit fin to NaPa

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.TransKit.html (2015-10-11)
    Open archived version from archive


  • refl ι Ty ο no λ ι Ty no λ ο Ty ο yes refl ο Ty ι no λ ο Ty no λ Ty ι no λ Ty ο no λ τ τ Ty τ τ with τ Ty τ τ Ty τ yes p yes q yes cong p q yes p no q no q inj no p yes q no p inj no p no q no p inj κ Decidable A Constant num m κ num n mapDec Number con m n natFix σ κ natFix τ mapDec NatFix con σ Ty τ suc κ suc yes refl num κ natFix no λ num κ suc no λ natFix κ num no λ natFix κ suc no λ suc κ natFix no λ suc κ num no λ rm α List Name α 1 List Name α rm rm x xs with exportName 1 x just x x rm xs nothing rm xs 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 αeqTm α β αEq Name α β αEq Tm α β αeqTm α β Γ go 0 where open αEquivalence go k αEq Tm α k β k go κ κ κ κ κ go k V x V y αeqName Γ k x y go k t u v w go k t v go k u w go k τ t σ u τ Ty σ go suc k t u go k Let t u Let v w go k t v go suc k u w go false size α Tm α size V 1 size t u 1 size t size u size t 1 size t size Let t u 1 size t size u size 1 count α Name α Tm α count α x cnt 0 where cnt k Tm α k cnt k V x with exportName k x just x if x nm x then 1 else 0 nothing 0 cnt k t u cnt k t cnt k u cnt k t cnt suc k t cnt k Let t u cnt k t cnt suc k u cnt 0 fv α Tm α List Name α fv V x List fromMaybe exportName x fv t u fv t fv u fv t fv suc t fv Let t u fv t fv suc u fv fv Env α β World Set fv Env α β Name α List Name β extfv α β fv Env α β fv Env α 1 β extfv f concatMap f List fromMaybe exportName 1 fv α β fv Env α β Tm α List Name β fv Γ V x Γ x fv Γ t u fv Γ t fv Γ u fv Γ t fv extfv Γ t fv Γ Let t u fv Γ t fv extfv Γ u

    Original URL path: http://nicolaspouillard.fr/publis/nameless-painless.agda/NaPa.Examples.STLC.html (2015-10-11)
    Open archived version from archive